Skip to content

Commit

Permalink
Attempt to fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpenedblade committed Sep 12, 2024
1 parent d772c09 commit dd003a8
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,35 @@ set -e
profiles=( "Workstation-Live" )

mkdir -p /repo/builddir/iso
builddir=$(mktemp -d); export builddir
function cleanup {
rm -rf "$builddir"
}
trap cleanup EXIT

if [ -e "/sys/fs/selinux/enforce" ]; then
# Disable SELinux enforcement during the build if it's enforcing
selinux_enforcing="$(cat /sys/fs/selinux/enforce)"
if [ "$selinux_enforcing" = "1" ]; then
setenforce 0
fi
fi

for profile in "${profiles[@]}"; do
profile_builddir="$builddir/$profile";
mkdir -p $profile_builddir; cd "$profile_builddir"
/repo/kiwi-build \
--image-type=iso \
--image-profile="$profile" \
--kiwi-description-dir=/repo/ \
--output-dir results
rm -rf /var/kiwi/build; mkdir -p /var/kiwi/{build,tmp}
kiwi-ng \
--color-output \
--temp-dir /var/kiwi/tmp \
--type iso \
--profile Workstation-Live \
system build \
--description /repo \
--target-dir /var/kiwi/build
find \
results/*.iso \
/var/kiwi/build/*.iso \
-size +2G \
-exec sh -c "split -b 1999M -x {} {}. && rm {}" \;
mv results/* /repo/builddir/iso/
mv /var/kiwi/build/* /repo/builddir/iso/
done
cleanup

if [ -e "/sys/fs/selinux/enforce" ]; then
# Re-enable SELinux enforcement now that the build is done
if [ "$selinux_enforcing" = "1" ]; then
setenforce 1
fi
fi

0 comments on commit dd003a8

Please sign in to comment.