Skip to content

Commit

Permalink
Merge pull request #62 from Ultramarine-Linux/um41
Browse files Browse the repository at this point in the history
Merge upstream into pi branch
  • Loading branch information
nothingneko authored Nov 21, 2024
2 parents 6603164 + cdc979a commit a59979c
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/build-katsu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,68 @@ jobs:
path: katsu/*.iso
compression-level: 0

tar:
strategy:
fail-fast: false
matrix:
arch:
- x86_64
- aarch64
variant:
- wsl/wsl
runs-on: ${{ matrix.arch == 'x86_64' && 'ubuntu-latest' || 'arm64' }}
container:
image: ghcr.io/terrapkg/builder:f41
# Pass /dev from host to container
# Very hacky, but it works
# Microsoft/Github, if you're reading this,
# I'm sorry.
options: --privileged -v /dev:/dev
steps:
- name: Install dependencies
run: |
dnf up -y
dnf install -y $DNF_PKGS
dnf clean all
- name: Checkout
uses: actions/checkout@v4
- name: sanitize artifact name
run: |
name=$(echo ${{ matrix.variant }} | sed 's/\//-/g')
name=$name-${{ matrix.arch }}
# set github variable
echo artifact=$name >> $GITHUB_ENV
# Get architecture
# e.g. base/base-disk-x86_64 -> x86_64
echo arch=$(echo ${{ matrix.variant }} | cut -d'-' -f3) >> $GITHUB_ENV
- name: ${{ env.KATSU_BUILD_TASK_NAME }}
run: |
rm -rf /etc/rpm/macros.image-language-conf
chcon system_u:object_r:install_exec_t:s0 "$(which katsu)"
pushd katsu
KATSU_LOG=trace katsu -v --output=fs "modules/${{ matrix.variant }}.yaml"
tar -cJf katsu-work/chroot.tar katsu-work/chroot
mv katsu-work/chroot.tar katsu-work/${{ env.artifact }}.tar
# compress tar as zst, output as .tar.zst
# have an exception for WSL, as it doesn't support zstd
if [ "${{ matrix.variant }}" = "wsl/wsl" ]; then
gzip -9 -c katsu-work/${{ env.artifact }}.tar > katsu-work/${{ env.artifact }}.tar.gz
else
zstd -T0 -19 katsu-work/${{ env.artifact }}.tar -o katsu-work/${{ env.artifact }}.tar.zst
fi
popd
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact }}-tar
path: |
katsu/katsu-work/*.tar.zst
katsu/katsu-work/*.tar.gz
compression-level: 0

#### LIVE ISO PUSH ####

push-image:
Expand All @@ -200,6 +262,7 @@ jobs:
needs:
- live-iso
- image
- tar
if: github.event_name != 'pull_request'

steps:
Expand Down Expand Up @@ -250,6 +313,13 @@ jobs:
fi
done
for file in artifacts/*-tar/*; do
# if is file
if [ -f "$file" ]; then
pack_image $file images
fi
done
- name: Upload to R2
run: |
wget https://dl.min.io/client/mc/release/linux-arm64/mc
Expand Down
29 changes: 29 additions & 0 deletions katsu/modules/wsl/wsl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
builder: dnf

dnf:
repodir: ../base/repodir/
releasever: 41
exec: dnf4
options:
- --setopt=cachedir=/var/cache/dnf
- --setopt=keepcache=True
- --setopt=tsflags=
- --setopt=max_parallel_downloads=20
exclude:
- fedora-release*
- generic-release*
- kernel*
- linux-firmware
packages:
- "@core"
- "@ultramarine-product-common"
- filesystem
- setup
- glibc
- glibc-common
- dnf
- git
- rpm
- libgomp
- ultramarine-release-identity-basic
- fedora-repos

0 comments on commit a59979c

Please sign in to comment.