18 lines
666 B
Bash
Executable File
18 lines
666 B
Bash
Executable File
#!/bin/bash
|
|
# This script regenerates this base image using a build
|
|
# configuration (list of packages, scripts) embedded in this current image.
|
|
# The actual *content* packages will come from the source root.
|
|
set -xeuo pipefail
|
|
source_root=$1
|
|
shift
|
|
target=$1
|
|
shift
|
|
if ! test -x /usr/bin/rpm-ostree; then
|
|
dnf -y install rpm-ostree
|
|
fi
|
|
rpm-ostree experimental compose rootfs --source-root-rw=$source_root /usr/lib/sysimage/base-image-manifest/manifest.yaml $target
|
|
# Finally, propagate the configuration and build script into the target root.
|
|
for f in /usr/lib/sysimage/base-image-manifest /usr/libexec/bootc-base-image-rebuild-self; do
|
|
cp -a $f $target/$f
|
|
done
|