[lorax/f18] switch to using installupgradeinitrd method for upgrade initrds

Dennis Gilmore ausil at fedoraproject.org
Mon Nov 26 23:43:44 UTC 2012


commit 719027b019a0a8f200d0230c5dd3be8e4e219bab
Author: Dennis Gilmore <dennis at ausil.us>
Date:   Mon Nov 26 17:43:35 2012 -0600

    switch to using installupgradeinitrd method for upgrade initrds

 ...treebuilder-add-prefix-to-rebuild_initrds.patch |    2 +-
 ...builder-improve-findkernels-initrd-search.patch |    2 +-
 0003-build-fedup-upgrade.img.patch                 |    2 +-
 0004-make-templates-install-upgrade.img.patch      |    2 +-
 ...Add-the-fedup-plymouth-theme-if-available.patch |    2 +-
 ...ade-from-the-sparc-and-sysylinux-config-t.patch |    2 +-
 ...-need-to-use-kernel.upgrade-not-kernel.up.patch |    2 +-
 ...initrd-to-install-the-upgrade.img-initram.patch |    2 +-
 ...upgradeinitrd-function-and-use-it-to-inst.patch |  110 ++++++++++++++++++++
 lorax.spec                                         |    7 +-
 10 files changed, 124 insertions(+), 9 deletions(-)
---
diff --git a/0001-treebuilder-add-prefix-to-rebuild_initrds.patch b/0001-treebuilder-add-prefix-to-rebuild_initrds.patch
index 42d2354..4ca515c 100644
--- a/0001-treebuilder-add-prefix-to-rebuild_initrds.patch
+++ b/0001-treebuilder-add-prefix-to-rebuild_initrds.patch
@@ -1,7 +1,7 @@
 From 88caf0bdb2fce8c5c2b0545be0bc13dd8bf5534e Mon Sep 17 00:00:00 2001
 From: Will Woods <wwoods at redhat.com>
 Date: Tue, 13 Nov 2012 01:33:14 -0500
-Subject: [PATCH 1/8] treebuilder: add 'prefix' to rebuild_initrds()
+Subject: [PATCH 1/9] treebuilder: add 'prefix' to rebuild_initrds()
 
 If 'prefix' is passed to rebuild_initrds(), it will build a *new*
 initramfs with a name like $PREFIX-$KERNELVER.img, rather than
diff --git a/0002-treebuilder-improve-findkernels-initrd-search.patch b/0002-treebuilder-improve-findkernels-initrd-search.patch
index 2589276..a1b2d34 100644
--- a/0002-treebuilder-improve-findkernels-initrd-search.patch
+++ b/0002-treebuilder-improve-findkernels-initrd-search.patch
@@ -1,7 +1,7 @@
 From d11a97fec8efc57f1a6cb2f1bbb270dc67bf873a Mon Sep 17 00:00:00 2001
 From: Will Woods <wwoods at redhat.com>
 Date: Tue, 13 Nov 2012 01:33:15 -0500
-Subject: [PATCH 2/8] treebuilder: improve findkernels() initrd search
+Subject: [PATCH 2/9] treebuilder: improve findkernels() initrd search
 
 This makes findkernels() look for any image named something like:
 
diff --git a/0003-build-fedup-upgrade.img.patch b/0003-build-fedup-upgrade.img.patch
index 1632804..c97bd56 100644
--- a/0003-build-fedup-upgrade.img.patch
+++ b/0003-build-fedup-upgrade.img.patch
@@ -1,7 +1,7 @@
 From f78b7e0b27da49e3465425e24eacf4e92594cba4 Mon Sep 17 00:00:00 2001
 From: Will Woods <wwoods at redhat.com>
 Date: Tue, 13 Nov 2012 01:33:16 -0500
-Subject: [PATCH 3/8] build fedup upgrade.img
+Subject: [PATCH 3/9] build fedup upgrade.img
 
 Use rebuild_initrds() with prefix='upgrade' to build upgrade.img with
 the fedup "system-upgrade" module(s) inside.
