mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
Merge branch 'main' into bootc
This commit is contained in:
commit
2d5006293e
5 changed files with 30 additions and 17 deletions
6
.github/workflows/build-and-test.yml
vendored
6
.github/workflows/build-and-test.yml
vendored
|
|
@ -20,7 +20,7 @@ env:
|
||||||
IMAGE_REPO: 'quay.io/fedora-ostree-desktops'
|
IMAGE_REPO: 'quay.io/fedora-ostree-desktops'
|
||||||
IMAGE_TAG: '39'
|
IMAGE_TAG: '39'
|
||||||
VARIANT: 'Server'
|
VARIANT: 'Server'
|
||||||
FLATPAK_REMOTE_REFS_DIR: flatpak_refs
|
FLATPAK_REMOTE_REFS_DIR: /github/workspace/flatpak_refs
|
||||||
SECURE_BOOT_KEY_URL: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
|
SECURE_BOOT_KEY_URL: 'https://github.com/ublue-os/akmods/raw/main/certs/public_key.der'
|
||||||
ENROLLMENT_PASSWORD: 'container-installer'
|
ENROLLMENT_PASSWORD: 'container-installer'
|
||||||
|
|
||||||
|
|
@ -105,7 +105,7 @@ jobs:
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
|
|
||||||
- name: Build ISO with new container
|
- name: Build ISO
|
||||||
uses: ./
|
uses: ./
|
||||||
id: build
|
id: build
|
||||||
with:
|
with:
|
||||||
|
|
@ -115,7 +115,7 @@ jobs:
|
||||||
image_tag: ${{ matrix.version }}
|
image_tag: ${{ matrix.version }}
|
||||||
version: ${{ matrix.version }}
|
version: ${{ matrix.version }}
|
||||||
variant: ${{ env.VARIANT }}
|
variant: ${{ env.VARIANT }}
|
||||||
flatpak_remote_refs: ${{ env.FLATPAK_REMOTE_REFS }}
|
flatpak_remote_refs_dir: ${{ env.FLATPAK_REMOTE_REFS_DIR }}
|
||||||
secure_boot_key_url: ${{ env.SECURE_BOOT_KEY_URL }}
|
secure_boot_key_url: ${{ env.SECURE_BOOT_KEY_URL }}
|
||||||
enrollment_password: ${{ env.ENROLLMENT_PASSWORD }}
|
enrollment_password: ${{ env.ENROLLMENT_PASSWORD }}
|
||||||
iso_name: ${{ env.IMAGE_NAME }}-${{ matrix.version }}-${{ matrix.version }}.iso
|
iso_name: ${{ env.IMAGE_NAME }}-${{ matrix.version }}-${{ matrix.version }}.iso
|
||||||
|
|
|
||||||
14
Makefile
14
Makefile
|
|
@ -135,9 +135,10 @@ build/deploy.iso: boot.iso container/$(IMAGE_NAME)-$(IMAGE_TAG) xorriso/input.t
|
||||||
xorriso -dialog on < $(_BASE_DIR)/xorriso/input.txt
|
xorriso -dialog on < $(_BASE_DIR)/xorriso/input.txt
|
||||||
implantisomd5 build/deploy.iso
|
implantisomd5 build/deploy.iso
|
||||||
|
|
||||||
lorax_repo:
|
external/lorax/branch-$(VERSION):
|
||||||
git config advice.detachedHead false
|
git config advice.detachedHead false
|
||||||
cd external/lorax && git checkout tags/$(shell cd external/lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | tail -n 1)
|
cd external/lorax && git reset --hard HEAD && git checkout tags/$(shell cd external/lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | tail -n 1)
|
||||||
|
touch external/lorax/branch-$(VERSION)
|
||||||
|
|
||||||
# Step 1: Generate Lorax Templates
|
# Step 1: Generate Lorax Templates
|
||||||
lorax_templates/post_%.tmpl: lorax_templates/scripts/post/%
|
lorax_templates/post_%.tmpl: lorax_templates/scripts/post/%
|
||||||
|
|
@ -156,13 +157,8 @@ repos/%.repo: /etc/yum.repos.d/%.repo
|
||||||
sed -i "s/\$$releasever/${VERSION}/g" $(_BASE_DIR)/repos/$*.repo
|
sed -i "s/\$$releasever/${VERSION}/g" $(_BASE_DIR)/repos/$*.repo
|
||||||
sed -i "s/\$$basearch/${ARCH}/g" $(_BASE_DIR)/repos/$*.repo
|
sed -i "s/\$$basearch/${ARCH}/g" $(_BASE_DIR)/repos/$*.repo
|
||||||
|
|
||||||
# Don't do anything for custom repos
|
|
||||||
%.repo:
|
|
||||||
|
|
||||||
flatpak_list:
|
|
||||||
|
|
||||||
# Step 3: Build boot.iso using Lorax
|
# Step 3: Build boot.iso using Lorax
|
||||||
boot.iso: lorax_repo $(filter lorax_templates/%,$(_LORAX_TEMPLATES)) $(_REPO_FILES)
|
boot.iso: external/lorax/branch-$(VERSION) $(filter lorax_templates/%,$(_LORAX_TEMPLATES)) $(_REPO_FILES)
|
||||||
rm -Rf $(_BASE_DIR)/results || true
|
rm -Rf $(_BASE_DIR)/results || true
|
||||||
mv /etc/rpm/macros.image-language-conf $(_TEMP_DIR)/macros.image-language-conf || true
|
mv /etc/rpm/macros.image-language-conf $(_TEMP_DIR)/macros.image-language-conf || true
|
||||||
|
|
||||||
|
|
@ -260,4 +256,4 @@ test-vm:
|
||||||
chmod +x $(foreach test,$(_TESTS),tests/vm/$(test))
|
chmod +x $(foreach test,$(_TESTS),tests/vm/$(test))
|
||||||
for test in $(_TESTS); do ./tests/vm/$${test} deploy.iso; done
|
for test in $(_TESTS); do ./tests/vm/$${test} deploy.iso; done
|
||||||
|
|
||||||
.PHONY: clean install-deps test test-iso test-vm lorax_repo flatpak_list
|
.PHONY: clean install-deps test test-iso test-vm
|
||||||
|
|
|
||||||
16
action.yml
16
action.yml
|
|
@ -154,14 +154,26 @@ runs:
|
||||||
then
|
then
|
||||||
cache="${cache} -v /cache/dnf_new:/cache/dnf_new"
|
cache="${cache} -v /cache/dnf_new:/cache/dnf_new"
|
||||||
fi
|
fi
|
||||||
|
vars=""
|
||||||
|
if [[ -n "${{ inputs.flatpak_remote_refs }}" ]] && [[ -n "${{ inputs.flatpak_remote_refs_dir }}" ]]
|
||||||
|
then
|
||||||
|
echo "ERROR: flatpak_remote_refs is mutually exclusive to flatpak_remote_refs_dir"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
if [[ -n "${{ inputs.flatpak_remote_refs }}" ]]
|
||||||
|
then
|
||||||
|
vars="${vars} FLATPAK_REMOTE_REFS=\"${{ inputs.flatpak_remote_refs }}\""
|
||||||
|
else
|
||||||
|
vars="${vars} FLATPAK_REMOTE_REFS_DIR=\"${{ inputs.flatpak_remote_refs_dir }}\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
docker run --privileged --volume ${{ github.workspace }}:/github/workspace/ ${cache} ghcr.io/jasonn3/build-container-installer:${tag} \
|
docker run --privileged --volume ${{ github.workspace }}:/github/workspace/ ${cache} ghcr.io/jasonn3/build-container-installer:${tag} \
|
||||||
ADDITIONAL_TEMPLATES="${{ inputs.additional_templates }}" \
|
ADDITIONAL_TEMPLATES="${{ inputs.additional_templates }}" \
|
||||||
ARCH="${{ inputs.arch }}" \
|
ARCH="${{ inputs.arch }}" \
|
||||||
DNF_CACHE="/cache/dnf" \
|
DNF_CACHE="/cache/dnf" \
|
||||||
ENROLLMENT_PASSWORD="${{ inputs.enrollment_password }}" \
|
ENROLLMENT_PASSWORD="${{ inputs.enrollment_password }}" \
|
||||||
FLATPAK_REMOTE_NAME="${{ inputs.flatpak_remote_name }}" \
|
FLATPAK_REMOTE_NAME="${{ inputs.flatpak_remote_name }}" \
|
||||||
FLATPAK_REMOTE_REFS="${{ inputs.flatpak_remote_refs }}" \
|
${vars} \
|
||||||
FLATPAK_REMOTE_REFS_DIR="${{ inputs.flatpak_remote_refs_dir }}" \
|
|
||||||
FLATPAK_REMOTE_URL="${{ inputs.flatpak_remote_url }}" \
|
FLATPAK_REMOTE_URL="${{ inputs.flatpak_remote_url }}" \
|
||||||
IMAGE_NAME="${{ inputs.image_name }}" \
|
IMAGE_NAME="${{ inputs.image_name }}" \
|
||||||
IMAGE_REPO="${{ inputs.image_repo }}" \
|
IMAGE_REPO="${{ inputs.image_repo }}" \
|
||||||
|
|
|
||||||
5
flatpak_refs/Firefox
Normal file
5
flatpak_refs/Firefox
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
app/org.mozilla.firefox/x86_64/stable
|
||||||
|
|
||||||
|
runtime/org.mozilla.firefox.Locale/x86_64/stable
|
||||||
|
runtime/org.freedesktop.Platform/x86_64/23.08
|
||||||
|
runtime/org.freedesktop.Platform.Locale/x86_64/23.08
|
||||||
|
|
@ -6,6 +6,6 @@ replace "flatpak_manager\.add_remote\(\".*\", \".*\"\)" "flatpak_manager.add_rem
|
||||||
replace "flatpak_manager\.replace_installed_refs_remote\(\".*\"\)" "flatpak_manager.replace_installed_refs_remote(\"${flatpak_remote_name}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py
|
replace "flatpak_manager\.replace_installed_refs_remote\(\".*\"\)" "flatpak_manager.replace_installed_refs_remote(\"${flatpak_remote_name}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py
|
||||||
% endif
|
% endif
|
||||||
|
|
||||||
%if flatpak_remote_name != 'fedora'
|
%if flatpak_remote_name != 'fedora':
|
||||||
systemctl disable flatpak-add-fedora-repos.service
|
systemctl disable flatpak-add-fedora-repos.service
|
||||||
% endif
|
% endif
|
||||||
Loading…
Add table
Add a link
Reference in a new issue