summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-06-27 16:51:20 +0200
committerGitHub <noreply@github.com>2024-06-27 16:51:20 +0200
commitbc9c9d6c3c9ce889464eb4ca472ac7bc385a21cf (patch)
tree263152ccfb998302b30880111352bb852ab7343e
parent4d72f1e8a4c87c6a5a79a91b16effd6ce165745e (diff)
parent631a18279e5e6851b320a089137b71fc64ed3dd8 (diff)
downloadvyos-build-bc9c9d6c3c9ce889464eb4ca472ac7bc385a21cf.tar.gz
vyos-build-bc9c9d6c3c9ce889464eb4ca472ac7bc385a21cf.zip
Merge pull request #679 from vyos/mergify/bp/circinus/pr-667
T6507: remove references to vyos-world package (backport #667)
-rw-r--r--data/live-build-config/package-lists/vyos-base.list.chroot7
-rw-r--r--docker-vyos/vyos_install_stage_01.sh9
-rw-r--r--docker-vyos/vyos_install_stage_02.sh9
-rwxr-xr-xscripts/list-build-dependencies120
4 files changed, 22 insertions, 123 deletions
diff --git a/data/live-build-config/package-lists/vyos-base.list.chroot b/data/live-build-config/package-lists/vyos-base.list.chroot
index 0b7b8e9f..c2129318 100644
--- a/data/live-build-config/package-lists/vyos-base.list.chroot
+++ b/data/live-build-config/package-lists/vyos-base.list.chroot
@@ -1,6 +1,11 @@
debconf
gpgv
gnupg
-vyos-world
+vyatta-cfg-system
+vyatta-bash
+vyatta-op
+vyatta-cfg
+vyatta-wanloadbalance
+vyos-1x
vyos-user-utils
zstd
diff --git a/docker-vyos/vyos_install_stage_01.sh b/docker-vyos/vyos_install_stage_01.sh
index ce9e9b53..10f1210e 100644
--- a/docker-vyos/vyos_install_stage_01.sh
+++ b/docker-vyos/vyos_install_stage_01.sh
@@ -23,7 +23,14 @@ echo "Configuring APT repositories"
prepare_apt
# Get list of VyOS packages
-vyos_packages=(`apt-cache -i depends vyos-world | awk '/Depends:/ { printf("%s ", $2) }'`)
+vyos_packages=(
+ "vyatta-cfg-system"
+ "vyatta-bash"
+ "vyatta-op"
+ "vyatta-cfg"
+ "vyatta-wanloadbalance"
+ "vyos-1x"
+ )
# Do not analyze packages, which we do not need in Docker
vyos_packages_filter=(
diff --git a/docker-vyos/vyos_install_stage_02.sh b/docker-vyos/vyos_install_stage_02.sh
index 81a0975b..0e3384c4 100644
--- a/docker-vyos/vyos_install_stage_02.sh
+++ b/docker-vyos/vyos_install_stage_02.sh
@@ -23,7 +23,14 @@ echo "Configuring APT repositories"
prepare_apt
# Get list of VyOS packages
-vyos_packages=(`apt-cache -i depends vyos-world | awk '/Depends:/ { printf("%s ", $2) }'`)
+vyos_packages=(
+ "vyatta-cfg-system"
+ "vyatta-bash"
+ "vyatta-op"
+ "vyatta-cfg"
+ "vyatta-wanloadbalance"
+ "vyos-1x"
+ )
# Do not analyze packages, which we do not need in Docker
vyos_packages_filter=(
diff --git a/scripts/list-build-dependencies b/scripts/list-build-dependencies
deleted file mode 100755
index e13651f3..00000000
--- a/scripts/list-build-dependencies
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2020 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 <http://www.gnu.org/licenses/>.
-
-# Parse debian/control like content and extract packages required by the
-# Build-Depends statement. Return a string with all required packages.
-#
-# Code below copied from https://stackoverflow.com/a/47707412 - Thank You!
-get_build_depends () {
- echo $(awk '
- /^Build-Depends:/ || /^ / && deps {
- sub(/^[^ ]+: /, "")
- deps = 1
- dep_str = dep_str ", " $0
- next
- }
- { deps=0 }
- END {
- split(dep_str, dep_array, /, */)
- for (d in dep_array) {
- dep = dep_array[d]
- gsub(/[^a-z0-9_.-].*$/, "", dep)
- if (dep && !seen[dep]++) print dep
- }
- }' $1)
-}
-
-get_runtime_depends () {
- echo $(awk '
- /^Depends:/ || /^ / && deps {
- sub(/^[^ ]+: /, "")
- deps = 1
- dep_str = dep_str ", " $0
- next
- }
- { deps=0 }
- END {
- split(dep_str, dep_array, /, */)
- for (d in dep_array) {
- dep = dep_array[d]
- gsub(/[^a-z0-9_.-].*$/, "", dep)
- if (dep && !seen[dep]++) print dep
- }
- }' $1)
-}
-
-# Some packages are required prior to running this script
-BOOTSTRAP_PACKAGES="devscripts curl equivs"
-for pkg in $BOOTSTRAP_PACKAGES
-do
- dpkg -s $pkg >/dev/null 2>&1
- if [ $? -ne 0 ]; then
- echo "Required package \"$pkg\" not installed"
- exit 1
- fi
-done
-
-echo ""
-echo "Below you can find a list of packages that are required as build time"
-echo "dependency for the individual package"
-echo ""
-echo "The generated content can be used to populate a file to provision"
-echo "e.g. a native build host or a Docker container"
-echo ""
-echo ""
-
-GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
-
-# First we need to get vyos-world so we know all individual packages for VyOS
-curl -L https://github.com/vyos/vyos-world/raw/$GIT_BRANCH/debian/control \
- --output /tmp/vyos-world.control --retry 100 --retry-delay 1 --silent
-
-VYOS_PACKAGES=$(get_runtime_depends /tmp/vyos-world.control)
-rm -f /tmp/vyos-world.control
-for pkg in $VYOS_PACKAGES
-do
- # Check if repo exists
- res=$(curl -o /dev/null --silent -Iw '%{http_code}' https://github.com/vyos/$pkg)
- if [[ $res -ne 200 ]]; then
- continue
- fi
-
- CTRLFILE=/tmp/$pkg.control
- curl -L https://github.com/vyos/$pkg/raw/$GIT_BRANCH/debian/control \
- --output $CTRLFILE --retry 100 --retry-delay 1 --silent
-
- declare -a array
- declare -i length cnt
-
- array=($(get_build_depends $CTRLFILE))
- length=${#array[@]}
- cnt=0
-
- echo "# Packages needed to build '$pkg' from https://github.com/vyos/$pkg"
- echo "apt-get install -y \\"
- for name in "${array[@]}"; do
- cnt=$((cnt + 1))
- if [[ "$cnt" -eq "$length" ]]; then
- echo " $name"
- else
- echo " $name \\"
- fi
- done
- rm -f $CTRLFILE
- echo ""
-done
-