atomic: switch to build from updates ref
We build from the updates ref and set the system to upgrade from the prod ref.
This commit is contained in:
parent
7b26fe5163
commit
aaec0f8129
@ -45,15 +45,27 @@ logvol / --size=3000 --grow --fstype="xfs" --name=root --vgname=atomicos
|
|||||||
|
|
||||||
# Equivalent of %include fedora-repo.ks
|
# Equivalent of %include fedora-repo.ks
|
||||||
# Pull from the ostree repo that was created during the compose
|
# Pull from the ostree repo that was created during the compose
|
||||||
ostreesetup --nogpg --osname=fedora-atomic --remote=fedora-atomic --url=https://kojipkgs.fedoraproject.org/compose/atomic/27/ --ref=fedora/27/${basearch}/atomic-host
|
ostreesetup --nogpg --osname=fedora-atomic --remote=fedora-atomic --url=https://kojipkgs.fedoraproject.org/atomic/27/ --ref=fedora/27/${basearch}/updates/atomic-host
|
||||||
|
|
||||||
reboot
|
reboot
|
||||||
|
|
||||||
%post --erroronfail
|
%post --erroronfail
|
||||||
# See https://github.com/projectatomic/rpm-ostree/issues/42
|
# Find the architecture we are on
|
||||||
# Set the ostree repo to the location we want users to upgrade from
|
arch=$(uname -m)
|
||||||
# This location is where the compose gets synced to after the compose
|
|
||||||
# is done.
|
# Set the origin to the "main ref", distinct from /updates/ which is where bodhi writes.
|
||||||
|
# We want consumers of this image to track the two week releases.
|
||||||
|
ostree admin set-origin --index 0 fedora-atomic https://kojipkgs.fedoraproject.org/atomic/27/ "fedora/27/${arch}/atomic-host"
|
||||||
|
|
||||||
|
# Make sure the ref we're supposedly sitting on (according
|
||||||
|
# to the updated origin) exists.
|
||||||
|
ostree refs "fedora-atomic:fedora/27/${arch}/updates/atomic-host" --create "fedora-atomic:fedora/27/${arch}/atomic-host"
|
||||||
|
|
||||||
|
# Remove the old ref so that the commit eventually gets
|
||||||
|
# cleaned up.
|
||||||
|
ostree refs "fedora-atomic:fedora/27/${arch}/updates/atomic-host" --delete
|
||||||
|
|
||||||
|
# delete/add the remote with new options to enable gpg verification
|
||||||
ostree remote delete fedora-atomic
|
ostree remote delete fedora-atomic
|
||||||
ostree remote add --set=gpg-verify=true --set=gpgkeypath=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-27-primary fedora-atomic 'https://kojipkgs.fedoraproject.org/atomic/27/'
|
ostree remote add --set=gpg-verify=true --set=gpgkeypath=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-27-primary fedora-atomic 'https://kojipkgs.fedoraproject.org/atomic/27/'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user