mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
Merge branch 'current' of github.com:vyos/vyos-build into equuleus
* 'current' of github.com:vyos/vyos-build: Jenkins: adjust artifacts to archive Jenkins: remove dbg packages before assembling ISO to reduce size hooks: initramfs: add option to update an existing initramfs Revert "hooks: initramfs: add option to remove an existing initramfs" T1366: Update Linux Kernel to v4.19.40 hooks: initramfs: add option to remove an existing initramfs Jenkins: list build packages Packages: add vyos-replace package to build procedure intel: remove debhelper depencendy on linux-image intel: set debhelper compat level to 9 Packages: add keepalived 2.0.10 to build procedure Docker: add additional dependencies for Debian keepalived repo Revert "Makefile: proper handle 'make iso' error codes" Revert "use bash as the shell for make" use bash as the shell for make add reprepro deploy script Packages: add net-snmp package to build procedure Packages: remove duplicate '-j' statement when building Kernel
This commit is contained in:
commit
ef7e354035
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@ -145,6 +145,12 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('List Packages') {
|
||||||
|
steps {
|
||||||
|
sh "find packages/ -maxdepth 1 -type f -print0 | xargs -0r ls"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('ISO Image') {
|
stage('ISO Image') {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
@ -154,6 +160,9 @@ pipeline {
|
|||||||
# we rather prefer all build by ourself!
|
# we rather prefer all build by ourself!
|
||||||
sed -i '/vyos_repo_entry/d' scripts/live-build-config
|
sed -i '/vyos_repo_entry/d' scripts/live-build-config
|
||||||
|
|
||||||
|
# remove debug packages
|
||||||
|
rm -f packages/*-dbg_*.deb
|
||||||
|
|
||||||
# Configure the ISO
|
# Configure the ISO
|
||||||
./configure --build-by="autobuild@vyos.net" --debian-mirror="http://ftp.us.debian.org/debian/"
|
./configure --build-by="autobuild@vyos.net" --debian-mirror="http://ftp.us.debian.org/debian/"
|
||||||
|
|
||||||
@ -165,11 +174,8 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
|
||||||
archiveArtifacts artifacts: 'build/build.log', fingerprint: true
|
|
||||||
}
|
|
||||||
success {
|
success {
|
||||||
archiveArtifacts artifacts: 'build/vyos*.iso', fingerprint: true
|
archiveArtifacts artifacts: 'build/live-image-*.iso', fingerprint: true
|
||||||
}
|
}
|
||||||
cleanup {
|
cleanup {
|
||||||
echo 'One way or another, I have finished'
|
echo 'One way or another, I have finished'
|
||||||
|
|||||||
4
Makefile
4
Makefile
@ -28,13 +28,9 @@ prepare:
|
|||||||
.ONESHELL:
|
.ONESHELL:
|
||||||
iso: check_build_config clean prepare
|
iso: check_build_config clean prepare
|
||||||
@set -e
|
@set -e
|
||||||
@set -o pipefail
|
|
||||||
@echo "It's not like I'm building this specially for you or anything!"
|
@echo "It's not like I'm building this specially for you or anything!"
|
||||||
cd $(build_dir)
|
cd $(build_dir)
|
||||||
lb build 2>&1 | tee build.log
|
lb build 2>&1 | tee build.log
|
||||||
if [ "$?" != "0" ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
cd ..
|
cd ..
|
||||||
@scripts/copy-image
|
@scripts/copy-image
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
"debian_distribution": "buster",
|
"debian_distribution": "buster",
|
||||||
"vyos_mirror": "http://dev.packages.vyos.net/repositories/current",
|
"vyos_mirror": "http://dev.packages.vyos.net/repositories/current",
|
||||||
"vyos_branch": "current",
|
"vyos_branch": "current",
|
||||||
"kernel_version": "4.19.36",
|
"kernel_version": "4.19.40",
|
||||||
"kernel_flavor": "amd64-vyos",
|
"kernel_flavor": "amd64-vyos",
|
||||||
"additional_repositories": [],
|
"additional_repositories": [],
|
||||||
"custom_packages": []
|
"custom_packages": []
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
4.19.36-amd64-vyos
|
4.19.40-amd64-vyos
|
||||||
|
|||||||
@ -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
|
# Kernel complains about non available nls_ascii module when booting from USB pendrive
|
||||||
echo "nls_ascii" >> /etc/initramfs-tools/modules
|
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'`
|
||||||
|
|||||||
@ -263,8 +263,18 @@ RUN apt-get update && apt-get install -y \
|
|||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
libnl-3-200 \
|
libnl-3-200 \
|
||||||
libnl-3-dev \
|
libnl-3-dev \
|
||||||
|
libnl-nf-3-200 \
|
||||||
|
libnl-nf-3-dev \
|
||||||
|
libipset-dev \
|
||||||
libnl-genl-3-200 \
|
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
|
# Install packer
|
||||||
RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/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
|
# Cleanup
|
||||||
RUN rm -rf /tmp/*
|
RUN rm -rf /tmp/*
|
||||||
|
|
||||||
|
COPY pkg-build.sh /usr/local/bin/pkg-build.sh
|
||||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||||
|
|||||||
55
docker/pkg-build.sh
Executable file
55
docker/pkg-build.sh
Executable file
@ -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
|
||||||
@ -60,6 +60,7 @@ do
|
|||||||
make -j $(cat /proc/cpuinfo | grep processor | wc -l) install
|
make -j $(cat /proc/cpuinfo | grep processor | wc -l) install
|
||||||
|
|
||||||
mkdir -p $deb_pkg_dir/DEBIAN
|
mkdir -p $deb_pkg_dir/DEBIAN
|
||||||
|
echo "9" >$deb_pkg_dir/DEBIAN/compat
|
||||||
echo "Package: vyos-intel-$dirname" >$deb_pkg_dir/DEBIAN/control
|
echo "Package: vyos-intel-$dirname" >$deb_pkg_dir/DEBIAN/control
|
||||||
echo "Version: $version" >>$deb_pkg_dir/DEBIAN/control
|
echo "Version: $version" >>$deb_pkg_dir/DEBIAN/control
|
||||||
echo "Section: kernel" >>$deb_pkg_dir/DEBIAN/control
|
echo "Section: kernel" >>$deb_pkg_dir/DEBIAN/control
|
||||||
|
|||||||
@ -172,6 +172,7 @@ vyos_packages = ['vyatta-bash',
|
|||||||
'vyatta-lldp',
|
'vyatta-lldp',
|
||||||
'vyatta-ipv6-rtradv',
|
'vyatta-ipv6-rtradv',
|
||||||
'vyatta-ravpn',
|
'vyatta-ravpn',
|
||||||
|
'vyos-replace',
|
||||||
'vyos-nhrp',
|
'vyos-nhrp',
|
||||||
'vyos-world',
|
'vyos-world',
|
||||||
'vyatta-iproute',
|
'vyatta-iproute',
|
||||||
@ -220,13 +221,28 @@ pkg_special.append( add_package('frr', url='https://github.com/FRRouting/frr.git
|
|||||||
#pkg_special.append( add_package('libyang', url='https://github.com/opensourcerouting/libyang.git', commit='179da47', branch='master', custombuild_cmd=libyang_build_cmd) )
|
#pkg_special.append( add_package('libyang', url='https://github.com/opensourcerouting/libyang.git', commit='179da47', branch='master', custombuild_cmd=libyang_build_cmd) )
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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
|
# Linux (VyOS) Kernel
|
||||||
#
|
#
|
||||||
kernel_build_cmd = "make x86_64_vyos_defconfig && " \
|
kernel_build_cmd = "make x86_64_vyos_defconfig && " \
|
||||||
"echo $(make kernelversion)-amd64-vyos > " + repo_root + "/data/kernel_version && " \
|
"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 && " \
|
"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) )
|
pkg_special.append( add_package('vyos-kernel', branch='linux-vyos-4.19.y', custombuild_cmd=kernel_build_cmd) )
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user