releng/docker/zbm-build.sh: rename to build-init.sh

The in-container `zbm-build.sh` is hard to differentiate from the
`zbm-builder.sh` helper script.
This commit is contained in:
Andrew J. Hesford 2022-11-25 14:14:21 -05:00
parent 667e61aef4
commit 087892c37c
6 changed files with 17 additions and 16 deletions

View File

@ -21,7 +21,7 @@ jobs:
run: |
cp /zbm/etc/zfsbootmenu/dracut.conf.d/*.conf /zbm/etc/zfsbootmenu/release.conf.d/
yq-go e '.Global.DracutConfDir = "/zbm/etc/zfsbootmenu/release.conf.d"' -i /zbm/releng/docker/config.yaml
/zbm/releng/docker/zbm-build.sh -b /zbm/releng/docker -- --debug
/zbm/releng/docker/build-init.sh -b /zbm/releng/docker -- --debug
- name: Archive release EFI
uses: actions/upload-artifact@v3
@ -45,7 +45,7 @@ jobs:
run: |
cp /zbm/etc/zfsbootmenu/dracut.conf.d/*.conf /zbm/etc/zfsbootmenu/recovery.conf.d/
yq-go e '.Global.DracutConfDir = "/zbm/etc/zfsbootmenu/recovery.conf.d"' -i /zbm/releng/docker/config.yaml
/zbm/releng/docker/zbm-build.sh -b /zbm/releng/docker -- --debug
/zbm/releng/docker/build-init.sh -b /zbm/releng/docker -- --debug
- name: Archive recovery EFI
uses: actions/upload-artifact@v3

View File

@ -20,7 +20,8 @@ RUN echo "ignorepkg=linux" > /etc/xbps.d/10-nolinux.conf \
# Install components necessary to build the image
RUN xbps-query -Rp run_depends zfsbootmenu | xargs xbps-install -y
RUN xbps-install -y linux5.10 linux5.10-headers \
zfs gummiboot-efistub curl yq-go bash kbd terminus-font dracut mkinitcpio cryptsetup
zfs gummiboot-efistub curl yq-go bash kbd \
terminus-font dracut mkinitcpio cryptsetup
# Remove headers and massive dkms development toolchain; binutils
# provides objcopy, which is necessary for UEFI bundle creation
@ -32,8 +33,8 @@ RUN xbps-remove -Roy linux5.10-headers dkms && rm -f /var/cache/xbps/*
RUN if [ -n "${ZBM_COMMIT_HASH}" ]; then echo "${ZBM_COMMIT_HASH}" > /etc/zbm-commit-hash; fi
# Copy the build script
COPY zbm-build.sh /zbm-build.sh
COPY build-init.sh /build-init.sh
# Run the build script with no arguments by default
ENTRYPOINT [ "/zbm-build.sh" ]
ENTRYPOINT [ "/build-init.sh" ]
CMD [ ]

View File

@ -30,10 +30,10 @@ discovered, no default will be recorded and containers will attempt to build
from the current `master`.
The `image-build.sh` script expects to be run from the root of the ZFSBootMenu
tree by default. From there, the path `releng/docker/zbm-build.sh` defines the
tree by default. From there, the path `releng/docker/build-init.sh` defines the
entrypoint for build containers. To run the `image-build.sh` script from
another directory, simply set the `ZBM_BUILDER` environment variable to the
location of the `zbm-build.sh` script to use.
location of the `build-init.sh` script to use.
For those without access to `buildah`, the `Dockerfile` will also create of a
ZFSBootMenu builder image. From this directory, simply run
@ -54,10 +54,10 @@ the latest release version packaged for Void; manually editing the `Dockerfile`
to add new dependencies may be necessary until a new release is packaged.
The builder image does **not** contain a ZFSBootMenu installation or a copy of
the upstream git repository. Instead, the entrypoint `/zbm-build.sh` will fetch
a ZFSBootMenu archive when the container is instantiated (or allow a local copy
to be bind-mounted) and, as noted above, attempt to check out a specific commit
based on the contents of `/etc/zbm-commit-hash`.
the upstream git repository. Instead, the entrypoint `/build-init.sh` will
fetch a ZFSBootMenu archive when the container is instantiated (or allow a
local copy to be bind-mounted) and, as noted above, attempt to check out a
specific commit based on the contents of `/etc/zbm-commit-hash`.
# Running a ZFSBootMenu Builder Container

View File

@ -58,7 +58,7 @@ if [ -z "${zbm_commit_hash}" ]; then
fi
if [ -z "${ZBM_BUILDER}" ]; then
ZBM_BUILDER="./releng/docker/zbm-build.sh"
ZBM_BUILDER="./releng/docker/build-init.sh"
fi
if [ ! -r "${ZBM_BUILDER}" ]; then
@ -114,12 +114,12 @@ if [ -n "${zbm_commit_hash}" ]; then
buildah run "${container}" sh -c 'cat > /etc/zbm-commit-hash'
fi
buildah copy "${container}" "${ZBM_BUILDER}" /zbm-build.sh
buildah run "${container}" chmod 755 /zbm-build.sh
buildah copy "${container}" "${ZBM_BUILDER}" /build-init.sh
buildah run "${container}" chmod 755 /build-init.sh
buildah config \
--workingdir / \
--entrypoint '[ "/zbm-build.sh" ]' \
--entrypoint '[ "/build-init.sh" ]' \
--cmd '[ ]' \
"${container}"

View File

@ -73,7 +73,7 @@ for style in release recovery; do
mkdir -p "${buildtmp}/build/dracut.conf.d" || error "cannot create config tree"
# Copy style-specific configuration components in place;
# zbm-build.sh sets up standard configuration elements
# build container sets up standard configuration elements
cp "./etc/zfsbootmenu/${style}.yaml" "${buildtmp}/build/config.yaml"
cp "./etc/zfsbootmenu/${style}.conf.d/"*.conf "${buildtmp}/build/dracut.conf.d"