Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Turris
python-ubus
Commits
75d58398
Verified
Commit
75d58398
authored
Jul 24, 2021
by
Martin Matějek
Browse files
fixup! CI: use debian stable instead of ubuntu bionic and drop python2
parent
5365c84b
Pipeline
#85907
failed with stage
in 31 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CI/Dockerfile
View file @
75d58398
FROM
ubuntu:bionic
FROM
debian:stable
ENV
HOME=/root
ENV
TZ=Europe/Prague
ENV
LC_ALL=en_US.utf8
ENV
DEBIAN_FRONTEND=noninteractive
# Install base packages
# TODO once bullseye becomes stable remove the backports
RUN
\
sed
-i
's/# \(.*multiverse$\)/\1/g'
/etc/apt/sources.list
&&
\
echo
"deb http://deb.debian.org/debian buster-backports main"
>
/etc/apt/sources.list.d/backports.list
&&
\
echo
"# Installing base packages"
&&
\
apt-get update
&&
\
apt-get
-y
upgrade
&&
\
apt-get
-y
install
--no-install-recommends
\
lua5.1 liblua5.1-0-dev libjson-c-dev
\
git cmake make pkg-config gcc g++ openssh-client
\
python-prctl python-dev python-setuptools python-pip
\
python3-prctl python3-dev python3-setuptools python3-pip
\
locales
\
&&
\
apt-get clean
# Set Timezone
RUN
\
rm
-f
/etc/localtime
&&
\
echo
"
$TZ
"
>
/etc/timezone
&&
\
dpkg-reconfigure
-f
noninteractive tzdata
# Update python paths
RUN
\
update-alternatives
--install
/usr/bin/python python /usr/bin/python3 1
&&
\
update-alternatives
--install
/usr/bin/pip pip /usr/bin/pip3 1
# Generate locales
RUN
\
echo
"en_US.UTF-8 UTF-8"
>
/etc/locale.gen
&&
\
locale-gen
# Use updated version of some core python packages
#RUN \
# pip install --upgrade pip && \
# pip install --upgrade setuptools
# Compile libubox
RUN
\
mkdir
-p
~/build
&&
\
...
...
@@ -36,7 +45,7 @@ RUN \
git clone git://git.openwrt.org/project/libubox.git
&&
\
cd
~/build/libubox
&&
\
git checkout master
&&
\
cmake CMakeLists.txt
&&
\
cmake CMakeLists.txt
-DCMAKE_INSTALL_PREFIX
:PATH
=
/usr
&&
\
make
install
# Compile ubus
...
...
@@ -44,19 +53,15 @@ RUN \
mkdir
-p
~/build
&&
\
cd
~/build
&&
\
rm
-rf
ubus
&&
\
git clone https://gitlab.
labs.
nic.cz/turris/ubus.git
&&
\
git clone https://gitlab.nic.cz/turris/ubus.git
&&
\
cd
~/build/ubus
&&
\
git checkout python_bindings
&&
\
cmake CMakeLists.txt
-DBUILD_PYTHON
=
'ON'
&&
\
make
&&
\
cmake CMakeLists.txt
-DBUILD_PYTHON
=
'OFF'
&&
\
make
install
&&
\
cd
python
&&
\
pip
install
--upgrade
.
git checkout master
&&
\
cmake CMakeLists.txt
-DCMAKE_INSTALL_PREFIX
:PATH
=
/usr
&&
\
make
install
# Add Gitlab's SSH key
RUN
\
mkdir
/root/.ssh
&&
\
ssh-keyscan gitlab.
labs.
nic.cz
>
/root/.ssh/known_hosts
ssh-keyscan gitlab.nic.cz
>
/root/.ssh/known_hosts
CMD
[ "bash" ]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment