From 94e11cd375812376957e18861288b5d6e4497479 Mon Sep 17 00:00:00 2001 From: Kim Date: Wed, 8 May 2019 13:47:26 +0200 Subject: undo hooks: initramfs: add option to update an existing initramfs this is to generate an initramfs if it does not exist, updating when not exist does not work and will break the image build process --- data/live-build-config/hooks/live/17-gen_initramfs.chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/live-build-config/hooks/live/17-gen_initramfs.chroot b/data/live-build-config/hooks/live/17-gen_initramfs.chroot index 6ecf4be7..0f5e0ece 100755 --- a/data/live-build-config/hooks/live/17-gen_initramfs.chroot +++ b/data/live-build-config/hooks/live/17-gen_initramfs.chroot @@ -5,4 +5,4 @@ echo I: Create initramfs if it does not exist. # Kernel complains about non available nls_ascii module when booting from USB pendrive echo "nls_ascii" >> /etc/initramfs-tools/modules -update-initramfs -c -u -k `ls /boot | grep vmlinuz- | sed 's/vmlinuz-//g'` +update-initramfs -c -k `ls /boot | grep vmlinuz- | sed 's/vmlinuz-//g'` -- cgit v1.2.3 From 527b92853ed3ecbff00e68c3a043433c67378f31 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 9 May 2019 23:11:14 +0200 Subject: Docs: move custom 1U baremetal router to vyos-documentation --- docs/1u-diy-atom-c3000/1u_vyos_back.jpg | Bin 586620 -> 0 bytes docs/1u-diy-atom-c3000/1u_vyos_front.jpg | Bin 363840 -> 0 bytes docs/1u-diy-atom-c3000/1u_vyos_front_open_1.jpg | Bin 956435 -> 0 bytes docs/1u-diy-atom-c3000/1u_vyos_front_open_2.jpg | Bin 1225208 -> 0 bytes docs/1u-diy-atom-c3000/1u_vyos_front_open_3.jpg | Bin 1337822 -> 0 bytes docs/1u-diy-atom-c3000/README.md | 38 ------------------------ docs/README.md | 6 ---- 7 files changed, 44 deletions(-) delete mode 100644 docs/1u-diy-atom-c3000/1u_vyos_back.jpg delete mode 100644 docs/1u-diy-atom-c3000/1u_vyos_front.jpg delete mode 100644 docs/1u-diy-atom-c3000/1u_vyos_front_open_1.jpg delete mode 100644 docs/1u-diy-atom-c3000/1u_vyos_front_open_2.jpg delete mode 100644 docs/1u-diy-atom-c3000/1u_vyos_front_open_3.jpg delete mode 100644 docs/1u-diy-atom-c3000/README.md delete mode 100644 docs/README.md diff --git a/docs/1u-diy-atom-c3000/1u_vyos_back.jpg b/docs/1u-diy-atom-c3000/1u_vyos_back.jpg deleted file mode 100644 index cd00c11c..00000000 Binary files a/docs/1u-diy-atom-c3000/1u_vyos_back.jpg and /dev/null differ diff --git a/docs/1u-diy-atom-c3000/1u_vyos_front.jpg b/docs/1u-diy-atom-c3000/1u_vyos_front.jpg deleted file mode 100644 index 3d135d56..00000000 Binary files a/docs/1u-diy-atom-c3000/1u_vyos_front.jpg and /dev/null differ diff --git a/docs/1u-diy-atom-c3000/1u_vyos_front_open_1.jpg b/docs/1u-diy-atom-c3000/1u_vyos_front_open_1.jpg deleted file mode 100644 index d90d565e..00000000 Binary files a/docs/1u-diy-atom-c3000/1u_vyos_front_open_1.jpg and /dev/null differ diff --git a/docs/1u-diy-atom-c3000/1u_vyos_front_open_2.jpg b/docs/1u-diy-atom-c3000/1u_vyos_front_open_2.jpg deleted file mode 100644 index 6d112463..00000000 Binary files a/docs/1u-diy-atom-c3000/1u_vyos_front_open_2.jpg and /dev/null differ diff --git a/docs/1u-diy-atom-c3000/1u_vyos_front_open_3.jpg b/docs/1u-diy-atom-c3000/1u_vyos_front_open_3.jpg deleted file mode 100644 index 198ba3ce..00000000 Binary files a/docs/1u-diy-atom-c3000/1u_vyos_front_open_3.jpg and /dev/null differ diff --git a/docs/1u-diy-atom-c3000/README.md b/docs/1u-diy-atom-c3000/README.md deleted file mode 100644 index 698faae3..00000000 --- a/docs/1u-diy-atom-c3000/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Ínitially I wanted to replace Cisco and Ubiquity devices with VyOS but did not -want to run a full blown Hypervisor at that locations. Instead I opted to get -one of the new Intel Atom C3000 CPUs to spawn VyOS on it. - -## Shopping Card - -* 1x Supermicro CSE-505-203B (19" 1U chassis, inkl. 200W PSU) -* 1x Supermicro MCP-260-00085-0B (I/O Shield for A2SDi-2C-HLN4F) -* 1x Supermicro A2SDi-2C-HLN4F (Intel Atom C3338, 2C/2T, 4MB cache, Quad LAN with - Intel C3000 SoC 1GbE) -* 1x Crucial CT4G4DFS824A (4GB DDR4 RAM 2400 MT/s, PC4-19200) -* 1x SanDisk Ultra Fit 32GB (USB-A 3.0 SDCZ43-032G-G46 mass storage for OS) -* 1x Supermicro MCP-320-81302-0B (optional FAN tray) - -### Optional -If you wan't to get additional ethernet ports or even 10GE connectivity -the following optional parts will be required: - -* 1x Supermicro RSC-RR1U-E8 (Riser Card) -* 1x Supermicro MCP-120-00063-0N (Riser Card Bracket) - -Latest VyOS rolling releases boot without any problem on this board. You also -receive a nice IPMI interface realized with an ASPEED AST2400 BMC (no information -about [OpenBMC](https://www.openbmc.org/)) so far on this motherboard. - -## Pictures - -![CSE-505-203B Front][505_case_front] -![CSE-505-203B Open 1][505_case_open_1] -![CSE-505-203B Open 2][505_case_open_2] -![CSE-505-203B Open 3][505_case_open_3] -![CSE-505-203B Back][505_case_back] - -[505_case_back]: 1u_vyos_back.jpg "CSE-505-203B Back" -[505_case_front]: 1u_vyos_front.jpg "CSE-505-203B Front" -[505_case_open_1]: 1u_vyos_front_open_1.jpg "CSE-505-203B Open 1" -[505_case_open_2]: 1u_vyos_front_open_2.jpg "CSE-505-203B Open 2" -[505_case_open_3]: 1u_vyos_front_open_3.jpg "CSE-505-203B Open 3" diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index c0de03e0..00000000 --- a/docs/README.md +++ /dev/null @@ -1,6 +0,0 @@ -A brief documentation about VyOS can be found at -https://github.com/vyos-documentation or rendered at https://vyos.readthedocs.org - -Another landing spot would be the old Wiki at http://wiki.vyos.net. - -Build instructions for a 1U DIY VyOS bare metal router is [here](1u-diy-atom-c3000/README.md) -- cgit v1.2.3 From 26356320f5da9a869b0dc7f57c07d1303505679a Mon Sep 17 00:00:00 2001 From: UnicronNL Date: Sun, 12 May 2019 20:06:33 +0200 Subject: Add Dockerfile for armhf. Remove pkg-build.sh file and reference in Dockerfile --- docker/Dockerfile | 1 - docker/Dockerfile-armhf | 345 ++++++++++++++++++++++++++++++++++++++++++++++++ docker/pkg-build.sh | 55 -------- 3 files changed, 345 insertions(+), 56 deletions(-) create mode 100644 docker/Dockerfile-armhf delete mode 100755 docker/pkg-build.sh diff --git a/docker/Dockerfile b/docker/Dockerfile index 7cf7e42d..5a4c074d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -334,6 +334,5 @@ RUN echo "$(opam env --root=/opt/opam --set-root)" >> /etc/skel/.bashrc # Cleanup RUN rm -rf /tmp/* -COPY pkg-build.sh /usr/local/bin/pkg-build.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/docker/Dockerfile-armhf b/docker/Dockerfile-armhf new file mode 100644 index 00000000..d26c5d97 --- /dev/null +++ b/docker/Dockerfile-armhf @@ -0,0 +1,345 @@ +# 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 multiarch/debian-debootstrap:armhf-jessie-slim +LABEL authors="VyOS Maintainers " + +ENV DEBIAN_FRONTEND noninteractive + +COPY no--check-valid-until /etc/apt/apt.conf.d/ +RUN echo "deb http://deb.debian.org/debian jessie main" \ + > /etc/apt/sources.list \ + && echo "deb http://security.debian.org/debian-security jessie/updates main" \ + >> /etc/apt/sources.list + +# Standard shell should be bash not dash +RUN echo "dash dash/sh boolean false" | debconf-set-selections && \ + dpkg-reconfigure dash + +RUN apt-get update && apt-get install -y \ + dialog \ + apt-utils \ + locales + +RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen +ENV LANG en_US.utf8 + +RUN apt-get update && apt-get install -y \ + vim \ + git \ + curl \ + make \ + sudo \ + mc \ + pbuilder \ + devscripts \ + squashfs-tools \ + autoconf \ + automake \ + dpkg-dev \ + genisoimage \ + lsb-release \ + fakechroot \ + libtool \ + libapt-pkg-dev \ + parted \ + kpartx \ + quilt \ + python3-lxml \ + python3-setuptools \ + python3-nose \ + python3-coverage \ + python3-sphinx \ + python3-pystache \ + pkg-config \ + debhelper \ + jq + +# +# Setup Debian Jessie Backports repository +# +COPY no--check-valid-until /etc/apt/apt.conf.d/ +RUN echo "deb http://archive.debian.org/debian/ jessie-backports main" \ + > /etc/apt/sources.list.d/jessie-backports.list + +RUN apt-get update && apt-get install -y -t jessie-backports \ + python3-git \ + python3-pip + +RUN echo "deb http://deb.debian.org/debian buster main" \ + > /etc/apt/sources.list.d/buster.list + +RUN apt-get update && apt-get install -y \ + golang \ + gosu + +RUN rm -f /etc/apt/sources.list.d/buster.list + +# Package needed for mdns-repeater +RUN apt-get update && apt-get install -y -t jessie-backports \ + dh-systemd + +# +# Remove Debian Jessie Backports repository +# +RUN rm -f /etc/apt/sources.list.d/jessie-backports.list \ + /etc/apt/apt.conf.d/no--check-valid-until + +# +# Building libvyosconf requires a full configured OPAM/OCaml setup +# +RUN apt-get update && apt-get install -y \ + libffi-dev \ + libpcre3-dev + +RUN curl https://raw.githubusercontent.com/ocaml/opam/2.0.2/shell/install.sh --output /tmp/opam_install.sh && \ + sed -i 's/read BINDIR/BINDIR=""/' /tmp/opam_install.sh && sh /tmp/opam_install.sh && \ + opam init --root=/opt/opam --comp=4.07.0 --disable-sandboxing + +RUN eval $(opam env --root=/opt/opam --set-root) && \ + opam install -y \ + oasis + +RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ + fileutils \ + lwt \ + lwt_ppx \ + lwt_log \ + ocplib-endian \ + ounit \ + pcre \ + ppx_deriving_yojson \ + sha \ + toml \ + xml-light \ + batteries \ + ocaml-protoc \ + ctypes-foreign \ + menhir + +RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ + ctypes + +# 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#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 9a80a5d3 && \ + dpkg-buildpackage -uc -us -tc -b && \ + dpkg -i ../libvyosconfig0_*_armhf.deb + +# Packages needed for vyatta-cfg +RUN apt-get update && apt-get install -y \ + libglib2.0-dev \ + libperl-dev \ + libboost-filesystem-dev + +# Packages needed for vyatta-iproute +RUN apt-get update && apt-get install -y \ + libatm1-dev \ + libdb-dev \ + iptables-dev + +# Packages needed for vyatta-webgui +RUN apt-get update && apt-get install -y \ + libexpat1-dev \ + subversion + +# Packages needed for pmacct +RUN apt-get update && apt-get install -y \ + libpcap-dev \ + libpq-dev \ + libmysqlclient-dev \ + libgeoip-dev \ + librabbitmq-dev \ + libjansson-dev \ + librdkafka-dev \ + libnetfilter-log-dev + +# Pavkages needed for wireguard +RUN apt-get update && apt-get install -y \ + libmnl-dev + +# Packages needed for kernel +RUN apt-get update && apt-get install -y \ + kernel-package \ + libncurses5-dev \ + flex \ + bison \ + libelf-dev + +# Packages needed for vyos-accel-ppp +RUN apt-get update && apt-get install -y \ + cdbs \ + cmake \ + liblua5.1-dev + +# 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 \ + libssl-dev + +# Build rtrlib release 0.6.3 +RUN export RTRLIB_VERSION="0.6.3" && \ + wget -P /tmp https://github.com/rtrlib/rtrlib/archive/v${RTRLIB_VERSION}.tar.gz && \ + tar xf /tmp/v${RTRLIB_VERSION}.tar.gz -C /tmp && \ + cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \ + dpkg -i ../librtr*_armhf.deb ../librtr*_all.deb + +# +# Setup VyOS Debian repository +# +COPY vyos-dev.key /tmp/vyos-dev.key +RUN apt-key add /tmp/vyos-dev.key +RUN echo "deb http://dev.packages.vyos.net/repositories/current/debian/ current main" \ + > /etc/apt/sources.list.d/vyos.list + +# Packages needed to build frr itself +# libyang-dev packages are hsoted on dev.packages.vyos.net see +# https://github.com/FRRouting/frr/blob/master/doc/developer/building-libyang.rst +# for more info +RUN apt-get update && apt-get install -y \ + libyang-dev \ + libyang0.16 \ + chrpath \ + install-info \ + libjson-c-dev \ + libpython3-dev \ + python3-dev \ + python3-pytest \ + texinfo + +# +# Cleanup VyOS Debian Repository +# +RUN rm -f /etc/apt/sources.list.d/vyos.list + +# Packages needed for conntrack-tools +RUN apt-get update && apt-get install -y \ + libnetfilter-conntrack-dev \ + libnetfilter-cthelper0-dev \ + libnetfilter-cttimeout-dev \ + libnetfilter-queue-dev + +# 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 + +# 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 && \ + 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 vyatta-quagga +RUN apt-get update && apt-get install -y \ + 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 \ + dh-apparmor \ + gperf \ + libsystemd-dev \ + python3-stdeb \ + python-setuptools + +# 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 + +# Packages needed for keepalived +RUN apt-get update && apt-get install -y \ + libnl-3-200 \ + libnl-3-dev \ + libnl-nf-3-200 \ + libnl-nf-3-dev \ + libipset-dev \ + libnl-genl-3-200 \ + libnl-genl-3-dev \ + libpopt-dev + +# Packages needed for net-snmp +RUN apt-get update && apt-get install -y \ + python-all \ + python2.7-dev \ + libmysqld-dev + +# 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/* + +# Install packer +RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ + jq -r -M '.current_version')"; \ + echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_amd64.zip" |\ + curl -K- | gzip -d > /usr/bin/packer && \ + chmod +x /usr/bin/packer + +# Allow password-less 'sudo' for all users in group 'sudo' +RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ + chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod + +# 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/pkg-build.sh b/docker/pkg-build.sh deleted file mode 100755 index 598917a1..00000000 --- a/docker/pkg-build.sh +++ /dev/null @@ -1,55 +0,0 @@ -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 -- cgit v1.2.3 From 772dc74e1a2457c968110834040a3ca39c3d325d Mon Sep 17 00:00:00 2001 From: UnicronNL Date: Sun, 12 May 2019 20:15:11 +0200 Subject: rename amd64 to arm for packer download --- docker/Dockerfile-armhf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile-armhf b/docker/Dockerfile-armhf index d26c5d97..71b5b8bf 100644 --- a/docker/Dockerfile-armhf +++ b/docker/Dockerfile-armhf @@ -327,7 +327,7 @@ RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sourc # Install packer RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ jq -r -M '.current_version')"; \ - echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_amd64.zip" |\ + echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_arm.zip" |\ curl -K- | gzip -d > /usr/bin/packer && \ chmod +x /usr/bin/packer -- cgit v1.2.3 From 29d919609dbd800c2ba1ab0152e1f5e0df1f60bc Mon Sep 17 00:00:00 2001 From: UnicronNL Date: Sun, 12 May 2019 23:59:20 +0200 Subject: Add arm64 docker file. --- docker/Dockerfile-arm64 | 343 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 343 insertions(+) create mode 100644 docker/Dockerfile-arm64 diff --git a/docker/Dockerfile-arm64 b/docker/Dockerfile-arm64 new file mode 100644 index 00000000..9625058b --- /dev/null +++ b/docker/Dockerfile-arm64 @@ -0,0 +1,343 @@ +# 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 multiarch/debian-debootstrap:arm64-jessie-slim +LABEL authors="VyOS Maintainers " + +ENV DEBIAN_FRONTEND noninteractive + +COPY no--check-valid-until /etc/apt/apt.conf.d/ +RUN echo "deb http://archive.debian.org/debian jessie main" \ + > /etc/apt/sources.list + +# Standard shell should be bash not dash +RUN echo "dash dash/sh boolean false" | debconf-set-selections && \ + dpkg-reconfigure dash + +RUN apt-get update && apt-get install -y \ + dialog \ + apt-utils \ + locales + +RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen +ENV LANG en_US.utf8 + +RUN apt-get update && apt-get install -y \ + vim \ + git \ + curl \ + make \ + sudo \ + mc \ + pbuilder \ + devscripts \ + squashfs-tools \ + autoconf \ + automake \ + dpkg-dev \ + genisoimage \ + lsb-release \ + fakechroot \ + libtool \ + libapt-pkg-dev \ + parted \ + kpartx \ + quilt \ + python3-lxml \ + python3-setuptools \ + python3-nose \ + python3-coverage \ + python3-sphinx \ + python3-pystache \ + pkg-config \ + debhelper \ + jq + +# +# Setup Debian Jessie Backports repository +# +COPY no--check-valid-until /etc/apt/apt.conf.d/ +RUN echo "deb http://archive.debian.org/debian/ jessie-backports main" \ + > /etc/apt/sources.list.d/jessie-backports.list + +RUN apt-get update && apt-get install -y -t jessie-backports \ + python3-git \ + python3-pip + +RUN echo "deb http://deb.debian.org/debian buster main" \ + > /etc/apt/sources.list.d/buster.list + +RUN apt-get update && apt-get install -y \ + golang \ + gosu + +RUN rm -f /etc/apt/sources.list.d/buster.list + +# Package needed for mdns-repeater +RUN apt-get update && apt-get install -y -t jessie-backports \ + dh-systemd + +# +# Remove Debian Jessie Backports repository +# +RUN rm -f /etc/apt/sources.list.d/jessie-backports.list \ + /etc/apt/apt.conf.d/no--check-valid-until + +# +# Building libvyosconf requires a full configured OPAM/OCaml setup +# +RUN apt-get update && apt-get install -y \ + libffi-dev \ + libpcre3-dev + +RUN curl https://raw.githubusercontent.com/ocaml/opam/2.0.2/shell/install.sh --output /tmp/opam_install.sh && \ + sed -i 's/read BINDIR/BINDIR=""/' /tmp/opam_install.sh && sh /tmp/opam_install.sh && \ + opam init --root=/opt/opam --comp=4.07.0 --disable-sandboxing + +RUN eval $(opam env --root=/opt/opam --set-root) && \ + opam install -y \ + oasis + +RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ + fileutils \ + lwt \ + lwt_ppx \ + lwt_log \ + ocplib-endian \ + ounit \ + pcre \ + ppx_deriving_yojson \ + sha \ + toml \ + xml-light \ + batteries \ + ocaml-protoc \ + ctypes-foreign \ + menhir + +RUN eval $(opam env --root=/opt/opam --set-root) && opam install -y \ + ctypes + +# 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#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 9a80a5d3 && \ + dpkg-buildpackage -uc -us -tc -b && \ +dpkg -i ../libvyosconfig0_*_arm64.deb + +# Packages needed for vyatta-cfg +RUN apt-get update && apt-get install -y \ + libglib2.0-dev \ + libperl-dev \ + libboost-filesystem-dev + +# Packages needed for vyatta-iproute +RUN apt-get update && apt-get install -y \ + libatm1-dev \ + libdb-dev \ + iptables-dev + +# Packages needed for vyatta-webgui +RUN apt-get update && apt-get install -y \ + libexpat1-dev \ + subversion + +# Packages needed for pmacct +RUN apt-get update && apt-get install -y \ + libpcap-dev \ + libpq-dev \ + libmysqlclient-dev \ + libgeoip-dev \ + librabbitmq-dev \ + libjansson-dev \ + librdkafka-dev \ + libnetfilter-log-dev + +# Pavkages needed for wireguard +RUN apt-get update && apt-get install -y \ + libmnl-dev + +# Packages needed for kernel +RUN apt-get update && apt-get install -y \ + kernel-package \ + libncurses5-dev \ + flex \ + bison \ + libelf-dev + +# Packages needed for vyos-accel-ppp +RUN apt-get update && apt-get install -y \ + cdbs \ + cmake \ + liblua5.1-dev + +# 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 \ + libssl-dev + +# Build rtrlib release 0.6.3 +RUN export RTRLIB_VERSION="0.6.3" && \ + wget -P /tmp https://github.com/rtrlib/rtrlib/archive/v${RTRLIB_VERSION}.tar.gz && \ + tar xf /tmp/v${RTRLIB_VERSION}.tar.gz -C /tmp && \ + cd /tmp/rtrlib-${RTRLIB_VERSION} && dpkg-buildpackage -uc -us -tc -b && \ + dpkg -i ../librtr*_arm64.deb ../librtr*_all.deb + +# +# Setup VyOS Debian repository +# +COPY vyos-dev.key /tmp/vyos-dev.key +RUN apt-key add /tmp/vyos-dev.key +RUN echo "deb http://dev.packages.vyos.net/repositories/current/debian/ current main" \ + > /etc/apt/sources.list.d/vyos.list + +# Packages needed to build frr itself +# libyang-dev packages are hsoted on dev.packages.vyos.net see +# https://github.com/FRRouting/frr/blob/master/doc/developer/building-libyang.rst +# for more info +RUN apt-get update && apt-get install -y \ + libyang-dev \ + libyang0.16 \ + chrpath \ + install-info \ + libjson-c-dev \ + libpython3-dev \ + python3-dev \ + python3-pytest \ + texinfo + +# +# Cleanup VyOS Debian Repository +# +RUN rm -f /etc/apt/sources.list.d/vyos.list + +# Packages needed for conntrack-tools +RUN apt-get update && apt-get install -y \ + libnetfilter-conntrack-dev \ + libnetfilter-cthelper0-dev \ + libnetfilter-cttimeout-dev \ + libnetfilter-queue-dev + +# 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 + +# 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 && \ + 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 vyatta-quagga +RUN apt-get update && apt-get install -y \ + 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 \ + dh-apparmor \ + gperf \ + libsystemd-dev \ + python3-stdeb \ + python-setuptools + +# 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 + +# Packages needed for keepalived +RUN apt-get update && apt-get install -y \ + libnl-3-200 \ + libnl-3-dev \ + libnl-nf-3-200 \ + libnl-nf-3-dev \ + libipset-dev \ + libnl-genl-3-200 \ + libnl-genl-3-dev \ + libpopt-dev + +# Packages needed for net-snmp +RUN apt-get update && apt-get install -y \ + python-all \ + python2.7-dev \ + libmysqld-dev + +# 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/* + +# Install packer +RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \ + jq -r -M '.current_version')"; \ + echo "url https://releases.hashicorp.com/packer/"$LATEST"/packer_"$LATEST"_linux_arm.zip" |\ + curl -K- | gzip -d > /usr/bin/packer && \ + chmod +x /usr/bin/packer + +# Allow password-less 'sudo' for all users in group 'sudo' +RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \ + chmod a+s /usr/sbin/useradd /usr/sbin/groupadd /usr/sbin/gosu /usr/sbin/usermod + +# 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"] -- cgit v1.2.3 From e08da45e6d20f1f2ac38fff24e697a155ddac3ea Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 11 May 2019 14:22:17 +0200 Subject: T1378: extend version file with Git commit ID The Git commit ID will be crucial for the future when the full VyOS build can be reproduced by the one Git commit ID, thus start recording it in the version file. --- scripts/make-version-file | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/make-version-file b/scripts/make-version-file index 95574722..4df2cb6c 100755 --- a/scripts/make-version-file +++ b/scripts/make-version-file @@ -43,7 +43,16 @@ build_timestamp = now.strftime("%Y%m%d%H%M") build_date = now.strftime("%a %d %b %Y %H:%M UTC") # Assign a (hopefully) unique identifier to the build (UUID) -build_id = str(uuid.uuid4()) +build_uuid = str(uuid.uuid4()) + +# Initialize Git object from our repository +repo = git.Repo('.') + +# Retrieve the Git commit ID of the repository, 14 charaters will be sufficient +build_git = repo.head.object.hexsha[:14] +# If somone played around with the source tree and the build is "dirty", mark it +if repo.is_dirty(): + build_git += "-dirty" # Create a build version if build_config['build_type'] == 'development': @@ -52,7 +61,6 @@ if build_config['build_type'] == 'development': with open('data/versions') as f: version_mapping = json.load(f) - repo = git.Repo('.') git_branch = repo.active_branch.name branch_version = version_mapping[git_branch] @@ -68,10 +76,10 @@ version_data = { 'version': version, 'built_by': build_config['build_by'], 'built_on': build_date, - 'build_id': build_id + 'build_uuid': build_uuid, + 'build_git': build_git } - os.makedirs(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/share/vyos'), exist_ok=True) with open(os.path.join(defaults.CHROOT_INCLUDES_DIR, 'usr/share/vyos/version.json'), 'w') as f: json.dump(version_data, f) -- cgit v1.2.3 From 8e8b67020de7c135e3321811388d1cf7bd886290 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Mon, 13 May 2019 21:58:10 +0200 Subject: Remove build-kernel helper script Logic is available via scripts/build-package helper. --- scripts/build-kernel | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100755 scripts/build-kernel diff --git a/scripts/build-kernel b/scripts/build-kernel deleted file mode 100755 index e58d2d5a..00000000 --- a/scripts/build-kernel +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -if [ ! -f "Makefile" ]; then - echo "Makefile missing, This script needs to be executed inside the vyos-kernel package directory" - exit 1 -fi - -if grep -Fxq "KBUILD_OUTPUT" Makefile; then - echo "Wrong Makefile?, This script needs to be executed inside the vyos-kernel package directory" - exit 1 -fi - - -# newer Kernel versions come with a "# SPDX-License-Identifier: GPL-2.0" identifier -# as the first line in the file - use compatible approach with grep rather then sed -VERSION=$(grep "^VERSION" Makefile | grep -Eo '[0-9]{1,4}') -PATCHLEVEL=$(grep "^PATCHLEVEL" Makefile | grep -Eo '[0-9]{1,4}') -SUBLEVEL=$(grep "^SUBLEVEL" Makefile | grep -Eo '[0-9]{1,4}') -ARCH=$(dpkg --print-architecture) - -case "$ARCH" in - amd64) - make x86_64_vyos_defconfig - TARGETS="kernel_headers kernel_image" - # the following targets are not supported for Linux Kernels > 4.14 as - # they have been removed from the Makefile (commits 18afab8c1d3c2 & - # 22cba31bae9dc). - if [ ${PATCHLEVEL} -lt 14 ]; then - TARGETS+=" kernel_manual kernel_doc" - fi - CONCURRENCY_LEVEL=4 LOCALVERSION="" make-kpkg --rootcmd fakeroot --initrd --append_to_version -amd64-vyos --revision=$VERSION.$PATCHLEVEL.$SUBLEVEL-1+vyos1+current1 -j$(cat /proc/cpuinfo | grep processor | wc -l) ${TARGETS} - ;; - - armhf) - make armhf_vyos_defconfig - ;; -esac -- cgit v1.2.3 From 217aa6afaebc021700cb6a4984f35720995f7ec5 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 12 May 2019 20:51:11 +0200 Subject: intel: remove bash debug flag (-x) when building drivers --- scripts/build-intel-drivers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-intel-drivers b/scripts/build-intel-drivers index aafd66a9..f47b6c9c 100755 --- a/scripts/build-intel-drivers +++ b/scripts/build-intel-drivers @@ -1,4 +1,4 @@ -#!/bin/bash -x +#!/bin/bash basedir=$(pwd) if [ -z "$KSRC" ]; then -- cgit v1.2.3 From d8ee537f1528dfe3e37ad1afe2b9dd3dab81cbd0 Mon Sep 17 00:00:00 2001 From: UnicronNL Date: Tue, 21 May 2019 22:15:55 +0200 Subject: update cloud builds --- Makefile | 48 ++++++++++++++++++++++- scripts/build-oracle-image | 2 +- scripts/template.ovf | 28 +++++++------ tools/cloud-init/99-debug-user.chroot | 17 ++++++++ tools/cloud-init/99-disable-networking.chroot | 3 ++ tools/cloud-init/GCE/99-debug-user.chroot | 17 -------- tools/cloud-init/OCI/config.boot.default | 12 +++++- tools/cloud-init/PACKET/90_dpkg.cfg | 8 ++++ tools/cloud-init/PACKET/config.boot.default | 39 ++++++++++++++++++ tools/cloud-init/PACKET/config.boot.default-debug | 41 +++++++++++++++++++ tools/cloud-init/openstack/90_dpkg.cfg | 8 ++++ tools/cloud-init/openstack/config.boot.default | 40 +++++++++++++++++++ 12 files changed, 230 insertions(+), 33 deletions(-) create mode 100755 tools/cloud-init/99-debug-user.chroot create mode 100755 tools/cloud-init/99-disable-networking.chroot delete mode 100755 tools/cloud-init/GCE/99-debug-user.chroot create mode 100644 tools/cloud-init/PACKET/90_dpkg.cfg create mode 100644 tools/cloud-init/PACKET/config.boot.default create mode 100644 tools/cloud-init/PACKET/config.boot.default-debug create mode 100644 tools/cloud-init/openstack/90_dpkg.cfg create mode 100644 tools/cloud-init/openstack/config.boot.default diff --git a/Makefile b/Makefile index 3bfa9597..c42766a4 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ GCE-debug: clean prepare @set -e @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/GCE/99-debug-user.chroot build/config/hooks/live/ + cp tools/cloud-init/99-debug-user.chroot build/config/hooks/live/ cp tools/cloud-init/GCE/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ cp -f tools/cloud-init/GCE/config.boot.default-debug build/config/includes.chroot/opt/vyatta/etc/config.boot.default @@ -133,6 +133,20 @@ AWS: clean prepare cd .. @scripts/copy-image +.PHONY: openstack +.ONESHELL: +openstack: clean prepare + @set -e + @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/openstack/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ + cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/openstack/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ + cd $(build_dir) + lb build 2>&1 | tee build.log + cd .. + @scripts/copy-image + .PHONY: oracle .ONESHELL: oracle: clean prepare @@ -141,9 +155,41 @@ oracle: clean prepare mkdir -p build/config/includes.chroot/etc/cloud/cloud.cfg.d cp tools/cloud-init/OCI/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/OCI/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ cd $(build_dir) @../scripts/build-oracle-image +.PHONY: PACKET +.ONESHELL: +PACKET: clean prepare + @set -e + @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/99-disable-networking.chroot build/config/hooks/live/ + cp tools/cloud-init/PACKET/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ + cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/PACKET/config.boot.default build/config/includes.chroot/opt/vyatta/etc/ + cd $(build_dir) + lb build 2>&1 | tee build.log + cd .. + @scripts/copy-image + +.PHONY: PACKET-debug +.ONESHELL: +PACKET-debug: clean prepare + @set -e + @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/99-debug-user.chroot build/config/hooks/live/ + cp tools/cloud-init/99-disable-networking.chroot build/config/hooks/live/ + cp tools/cloud-init/PACKET/90_dpkg.cfg build/config/includes.chroot/etc/cloud/cloud.cfg.d/ + cp tools/cloud-init/cloud-init.list.chroot build/config/package-lists/ + cp -f tools/cloud-init/PACKET/config.boot.default-debug build/config/includes.chroot/opt/vyatta/etc/config.boot.default + cd $(build_dir) + lb build 2>&1 | tee build.log + cd .. + @scripts/copy-image + .PHONY: clean .ONESHELL: clean: diff --git a/scripts/build-oracle-image b/scripts/build-oracle-image index 61f8ddee..e2066fc7 100755 --- a/scripts/build-oracle-image +++ b/scripts/build-oracle-image @@ -57,7 +57,7 @@ dateymd=$(date +%Y%m%d) PARTED=/sbin/parted OUTPUT=disk.raw OUTPUTQCOW2=VyOS-"$dateymd".qcow2 -IMAGE_SIZE=2 +IMAGE_SIZE=10 qemu-img create -f raw ${OUTPUT} ${IMAGE_SIZE}G ${PARTED} -s ${OUTPUT} mktable msdos diff --git a/scripts/template.ovf b/scripts/template.ovf index 87237bf7..88ea5562 100644 --- a/scripts/template.ovf +++ b/scripts/template.ovf @@ -1,5 +1,5 @@ - - + + @@ -39,22 +39,22 @@ VyOS is a Linux-based network operating system that provides software-based network routing, firewall, and VPN functionality. VyOS - VyOS maintainers and contributors + Sentrium S.L. {{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 password for the appliance 'vyos' account. Passwords must be at least 8 characters in length. - + - The public ssh key for the appliance 'vyos' account. + The public ssh key for the appliance 'vyos' account. Appliance IPv4 Network Settings - + The host name for this virtual machine. @@ -87,11 +87,11 @@ VyOS - - Guest Operating System - VyOS + + The operating system installed + Debian GNU/Linux 8 (64-bit) - + Virtual Hardware Requirements Virtual Hardware Family @@ -148,7 +148,7 @@ 0 - SCSI Controller 0 + SCSI Controller 0 - VMware Paravirtual SCSI 3 VirtualSCSI 6 @@ -195,6 +195,8 @@ vmxnet3 10 + + diff --git a/tools/cloud-init/99-debug-user.chroot b/tools/cloud-init/99-debug-user.chroot new file mode 100755 index 00000000..7b72f898 --- /dev/null +++ b/tools/cloud-init/99-debug-user.chroot @@ -0,0 +1,17 @@ +#!/bin/bash +# Script to add a user to Linux system +if [ $(id -u) -eq 0 ]; then + egrep "^debuguser" /etc/passwd >/dev/null + if [ $? -eq 0 ]; then + echo "$username exists!" + exit 1 + else + pass=$(perl -e 'print crypt($ARGV[0], "password")' dKD3UKamS3MQ) + useradd -m -p $pass debuguser + usermod -aG sudo debuguser + [ $? -eq 0 ] && echo "User has been added to system!" || echo "Failed to add a user!" + fi +else + echo "Only root may add a user to the system" + exit 2 +fi diff --git a/tools/cloud-init/99-disable-networking.chroot b/tools/cloud-init/99-disable-networking.chroot new file mode 100755 index 00000000..e576c8a5 --- /dev/null +++ b/tools/cloud-init/99-disable-networking.chroot @@ -0,0 +1,3 @@ +#!/bin/bash +systemctl disable networking +/usr/sbin/update-rc.d -f networking remove diff --git a/tools/cloud-init/GCE/99-debug-user.chroot b/tools/cloud-init/GCE/99-debug-user.chroot deleted file mode 100755 index 7b72f898..00000000 --- a/tools/cloud-init/GCE/99-debug-user.chroot +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# Script to add a user to Linux system -if [ $(id -u) -eq 0 ]; then - egrep "^debuguser" /etc/passwd >/dev/null - if [ $? -eq 0 ]; then - echo "$username exists!" - exit 1 - else - pass=$(perl -e 'print crypt($ARGV[0], "password")' dKD3UKamS3MQ) - useradd -m -p $pass debuguser - usermod -aG sudo debuguser - [ $? -eq 0 ] && echo "User has been added to system!" || echo "Failed to add a user!" - fi -else - echo "Only root may add a user to the system" - exit 2 -fi diff --git a/tools/cloud-init/OCI/config.boot.default b/tools/cloud-init/OCI/config.boot.default index 296c690a..de724f0b 100644 --- a/tools/cloud-init/OCI/config.boot.default +++ b/tools/cloud-init/OCI/config.boot.default @@ -1,4 +1,14 @@ system { + host-name vyos + login { + user vyos { + authentication { + encrypted-password "*" + plaintext-password "" + } + level admin + } + } syslog { global { facility all { @@ -16,7 +26,7 @@ system { } console { device ttyS0 { - speed 115200 + speed 9600 } } config-management { diff --git a/tools/cloud-init/PACKET/90_dpkg.cfg b/tools/cloud-init/PACKET/90_dpkg.cfg new file mode 100644 index 00000000..4f7bbd8c --- /dev/null +++ b/tools/cloud-init/PACKET/90_dpkg.cfg @@ -0,0 +1,8 @@ +# to update this file, run dpkg-reconfigure cloud-init +datasource_list: [ Ec2 ] +datasource: + Ec2: + metadata_urls: ["https://metadata.packet.net"] + max_wait: 120 + timeout: 50 + strict_id: false diff --git a/tools/cloud-init/PACKET/config.boot.default b/tools/cloud-init/PACKET/config.boot.default new file mode 100644 index 00000000..cca5fcbc --- /dev/null +++ b/tools/cloud-init/PACKET/config.boot.default @@ -0,0 +1,39 @@ +system { + host-name vyos + login { + user vyos { + authentication { + plaintext-password "vyos" + } + level admin + } + } + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + console { + device ttyS1 { + speed 115200 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} diff --git a/tools/cloud-init/PACKET/config.boot.default-debug b/tools/cloud-init/PACKET/config.boot.default-debug new file mode 100644 index 00000000..85e3a890 --- /dev/null +++ b/tools/cloud-init/PACKET/config.boot.default-debug @@ -0,0 +1,41 @@ +interfaces { + ethernet eth0 { + address dhcp + } +} +service { + ssh { + port 8022 + client-keepalive-interval 180 + } +} +system { + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + console { + device ttyS1 { + speed 115200 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} diff --git a/tools/cloud-init/openstack/90_dpkg.cfg b/tools/cloud-init/openstack/90_dpkg.cfg new file mode 100644 index 00000000..a740b314 --- /dev/null +++ b/tools/cloud-init/openstack/90_dpkg.cfg @@ -0,0 +1,8 @@ +# to update this file, run dpkg-reconfigure cloud-init +datasource_list: [ NoCloud, ConfigDrive, OpenNebula, DigitalOcean, AltCloud, MAAS, OpenStack, CloudSigma, SmartOS, None ] +disable_ec2_metadata: true +datasource: + OpenStack: + max_wait: 6 + timeout: 3 + retries: 2 diff --git a/tools/cloud-init/openstack/config.boot.default b/tools/cloud-init/openstack/config.boot.default new file mode 100644 index 00000000..de724f0b --- /dev/null +++ b/tools/cloud-init/openstack/config.boot.default @@ -0,0 +1,40 @@ +system { + host-name vyos + login { + user vyos { + authentication { + encrypted-password "*" + plaintext-password "" + } + level admin + } + } + syslog { + global { + facility all { + level info + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + console { + device ttyS0 { + speed 9600 + } + } + config-management { + commit-revisions 100 + } +} + +interfaces { + loopback lo { + } +} -- cgit v1.2.3 From 063a6df720ee48b582622c0246bf40943a630da3 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 23 May 2019 21:13:04 +0200 Subject: Remove obsolete 'data/kernel_version' file --- data/kernel_version | 1 - 1 file changed, 1 deletion(-) delete mode 100644 data/kernel_version diff --git a/data/kernel_version b/data/kernel_version deleted file mode 100644 index 51333a00..00000000 --- a/data/kernel_version +++ /dev/null @@ -1 +0,0 @@ -4.19.40-amd64-vyos -- cgit v1.2.3 From f8c81163bae6387b6c5103b06d2e018aa3659ad7 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 23 May 2019 21:13:34 +0200 Subject: T1402: Update Linux Kernel to 4.19.45 --- data/defaults.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/defaults.json b/data/defaults.json index 2d2ebcd4..177926b4 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -5,7 +5,7 @@ "debian_distribution": "jessie", "vyos_mirror": "http://dev.packages.vyos.net/repositories/current", "vyos_branch": "current", - "kernel_version": "4.19.40", + "kernel_version": "4.19.45", "kernel_flavor": "amd64-vyos", "additional_repositories": [ "deb http://repo.saltstack.com/apt/debian/8/amd64/2017.7 jessie main", -- cgit v1.2.3 From d7227fa596cae22913bf00b01f5257f7e5d0059b Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 23 May 2019 21:23:24 +0200 Subject: Docker: adjust dependencies on vyatta-iproute package --- docker/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 5a4c074d..970fc1bc 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -143,9 +143,12 @@ RUN apt-get update && apt-get install -y \ # Packages needed for vyatta-iproute RUN apt-get update && apt-get install -y \ + iptables-dev \ libatm1-dev \ + libcap-dev \ libdb-dev \ - iptables-dev + libelf-dev \ + libselinux1-dev # Packages needed for vyatta-webgui RUN apt-get update && apt-get install -y \ -- cgit v1.2.3 From 5f669b4158fbf00cee401f81cb36bf57e3c50c1c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 18 May 2019 23:24:19 +0200 Subject: Packages/kernel: ensure proper initramfs handling When building the kernel with 'make deb-pkg' insted of 'make-kpkg' - which is the new official way - an initramfs will be deployed. This break's VyOS! Delete all possible initramfs image(s) before building the final VyOS initramfs image. --- data/live-build-config/hooks/live/17-gen_initramfs.chroot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/live-build-config/hooks/live/17-gen_initramfs.chroot b/data/live-build-config/hooks/live/17-gen_initramfs.chroot index 0f5e0ece..87b53bd6 100755 --- a/data/live-build-config/hooks/live/17-gen_initramfs.chroot +++ b/data/live-build-config/hooks/live/17-gen_initramfs.chroot @@ -5,4 +5,8 @@ echo I: Create initramfs if it does not exist. # Kernel complains about non available nls_ascii module when booting from USB pendrive echo "nls_ascii" >> /etc/initramfs-tools/modules +if [ -e /boot/initrd.img-* ]; then + rm -f /boot/initrd.img-* +fi + update-initramfs -c -k `ls /boot | grep vmlinuz- | sed 's/vmlinuz-//g'` -- cgit v1.2.3 From 34e840e4c022033342e39cbc627888f2b4fcef69 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 23 May 2019 19:55:22 +0200 Subject: Packages: add live-boot package to build procedure --- scripts/build-packages | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build-packages b/scripts/build-packages index cf7f369d..a4516fe4 100755 --- a/scripts/build-packages +++ b/scripts/build-packages @@ -192,6 +192,7 @@ vyos_packages = ['vyatta-bash', 'ddclient', 'igmpproxy', 'eventwatchd', + 'live-boot', 'conntrack-tools'] # Special packages mean packages which are located no in the VyOS namespace -- cgit v1.2.3 From 787b4aaac8505fbada61256b40fdb7b5ea150bf4 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 26 May 2019 17:18:11 +0200 Subject: Packages/modules: install accel-ppp and wireguard modules into right location ... previously the modules have been installed into /lib/modules/4.14.45 and not 4.14.45-amd64-vyos. --- scripts/build-packages | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build-packages b/scripts/build-packages index a4516fe4..fb577f3a 100755 --- a/scripts/build-packages +++ b/scripts/build-packages @@ -259,7 +259,7 @@ pkg_special.append( add_package('vyos-kernel', branch='linux-vyos-4.19.y', custo # # WireGuard Kernel Module # -wireguard_build_cmd = "echo 'src/wireguard.ko /lib/modules/'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\") > debian/wireguard-modules.install && " \ +wireguard_build_cmd = "echo 'src/wireguard.ko /lib/modules/'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\")-amd64-vyos/extra > debian/wireguard-modules.install && " \ "KERNELDIR=" + repo_root + "/packages/vyos-kernel dpkg-buildpackage -b -us -uc -tc -j" + str(os.cpu_count()) pkg_special.append( add_package('vyos-wireguard', custombuild_cmd=wireguard_build_cmd) ) @@ -268,8 +268,8 @@ pkg_special.append( add_package('vyos-wireguard', custombuild_cmd=wireguard_buil # # Accell-PPP Package and Kernel Module # -accel_ppp_build_cmd = "echo 'lib/modules/'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\")'/extra/*.ko' > debian/vyos-accel-ppp-ipoe-kmod.install && " \ - "sed -i 's#[0-9].[0-9][0-9].[0-9]*-amd64-vyos#'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\")'#g' debian/rules && " \ +accel_ppp_build_cmd = "echo 'lib/modules/'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\")-amd64-vyos/extra/*.ko > debian/vyos-accel-ppp-ipoe-kmod.install && " \ + "sed -i 's#[0-9].[0-9][0-9].[0-9]*-amd64-vyos#'$(cat " + repo_root + "/data/defaults.json | jq '.kernel_version' | tr -d \\\")'-amd64-vyos#g' debian/rules && " \ "KERNELDIR=" + repo_root + "/packages/vyos-kernel dpkg-buildpackage -b -us -uc -tc -j" + str(os.cpu_count()) pkg_special.append( add_package('vyos-accel-ppp', custombuild_cmd=accel_ppp_build_cmd) ) -- cgit v1.2.3 From d92be49a3adb27a13513b7a3a92286fa3d586aa5 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 28 May 2019 20:21:19 +0200 Subject: T1410: Upgrade Linux Kernel to 4.19.46 --- data/defaults.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/defaults.json b/data/defaults.json index 177926b4..38786895 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -5,7 +5,7 @@ "debian_distribution": "jessie", "vyos_mirror": "http://dev.packages.vyos.net/repositories/current", "vyos_branch": "current", - "kernel_version": "4.19.45", + "kernel_version": "4.19.46", "kernel_flavor": "amd64-vyos", "additional_repositories": [ "deb http://repo.saltstack.com/apt/debian/8/amd64/2017.7 jessie main", -- cgit v1.2.3 From b60f6140ef221d32ce43fb2ebacec41ed58fb00a Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 28 May 2019 20:22:32 +0200 Subject: Packages: do not create obsolete 'data/kernel_version' file --- scripts/build-packages | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/build-packages b/scripts/build-packages index fb577f3a..dcc74c05 100755 --- a/scripts/build-packages +++ b/scripts/build-packages @@ -249,7 +249,6 @@ pkg_special.append( add_package('net-snmp', custombuild_cmd=net_snmp_build_cmd) # Linux (VyOS) Kernel # kernel_build_cmd = "make x86_64_vyos_defconfig && " \ - "echo $(make kernelversion)-amd64-vyos > " + repo_root + "/data/kernel_version && " \ "sed -i 's/\"kernel_version\": \"[0-9].[0-9][0-9].[0-9]*\"/\"kernel_version\": \"'$(make kernelversion)'\"/' " + repo_root + "/data/defaults.json && " \ "make bindeb-pkg 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) ) -- cgit v1.2.3 From 8cec5a37947accd0dbcc3ab58e6557c3ec347377 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 28 May 2019 20:37:31 +0200 Subject: Packages: add '--keep' option to not clean packages By default all git repos are reset using 'git reset --hard' and cleaned using 'git clean -x -d -f'. A developer sometimes would like to keep his changes and thus the --keep option was added. --- scripts/build-packages | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/build-packages b/scripts/build-packages index dcc74c05..aa73228a 100755 --- a/scripts/build-packages +++ b/scripts/build-packages @@ -98,7 +98,10 @@ def clone_package(pkg, log): First cleanup any possible leftovers from previous builds """ - if args.clean: + if args.keep: + log.debug("Keep possibly modified package '{}'".format(pkg['path'])) + return False + elif args.clean: # delete repository from disk if os.path.isdir(pkg['path']): log.debug("Cleaning '{}'".format(pkg['path'])) @@ -281,6 +284,9 @@ pkg_build = [] if __name__ == '__main__': parser = argparse.ArgumentParser() + exclusive = parser.add_mutually_exclusive_group(required=False) + exclusive.add_argument('-k', '--keep', action='store_true', help='Keep modified Git repositories') + parser.add_argument('-v', '--verbose', action='count', default=0, help='Increase logging verbosity for each occurance') parser.add_argument('-c', '--clean', action='store_true', help='Re-clone required Git repositories') parser.add_argument('-l', '--list-packages', action='store_true', help='List all packages to build') -- cgit v1.2.3 From e91ac330b78025f523a60161e9fde43dafae4b7e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 28 May 2019 20:38:32 +0200 Subject: Packages: clean, fetch and keep options are mutually exclusive ... as it makes no sense to keep and clean a package or any other combination. --- scripts/build-packages | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build-packages b/scripts/build-packages index aa73228a..69cef3c0 100755 --- a/scripts/build-packages +++ b/scripts/build-packages @@ -285,13 +285,13 @@ pkg_build = [] if __name__ == '__main__': parser = argparse.ArgumentParser() exclusive = parser.add_mutually_exclusive_group(required=False) + exclusive.add_argument('-c', '--clean', action='store_true', help='Re-clone required Git repositories') exclusive.add_argument('-k', '--keep', action='store_true', help='Keep modified Git repositories') + exclusive.add_argument('-f', '--fetch', action='store_true', help='Fetch sources only, no build') parser.add_argument('-v', '--verbose', action='count', default=0, help='Increase logging verbosity for each occurance') - parser.add_argument('-c', '--clean', action='store_true', help='Re-clone required Git repositories') parser.add_argument('-l', '--list-packages', action='store_true', help='List all packages to build') parser.add_argument('-b', '--build', nargs='+', help='Whitespace separated list of packages to build') - parser.add_argument('-f', '--fetch', action='store_true', help='Fetch sources only, no build') parser.add_argument('-p', '--parallel', action='store_true', help='Build on all CPUs') parser.add_argument('--blacklist', nargs='+', help='Do not build/report packages when calling --list') -- cgit v1.2.3 From 08eaa95a34ca630782043bda94378d3d72308904 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 4 Jun 2019 22:13:01 +0200 Subject: T1410: Upgrade Linux Kernel to 4.19.48 --- data/defaults.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/defaults.json b/data/defaults.json index 38786895..c618561b 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -5,7 +5,7 @@ "debian_distribution": "jessie", "vyos_mirror": "http://dev.packages.vyos.net/repositories/current", "vyos_branch": "current", - "kernel_version": "4.19.46", + "kernel_version": "4.19.48", "kernel_flavor": "amd64-vyos", "additional_repositories": [ "deb http://repo.saltstack.com/apt/debian/8/amd64/2017.7 jessie main", -- cgit v1.2.3 From 14a398d3deafe020a6893731a5dd7581765b38d6 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 16 Jun 2019 13:06:43 +0200 Subject: T1327: add serial console (115200,8n1) to ISO kernel command-line --- scripts/live-build-config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/live-build-config b/scripts/live-build-config index 9b7c2d67..1b3b4541 100755 --- a/scripts/live-build-config +++ b/scripts/live-build-config @@ -35,7 +35,8 @@ util.check_build_config() lb_config_tmpl = """ lb config noauto \ --architectures {{architecture}} \ - --bootappend-live "boot=live components hostname=vyos username=live nopersistence noautologin nonetworking union=overlay" \ + --bootappend-live "boot=live components hostname=vyos username=live nopersistence noautologin nonetworking union=overlay console=ttyS0,115200 console=tty0" \ + --bootappend-live-failsafe "live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal console=ttyS0,115200 console=tty0" \ --linux-flavours {{kernel_flavor}} \ --linux-packages linux-image-{{kernel_version}} \ --bootloader syslinux,grub-efi \ -- cgit v1.2.3 From 0d8e2d76169bf70b7dc4707d496d227d57629bb6 Mon Sep 17 00:00:00 2001 From: Tomohiro Nakamura Date: Mon, 17 Jun 2019 01:36:00 +0900 Subject: Update to apply arguments (#49) --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index bb1734ea..c602ffb6 120000 --- a/configure +++ b/configure @@ -1 +1 @@ -scripts/build-config \ No newline at end of file +scripts/build-config "$@" -- cgit v1.2.3 From 68ff2acd70fcb14a00610ae907c6d5f3c818cead Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 18 Jun 2019 08:03:26 +0200 Subject: T1444: Update Linux Kernel to 4.19.52 --- data/defaults.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/defaults.json b/data/defaults.json index c618561b..59789a6d 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -5,7 +5,7 @@ "debian_distribution": "jessie", "vyos_mirror": "http://dev.packages.vyos.net/repositories/current", "vyos_branch": "current", - "kernel_version": "4.19.48", + "kernel_version": "4.19.52", "kernel_flavor": "amd64-vyos", "additional_repositories": [ "deb http://repo.saltstack.com/apt/debian/8/amd64/2017.7 jessie main", -- cgit v1.2.3 From 85fc28f67c0b1da61f2f77721b619d639b11e6e4 Mon Sep 17 00:00:00 2001 From: runborg Date: Tue, 18 Jun 2019 11:04:10 +0200 Subject: Revert "Update to apply arguments (#49)" This reverts commit 0d8e2d76169bf70b7dc4707d496d227d57629bb6. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index c602ffb6..bb1734ea 120000 --- a/configure +++ b/configure @@ -1 +1 @@ -scripts/build-config "$@" +scripts/build-config \ No newline at end of file -- cgit v1.2.3 From 70366de29543a5b66e7ea7a42f2b01e0eec06689 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 19 Jun 2019 12:26:29 +0200 Subject: T1453: add missing nss-myhostname package Jun 18 17:56:10 localhost systemd-hostnamed[1434]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname! Jun 18 17:56:34 localhost sudo: root : unable to resolve host vyos-r1-brn --- data/live-build-config/package-lists/vyos-utils.list.chroot | 1 + 1 file changed, 1 insertion(+) 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 cc28e9b7..55f703c8 100644 --- a/data/live-build-config/package-lists/vyos-utils.list.chroot +++ b/data/live-build-config/package-lists/vyos-utils.list.chroot @@ -25,3 +25,4 @@ iotop aptitude localepurge bgpq3 +libnss-myhostname -- cgit v1.2.3 From 6638c5d0f1a6c8b0a4d8fc016c1797c4526a53fd Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 19 Jun 2019 13:30:17 +0200 Subject: T1454: remove deprecated /etc/frr/daemons.conf File which was still present (but not of any problem) caused the following message: Jun 19 11:14:27 localhost watchfrr.sh: Reading deprecated /etc/frr/daemons.conf. Please move its settings to /etc/frr/daemons and remove it. --- data/live-build-config/hooks/live/30-frr-configs.chroot | 5 ----- 1 file changed, 5 deletions(-) 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 d3cfbce5..b033d3b8 100755 --- a/data/live-build-config/hooks/live/30-frr-configs.chroot +++ b/data/live-build-config/hooks/live/30-frr-configs.chroot @@ -28,9 +28,7 @@ sharpd=no pbrd=no bfdd=no staticd=yes -""" -daemons_conf = """ vtysh_enable=yes zebra_options=" -s 90000000 --daemon -A 127.0.0.1 -M snmp -n" bgpd_options=" --daemon -A 127.0.0.1 -M snmp -M rpki" @@ -59,9 +57,6 @@ valgrind=/usr/bin/valgrind with open("/etc/frr/daemons", "w") as f: f.write(daemons) -with open("/etc/frr/daemons.conf", "w") as f: - f.write(daemons_conf) - # Create empty daemon configs so that they start properly for name in ["zebra.conf", "bgpd.conf", "ospfd.conf", "ospf6d.conf", "ripd.conf", "ripngd.conf"]: open(os.path.join("/etc/frr", name), 'a').close() -- cgit v1.2.3 From 940decbcd6a9e50c37e1661b4d409860a2ca3158 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 19 Jun 2019 14:30:41 +0200 Subject: T1454: frr: remove no longer required watchfrr_options Fixes the following startup warning: Jun 19 11:14:27 localhost watchfrr.sh: watchfrr_options contains a bash array value. The configured value is intentionally ignored since it is likely wrong. Please remove or fix the setting. --- data/live-build-config/hooks/live/30-frr-configs.chroot | 3 --- 1 file changed, 3 deletions(-) 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 b033d3b8..c984fee4 100755 --- a/data/live-build-config/hooks/live/30-frr-configs.chroot +++ b/data/live-build-config/hooks/live/30-frr-configs.chroot @@ -48,10 +48,7 @@ staticd_options=" --daemon -A 127.0.0.1" bfdd_options=" --daemon -A 127.0.0.1" watchfrr_enable=no -watchfrr_options=(-d -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB) - valgrind_enable=no -valgrind=/usr/bin/valgrind """ with open("/etc/frr/daemons", "w") as f: -- cgit v1.2.3 From df64f25947438731958d6bf55fb126956de7c3d0 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 23 Jun 2019 12:21:53 +0200 Subject: bfd: T1183: enable FRR bfdd service --- data/live-build-config/hooks/live/30-frr-configs.chroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c984fee4..3380ef8c 100755 --- a/data/live-build-config/hooks/live/30-frr-configs.chroot +++ b/data/live-build-config/hooks/live/30-frr-configs.chroot @@ -26,7 +26,7 @@ eigrpd=no babeld=no sharpd=no pbrd=no -bfdd=no +bfdd=yes staticd=yes vtysh_enable=yes -- cgit v1.2.3 From 0daaef8b5b763c5804ef90cd4b76bd4829600a59 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 23 Jun 2019 13:16:10 +0200 Subject: Kernel: T1473: update to v4.19.54 --- data/defaults.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/defaults.json b/data/defaults.json index 59789a6d..bf6e4bca 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -5,7 +5,7 @@ "debian_distribution": "jessie", "vyos_mirror": "http://dev.packages.vyos.net/repositories/current", "vyos_branch": "current", - "kernel_version": "4.19.52", + "kernel_version": "4.19.54", "kernel_flavor": "amd64-vyos", "additional_repositories": [ "deb http://repo.saltstack.com/apt/debian/8/amd64/2017.7 jessie main", -- cgit v1.2.3 From aa19625ae1db029e162a9f29af6bd8ff782ff9ff Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 23 Jun 2019 19:04:33 +0200 Subject: pdns-recursor: T1476: update PowerDNS recursor to 4.2 series --- data/defaults.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/defaults.json b/data/defaults.json index bf6e4bca..bd9c9ef6 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -9,7 +9,7 @@ "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-42 main", "deb http://archive.debian.org/debian/ jessie-backports main" ], "custom_packages": [] -- cgit v1.2.3 From 3305dca496d814dfdc8d1b479e8dc1598f01d681 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 25 Jun 2019 22:27:14 +0700 Subject: Typo fix s/security updated/security updates/ --- scripts/build-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-config b/scripts/build-config index a12ecdc4..dd74a50e 100755 --- a/scripts/build-config +++ b/scripts/build-config @@ -67,7 +67,7 @@ options = { '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: build_defaults['debian_mirror'], None), - 'debian-security-mirror': ('Debian security updated mirror', lambda: build_defaults['debian_security_mirror'], None), + 'debian-security-mirror': ('Debian security updates 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']), -- cgit v1.2.3 From fe60d1f73daaf0a567b5b9cc41524b507a9b829d Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Mon, 1 Jul 2019 13:17:48 -0500 Subject: [service https] T1443: add nginx and ssl-cert packages; disable nginx on boot. --- data/live-build-config/hooks/live/18-enable-disable_services.chroot | 1 + data/live-build-config/package-lists/vyos-utils.list.chroot | 2 ++ 2 files changed, 3 insertions(+) diff --git a/data/live-build-config/hooks/live/18-enable-disable_services.chroot b/data/live-build-config/hooks/live/18-enable-disable_services.chroot index d4d89ba8..787510e0 100755 --- a/data/live-build-config/hooks/live/18-enable-disable_services.chroot +++ b/data/live-build-config/hooks/live/18-enable-disable_services.chroot @@ -38,3 +38,4 @@ systemctl disable tftpd-hpa.service systemctl disable strongswan.service systemctl disable frr.service systemctl disable salt-minion.service +systemctl disable nginx.service 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 55f703c8..4dcfef1e 100644 --- a/data/live-build-config/package-lists/vyos-utils.list.chroot +++ b/data/live-build-config/package-lists/vyos-utils.list.chroot @@ -26,3 +26,5 @@ aptitude localepurge bgpq3 libnss-myhostname +ssl-cert +nginx-light -- cgit v1.2.3 From a6d807234c3176dca88311e7469b98f8f9d2997b Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 2 Jul 2019 22:48:12 +0200 Subject: T1502: include vyos-smoketest in the dev builds. --- data/package-lists/vyos-dev.list.chroot | 1 + 1 file changed, 1 insertion(+) diff --git a/data/package-lists/vyos-dev.list.chroot b/data/package-lists/vyos-dev.list.chroot index f3305f30..dd1de5f3 100644 --- a/data/package-lists/vyos-dev.list.chroot +++ b/data/package-lists/vyos-dev.list.chroot @@ -1,3 +1,4 @@ gdb strace apt-rdepends +vyos-smoketest -- cgit v1.2.3 From 9958f89e7ad3eda5a53c9a02afd989e2f1d0f878 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 4 Jul 2019 19:19:30 +0200 Subject: Detailed branch naming explanation. --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 885f2fba..38c85d78 100644 --- a/README.md +++ b/README.md @@ -272,6 +272,9 @@ In packages that originate from VyOS the master branch is kept in sync with last legacy package is gone, we will switch to using the `master` branch and retire `current`. -For branch naming we switched to use constellations: -* `crux` +Post-1.2.0 branches are named after constellations sorted by from smallest to largest. +There are 88 of them, here's the [complete list](https://en.wikipedia.org/wiki/IAU_designated_constellations_by_area). + +* 1.2.0: `crux` (Southern Cross) +* Future 1.3.0: `equuleus` * ... -- cgit v1.2.3 From 76a1a2b298d60dd9cdd0a03986bdb4524519a74a Mon Sep 17 00:00:00 2001 From: Eshenko Dmitriy Date: Fri, 5 Jul 2019 12:23:06 +0300 Subject: Update README.md Add `apt-get update -o Acquire::Check-Valid-Until=false` for fix error `...jessie-backports/InRelease is expired. Updates for this repository will not be applied.` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38c85d78..8e1636ce 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ $ sudo debootstrap jessie vyos-chroot $ sudo chroot vyos-chroot $ echo "deb http://archive.debian.org/debian/ jessie-backports main" >> /etc/apt/sources.list -$ apt-get update +$ apt-get update -o Acquire::Check-Valid-Until=false ``` **NOTE:** We recommend to use the Docker build method -- cgit v1.2.3 From 91d4cd070f15d24886928cb5a31303a8387c51e8 Mon Sep 17 00:00:00 2001 From: UnicronNL Date: Fri, 12 Jul 2019 10:39:42 +0200 Subject: Add default hostname --- tools/cloud-init/GCE/config.boot.default | 1 + tools/cloud-init/GCE/config.boot.default-debug | 1 + tools/cloud-init/PACKET/config.boot.default | 8 -------- tools/cloud-init/PACKET/config.boot.default-debug | 1 + tools/cloud-init/azure/config.boot.default | 1 + 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/cloud-init/GCE/config.boot.default b/tools/cloud-init/GCE/config.boot.default index a0cc398f..cac26936 100644 --- a/tools/cloud-init/GCE/config.boot.default +++ b/tools/cloud-init/GCE/config.boot.default @@ -1,4 +1,5 @@ system { + host-name vyos syslog { global { facility all { diff --git a/tools/cloud-init/GCE/config.boot.default-debug b/tools/cloud-init/GCE/config.boot.default-debug index 9514e893..a51c3f4d 100644 --- a/tools/cloud-init/GCE/config.boot.default-debug +++ b/tools/cloud-init/GCE/config.boot.default-debug @@ -10,6 +10,7 @@ service { } } system { + host-name vyos syslog { global { facility all { diff --git a/tools/cloud-init/PACKET/config.boot.default b/tools/cloud-init/PACKET/config.boot.default index cca5fcbc..b56a94aa 100644 --- a/tools/cloud-init/PACKET/config.boot.default +++ b/tools/cloud-init/PACKET/config.boot.default @@ -1,13 +1,5 @@ system { host-name vyos - login { - user vyos { - authentication { - plaintext-password "vyos" - } - level admin - } - } syslog { global { facility all { diff --git a/tools/cloud-init/PACKET/config.boot.default-debug b/tools/cloud-init/PACKET/config.boot.default-debug index 85e3a890..660f1d0f 100644 --- a/tools/cloud-init/PACKET/config.boot.default-debug +++ b/tools/cloud-init/PACKET/config.boot.default-debug @@ -10,6 +10,7 @@ service { } } system { + host-name vyos syslog { global { facility all { diff --git a/tools/cloud-init/azure/config.boot.default b/tools/cloud-init/azure/config.boot.default index 296c690a..32025974 100644 --- a/tools/cloud-init/azure/config.boot.default +++ b/tools/cloud-init/azure/config.boot.default @@ -1,4 +1,5 @@ system { + host-name vyos syslog { global { facility all { -- cgit v1.2.3 From 8c22ceead487b745d6b7c058c4d1c0a0eaa051c8 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 19 Jul 2019 18:06:38 +0200 Subject: Revert "pdns-recursor: T1476: update PowerDNS recursor to 4.2 series" This reverts commit aa19625ae1db029e162a9f29af6bd8ff782ff9ff. --- data/defaults.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/defaults.json b/data/defaults.json index bd9c9ef6..bf6e4bca 100644 --- a/data/defaults.json +++ b/data/defaults.json @@ -9,7 +9,7 @@ "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-42 main", + "deb http://repo.powerdns.com/debian jessie-rec-41 main", "deb http://archive.debian.org/debian/ jessie-backports main" ], "custom_packages": [] -- cgit v1.2.3