From a17813efa00977b8cf2894d4469a04f36cb9e77b Mon Sep 17 00:00:00 2001 From: Konstantin Vlasov Date: Thu, 2 Oct 2014 17:42:42 +0400 Subject: [PATCH] Got rid of initramfs --- livecd-tools-21.1.drop.initramfs.patch | 50 ++++++++++++++++++++++++++ livecd-tools.spec | 4 ++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 livecd-tools-21.1.drop.initramfs.patch diff --git a/livecd-tools-21.1.drop.initramfs.patch b/livecd-tools-21.1.drop.initramfs.patch new file mode 100644 index 0000000..08691cc --- /dev/null +++ b/livecd-tools-21.1.drop.initramfs.patch @@ -0,0 +1,50 @@ +diff --git a/imgcreate/live.py b/imgcreate/live.py +old mode 100755 +new mode 100644 +index a23efa7..cc69c19 +--- a/imgcreate/live.py ++++ b/imgcreate/live.py +@@ -473,15 +473,17 @@ class x86LiveImageCreator(LiveImageCreatorBase): + isodir + "/isolinux/vmlinuz" + index) + + isDracut = False +- if os.path.exists(bootdir + "/initramfs-" + version + ".img"): +- shutil.copyfile(bootdir + "/initramfs-" + version + ".img", +- isodir + "/isolinux/initrd" + index + ".img") +- isDracut = True +- elif os.path.exists(bootdir + "/initrd-" + version + ".img"): ++ if os.path.exists(bootdir + "/initrd-" + version + ".img"): + shutil.copyfile(bootdir + "/initrd-" + version + ".img", + isodir + "/isolinux/initrd" + index + ".img") +- elif not self.base_on: +- logging.error("No initrd or initramfs found for %s" % (version,)) ++ isDracut = True ++ else: ++ raise InitramfsError("Unable to create initrd-" + version + ".img") ++# elif os.path.exists(bootdir + "/initrd-" + version + ".img"): ++# shutil.copyfile(bootdir + "/initrd-" + version + ".img", ++# isodir + "/isolinux/initrd" + index + ".img") ++# elif not self.base_on: ++# logging.error("No initrd or initramfs found for %s" % (version,)) + + is_xen = False + if os.path.exists(bootdir + "/xen.gz-" + version[:-3]): +@@ -914,13 +916,14 @@ class ppcLiveImageCreator(LiveImageCreatorBase): + shutil.copyfile(bootdir + "/vmlinuz-" + version, + destdir + "/vmlinuz") + +- if os.path.exists(bootdir + "/initramfs-" + version + ".img"): +- shutil.copyfile(bootdir + "/initramfs-" + version + ".img", ++ if os.path.exists(bootdir + "/initrd-" + version + ".img"): ++ shutil.copyfile(bootdir + "/initrd-" + version + ".img", + destdir + "/initrd.img") + isDracut = True + else: +- shutil.copyfile(bootdir + "/initrd-" + version + ".img", +- destdir + "/initrd.img") ++ raise InitramfsError("Unable to create initrd-" + version + ".img") ++# shutil.copyfile(bootdir + "/initrd-" + version + ".img", ++# destdir + "/initrd.img") + + return isDracut + diff --git a/livecd-tools.spec b/livecd-tools.spec index 2dbcde7..39ca2c4 100644 --- a/livecd-tools.spec +++ b/livecd-tools.spec @@ -5,7 +5,7 @@ Summary: Tools for building live CDs Name: livecd-tools Version: 21.1 -Release: 11 +Release: 12 Epoch: 1 License: GPLv2 Group: System/Base @@ -24,6 +24,7 @@ Patch7: livecd-tools-21.1.no.mac.img.patch Patch8: livecd-tools-21.1.isolinux.plymouth.fixes.patch Patch9: livecd-tools-21.1.efi.grub.cfg.patch Patch10: livecd-tools-21.1.pkg.installation.fix.patch +Patch11: livecd-tools-21.1.drop.initramfs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: python-imgcreate = %{epoch}:%{version}-%{release} @@ -83,6 +84,7 @@ like live image or appliances. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build make