From c57120ac525fd76b0321e22fe5a04d0cbc5414b9 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 12 Mar 2025 09:26:08 -0400 Subject: [PATCH] build-sys: Make target dir for install-manifests configurable For the use case of updating Konflux lockfiles we want to be able to easily render the manifests to a tempdir without installing to `/`. Move the install of the build script to the main container build so `install-manifests` only touches manifests. Signed-off-by: Colin Walters --- Containerfile | 2 ++ install-manifests | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Containerfile b/Containerfile index 9e789b3..d8693b5 100644 --- a/Containerfile +++ b/Containerfile @@ -34,6 +34,8 @@ set -xeuo pipefail # Put our manifests into the builder image in the same location they'll be in the # final image. ./install-manifests +# And embed the rebuild script +install -m 0755 -t /usr/libexec ./bootc-base-imagectl # Verify that listing works /usr/libexec/bootc-base-imagectl list >/dev/null # Run the build script in the same way we expect custom images to do, and also diff --git a/install-manifests b/install-manifests index 8c00f99..1290411 100755 --- a/install-manifests +++ b/install-manifests @@ -2,7 +2,7 @@ set -xeuo pipefail # This script copies the manifests from the current directory # into their installed location. -manifestdir=/usr/share/doc/bootc-base-imagectl/manifests +manifestdir=${1:-/usr/share/doc/bootc-base-imagectl/manifests} mkdir -p "$manifestdir/" for image in minimal standard tier-x; do # Embed the generic defaults @@ -14,5 +14,3 @@ done ln -s fedora-standard.yaml $manifestdir/default.yaml # And install dependency manifests cp -a fedora-includes $manifestdir -# And embed the rebuild script -install -m 0755 -t /usr/libexec ./bootc-base-imagectl