Skip to content

Commit

Permalink
Add support for multiple ISOs
Browse files Browse the repository at this point in the history
Large ISOs are split
  • Loading branch information
sharpenedblade committed Nov 8, 2023
1 parent 9a1e89e commit c9d4f0a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: fedora-iso
path: ./_output/*
path: builddir/iso/*.iso

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
_output/*.iso
builddir/iso/*.iso
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
builddir/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# t2linux-fedora-iso
A instalation ISO for Fedora on T2 macs. It uses the kernel patches from the [t2linux](https://t2linux.org) project. Read the [kernel README](https://github.com/t2linux/fedora-kernel/) for more information. Make sure to download the `.iso` or `.iso.0x` file.

Combine the split ISOs with `cat name_of_iso_here.iso.* > full.iso`.

## Disclaimer
This project is not officially provided or supported by the Fedora Project. The official Fedora software is available at [https://fedoraproject.org/](https://fedoraproject.org/). This project is not related to Fedora in any way.
41 changes: 27 additions & 14 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
#!/usr/bin/bash
set -e

cd /repo/fedora-kickstarts
cp -rfv /repo/*.ks .
sudo ksflatten -c t2linux-fedora-workstation-live.ks -o flat.ks
kickstarts=( "fedora-live-workstation" )

livemedia-creator \
--ks flat.ks \
--no-virt \
--resultdir /var/lmc \
--project Fedora-Workstation-Live-t2linux \
--make-iso \
--volid Fedora-WS-Live-t2-39-0.1.5 \
--iso-only \
--iso-name Fedora-Workstation-Live-t2linux-x86_64-39-0.1.5.iso \
--releasever 39
mkdir -p /repo/builddir/iso
builddir=$(mktemp -d -p "/repo/builddir"); export builddir
function cleanup {
rm -rf "$builddir"
}
trap cleanup EXIT

mkdir -p _output && mv /var/lmc/*.iso _output/
for ks in "${kickstarts[@]}"; do
ks_builddir="$builddir/$ks"; mkdir -p $ks_builddir; cd "$ks_builddir"
cp -r /repo/fedora-kickstarts/* .; cp -f /repo/*.ks .
echo '%include t2linux-fedora-common.ks' >> "$ks.ks"
sudo ksflatten --config "$ks.ks" --output "$ks-flat.ks" --version F39
livemedia-creator \
--make-iso \
--iso-only \
--no-virt \
--resultdir results \
--releasever 39 \
--ks "$ks-flat.ks" \
--project t2linux-Fedora-Live \
--volid t2linux-Fedora-Live-39 \
--iso-name "t2linux-$ks-39.iso"
find results/*.iso -size +2G -exec sh -c "split -b 1999M -x {} {}. && rm {}" \;
mv results/* /repo/builddir/iso/
done
cleanup
2 changes: 0 additions & 2 deletions t2linux-fedora-workstation-live.ks

This file was deleted.

0 comments on commit c9d4f0a

Please sign in to comment.