Skip to content

Commit

Permalink
Update stacker binary used for build from v1.0.0-rc4 to v1.0.0-rc5
Browse files Browse the repository at this point in the history
stacker  < v1.0.0-rc5 imports into /stacker
stacker >= v1.0.0-rc5 imports into /stacker/imports

Bump the used stacker version and adjust the imports.
  • Loading branch information
Scott Moser authored and smoser committed Sep 13, 2023
1 parent bc60c5d commit e90f6b5
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sudo apt-get install ovmf pip squashfuse
sudo pip install virt-firmware
sudo wget --progress=dot:mega -O /usr/bin/stacker \
https://github.com/project-stacker/stacker/releases/download/v1.0.0-rc4/stacker
https://github.com/project-stacker/stacker/releases/download/v1.0.0-rc5/stacker
sudo chmod 755 /usr/bin/stacker
which stacker
stacker --version
Expand Down
2 changes: 1 addition & 1 deletion go/stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildenv-pkg:
target="/usr/lib"
fail() { echo "$@" 1>&2; exit 1; }
tarball=$(echo /stacker/go*.tar.gz)
tarball=$(echo /stacker/imports/go*.tar.gz)
[ -f "$tarball" ] || fail "$tarball: not a file"
bn=${tarball##*/}
version=$(echo "$bn" | sed 's,go\([0-9.]*\)[.].*,\1,')
Expand Down
2 changes: 1 addition & 1 deletion layers/bootkit/stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ bootkit-assemble:
trap "rm -Rf $d" EXIT
mkdir "$d/bootkit"
for f in /stacker/*.tar; do
for f in /stacker/imports/*.tar; do
tar -C "$d/bootkit" -xf "$f"
done
Expand Down
9 changes: 5 additions & 4 deletions layers/build-krd/stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,17 @@ build-krd:
- dracut/
run: |
importd=/stacker/imports
for bin in build-initrd create-cpio; do
t=$workd/usr/bin/$bin
cp -v /stacker/$bin "$t"
cp -v $importd/$bin "$t"
chmod 755 "$t"
done
( cd /stacker && cp -v build-initrd create-cpio /usr/local/bin )
( cd $importd && cp -v build-initrd create-cpio /usr/local/bin )
cp /stacker/dracut/bootkit.conf /etc/dracut.conf.d/dracut-atom.conf
for d in /stacker/dracut/*; do
cp $importd/dracut/bootkit.conf /etc/dracut.conf.d/dracut-atom.conf
for d in $importd/dracut/*; do
[ -d "$d" -a -e "$d/module-setup.sh" ] || continue
base=${d##*/}
tdir="/usr/lib/dracut/modules.d/91${base}"
Expand Down
16 changes: 9 additions & 7 deletions layers/custom/custom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ customized:
d=$(mktemp -d)
trap "rm -Rf $d" EXIT
cp /stacker/custbk /usr/local/bin/custbk
chmod 755 /usr/local/bin/custbk
importd=/stacker/imports
cp $importd/custbk /usr/local/bin/custbk
cp $importd/bkcust /usr/local/bin/bkcust
chmod 755 /usr/local/bin/custbk /usr/local/bin/bkcust
workdir=$d/workd
bkdir="/stacker/bootkit"
Expand All @@ -60,7 +62,7 @@ customized:
### ovmf
cp "$bkdir/ovmf/ovmf-code.fd" "$outdir/ovmf-code.fd"
/stacker/bkcust virtfw secure-boot \
bkcust virtfw secure-boot \
--output=$outdir/ovmf-vars.fd \
"--platform=$keydir/uefi-pk" \
"--kek=$keydir/uefi-kek" \
Expand All @@ -78,13 +80,13 @@ customized:
# "--no-microsoft"
### shim
/stacker/bkcust shim set-db \
bkcust shim set-db \
--output="$outdir/shim.efi" \
"$bkdir/shim/shim.efi" \
"$keydir/uki-limited" \
"$keydir/uki-production" \
"$keydir/uki-tpm"
/stacker/bkcust sign-efi "$outdir/shim.efi" \
bkcust sign-efi "$outdir/shim.efi" \
"$keydir/uefi-db/cert.pem" "$keydir/uefi-db/privkey.pem"
## shim custbk (shell) commands.
Expand Down Expand Up @@ -114,11 +116,11 @@ customized:
rm -Rf "$ixdir"
### uki / smoosh
/stacker/bkcust stubby smoosh --cmdline="" \
bkcust stubby smoosh --cmdline="" \
"$outdir/kernel.efi" "$bkdir/stubby/stubby.efi" \
"$bkdir/kernel/boot/vmlinuz" \
"$workdir/initrd.img"
/stacker/bkcust sign-efi "$outdir/kernel.efi" \
bkcust sign-efi "$outdir/kernel.efi" \
"$keydir/uki-production/cert.pem" "$keydir/uki-production/privkey.pem"
## uki custbk (shell) commands
Expand Down
3 changes: 2 additions & 1 deletion layers/minbase/stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ minbase:
deb [by-hash=force] $mirror ${rel}-security main universe
EOF
cp /stacker/pkgtool /usr/local/bin
cp /stacker/imports/pkgtool /usr/local/bin
chmod 755 /usr/local/bin/pkgtool
pkgtool upgrade
pkgtool install ca-certificates
2 changes: 1 addition & 1 deletion layers/mos/stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mos-build:
mkdir "$workd"
mkdir -p "$workd/etc/"
cp /stacker/zot-config.json "$workd/etc/"
cp /stacker/imports/zot-config.json "$workd/etc/"
mkdir -p "$workd/usr/bin"
Expand Down
2 changes: 1 addition & 1 deletion layers/shim/stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ shim-build-env:
wget gcc make bzip2 efitools
mkdir /build
tar -C /build -xf /stacker/shim-*.tar*
tar -C /build -xf /stacker/imports/shim-*.tar*
shim-build:
build_only: true
Expand Down
2 changes: 1 addition & 1 deletion layers/stubby/stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ stubby-build:
- "https://github.com/puzzleos/stubby/archive/refs/tags/v1.0.1.tar.gz"
run: |
#!/bin/bash -ex
tarball=$(echo /stacker/v*.tar.gz)
tarball=$(echo /stacker/imports/v*.tar.gz)
[ -f "$tarball" ] || { echo "no stubby tarball found in /stacker"; exit 1; }
tar -xvf "$tarball"
# expecting tarball named 'vX.Y.Z.tar.gz', so strip suffix and leading 'v' to get version.
Expand Down

0 comments on commit e90f6b5

Please sign in to comment.