diff --git a/0004-make-templates-install-upgrade.img.patch b/0004-make-templates-install-upgrade.img.patch
index 6316068..df82637 100644
--- a/0004-make-templates-install-upgrade.img.patch
+++ b/0004-make-templates-install-upgrade.img.patch
@@ -1,7 +1,7 @@
 From 5df53dcbf2c1530beea9911594482b968639da2a Mon Sep 17 00:00:00 2001
 From: Will Woods <wwoods at redhat.com>
 Date: Tue, 13 Nov 2012 01:33:17 -0500
-Subject: [PATCH 4/8] make templates install upgrade.img
+Subject: [PATCH 4/9] make templates install upgrade.img
 
 ---
  share/arm.tmpl  | 12 ++++++++++--
diff --git a/0005-Add-the-fedup-plymouth-theme-if-available.patch b/0005-Add-the-fedup-plymouth-theme-if-available.patch
index b934b21..fbe361f 100644
--- a/0005-Add-the-fedup-plymouth-theme-if-available.patch
+++ b/0005-Add-the-fedup-plymouth-theme-if-available.patch
@@ -1,7 +1,7 @@
 From aa1775da338a93494ef952dfb355157e192a7724 Mon Sep 17 00:00:00 2001
 From: Will Woods <wwoods at redhat.com>
 Date: Tue, 13 Nov 2012 01:33:18 -0500
-Subject: [PATCH 5/8] Add the 'fedup' plymouth theme if available
+Subject: [PATCH 5/9] Add the 'fedup' plymouth theme if available
 
 ---
  src/pylorax/__init__.py | 10 +++++++++-
diff --git a/0006-remove-upgrade-from-the-sparc-and-sysylinux-config-t.patch b/0006-remove-upgrade-from-the-sparc-and-sysylinux-config-t.patch
index 5d0b1c2..d0ed610 100644
--- a/0006-remove-upgrade-from-the-sparc-and-sysylinux-config-t.patch
+++ b/0006-remove-upgrade-from-the-sparc-and-sysylinux-config-t.patch
@@ -1,7 +1,7 @@
 From 27685cfb2fdab565a607d0a1e6355c607f1fcfc6 Mon Sep 17 00:00:00 2001
 From: Dennis Gilmore <dennis at ausil.us>
 Date: Tue, 20 Nov 2012 17:04:47 -0600
-Subject: [PATCH 6/8] remove upgrade from the sparc and sysylinux config
+Subject: [PATCH 6/9] remove upgrade from the sparc and sysylinux config
  templates
 
 ---
diff --git a/0007-ppc-and-arm-need-to-use-kernel.upgrade-not-kernel.up.patch b/0007-ppc-and-arm-need-to-use-kernel.upgrade-not-kernel.up.patch
index 925491e..11663df 100644
--- a/0007-ppc-and-arm-need-to-use-kernel.upgrade-not-kernel.up.patch
+++ b/0007-ppc-and-arm-need-to-use-kernel.upgrade-not-kernel.up.patch
@@ -1,7 +1,7 @@
 From 0f5330c9a360389d11e4a9b140276ff680e2684d Mon Sep 17 00:00:00 2001
 From: Dennis Gilmore <dennis at ausil.us>
 Date: Wed, 21 Nov 2012 21:52:36 -0600
-Subject: [PATCH 7/8] ppc and arm need to use kernel.upgrade not
+Subject: [PATCH 7/9] ppc and arm need to use kernel.upgrade not
  kernel.upgrader
 
 ---
diff --git a/0008-use-installinitrd-to-install-the-upgrade.img-initram.patch b/0008-use-installinitrd-to-install-the-upgrade.img-initram.patch
index 63f00ee..ad0edc6 100644
--- a/0008-use-installinitrd-to-install-the-upgrade.img-initram.patch
+++ b/0008-use-installinitrd-to-install-the-upgrade.img-initram.patch
@@ -1,7 +1,7 @@
 From fdd04d4e7e081137c82d24c9ab69eef41a2d2117 Mon Sep 17 00:00:00 2001
 From: Dennis Gilmore <dennis at ausil.us>
 Date: Thu, 22 Nov 2012 19:55:32 -0600
