mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 02:47:56 +01:00
Compare commits
28 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ab1e18f83 | ||
|
|
c9ef3de332 | ||
|
|
e310904cc7 | ||
|
|
33d0e5a5c2 | ||
|
|
3b090e7c2e | ||
|
|
6810b148ad | ||
|
|
d77e956373 | ||
|
|
91208e0329 | ||
|
|
45fec1fc9d | ||
|
|
d2186329e4 | ||
|
|
46786df344 | ||
|
|
362fea7d5d | ||
|
|
f09a756b7a | ||
|
|
e80a97fbb0 | ||
|
|
312375b2cd | ||
|
|
ec2a9f4e3f | ||
|
|
a1ce6da2d6 | ||
|
|
f9395d5ae1 | ||
|
|
0180c50030 | ||
|
|
237ff3e130 | ||
|
|
f10dd64668 | ||
|
|
54d9614590 | ||
|
|
aa74d32215 | ||
|
|
f98ebd1420 | ||
|
|
776a9a7e98 | ||
|
|
ceccfc98ef | ||
|
|
909d1a1bd8 | ||
|
|
edf9c39029 |
30 changed files with 422 additions and 195 deletions
8
.github/workflows/build_container.yml
vendored
8
.github/workflows/build_container.yml
vendored
|
|
@ -26,7 +26,7 @@ jobs:
|
||||||
statuses: write
|
statuses: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
@ -72,6 +72,7 @@ jobs:
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
|
type=raw,value=${{ github.sha }}
|
||||||
type=semver,pattern=v{{version}}
|
type=semver,pattern=v{{version}}
|
||||||
type=semver,pattern=v{{major}}.{{minor}}
|
type=semver,pattern=v{{major}}.{{minor}}
|
||||||
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
|
type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
|
||||||
|
|
@ -85,6 +86,7 @@ jobs:
|
||||||
ghcr.io/${{ github.repository }}
|
ghcr.io/${{ github.repository }}
|
||||||
tags: |
|
tags: |
|
||||||
pr-${{ inputs.pr }}
|
pr-${{ inputs.pr }}
|
||||||
|
${{ github.sha }}
|
||||||
|
|
||||||
- name: Buildah Build
|
- name: Buildah Build
|
||||||
id: build-image
|
id: build-image
|
||||||
|
|
@ -95,7 +97,7 @@ jobs:
|
||||||
labels: ${{ steps.meta.outputs.labels || steps.meta_pr.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels || steps.meta_pr.outputs.labels }}
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v2.1.0
|
uses: docker/login-action@v3.6.0
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
|
|
@ -121,7 +123,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install Cosign
|
- name: Install Cosign
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
uses: sigstore/cosign-installer@v3.5.0
|
uses: sigstore/cosign-installer@v3.10.0
|
||||||
|
|
||||||
- name: Sign the images
|
- name: Sign the images
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
|
|
||||||
8
.github/workflows/build_iso.yml
vendored
8
.github/workflows/build_iso.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }}
|
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ jobs:
|
||||||
id: jobs
|
id: jobs
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})"
|
||||||
per_page: 100
|
per_page: 100
|
||||||
|
|
||||||
- name: Set status
|
- name: Set status
|
||||||
|
|
@ -62,7 +62,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
status: pending
|
status: pending
|
||||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})"
|
||||||
sha: ${{ env.sha }}
|
sha: ${{ env.sha }}
|
||||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||||
|
|
||||||
|
|
@ -138,7 +138,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})"
|
||||||
sha: ${{ env.sha }}
|
sha: ${{ env.sha }}
|
||||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||||
|
|
||||||
|
|
|
||||||
54
.github/workflows/build_vars.yml
vendored
54
.github/workflows/build_vars.yml
vendored
|
|
@ -9,40 +9,54 @@ on:
|
||||||
value: '
|
value: '
|
||||||
{
|
{
|
||||||
"version": [
|
"version": [
|
||||||
"39",
|
"41",
|
||||||
"40",
|
"42",
|
||||||
],
|
"43"
|
||||||
|
],
|
||||||
"flatpaks": [
|
"flatpaks": [
|
||||||
"false",
|
"false",
|
||||||
"flatpak_dir",
|
"flatpak_refs_dir",
|
||||||
"flatpak_refs"
|
"flatpak_refs"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"image_repo": [
|
||||||
{
|
"ghcr.io/ublue-os",
|
||||||
"version": "40",
|
"quay.io/fedora",
|
||||||
"flatpaks": "flatpak_dir"
|
"quay.io/fedora-ostree-desktops"
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "40",
|
|
||||||
"flatpaks": "flatpak_refs"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"include": [
|
"include": [
|
||||||
{
|
{
|
||||||
"version": "39",
|
"image_repo": "ghcr.io/ublue-os",
|
||||||
"image_repo": "quay.io/fedora-ostree-desktops",
|
"image_name": "base-main",
|
||||||
"image_name": "base"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "40",
|
|
||||||
"image_repo": "quay.io/fedora",
|
"image_repo": "quay.io/fedora",
|
||||||
"image_name": "fedora-bootc"
|
"image_name": "fedora-bootc"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "38",
|
"image_repo": "quay.io/fedora-ostree-desktops",
|
||||||
|
"image_name": "base-atomic"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
{
|
||||||
"image_repo": "quay.io/fedora",
|
"image_repo": "quay.io/fedora",
|
||||||
"image_name": "fedora-bootc",
|
"flatpaks": "flatpak_refs_dir"
|
||||||
"image_src": "docker://quay.io/fedora-ostree-desktops/base:39"
|
},
|
||||||
|
{
|
||||||
|
"image_repo": "quay.io/fedora",
|
||||||
|
"flatpaks": "flatpak_refs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"image_repo": "quay.io/fedora-ostree-desktops",
|
||||||
|
"flatpaks": "flatpak_refs_dir"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"image_repo": "quay.io/fedora-ostree-desktops",
|
||||||
|
"flatpaks": "flatpak_refs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"image_repo": "ghcr.io/ublue-os",
|
||||||
|
"version": "43"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}'
|
}'
|
||||||
|
|
|
||||||
6
.github/workflows/clean_repo.yml
vendored
6
.github/workflows/clean_repo.yml
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
name: Clean Container Registry
|
name: Clean Container Registry
|
||||||
on:
|
on:
|
||||||
schedule:
|
# schedule:
|
||||||
- cron: '0 21 * * 0'
|
# - cron: '0 21 * * 0'
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Delete Untagged Packages
|
- name: Delete Untagged Packages
|
||||||
uses: Chizkiyahu/delete-untagged-ghcr-action@v4
|
uses: Chizkiyahu/delete-untagged-ghcr-action@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.PACKAGE_DELETER }}
|
token: ${{ secrets.PACKAGE_DELETER }}
|
||||||
repository_owner: ${{ github.repository_owner }}
|
repository_owner: ${{ github.repository_owner }}
|
||||||
|
|
|
||||||
8
.github/workflows/test_deployment.yml
vendored
8
.github/workflows/test_deployment.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }}
|
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
|
@ -52,7 +52,7 @@ jobs:
|
||||||
id: jobs
|
id: jobs
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})"
|
||||||
per_page: 100
|
per_page: 100
|
||||||
|
|
||||||
- name: Set status
|
- name: Set status
|
||||||
|
|
@ -61,7 +61,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
status: pending
|
status: pending
|
||||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})"
|
||||||
sha: ${{ env.sha }}
|
sha: ${{ env.sha }}
|
||||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||||
|
|
||||||
|
|
@ -107,6 +107,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})"
|
||||||
sha: ${{ env.sha }}
|
sha: ${{ env.sha }}
|
||||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||||
|
|
|
||||||
10
.github/workflows/test_iso.yml
vendored
10
.github/workflows/test_iso.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }}
|
matrix: ${{ fromJson(needs.load_vars.outputs.BUILD_MATRIX) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
|
@ -52,7 +52,7 @@ jobs:
|
||||||
id: jobs
|
id: jobs
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
job_name: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})"
|
||||||
per_page: 100
|
per_page: 100
|
||||||
|
|
||||||
- name: Set status
|
- name: Set status
|
||||||
|
|
@ -61,7 +61,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
status: pending
|
status: pending
|
||||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})"
|
||||||
sha: ${{ env.sha }}
|
sha: ${{ env.sha }}
|
||||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||||
|
|
||||||
|
|
@ -98,6 +98,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }})"
|
context: "${{ inputs.parent_job_name }} / ${{ env.JOB_NAME }} (${{ matrix.version }}, ${{ matrix.flatpaks }}, ${{ matrix.image_repo }})"
|
||||||
sha: ${{ env.sha }}
|
sha: ${{ env.sha }}
|
||||||
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
targetUrl: ${{ steps.jobs.outputs.html_url }}
|
||||||
|
|
|
||||||
2
.github/workflows/test_repo.yml
vendored
2
.github/workflows/test_repo.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Run test
|
- name: Run test
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
50
.github/workflows/update_wiki.yml
vendored
Normal file
50
.github/workflows/update_wiki.yml
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
name: Update Wiki
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'docs/**'
|
||||||
|
- '.github/workflows/update_wiki.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-wiki:
|
||||||
|
name: Update Wiki
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Install packages
|
||||||
|
run: |
|
||||||
|
sudo apt install -y make rsync
|
||||||
|
# Checkout Main Repo
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
|
# Checkout Wiki Repo
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
repository: ${{github.repository}}.wiki
|
||||||
|
persist-credentials: true
|
||||||
|
path: wiki
|
||||||
|
ref: master
|
||||||
|
|
||||||
|
# Generate final files
|
||||||
|
- name: Generate Files
|
||||||
|
run: |
|
||||||
|
cd ${GITHUB_WORKSPACE}/docs
|
||||||
|
make
|
||||||
|
|
||||||
|
# Copy Docs
|
||||||
|
- name: Copy files
|
||||||
|
run: |
|
||||||
|
rsync -av --exclude='.git/*' ${GITHUB_WORKSPACE}/docs/ ${GITHUB_WORKSPACE}/wiki/
|
||||||
|
|
||||||
|
# Push Changes
|
||||||
|
- name: Push changes
|
||||||
|
run: |
|
||||||
|
cd ${GITHUB_WORKSPACE}/wiki/
|
||||||
|
git config --local user.email "action@github.com"
|
||||||
|
git config --local user.name "GitHub Action"
|
||||||
|
git add .
|
||||||
|
git commit -m "Add changes"
|
||||||
|
git push
|
||||||
2
.gitmodules
vendored
2
.gitmodules
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
[submodule "external/fedora-lorax-templates"]
|
[submodule "external/fedora-lorax-templates"]
|
||||||
path = external/fedora-lorax-templates
|
path = external/fedora-lorax-templates
|
||||||
url = https://pagure.io/fedora-lorax-templates.git
|
url = https://pagure.io/fedora-lorax-templates.git
|
||||||
branch = f39
|
branch = f40
|
||||||
[submodule "external/lorax"]
|
[submodule "external/lorax"]
|
||||||
path = external/lorax
|
path = external/lorax
|
||||||
url = https://github.com/weldr/lorax.git
|
url = https://github.com/weldr/lorax.git
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
FROM fedora:40
|
FROM fedora:42
|
||||||
|
|
||||||
ARG VERSION=39
|
ARG VERSION=42
|
||||||
|
|
||||||
ENV ARCH="x86_64"
|
ENV ARCH="x86_64"
|
||||||
ENV IMAGE_NAME="base"
|
ENV IMAGE_NAME="base"
|
||||||
|
|
|
||||||
36
Makefile
36
Makefile
|
|
@ -27,7 +27,7 @@ export install_pkg
|
||||||
_IMAGE_REPO_ESCAPED := $(subst /,\/,$(IMAGE_REPO))
|
_IMAGE_REPO_ESCAPED := $(subst /,\/,$(IMAGE_REPO))
|
||||||
_IMAGE_REPO_DOUBLE_ESCAPED := $(subst \,\\\,$(_IMAGE_REPO_ESCAPED))
|
_IMAGE_REPO_DOUBLE_ESCAPED := $(subst \,\\\,$(_IMAGE_REPO_ESCAPED))
|
||||||
_LORAX_ARGS :=
|
_LORAX_ARGS :=
|
||||||
_LORAX_TEMPLATES := $(call get_templates,install)
|
export _LORAX_TEMPLATES := $(call get_templates,install) lorax_templates/install_include_post.tmpl
|
||||||
_REPO_FILES := $(subst /etc/yum.repos.d,repos,$(REPOS))
|
_REPO_FILES := $(subst /etc/yum.repos.d,repos,$(REPOS))
|
||||||
_TEMP_DIR := $(shell mktemp -d)
|
_TEMP_DIR := $(shell mktemp -d)
|
||||||
_TEMPLATE_VARS := ARCH IMAGE_NAME IMAGE_REPO _IMAGE_REPO_DOUBLE_ESCAPED _IMAGE_REPO_ESCAPED IMAGE_SIGNED IMAGE_TAG REPOS _RHEL VARIANT VERSION WEB_UI
|
_TEMPLATE_VARS := ARCH IMAGE_NAME IMAGE_REPO _IMAGE_REPO_DOUBLE_ESCAPED _IMAGE_REPO_ESCAPED IMAGE_SIGNED IMAGE_TAG REPOS _RHEL VARIANT VERSION WEB_UI
|
||||||
|
|
@ -35,7 +35,7 @@ _VOLID := $(firstword $(subst -, ,$(IMAGE_NAME)))-$(ARCH)-$(
|
||||||
|
|
||||||
ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo)
|
ifeq ($(findstring redhat.repo,$(REPOS)),redhat.repo)
|
||||||
export _RHEL := true
|
export _RHEL := true
|
||||||
_LORAX_TEMPLATES += $(call get_templates,rhel)
|
export _LORAX_TEMPLATES += $(call get_templates,rhel)
|
||||||
else
|
else
|
||||||
undefine _RHEL
|
undefine _RHEL
|
||||||
endif
|
endif
|
||||||
|
|
@ -53,17 +53,17 @@ _LORAX_ARGS += -i anaconda-webui
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(DNF_CACHE),)
|
ifneq ($(DNF_CACHE),)
|
||||||
_LORAX_ARGS += --cachedir $(DNF_CACHE)
|
_LORAX_ARGS += --cachedir $(DNF_CACHE)
|
||||||
_LORAX_TEMPLATES += $(call get_templates,cache)
|
export _LORAX_TEMPLATES += $(call get_templates,cache)
|
||||||
_TEMPLATE_VARS += DNF_CACHE
|
_TEMPLATE_VARS += DNF_CACHE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(FLATPAK_DIR),)
|
ifneq ($(FLATPAK_DIR),)
|
||||||
_FLATPAK_REPO_GPG := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2)
|
_FLATPAK_REPO_GPG := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2)
|
||||||
export _FLATPAK_REPO_URL := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2)
|
export _FLATPAK_REPO_URL := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2)
|
||||||
_LORAX_ARGS += -i flatpak-libs
|
_LORAX_ARGS += -i flatpak-libs
|
||||||
_LORAX_TEMPLATES += $(call get_templates,flatpak)
|
export _LORAX_TEMPLATES += $(call get_templates,flatpak)
|
||||||
_TEMPLATE_VARS += FLATPAK_DIR FLATPAK_REMOTE_NAME FLATPAK_REMOTE_REFS FLATPAK_REMOTE_URL _FLATPAK_REPO_GPG _FLATPAK_REPO_URL
|
_TEMPLATE_VARS += FLATPAK_DIR FLATPAK_REMOTE_NAME FLATPAK_REMOTE_REFS FLATPAK_REMOTE_URL _FLATPAK_REPO_GPG _FLATPAK_REPO_URL
|
||||||
else
|
else
|
||||||
ifneq ($(FLATPAK_REMOTE_REFS_DIR),)
|
ifneq ($(FLATPAK_REMOTE_REFS_DIR),)
|
||||||
COLLECTED_REFS := $(foreach file,$(filter-out README.md Makefile,$(wildcard $(FLATPAK_REMOTE_REFS_DIR)/*)),$(shell cat $(file)))
|
COLLECTED_REFS := $(foreach file,$(filter-out README.md Makefile,$(wildcard $(FLATPAK_REMOTE_REFS_DIR)/*)),$(shell cat $(file)))
|
||||||
|
|
@ -71,19 +71,19 @@ export FLATPAK_REMOTE_REFS += $(sort $(COLLECTED_REFS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(FLATPAK_REMOTE_REFS),)
|
ifneq ($(FLATPAK_REMOTE_REFS),)
|
||||||
_FLATPAK_REPO_GPG := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2)
|
_FLATPAK_REPO_GPG := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^GPGKey=' | cut -d= -f2)
|
||||||
export _FLATPAK_REPO_URL := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2)
|
export _FLATPAK_REPO_URL := $(shell curl -L $(FLATPAK_REMOTE_URL) | grep -i '^URL=' | cut -d= -f2)
|
||||||
_LORAX_ARGS += -i flatpak-libs
|
_LORAX_ARGS += -i flatpak-libs
|
||||||
_LORAX_TEMPLATES += $(call get_templates,flatpak) \
|
export _LORAX_TEMPLATES += $(call get_templates,flatpak) \
|
||||||
external/fedora-lorax-templates/ostree-based-installer/lorax-embed-flatpaks.tmpl
|
external/fedora-lorax-templates/ostree-based-installer/lorax-embed-flatpaks.tmpl
|
||||||
_TEMPLATE_VARS += FLATPAK_DIR FLATPAK_REMOTE_NAME FLATPAK_REMOTE_REFS FLATPAK_REMOTE_URL _FLATPAK_REPO_GPG _FLATPAK_REPO_URL
|
_TEMPLATE_VARS += FLATPAK_DIR FLATPAK_REMOTE_NAME FLATPAK_REMOTE_REFS FLATPAK_REMOTE_URL _FLATPAK_REPO_GPG _FLATPAK_REPO_URL
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifneq ($(SECURE_BOOT_KEY_URL),)
|
ifneq ($(SECURE_BOOT_KEY_URL),)
|
||||||
_LORAX_TEMPLATES += $(call get_templates,secureboot)
|
export _LORAX_TEMPLATES += $(call get_templates,secureboot)
|
||||||
_TEMPLATE_VARS += ENROLLMENT_PASSWORD
|
_TEMPLATE_VARS += ENROLLMENT_PASSWORD
|
||||||
endif
|
endif
|
||||||
|
|
||||||
_SUBDIRS := container external flatpak_refs lorax_templates repos xorriso test
|
_SUBDIRS := container external flatpak_refs lorax_templates repos xorriso test
|
||||||
|
|
@ -106,14 +106,14 @@ sb_pubkey.der:
|
||||||
curl --fail -L -o sb_pubkey.der $(SECURE_BOOT_KEY_URL)
|
curl --fail -L -o sb_pubkey.der $(SECURE_BOOT_KEY_URL)
|
||||||
|
|
||||||
# Build boot.iso using Lorax
|
# Build boot.iso using Lorax
|
||||||
results/images/boot.iso: external/lorax/branch-$(VERSION) $(filter lorax_templates/%,$(_LORAX_TEMPLATES)) $(_REPO_FILES) $(if $(SECURE_BOOT_KEY_URL),sb_pubkey.der)
|
results/images/boot.iso: external/lorax/branch-$(VERSION) $(filter lorax_templates/%,$(_LORAX_TEMPLATES)) $(filter repos/%,$(_REPO_FILES)) $(if $(SECURE_BOOT_KEY_URL),sb_pubkey.der)
|
||||||
$(if $(wildcard results), rm -Rf results)
|
$(if $(wildcard results), rm -Rf results)
|
||||||
$(if $(wildcard /etc/rpm/macros.image-language-conf),mv /etc/rpm/macros.image-language-conf $(_TEMP_DIR)/macros.image-language-conf)
|
$(if $(wildcard /etc/rpm/macros.image-language-conf),mv /etc/rpm/macros.image-language-conf $(_TEMP_DIR)/macros.image-language-conf)
|
||||||
|
|
||||||
lorax -p $(IMAGE_NAME) -v $(VERSION) -r $(VERSION) -t $(VARIANT) \
|
lorax -p $(IMAGE_NAME) -v $(VERSION) -r $(VERSION) -t $(VARIANT) \
|
||||||
--isfinal --buildarch=$(ARCH) --volid=$(_VOLID) --sharedir $(PWD)/external/lorax/share/templates.d/99-generic \
|
--isfinal --buildarch=$(ARCH) --volid=$(_VOLID) --sharedir $(PWD)/external/lorax/share/templates.d/99-generic \
|
||||||
$(_LORAX_ARGS) \
|
$(_LORAX_ARGS) \
|
||||||
$(foreach file,$(_REPO_FILES),--repo $(PWD)/$(file)) \
|
$(foreach file,$(_REPO_FILES),--repo $(patsubst repos/%,$(PWD)/repos/%,$(file))) \
|
||||||
$(foreach file,$(_LORAX_TEMPLATES),--add-template $(PWD)/$(file)) \
|
$(foreach file,$(_LORAX_TEMPLATES),--add-template $(PWD)/$(file)) \
|
||||||
$(foreach file,$(ADDITIONAL_TEMPLATES),--add-template $(file)) \
|
$(foreach file,$(ADDITIONAL_TEMPLATES),--add-template $(file)) \
|
||||||
$(foreach file,$(_FLATPAK_TEMPLATES),--add-template $(file)) \
|
$(foreach file,$(_FLATPAK_TEMPLATES),--add-template $(file)) \
|
||||||
|
|
|
||||||
130
README.md
130
README.md
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
# Build Container Installer Action
|
# Build Container Installer Action
|
||||||
|
|
||||||
This action is used to generate an ISO for installing an OSTree stored in a container image. This utilizes the anaconda command `ostreecontainer`
|
This action is used to generate an ISO for installing an OSTree stored in a container image. This utilizes the anaconda command `ostreecontainer`, which also supports bootc.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
@ -29,137 +29,15 @@ This action is designed to be called from a GitHub workflow using the following
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.build.outputs.iso_name }}
|
name: ${{ steps.build.outputs.iso_name }}
|
||||||
path: |
|
path: |
|
||||||
${{ steps.build.outputs.iso_path }}
|
${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}
|
||||||
${{ steps.build.outputs.iso_path }}-CHECKSUM
|
${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}-CHECKSUM
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 0
|
retention-days: 0
|
||||||
compression-level: 0
|
compression-level: 0
|
||||||
```
|
```
|
||||||
|
|
||||||
See [Customizing](#customizing) for information about customizing the ISO that gets created using `with`
|
**See the [Wiki](https://github.com/JasonN3/build-container-installer/wiki) for development and usage information.**
|
||||||
|
|
||||||
## Customizing
|
|
||||||
|
|
||||||
The following variables can be used to customize the created ISO.
|
|
||||||
|
|
||||||
### Inputs
|
|
||||||
|
|
||||||
| Variable | Description | Default Value | Action | Container/Makefile |
|
|
||||||
| ----------------------- | ---------------------------------------------------------------------------- | -------------------------------------------- | ------------------ | ------------------ |
|
|
||||||
| additional_templates | Space delimited list of additional Lorax templates to include | \[empty\] | :white_check_mark: | :white_check_mark: |
|
|
||||||
| arch | Architecture for image to build | x86_64 | :white_check_mark: | :white_check_mark: |
|
|
||||||
| enrollment_password | Used for supporting secure boot (requires SECURE_BOOT_KEY_URL to be defined) | container-installer | :white_check_mark: | :white_check_mark: |
|
|
||||||
| extra_boot_params | Extra params used by grub to boot the anaconda installer | \[empty\] | :white_check_mark: | :white_check_mark: |
|
|
||||||
| flatpak_remote_name | Name of the Flatpak repo on the destination OS | flathub | :white_check_mark: | :white_check_mark: |
|
|
||||||
| flatpak_remote_refs | Space separated list of flatpak refs to install | \[empty\] | :white_check_mark: | :white_check_mark: |
|
|
||||||
| flatpak_remote_refs_dir | Directory that contains files that list the flatpak refs to install | \[empty\] | :white_check_mark: | :white_check_mark: |
|
|
||||||
| flatpak_remote_url | URL of the flatpakrepo file | <https://flathub.org/repo/flathub.flatpakrepo> | :white_check_mark: | :white_check_mark: |
|
|
||||||
| image_name | Name of the source container image | base | :white_check_mark: | :white_check_mark: |
|
|
||||||
| image_repo | Repository containing the source container image | quay.io/fedora-ostree-desktops | :white_check_mark: | :white_check_mark: |
|
|
||||||
| image_signed | Whether the container image is signed. The policy to test the signing must be configured inside the container image | true | :white_check_mark: | :white_check_mark: |
|
|
||||||
| image_src | Overrides the source of the container image. Must be formatted for the skopeo copy command | \[empty\] | :white_check_mark: | :white_check_mark: |
|
|
||||||
| image_tag | Tag of the source container image | *VERSION* | :white_check_mark: | :white_check_mark: |
|
|
||||||
| iso_name | Name of the ISO you wish to output when completed | build/deploy.iso | :white_check_mark: | :white_check_mark: |
|
|
||||||
| make_target | Overrides the default make target | *ISO_NAME*-Checksum | :white_check_mark: | :x: |
|
|
||||||
| repos | List of repo files for Lorax to use | /etc/yum.repos.d/*.repo | :white_check_mark: | :white_check_mark: |
|
|
||||||
| rootfs_size | The size (in GiB) for the squashfs runtime volume | 2 | :white_check_mark: | :white_check_mark: |
|
|
||||||
| secure_boot_key_url | Secure boot key that is installed from URL location\*\* | \[empty\] | :white_check_mark: | :white_check_mark: |
|
|
||||||
| variant | Source container variant\* | Server | :white_check_mark: | :white_check_mark: |
|
|
||||||
| version | Fedora version of installer to build | 39 | :white_check_mark: | :white_check_mark: |
|
|
||||||
| web_ui | Enable Anaconda WebUI (experimental) | false | :white_check_mark: | :white_check_mark: |
|
|
||||||
|
|
||||||
\*Available options for VARIANT can be found by running `dnf provides system-release`.
|
|
||||||
Variant will be the third item in the package name. Example: `fedora-release-kinoite-39-34.noarch` will be kinoite
|
|
||||||
|
|
||||||
\*\* If you need to reference a local file, you can use `file://*path*`
|
|
||||||
|
|
||||||
### Outputs
|
|
||||||
|
|
||||||
| Variable | Description | Usage |
|
|
||||||
| -------- | ----------------------------------------| ------------------------------------------------ |
|
|
||||||
| iso_name | The name of the resulting .iso | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_name }} |
|
|
||||||
| iso_path | The name and path of the resulting .iso | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_name }} |
|
|
||||||
|
|
||||||
For outputs, see example above.
|
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
### Makefile
|
|
||||||
|
|
||||||
The Makefile contains all commands that are run the action. There are separate targets for each file generated, however `make` can be used to generate the final image and `make clean` can be used to clean up the workspace. The resulting ISO will be stored in the `build` directory.
|
|
||||||
|
|
||||||
You can use `make install-deps` to install the required packages.
|
|
||||||
|
|
||||||
See [Customizing](#customizing) for information about customizing the ISO that gets created. All variables should be specified in CAPITALIZED form.
|
|
||||||
|
|
||||||
### Container
|
|
||||||
|
|
||||||
A container with `make install-deps` already run is provided at `ghcr.io/jasonn3/build-container-installer:latest`
|
|
||||||
|
|
||||||
To use the container file, run `docker run --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest`.
|
|
||||||
|
|
||||||
This will create an ISO with the baked in defaults of the container image. The resulting file will be called `deploy.iso`
|
|
||||||
|
|
||||||
See [Customizing](#customizing) for information about customizing the ISO that gets created. All variables should be specified in CAPITALIZED form.
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
Building an ISO to install Fedora 38
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run --rm --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest VERSION=38 IMAGE_NAME=base IMAGE_TAG=38 VARIANT=Server
|
|
||||||
```
|
|
||||||
|
|
||||||
Building an ISO to install Fedora 39
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run --rm --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest VERSION=39 IMAGE_NAME=base IMAGE_TAG=39 VARIANT=Server
|
|
||||||
```
|
|
||||||
|
|
||||||
### VSCode Dev Container
|
|
||||||
|
|
||||||
There is a dev container configuration provided for development. By default, it will use the existing container image available at `ghcr.io/jasonn3/build-container-installer:latest`. However, you can have it build a new image by editing `.devcontainer/devcontainer.json` and replacing `image` with `build`. `Ctrl+/` can be used to comment and uncomment blocks of code within VSCode.
|
|
||||||
|
|
||||||
The code from VSCode will be available at `/workspaces/build-container-installer` once the container has started.
|
|
||||||
|
|
||||||
Privileged is required for access to loop devices for lorax.
|
|
||||||
|
|
||||||
Use existing container image:
|
|
||||||
|
|
||||||
```diff
|
|
||||||
{
|
|
||||||
"name": "Existing Image",
|
|
||||||
- "build": {
|
|
||||||
- "context": "..",
|
|
||||||
- "dockerfile": "../Containerfile",
|
|
||||||
- "args": {
|
|
||||||
- "version": "39"
|
|
||||||
- }
|
|
||||||
- },
|
|
||||||
+ "image": "ghcr.io/jasonn3/build-container-installer:latest",
|
|
||||||
"overrideCommand": true,
|
|
||||||
"shutdownAction": "stopContainer",
|
|
||||||
"privileged": true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Build a new container image:
|
|
||||||
|
|
||||||
```diff
|
|
||||||
{
|
|
||||||
"name": "New Image",
|
|
||||||
+ "build": {
|
|
||||||
+ "context": "..",
|
|
||||||
+ "dockerfile": "../Containerfile",
|
|
||||||
+ "args": {
|
|
||||||
+ "version": "39"
|
|
||||||
+ }
|
|
||||||
+ },
|
|
||||||
- "image": "ghcr.io/jasonn3/build-container-installer:latest",
|
|
||||||
"overrideCommand": true,
|
|
||||||
"shutdownAction": "stopContainer",
|
|
||||||
"privileged": true
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Star History
|
## Star History
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ inputs:
|
||||||
description: Overrides the skopeo cache key
|
description: Overrides the skopeo cache key
|
||||||
required: false
|
required: false
|
||||||
variant:
|
variant:
|
||||||
description: "Source container variant. Available options can be found by running `dnf provides system-release`. Variant will be the third item in the package name. Example: `fedora-release-kinoite-39-34.noarch` will be kinonite"
|
description: "Source container variant. Available options can be found by running `dnf provides system-release`. Variant will be the third item in the package name. Example: `fedora-release-kinoite-39-34.noarch` will be kinoite"
|
||||||
required: true
|
required: true
|
||||||
default: Server
|
default: Server
|
||||||
version:
|
version:
|
||||||
|
|
|
||||||
12
docs/Makefile
Normal file
12
docs/Makefile
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
SHELL = /bin/bash
|
||||||
|
|
||||||
|
docs:
|
||||||
|
find -name '*.md' -print0 | xargs -0 -I {} bash -c ' \
|
||||||
|
source_file=$${1:2}; \
|
||||||
|
final_file=$${source_file//\//_}; \
|
||||||
|
mv "$${source_file}" "$${final_file}"; \
|
||||||
|
no_ext_source=$${source_file:0:-3}; \
|
||||||
|
no_ext_final=$${final_file:0:-3}; \
|
||||||
|
sed -i "s;(\(../\)*$${source_file});($${no_ext_final});g" $$(find -name '\''*.md'\''); \
|
||||||
|
' _ {}
|
||||||
|
find . -type d -empty -delete
|
||||||
1
docs/README.md
Normal file
1
docs/README.md
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
These are the files for the [wiki](https://github.com/JasonN3/build-container-installer/wiki)
|
||||||
11
docs/_Sidebar.md
Normal file
11
docs/_Sidebar.md
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
- [Home](home.md)
|
||||||
|
- [Usage](usage.md)
|
||||||
|
- Development
|
||||||
|
- [Using the Makefile](development/makefile.md)
|
||||||
|
- [Using the Container](development/container.md)
|
||||||
|
- [Using the VSCode Dev Container](development/vscode.md)
|
||||||
|
|
||||||
|
- Examples
|
||||||
|
- [Adding Flatpaks](examples/adding-flatpaks.md)
|
||||||
|
|
||||||
|
- [Known Errors](known_errors.md)
|
||||||
22
docs/development/container.md
Normal file
22
docs/development/container.md
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Using the Container
|
||||||
|
|
||||||
|
A container with `make install-deps` already run is provided at `ghcr.io/jasonn3/build-container-installer:latest`
|
||||||
|
|
||||||
|
To use the container file, run `podman run --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest`.
|
||||||
|
|
||||||
|
This will create an ISO with the baked in defaults of the container image. The resulting file will be called `deploy.iso`
|
||||||
|
|
||||||
|
See [Inputs](usage#inputs) for information about customizing the ISO that gets created. The variables can be defined as environment variables or command arguments. All variables should be specified in CAPITALIZED form.
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
Building an ISO to install Fedora 39
|
||||||
|
```bash
|
||||||
|
podman run --rm --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest VERSION=39 IMAGE_NAME=base IMAGE_TAG=39 VARIANT=Server
|
||||||
|
```
|
||||||
|
|
||||||
|
Building an ISO to install Fedora 40
|
||||||
|
```bash
|
||||||
|
podman run --rm --privileged --volume .:/build-container-installer/build ghcr.io/jasonn3/build-container-installer:latest VERSION=40 IMAGE_NAME=base IMAGE_TAG=40 VARIANT=Server
|
||||||
|
```
|
||||||
|
|
||||||
|
The same commands are also available using `docker` by replacing `podman` with `docker` in each command.
|
||||||
7
docs/development/makefile.md
Normal file
7
docs/development/makefile.md
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Using the Makefile
|
||||||
|
|
||||||
|
The Makefile contains all the commands that are run in the action. There are separate targets for each file generated, however `make` can be used to generate the final image and `make clean` can be used to clean up the workspace. The resulting ISO will be stored in the `build` directory.
|
||||||
|
|
||||||
|
`make install-deps` can be used to install the necessary packages.
|
||||||
|
|
||||||
|
See [Inputs](usage#inputs) for information about the available parameters. All variables should be specified in CAPITALIZED form.
|
||||||
46
docs/development/vscode.md
Normal file
46
docs/development/vscode.md
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
# Using the VSCode Dev Container
|
||||||
|
|
||||||
|
There is a dev container configuration provided for development. By default, it will use the existing container image available at `ghcr.io/jasonn3/build-container-installer:latest`. However, you can have it build a new image by editing `.devcontainer/devcontainer.json` and replacing `image` with `build`. `Ctrl+/` can be used to comment and uncomment blocks of code within VSCode.
|
||||||
|
|
||||||
|
The code from VSCode will be available at `/workspaces/build-container-installer` once the container has started.
|
||||||
|
|
||||||
|
Privileged is required for access to loop devices for lorax.
|
||||||
|
|
||||||
|
## Use existing container image
|
||||||
|
|
||||||
|
```diff
|
||||||
|
{
|
||||||
|
"name": "Existing Image",
|
||||||
|
- "build": {
|
||||||
|
- "context": "..",
|
||||||
|
- "dockerfile": "../Containerfile",
|
||||||
|
- "args": {
|
||||||
|
- "version": "39"
|
||||||
|
- }
|
||||||
|
- },
|
||||||
|
+ "image": "ghcr.io/jasonn3/build-container-installer:latest",
|
||||||
|
"overrideCommand": true,
|
||||||
|
"shutdownAction": "stopContainer",
|
||||||
|
"privileged": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build a new container image
|
||||||
|
|
||||||
|
```diff
|
||||||
|
{
|
||||||
|
"name": "New Image",
|
||||||
|
+ "build": {
|
||||||
|
+ "context": "..",
|
||||||
|
+ "dockerfile": "../Containerfile",
|
||||||
|
+ "args": {
|
||||||
|
+ "version": "39"
|
||||||
|
+ }
|
||||||
|
+ },
|
||||||
|
- "image": "ghcr.io/jasonn3/build-container-installer:latest",
|
||||||
|
"overrideCommand": true,
|
||||||
|
"shutdownAction": "stopContainer",
|
||||||
|
"privileged": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
74
docs/examples/adding-flatpaks.md
Normal file
74
docs/examples/adding-flatpaks.md
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Adding Flatpaks
|
||||||
|
|
||||||
|
- [Directly using refs](#directly-using-refs)
|
||||||
|
- [Using a directory](#using-a-directory)
|
||||||
|
|
||||||
|
## Directly using refs
|
||||||
|
|
||||||
|
Action:
|
||||||
|
Specify the following in your workflow:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Build ISO
|
||||||
|
uses: jasonn3/build-container-installer@main
|
||||||
|
id: build
|
||||||
|
with:
|
||||||
|
flatpak_remote_name: flathub
|
||||||
|
flatpak_remote_url: https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
flatpak_remote_refs: app/org.videolan.VLC/x86_64/stable runtime/org.kde.Platform/x86_64/5.15-23.08
|
||||||
|
```
|
||||||
|
|
||||||
|
Podman:
|
||||||
|
Run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
podman run --privileged --volume ./:/github/workspace/ ghcr.io/jasonn3/build-container-installer:main \
|
||||||
|
FLATPAK_REMOTE_NAME=flathub \
|
||||||
|
FLATPAK_REMOTE_URL=https://flathub.org/repo/flathub.flatpakrepo \
|
||||||
|
FLATPAK_REMOTE_REFS="app/org.videolan.VLC/x86_64/stable runtime/org.kde.Platform/x86_64/5.15-23.08"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Using a directory
|
||||||
|
|
||||||
|
Action:
|
||||||
|
|
||||||
|
1. Create a directory within your GitHub repo named flatpak_refs
|
||||||
|
1. Create a file within flatpak_refs with the following content
|
||||||
|
|
||||||
|
```plaintext
|
||||||
|
app/org.videolan.VLC/x86_64/stable
|
||||||
|
runtime/org.kde.Platform/x86_64/5.15-23.08
|
||||||
|
```
|
||||||
|
|
||||||
|
Specify the following in your workflow:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Build ISO
|
||||||
|
uses: jasonn3/build-container-installer@main
|
||||||
|
id: build
|
||||||
|
with:
|
||||||
|
flatpak_remote_name: flathub
|
||||||
|
flatpak_remote_url: https://flathub.org/repo/flathub.flatpakrepo
|
||||||
|
flatpak_remote_refs_dir: /github/workspace/flatpak_refs
|
||||||
|
```
|
||||||
|
|
||||||
|
Podman:
|
||||||
|
|
||||||
|
1. Create a directory named flatpak_refs
|
||||||
|
1. Create a file within flatpak_refs with the following content
|
||||||
|
|
||||||
|
```plaintext
|
||||||
|
app/org.videolan.VLC/x86_64/stable
|
||||||
|
runtime/org.kde.Platform/x86_64/5.15-23.08
|
||||||
|
```
|
||||||
|
|
||||||
|
Run the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
podman run --privileged --volume ./:/github/workspace/ ghcr.io/jasonn3/build-container-installer:main \
|
||||||
|
FLATPAK_REMOTE_NAME=flathub \
|
||||||
|
FLATPAK_REMOTE_URL=https://flathub.org/repo/flathub.flatpakrepo \
|
||||||
|
FLATPAK_REMOTE_REFS="app/org.videolan.VLC/x86_64/stable runtime/org.kde.Platform/x86_64/5.15-23.08"
|
||||||
|
```
|
||||||
14
docs/home.md
Normal file
14
docs/home.md
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
Welcome to the build-container-installer wiki!
|
||||||
|
|
||||||
|
## Index
|
||||||
|
|
||||||
|
- [Usage](usage.md)
|
||||||
|
- Development
|
||||||
|
- [Using the Makefile](development/makefile.md)
|
||||||
|
- [Using the Container](development/container.md)
|
||||||
|
- [Using the VSCode Dev Container](development/vscode.md)
|
||||||
|
|
||||||
|
- Examples
|
||||||
|
- [Adding Flatpaks](examples/adding-flatpaks.md)
|
||||||
|
|
||||||
|
- [Known Errors](known_errors.md)
|
||||||
7
docs/known_errors.md
Normal file
7
docs/known_errors.md
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Known Errors
|
||||||
|
|
||||||
|
This page describes known errors and how to resolve them.
|
||||||
|
|
||||||
|
## failed to write boot loader configuration
|
||||||
|
|
||||||
|
Add `RUN bootupctl backend generate-update-metadata` at the end of your Dockerfile/Containerfile
|
||||||
68
docs/usage.md
Normal file
68
docs/usage.md
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
# Usage
|
||||||
|
|
||||||
|
This action is designed to be called from a GitHub workflow using the following format
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Build ISO
|
||||||
|
uses: jasonn3/build-container-installer@main
|
||||||
|
id: build
|
||||||
|
with:
|
||||||
|
arch: ${{ env.ARCH}}
|
||||||
|
image_name: ${{ env.IMAGE_NAME}}
|
||||||
|
image_repo: ${{ env.IMAGE_REPO}}
|
||||||
|
image_tag: ${{ env.IMAGE_TAG }}
|
||||||
|
version: ${{ env.VERSION }}
|
||||||
|
variant: ${{ env.VARIANT }}
|
||||||
|
iso_name: ${{ env.IMAGE_NAME }}-${{ env.IMAGE_TAG }}-${{ env.VERSION }}.iso
|
||||||
|
|
||||||
|
# This example is for uploading your ISO as a Github artifact. You can do something similar using any cloud storage, so long as you copy the output
|
||||||
|
- name: Upload ISO as artifact
|
||||||
|
id: upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ steps.build.outputs.iso_name }}
|
||||||
|
path: |
|
||||||
|
${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}
|
||||||
|
${{ steps.build.outputs.iso_path }}/${{ steps.build.outputs.iso_name }}-CHECKSUM
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 0
|
||||||
|
compression-level: 0
|
||||||
|
```
|
||||||
|
|
||||||
|
## Inputs
|
||||||
|
|
||||||
|
| Variable | Description | Default Value | Action | Container/Makefile |
|
||||||
|
| ----------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------- | ------------------ | ------------------ |
|
||||||
|
| additional_templates | Space delimited list of additional Lorax templates to include | \[empty\] | :white_check_mark: | :white_check_mark: |
|
||||||
|
| arch | Architecture for image to build | x86_64 | :white_check_mark: | :white_check_mark: |
|
||||||
|
| enrollment_password | Used for supporting secure boot (requires SECURE_BOOT_KEY_URL to be defined) | container-installer | :white_check_mark: | :white_check_mark: |
|
||||||
|
| extra_boot_params | Extra params used by grub to boot the anaconda installer | \[empty\] | :white_check_mark: | :white_check_mark: |
|
||||||
|
| flatpak_remote_name | Name of the Flatpak repo on the destination OS | flathub | :white_check_mark: | :white_check_mark: |
|
||||||
|
| flatpak_remote_refs | Space separated list of flatpak refs to install | \[empty\] | :white_check_mark: | :white_check_mark: |
|
||||||
|
| flatpak_remote_refs_dir | Directory that contains files that list the flatpak refs to install | \[empty\] | :white_check_mark: | :white_check_mark: |
|
||||||
|
| flatpak_remote_url | URL of the flatpakrepo file | <https://flathub.org/repo/flathub.flatpakrepo> | :white_check_mark: | :white_check_mark: |
|
||||||
|
| image_name | Name of the source container image | base | :white_check_mark: | :white_check_mark: |
|
||||||
|
| image_repo | Repository containing the source container image | quay.io/fedora-ostree-desktops | :white_check_mark: | :white_check_mark: |
|
||||||
|
| image_signed | Whether the container image is signed. The policy to test the signing must be configured inside the container image | true | :white_check_mark: | :white_check_mark: |
|
||||||
|
| image_src | Overrides the source of the container image. Must be formatted for the skopeo copy command | \[empty\] | :white_check_mark: | :white_check_mark: |
|
||||||
|
| image_tag | Tag of the source container image | *VERSION* | :white_check_mark: | :white_check_mark: |
|
||||||
|
| iso_name | Name of the ISO you wish to output when completed | build/deploy.iso | :white_check_mark: | :white_check_mark: |
|
||||||
|
| make_target | Overrides the default make target | *ISO_NAME*-Checksum | :white_check_mark: | :x: |
|
||||||
|
| repos | List of repo files for Lorax to use | /etc/yum.repos.d/*.repo | :white_check_mark: | :white_check_mark: |
|
||||||
|
| rootfs_size | The size (in GiB) for the squashfs runtime volume | 2 | :white_check_mark: | :white_check_mark: |
|
||||||
|
| secure_boot_key_url | Secure boot key that is installed from URL location\*\* | \[empty\] | :white_check_mark: | :white_check_mark: |
|
||||||
|
| variant | Source container variant\* | Server | :white_check_mark: | :white_check_mark: |
|
||||||
|
| version | Fedora version of installer to build | 39 | :white_check_mark: | :white_check_mark: |
|
||||||
|
| web_ui | Enable Anaconda WebUI (experimental) | false | :white_check_mark: | :white_check_mark: |
|
||||||
|
|
||||||
|
\*Available options for VARIANT can be found by running `dnf provides system-release`.
|
||||||
|
Variant will be the third item in the package name. Example: `fedora-release-kinoite-39-34.noarch` will be kinoite
|
||||||
|
|
||||||
|
\*\* If you need to reference a local file, you can use `file://*path*`
|
||||||
|
|
||||||
|
## Outputs
|
||||||
|
|
||||||
|
| Variable | Description | Usage |
|
||||||
|
| -------- | ----------------------------------------| ------------------------------------------------ |
|
||||||
|
| iso_name | The name of the resulting .iso | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_name }} |
|
||||||
|
| iso_path | The path to the resulting .iso | ${{ steps.YOUR_ID_FOR_ACTION.outputs.iso_path }} |
|
||||||
2
external/Makefile
vendored
2
external/Makefile
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
lorax/branch-$(VERSION):
|
lorax/branch-$(VERSION):
|
||||||
git config advice.detachedHead false
|
git config advice.detachedHead false
|
||||||
cd lorax && git reset --hard HEAD && git checkout $(if $(_RHEL),rhel$(word 1,$(subst ., ,$(VERSION)))-branch,tags/$(shell cd lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | tail -n 1))
|
cd lorax && git reset --hard HEAD && git checkout $(if $(_RHEL),rhel$(word 1,$(subst ., ,$(VERSION)))-branch,tags/$(shell cd lorax && git tag -l lorax-$(VERSION).* --sort=creatordate | grep -v 'lorax-40\.5' | tail -n 1))
|
||||||
touch lorax/branch-$(VERSION)
|
touch lorax/branch-$(VERSION)
|
||||||
|
|
||||||
install-deps:
|
install-deps:
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ repo: script.sh
|
||||||
|
|
||||||
script.sh:
|
script.sh:
|
||||||
cat << EOF > script.sh
|
cat << EOF > script.sh
|
||||||
|
which flatpak &> /dev/null || dnf install -y flatpak
|
||||||
mkdir -p /flatpak/flatpak /flatpak/triggers
|
mkdir -p /flatpak/flatpak /flatpak/triggers
|
||||||
mkdir /var/tmp || true
|
mkdir /var/tmp || true
|
||||||
chmod -R 1777 /var/tmp
|
chmod -R 1777 /var/tmp
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,14 @@ endef
|
||||||
post_%.tmpl: scripts/post/%
|
post_%.tmpl: scripts/post/%
|
||||||
$(call convert_post_to_tmpl,$*,usr/share/anaconda/post-scripts/$*.ks,true)
|
$(call convert_post_to_tmpl,$*,usr/share/anaconda/post-scripts/$*.ks,true)
|
||||||
|
|
||||||
|
install_include_post.tmpl:
|
||||||
|
echo '<%page />' > install_include_post.tmpl
|
||||||
|
for file in $(patsubst post_%.tmpl, %, $(filter post_%, $(notdir $(_LORAX_TEMPLATES)))); do echo "append usr/share/anaconda/interactive-defaults.ks \"%include /usr/share/anaconda/post-scripts/$${file}.ks\"" >> install_include_post.tmpl; done
|
||||||
|
|
||||||
install-deps:
|
install-deps:
|
||||||
|
|
||||||
FILES=$(wildcard post_*)
|
FILES=$(wildcard post_*) install_include_post.tmpl
|
||||||
clean:
|
clean:
|
||||||
ifneq ($(FILES),)
|
ifneq ($(FILES),)
|
||||||
rm -Rf $(FILES)
|
rm -Rf $(FILES)
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<%page args="flatpak_remote_name, _flatpak_repo_url, version"/>
|
<%page args="flatpak_remote_name, _flatpak_repo_url, version"/>
|
||||||
% if int(version) >= 41:
|
% if int(version) >= 41:
|
||||||
|
append etc/anaconda/conf.d/anaconda.conf "[Payload]"
|
||||||
append etc/anaconda/conf.d/anaconda.conf "flatpak_remote = ${flatpak_remote_name} ${_flatpak_repo_url}"
|
append etc/anaconda/conf.d/anaconda.conf "flatpak_remote = ${flatpak_remote_name} ${_flatpak_repo_url}"
|
||||||
% else:
|
% else:
|
||||||
replace "flatpak_manager\.add_remote\(\".*\", \".*\"\)" "flatpak_manager.add_remote(\"${flatpak_remote_name}\", \"${_flatpak_repo_url}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py
|
replace "flatpak_manager\.add_remote\(\".*\", \".*\"\)" "flatpak_manager.add_remote(\"${flatpak_remote_name}\", \"${_flatpak_repo_url}\")" /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
|
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ ${VERSION} -ge 41 ]]
|
||||||
|
then
|
||||||
|
result=0
|
||||||
|
grep "^\[Payload\]" mnt/install/etc/anaconda/conf.d/anaconda.conf > /dev/null || {
|
||||||
|
echo "Missing [Payload] header"
|
||||||
|
result=1
|
||||||
|
}
|
||||||
|
grep "^flatpak_remote = ${FLATPAK_REMOTE_NAME} ${_FLATPAK_REPO_URL}" mnt/install/etc/anaconda/conf.d/anaconda.conf > /dev/null || {
|
||||||
|
echo "Missing flatpak_remote option"
|
||||||
|
result=1
|
||||||
|
}
|
||||||
|
exit ${result}
|
||||||
|
fi
|
||||||
|
|
||||||
add_line=$(grep flatpak_manager.add_remote mnt/install/usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py)
|
add_line=$(grep flatpak_manager.add_remote mnt/install/usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py)
|
||||||
|
|
||||||
add_line_repo=$(echo "${add_line}" | grep "${FLATPAK_REMOTE_NAME}")
|
add_line_repo=$(echo "${add_line}" | grep "${FLATPAK_REMOTE_NAME}")
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ ansible_inventory:
|
||||||
.PHONY: $(VM_TESTS) install-deps
|
.PHONY: $(VM_TESTS) install-deps
|
||||||
|
|
||||||
install-deps:
|
install-deps:
|
||||||
$(install_pkg) qemu qemu-utils xorriso qemu-system-x86 netcat socat jq ansible curl
|
$(install_pkg) qemu-system qemu-utils xorriso qemu-system-x86 ncat socat jq ansible curl
|
||||||
|
|
||||||
files/mnt/iso:
|
files/mnt/iso:
|
||||||
$(if $(wildcard files/mnt),,mkdir files/mnt)
|
$(if $(wildcard files/mnt),,mkdir files/mnt)
|
||||||
|
|
@ -97,4 +97,4 @@ start_vm: install_os
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "VM ready for tests at IP $(VM_IP):$(VM_PORT)"
|
echo "VM ready for tests at IP $(VM_IP):$(VM_PORT)"
|
||||||
echo $$QEMU_PID > start_vm
|
echo $$QEMU_PID > start_vm
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,9 @@
|
||||||
register: services_state
|
register: services_state
|
||||||
|
|
||||||
- name: Check that flatpak-add-fedora-repos is disabled
|
- name: Check that flatpak-add-fedora-repos is disabled
|
||||||
|
when: services_state['ansible_facts']['services']['flatpak-add-fedora-repos.service'] is defined
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
- services_state['ansible_facts']['services']['flatpak-add-fedora-repos.service']['status'] == 'disabled'
|
- services_state['ansible_facts']['services']['flatpak-add-fedora-repos.service']['status'] == 'disabled'
|
||||||
fail_msg: 'flatpak-add-fedora-repos.service is not disabled'
|
fail_msg: 'flatpak-add-fedora-repos.service is not disabled'
|
||||||
|
success_msg: 'flatpak-add-fedora-repos.service is correctly disabled'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue