commit 0840fc1394830a3f970239f06cae4a2ef58ed85f Author: Colin Walters walters@verbum.org Date: Thu Mar 19 16:50:41 2015 -0400
atomic-installer: Update scripts
These are now based on https://github.com/rhinstaller/lorax/pull/8
atomic-installer/lorax-configure-repo.tmpl | 8 ++++++++ atomic-installer/lorax-embed-repo.tmpl | 21 +++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) --- diff --git a/atomic-installer/lorax-configure-repo.tmpl b/atomic-installer/lorax-configure-repo.tmpl new file mode 100644 index 0000000..7c79612 --- /dev/null +++ b/atomic-installer/lorax-configure-repo.tmpl @@ -0,0 +1,8 @@ +## Lorax template to configure Anaconda to use the local OSTree +## repository on disk. + +<%page args="ostree_osname, ostree_ref"/> +append usr/share/anaconda/interactive-defaults.ks "ostreesetup --nogpg --osname=${ostree_osname} --remote=${ostree_osname} --url=file:////run/install/repo/content/repo --ref=${ostree_ref}\n" +append usr/share/anaconda/interactive-defaults.ks "services --disabled cloud-init,cloud-config,cloud-final,cloud-init-local\n" +append usr/share/anaconda/interactive-defaults.ks "%post --erroronfail\nrm -f /etc/ostree/remotes.d/${ostree_osname}.conf\n%end\n" + diff --git a/atomic-installer/lorax-embed-repo.tmpl b/atomic-installer/lorax-embed-repo.tmpl index fe5a810..3ab0c33 100644 --- a/atomic-installer/lorax-embed-repo.tmpl +++ b/atomic-installer/lorax-embed-repo.tmpl @@ -1,14 +1,11 @@ ## Lorax template to embed an OSTree repository into the installer.iso ## and configure an interactive installer use to look for it. - -<%page args='root'/> -mkdir install/ostree -runcmd ostree --repo=${root}/install/ostree init --mode=archive-z2 -runcmd ostree remote add ostree-mirror --repo=${root}/install/ostree/ --set=gpg-verify=false @OSTREE_URL@ -runcmd ostree --repo=${root}/install/ostree/ pull --mirror ostree-mirror @OSTREE_REF@ - - -append usr/share/anaconda/interactive-defaults.ks "ostreesetup --nogpg --osname=@OSTREE_OSNAME@ --remote=@OSTREE_OSNAME@ --url=file:///install/ostree --ref=@OSTREE_REF@\n" -append usr/share/anaconda/interactive-defaults.ks "services --disabled cloud-init,cloud-config,cloud-final,cloud-init-local\n" -append usr/share/anaconda/interactive-defaults.ks "%post --erroronfail\nrm -f /etc/ostree/remotes.d/@OSTREE_OSNAME@.conf\n%end\n" - +## +## Note that we pull with depth=0 to only get *one* commit into the +## ISO, because we obviously don't want the full history. + +<%page args="workdir, ostree_osname, ostree_repo, ostree_ref"/> +runcmd mkdir -p ${workdir}/iso-graft/content/repo +runcmd ostree --repo=${workdir}/iso-graft/content/repo init --mode=archive-z2 +runcmd ostree --repo=${workdir}/iso-graft/content/repo remote add ostree-mirror --set=gpg-verify=false ${ostree_repo} +runcmd ostree --repo=${workdir}/iso-graft/content/repo pull --mirror ostree-mirror ${ostree_ref}