lorax/lorax-git.patch

223 lines
7.9 KiB
Diff

commit c4368c98ecd0d34957988bd00f8ed0a900c87cb4
Author: Martin Gracik <mgracik@redhat.com>
Date: Mon Jan 31 20:58:04 2011 +0100
Create /var/run/dbus directory in installtree
commit cdff835357790535702ccf210e5384d40ed71d2e
Author: Martin Gracik <mgracik@redhat.com>
Date: Mon Jan 31 20:57:07 2011 +0100
Add mkdir support to template
Allow mkdir command in initrd template,
so we can specify directories we need
to create in install tree.
commit 8d4be0f87c170ba988755131e9d46a9a69a8db4e
Author: Martin Gracik <mgracik@redhat.com>
Date: Wed Jan 26 11:29:15 2011 +0100
gpart is present only on i386 arch (#672611)
Don't try to install it on other archs.
commit 7a98dc4ca65377063905fd5e574c35cc9111d406
Author: Martin Gracik <mgracik@redhat.com>
Date: Wed Jan 26 11:15:27 2011 +0100
util-linux-ng changed to util-linux
diff --git a/share/ramdisk.ltmpl b/share/ramdisk.ltmpl
index c63dba6..0b799a6 100644
--- a/share/ramdisk.ltmpl
+++ b/share/ramdisk.ltmpl
@@ -7,6 +7,7 @@ install "anaconda"
install "kernel"
% if basearch == "i386":
install "kernel-PAE"
+ install "gpart"
% endif
## other required packages
@@ -48,7 +49,6 @@ install "gnome-python2-gconf"
##install "gnome-themes-legacy"
install "gnome-themes-standard"
install "gobject-introspection"
-install "gpart"
install "groff"
install "grub"
install "gtk+"
@@ -195,6 +195,9 @@ install "ql2400-firmware"
install "ql2500-firmware"
install "zd1211-firmware"
+## required directories
+mkdir "/var/run/dbus"
+
## not required packages installed as dependencies
remove "ConsoleKit-x11"
remove "alsa-lib"
@@ -1117,73 +1120,73 @@ remove "sysvinit-tools" "/usr/bin/*"
remove "tar" "/usr/share/locale/*"
remove "un-core-dotum-fonts" "/usr/share/fonts/un-core/UnDotumBold.ttf"
remove "usbutils" "/usr/bin/*"
-remove "util-linux-ng" "/bin/findmnt"
-remove "util-linux-ng" "/bin/taskset"
-remove "util-linux-ng" "/etc/pam.d/chfn"
-remove "util-linux-ng" "/etc/pam.d/chsh"
-remove "util-linux-ng" "/sbin/addpart"
-remove "util-linux-ng" "/sbin/agetty"
-remove "util-linux-ng" "/sbin/cfdisk"
-remove "util-linux-ng" "/sbin/ctrlaltdel"
-remove "util-linux-ng" "/sbin/delpart"
-remove "util-linux-ng" "/sbin/findfs"
-remove "util-linux-ng" "/sbin/fsck.cramfs"
-remove "util-linux-ng" "/sbin/fsfreeze"
-remove "util-linux-ng" "/sbin/mkfs"
-remove "util-linux-ng" "/sbin/mkfs.cramfs"
-remove "util-linux-ng" "/sbin/partx"
-remove "util-linux-ng" "/sbin/pivot_root"
-remove "util-linux-ng" "/sbin/swaplabel"
-remove "util-linux-ng" "/sbin/switch_root"
-remove "util-linux-ng" "/usr/bin/cal"
-remove "util-linux-ng" "/usr/bin/chfn"
-remove "util-linux-ng" "/usr/bin/chrt"
-remove "util-linux-ng" "/usr/bin/chsh"
-remove "util-linux-ng" "/usr/bin/col"
-remove "util-linux-ng" "/usr/bin/colcrt"
-remove "util-linux-ng" "/usr/bin/colrm"
-remove "util-linux-ng" "/usr/bin/column"
-remove "util-linux-ng" "/usr/bin/ddate"
-remove "util-linux-ng" "/usr/bin/fallocate"
-remove "util-linux-ng" "/usr/bin/flock"
-remove "util-linux-ng" "/usr/bin/floppy"
-remove "util-linux-ng" "/usr/bin/getopt"
-remove "util-linux-ng" "/usr/bin/hexdump"
-remove "util-linux-ng" "/usr/bin/i386"
-remove "util-linux-ng" "/usr/bin/ionice"
-remove "util-linux-ng" "/usr/bin/ipcmk"
-remove "util-linux-ng" "/usr/bin/ipcrm"
-remove "util-linux-ng" "/usr/bin/ipcs"
-remove "util-linux-ng" "/usr/bin/isosize"
-remove "util-linux-ng" "/usr/bin/kill"
-remove "util-linux-ng" "/usr/bin/linux32"
-remove "util-linux-ng" "/usr/bin/linux64"
-remove "util-linux-ng" "/usr/bin/look"
-remove "util-linux-ng" "/usr/bin/lscpu"
-remove "util-linux-ng" "/usr/bin/mcookie"
-remove "util-linux-ng" "/usr/bin/namei"
-remove "util-linux-ng" "/usr/bin/rename"
-remove "util-linux-ng" "/usr/bin/renice"
-remove "util-linux-ng" "/usr/bin/rev"
-remove "util-linux-ng" "/usr/bin/script"
-remove "util-linux-ng" "/usr/bin/scriptreplay"
-remove "util-linux-ng" "/usr/bin/setarch"
-remove "util-linux-ng" "/usr/bin/setsid"
-remove "util-linux-ng" "/usr/bin/setterm"
-remove "util-linux-ng" "/usr/bin/tailf"
-remove "util-linux-ng" "/usr/bin/ul"
-remove "util-linux-ng" "/usr/bin/unshare"
-remove "util-linux-ng" "/usr/bin/uuidgen"
-remove "util-linux-ng" "/usr/bin/whereis"
-remove "util-linux-ng" "/usr/bin/write"
-remove "util-linux-ng" "/usr/bin/x86_64"
-remove "util-linux-ng" "/usr/sbin/fdformat"
-remove "util-linux-ng" "/usr/sbin/hwclock"
-remove "util-linux-ng" "/usr/sbin/ldattach"
-remove "util-linux-ng" "/usr/sbin/readprofile"
-remove "util-linux-ng" "/usr/sbin/rtcwake"
-remove "util-linux-ng" "/usr/sbin/tunelp"
-remove "util-linux-ng" "/usr/share/locale/*"
+remove "util-linux" "/bin/findmnt"
+remove "util-linux" "/bin/taskset"
+remove "util-linux" "/etc/pam.d/chfn"
+remove "util-linux" "/etc/pam.d/chsh"
+remove "util-linux" "/sbin/addpart"
+remove "util-linux" "/sbin/agetty"
+remove "util-linux" "/sbin/cfdisk"
+remove "util-linux" "/sbin/ctrlaltdel"
+remove "util-linux" "/sbin/delpart"
+remove "util-linux" "/sbin/findfs"
+remove "util-linux" "/sbin/fsck.cramfs"
+remove "util-linux" "/sbin/fsfreeze"
+remove "util-linux" "/sbin/mkfs"
+remove "util-linux" "/sbin/mkfs.cramfs"
+remove "util-linux" "/sbin/partx"
+remove "util-linux" "/sbin/pivot_root"
+remove "util-linux" "/sbin/swaplabel"
+remove "util-linux" "/sbin/switch_root"
+remove "util-linux" "/usr/bin/cal"
+remove "util-linux" "/usr/bin/chfn"
+remove "util-linux" "/usr/bin/chrt"
+remove "util-linux" "/usr/bin/chsh"
+remove "util-linux" "/usr/bin/col"
+remove "util-linux" "/usr/bin/colcrt"
+remove "util-linux" "/usr/bin/colrm"
+remove "util-linux" "/usr/bin/column"
+remove "util-linux" "/usr/bin/ddate"
+remove "util-linux" "/usr/bin/fallocate"
+remove "util-linux" "/usr/bin/flock"
+remove "util-linux" "/usr/bin/floppy"
+remove "util-linux" "/usr/bin/getopt"
+remove "util-linux" "/usr/bin/hexdump"
+remove "util-linux" "/usr/bin/i386"
+remove "util-linux" "/usr/bin/ionice"
+remove "util-linux" "/usr/bin/ipcmk"
+remove "util-linux" "/usr/bin/ipcrm"
+remove "util-linux" "/usr/bin/ipcs"
+remove "util-linux" "/usr/bin/isosize"
+remove "util-linux" "/usr/bin/kill"
+remove "util-linux" "/usr/bin/linux32"
+remove "util-linux" "/usr/bin/linux64"
+remove "util-linux" "/usr/bin/look"
+remove "util-linux" "/usr/bin/lscpu"
+remove "util-linux" "/usr/bin/mcookie"
+remove "util-linux" "/usr/bin/namei"
+remove "util-linux" "/usr/bin/rename"
+remove "util-linux" "/usr/bin/renice"
+remove "util-linux" "/usr/bin/rev"
+remove "util-linux" "/usr/bin/script"
+remove "util-linux" "/usr/bin/scriptreplay"
+remove "util-linux" "/usr/bin/setarch"
+remove "util-linux" "/usr/bin/setsid"
+remove "util-linux" "/usr/bin/setterm"
+remove "util-linux" "/usr/bin/tailf"
+remove "util-linux" "/usr/bin/ul"
+remove "util-linux" "/usr/bin/unshare"
+remove "util-linux" "/usr/bin/uuidgen"
+remove "util-linux" "/usr/bin/whereis"
+remove "util-linux" "/usr/bin/write"
+remove "util-linux" "/usr/bin/x86_64"
+remove "util-linux" "/usr/sbin/fdformat"
+remove "util-linux" "/usr/sbin/hwclock"
+remove "util-linux" "/usr/sbin/ldattach"
+remove "util-linux" "/usr/sbin/readprofile"
+remove "util-linux" "/usr/sbin/rtcwake"
+remove "util-linux" "/usr/sbin/tunelp"
+remove "util-linux" "/usr/share/locale/*"
remove "volume_key-libs" "/usr/share/locale/*"
remove "wget" "/etc/*"
remove "wget" "/usr/share/locale/*"
diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py
index e3bacb5..1c947c9 100644
--- a/src/pylorax/__init__.py
+++ b/src/pylorax/__init__.py
@@ -229,6 +229,15 @@ class Lorax(BaseLoraxClass):
template = ltmpl.LoraxTemplate()
template = template.parse(tfile, tvars)
+ # get required directories
+ logger.info("creating tree directories")
+ dirs = [f[1:] for f in template if f[0] == "mkdir"]
+ dirs = itertools.chain.from_iterable(dirs)
+
+ # create directories
+ for d in dirs:
+ os.makedirs(joinpaths(self.installtree.root, d))
+
# get list of required packages
logger.info("getting list of required packages")
required = [f[1:] for f in template if f[0] == "install"]