From b10711d42e65c1ae604891d33cfd83628ca7aa64 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 27 Jan 2019 13:04:11 +0100 Subject: build-submodules: add libyang --- .gitmodules | 5 ++++- packages/libyang | 1 + scripts/build-submodules | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 160000 packages/libyang diff --git a/.gitmodules b/.gitmodules index 22bb87d5..30793200 100644 --- a/.gitmodules +++ b/.gitmodules @@ -236,4 +236,7 @@ [submodule "packages/igmpproxy"] path = packages/igmpproxy url = https://github.com/vyos/igmpproxy.git - branch = current \ No newline at end of file + branch = current +[submodule "packages/libyang"] + path = packages/libyang + url = https://github.com/opensourcerouting/libyang.git diff --git a/packages/libyang b/packages/libyang new file mode 160000 index 00000000..179da47f --- /dev/null +++ b/packages/libyang @@ -0,0 +1 @@ +Subproject commit 179da47f2e8def1907372408a9df97a0dcbc1347 diff --git a/scripts/build-submodules b/scripts/build-submodules index 0d11c059..b3ea2c1a 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -140,6 +140,44 @@ if [ $INIT_PACKAGES ]; then initialize_packages fi +build_libyang() { + PKG=libyang + COMMITID=$(cd $PKGDIR/$PKG; git rev-parse --short=10 HEAD) + if ! package_in_buildlist $1; then + return 0 + fi + status_start "Building package: $PKG Commit id: $COMMITID" + if [ ! -f "$PKGDIR/$PKG/README.md" ]; then + status_skip "No source for: $PKG" + return 1 + fi + + ( set -e; set -x + cd $PKGDIR/$PKG + git checkout 179da47f2e8de + + git clean -dxf + git reset --hard + + mkdir build + cd build + + cmake .. + make build-deb + + cp debs/* $PKGDIR + + ) >>$PKGDIR/$PKG.buildlog 2>&1 + + if [ $? -ne 0 ]; then + status_fail + error_msg "Failed to build package $PKG, look in $PKG.buildlog to examine the fault\n" + return 2 + fi + status_ok +} +build_libyang + build_frr() { PKG=frr COMMITID=$(cd $PKGDIR/$PKG; git rev-parse --short=10 HEAD) -- cgit v1.2.3 From 9210522425e2cd6ed5d9f83ad594e5588671863e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 27 Jan 2019 13:06:16 +0100 Subject: build-submodules: report back package error when build with --verbose --- scripts/build-submodules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/build-submodules b/scripts/build-submodules index b3ea2c1a..6fd945d1 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -104,6 +104,9 @@ build_package() { ) >>$PKGDIR/$PKG.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail + if [ $VERBOSE -eq 1 ]; then + cat $PKGDIR/$PKG.buildlog + fi error_msg "Failed to build package $PKG, look in $PKG.buildlog to examine the fault\n" return 2 fi -- cgit v1.2.3 From 000cd8b2d962989e26c847a6337bc1b3a3f1c6a9 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 27 Jan 2019 16:19:19 +0100 Subject: build-submodules: change VERBOSE logic --- scripts/build-submodules | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/scripts/build-submodules b/scripts/build-submodules index 6fd945d1..79abf59f 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -24,6 +24,7 @@ print_help() { } BUILDLIST="" +VERBOSE=0 while test $# -gt 0 do @@ -70,6 +71,19 @@ status_skip() { error_msg() { echo -ne " $1\n" } + +verbose_msg() { + if [ $VERBOSE -ne 0 ]; then + echo "Current Environment:" + env + + if [ ! -z "$1" ]; then + echo "Logfile:" + cat $1 + fi + fi +} + ROOTDIR="$(pwd)" PKGDIR="$ROOTDIR/packages" SCRIPTDIR="$ROOTDIR/scripts" @@ -104,9 +118,7 @@ build_package() { ) >>$PKGDIR/$PKG.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail - if [ $VERBOSE -eq 1 ]; then - cat $PKGDIR/$PKG.buildlog - fi + verbose_msg "$PKGDIR/$PKG.buildlog" error_msg "Failed to build package $PKG, look in $PKG.buildlog to examine the fault\n" return 2 fi @@ -131,9 +143,7 @@ initialize_packages() { ) >>$PKGDIR/init-packages.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail - if [ $VERBOSE -eq 1 ]; then - cat $PKGDIR/init-packages.buildlog - fi + verbose_msg "$PKGDIR/init-packages.buildlog" error_msg "Failed to update all package, look in init-packages.buildlog to examine the fault\n" return 1 fi @@ -311,9 +321,7 @@ build_kernel() { ) >>$PKGDIR/vyos-kernel.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail - if [ $VERBOSE -eq 1 ]; then - cat $PKGDIR/vyos-kernel.buildlog - fi + verbose_msg "$PKGDIR/vyos-kernel.buildlog" error_msg "Failed to build package vyos-kernel, look in vyos-kernel.buildlog to examine the fault\n" return 1 fi @@ -370,9 +378,7 @@ build_wireguard() { ) >>$PKGDIR/vyos-wireguard.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail - if [ $VERBOSE -eq 1 ]; then - cat $PKGDIR/vyos-wireguard.buildlog - fi + verbose_msg "$PKGDIR/vyos-wireguard.buildlog" error_msg "Failed to build package vyos-wireguard, look in vyos-wireguard.buildlog to examine the fault\n" return 2 fi @@ -421,9 +427,7 @@ build_accel-ppp() { ) >>$PKGDIR/vyos-accel-ppp.buildlog 2>&1 if [ $? -ne 0 ]; then status_fail - if [ $VERBOSE -eq 1 ]; then - cat $PKGDIR/vyos-accel-ppp.buildlog - fi + verbose_msg "$PKGDIR/vyos-accel-ppp.buildlog" error_msg "Failed to build package vyos-accel-ppp, look in vyos-accel-ppp.buildlog to examine the fault\n" return 1 fi -- cgit v1.2.3 From 9170ead86561b0d494df5ac464a04d703a61e036 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 27 Jan 2019 18:08:53 +0100 Subject: build-submodules: source OPAM environemnt if not present --- scripts/build-submodules | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/build-submodules b/scripts/build-submodules index 79abf59f..6423a14a 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -88,6 +88,15 @@ ROOTDIR="$(pwd)" PKGDIR="$ROOTDIR/packages" SCRIPTDIR="$ROOTDIR/scripts" +# Source OPAM environment if not already set +if [ -z "$OPAMROOT" ]; then + if [ -x "$(command -v opam)" ]; then + eval $(opam env --root=/opt/opam --set-root) + else + echo "WARNING: 'opam' not installed, can't build VyConf and libvyosconfig" + fi +fi + package_in_buildlist() { # Return true if buildlist is not set if [ -z "$BUILDLIST" ]; then -- cgit v1.2.3 From 026db7258233182ae1f04a553e184b0484a62df6 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 27 Jan 2019 19:43:01 +0100 Subject: Docker: update to latest libvyosconfig revision --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index bca48ff8..36efdfef 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -230,7 +230,7 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ RUN eval $(opam env --root=/opt/opam --set-root) && \ git clone https://github.com/vyos/libvyosconfig && \ cd libvyosconfig && \ - git checkout v0.0.4 && \ + git checkout a9817fa26c1be1 && \ dpkg-buildpackage -uc -us -tc -b && \ dpkg -i ../libvyosconfig0_*_amd64.deb -- cgit v1.2.3 From c670deddbee8ae852770574d1c8fce29154812dd Mon Sep 17 00:00:00 2001 From: hagbard Date: Mon, 28 Jan 2019 12:47:12 -0800 Subject: open-vm-tools is now a dependency of vyos-vmwaretools-scripts --- data/package-lists/vyos-x86.list.chroot | 1 - 1 file changed, 1 deletion(-) diff --git a/data/package-lists/vyos-x86.list.chroot b/data/package-lists/vyos-x86.list.chroot index 5bb0dbd7..6f5d7624 100644 --- a/data/package-lists/vyos-x86.list.chroot +++ b/data/package-lists/vyos-x86.list.chroot @@ -1,6 +1,5 @@ grub2 grub-pc -open-vm-tools qemu-guest-agent hyperv-daemons vyos-xe-guest-utilities -- cgit v1.2.3 From 9df5e15e9939dea7e5ecc944661d0ecb8eb0ccf4 Mon Sep 17 00:00:00 2001 From: Nicholas Humfrey Date: Tue, 29 Jan 2019 23:12:00 +0000 Subject: T1202: Add `hvinfo` to the packages directory (#43) --- .gitmodules | 6 +++++- docker/Dockerfile | 5 +++++ packages/hvinfo | 1 + scripts/build-submodules | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) create mode 160000 packages/hvinfo diff --git a/.gitmodules b/.gitmodules index 22bb87d5..8be1f363 100644 --- a/.gitmodules +++ b/.gitmodules @@ -236,4 +236,8 @@ [submodule "packages/igmpproxy"] path = packages/igmpproxy url = https://github.com/vyos/igmpproxy.git - branch = current \ No newline at end of file + branch = current +[submodule "packages/hvinfo"] + path = packages/hvinfo + url = https://github.com/dmbaturin/hvinfo.git + branch = master diff --git a/docker/Dockerfile b/docker/Dockerfile index bca48ff8..889652f3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -234,6 +234,11 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ dpkg-buildpackage -uc -us -tc -b && \ dpkg -i ../libvyosconfig0_*_amd64.deb +# Packages needed for hvinfo +RUN apt-get update && apt-get install -y \ + gnat \ + gprbuild + # Packages needed for vyos-1x RUN apt-get update && apt-get install -y \ whois diff --git a/packages/hvinfo b/packages/hvinfo new file mode 160000 index 00000000..6d15dff8 --- /dev/null +++ b/packages/hvinfo @@ -0,0 +1 @@ +Subproject commit 6d15dff8eb5418a23035d18078f367bc799b702c diff --git a/scripts/build-submodules b/scripts/build-submodules index 0d11c059..11d386fd 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -198,6 +198,7 @@ for PKG in mdns-repeater \ eventwatchd \ ddclient \ rtrlib \ + hvinfo \ igmpproxy \ libvyosconfig \ vyatta-bash \ -- cgit v1.2.3 From 9779f9938e1a80736738b2b9021a0db4dd872bfa Mon Sep 17 00:00:00 2001 From: Nicholas Humfrey Date: Wed, 30 Jan 2019 10:04:31 +0000 Subject: T1214: Add `ipaddrcheck` to the packages directory --- .gitmodules | 4 ++++ docker/Dockerfile | 6 ++++++ packages/ipaddrcheck | 1 + scripts/build-submodules | 1 + 4 files changed, 12 insertions(+) create mode 160000 packages/ipaddrcheck diff --git a/.gitmodules b/.gitmodules index 2257b9f1..dd608357 100644 --- a/.gitmodules +++ b/.gitmodules @@ -245,3 +245,7 @@ path = packages/libyang url = https://github.com/opensourcerouting/libyang.git branch = debian +[submodule "packages/ipaddrcheck"] + path = packages/ipaddrcheck + url = https://github.com/vyos/ipaddrcheck.git + branch = master diff --git a/docker/Dockerfile b/docker/Dockerfile index 13919ede..38dea015 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -234,6 +234,12 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ dpkg-buildpackage -uc -us -tc -b && \ dpkg -i ../libvyosconfig0_*_amd64.deb +# Packages needed for ipaddrcheck +RUN apt-get update && apt-get install -y \ + libpcre3-dev \ + libcidr-dev \ + check + # Packages needed for hvinfo RUN apt-get update && apt-get install -y \ gnat \ diff --git a/packages/ipaddrcheck b/packages/ipaddrcheck new file mode 160000 index 00000000..8f0d655c --- /dev/null +++ b/packages/ipaddrcheck @@ -0,0 +1 @@ +Subproject commit 8f0d655cc68995a0ef88dc905dc62db2af23ec90 diff --git a/scripts/build-submodules b/scripts/build-submodules index a167b6e0..ae0c1c09 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -260,6 +260,7 @@ for PKG in mdns-repeater \ rtrlib \ hvinfo \ igmpproxy \ + ipaddrcheck \ libvyosconfig \ vyatta-bash \ vyatta-biosdevname \ -- cgit v1.2.3 From b9239d076d220059f2596f1163d785e953652964 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 30 Jan 2019 22:04:09 +0100 Subject: build-submodules: add vyos-vmwaretools-scripts --- scripts/build-submodules | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build-submodules b/scripts/build-submodules index ae0c1c09..f3ab6cf7 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -303,6 +303,7 @@ for PKG in mdns-repeater \ vyos-opennhrp \ vyos-salt-minion \ vyos-strongswan \ + vyos-vmwaretools-scripts \ vyos-world \ vyos-1x \ ; do -- cgit v1.2.3 From 78d69b0c252ba82da6bd4dbcbe50037052d58668 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 30 Jan 2019 22:04:59 +0100 Subject: Revert "T1214: Add `ipaddrcheck` to the packages directory" libcidr-dev is not available until Debian Buster thus the container can't be build. This reverts commit 9779f9938e1a80736738b2b9021a0db4dd872bfa. --- .gitmodules | 4 ---- docker/Dockerfile | 6 ------ packages/ipaddrcheck | 1 - scripts/build-submodules | 1 - 4 files changed, 12 deletions(-) delete mode 160000 packages/ipaddrcheck diff --git a/.gitmodules b/.gitmodules index dd608357..2257b9f1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -245,7 +245,3 @@ path = packages/libyang url = https://github.com/opensourcerouting/libyang.git branch = debian -[submodule "packages/ipaddrcheck"] - path = packages/ipaddrcheck - url = https://github.com/vyos/ipaddrcheck.git - branch = master diff --git a/docker/Dockerfile b/docker/Dockerfile index 38dea015..13919ede 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -234,12 +234,6 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ dpkg-buildpackage -uc -us -tc -b && \ dpkg -i ../libvyosconfig0_*_amd64.deb -# Packages needed for ipaddrcheck -RUN apt-get update && apt-get install -y \ - libpcre3-dev \ - libcidr-dev \ - check - # Packages needed for hvinfo RUN apt-get update && apt-get install -y \ gnat \ diff --git a/packages/ipaddrcheck b/packages/ipaddrcheck deleted file mode 160000 index 8f0d655c..00000000 --- a/packages/ipaddrcheck +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8f0d655cc68995a0ef88dc905dc62db2af23ec90 diff --git a/scripts/build-submodules b/scripts/build-submodules index f3ab6cf7..af992649 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -260,7 +260,6 @@ for PKG in mdns-repeater \ rtrlib \ hvinfo \ igmpproxy \ - ipaddrcheck \ libvyosconfig \ vyatta-bash \ vyatta-biosdevname \ -- cgit v1.2.3 From 9467da7d1471cdeeb0272ae619f2a323408726df Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 31 Jan 2019 18:52:51 +0100 Subject: Docker: fix libvyosconfig repo URL --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 13919ede..d3d012f3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -228,7 +228,7 @@ RUN eval $(opam env --root=/opt/opam --set-root) && \ # Build libvyosconfig RUN eval $(opam env --root=/opt/opam --set-root) && \ - git clone https://github.com/vyos/libvyosconfig && \ + git clone https://github.com/vyos/libvyosconfig.git && \ cd libvyosconfig && \ git checkout a9817fa26c1be1 && \ dpkg-buildpackage -uc -us -tc -b && \ -- cgit v1.2.3 From d34540adfdbbbc9abc330ebc504fc1cd5f40387f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 31 Jan 2019 18:53:05 +0100 Subject: Docker: build libcidr fro source --- docker/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index d3d012f3..cfb5d592 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -247,6 +247,13 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \ golang +# Packages needed for ipaddrcheck +RUN git clone https://github.com/wikimedia/analytics-libcidr.git && \ + cd analytics-libcidr && \ + git checkout 026c611d90a1 && \ + dpkg-buildpackage -uc -us -tc -b && \ + dpkg -i ../libcidr*.deb + # Update live-build RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sources.list.d/stretch.list && \ apt-get update && apt-get install -y -t stretch live-build && \ -- cgit v1.2.3 From 5a53953ab8dfa61305c837da6d912a2e8cee9711 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 31 Jan 2019 18:59:09 +0100 Subject: build-submodules: add ipaddrcheck --- .gitmodules | 3 +++ packages/ipaddrcheck | 1 + scripts/build-submodules | 1 + 3 files changed, 5 insertions(+) create mode 160000 packages/ipaddrcheck diff --git a/.gitmodules b/.gitmodules index 2257b9f1..9d3fcf23 100644 --- a/.gitmodules +++ b/.gitmodules @@ -245,3 +245,6 @@ path = packages/libyang url = https://github.com/opensourcerouting/libyang.git branch = debian +[submodule "packages/ipaddrcheck"] + path = packages/ipaddrcheck + url = https://github.com/vyos/ipaddrcheck.git diff --git a/packages/ipaddrcheck b/packages/ipaddrcheck new file mode 160000 index 00000000..8f0d655c --- /dev/null +++ b/packages/ipaddrcheck @@ -0,0 +1 @@ +Subproject commit 8f0d655cc68995a0ef88dc905dc62db2af23ec90 diff --git a/scripts/build-submodules b/scripts/build-submodules index af992649..f3ab6cf7 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -260,6 +260,7 @@ for PKG in mdns-repeater \ rtrlib \ hvinfo \ igmpproxy \ + ipaddrcheck \ libvyosconfig \ vyatta-bash \ vyatta-biosdevname \ -- cgit v1.2.3 From 61ea43e901167584d6e137ad7eed3badb9f070f7 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 31 Jan 2019 22:20:25 +0100 Subject: Docker: add missing dependency for ipaddrcheck --- docker/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index cfb5d592..8676657e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -248,6 +248,10 @@ RUN apt-get update && apt-get install -y \ golang # Packages needed for ipaddrcheck +RUN apt-get update && apt-get install -y \ + check +# As there is no Debian Jessie/Stretch package for libcidr available but this +# is required for ipaddrcheck we have to build it from source RUN git clone https://github.com/wikimedia/analytics-libcidr.git && \ cd analytics-libcidr && \ git checkout 026c611d90a1 && \ -- cgit v1.2.3 From b008fa4b62242248e5a41c6fa07fa25bcddac138 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 1 Feb 2019 19:43:24 +0100 Subject: Add lldp and pdns-recursor submodules --- .gitmodules | 6 ++++++ packages/lldpd | 1 + packages/pdns-recursor | 1 + scripts/build-submodules | 1 + 4 files changed, 9 insertions(+) create mode 160000 packages/lldpd create mode 160000 packages/pdns-recursor diff --git a/.gitmodules b/.gitmodules index 9d3fcf23..55e8e1b2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -248,3 +248,9 @@ [submodule "packages/ipaddrcheck"] path = packages/ipaddrcheck url = https://github.com/vyos/ipaddrcheck.git +[submodule "packages/lldpd"] + path = packages/lldpd + url = https://github.com/vincentbernat/lldpd.git +[submodule "packages/pdns-recursor"] + path = packages/pdns-recursor + url = https://salsa.debian.org/dns-team/pdns-recursor.git diff --git a/packages/lldpd b/packages/lldpd new file mode 160000 index 00000000..adbb26bc --- /dev/null +++ b/packages/lldpd @@ -0,0 +1 @@ +Subproject commit adbb26bc0a49d083472d24762255ff48bd001e45 diff --git a/packages/pdns-recursor b/packages/pdns-recursor new file mode 160000 index 00000000..28af51a3 --- /dev/null +++ b/packages/pdns-recursor @@ -0,0 +1 @@ +Subproject commit 28af51a3942875f0896fab2ea5945ded4a191975 diff --git a/scripts/build-submodules b/scripts/build-submodules index f3ab6cf7..e6e9cda3 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -261,6 +261,7 @@ for PKG in mdns-repeater \ hvinfo \ igmpproxy \ ipaddrcheck \ + lldpd \ libvyosconfig \ vyatta-bash \ vyatta-biosdevname \ -- cgit v1.2.3 From 82e47dc6150c83e27dbe0b5d3b76a6fe7fa1dd5e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 1 Feb 2019 19:43:41 +0100 Subject: Docker: build dependencies for lldpd and pdns-recursor added --- docker/Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 8676657e..0b03a8e5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -258,6 +258,24 @@ RUN git clone https://github.com/wikimedia/analytics-libcidr.git && \ dpkg-buildpackage -uc -us -tc -b && \ dpkg -i ../libcidr*.deb +# Packages needed for lldpd +RUN apt-get update && apt-get install -y \ + libbsd-dev \ + libevent-dev + +# Packages needed for pdns-recursor +RUN apt-get update && apt-get install -y \ + libboost-context-dev \ + libboost-dev \ + libboost-program-options-dev \ + libboost-test-dev \ + liblua5.2-dev \ + libprotobuf-dev \ + libsodium-dev \ + protobuf-compiler \ + publicsuffix \ + ragel + # Update live-build RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sources.list.d/stretch.list && \ apt-get update && apt-get install -y -t stretch live-build && \ -- cgit v1.2.3 From 274ebdb02582cc52237c95b1884b1cb24884d6f1 Mon Sep 17 00:00:00 2001 From: Nicholas Humfrey Date: Sat, 2 Feb 2019 15:34:35 +0000 Subject: Changed architecture name for 32-bit x86 to 'i386' This is the official Debian designation for the architecture (And what dpkg --print-architecture returns) https://www.debian.org/releases/stable/i386/ch02s01.html.en --- scripts/build-config | 2 +- scripts/build-flavour | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build-config b/scripts/build-config index 3b44df77..db870be7 100755 --- a/scripts/build-config +++ b/scripts/build-config @@ -52,7 +52,7 @@ def get_validator(optdict, name): # Options dict format: # '$option_name_without_leading_dashes': { ('$help_string', $default_value_generator_thunk, $value_checker_thunk) } options = { - 'architecture': ('Image target architecture (amd64 or i586 or armhf)', lambda: 'amd64', lambda x: x in ['amd64', 'i586', 'armhf']), + 'architecture': ('Image target architecture (amd64 or i386 or armhf)', lambda: 'amd64', lambda x: x in ['amd64', 'i386', 'armhf']), 'build-by': ('Builder identifier (e.g. jrandomhacker@example.net)', get_default_build_by, None), 'debian-mirror': ('Debian repository mirror for ISO build', lambda: defaults.DEBIAN_MIRROR, None), 'debian-security-mirror': ('Debian security updated mirror', lambda: defaults.DEBIAN_SECURITY_MIRROR, None), diff --git a/scripts/build-flavour b/scripts/build-flavour index c14f5735..5e76672b 100755 --- a/scripts/build-flavour +++ b/scripts/build-flavour @@ -27,7 +27,7 @@ if [ $BUILD_TYPE = "development" ]; then fi # Install grub-pc if it's an x86 build -if [ $BUILD_ARCH = 'amd64' -o $BUILD_ARCH = 'i686' ]; then +if [ $BUILD_ARCH = 'amd64' -o $BUILD_ARCH = 'i386' ]; then cp data/package-lists/vyos-x86.list.chroot build/config/package-lists/ fi -- cgit v1.2.3 From 4ad4fd9b82e6e6622723b01c729f953413dbe2b4 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 9 Feb 2019 12:07:01 +0100 Subject: T1236: Update Linux Kernel to 4.19.20 --- data/kernel_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/kernel_version b/data/kernel_version index aca0bf9d..b2e8d3e9 100644 --- a/data/kernel_version +++ b/data/kernel_version @@ -1 +1 @@ -4.19.12 +4.19.20 -- cgit v1.2.3 From 730f30c45fb0c1e5f5cb7576c54798941980a9d1 Mon Sep 17 00:00:00 2001 From: hagbard Date: Sat, 9 Feb 2019 03:12:30 -0800 Subject: T1010 - submodule vyatta-webgui removed --- .gitmodules | 4 ---- packages/vyatta-webgui | 1 - 2 files changed, 5 deletions(-) delete mode 160000 packages/vyatta-webgui diff --git a/.gitmodules b/.gitmodules index 55e8e1b2..c470fb3b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -82,10 +82,6 @@ path = packages/vyatta-webproxy url = https://github.com/vyos/vyatta-webproxy.git branch = current -[submodule "packages/vyatta-webgui"] - path = packages/vyatta-webgui - url = https://github.com/vyos/vyatta-webgui.git - branch = current [submodule "packages/vyatta-cfg-quagga"] path = packages/vyatta-cfg-quagga url = https://github.com/vyos/vyatta-cfg-quagga.git diff --git a/packages/vyatta-webgui b/packages/vyatta-webgui deleted file mode 160000 index 30133ba0..00000000 --- a/packages/vyatta-webgui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 30133ba0fd68b0c3726127f195e1058c427fe58f -- cgit v1.2.3 From fd63d726f2cbd62f8105d7d66c054ba61de52354 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 13 Feb 2019 22:30:25 +0100 Subject: T1245: autoload br_netfilter kernel module on startup --- .../includes.chroot/etc/modules-load.d/br-netfilter.conf | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 data/live-build-config/includes.chroot/etc/modules-load.d/br-netfilter.conf diff --git a/data/live-build-config/includes.chroot/etc/modules-load.d/br-netfilter.conf b/data/live-build-config/includes.chroot/etc/modules-load.d/br-netfilter.conf new file mode 100644 index 00000000..ed668e43 --- /dev/null +++ b/data/live-build-config/includes.chroot/etc/modules-load.d/br-netfilter.conf @@ -0,0 +1,3 @@ +# Load br-netfilter.ko at boot +br_netfilter + -- cgit v1.2.3 From 8f43e05f7e9d594579ecd716e34856191991e894 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 16 Feb 2019 15:26:38 +0100 Subject: Docker: update to latest version of VyConf an libvyosconfig --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0b03a8e5..4e0efa80 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -224,13 +224,13 @@ RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ # Build VyConf which is required to build libvyosconfig RUN eval $(opam env --root=/opt/opam --set-root) && \ - opam pin add vyconf https://github.com/vyos/vyconf.git#v0.1 -y + opam pin add vyconf https://github.com/vyos/vyconf.git#51d79a3f3e08 -y # Build libvyosconfig RUN eval $(opam env --root=/opt/opam --set-root) && \ git clone https://github.com/vyos/libvyosconfig.git && \ cd libvyosconfig && \ - git checkout a9817fa26c1be1 && \ + git checkout 6b7b7ed091900399 && \ dpkg-buildpackage -uc -us -tc -b && \ dpkg -i ../libvyosconfig0_*_amd64.deb -- cgit v1.2.3 From 6af43c03587072083db82b756c4b0b38290d0191 Mon Sep 17 00:00:00 2001 From: hagbard Date: Fri, 22 Feb 2019 12:19:38 -0800 Subject: Feature: T405 - Add binaries for lcdproc, lcdproc-extra-drivers - native debian packages --- data/live-build-config/package-lists/vyos-utils.list.chroot | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data/live-build-config/package-lists/vyos-utils.list.chroot b/data/live-build-config/package-lists/vyos-utils.list.chroot index 0acf9efa..02406a3a 100644 --- a/data/live-build-config/package-lists/vyos-utils.list.chroot +++ b/data/live-build-config/package-lists/vyos-utils.list.chroot @@ -23,3 +23,5 @@ htop atop iotop aptitude +lcdproc +lcdproc-extra-drivers -- cgit v1.2.3 From 613e4cbb7252fe3eaefe8c3fac57bfb739f8ce5d Mon Sep 17 00:00:00 2001 From: hagbard Date: Fri, 22 Feb 2019 12:46:46 -0800 Subject: Revert "Feature: T405 - Add binaries for lcdproc, lcdproc-extra-drivers" This reverts commit 6af43c03587072083db82b756c4b0b38290d0191. Package gets moved into depends of vyos-1x --- data/live-build-config/package-lists/vyos-utils.list.chroot | 2 -- 1 file changed, 2 deletions(-) diff --git a/data/live-build-config/package-lists/vyos-utils.list.chroot b/data/live-build-config/package-lists/vyos-utils.list.chroot index 02406a3a..0acf9efa 100644 --- a/data/live-build-config/package-lists/vyos-utils.list.chroot +++ b/data/live-build-config/package-lists/vyos-utils.list.chroot @@ -23,5 +23,3 @@ htop atop iotop aptitude -lcdproc -lcdproc-extra-drivers -- cgit v1.2.3 From f3e356ca7d1bd566a24af7e4616f924daca25edb Mon Sep 17 00:00:00 2001 From: bnjf Date: Wed, 27 Feb 2019 10:48:51 +1100 Subject: Update build-GCE-image (#46) 1. enable serial output for grub 2. sync isn't enough, tar was reliably throwing "changed as we read it" on my build box. umount instead to quiesce. --- scripts/build-GCE-image | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/build-GCE-image b/scripts/build-GCE-image index 7684bd43..9e2bcaf5 100755 --- a/scripts/build-GCE-image +++ b/scripts/build-GCE-image @@ -127,6 +127,10 @@ cat > ${MOUNT_DIR}/boot/grub/grub.cfg << EOF set timeout=5 set default=0 +serial --speed=38400 --unit=0 --word=8 --parity=no --stop=1 +terminal_input serial +terminal_output serial + menuentry "VyOS $version (Serial console)" { linux /boot/"$version"/vmlinuz boot=live vyos-union=/boot/"$version" console=tty0 console=ttyS0,38400n8d earlyprintk=ttyS0,38400 consoleblank=0 systemd.show_status=true initrd /boot/"$version"/initrd.img @@ -147,7 +151,9 @@ grub-install --boot-directory ${MOUNT_DIR}/boot --force --no-floppy --skip-fs-p ################### ### HOOK SCRIPT ### ################### -fstrim ${MOUNT_DIR} -sync -tar -Sczf ${OUTPUTGZ} ${OUTPUT} +fstrim ${MOUNT_DIR} +umount ${MOUNT_DIR} && { + tar -Sczf ${OUTPUTGZ} ${OUTPUT} + mount /dev/mapper/${LOOP_DEVICE} ${MOUNT_DIR} +} -- cgit v1.2.3 From 18eb7c3e52a916cb7f19439c7c0bfdc8615de7bf Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 28 Feb 2019 15:16:16 +0100 Subject: T1218: enable FRR's staticd on startup. --- data/live-build-config/hooks/live/30-frr-configs.chroot | 1 + 1 file changed, 1 insertion(+) diff --git a/data/live-build-config/hooks/live/30-frr-configs.chroot b/data/live-build-config/hooks/live/30-frr-configs.chroot index 3bcfdea6..d3cfbce5 100755 --- a/data/live-build-config/hooks/live/30-frr-configs.chroot +++ b/data/live-build-config/hooks/live/30-frr-configs.chroot @@ -27,6 +27,7 @@ babeld=no sharpd=no pbrd=no bfdd=no +staticd=yes """ daemons_conf = """ -- cgit v1.2.3 From 3f7186f69bf9ed30d854fadc8510ccd2e9cff089 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 2 Mar 2019 12:05:50 +0100 Subject: T929: remove debian-firmware packages from build Kernel Firmware BLOBs will be delivered by the new vyos-firmware package --- .../hooks/live/14-firmware-linux-nonfree.chroot | 12 ------------ .../hooks/live/99-cleanup-packages.chroot | 14 -------------- scripts/live-build-config | 3 ++- 3 files changed, 2 insertions(+), 27 deletions(-) delete mode 100755 data/live-build-config/hooks/live/14-firmware-linux-nonfree.chroot delete mode 100755 data/live-build-config/hooks/live/99-cleanup-packages.chroot diff --git a/data/live-build-config/hooks/live/14-firmware-linux-nonfree.chroot b/data/live-build-config/hooks/live/14-firmware-linux-nonfree.chroot deleted file mode 100755 index 887831cc..00000000 --- a/data/live-build-config/hooks/live/14-firmware-linux-nonfree.chroot +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -cp /etc/apt/sources.list /etc/apt/sources.list.d/non-free.list -sed -i 's/main/non-free/g' /etc/apt/sources.list.d/non-free.list - -if [ -e /etc/apt/sources.list.d/zz-sources.list ] ; then - cp /etc/apt/sources.list /etc/apt/sources.list.d/zz-non-free.list - sed -i 's/main/non-free/g' /etc/apt/sources.list.d/zz-non-free.list -fi - -apt-get update -apt-get -y install firmware-linux-nonfree diff --git a/data/live-build-config/hooks/live/99-cleanup-packages.chroot b/data/live-build-config/hooks/live/99-cleanup-packages.chroot deleted file mode 100755 index 63be7df6..00000000 --- a/data/live-build-config/hooks/live/99-cleanup-packages.chroot +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# Clean up packages that were installed for dependencies but are no longer needed -# and packages installed by metapackages that we'll never need - -UNWANTED_PKGS="dahdi-firmware-nonfree \ - firmware-crystalhd firmware-ivtv \ - firmware-samsung" - -for p in $UNWANTED_PKGS; do - apt-get -y remove $p -done - -#apt-get -y autoremove diff --git a/scripts/live-build-config b/scripts/live-build-config index b585049e..ad559559 100755 --- a/scripts/live-build-config +++ b/scripts/live-build-config @@ -52,7 +52,8 @@ lb config noauto \ --mirror-binary {{debian_mirror}} \ --mirror-binary-security {{debian_security_mirror}} \ --archive-areas "main contrib non-free" \ - --firmware-chroot true \ + --firmware-chroot false \ + --firmware-binary false \ --updates true \ --security true \ --backports true \ -- cgit v1.2.3 From 525e11fe42850783a80662e8928214f92613b6ef Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 2 Mar 2019 12:07:26 +0100 Subject: VyOS base image requires aptitude - remove it from special dev package list Commit 743ec288637b ("T859: add aptitude to the default package lists.") added aptitude to the base packages as it's required by grub-efi. Thus we do not need to install it via the dev packages list and can keep a single source. --- data/package-lists/vyos-dev.list.chroot | 1 - 1 file changed, 1 deletion(-) diff --git a/data/package-lists/vyos-dev.list.chroot b/data/package-lists/vyos-dev.list.chroot index 63e7cc2c..2bbc6cb8 100644 --- a/data/package-lists/vyos-dev.list.chroot +++ b/data/package-lists/vyos-dev.list.chroot @@ -1,5 +1,4 @@ gdb strace -aptitude apt-rdepends linux-perf -- cgit v1.2.3 From ebd68761207a4d9088e15f63a492cb2c804ad0d4 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 10 Mar 2019 19:51:43 +0100 Subject: Update Kernel to v4.19.28 --- data/kernel_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/kernel_version b/data/kernel_version index b2e8d3e9..cef3eaf2 100644 --- a/data/kernel_version +++ b/data/kernel_version @@ -1 +1 @@ -4.19.20 +4.19.28 -- cgit v1.2.3 From 48bcbfff70c0e7629f7ece72f59aec3c67e8efb4 Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Mon, 18 Mar 2019 16:01:29 +0100 Subject: Add vmware ovf build procedure --- Makefile | 14 +- scripts/build-vmware-image | 172 ++++++++++++++++++--- scripts/template.ovf | 232 ++++++++++++++++++---------- tools/cloud-init/vmware/90_dpkg.cfg | 3 + tools/cloud-init/vmware/config.boot.default | 30 ++++ 5 files changed, 347 insertions(+), 104 deletions(-) create mode 100644 tools/cloud-init/vmware/90_dpkg.cfg create mode 100644 tools/cloud-init/vmware/config.boot.default diff --git a/Makefile b/Makefile index 17ee4e65..fb5d0e3a 100644 --- a/Makefile +++ b/Makefile @@ -57,10 +57,14 @@ vagrant-libvirt: .PHONY: vmware .ONESHELL: -vmware: +vmware: clean prepare @set -e - @scripts/check-vm-build-env - @scripts/build-vmware-image + @echo "It's not like I'm building this specially for you or anything!" + mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d + cp tools/cloud-init/vmware/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ + cp -f tools/cloud-init/vmware/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ + cd $(build_dir) + @../scripts/build-vmware-image .PHONY: hyperv .ONESHELL: @@ -140,6 +144,10 @@ clean: rm -f *.raw rm -f *.tar.gz rm -f *.qcow2 + rm -f *.mf + rm -f *.ovf + rm -f *.ova + rm -f *.vmdk .PHONY: purge purge: diff --git a/scripts/build-vmware-image b/scripts/build-vmware-image index 1730d7a3..5ad6615a 100755 --- a/scripts/build-vmware-image +++ b/scripts/build-vmware-image @@ -1,10 +1,8 @@ #!/bin/sh # -# Copyright (C) 2016 VyOS maintainers and contributors +# Copyright (C) 2019 VyOS maintainers and contributors # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 or later as -# published by the Free Software Foundation. +# This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 or later as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,7 +14,7 @@ # # File: build-vmware-image # Purpose: -# Build VyOS OVA and OVF for VMware. +# Build VyOS image for VMWARE. if [ ! $(which vmdk-convert) ]; then echo "Your system doesn't have vmdk-convert. Please install it from https://github.com/vmware/open-vmdk." @@ -32,32 +30,168 @@ else echo "Your system has ovftool." fi -export PACKER_BUILD_DIR=packer_build +lb bootstrap -DST_DIR=${PACKER_BUILD_DIR}/vmware -mkdir -p ${DST_DIR} +lb chroot +lb installer +lb binary_chroot +lb chroot_devpts install +lb chroot_proc install +lb chroot_selinuxfs install +lb chroot_sysfs install +lb chroot_hosts install +lb chroot_resolv install +lb chroot_hostname install +lb chroot_sysv-rc install +lb chroot_upstart install +lb chroot_apt install-binary +lb chroot_archives chroot install +lb binary_rootfs +lb binary_manifest +lb binary_package-lists +lb binary_linux-image +lb binary_memtest +lb binary_grub +lb binary_grub2 +lb binary_syslinux +lb binary_disk +lb binary_loadlin +lb binary_win32-loader +lb binary_includes +lb binary_hooks +lb binary_checksums -# Convert qcow2 image to VMDK -source_image=${PACKER_BUILD_DIR}/qemu/vyos_qemu_image.img -tmp_vmdk=${DST_DIR}/tmp.vmdk -vmdk=${DST_DIR}/vyos_vmware_image.vmdk -ovf=${DST_DIR}/vyos_vmware_image.ovf -qemu-img convert -f qcow2 ${source_image} -O vmdk -o adapter_type=lsilogic ${tmp_vmdk} -vmdk-convert ${tmp_vmdk} ${vmdk} +# get vyos build version +version=$(cat version) +dateymd=$(date +%Y%m%d) + +###################################### +### Prepare the HDD (format, ext.) ### +###################################### +PARTED=/sbin/parted +OUTPUT=disk.raw +OUTPUTVMDK=VyOS-"$dateymd".vmdk +IMAGE_SIZE=2 +qemu-img create -f raw ${OUTPUT} ${IMAGE_SIZE}G + +${PARTED} -s ${OUTPUT} mktable msdos +${PARTED} -s -a optimal ${OUTPUT} mkpart primary ext4 1Mi 100% +${PARTED} -s ${OUTPUT} set 1 boot on +RESULT_KPARTX=`kpartx -asv ${OUTPUT} 2>&1` + +if echo "${RESULT_KPARTX}" | grep "^add map" ; then + LOOP_DEVICE=$(echo ${RESULT_KPARTX} | cut -d" " -f3) + LOOPRAW_DEVICE=${LOOP_DEVICE%p*} + echo "kpartx mounted using: ${LOOP_DEVICE} via ${LOOPRAW_DEVICE}" +else + echo "It seems kpartx didn't mount the image correctly: exiting." + exit 1 +fi + +cleanup(){ + error=$? + [ ! -d "${MOUNT_DIR}" ] && return + if [ "$error" -gt 0 ]; then + echo + echo "Error $error" + else + echo "Finished." + fi + + set +e + + sync + umount -l ${MOUNT_DIR} + rmdir ${MOUNT_DIR} + + umount devpts-live + umount proc-live + umount sysfs-live + + dmsetup remove --deferred ${LOOP_DEVICE} + losetup -d /dev/${LOOPRAW_DEVICE} + exit $error +} +trap "cleanup" EXIT TERM INT + +mkfs.ext4 /dev/mapper/${LOOP_DEVICE} -L persistence +UUID=$(blkid -o value -s UUID /dev/mapper/${LOOP_DEVICE}) + +# No fsck because of X days without checks +tune2fs -i 0 /dev/mapper/${LOOP_DEVICE} + +MOUNT_DIR=`mktemp -d -t build-debimg.XXXXXX` +mount /dev/mapper/${LOOP_DEVICE} ${MOUNT_DIR} + +######################## +### Setting-up files ### +######################## +mkdir -p ${MOUNT_DIR}/boot/grub +mkdir -p ${MOUNT_DIR}/boot/"$version"/rw + +echo "/ union" > ${MOUNT_DIR}/persistence.conf +cp binary/live/filesystem.squashfs ${MOUNT_DIR}/boot/"$version"/"$version.squashfs" +cp binary/live/initrd.img ${MOUNT_DIR}/boot/"$version"/initrd.img +cp binary/live/vmlinuz ${MOUNT_DIR}/boot/"$version"/vmlinuz + +######################## +### Create grub menu ### +######################## +cat > ${MOUNT_DIR}/boot/grub/grub.cfg << EOF +set timeout=5 +set default=0 + +menuentry "VyOS (KVM console)" { + linux /boot/"$version"/vmlinuz boot=live quiet vyos-union=/boot/"$version" console=ttyS0,9600 console=tty0 systemd.show_status=true + initrd /boot/"$version"/initrd.img +} + +menuentry "Lost password change (KVM console)" { + linux /boot/"$version"/vmlinuz boot=live vyos-union=/boot/"$version" console=ttyS0,9600 console=tty0 systemd.show_status=true init=/opt/vyatta/sbin/standalone_root_pw_reset + initrd /boot/"$version"/initrd.img +} + +menuentry "VyOS $version (Serial console)" { + linux /boot/"$version"/vmlinuz boot=live vyos-union=/boot/"$version" console=tty0 console=ttyS0,9600n8d consoleblank=0 systemd.show_status=true + initrd /boot/"$version"/initrd.img +} + +menuentry "Lost password change $version (Serial console)" { + linux /boot/"$version"/vmlinuz boot=live vyos-union=/boot/"$version" console=tty0 console=ttyS0,9600n8d consoleblank=0 systemd.show_status=true init=/opt/vyatta/sbin/standalone_root_pw_reset + initrd /boot/"$version"/initrd.img +} +EOF + + +############################# +### Setting-up bootloader ### +############################# +grub-install --boot-directory ${MOUNT_DIR}/boot --force --no-floppy --skip-fs-probe /dev/${LOOPRAW_DEVICE} + +################### +### HOOK SCRIPT ### +################### +fstrim ${MOUNT_DIR} +sync + +qemu-img convert -f raw ${OUTPUT} -O vmdk -o adapter_type=lsilogic ${OUTPUTVMDK} +rm ${OUTPUT} + +vmdk=vyos_vmware_image.vmdk +ovf=vyos_vmware_image.ovf +vmdk-convert ${OUTPUTVMDK} ${vmdk} # Generate OVF echo 'Generating OVF file...' vmdk_file_size=$(du --bytes ${vmdk} | cut -f1) vmdk_populated_size=$(vmdk-convert -i ${vmdk} | jq .used) -version=$(cat build/version) -sed scripts/template.ovf \ +sed ../scripts/template.ovf \ -e "s/{{vmdk_file_size}}/${vmdk_file_size}/" \ -e "s/{{vmdk_populated_size}}/${vmdk_populated_size}/" \ -e "s/{{version}}/${version}/" \ > ${ovf} # Generate manifest file -cd ${DST_DIR} openssl sha1 *.vmdk *.ovf > vyos_vmware_image.mf # Convert the OVF to signed OVA... @@ -68,7 +202,9 @@ if [ ! -f ${private_key} ]; then exit 1 fi ovftool --privateKey=${PRIVATE_KEY_PATH} vyos_vmware_image.ovf vyos_vmware_image-signed.ova +#ovftool vyos_vmware_image.ovf vyos_vmware_image-signed.ova # Convert the OVF to signed OVF... echo 'Converting the OVF to signed OVF...' ovftool --privateKey=${PRIVATE_KEY_PATH} vyos_vmware_image.ovf vyos_vmware_image-signed.ovf +#ovftool vyos_vmware_image.ovf vyos_vmware_image-signed.ovf diff --git a/scripts/template.ovf b/scripts/template.ovf index f3624339..b8d3eddc 100644 --- a/scripts/template.ovf +++ b/scripts/template.ovf @@ -1,121 +1,187 @@ - - + + - - Virtual disk information - - + + List of profiles + + + Minimal hardware profile - 1 vCPU, 512 MB RAM + + + + Medium hardware profile - 4 vCPUs, 16 GB RAM + + + + Large hardware profile - 8 vCPUs, 32 GB RAM + + - The list of logical networks - - The VM Network network + List of logical networks used in the package + + Network 1 - + + Supported IP assignment schemes + + + Virtual disk information + + + A virtual machine - vyos - - The kind of installed guest operating system + + VyOS is a Linux-based network operating system that provides software-based network routing, firewall, and VPN functionality. + VyOS + VyOS maintainers and contributors + {{version}} + https://www.vyos.io + https://sentrium.io/ + + Appliance user Settings + + + The password for the appliance 'vyos' account. Passwords must be at least 8 characters in length. + + + + The public ssh key for the appliance 'vyos' account. + + Appliance IPv4 Network Settings + + + The host name for this virtual machine. + + + + The IPv4 address. Leave blank if DHCP is desired. + + + + The IPv4 netmask or prefix for this interface. Leave blank if DHCP is desired. + + + + Default gateway address. Leave blank if DHCP is desired. + + + + The domain name server IP Addresses for this VM (comma separated). Leave blank if DHCP is desired. + + + + NTP servers for this VM (comma separated). Leave blank if DHCP is desired. + + + + VM specific properties + + + + + VyOS + + + Guest Operating System + VyOS - - Virtual hardware requirements + + Virtual Hardware Requirements Virtual Hardware Family 0 - vyos - vmx-09 + vmx-11 - + hertz * 10^6 - Number of Virtual CPUs - 1 virtual CPU(s) - 1 + Number of virtual CPUs + 1 virtual CPU + 1 3 1 - - byte * 2^30 + + hertz * 10^6 + Number of virtual CPUs + 4 virtual CPUs + 1 + 3 + 4 + + + hertz * 10^6 + Number of virtual CPUs + 8 virtual CPUs + 1 + 3 + 8 + + + byte * 2^20 Memory Size - 1GB of memory - 2 + 512 MB of memory + 2 4 - 1 + 512 + + + byte * 2^20 + Memory Size + 16 GB of memory + 2 + 4 + 16384 + + + byte * 2^20 + Memory Size + 32 GB of memory + 2 + 4 + 32768 - 0 - SCSI Controller - scsiController0 - 3 + 0 + SCSI Controller 0 - LSI Logic + 3 lsilogic 6 - - 1 - IDE Controller - ideController1 - 4 - 5 - - - true - serial0 - 5 - 21 - - - - 0 - false - cdrom0 - 6 - 5 - 15 - 0 - disk0 + disk0 ovf:/disk/vmdisk1 - 7 + 4 3 17 - 2 + 1 true - VM Network - VmxNet3 ethernet adapter on "VM Network" - ethernet0 - 8 - VmxNet3 + Network 1 + Ethernet adapter on "Network 1" + 5 + vmxnet3 10 - - - false - video - 9 - 24 + + 0 + IDE Controller 0 + 6 + 5 - + + 0 false - vmci - 10 - vmware.vmci - 1 + CD/DVD Drive 1 + 7 + 6 + 15 - - - - - + - - VyOS is a Linux-based network operating system that provides software-based network routing, firewall, and VPN functionality. - VyOS - VyOS maintainers and contributors - {{version}} - - + diff --git a/tools/cloud-init/vmware/90_dpkg.cfg b/tools/cloud-init/vmware/90_dpkg.cfg new file mode 100644 index 00000000..f9c9cba0 --- /dev/null +++ b/tools/cloud-init/vmware/90_dpkg.cfg @@ -0,0 +1,3 @@ +# to update this file, run dpkg-reconfigure cloud-init +datasource_list: [ OVF ] +disable_vmware_customization: false diff --git a/tools/cloud-init/vmware/config.boot.default b/tools/cloud-init/vmware/config.boot.default new file mode 100644 index 00000000..8b7cdae5 --- /dev/null +++ b/tools/cloud-init/vmware/config.boot.default @@ -0,0 +1,30 @@ +system { + host-name vyos + login { + user vyos { + authentication { + encrypted-password $6$QxPS.uk6mfo$9QBSo8u1FkH16gMyAVhus6fU3LOzvLR9Z9.82m3tiHFAxTtIkhaZSWssSgzt4v4dGAL8rhVQxTg0oAG9/q11h/ + plaintext-password "" + } + level admin + } + } + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} -- cgit v1.2.3 From dec0a52554c8bf8e87a0ac4dba7d7ae357672e6e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 10 Mar 2019 21:03:09 +0100 Subject: [build] Use pdns-recursor binary packages from PowerDNS https://repo.powerdns.com/ provides a package repository for Debian 8 which serves us automatically all security updates instead of rebuilding the package by us. This drops the maintenance of one additional package. --- data/live-build-config/archives/pdns.key.chroot | 30 +++++++++++++++++++++++++ scripts/build-config | 1 + scripts/defaults.py | 1 + scripts/live-build-config | 3 +++ 4 files changed, 35 insertions(+) create mode 100644 data/live-build-config/archives/pdns.key.chroot diff --git a/data/live-build-config/archives/pdns.key.chroot b/data/live-build-config/archives/pdns.key.chroot new file mode 100644 index 00000000..9f59d9c9 --- /dev/null +++ b/data/live-build-config/archives/pdns.key.chroot @@ -0,0 +1,30 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQINBFV2/GwBEADD4oJuwcLkYZD6R+PM0zKdZ04owicJ9e1nTbBb8OA+92TI0cJY +8XGpjEJBRECOMJi9Gr6p3QxgZX1IQbiB/RJgRN0BYTZJ6BKobJAlSNsZBVH4wt/F +Xg8IFXi8O8XNwrhhTHVLyhZxB5WIqd8Xgdb39t7qcKLLuhdzH+hTWtGNaC3UJ1xz +3KMx79U/U71XRtvloiZF1ef0XUNvDZ/2DdTNWavdJzVeDq+whD0/ThvP0LsJzzCQ +cgfRUljfxtWHOYVqHspfFg03ofDODodzq+yT5ElIQNWL71fRQ5lX8cPAVrX6v3Rs +h2tBsWV3xjMscG36E7nKbgSXWxDInr4Xw056Mx/JO6If8vnCOYOhXcv3fdZ5Lqpr +qr6uniBTcRi1q97JI1+KDoHU6MfJ7I17wU/bTPFgy6Yck4Ropmwd5dvbwRVTdQHx +n08XYEZyNdq8zskbj8MI83jvDdvdd7b95SiBO6X3qIYKebk8rg1CfYFxBIyRd2ll +yt1K0ow4M54woB/68cMy0UB6cA8uOHscRObau3T3UB0ohsEPF7KYAqOKfKP0irV+ +Ys6tR0KI/TeHqrqKhCA9PGOpOmqJaibt5GqFTc3Dp4U19njMmh4eboki8EwS6DNy +4HD76dFz2jkSQ74uB/X+nxuFEVRKS54q4aeg83NL5lnsD8TWdhTui4mURQARAQAB +tDxQb3dlckROUyBSZWxlYXNlIFNpZ25pbmcgS2V5IDxwb3dlcmRucy5zdXBwb3J0 +QHBvd2VyZG5zLmNvbT6JAj4EEwECACgFAlV2/GwCGwMFCQ8JnAAGCwkIBwMCBhUI +AgkKCwQWAgMBAh4BAheAAAoJEBsMYgX9OA+75QYQAJ7a3rZiTmBJkYfDYbZGOcJj +tIgWj5ieyIHjaG1kR3setK1GbYrd7dkeHuWIT8FCO/mQwrKTlxEd+Vj5a79Bpu0D +de1MRi7jTIb/Qrge532Pnk5T7qFjJWfvTWhpSV9XDwHR216aByuHZ9gAJt92hgo5 +eSXHPpwbi+qAdymndUswFBHY0kLNpIYAa2mZcSNbaI/RFNYPOM/aqDMcpQ2s1Rf1 +c8iTPewf04jlNd75M59AAbnpdoFiCKbV+Q8oeUNxRGhHCQgcTaWhT5vdF2pXP1jb +rVykPxN7U5zTu03m/qbUCKg9Pqkhr79a2XNIpcGHhsp58B6dJdBPhXT/tFXnVpY0 +wZHGGlBVhZzC1Qdq58ilyQ2qfIci2sjMoS62lAffemb88CyoQ2UadhNKZTn93Ogo +lmW1txqN7UU7hUBxwdztw+Pgf7V+ADwkPHnSsNLupkZ7QUOl2i1kPwgcnwHLPFoD +bYDteCtqcVVCY5v3OC95jGJ4bqwgIIeQ5kloKY2pRLeNedbCHbGc6rVjX5X0K2zt +F7/dWOklI1Ox4Y+Vv0Ln7u3BvSyl5jWXWzH2V6q3ff7NKVro3keZmgTzcBwJEv/z +p40ds9f2LTKJX4DajyAF2Z+j79obMYwKo0w+Vy36QrO8TlKk+ZU/6vcFfVdEoCtv +d5a03QgyYgMX0WW8Smam +=BY4B +-----END PGP PUBLIC KEY BLOCK----- diff --git a/scripts/build-config b/scripts/build-config index db870be7..ce83f74e 100755 --- a/scripts/build-config +++ b/scripts/build-config @@ -59,6 +59,7 @@ options = { 'pbuilder-debian-mirror': ('Debian repository mirror for pbuilder env bootstrap', lambda: defaults.DEBIAN_MIRROR, None), 'salt-mirror': ('Salt package mirror', lambda: defaults.SALT_MIRROR, None), 'vyos-mirror': ('VyOS package mirror', lambda: defaults.VYOS_MIRROR, None), + 'pdns-mirror': ('PowerDNS package mirror', lambda: defaults.PDNS_MIRROR, None), 'build-type': ('Build type, release or development', lambda: 'development', lambda x: x in ['release', 'development']), 'custom-packages': ('Custom packages to install from repositories', lambda: '', None), 'version': ('Version number (release builds only)', None, None) diff --git a/scripts/defaults.py b/scripts/defaults.py index 73a8d459..5f1941c1 100644 --- a/scripts/defaults.py +++ b/scripts/defaults.py @@ -28,6 +28,7 @@ DEBIAN_SECURITY_MIRROR = 'http://deb.debian.org/debian-security' DEBIAN_DISTRIBUTION = 'jessie' SALT_MIRROR = 'http://repo.saltstack.com/apt/debian/8/amd64/2017.7' +PDNS_MIRROR = 'http://repo.powerdns.com/debian' PBUILDER_CONFIG = os.path.join(BUILD_DIR, 'pbuilderrc') PBUILDER_DIR = os.path.join(BUILD_DIR, 'pbuilder') diff --git a/scripts/live-build-config b/scripts/live-build-config index ad559559..1aea4dc5 100755 --- a/scripts/live-build-config +++ b/scripts/live-build-config @@ -71,6 +71,7 @@ print("Setting up additional APT entries") vyos_repo_entry = "deb {0}/vyos {1} main\n".format(build_config['vyos_mirror'], build_config['vyos_branch']) vyos_debian_repo_entry = "deb {0}/debian {1} main\n".format(build_config['vyos_mirror'], build_config['vyos_branch']) salt_repo_entry = "deb {0} {1} main\n".format(build_config['salt_mirror'], build_config['distribution']) +pdns_repo_entry = "deb {0} {1}-rec-41 main\n".format(build_config['pdns_mirror'], build_config['distribution']) apt_file = os.path.join(build_config['build_dir'], defaults.VYOS_REPO_FILE) @@ -79,11 +80,13 @@ if debug: print("\t", vyos_repo_entry) print("\t", vyos_debian_repo_entry) print("\t", salt_repo_entry) + print("\t", pdns_repo_entry) with open(apt_file, 'w') as f: f.write(vyos_repo_entry) f.write(vyos_debian_repo_entry) f.write(salt_repo_entry) + f.write(pdns_repo_entry) # Add custom APT entries if build_config['custom_apt_entry']: -- cgit v1.2.3 From 43045e721c589fbfbf121c33affebef4777a3cf6 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 22 Mar 2019 08:46:35 +0100 Subject: T1310: use FQDN as hostname in config prompt --- .../includes.chroot/etc/skel/.bashrc | 119 +++++++++++++++++++++ .../includes.chroot/etc/skel/.profile | 22 ++++ 2 files changed, 141 insertions(+) create mode 100644 data/live-build-config/includes.chroot/etc/skel/.bashrc create mode 100644 data/live-build-config/includes.chroot/etc/skel/.profile diff --git a/data/live-build-config/includes.chroot/etc/skel/.bashrc b/data/live-build-config/includes.chroot/etc/skel/.bashrc new file mode 100644 index 00000000..06443378 --- /dev/null +++ b/data/live-build-config/includes.chroot/etc/skel/.bashrc @@ -0,0 +1,119 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +#force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\H\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' +else + PS1='${debian_chroot:+($debian_chroot)}\u@\H:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\H: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + #alias grep='grep --color=auto' + #alias fgrep='fgrep --color=auto' + #alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +#alias ll='ls -l' +#alias la='ls -A' +#alias l='ls -CF' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi +OPAMROOT='/opt/opam'; export OPAMROOT; +OPAM_SWITCH_PREFIX='/opt/opam/4.07.0'; export OPAM_SWITCH_PREFIX; +CAML_LD_LIBRARY_PATH='/opt/opam/4.07.0/lib/stublibs:/opt/opam/4.07.0/lib/ocaml/stublibs:/opt/opam/4.07.0/lib/ocaml'; export CAML_LD_LIBRARY_PATH; +OCAML_TOPLEVEL_PATH='/opt/opam/4.07.0/lib/toplevel'; export OCAML_TOPLEVEL_PATH; +MANPATH=':/opt/opam/4.07.0/man'; export MANPATH; +PATH='/opt/opam/4.07.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'; export PATH; diff --git a/data/live-build-config/includes.chroot/etc/skel/.profile b/data/live-build-config/includes.chroot/etc/skel/.profile new file mode 100644 index 00000000..c9db4591 --- /dev/null +++ b/data/live-build-config/includes.chroot/etc/skel/.profile @@ -0,0 +1,22 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi -- cgit v1.2.3 From cd9e810b1665b070484f93a8dc8a616b34a8861b Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 22 Mar 2019 11:45:36 +0100 Subject: T1279: support ACPI power event (poweroff) --- data/live-build-config/hooks/live/14-acpid.chroot | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 data/live-build-config/hooks/live/14-acpid.chroot diff --git a/data/live-build-config/hooks/live/14-acpid.chroot b/data/live-build-config/hooks/live/14-acpid.chroot new file mode 100755 index 00000000..98b45649 --- /dev/null +++ b/data/live-build-config/hooks/live/14-acpid.chroot @@ -0,0 +1,10 @@ +#!/bin/sh + +# To be able to properly shutdown bare-metal servers install and +# configure acpid +apt-get -y install acpid + +cat < /etc/acpi/events/powerbtn +event=button[ /]power +action=/sbin/poweroff +EOF -- cgit v1.2.3 From a9f2c0468889ae061d4f5a88ba7548e496627ea3 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 22 Mar 2019 11:47:56 +0100 Subject: [vyos-dev] remove linux-perf package Linux-perf package is no longer available, thus removed. It was also only available for Kernel 4.9 where we use 4.19. Fixes: E: Unable to locate package linux-perf --- data/package-lists/vyos-dev.list.chroot | 1 - 1 file changed, 1 deletion(-) diff --git a/data/package-lists/vyos-dev.list.chroot b/data/package-lists/vyos-dev.list.chroot index 2bbc6cb8..f3305f30 100644 --- a/data/package-lists/vyos-dev.list.chroot +++ b/data/package-lists/vyos-dev.list.chroot @@ -1,4 +1,3 @@ gdb strace apt-rdepends -linux-perf -- cgit v1.2.3 From 9209f34d4337aa2b848019b0c88297eda9213728 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Mon, 25 Mar 2019 00:27:18 +0100 Subject: T1313: add support for reusable build flavor files. --- data/defaults.json | 15 +++++++++++++ data/kernel_version | 1 - scripts/build-config | 56 ++++++++++++++++++++++++++++------------------- scripts/build-submodules | 1 - scripts/defaults.py | 15 ++----------- scripts/live-build-config | 15 +++++-------- 6 files changed, 56 insertions(+), 47 deletions(-) create mode 100644 data/defaults.json delete mode 100644 data/kernel_version diff --git a/data/defaults.json b/data/defaults.json new file mode 100644 index 00000000..c403c862 --- /dev/null +++ b/data/defaults.json @@ -0,0 +1,15 @@ +{ + "architecture": "amd64", + "debian_mirror": "http://deb.debian.org/debian", + "debian_security_mirror": "http://deb.debian.org/debian-security", + "debian_distribution": "jessie", + "vyos_mirror": "http://dev.packages.vyos.net/repositories/current", + "vyos_branch": "current", + "kernel_version": "4.19.28", + "kernel_flavor": "amd64-vyos", + "additional_repositories": [ + "deb http://repo.saltstack.com/apt/debian/8/amd64/2017.7 jessie main", + "deb http://repo.powerdns.com/debian jessie-rec-41 main" + ], + "custom_packages": [] +} diff --git a/data/kernel_version b/data/kernel_version deleted file mode 100644 index cef3eaf2..00000000 --- a/data/kernel_version +++ /dev/null @@ -1 +0,0 @@ -4.19.28 diff --git a/scripts/build-config b/scripts/build-config index ce83f74e..a12ecdc4 100755 --- a/scripts/build-config +++ b/scripts/build-config @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2018, VyOS maintainers and contributors +# Copyright (C) 2019, VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -49,19 +49,28 @@ def get_validator(optdict, name): return None +# Load the build flavor file +build_flavor = os.getenv('VYOS_BUILD_FLAVOR') +if build_flavor is None: + build_flavor = defaults.DEFAULT_BUILD_FLAVOR +try: + with open(build_flavor, 'r') as f: + build_defaults = json.load(f) +except Exception as e: + print("Failed to open the build flavor file {0}: {1}".format(build_flavor, e)) + sys.exit(1) + + # Options dict format: # '$option_name_without_leading_dashes': { ('$help_string', $default_value_generator_thunk, $value_checker_thunk) } options = { - 'architecture': ('Image target architecture (amd64 or i386 or armhf)', lambda: 'amd64', lambda x: x in ['amd64', 'i386', 'armhf']), + 'architecture': ('Image target architecture (amd64 or i386 or armhf)', lambda: build_defaults['architecture'], lambda x: x in ['amd64', 'i386', 'armhf']), 'build-by': ('Builder identifier (e.g. jrandomhacker@example.net)', get_default_build_by, None), - 'debian-mirror': ('Debian repository mirror for ISO build', lambda: defaults.DEBIAN_MIRROR, None), - 'debian-security-mirror': ('Debian security updated mirror', lambda: defaults.DEBIAN_SECURITY_MIRROR, None), - 'pbuilder-debian-mirror': ('Debian repository mirror for pbuilder env bootstrap', lambda: defaults.DEBIAN_MIRROR, None), - 'salt-mirror': ('Salt package mirror', lambda: defaults.SALT_MIRROR, None), - 'vyos-mirror': ('VyOS package mirror', lambda: defaults.VYOS_MIRROR, None), - 'pdns-mirror': ('PowerDNS package mirror', lambda: defaults.PDNS_MIRROR, None), + 'debian-mirror': ('Debian repository mirror for ISO build', lambda: build_defaults['debian_mirror'], None), + 'debian-security-mirror': ('Debian security updated mirror', lambda: build_defaults['debian_security_mirror'], None), + 'pbuilder-debian-mirror': ('Debian repository mirror for pbuilder env bootstrap', lambda: build_defaults['debian_mirror'], None), + 'vyos-mirror': ('VyOS package mirror', lambda: build_defaults["vyos_mirror"], None), 'build-type': ('Build type, release or development', lambda: 'development', lambda x: x in ['release', 'development']), - 'custom-packages': ('Custom packages to install from repositories', lambda: '', None), 'version': ('Version number (release builds only)', None, None) } @@ -80,6 +89,7 @@ parser.add_argument('--debug', help="Enable debug output", action='store_true') # Custom APT entry and APT key options can be used multiple times parser.add_argument('--custom-apt-entry', help="Custom APT entry", action='append') parser.add_argument('--custom-apt-key', help="Custom APT key file", action='append') +parser.add_argument('--custom-package', help="Custom package to install from repositories", action='append') args = vars(parser.parse_args()) @@ -95,8 +105,8 @@ for k, v in args.items(): # Some fixup for mirror settings. # The idea is: if --debian-mirror is specified but --pbuilder-debian-mirror is not, # use the --debian-mirror value for both lb and pbuilder bootstrap -if (args['debian_mirror'] != defaults.DEBIAN_MIRROR) and \ - (args['pbuilder_debian_mirror'] == defaults.DEBIAN_MIRROR): +if (args['debian_mirror'] != build_defaults["debian_mirror"]) and \ + (args['pbuilder_debian_mirror'] == build_defaults["debian_mirror"]): args['pbuilder_debian_mirror'] = args['debian_mirror'] # Version can only be set for release builds, @@ -109,16 +119,19 @@ if args['build_type'] == 'development': # Populate some defaults that are not configurable, # but that are handy to have in the options hash -args['distribution'] = defaults.DEBIAN_DISTRIBUTION +args['distribution'] = build_defaults["debian_distribution"] args['build_dir'] = os.path.join(os.getcwd(), defaults.BUILD_DIR) args['pbuilder_config'] = defaults.PBUILDER_CONFIG -args['vyos_branch'] = defaults.VYOS_BRANCH +args['vyos_branch'] = build_defaults["vyos_branch"] -# Convert a whitespace-separated string of custom packages to a list -if args['custom_packages']: - args['custom_packages'] = re.split(r'\s+', args['custom_packages']) -else: - args['custom_packages'] = [] +# Add custom packages from build defaults +if not args['custom_package']: + args['custom_package'] = [] +args['custom_package'] = args['custom_package'] + build_defaults['custom_packages'] + +if not args['custom_apt_entry']: + args['custom_apt_entry'] = [] +args['custom_apt_entry'] = args['custom_apt_entry'] + build_defaults['additional_repositories'] # Check the build environment and dependencies @@ -126,10 +139,8 @@ env_check_retval = os.system("scripts/check-build-env") if env_check_retval > 0: print("Build environment check failed, fix the issues and retry") -# Get the kernel version from data/kernel_version -with open("data/kernel_version") as f: - kernel_version = f.read().strip() - args['kernel_version'] = kernel_version +args['kernel_version'] = build_defaults['kernel_version'] +args['kernel_flavor'] = build_defaults['kernel_flavor'] # Save to file @@ -138,3 +149,4 @@ print("Saving the build config to {0}".format(defaults.BUILD_CONFIG)) with open(defaults.BUILD_CONFIG, 'w') as f: json.dump(args, f, indent=4, sort_keys=True) print("\n", file=f) + diff --git a/scripts/build-submodules b/scripts/build-submodules index e6e9cda3..fc8fdf83 100755 --- a/scripts/build-submodules +++ b/scripts/build-submodules @@ -343,7 +343,6 @@ build_kernel() { PATCHLEVEL=$(grep "^PATCHLEVEL" $PKGDIR/vyos-kernel/Makefile | grep -Eo '[0-9]{1,4}') SUBLEVEL=$(grep "^SUBLEVEL" $PKGDIR/vyos-kernel/Makefile | grep -Eo '[0-9]{1,4}') ARCH=$(dpkg --print-architecture) - echo "$VERSION.$PATCHLEVEL.$SUBLEVEL" > $ROOTDIR/data/kernel_version status_ok } build_kernel diff --git a/scripts/defaults.py b/scripts/defaults.py index 5f1941c1..5d489e48 100644 --- a/scripts/defaults.py +++ b/scripts/defaults.py @@ -21,27 +21,16 @@ import os BUILD_DIR = 'build' BUILD_CONFIG = os.path.join(BUILD_DIR, 'build-config.json') -# The default mirror was chosen entirely at random -DEBIAN_MIRROR = 'http://deb.debian.org/debian' -DEBIAN_SECURITY_MIRROR = 'http://deb.debian.org/debian-security' - -DEBIAN_DISTRIBUTION = 'jessie' - -SALT_MIRROR = 'http://repo.saltstack.com/apt/debian/8/amd64/2017.7' -PDNS_MIRROR = 'http://repo.powerdns.com/debian' - PBUILDER_CONFIG = os.path.join(BUILD_DIR, 'pbuilderrc') PBUILDER_DIR = os.path.join(BUILD_DIR, 'pbuilder') LB_CONFIG_DIR = os.path.join(BUILD_DIR, 'config') CHROOT_INCLUDES_DIR = os.path.join(LB_CONFIG_DIR, 'includes.chroot') -VYOS_MIRROR = 'http://dev.packages.vyos.net/repositories/current' - -VYOS_BRANCH = 'current' - ARCHIVES_DIR = 'config/archives/' VYOS_REPO_FILE = 'config/archives/vyos.list.chroot' CUSTOM_REPO_FILE = 'config/archives/custom.list.chroot' CUSTOM_PACKAGE_LIST_FILE = 'config/package-lists/custom.list.chroot' + +DEFAULT_BUILD_FLAVOR = 'data/defaults.json' diff --git a/scripts/live-build-config b/scripts/live-build-config index 1aea4dc5..f158ba5c 100755 --- a/scripts/live-build-config +++ b/scripts/live-build-config @@ -36,12 +36,12 @@ lb_config_tmpl = """ lb config noauto \ --architectures {{architecture}} \ --bootappend-live "boot=live components hostname=vyos username=live nopersistence noautologin nonetworking union=overlay" \ - --linux-flavours {{architecture}}-vyos \ + --linux-flavours {{kernel_flavor}} \ --linux-packages linux-image-{{kernel_version}} \ --bootloader syslinux,grub-efi \ --binary-images iso-hybrid \ --debian-installer false \ - --distribution jessie \ + --distribution {{distribution}} \ --iso-application "VyOS" \ --iso-publisher "{{build_by}}" \ --iso-volume "VyOS" \ @@ -70,8 +70,6 @@ debug = build_config['debug'] print("Setting up additional APT entries") vyos_repo_entry = "deb {0}/vyos {1} main\n".format(build_config['vyos_mirror'], build_config['vyos_branch']) vyos_debian_repo_entry = "deb {0}/debian {1} main\n".format(build_config['vyos_mirror'], build_config['vyos_branch']) -salt_repo_entry = "deb {0} {1} main\n".format(build_config['salt_mirror'], build_config['distribution']) -pdns_repo_entry = "deb {0} {1}-rec-41 main\n".format(build_config['pdns_mirror'], build_config['distribution']) apt_file = os.path.join(build_config['build_dir'], defaults.VYOS_REPO_FILE) @@ -79,14 +77,10 @@ if debug: print("Adding these entries to {0}:".format(apt_file)) print("\t", vyos_repo_entry) print("\t", vyos_debian_repo_entry) - print("\t", salt_repo_entry) - print("\t", pdns_repo_entry) with open(apt_file, 'w') as f: f.write(vyos_repo_entry) f.write(vyos_debian_repo_entry) - f.write(salt_repo_entry) - f.write(pdns_repo_entry) # Add custom APT entries if build_config['custom_apt_entry']: @@ -97,6 +91,7 @@ if build_config['custom_apt_entry']: print(entries) with open(custom_apt_file, 'w') as f: f.write(entries) + f.write("\n") # Add custom APT keys if build_config['custom_apt_key']: @@ -106,9 +101,9 @@ if build_config['custom_apt_key']: shutil.copy(k, os.path.join(key_dir, dst_name)) # Add custom packages -if build_config['custom_packages']: +if build_config['custom_package']: package_list_file = os.path.join(build_config['build_dir'], defaults.CUSTOM_PACKAGE_LIST_FILE) - packages = "\n".join(build_config['custom_packages']) + packages = "\n".join(build_config['custom_package']) with open (package_list_file, 'w') as f: f.write(packages) -- cgit v1.2.3 From d292573e963e57ac605d7299fc7f8aa907b8000b Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 28 Mar 2019 22:45:09 +0100 Subject: Docker: Container Update for jessie-backports jesie-backports moved to Debian Archive as this train is no longer actively maintained. In addition to the mirror change also improve the build dependency handling. --- docker/Dockerfile | 147 +++++++++++++++++++++++-------------------- docker/no--check-valid-until | 1 + docker/sources.list | 3 + 3 files changed, 82 insertions(+), 69 deletions(-) create mode 100644 docker/no--check-valid-until create mode 100644 docker/sources.list diff --git a/docker/Dockerfile b/docker/Dockerfile index 4e0efa80..46df8e4c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,10 +1,29 @@ -# Must be run with --privileged flag -# Recommended to run the container with a volume mapped +# Copyright (C) 2018 VyOS maintainers and contributors +# +# This program is free software; you can redistribute it and/or modify # in order to easy exprort images built to "external" world +# it under the terms of the GNU General Public License version 2 or later as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Must be run with --privileged flag, recommended to run the container with a +# volume mapped in order to easy export images + FROM debian:jessie +LABEL authors="VyOS Maintainers " ENV DEBIAN_FRONTEND noninteractive +COPY sources.list /etc/apt/sources.list +COPY no--check-valid-until /etc/apt/apt.conf.d/ + # Standard shell should be bash not dash RUN echo "dash dash/sh boolean false" | debconf-set-selections && \ dpkg-reconfigure dash @@ -24,7 +43,6 @@ RUN apt-get update && apt-get install -y \ make \ sudo \ mc \ - live-build \ pbuilder \ devscripts \ python3-pystache \ @@ -56,35 +74,18 @@ RUN apt-get update && apt-get install -y \ python3-setuptools \ python3-nose \ python3-coverage \ - python3-sphinx - -# Add Debian jessie-backports support -RUN echo 'deb http://ftp.debian.org/debian jessie-backports main' | tee -a /etc/apt/sources.list && \ - apt-get update && apt-get install -y -t jessie-backports \ - python3-git \ - gosu - -# Packages needed for building vyos-strongswan -RUN apt-get update && apt-get install -y -t jessie-backports debhelper && \ - apt-get install -y \ + python3-sphinx \ + python3-pystache \ dh-apparmor \ gperf \ - iptables-dev \ - libcap-dev \ - libgcrypt20-dev \ - libgmp3-dev \ - libldap2-dev \ - libpam0g-dev \ libsystemd-dev \ - libgmp-dev \ - iptables \ - xl2tpd \ - libcurl4-openssl-dev \ - libkrb5-dev \ - libsqlite3-dev \ - libssl-dev \ - libxml2-dev \ - pkg-config + pkg-config \ + debhelper + +RUN apt-get update && apt-get install -y -t jessie-backports \ + python3-git \ + python3-pip \ + gosu # Package needed for mdns-repeater RUN apt-get update && apt-get install -y -t jessie-backports \ @@ -97,7 +98,8 @@ RUN apt-get update &&apt-get install -y \ # Packages needed for vyatta-iproute RUN apt-get update && apt-get install -y \ libatm1-dev \ - libdb-dev + libdb-dev \ + iptables-dev # Packages needed for vyatta-webgui RUN apt-get update && apt-get install -y \ @@ -115,13 +117,6 @@ RUN apt-get update && apt-get install -y \ librdkafka-dev \ libnetfilter-log-dev -# Packages needed for vyos-keepalived -RUN apt-get update && apt-get install -y \ - libnl-3-dev \ - libnl-genl-3-dev \ - libpopt-dev \ - libsnmp-dev - # Pavkages needed for wireguard RUN apt-get update && apt-get install -y \ libmnl-dev @@ -136,11 +131,12 @@ RUN apt-get update && apt-get install -y \ cmake \ liblua5.1-dev -# Prerequisites for building FRR from source +# Prerequisites for building rtrlib # see http://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian8.html RUN apt-get update && apt-get install -y \ doxygen \ - libssh-dev + libssh-dev \ + libssl-dev RUN export RTRLIB_COMMIT="v0.6.3" && \ git clone https://github.com/rtrlib/rtrlib.git && \ @@ -161,26 +157,15 @@ RUN export LIBYANG_COMMIT="179da47f2e8de" && \ cmake .. && make build-deb && \ dpkg -i debs/*.deb -# Packages needed for frr +# Packages needed to build frr itself RUN apt-get update && apt-get install -y \ - libreadline-dev \ - texinfo \ - pkg-config \ - imagemagick \ - groff \ - hardening-wrapper \ - gawk \ chrpath \ - libjson0 \ - libjson0-dev \ - python-ipaddr \ + install-info \ + libjson-c-dev \ + libpython3-dev \ python3-dev \ python3-pytest \ - install-info \ - libc-ares-dev \ - libc-ares2 \ - libzmq3 \ - libzmq3-dev + texinfo # Packages needed for conntrack-tools RUN apt-get update && apt-get install -y \ @@ -224,13 +209,12 @@ RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ # Build VyConf which is required to build libvyosconfig RUN eval $(opam env --root=/opt/opam --set-root) && \ - opam pin add vyconf https://github.com/vyos/vyconf.git#51d79a3f3e08 -y + opam pin add vyconf https://github.com/vyos/vyconf.git#51d79a3f -y # Build libvyosconfig RUN eval $(opam env --root=/opt/opam --set-root) && \ git clone https://github.com/vyos/libvyosconfig.git && \ - cd libvyosconfig && \ - git checkout 6b7b7ed091900399 && \ + cd libvyosconfig && git checkout 9a80a5d3 && \ dpkg-buildpackage -uc -us -tc -b && \ dpkg -i ../libvyosconfig0_*_amd64.deb @@ -263,18 +247,40 @@ RUN apt-get update && apt-get install -y \ libbsd-dev \ libevent-dev -# Packages needed for pdns-recursor +# Packages needed for vyatta-quagga RUN apt-get update && apt-get install -y \ - libboost-context-dev \ - libboost-dev \ - libboost-program-options-dev \ - libboost-test-dev \ - liblua5.2-dev \ - libprotobuf-dev \ - libsodium-dev \ - protobuf-compiler \ - publicsuffix \ - ragel + libpam-dev \ + libcap-dev \ + libsnmp-dev \ + gawk + +# Packages needed for vyos-strongswan +RUN apt-get update && apt-get install -y \ + libkrb5-dev \ + libssl-dev \ + libxml2-dev \ + systemd \ + libcurl4-openssl-dev \ + libgcrypt20-dev \ + libgmp3-dev \ + libldap2-dev \ + libsqlite3-dev + +# Packages needed for vyos-opennhrp +RUN apt-get update && apt-get install -y \ + libc-ares-dev + +# Packages needed for ddclient +RUN apt-get update && apt-get install -y \ + xmlto + +# Update live-build +RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sources.list.d/stretch.list && \ + apt-get update && apt-get install -y -t stretch \ + live-build && \ + rm -f /etc/apt/sources.list.d/stretch.list && \ + apt-get update && \ + rm -rf /var/lib/apt/lists/* # Update live-build RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sources.list.d/stretch.list && \ @@ -297,5 +303,8 @@ RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ # Ensure sure all users have access to our OCAM installation RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc +# Cleanup +RUN rm -rf /tmp/* + COPY entrypoint.sh /usr/local/bin/entrypoint.sh ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/docker/no--check-valid-until b/docker/no--check-valid-until new file mode 100644 index 00000000..27ed79f3 --- /dev/null +++ b/docker/no--check-valid-until @@ -0,0 +1 @@ +Acquire::Check-Valid-Until "0"; diff --git a/docker/sources.list b/docker/sources.list new file mode 100644 index 00000000..9d0fa506 --- /dev/null +++ b/docker/sources.list @@ -0,0 +1,3 @@ +deb http://deb.debian.org/debian/ jessie main +deb http://deb.debian.org/debian-security/ jessie/updates main +deb http://archive.debian.org/debian/ jessie-backports main -- cgit v1.2.3 From b2779e8b7969a3648d78e8a055734b81f059634e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 28 Mar 2019 22:50:22 +0100 Subject: live-build: set jessie-backports mirror to archive.debian.org --- data/defaults.json | 1 + scripts/live-build-config | 1 + 2 files changed, 2 insertions(+) diff --git a/data/defaults.json b/data/defaults.json index c403c862..c27df223 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -2,6 +2,7 @@ "architecture": "amd64", "debian_mirror": "http://deb.debian.org/debian", "debian_security_mirror": "http://deb.debian.org/debian-security", + "debian_security_mirror": "http://archive.debian.org/debian", "debian_distribution": "jessie", "vyos_mirror": "http://dev.packages.vyos.net/repositories/current", "vyos_branch": "current", diff --git a/scripts/live-build-config b/scripts/live-build-config index f158ba5c..8175eab7 100755 --- a/scripts/live-build-config +++ b/scripts/live-build-config @@ -51,6 +51,7 @@ lb config noauto \ --mirror-chroot-security {{debian_security_mirror}} \ --mirror-binary {{debian_mirror}} \ --mirror-binary-security {{debian_security_mirror}} \ + --mirror-binary-backports {{debian_backports_mirror}} \ --archive-areas "main contrib non-free" \ --firmware-chroot false \ --firmware-binary false \ -- cgit v1.2.3 From 166f8735e4e7fc4d2cc17ead2bb81124de648068 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 28 Mar 2019 22:50:40 +0100 Subject: live-build: fix copy/paste error Commit b2779e8b7969 ("live-build: set jessie-backports mirror to archive.debian.org") set the debian security mirror again instead of specifying a new key debian backports. --- data/defaults.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/defaults.json b/data/defaults.json index c27df223..b459eac1 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -2,7 +2,7 @@ "architecture": "amd64", "debian_mirror": "http://deb.debian.org/debian", "debian_security_mirror": "http://deb.debian.org/debian-security", - "debian_security_mirror": "http://archive.debian.org/debian", + "debian_backports_mirror": "http://archive.debian.org/debian", "debian_distribution": "jessie", "vyos_mirror": "http://dev.packages.vyos.net/repositories/current", "vyos_branch": "current", -- cgit v1.2.3 From 432f35f0edc7f610eceff1a62e431c527a11a3f5 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 28 Mar 2019 22:51:33 +0100 Subject: live-build: final fix for Debian Backports (all good things are three) 166f8735e4e ("live-build: fix copy/paste error") still did not set all required parts for the build script. All good things will be three!!! --- scripts/build-config | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build-config b/scripts/build-config index a12ecdc4..088dd100 100755 --- a/scripts/build-config +++ b/scripts/build-config @@ -68,6 +68,7 @@ options = { 'build-by': ('Builder identifier (e.g. jrandomhacker@example.net)', get_default_build_by, None), 'debian-mirror': ('Debian repository mirror for ISO build', lambda: build_defaults['debian_mirror'], None), 'debian-security-mirror': ('Debian security updated mirror', lambda: build_defaults['debian_security_mirror'], None), + 'debian-backports-mirror': ('Debian backports mirror', lambda: build_defaults['debian_backports_mirror'], None), 'pbuilder-debian-mirror': ('Debian repository mirror for pbuilder env bootstrap', lambda: build_defaults['debian_mirror'], None), 'vyos-mirror': ('VyOS package mirror', lambda: build_defaults["vyos_mirror"], None), 'build-type': ('Build type, release or development', lambda: 'development', lambda x: x in ['release', 'development']), -- cgit v1.2.3 From 99527b3e941665290d66bfc21bb30c7a22ee717d Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 31 Mar 2019 11:27:37 +0200 Subject: Revert "live-build: final fix for Debian Backports (all good things are three)" This reverts commit 432f35f0edc7f610eceff1a62e431c527a11a3f5. --- scripts/build-config | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/build-config b/scripts/build-config index 088dd100..a12ecdc4 100755 --- a/scripts/build-config +++ b/scripts/build-config @@ -68,7 +68,6 @@ options = { 'build-by': ('Builder identifier (e.g. jrandomhacker@example.net)', get_default_build_by, None), 'debian-mirror': ('Debian repository mirror for ISO build', lambda: build_defaults['debian_mirror'], None), 'debian-security-mirror': ('Debian security updated mirror', lambda: build_defaults['debian_security_mirror'], None), - 'debian-backports-mirror': ('Debian backports mirror', lambda: build_defaults['debian_backports_mirror'], None), 'pbuilder-debian-mirror': ('Debian repository mirror for pbuilder env bootstrap', lambda: build_defaults['debian_mirror'], None), 'vyos-mirror': ('VyOS package mirror', lambda: build_defaults["vyos_mirror"], None), 'build-type': ('Build type, release or development', lambda: 'development', lambda x: x in ['release', 'development']), -- cgit v1.2.3 From 9a0007d2ab47c2611d38047629b55ea63f79c748 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 31 Mar 2019 11:28:00 +0200 Subject: Revert "live-build: fix copy/paste error" This reverts commit 166f8735e4e7fc4d2cc17ead2bb81124de648068. --- data/defaults.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/defaults.json b/data/defaults.json index b459eac1..c27df223 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -2,7 +2,7 @@ "architecture": "amd64", "debian_mirror": "http://deb.debian.org/debian", "debian_security_mirror": "http://deb.debian.org/debian-security", - "debian_backports_mirror": "http://archive.debian.org/debian", + "debian_security_mirror": "http://archive.debian.org/debian", "debian_distribution": "jessie", "vyos_mirror": "http://dev.packages.vyos.net/repositories/current", "vyos_branch": "current", -- cgit v1.2.3 From c88f1a9bd2afab5e93a6b3fc719131eb7e4009c3 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 31 Mar 2019 11:28:06 +0200 Subject: Revert "live-build: set jessie-backports mirror to archive.debian.org" This reverts commit b2779e8b7969a3648d78e8a055734b81f059634e. --- data/defaults.json | 1 - scripts/live-build-config | 1 - 2 files changed, 2 deletions(-) diff --git a/data/defaults.json b/data/defaults.json index c27df223..c403c862 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -2,7 +2,6 @@ "architecture": "amd64", "debian_mirror": "http://deb.debian.org/debian", "debian_security_mirror": "http://deb.debian.org/debian-security", - "debian_security_mirror": "http://archive.debian.org/debian", "debian_distribution": "jessie", "vyos_mirror": "http://dev.packages.vyos.net/repositories/current", "vyos_branch": "current", diff --git a/scripts/live-build-config b/scripts/live-build-config index 8175eab7..f158ba5c 100755 --- a/scripts/live-build-config +++ b/scripts/live-build-config @@ -51,7 +51,6 @@ lb config noauto \ --mirror-chroot-security {{debian_security_mirror}} \ --mirror-binary {{debian_mirror}} \ --mirror-binary-security {{debian_security_mirror}} \ - --mirror-binary-backports {{debian_backports_mirror}} \ --archive-areas "main contrib non-free" \ --firmware-chroot false \ --firmware-binary false \ -- cgit v1.2.3 From dda8ec6f3a46b2dfe9f627c620b7fb57c25d70dc Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 31 Mar 2019 14:26:49 +0200 Subject: live-build: reconfigure build after jessie-backports moved to Debian archive Debian Team finally shut down all jessie-backport mirrors after announcing discontinuation [1] in July 2018. As we heavily rely on Backported Packages for VyOS 1.2 we need to move the installation mirrors to Debian Archive. In addition the repo signing keys already expired requiring us to set Acquire::Check-Valid-Until=false when building the ISO. [1] https://lists.debian.org/debian-backports-announce/2018/07/msg00000.html [2] https://wiki.debian.org/LTS/FAQ#Who_fixes_security_issues_with_packages_in_jessie-backports.3F --- data/defaults.json | 3 ++- scripts/live-build-config | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/defaults.json b/data/defaults.json index c403c862..36ec598b 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -9,7 +9,8 @@ "kernel_flavor": "amd64-vyos", "additional_repositories": [ "deb http://repo.saltstack.com/apt/debian/8/amd64/2017.7 jessie main", - "deb http://repo.powerdns.com/debian jessie-rec-41 main" + "deb http://repo.powerdns.com/debian jessie-rec-41 main", + "deb http://archive.debian.org/debian/ jessie-backports main" ], "custom_packages": [] } diff --git a/scripts/live-build-config b/scripts/live-build-config index f158ba5c..9b7c2d67 100755 --- a/scripts/live-build-config +++ b/scripts/live-build-config @@ -54,9 +54,9 @@ lb config noauto \ --archive-areas "main contrib non-free" \ --firmware-chroot false \ --firmware-binary false \ - --updates true \ + --updates false \ --security true \ - --backports true \ + --apt-options "--yes -oAcquire::Check-Valid-Until=false" \ --apt-indices false "${@}" """ -- cgit v1.2.3