Skip to content

Commit

Permalink
Merge pull request #1032 from Vogtinator/mkosi
Browse files Browse the repository at this point in the history
Some mkosi fixes
  • Loading branch information
mlschroe authored Oct 31, 2024
2 parents 3b199b1 + b043310 commit a7b9e3c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions build-recipe-mkosi
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ recipe_build_mkosi() {
local image_version=""
if [ -n "$RELEASE" ]; then
image_version="--image-version=${RELEASE}"
else
# Provide some fallback value for %v specifiers
image_version="--image-version=0"
fi
set -- mkosi \
--directory "$TOPDIR/SOURCES" \
Expand Down Expand Up @@ -121,10 +124,6 @@ recipe_build_mkosi() {
rmdir "$d"
done

# copy recipe source file so that it can be published
cp "$BUILD_ROOT/$TOPDIR/SOURCES/$RECIPEFILE" \
"$BUILD_ROOT/$TOPDIR/OTHER/"

# if present, compress the manifest file(s) which can be quite large
for f in "$BUILD_ROOT/$TOPDIR"/OTHER/*.manifest; do
if [ ! -f "$f" ]; then
Expand All @@ -133,6 +132,16 @@ recipe_build_mkosi() {
gzip -9 -f "$f"
done

cat <<-EOF > "$BUILD_ROOT/checksum.sh"
echo "Create sha256 files..."
cd "/$TOPDIR"/OTHER
for f in *; do
[ -f "\$f" ] || continue
/usr/bin/sha256sum "\$f" > "\$f.sha256"
done
EOF
chroot "$BUILD_ROOT" sh /checksum.sh

# shellcheck disable=SC2034
BUILD_SUCCEEDED=true
}
Expand Down

0 comments on commit a7b9e3c

Please sign in to comment.