@@ -17,13 +17,12 @@ ARG NVIDIA_AKMODS_DIGEST=""
1717
1818# Stage 1: Clone ublue-os/main and merge packages
1919FROM alpine/git AS buildctx
20- ARG UBLUE_MAIN_VERSION="main"
21-
2220RUN apk add --no-cache yq jq
2321
2422RUN <<EOF
25- echo "Cloning ublue-os/main repo (branch: $UBLUE_MAIN_VERSION)..."
26- git clone --depth=1 --branch "${UBLUE_MAIN_VERSION}" \
23+ git_branch="main"
24+ echo "Cloning ublue-os/main repo (branch: $git_branch)..."
25+ git clone --depth=1 --branch "${git_branch}" \
2726 https://github.com/ublue-os/main.git ./ublue-os
2827 mv ublue-os/sys_files /
2928 mv ublue-os/build_files/* /
@@ -36,23 +35,15 @@ RUN <<EOF
3635 set -ex
3736 echo "Merging ublue packages with custom packages..."
3837
39- # Extract ublue packages for "all" and "silverblue" sections
40- UBLUE_ALL=$(jq -r '.all.include.all[]' /ublue-packages.json)
41- UBLUE_SILVERBLUE=$(jq -r '.all.include.silverblue[]' /ublue-packages.json)
42-
4338 # Convert your YAML packages to JSON array
44- YOUR_PACKAGES=$(yq -o=json '.packages' /packages.yml)
45-
46- # Merge all three lists, deduplicate and sort
47- jq -n \
48- --arg ublue_all "$UBLUE_ALL" \
49- --arg ublue_sb "$UBLUE_SILVERBLUE" \
50- --argjson yours "$YOUR_PACKAGES" \
51- '{"packages": (($ublue_all | split("\n ")) + ($ublue_sb | split("\n ")) + $yours | unique | sort)}' \
52- > /packages.json
53-
54- echo "Final package list ($(jq -r '.packages | length' /packages.json) packages):"
55- jq -r '.packages[]' /packages.json
39+ yq -o=json /packages.yml > /additional-packages.json
40+
41+ jq --slurpfile pkgs /additional-packages.json \
42+ '.all.include.silverblue += $pkgs[0].packages' \
43+ /ublue-packages.json > /packages.json
44+
45+ echo "also installing user packages"
46+ jq -r '.all.include.silverblue' </packages.json
5647EOF
5748
5849# Stage 2: Get kernel modules from ublue-os
@@ -82,16 +73,19 @@ set -ouex pipefail
8273rm -f /usr/bin/chsh /usr/bin/lchsh
8374
8475echo "Running ublue-os build scripts..."
85-
8676/ctx/install.sh
8777
8878AKMODNV_PATH=/tmp/akmods-nv-rpms /ctx/nvidia-install.sh
8979
9080/ctx/initramfs.sh
9181/ctx/post-install.sh
92-
9382EOF
9483
9584# Validate the image
9685RUN ["bootc" , "container" , "lint" ]
9786
87+ # RUN rpm-ostree override remove firefox firefox-langpacks
88+ # RUN rpm-ostree cleanup -m
89+ #
90+ # RUN sed -i "s|^NAME=.*|NAME=nxtcoder17 edition silverblue ${FEDORA_VERSION}|" /usr/lib/os-release
91+ # RUN sed -i "s|^PRETTY_NAME=.*|PRETTY_NAME=nxtcoder17 edition silverblue ${FEDORA_VERSION}|" /usr/lib/os-release
0 commit comments