Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some mkosi fixes #1032

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading