don't build upgrade.img anymore

fedup is deprecated and abandoned. Let's save time and disk by not
building `upgrade.img` when nothing is going to use it anymore.

For the record, performing upgrades using an initramfs from the new
system turns out to be fragile and hard to support:

* dracut initramfs isn't generic enough to handle booting all systems
  (e.g. missing vconsole.conf means you get keymaps wrong, so users
  can't unlock encrypted disks)

* The ABI differences between the two versions of plymouth, systemd,
  etc. requires nasty workarounds at best and causes nightmarish
  systemd crashes at worst

This patch removes all the code that built and installed `upgrade.img`.

For backwards compatibility, the API retains the `doupgrade` keyword
argument, and the `--noupgrade` flag is still accepted.
This commit is contained in:
Will Woods 2015-08-19 16:52:27 -04:00 committed by Brian C. Lane
parent 394d37fbb5
commit a3e1a275ff
8 changed files with 0 additions and 81 deletions

View File

@ -78,9 +78,6 @@ volume id
.TP
\fB\-\-nomacboot\fR
.TP
\fB\-\-noupgrade\fR
.TP
\fB\-\-logfile=LOGFILE\fR
Path to logfile
@ -95,4 +92,3 @@ Martin Gracik
Will Woods
Brian C. Lane
.fi

View File

@ -17,9 +17,6 @@ mkdir ${KERNELDIR}
## normal aarch64
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
%if doupgrade:
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
%endif
%endfor
#FIXME: this will need adjusted when we have a real bootloader.

View File

@ -36,22 +36,6 @@ mkdir ${KERNELDIR}
platforms = platforms + delimiter + kernel.flavor
delimiter = ','
%>
%if doupgrade:
## install upgrade image
installupgradeinitrd images-${kernel.flavor}-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
runcmd mkimage \
-A arm -O linux -T ramdisk -C none \
-a 0 -e 0 \
-n "${product.name} ${product.version} ${kernel.flavor} ${kernel.arch}" \
-d ${outroot}/${KERNELDIR}/upgrade-${kernel.flavor}.img \
${outroot}/${KERNELDIR}/uUpgrade-${kernel.flavor}
treeinfo images-${kernel.flavor}-${basearch} uupgrade ${KERNELDIR}/uUpgrade-${kernel.flavor}
%endif
## create U-Boot wrapped images
runcmd mkimage \
@ -75,21 +59,6 @@ mkdir ${KERNELDIR}
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
%if doupgrade:
## install upgrade image
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
runcmd mkimage \
-A arm -O linux -T ramdisk -C none \
-a 0 -e 0 \
-n "${product.name} ${product.version} ${kernel.flavor} ${kernel.arch}" \
-d ${outroot}/${KERNELDIR}/upgrade.img \
${outroot}/${KERNELDIR}/uUpgrade
treeinfo images-${basearch} uupgrade ${KERNELDIR}/uUpgrade
%endif
## create U-Boot wrapped images
runcmd mkimage \
@ -131,4 +100,3 @@ treeinfo ${basearch} platforms ${platforms}
%>
## FIXME: ARM may need some extra boot config

View File

@ -68,11 +68,6 @@ install ${configdir}/mapping ${BOOTDIR}
installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
%if doupgrade:
## upgrade image
installupgradeinitrd images-${kernel.arch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
%endif
## kernel-wrapper magic that makes the netboot combined ppc{32,64}.img
runcmd ${inroot}/${WRAPPER} -p of \
-D ${inroot}/${WRAPPER_DATA} \

View File

@ -54,11 +54,6 @@ install ${configdir}/mapping ${BOOTDIR}
installkernel images-${kernel.arch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
%if doupgrade:
## upgrade image
installupgradeinitrd images-${kernel.arch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
%endif
treeinfo images-${kernel.arch} zimage
%endfor

View File

@ -26,11 +26,6 @@ replace @INITRD_LOAD_ADDRESS@ ${INITRD_ADDRESS} generic.ins
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
%if doupgrade:
## upgrader image
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
%endif
## s390 needs some extra boot config
createaddrsize ${INITRD_ADDRESS} ${outroot}/${BOOTDIR}/initrd.img ${outroot}/${BOOTDIR}/initrd.addrsize

View File

@ -44,30 +44,18 @@ mkdir ${KERNELDIR}
## i386 PAE
installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
installinitrd images-xen ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
%if doupgrade:
installupgradeinitrd images-xen ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
%endif
%else:
## normal i386, x86_64
installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
%if doupgrade:
installupgradeinitrd images-${basearch} ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
%endif
%endif
%endfor
hardlink ${KERNELDIR}/vmlinuz ${BOOTDIR}
hardlink ${KERNELDIR}/initrd.img ${BOOTDIR}
%if doupgrade:
hardlink ${KERNELDIR}/upgrade.img ${BOOTDIR}
%endif
%if basearch == 'x86_64':
treeinfo images-xen kernel ${KERNELDIR}/vmlinuz
treeinfo images-xen initrd ${KERNELDIR}/initrd.img
%if doupgrade:
treeinfo images-xen upgrade ${KERNELDIR}/upgrade.img
%endif
%endif
## WHeeeeeeee, EFI.

View File

@ -338,21 +338,6 @@ class Lorax(BaseLoraxClass):
treebuilder.rebuild_initrds(add_args=anaconda_args)
if doupgrade:
# Build upgrade.img. It'd be nice if these could coexist in the same
# image, but that would increase the size of the anaconda initramfs,
# which worries some people (esp. PPC tftpboot). So they're separate.
try:
# If possible, use the 'fedup' plymouth theme
themes = runcmd_output(['plymouth-set-default-theme', '--list'],
root=installroot)
if 'fedup' in themes.splitlines():
os.environ['PLYMOUTH_THEME_NAME'] = 'fedup'
except RuntimeError:
pass
upgrade_args = dracut_args + ["--add", "system-upgrade"]
treebuilder.rebuild_initrds(add_args=upgrade_args, prefix="upgrade")
logger.info("populating output tree and building boot images")
treebuilder.build()