summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Jenkinsfile14
-rw-r--r--Makefile4
-rw-r--r--data/defaults.json2
-rw-r--r--data/kernel_version2
-rwxr-xr-xdata/live-build-config/hooks/live/17-gen_initramfs.chroot2
-rw-r--r--docker/Dockerfile13
-rwxr-xr-xdocker/pkg-build.sh55
-rwxr-xr-xscripts/build-intel-drivers1
-rwxr-xr-xscripts/build-packages18
9 files changed, 98 insertions, 13 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 90c38d1c..e8b83415 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -145,6 +145,12 @@ pipeline {
}
}
+ stage('List Packages') {
+ steps {
+ sh "find packages/ -maxdepth 1 -type f -print0 | xargs -0r ls"
+ }
+ }
+
stage('ISO Image') {
steps {
sh '''
@@ -154,6 +160,9 @@ pipeline {
# we rather prefer all build by ourself!
sed -i '/vyos_repo_entry/d' scripts/live-build-config
+ # remove debug packages
+ rm -f packages/*-dbg_*.deb
+
# Configure the ISO
./configure --build-by="autobuild@vyos.net" --debian-mirror="http://ftp.us.debian.org/debian/"
@@ -165,11 +174,8 @@ pipeline {
}
post {
- always {
- archiveArtifacts artifacts: 'build/build.log', fingerprint: true
- }
success {
- archiveArtifacts artifacts: 'build/vyos*.iso', fingerprint: true
+ archiveArtifacts artifacts: 'build/live-image-*.iso', fingerprint: true
}
cleanup {
echo 'One way or another, I have finished'
diff --git a/Makefile b/Makefile
index 628574e2..3bfa9597 100644
--- a/Makefile
+++ b/Makefile
@@ -28,13 +28,9 @@ prepare:
.ONESHELL:
iso: check_build_config clean prepare
@set -e
- @set -o pipefail
@echo "It's not like I'm building this specially for you or anything!"
cd $(build_dir)
lb build 2>&1 | tee build.log
- if [ "$?" != "0" ]; then
- exit 1
- fi
cd ..
@scripts/copy-image
diff --git a/data/defaults.json b/data/defaults.json
index bddc75f1..cd110951 100644
--- a/data/defaults.json
+++ b/data/defaults.json
@@ -5,7 +5,7 @@
"debian_distribution": "buster",
"vyos_mirror": "http://dev.packages.vyos.net/repositories/current",
"vyos_branch": "current",
- "kernel_version": "4.19.36",
+ "kernel_version": "4.19.40",
"kernel_flavor": "amd64-vyos",
"additional_repositories": [],
"custom_packages": []
diff --git a/data/kernel_version b/data/kernel_version
index ab416d6c..51333a00 100644
--- a/data/kernel_version
+++ b/data/kernel_version
@@ -1 +1 @@
-4.19.36-amd64-vyos
+4.19.40-amd64-vyos
diff --git a/data/live-build-config/hooks/live/17-gen_initramfs.chroot b/data/live-build-config/hooks/live/17-gen_initramfs.chroot
index 0f5e0ece..6ecf4be7 100755
--- a/data/live-build-config/hooks/live/17-gen_initramfs.chroot
+++ b/data/live-build-config/hooks/live/17-gen_initramfs.chroot
@@ -5,4 +5,4 @@ echo I: Create initramfs if it does not exist.
# Kernel complains about non available nls_ascii module when booting from USB pendrive
echo "nls_ascii" >> /etc/initramfs-tools/modules
-update-initramfs -c -k `ls /boot | grep vmlinuz- | sed 's/vmlinuz-//g'`
+update-initramfs -c -u -k `ls /boot | grep vmlinuz- | sed 's/vmlinuz-//g'`
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 792a45de..bfb56e50 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -263,8 +263,18 @@ RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y \
libnl-3-200 \
libnl-3-dev \
+ libnl-nf-3-200 \
+ libnl-nf-3-dev \
+ libipset-dev \
libnl-genl-3-200 \
- libnl-genl-3-dev
+ libnl-genl-3-dev \
+ libpopt-dev
+
+# Packages needed for net-snmp
+RUN apt-get update && apt-get install -y \
+ python-all \
+ python2.7-dev \
+ libmysqld-dev
# Install packer
RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \
@@ -283,5 +293,6 @@ RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc
# Cleanup
RUN rm -rf /tmp/*
+COPY pkg-build.sh /usr/local/bin/pkg-build.sh
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
diff --git a/docker/pkg-build.sh b/docker/pkg-build.sh
new file mode 100755
index 00000000..598917a1
--- /dev/null
+++ b/docker/pkg-build.sh
@@ -0,0 +1,55 @@
+if [ -z "$1" ]; then
+ RELEASE=`echo $GIT_BRANCH | sed 's/origin\//* /g' |sed -n 's/^\* \(.*\)$/\1/p'`
+else
+ RELEASE="$1"
+fi
+
+if [ "$RELEASE" == "master" ]; then
+ RELEASE="current"
+fi
+
+if [ -n "$1" ]; then
+ RELEASE="$1"
+fi
+
+ARCH=`dpkg --print-architecture`
+VYOS_REPO_PATH="/home/sentrium/web/dev.packages.vyos.net/public_html/repositories/$RELEASE/vyos/"
+
+exit_code () {
+rc=$?
+if [[ $rc != 0 ]] ; then
+ exit $rc
+fi
+}
+
+echo $RELEASE
+
+ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "bash --login -c 'mkdir -p ~/VyOS/$RELEASE/$ARCH'"
+exit_code
+
+scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ../*.deb khagen@dev.packages.vyos.net:~/VyOS/$RELEASE/$ARCH/
+exit_code
+
+for PACKAGE in `ls ../*.deb`;
+do
+ PACKAGE=`echo $PACKAGE| cut -d'/' -f 2`
+ SUBSTRING=`echo $PACKAGE| cut -d'_' -f 1`
+ if [[ "$PACKAGE" == *_all* ]]; then
+ ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} remove ${RELEASE} ${SUBSTRING}'"
+ exit_code
+ else
+ ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} -A $ARCH remove $RELEASE $SUBSTRING'"
+ exit_code
+ fi
+ ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} deleteunreferenced'"
+ exit_code
+ if [[ "$PACKAGE" == *_all* ]]; then
+ ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} includedeb $RELEASE ~/VyOS/$RELEASE/$ARCH/$PACKAGE'"
+ exit_code
+ else
+ ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no khagen@dev.packages.vyos.net -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} -A $ARCH includedeb $RELEASE ~/VyOS/$RELEASE/$ARCH/$PACKAGE'"
+ exit_code
+ fi
+done
+
+rm -f ../*.deb
diff --git a/scripts/build-intel-drivers b/scripts/build-intel-drivers
index 2c5882bb..f47b6c9c 100755
--- a/scripts/build-intel-drivers
+++ b/scripts/build-intel-drivers
@@ -60,6 +60,7 @@ do
make -j $(cat /proc/cpuinfo | grep processor | wc -l) install
mkdir -p $deb_pkg_dir/DEBIAN
+ echo "9" >$deb_pkg_dir/DEBIAN/compat
echo "Package: vyos-intel-$dirname" >$deb_pkg_dir/DEBIAN/control
echo "Version: $version" >>$deb_pkg_dir/DEBIAN/control
echo "Section: kernel" >>$deb_pkg_dir/DEBIAN/control
diff --git a/scripts/build-packages b/scripts/build-packages
index a0e329b7..2d33708f 100755
--- a/scripts/build-packages
+++ b/scripts/build-packages
@@ -172,6 +172,7 @@ vyos_packages = ['vyatta-bash',
'vyatta-lldp',
'vyatta-ipv6-rtradv',
'vyatta-ravpn',
+ 'vyos-replace',
'vyos-nhrp',
'vyos-world',
'vyatta-iproute',
@@ -221,12 +222,27 @@ pkg_special.append( add_package('frr', url='https://github.com/FRRouting/frr.git
#
+# We use keepalived from Debian Buster
+#
+keepalived_build_cmd = "sed -i 's/debhelper (>= 11)/debhelper (>= 9)/' debian/control && " \
+ "echo 9 > debian/compat && " \
+ "dpkg-buildpackage -b -us -uc -tc -j$(getconf _NPROCESSORS_ONLN)"
+pkg_special.append( add_package('keepalived', url='https://salsa.debian.org/ipvs-team/pkg-keepalived.git', branch='master', commit='eae91c81', custombuild_cmd=keepalived_build_cmd) )
+
+#
+# Net-SNMP
+#
+# net-snmp conflicts with already installed libsnmp-dev thus we need to build with -d
+net_snmp_build_cmd = "dpkg-buildpackage -b -us -uc -tc -d -j$(getconf _NPROCESSORS_ONLN)"
+pkg_special.append( add_package('net-snmp', custombuild_cmd=net_snmp_build_cmd) )
+
+#
# Linux (VyOS) Kernel
#
kernel_build_cmd = "make x86_64_vyos_defconfig && " \
"echo $(make kernelversion)-amd64-vyos > " + repo_root + "/data/kernel_version && " \
"sed -i 's/\"kernel_version\": \"[0-9].[0-9][0-9].[0-9]*\"/\"kernel_version\": \"'$(make kernelversion)'\"/' " + repo_root + "/data/defaults.json && " \
- "make bindeb-pkg -j8 LOCALVERSION='-amd64-vyos' KDEB_PKGVERSION=$(make kernelversion)-1 -j $(getconf _NPROCESSORS_ONLN)"
+ "make bindeb-pkg LOCALVERSION='-amd64-vyos' KDEB_PKGVERSION=$(make kernelversion)-1 -j $(getconf _NPROCESSORS_ONLN)"
pkg_special.append( add_package('vyos-kernel', branch='linux-vyos-4.19.y', custombuild_cmd=kernel_build_cmd) )