-Subject: [PATCH 8/8] use installinitrd to install the upgrade.img initramfs
+Subject: [PATCH 8/9] use installinitrd to install the upgrade.img initramfs
  so that we get correct permissions
 
 ---
diff --git a/0009-add-installupgradeinitrd-function-and-use-it-to-inst.patch b/0009-add-installupgradeinitrd-function-and-use-it-to-inst.patch
new file mode 100644
index 0000000..449fba0
--- /dev/null
+++ b/0009-add-installupgradeinitrd-function-and-use-it-to-inst.patch
@@ -0,0 +1,110 @@
+From a69f256029f4144109e288db5f0ad09119175e17 Mon Sep 17 00:00:00 2001
+From: Dennis Gilmore <dennis at ausil.us>
+Date: Mon, 26 Nov 2012 17:26:45 -0600
+Subject: [PATCH 9/9] add installupgradeinitrd function and use it to install
+ the upgrade initrds
+
+---
+ share/arm.tmpl       | 6 ++----
+ share/ppc.tmpl       | 3 +--
+ share/s390.tmpl      | 3 +--
+ share/x86.tmpl       | 6 ++----
+ src/pylorax/ltmpl.py | 9 +++++++++
+ 5 files changed, 15 insertions(+), 12 deletions(-)
+
+diff --git a/share/arm.tmpl b/share/arm.tmpl
+index 08d9254..13649b0 100644
+--- a/share/arm.tmpl
++++ b/share/arm.tmpl
+@@ -33,8 +33,7 @@ mkdir ${KERNELDIR}
+         installinitrd images-${kernel.flavor}-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
+ 
+         ## install upgrade image
+-        installinitrd ${kernel.upgrade.img} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+-        treeinfo images-${kernel.flavor}-${basearch} upgrade ${KERNELDIR}/upgrade-${kernel.flavor}.img
++        installupgradeinitrd ${kernel.upgrade.img} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+ 
+         ## create U-Boot wrapped images
+ 
+@@ -60,8 +59,7 @@ mkdir ${KERNELDIR}
+         installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+ 
+         ## install upgrade image
+-        installinitrd ${kernel.upgrade.img} ${KERNELDIR}/upgrade.img
+-        treeinfo images-${basearch} upgrade ${KERNELDIR}/upgrade.img
++        installupgradeinitrd ${kernel.upgrade.img} ${KERNELDIR}/upgrade.img
+ 
+         ## create U-Boot wrapped images
+ 
+diff --git a/share/ppc.tmpl b/share/ppc.tmpl
+index 3eb4a89..68d8bf6 100644
+--- a/share/ppc.tmpl
++++ b/share/ppc.tmpl
+@@ -67,8 +67,7 @@ install ${configdir}/magic ${BOOTDIR}
+     installinitrd images-${kernel.arch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+ 
+     ## upgrade image
+-    installinitrd ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+-    treeinfo images-${kernel.arch} upgrade ${KERNELDIR}/upgrade.img
++    installupgradeinitrd ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+ 
+     ## install arch-specific bootloader config
+     install ${configdir}/yaboot.conf.in  ${KERNELDIR}/yaboot.conf
+diff --git a/share/s390.tmpl b/share/s390.tmpl
+index dcd78d2..d03c336 100644
+--- a/share/s390.tmpl
++++ b/share/s390.tmpl
+@@ -25,8 +25,7 @@ installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/kernel.img
+ installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+ 
+ ## upgrader image
+-installinitrd ${kernel.upgrade.img} ${KERNELDIR}/upgrade.img
+-treeinfo images-${basearch} upgrade ${KERNELDIR}/upgrade.img
++installupgradeinitrd ${kernel.upgrade.img} ${KERNELDIR}/upgrade.img
+ 
+ ## s390 needs some extra boot config
+ createaddrsize ${INITRD_ADDRESS} ${outroot}/${BOOTDIR}/initrd.img ${outroot}/${BOOTDIR}/initrd.addrsize
+diff --git a/share/x86.tmpl b/share/x86.tmpl
+index de2ab89..9bd4cee 100644
+--- a/share/x86.tmpl
++++ b/share/x86.tmpl
+@@ -34,14 +34,12 @@ mkdir ${KERNELDIR}
+         ## i386 PAE
+         installkernel images-xen ${kernel.path} ${KERNELDIR}/vmlinuz-${kernel.flavor}
+         installinitrd images-xen ${kernel.initrd.path} ${KERNELDIR}/initrd-${kernel.flavor}.img
+-        installinitrd ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+-        treeinfo images-xen upgrade ${KERNELDIR}/upgrade-${kernel.flavor}.img
++        installupgradeinitrd ${kernel.upgrade.path} ${KERNELDIR}/upgrade-${kernel.flavor}.img
+     %else:
+         ## normal i386, x86_64
+         installkernel images-${basearch} ${kernel.path} ${KERNELDIR}/vmlinuz
+         installinitrd images-${basearch} ${kernel.initrd.path} ${KERNELDIR}/initrd.img
+-        installinitrd ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+-        treeinfo images-${basearch} upgrade ${KERNELDIR}/upgrade.img
++        installupgradeinitrd ${kernel.upgrade.path} ${KERNELDIR}/upgrade.img
+     %endif
+ %endfor
+ 
+diff --git a/src/pylorax/ltmpl.py b/src/pylorax/ltmpl.py
+index 3dda557..040f1aa 100644
+--- a/src/pylorax/ltmpl.py
++++ b/src/pylorax/ltmpl.py
+@@ -305,6 +305,15 @@ class LoraxTemplateRunner(object):
+         self.chmod(dest, '644')
+         self.treeinfo(section, "initrd", dest)
+ 
++    def installupgradeinitrd(self, section, src, dest):
++        '''
++        installupgradeinitrd SECTION SRC DEST
++          Same as installkernel, but for "upgrade".
++        '''
++        self.install(src, dest)
++        self.chmod(dest, '644')
++        self.treeinfo(section, "upgrade", dest)
++
+     def hardlink(self, src, dest):
+         '''
+         hardlink SRC DEST
+-- 
+1.8.0
+
diff --git a/lorax.spec b/lorax.spec
index 517c76a..687f253 100644
--- a/lorax.spec
+++ b/lorax.spec
@@ -2,7 +2,7 @@
 
 Name:           lorax
 Version:        18.22
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Tool for creating the anaconda install images
 
 Group:          Applications/System
@@ -61,6 +61,7 @@ Patch4: 0005-Add-the-fedup-plymouth-theme-if-available.patch
 Patch5: 0006-remove-upgrade-from-the-sparc-and-sysylinux-config-t.patch
 Patch6: 0007-ppc-and-arm-need-to-use-kernel.upgrade-not-kernel.up.patch
 Patch7: 0008-use-installinitrd-to-install-the-upgrade.img-initram.patch
+Patch8: 0009-add-installupgradeinitrd-function-and-use-it-to-inst.patch
 
 %description
 Lorax is a tool for creating the anaconda install images.
@@ -79,6 +80,7 @@ Anaconda's image install feature.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 %build
 
@@ -101,6 +103,9 @@ make DESTDIR=$RPM_BUILD_ROOT install
 
 
 %changelog
+* Tue Nov 27 2012 Dennis Gilmore <dennis at ausil.us> 18.22-6
+- switch to using installupgradeinitrd method for upgrade initrds
+
 * Fri Nov 23 2012 Dennis Gilmore <dennis at ausil.us> 18.22-5
 - add patch fixing composing on ppc and arm
 - add patch to fix permissions of upgrade.img


More information about the scm-commits mailing list