diff --git a/.gitignore b/.gitignore index 1a2b1bb..35c273a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,8 @@ /mkosi.extra/usr/lib/systemd/system/kde-linux-sysupdated.service /mkosi.extra/usr/lib/systemd/system/kde-linux-sysupdated.socket +/mkosi.output/ + mkosi.local.conf kde-linux_* diff --git a/build.sh b/build.sh index cb9a715..100e5eb 100755 --- a/build.sh +++ b/build.sh @@ -34,7 +34,7 @@ make_debug_archive () { EPOCH=$(date --utc +%s) # The epoch (only used to then construct the various date strings) VERSION_DATE=$(date --utc --date="@$EPOCH" --rfc-3339=seconds) VERSION=$(date --utc --date="@$EPOCH" +%Y%m%d%H%M) -OUTPUT=kde-linux_$VERSION # Built rootfs path (mkosi uses this directory by default) +OUTPUT="mkosi.output/kde-linux_$VERSION" # Built rootfs path (mkosi uses this directory by default) # Canonicalize the path in $OUTPUT to avoid any possible path issues. OUTPUT="$(readlink --canonicalize-missing "$OUTPUT")" @@ -107,7 +107,6 @@ mkosi \ --environment="CI_PIPELINE_URL=${CI_PIPELINE_URL:-https://invent.kde.org}" \ --environment="VERSION_DATE=${VERSION_DATE}" \ --image-version="$VERSION" \ - --output-directory=. \ "$@" # Adjust mtime to reduce unnecessary churn between images caused by us rebuilding repos that have possible not changed in source or binary interfaces. @@ -178,7 +177,7 @@ touch "$IMG" systemd-repart --no-pager --empty=allow --size=auto --dry-run=no --root=kde-linux.cache --definitions=mkosi.repart "$IMG" ./basic-test.py "$IMG" "$EFI_BASE.efi" || exit 1 -rm ./*.test.raw +rm ./mkosi.output/*.test.raw # Create a torrent for the image ./torrent-create.rb "$VERSION" "$OUTPUT" "$IMG" @@ -197,5 +196,5 @@ zstd --threads=0 --rm ${OUTPUT}_root-x86-64.tar # TODO before accepting new uploads perform sanity checks on the artifacts (e.g. the tar being well formed) # efi images and torrents are 700, make them readable so the server can serve them -chmod go+r "$OUTPUT".* ./*.efi ./*.torrent +chmod go+r "$OUTPUT".* ./mkosi.output/*.efi ./mkosi.output/*.torrent ls -lah diff --git a/mkosi.conf b/mkosi.conf index 705d60e..37c1d71 100644 --- a/mkosi.conf +++ b/mkosi.conf @@ -9,6 +9,7 @@ Mirror=https://mirror.23m.com/archlinux/ ImageId=kde-linux Format=directory SplitArtifacts=yes +OutputDirectory=mkosi.output [Content] # We do not want an initrd or any other boot artifacts, we generate all this stuff ourselves since we need more