From f111c4ef495814e2db9f00d811e00f198252cf83 Mon Sep 17 00:00:00 2001 From: "Jason N." <33561705+JasonN3@users.noreply.github.com> Date: Wed, 14 Feb 2024 01:58:23 +0000 Subject: [PATCH] unencapsulate --- .github/workflows/iso.yml | 2 +- lorax_templates/config_repo.tmpl | 11 +++++++++++ lorax_templates/embed.tmpl | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 lorax_templates/config_repo.tmpl create mode 100644 lorax_templates/embed.tmpl diff --git a/.github/workflows/iso.yml b/.github/workflows/iso.yml index 94f72e8..123790c 100644 --- a/.github/workflows/iso.yml +++ b/.github/workflows/iso.yml @@ -54,7 +54,7 @@ jobs: --enablerepo fedora \ --repo /etc/yum.repos.d/fedora-updates.repo \ --enablerepo updates \ - --add-template ${GITHUB_WORKSPACE}/lorax_templates/registry_cache.tmpl \ + --add-template ${GITHUB_WORKSPACE}/lorax_templates/embed.tmpl \ ./results/ - name: Generate xorriso input diff --git a/lorax_templates/config_repo.tmpl b/lorax_templates/config_repo.tmpl new file mode 100644 index 0000000..72db516 --- /dev/null +++ b/lorax_templates/config_repo.tmpl @@ -0,0 +1,11 @@ +<%page args="ostree_osname, ostree_install_repo, ostree_update_repo, ostree_install_ref, ostree_update_ref, ostree_oskey"/> + +append usr/share/anaconda/interactive-defaults.ks "ostreesetup --nogpg --osname=${ostree_osname} --remote=${ostree_osname} --url=file:///ostree/repo --ref=${ostree_update_ref}" +append usr/share/anaconda/interactive-defaults.ks "firewall --use-system-defaults" +append usr/share/anaconda/interactive-defaults.ks "%post --erroronfail" +%if ostree_osname != "fedora": + append usr/share/anaconda/interactive-defaults.ks "rm -f /etc/ostree/remotes.d/${ostree_osname}.conf" + append usr/share/anaconda/interactive-defaults.ks "ostree remote add --set=gpg-verify=true --set=gpgkeypath=/etc/pki/rpm-gpg/ --set=contenturl=${ostree_contenturl} ${ostree_osname} '${ostree_update_repo}'" +%endif +append usr/share/anaconda/interactive-defaults.ks "cp /etc/skel/.bash* /root" +append usr/share/anaconda/interactive-defaults.ks "%end" \ No newline at end of file diff --git a/lorax_templates/embed.tmpl b/lorax_templates/embed.tmpl new file mode 100644 index 0000000..0af56ec --- /dev/null +++ b/lorax_templates/embed.tmpl @@ -0,0 +1,5 @@ +<%page args="root"/> +runcmd mkdir ${root}/ostree +runcmd ostree --repo=${root}/ostree/repo init --mode=bare +runcmd ostree container unencapsulate --repo=${root}/ostree/repo ostree-unverified-image:docker://ghcr.io/jasonn3/base-main:39 +runcmd ostree --repo=${root}/ostree/repo summary -u \ No newline at end of file