1
0
Fork 0
mirror of https://github.com/JasonN3/build-container-installer.git synced 2025-12-25 10:57:55 +01:00

add flatpaks

This commit is contained in:
Jason N. 2024-03-04 15:16:59 -05:00
parent 88d7731848
commit 90edae91c1
5 changed files with 32 additions and 3 deletions

View file

@ -15,6 +15,7 @@ env:
IMAGE_REPO: 'quay.io/fedora-ostree-desktops' IMAGE_REPO: 'quay.io/fedora-ostree-desktops'
VERSION: '39' VERSION: '39'
VARIANT: 'Server' VARIANT: 'Server'
FLATPAK_REFS: app/org.videolan.VLC/x86_64/stable
jobs: jobs:
build-container: build-container:
@ -88,6 +89,7 @@ jobs:
version: ${{ env.VERSION }} version: ${{ env.VERSION }}
variant: ${{ env.VARIANT }} variant: ${{ env.VARIANT }}
action_version: ${{ steps.meta.outputs.tags || 'latest' }} action_version: ${{ steps.meta.outputs.tags || 'latest' }}
flatpak_remote_refs: ${{ env.FLATPAK_REFS }}
- name: Rename ISO - name: Rename ISO
run: | run: |

4
.gitmodules vendored Normal file
View file

@ -0,0 +1,4 @@
[submodule "external/fedora-lorax-templates"]
path = external/fedora-lorax-templates
url = https://pagure.io/fedora-lorax-templates.git
branch = f39

View file

@ -9,6 +9,10 @@ VARIANT = Server
WEB_UI = false WEB_UI = false
REPOS = /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo REPOS = /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-updates.repo
ADDITIONAL_TEMPLATES = "" ADDITIONAL_TEMPLATES = ""
FLATPAK_REMOTE_NAME = flathub
FLATPAK_REMOTE_URL = https://dl.flathub.org/repo/
FLATPAK_REMOTE_REFS =
ROOTFS_SIZE = 4 ROOTFS_SIZE = 4
# Generated vars # Generated vars
@ -19,6 +23,8 @@ _IMAGE_REPO_DOUBLE_ESCAPED = $(subst \,\\\,$(_IMAGE_REPO_ESCAPED))
_VOLID = $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG) _VOLID = $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(IMAGE_TAG)
_REPO_FILES = $(subst /etc/yum.repos.d,repos,$(REPOS)) _REPO_FILES = $(subst /etc/yum.repos.d,repos,$(REPOS))
_LORAX_TEMPLATES = $(subst .in,,$(shell ls lorax_templates/*.tmpl.in)) _LORAX_TEMPLATES = $(subst .in,,$(shell ls lorax_templates/*.tmpl.in))
_FLATPAK_TEMPLATES = $(_BASE_DIR)/external/fedora-lorax-templates/ostree-based-installer/lorax-embed-flatpaks.tmpl
_TEMPLATE_VARS = FLATPAK_REMOTE_NAME FLATPAK_REMOTE_URL FLATPAK_REMOTE_REFS
ifeq ($(VARIANT),Server) ifeq ($(VARIANT),Server)
_LORAX_ARGS = --macboot --noupgrade _LORAX_ARGS = --macboot --noupgrade
@ -42,7 +48,6 @@ lorax_templates/%.tmpl: lorax_templates/%.tmpl.in
$(eval _VARS = IMAGE_NAME IMAGE_TAG _IMAGE_REPO_DOUBLE_ESCAPED) $(eval _VARS = IMAGE_NAME IMAGE_TAG _IMAGE_REPO_DOUBLE_ESCAPED)
$(foreach var,$(_VARS),$(var)=$($(var))) envsubst '$(foreach var,$(_VARS),$$$(var))' < $(_BASE_DIR)/lorax_templates/$*.tmpl.in > $(_BASE_DIR)/lorax_templates/$*.tmpl $(foreach var,$(_VARS),$(var)=$($(var))) envsubst '$(foreach var,$(_VARS),$$$(var))' < $(_BASE_DIR)/lorax_templates/$*.tmpl.in > $(_BASE_DIR)/lorax_templates/$*.tmpl
# Step 2: Replace vars in repo files # Step 2: Replace vars in repo files
repos/%.repo: /etc/yum.repos.d/%.repo repos/%.repo: /etc/yum.repos.d/%.repo
mkdir repos || true mkdir repos || true
@ -63,7 +68,9 @@ boot.iso: $(_LORAX_TEMPLATES) $(_REPO_FILES)
$(foreach file,$(_REPO_FILES),--repo $(_BASE_DIR)/$(file)) \ $(foreach file,$(_REPO_FILES),--repo $(_BASE_DIR)/$(file)) \
$(foreach file,$(_LORAX_TEMPLATES),--add-template $(_BASE_DIR)/$(file)) \ $(foreach file,$(_LORAX_TEMPLATES),--add-template $(_BASE_DIR)/$(file)) \
$(foreach file,$(ADDITIONAL_TEMPLATES),--add-template $(file)) \ $(foreach file,$(ADDITIONAL_TEMPLATES),--add-template $(file)) \
$(foreach file,$(_FLATPAK_TEMPLATES),--add-template $(file)) \
--rootfs-size $(ROOTFS_SIZE) \ --rootfs-size $(ROOTFS_SIZE) \
$(foreach var,$(_TEMPLATE_VARS),--add-template-var "$(var)=$($(var))") \
$(_BASE_DIR)/results/ $(_BASE_DIR)/results/
mv $(_BASE_DIR)/results/images/boot.iso $(_BASE_DIR)/ mv $(_BASE_DIR)/results/images/boot.iso $(_BASE_DIR)/

View file

@ -34,8 +34,20 @@ inputs:
required: true required: true
default: "latest" default: "latest"
additional_templates: additional_templates:
description: Space delimetered list of additional Lorax templates to include description: Space delimited list of additional Lorax templates to include
required: false required: false
flatpak_remote_name:
description: Name of the Flatpak remote repo
required: false
default: "flathub"
flatpak_remote_url:
description: The URL of the Flatpak remote repo
required: false
default: https://dl.flathub.org/repo/
flatpak_remote_refs:
description: Space delimited list of refs to the flatpak packages to install
required: false
default: ""
runs: runs:
using: composite using: composite
@ -51,5 +63,8 @@ runs:
VERSION=${{ inputs.version }} \ VERSION=${{ inputs.version }} \
IMAGE_TAG=${{ inputs.image_tag || inputs.version }} \ IMAGE_TAG=${{ inputs.image_tag || inputs.version }} \
WEB_UI=${{ inputs.web_ui }} \ WEB_UI=${{ inputs.web_ui }} \
"ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}" "ADDITIONAL_TEMPLATES=${{ inputs.additional_templates }}" \
FLATPAK_REMOTE_NAME=${{ inputs.flatpak_remote_name }} \
FLATPAK_REMOTE_URL=${{ inputs.flatpak_remote_url }} \
FLATPAK_REMOTE_REFS=${{ inputs.flatpak_remote_refs }}

1
external/fedora-lorax-templates vendored Submodule

@ -0,0 +1 @@
Subproject commit cc1155372046baa58f9d2cc27a9e5473bf05a3fb