From 0ba1d1dbc68f3387c62cf805c21ace3fd27ad58f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Nov 10 2014 14:42:00 +0000 Subject: atomic: Rewrite origin to point to metalink Basically Anaconda-in-ImageFactory is set up to pull from the builder, so that's what ends up in the origin file. But that's obviously not what we want to ship to users. ostree/rpm-ostree do not yet have a convenient command to change this, so brute force it with sed. Implements https://lists.fedoraproject.org/pipermail/cloud/2014-November/004570.html --- diff --git a/fedora-cloud-atomic.ks b/fedora-cloud-atomic.ks index 0e16542..dbfd4bd 100644 --- a/fedora-cloud-atomic.ks +++ b/fedora-cloud-atomic.ks @@ -36,6 +36,9 @@ reboot %post --erroronfail +# See https://github.com/projectatomic/rpm-ostree/issues/42 +ostree remote add --set=gpg-verify=false fedora-atomic 'metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-atomic-21&arch=x86_64' +(origin_file=$(echo -n /ostree/deploy/fedora-atomic-host/deploy/*.origin); sed -e 's,installmedia:,fedora-atomic:,' < ${origin_file} > ${origin_file}.new && mv ${origin_file}{.new,}) # older versions of livecd-tools do not follow "rootpw --lock" line above # https://bugzilla.redhat.com/show_bug.cgi?id=964299