From 8acb311acf2928a402f229ea9861399a7fc8e7b0 Mon Sep 17 00:00:00 2001 From: nkraetzschmar <9020053+nkraetzschmar@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:19:56 +0100 Subject: [PATCH] add package excludes --- .github/workflows/build.yml | 4 ++-- download_pkgs | 3 ++- package-exclude | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 package-exclude diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b96119e..5d5c942 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: podman pull --arch amd64 "$container" podman build -t build --build-arg base="$container" . mkdir repo - podman run --rm -v "$PWD/repo:/repo" -v "$PWD/package-releases:/package-releases" -v "$PWD/package-imports:/package-imports" -e GH_TOKEN build /download_pkgs /repo /package-releases /package-imports + podman run --rm -v "$PWD/repo:/repo" -v "$PWD/package-releases:/package-releases" -v "$PWD/package-imports:/package-imports" -v "$PWD/package-exclude:/package-exclude" -e GH_TOKEN build /download_pkgs /repo /package-releases /package-imports /package-exclude - name: download arm64 packages env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -55,7 +55,7 @@ jobs: podman pull --arch arm64 "$container" podman build -t build --build-arg base="$container" . mkdir repo_arm64 - podman run --rm -v "$PWD/repo_arm64:/repo" -v "$PWD/package-releases:/package-releases" -v "$PWD/package-imports:/package-imports" -e GH_TOKEN build /download_pkgs /repo /package-releases /package-imports + podman run --rm -v "$PWD/repo_arm64:/repo" -v "$PWD/package-releases:/package-releases" -v "$PWD/package-imports:/package-imports" -v "$PWD/package-exclude:/package-exclude" -e GH_TOKEN build /download_pkgs /repo /package-releases /package-imports /package-exclude cp -r --no-clobber repo_arm64/. repo/. rm -rf repo_arm64 - name: build kms signing container diff --git a/download_pkgs b/download_pkgs index 86c543e..315b5fd 100755 --- a/download_pkgs +++ b/download_pkgs @@ -5,6 +5,7 @@ set -exufo pipefail target="$(realpath "$1")" releases="$(realpath "$2")" import_list="$(realpath "$3")" +exclude_patterns="$(realpath "$4")" dir="$(mktemp -d)" trap 'cd / && rm -rf "$dir"' EXIT @@ -39,7 +40,7 @@ sort -o depends -u depends join -v 1 depends pkgs > needed xargs apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances < needed | grep '^\w' | cut -d : -f 1 | sort | uniq > recursive_depends -join -v 1 recursive_depends pkgs > recursive_needed +join -v 1 recursive_depends pkgs | { grep -v -x -f "$exclude_patterns" || true; } > recursive_needed mkdir apt_download (cd apt_download && xargs apt-get download) < recursive_needed diff --git a/package-exclude b/package-exclude new file mode 100644 index 0000000..7481154 --- /dev/null +++ b/package-exclude @@ -0,0 +1,4 @@ +apt-utils +db-util +libdb-dev +libdb5\.3.*