diff --git a/share/ramdisk.ltmpl b/share/ramdisk.ltmpl
deleted file mode 100644
index 8dd59301..00000000
--- a/share/ramdisk.ltmpl
+++ /dev/null
@@ -1,1265 +0,0 @@
-## lorax template file
-
-## anaconda package
-install "anaconda"
-
-## kernel
-install "kernel"
-% if basearch == "i386":
- install "kernel-PAE"
- install "gpart"
-% endif
-
-## x86 specific packages
-% if basearch == "i386" or basearch == "x86_64":
- install "biosdevname"
- install "efibootmgr"
- install "firstaidkit-plugin-grub"
- install "grub"
- install "memtest86+"
-% endif
-
-## ppc specific packages
-% if basearch == "ppc":
- install "fbset"
- install "hfsutils"
- install "kernel-bootwrapper"
- install "pcmciautils"
- install "pdisk"
- install "ppc64-utils"
- install "yaboot"
-% endif
-
-## s390 specific packages
-% if basearch == "s390x":
- install "lsscsi"
- install "modutils"
- install "mount"
- install "s390utils-base"
- install "s390utils-cmsfs"
-% endif
-
-## sparc specific packages
-% if basearch == "sparc":
- install "silo"
- install "tilo"
-% endif
-
-## other required packages
-install "NetworkManager-gnome"
-install "at-spi"
-install "at-spi-python"
-install "at-spi2-atk"
-install "audit"
-install "bind-libs"
-install "bind-utils"
-install "bitmap-fangsongti-fonts"
-install "btrfs-progs"
-install "bzip2-libs"
-install "cjkuni-uming-fonts"
-install "dbus-libs"
-install "dbus-x11"
-install "dejavu-sans-fonts"
-install "dejavu-sans-mono-fonts"
-install "dogtail"
-install "dump"
-install "ethtool"
-install "fedora-gnome-theme"
-install "fedora-icon-theme"
-install "firstaidkit-engine"
-install "firstboot"
-install "ftp"
-install "gdb-gdbserver"
-install "gdk-pixbuf"
-install "gfs2-utils"
-install "glib"
-install "gnome-bluetooth-libs"
-install "gnome-icon-theme-legacy"
-install "gnome-keyring"
-install "gnome-python2-bonobo"
-install "gnome-python2-gconf"
-install "gnome-themes-standard"
-install "gobject-introspection"
-install "groff"
-install "gtk+"
-install "hdparm"
-install "jfsutils"
-install "kacst-farsi-fonts"
-install "kacst-qurn-fonts"
-install "lcms-libs"
-install "libbonobo"
-install "libgcc"
-install "libgnome-keyring"
-install "libgssglue"
-install "libmlx4"
-install "libsemanage-python"
-install "libsysfs"
-install "libtirpc"
-install "lklug-fonts"
-install "lohit-assamese-fonts"
-install "lohit-bengali-fonts"
-install "lohit-devanagari-fonts"
-install "lohit-gujarati-fonts"
-install "lohit-kannada-fonts"
-install "lohit-oriya-fonts"
-install "lohit-punjabi-fonts"
-install "lohit-tamil-fonts"
-install "lohit-telugu-fonts"
-install "lsof"
-install "lvm2-cluster"
-install "madan-fonts"
-install "man-db"
-install "metacity"
-install "mt-st"
-install "mtr"
-install "nfs-utils"
-install "notification-daemon"
-install "ntfs-3g"
-install "openssh-server"
-install "pciutils"
-install "pciutils-libs"
-install "pcmciautils"
-install "polkit-desktop-policy"
-install "pyatspi"
-install "pyorbit"
-install "python-epdb"
-install "python-ethtool"
-install "python-imaging"
-install "python-volume_key"
-install "rdate"
-install "reiserfs-utils"
-install "rsh"
-install "rsync"
-install "rsyslog"
-install "samba-common"
-install "samba-winbind-clients"
-install "selinux-policy-targeted"
-install "smartmontools"
-install "smc-meera-fonts"
-install "specspo"
-install "strace"
-install "systemd-sysvinit"
-install "tigervnc-server-minimal"
-install "tigervnc-server-module"
-install "udev"
-install "un-core-dotum-fonts"
-install "usbutils"
-install "vconfig"
-install "vim-minimal"
-install "vlgothic-fonts"
-install "volume_key"
-install "volume_key-libs"
-install "wget"
-install "xfsprogs"
-install "xorg-x11-drivers"
-install "xorg-x11-fonts-ethiopic"
-install "xorg-x11-fonts-misc"
-install "xorg-x11-server-Xorg"
-install "xorg-x11-server-utils"
-install "xz"
-install "yum-langpacks"
-install "${product}-logos"
-install "${product}-release"
-
-## required firmware
-% if basearch != "s390x":
- install "aic94xx-firmware"
- install "ar9170-firmware"
- install "atmel-firmware"
- install "ipw2100-firmware"
- install "ipw2200-firmware"
- install "iwl1000-firmware"
- install "iwl3945-firmware"
- install "iwl4965-firmware"
- install "iwl5000-firmware"
- install "iwl5150-firmware"
- install "iwl6000-firmware"
- install "iwl6050-firmware"
- install "ql2100-firmware"
- install "ql2200-firmware"
- install "ql23xx-firmware"
- install "ql2400-firmware"
- install "ql2500-firmware"
- install "zd1211-firmware"
-% endif
-
-## required directories
-mkdir "/var/run/dbus"
-
-## not required packages installed as dependencies
-remove "ConsoleKit-x11"
-remove "alsa-lib"
-remove "augeas-libs"
-remove "authconfig-gtk"
-remove "avahi-autoipd"
-remove "avahi-libs"
-remove "basesystem"
-remove "checkpolicy"
-remove "chkconfig"
-remove "clusterlib"
-remove "clutter"
-remove "clutter-gesture"
-remove "clutter-imcontext"
-remove "cman"
-remove "control-center-filesystem"
-remove "coreutils-libs"
-remove "corosync"
-remove "corosynclib"
-remove "cronie"
-remove "cronie-anacron"
-remove "crontabs"
-remove "cups-libs"
-remove "curl"
-remove "cyrus-sasl"
-remove "cyrus-sasl-md5"
-remove "dash"
-remove "db4-utils"
-remove "dejavu-fonts-common"
-remove "deltarpm"
-remove "desktop-file-utils"
-remove "device-mapper-event"
-remove "diffutils"
-remove "dmraid-events"
-remove "dracut"
-remove "fedora-release"
-remove "fedora-release-rawhide"
-remove "fence-agents"
-remove "fence-virt"
-remove "file"
-remove "filesystem"
-remove "fipscheck"
-remove "flac"
-remove "fontpackages-filesystem"
-remove "genisoimage"
-remove "gnome-python2"
-remove "gnome-vfs2"
-remove "gnupg2"
-remove "grubby"
-remove "gstreamer-tools"
-remove "hal-libs"
-remove "info"
-remove "ipmitool"
-remove "iptables"
-remove "iptables-ipv6"
-remove "isomd5sum"
-remove "jasper-libs"
-remove "json-glib"
-remove "kbd-misc"
-remove "libIDL"
-remove "libXScrnSaver"
-remove "libXmu"
-remove "libXres"
-remove "libXt"
-remove "libXv"
-remove "libXvMC"
-remove "libXxf86misc"
-remove "libXxf86vm"
-remove "libasyncns"
-remove "libccss"
-remove "libcgroup"
-remove "libcroco"
-remove "libdaemon"
-remove "libevent"
-remove "libgnome"
-remove "libhbaapi"
-remove "libhbalinux"
-remove "libibverbs"
-remove "libmcpp"
-remove "libmodman"
-remove "libmx"
-remove "libnih"
-remove "libpcap"
-remove "libproxy"
-remove "librdmacm"
-remove "librsvg2"
-remove "libselinux-utils"
-remove "libsndfile"
-remove "libsoup"
-remove "libtiff"
-remove "libutempter"
-remove "libvirt-client"
-remove "libwnck"
-remove "libxslt"
-remove "linux-atm-libs"
-remove "llvm"
-remove "lm_sensors-libs"
-remove "logrotate"
-remove "lvm2-libs"
-remove "m4"
-remove "mailx"
-remove "makebootfat"
-remove "mcpp"
-remove "mesa-dri-drivers"
-remove "mesa-libGL"
-remove "mingetty"
-remove "mobile-broadband-provider-info"
-remove "modcluster"
-remove "mutter-mbl"
-remove "mutter-moblin"
-remove "nbtk"
-remove "nc"
-remove "net-snmp-libs"
-remove "net-snmp-perl"
-remove "net-snmp-utils"
-remove "netcf-libs"
-remove "nfs-utils-lib"
-remove "nss-sysinit"
-remove "nss-tools"
-remove "ntp"
-remove "numactl"
-remove "oddjob"
-remove "openais"
-remove "openaislib"
-remove "passwd"
-remove "perl"
-remove "perl-Module-Pluggable"
-remove "perl-Net-Telnet"
-remove "perl-Pod-Escapes"
-remove "perl-Pod-Simple"
-remove "perl-libs"
-remove "perl-threads"
-remove "perl-threads-shared"
-remove "pexpect"
-remove "pinentry"
-remove "pkgconfig"
-remove "plymouth"
-remove "plymouth-core-libs"
-remove "plymouth-scripts"
-remove "ppp"
-remove "pth"
-remove "pulseaudio-libs"
-remove "redhat-menus"
-remove "ricci"
-remove "rmt"
-remove "rpcbind"
-remove "selinux-policy"
-remove "setuptool"
-remove "sg3_utils"
-remove "sg3_utils-libs"
-remove "sgml-common"
-remove "sgpio"
-remove "shadow-utils"
-remove "shared-mime-info"
-remove "smc-fonts-common"
-remove "sound-theme-freedesktop"
-remove "squashfs-tools"
-remove "system-config-firewall-base"
-remove "system-config-users"
-remove "systemd-units"
-remove "telnet"
-remove "tigervnc-license"
-remove "ttmkfdir"
-remove "un-core-fonts-common"
-remove "usermode"
-remove "usermode-gtk"
-remove "vlgothic-fonts-common"
-remove "xdg-utils"
-remove "xen-libs"
-remove "xen-licenses"
-remove "xml-common"
-remove "xorg-x11-font-utils"
-remove "xorg-x11-server-common"
-remove "xorg-x11-xauth"
-remove "xorg-x11-xinit"
-remove "yajl"
-remove "yum-utils"
-
-## required modules
-module "8021q"
-module "=drm"
-module "=net"
-module "=scsi"
-module "aes_generic"
-module "appletouch"
-module "arc4"
-module "bcm5974"
-module "btrfs"
-module "cbc"
-module "cifs"
-module "cramfs"
-module "crc32c"
-module "crypto_blkcipher"
-module "dm-crypt"
-module "dm-mirror"
-module "dm-mod"
-module "dm-multipath"
-module "dm-round-robin"
-module "dm-snapshot"
-module "dm-zero"
-module "ecb"
-module "edd"
-module "ehci-hcd"
-module "ext2"
-module "ext3"
-module "ext4"
-module "fat"
-module "firewire-ohci"
-module "firewire-sbp2"
-module "floppy"
-module "fuse"
-module "fw-ohci"
-module "fw-sbp2"
-module "gfs2"
-module "hfsplus"
-module "i82365"
-module "ide-cd"
-module "ide-cd_mod"
-module "ipv6"
-module "iscsi_ibft"
-module "iscsi_tcp"
-module "jfs"
-module "linear"
-module "lockd"
-module "loop"
-module "lrw"
-module "mmc-block"
-module "mousedev"
-module "msdos"
-module "netconsole"
-module "nfs"
-module "ohci-hcd"
-module "ohci1394"
-module "pcmcia"
-module "pcspkr"
-module "raid0"
-module "raid1"
-module "raid10"
-module "raid456"
-module "raid5"
-module "raid6"
-module "reiserfs"
-module "sbp2"
-module "scsi_mod"
-module "scsi_wait_scan"
-module "sd_mod"
-module "sdhci"
-module "sdhci-pci"
-module "sg"
-module "sha256_generic"
-module "squashfs"
-module "sr_mod"
-module "st"
-module "sunrpc"
-module "tcic"
-module "ub"
-module "udf"
-module "uhci-hcd"
-module "ums-alauda"
-module "ums-cypress"
-module "ums-datafab"
-module "ums-freecom"
-module "ums-jumpshot"
-module "ums-karma"
-module "ums-onetouch"
-module "ums-sddr09"
-module "ums-sddr55"
-module "ums-usbat"
-module "usb-storage"
-module "usbhid"
-module "vfat"
-module "virtio_pci"
-module "xfs"
-module "xts"
-module "yenta_socket"
-
-## s390 modules
-% if basearch == "s390x":
- module "dasd_eckd_mod"
- module "dasd_fba_mod"
- module "dasd_diag_mod"
-% endif
-
-## other removals
-remove --path "/usr/share/doc"
-remove --path "/usr/share/info"
-remove --path "/usr/share/man"
-remove --path "/usr/share/gnome"
-remove --path "/usr/share/mime/application"
-remove --path "/usr/share/mime/audio"
-remove --path "/usr/share/mime/image"
-remove --path "/usr/share/mime/inode"
-remove --path "/usr/share/mime/message"
-remove --path "/usr/share/mime/model"
-remove --path "/usr/share/mime/multipart"
-remove --path "/usr/share/mime/packages"
-remove --path "/usr/share/mime/text"
-remove --path "/usr/share/mime/video"
-remove --path "/usr/share/mime/x-content"
-remove --path "/usr/share/mime/x-epoc"
-remove --path "/boot"
-remove --path "/cgroup"
-remove --path "/home"
-remove --path "/media"
-remove --path "/mnt"
-remove --path "/opt"
-remove --path "/srv"
-remove --path "/usr/etc"
-remove --path "/usr/games"
-remove --path "/usr/local"
-remove --path "/usr/tmp"
-remove --path "/var/cache"
-remove --path "/var/db"
-remove --path "/var/games"
-remove --path "/var/lib/rpm/*"
-remove --path "/var/lib/yum"
-remove --path "/var/local"
-remove --path "/var/log"
-remove --path "/var/mail"
-remove --path "/var/nis"
-remove --path "/var/opt"
-remove --path "/var/preserve"
-remove --path "/var/report"
-remove --path "/var/spool"
-remove --path "/var/tmp"
-remove --path "/var/yp"
-
-## icons cache
-remove --path "/usr/share/icons/*/icon-theme.cache"
-
-## other package specific removals
-remove "ConsoleKit" "/etc/ConsoleKit*"
-remove "ConsoleKit" "/etc/init/*"
-remove "ConsoleKit" "/lib/systemd/*"
-remove "ConsoleKit" "/usr/bin/*"
-remove "ConsoleKit" "/usr/lib/*"
-remove "ConsoleKit" "/usr/sbin/*"
-remove "GConf2" "/etc/rpm/*"
-remove "GConf2" "/etc/xdg/*"
-remove "GConf2" "/usr/bin/*"
-remove "GConf2" "/usr/lib/GConf/2/libgconfbackend-evoldap*"
-remove "GConf2" "/usr/lib/GConf/2/libgconfbackend-oldxml*"
-remove "GConf2" "/usr/lib/gio/*"
-remove "GConf2" "/usr/libexec/gconf-defaults-mechanism"
-remove "GConf2" "/usr/share/GConf/*"
-remove "GConf2" "/usr/share/locale/*"
-remove "GConf2" "/usr/share/sgml/*"
-remove "ModemManager" "/usr/${libdir}/*"
-remove "ModemManager" "/usr/sbin/*"
-remove "ModemManager" "/usr/share/icons/*"
-remove "NetworkManager" "/etc/rc.d/*"
-remove "NetworkManager" "/lib/systemd/*"
-remove "NetworkManager" "/usr/bin/*"
-remove "NetworkManager" "/usr/share/NetworkManager/*"
-remove "NetworkManager" "/usr/share/locale/*/NetworkManager.mo"
-remove "NetworkManager-gnome" "/etc/xdg/*"
-remove "NetworkManager-gnome" "/usr/bin/nm-applet"
-remove "NetworkManager-gnome" "/usr/${libdir}/*"
-remove "NetworkManager-gnome" "/usr/share/applications/*"
-remove "anaconda" "/etc/*"
-remove "anaconda" "/usr/share/applications/*"
-remove "anaconda" "/usr/share/icons/*"
-remove "at-spi" "/etc/xdg/*"
-remove "at-spi" "/usr/${libdir}/libcspi*"
-remove "at-spi" "/usr/${libdir}/libloginhelper*"
-remove "at-spi" "/usr/share/locale/*"
-remove "atk" "/usr/share/locale/*"
-remove "audit" "/etc/*"
-remove "audit" "/sbin/audispd"
-remove "audit" "/sbin/auditctl"
-remove "audit" "/sbin/aureport"
-remove "audit" "/sbin/ausearch"
-remove "audit" "/sbin/autrace"
-remove "audit" "/usr/bin/*"
-remove "audit-libs" "/etc/*"
-remove "audit-libs" "/${libdir}/libauparse*"
-remove "authconfig" "/usr/sbin/*"
-remove "authconfig" "/usr/share/*"
-remove "avahi" "/usr/share/locale/*"
-remove "bash" "/etc/*"
-remove "bash" "/usr/bin/*"
-remove "bash" "/usr/share/*"
-remove "bind-libs-lite" "/usr/${libdir}/libirs*"
-remove "bind-libs-lite" "/usr/${libdir}/libisccfg-export*"
-remove "bind-utils" "/usr/bin/dig"
-remove "bind-utils" "/usr/bin/host"
-remove "bind-utils" "/usr/bin/nsupdate"
-remove "bitmap-fangsongti-fonts" "/usr/share/fonts/*"
-remove "btrfs-progs" "/sbin/btrfs"
-remove "btrfs-progs" "/sbin/btrfs-*"
-remove "btrfs-progs" "/sbin/btrfstune"
-remove "ca-certificates" "/etc/pki/java/*"
-remove "ca-certificates" "/etc/pki/tls/certs/ca-bundle.trust.crt"
-remove "ca-certificates" "/etc/ssl/*"
-remove "cairo" "/usr/${libdir}/libcairo-script*"
-remove "cjkuni-uming-fonts" "/etc/X11/*"
-remove "coreutils" "/etc/*"
-remove "coreutils" "/bin/link"
-remove "coreutils" "/bin/nice"
-remove "coreutils" "/bin/stty"
-remove "coreutils" "/bin/su"
-remove "coreutils" "/bin/unlink"
-remove "coreutils" "/sbin/*"
-remove "coreutils" "/usr/bin/["
-remove "coreutils" "/usr/bin/base64"
-remove "coreutils" "/usr/bin/chcon"
-remove "coreutils" "/usr/bin/cksum"
-remove "coreutils" "/usr/bin/comm"
-remove "coreutils" "/usr/bin/csplit"
-remove "coreutils" "/usr/bin/cut"
-remove "coreutils" "/usr/bin/dir"
-remove "coreutils" "/usr/bin/dircolors"
-remove "coreutils" "/usr/bin/dirname"
-remove "coreutils" "/usr/bin/env"
-remove "coreutils" "/usr/bin/expand"
-remove "coreutils" "/usr/bin/factor"
-remove "coreutils" "/usr/bin/fmt"
-remove "coreutils" "/usr/bin/fold"
-remove "coreutils" "/usr/bin/groups"
-remove "coreutils" "/usr/bin/hostid"
-remove "coreutils" "/usr/bin/id"
-remove "coreutils" "/usr/bin/install"
-remove "coreutils" "/usr/bin/join"
-remove "coreutils" "/usr/bin/logname"
-remove "coreutils" "/usr/bin/mkfifo"
-remove "coreutils" "/usr/bin/nl"
-remove "coreutils" "/usr/bin/nohup"
-remove "coreutils" "/usr/bin/nproc"
-remove "coreutils" "/usr/bin/od"
-remove "coreutils" "/usr/bin/paste"
-remove "coreutils" "/usr/bin/pathchk"
-remove "coreutils" "/usr/bin/pinky"
-remove "coreutils" "/usr/bin/pr"
-remove "coreutils" "/usr/bin/printenv"
-remove "coreutils" "/usr/bin/printf"
-remove "coreutils" "/usr/bin/ptx"
-remove "coreutils" "/usr/bin/runcon"
-remove "coreutils" "/usr/bin/seq"
-remove "coreutils" "/usr/bin/sha224sum"
-remove "coreutils" "/usr/bin/sha256sum"
-remove "coreutils" "/usr/bin/sha384sum"
-remove "coreutils" "/usr/bin/sha512sum"
-remove "coreutils" "/usr/bin/shuf"
-remove "coreutils" "/usr/bin/stat"
-remove "coreutils" "/usr/bin/stdbuf"
-remove "coreutils" "/usr/bin/sum"
-remove "coreutils" "/usr/bin/test"
-remove "coreutils" "/usr/bin/timeout"
-remove "coreutils" "/usr/bin/truncate"
-remove "coreutils" "/usr/bin/tsort"
-remove "coreutils" "/usr/bin/unexpand"
-remove "coreutils" "/usr/bin/users"
-remove "coreutils" "/usr/bin/vdir"
-remove "coreutils" "/usr/bin/who"
-remove "coreutils" "/usr/bin/whoami"
-remove "coreutils" "/usr/bin/yes"
-remove "coreutils" "/usr/share/*"
-remove "cpio" "/usr/share/*"
-remove "cracklib" "/usr/sbin/*"
-remove "cracklib-dicts" "/usr/${libdir}/*"
-remove "cracklib-dicts" "/usr/sbin/*"
-remove "createrepo" "/usr/bin/*"
-remove "createrepo" "/usr/share/*"
-remove "cryptsetup-luks" "/usr/share/*"
-remove "cyrus-sasl-lib" "/usr/sbin/*"
-remove "db4" "/usr/*"
-remove "dbus" "/lib/systemd/*"
-remove "dbus-glib" "/usr/bin/*"
-remove "dbus-x11" "/etc/X11/*"
-remove "dejavu-sans-fonts" "/usr/share/fonts/dejavu/DejaVuSans-BoldOblique*"
-remove "dejavu-sans-fonts" "/usr/share/fonts/dejavu/DejaVuSans-ExtraLight*"
-remove "dejavu-sans-fonts" "/usr/share/fonts/dejavu/DejaVuSans-Oblique*"
-remove "dejavu-sans-fonts" "/usr/share/fonts/dejavu/DejaVuSansCondensed*"
-remove "dejavu-sans-mono-fonts" "/usr/share/fonts/dejavu/DejaVuSansMono-Bold*"
-remove "dejavu-sans-mono-fonts" "/usr/share/fonts/dejavu/DejaVuSansMono-Oblique*"
-remove "device-mapper-multipath" "/etc/*"
-remove "device-mapper-multipath" "/sbin/mpathconf"
-remove "device-mapper-multipath" "/sbin/multipathd"
-remove "dhclient" "/usr/*"
-remove "dmz-cursor-themes" "/usr/share/icons/dmz/*"
-remove "dnsmasq" "/etc/rc.d/*"
-remove "dnsmasq" "/usr/sbin/*"
-remove "dogtail" "/usr/bin/*"
-remove "dogtail" "/usr/share/applications/*"
-remove "dogtail" "/usr/share/dogtail/*"
-remove "dogtail" "/usr/share/icons/*"
-remove "dosfstools" "/sbin/dosfsck"
-remove "dosfstools" "/sbin/fsck.*"
-remove "dump" "/etc/*"
-remove "e2fsprogs" "/usr/sbin/*"
-remove "e2fsprogs" "/usr/share/locale/*"
-remove "elfutils-libelf" "/usr/share/locale/*"
-remove "ethtool" "/usr/sbin/*"
-remove "expat" "/usr/bin/*"
-remove "fcoe-utils" "/etc/rc.d/*"
-remove "fcoe-utils" "/usr/libexec/fcoe/dcbcheck.sh"
-remove "fcoe-utils" "/usr/libexec/fcoe/fcc.sh"
-remove "fcoe-utils" "/usr/libexec/fcoe/fcoe-setup.sh"
-remove "fcoe-utils" "/usr/libexec/fcoe/fcoedump.sh"
-remove "fcoe-utils" "/usr/sbin/fcnsq"
-remove "fcoe-utils" "/usr/sbin/fcoeadm"
-remove "fcoe-utils" "/usr/sbin/fcping"
-remove "fcoe-utils" "/usr/sbin/fcrls"
-remove "fedora-gnome-theme" "/etc/gtk-3.0/*"
-remove "fedora-gnome-theme" "/usr/share/themes/*"
-remove "file-libs" "/usr/share/*"
-remove "findutils" "/usr/bin/oldfind"
-remove "findutils" "/usr/share/*"
-remove "firstboot" "/usr/sbin/*"
-remove "firstboot" "/usr/share/firstboot/*"
-remove "firstboot" "/usr/share/locale/*"
-remove "fontconfig" "/usr/bin/*"
-remove "gawk" "/usr/bin/*"
-remove "gawk" "/usr/libexec/*"
-remove "gawk" "/usr/share/*"
-remove "gdk-pixbuf" "/usr/${libdir}/gdk-pixbuf/loaders/libpixbufloader-bmp*"
-remove "gdk-pixbuf" "/usr/${libdir}/gdk-pixbuf/loaders/libpixbufloader-gif*"
-remove "gdk-pixbuf" "/usr/${libdir}/gdk-pixbuf/loaders/libpixbufloader-ico*"
-remove "gdk-pixbuf" "/usr/${libdir}/gdk-pixbuf/loaders/libpixbufloader-pnm*"
-remove "gdk-pixbuf" "/usr/${libdir}/gdk-pixbuf/loaders/libpixbufloader-ras*"
-remove "gdk-pixbuf" "/usr/${libdir}/gdk-pixbuf/loaders/libpixbufloader-xbm*"
-remove "gdk-pixbuf" "/usr/${libdir}/gdk-pixbuf-*"
-remove "gdk-pixbuf" "/usr/${libdir}/libgdk_pixbuf_xlib*"
-remove "gdk-pixbuf" "/usr/share/locale/*"
-remove "gdk-pixbuf2" "/usr/${libdir}/gdk-pixbuf-2.0/2.10.0/loaders/*"
-remove "gdk-pixbuf2" "/usr/share/locale*"
-remove "gfs2-utils" "/usr/sbin/*"
-remove "glib2" "/etc/*"
-remove "glib2" "/usr/bin/*"
-remove "glib2" "/usr/share/locale/*"
-remove "glibc" "/etc/gai.conf"
-remove "glibc" "/etc/ld.so.conf"
-remove "glibc" "/etc/localtime"
-remove "glibc" "/etc/rpc"
-remove "glibc" "/lib/${buildarch}/nosegneg/*"
-remove "glibc" "/${libdir}/libBrokenLocale*"
-remove "glibc" "/${libdir}/libSegFault*"
-remove "glibc" "/${libdir}/libanl*"
-remove "glibc" "/${libdir}/libcidn*"
-remove "glibc" "/${libdir}/libnss_compat*"
-remove "glibc" "/${libdir}/libnss_hesiod*"
-remove "glibc" "/${libdir}/libnss_nis*"
-remove "glibc" "/${libdir}/libthread*"
-remove "glibc" "/${libdir}/rtkaio*"
-remove "glibc" "/sbin/*"
-remove "glibc" "/usr/libexec/*"
-remove "glibc" "/usr/sbin/*"
-remove "glibc-common" "/etc/*"
-remove "glibc-common" "/usr/bin/catchsegv"
-remove "glibc-common" "/usr/bin/gencat"
-remove "glibc-common" "/usr/bin/getconf"
-remove "glibc-common" "/usr/bin/getent"
-remove "glibc-common" "/usr/bin/ldd"
-remove "glibc-common" "/usr/bin/locale"
-remove "glibc-common" "/usr/bin/rpcgen"
-remove "glibc-common" "/usr/bin/sprof"
-remove "glibc-common" "/usr/bin/tzselect"
-remove "glibc-common" "/usr/libexec/*"
-remove "glibc-common" "/usr/sbin/*"
-
-# remove generated locales anaconda knows how to restore them at runtime
-remove "glibc-common" "/usr/lib/locale/*"
-# locale-archive is not in the glibc-common filelist
-remove --path "/usr/lib/locale/locale-archive"
-
-remove "gmp" "/usr/${libdir}/libgmpxx.*"
-remove "gmp" "/usr/${libdir}/libmp.*"
-remove "gnome-bluetooth-libs" "/usr/${libdir}/libgnome-bluetooth*"
-remove "gnome-bluetooth-libs" "/usr/share/*"
-remove "gnome-keyring" "/etc/xdg/*"
-remove "gnome-keyring" "/usr/bin/*"
-remove "gnome-keyring" "/usr/${libdir}/*"
-remove "gnome-keyring" "/usr/libexec/*"
-remove "gnome-keyring" "/usr/share/GConf/*"
-remove "gnome-keyring" "/usr/share/gcr-3/*"
-remove "gnome-keyring" "/usr/share/glib-2.0/*"
-remove "gnome-keyring" "/usr/share/gnome-keyring*"
-remove "gnome-keyring" "/usr/share/locale/*"
-remove "gnome-python2-gconf" "/usr/share/pygtk/*"
-remove "gnome-themes" "/usr/share/icons/Crux/*"
-remove "gnome-themes" "/usr/share/icons/HighContrast*"
-remove "gnome-themes" "/usr/share/icons/LargePrint/*"
-remove "gnome-themes" "/usr/share/locale/*"
-remove "gnome-themes" "/usr/share/themes/ClearlooksClassic/*"
-remove "gnome-themes" "/usr/share/themes/Crux/*"
-remove "gnome-themes" "/usr/share/themes/Glider/*"
-remove "gnome-themes" "/usr/share/themes/Glossy/*"
-remove "gnome-themes" "/usr/share/themes/HighContrast*"
-remove "gnome-themes" "/usr/share/themes/Inverted/*"
-remove "gnome-themes" "/usr/share/themes/LargePrint/*"
-remove "gnome-themes" "/usr/share/themes/LowContrast*"
-remove "gnome-themes" "/usr/share/themes/Mist/*"
-remove "gnome-themes" "/usr/share/themes/Simple/*"
-remove "gnutls" "/usr/share/locale/*"
-remove "gpgme" "/usr/${libdir}/libgpgme-*"
-remove "grep" "/etc/*"
-remove "grep" "/usr/share/locale/*"
-remove "groff" "/usr/bin/addftinfo"
-remove "groff" "/usr/bin/eqn"
-remove "groff" "/usr/bin/eqn2graph"
-remove "groff" "/usr/bin/gdiffmk"
-remove "groff" "/usr/bin/gindxbib"
-remove "groff" "/usr/bin/glookbib"
-remove "groff" "/usr/bin/gneqn"
-remove "groff" "/usr/bin/gnroff"
-remove "groff" "/usr/bin/grap2graph"
-remove "groff" "/usr/bin/grn"
-remove "groff" "/usr/bin/grodvi"
-remove "groff" "/usr/bin/grolbp"
-remove "groff" "/usr/bin/grolj4"
-remove "groff" "/usr/bin/grops"
-remove "groff" "/usr/bin/grotty"
-remove "groff" "/usr/bin/gsoelim"
-remove "groff" "/usr/bin/gtroff"
-remove "groff" "/usr/bin/hpftodit"
-remove "groff" "/usr/bin/indxbib"
-remove "groff" "/usr/bin/lkbib"
-remove "groff" "/usr/bin/lookbib"
-remove "groff" "/usr/bin/neqn"
-remove "groff" "/usr/bin/pdfroff"
-remove "groff" "/usr/bin/pfbtops"
-remove "groff" "/usr/bin/pic"
-remove "groff" "/usr/bin/pic2graph"
-remove "groff" "/usr/bin/post-grohtml"
-remove "groff" "/usr/bin/pre-grohtml"
-remove "groff" "/usr/bin/preconv"
-remove "groff" "/usr/bin/refer"
-remove "groff" "/usr/bin/soelim"
-remove "groff" "/usr/bin/tbl"
-remove "groff" "/usr/bin/tfmtodit"
-remove "groff" "/usr/bin/troff"
-remove "groff" "/usr/bin/zsoelim"
-remove "groff" "/usr/share/*"
-remove "grub" "/sbin/grub-*"
-remove "grub" "/usr/bin/*"
-remove "gstreamer" "/usr/bin/*"
-remove "gstreamer" "/usr/${libdir}/gstreamer-0.10/*"
-remove "gstreamer" "/usr/${libdir}/libgst*"
-remove "gstreamer" "/usr/libexec/*"
-remove "gstreamer" "/usr/share/locale/*"
-remove "gtk+" "/etc/*"
-remove "gtk+" "/usr/share/locale/*"
-remove "gtk2" "/usr/bin/update-gtk-immodules"
-remove "gtk2" "/usr/lib/gtk-2.0/2.10.0/engines/*"
-remove "gtk2" "/usr/lib/gtk-2.0/2.10.0/printbackends/*"
-remove "gtk2" "/usr/share/themes/*"
-remove "gtk2-engines" "/usr/share/gtk-engines/*"
-remove "gtk2-engines" "/usr/share/locale/*"
-remove "gtk2-engines" "/usr/share/themes/Crux/*"
-remove "gtk2-engines" "/usr/share/themes/Industrial/*"
-remove "gtk2-engines" "/usr/share/themes/Mist/*"
-remove "gtk2-engines" "/usr/share/themes/ThinIce/*"
-remove "gtk2-engines" "/usr/${libdir}/*/libcrux-engine*"
-remove "gtk2-engines" "/usr/${libdir}/*/libglide*"
-remove "gtk2-engines" "/usr/${libdir}/*/libhcengine*"
-remove "gtk2-engines" "/usr/${libdir}/*/libindustrial*"
-remove "gtk2-engines" "/usr/${libdir}/*/libmist*"
-remove "gtk2-engines" "/usr/${libdir}/*/libredmond*"
-remove "gtk2-engines" "/usr/${libdir}/*/libthinice*"
-remove "gtk3" "/usr/share/*"
-remove "gtk3" "/usr/${libdir}/gtk-3.0/*"
-remove "gtk3" "/usr/${libdir}/libgailutil*"
-remove "gtk3-engines" "/usr/${libdir}/*"
-remove "gtk3-engines" "/usr/share/gtk-engines/*"
-remove "gtk3-engines" "/usr/share/locale/*"
-remove "gtk3-engines" "/usr/share/themes/Crux/*"
-remove "gtk3-engines" "/usr/share/themes/GNOME3/*"
-remove "gtk3-engines" "/usr/share/themes/Industrial/*"
-remove "gtk3-engines" "/usr/share/themes/Mist/*"
-remove "gtk3-engines" "/usr/share/themes/Redmond/*"
-remove "gtk3-engines" "/usr/share/themes/ThinIce/*"
-remove "gzip" "/usr/bin/*"
-remove "hwdata" "/etc/*"
-remove "hwdata" "/usr/share/hwdata/oui.txt"
-remove "hwdata" "/usr/share/hwdata/pnp.ids"
-remove "hwdata" "/usr/share/hwdata/upgradelist"
-remove "initscripts" "/etc/ppp/*"
-remove "initscripts" "/lib/systemd/*"
-remove "initscripts" "/usr/sbin/*"
-remove "initscripts" "/usr/share/locale/*"
-remove "iproute" "/etc/*"
-remove "iproute" "/sbin/cbq"
-remove "iproute" "/sbin/ifcfg"
-remove "iproute" "/sbin/rtmon"
-remove "iproute" "/sbin/tc"
-remove "iproute" "/usr/*"
-remove "iputils" "/etc/*"
-remove "iputils" "/bin/ping6"
-remove "iputils" "/bin/tracepath*"
-remove "iputils" "/sbin/ifenslave"
-remove "iputils" "/sbin/rdisc"
-remove "iputils" "/usr/sbin/*"
-remove "iscsi-initiator-utils" "/etc/rc.d/*"
-remove "jfsutils" "/sbin/jfs_fsck"
-remove "jfsutils" "/sbin/jfs_fscklog"
-remove "jfsutils" "/sbin/jfs_logdump"
-remove "jfsutils" "/sbin/jfs_mkfs"
-remove "kbd" "/bin/*"
-remove "kbd" "/usr/share/locale/*"
-remove "krb5-libs" "/etc/*"
-remove "krb5-libs" "/${libdir}/libgssrpc*"
-remove "krb5-libs" "/usr/${libdir}/*"
-remove "less" "/etc/*"
-remove "libX11-common" "/usr/share/X11/XErrorDB"
-remove "libbonobo" "/etc/*"
-remove "libbonobo" "/usr/bin/*"
-remove "libbonobo" "/usr/sbin/*"
-remove "libbonobo" "/usr/share/locale/*"
-remove "libbonobo" "/usr/${libdir}/bonobo/monikers/*"
-remove "libbonobo" "/usr/${libdir}/orbit-2.0/Bonobo_module.so"
-remove "libbonoboui" "/usr/share/locale/*"
-remove "libcanberra" "/usr/${libdir}/libcanberra-*"
-remove "libcanberra-gtk2" "/usr/${libdir}/gtk-2.0/*"
-remove "libcanberra-gtk3" "/usr/bin/*"
-remove "libcanberra-gtk3" "/usr/${libdir}/*"
-remove "libcap" "/usr/sbin/*"
-remove "libconfig" "/usr/${libdir}/libconfig++*"
-remove "libgnome-keyring" "/usr/share/locale/*"
-remove "libgnomecanvas" "/usr/share/locale/*"
-remove "libgpg-error" "/usr/bin/*"
-remove "libgpg-error" "/usr/share/locale/*"
-remove "libgssglue" "/etc/*"
-remove "libidn" "/usr/bin/*"
-remove "libidn" "/usr/share/locale/*"
-remove "libmlx4" "/etc/rdma/*"
-remove "libmlx4" "/usr/${libdir}/*"
-remove "libnotify" "/usr/bin/*"
-remove "libpng" "/usr/${libdir}/libpng.*"
-remove "libselinux" "/sbin/*"
-remove "libsemanage" "/etc/selinux/*"
-remove "libstdc++" "/usr/share/*"
-remove "libthai" "/usr/share/libthai/*"
-remove "libuser" "/usr/bin/*"
-remove "libuser" "/usr/sbin/*"
-remove "libuser" "/usr/share/locale/*"
-remove "libvorbis" "/usr/${libdir}/libvorbisenc.*"
-remove "libxcb" "/usr/${libdir}/libxcb-*"
-remove "libxml2" "/usr/bin/*"
-remove "libxml2-python" "/usr/${libdir}/python?.?/site-packages/libxml2mod.a"
-remove "libxml2-python" "/usr/${libdir}/python?.?/site-packages/libxml2mod.la"
-remove "lldpad" "/etc/*"
-remove "lldpad" "/usr/sbin/lldptool"
-remove "lua" "/usr/bin/*"
-remove "lvm2" "/etc/*"
-remove "lvm2-cluster" "/etc/rc.d/init.d/*"
-remove "lvm2-cluster" "/usr/sbin/*"
-remove "lzo" "/usr/${libdir}/liblzo2.*"
-remove "madan-fonts" "/usr/share/fonts/madan/*"
-remove "man-db" "/etc/sysconfig/*"
-remove "man-db" "/usr/bin/*"
-remove "man-db" "/usr/libexec/*"
-remove "man-db" "/usr/sbin/*"
-remove "man-db" "/usr/share/locale/*"
-remove "mdadm" "/etc/*"
-remove "metacity" "/usr/share/applications/*"
-remove "metacity" "/usr/share/gnome-control-center/*"
-remove "metacity" "/usr/share/gnome/*"
-remove "metacity" "/usr/share/locale/*"
-remove "metacity" "/usr/share/metacity/*"
-remove "metacity" "/usr/share/themes/AgingGorilla/*"
-remove "metacity" "/usr/share/themes/Bright/*"
-remove "metacity" "/usr/share/themes/Crux/*"
-remove "metacity" "/usr/share/themes/Esco/*"
-remove "metacity" "/usr/share/themes/Metabox/*"
-remove "metacity" "/usr/share/themes/Simple/*"
-remove "module-init-tools" "/etc/*"
-remove "module-init-tools" "/sbin/insmod.static"
-remove "module-init-tools" "/sbin/weak-modules"
-remove "mt-st" "/etc/*"
-remove "mt-st" "/sbin/*"
-remove "mtools" "/etc/*"
-remove "ncurses" "/usr/bin/captoinfo"
-remove "ncurses" "/usr/bin/infocmp"
-remove "ncurses" "/usr/bin/infotocap"
-remove "ncurses" "/usr/bin/reset"
-remove "ncurses" "/usr/bin/tabs"
-remove "ncurses" "/usr/bin/tic"
-remove "ncurses" "/usr/bin/toe"
-remove "ncurses" "/usr/bin/tput"
-remove "ncurses" "/usr/bin/tset"
-remove "ncurses-libs" "/usr/${libdir}/libform*"
-remove "ncurses-libs" "/usr/${libdir}/libmenu*"
-remove "ncurses-libs" "/usr/${libdir}/libpanel.*"
-remove "ncurses-libs" "/usr/${libdir}/libtic*"
-remove "net-tools" "/bin/netstat"
-remove "net-tools" "/etc/ethers"
-remove "net-tools" "/sbin/ether-wake"
-remove "net-tools" "/sbin/ipmaddr"
-remove "net-tools" "/sbin/iptunnel"
-remove "net-tools" "/sbin/mii-diag"
-remove "net-tools" "/sbin/mii-tool"
-remove "net-tools" "/sbin/nameif"
-remove "net-tools" "/sbin/plipconfig"
-remove "net-tools" "/sbin/slattach"
-remove "net-tools" "/usr/share/locale/*"
-remove "network-manager-netbook" "/etc/*"
-remove "network-manager-netbook" "/usr/libexec/*"
-remove "network-manager-netbook" "/usr/share/dbus-1/*"
-remove "network-manager-netbook" "/usr/share/locale/*"
-remove "network-manager-netbook" "/usr/share/network-manager-netbook/*"
-remove "newt" "/usr/share/locale/*"
-remove "nfs-utils" "/etc/nfsmount.conf"
-remove "nfs-utils" "/etc/rc.d/init.d/nfs"
-remove "nfs-utils" "/etc/rc.d/init.d/nfslock"
-remove "nfs-utils" "/etc/rc.d/init.d/rpcgssd"
-remove "nfs-utils" "/etc/rc.d/init.d/rpcidmapd"
-remove "nfs-utils" "/etc/rc.d/init.d/rpcsvcgssd"
-remove "nfs-utils" "/etc/sysconfig/nfs"
-remove "nfs-utils" "/sbin/rpc.statd"
-remove "nfs-utils" "/usr/sbin/exportfs"
-remove "nfs-utils" "/usr/sbin/gss_clnt_send_err"
-remove "nfs-utils" "/usr/sbin/gss_destroy_creds"
-remove "nfs-utils" "/usr/sbin/mountstats"
-remove "nfs-utils" "/usr/sbin/nfsiostat"
-remove "nfs-utils" "/usr/sbin/nfsstat"
-remove "nfs-utils" "/usr/sbin/rpc.gssd"
-remove "nfs-utils" "/usr/sbin/rpc.idmapd"
-remove "nfs-utils" "/usr/sbin/rpc.mountd"
-remove "nfs-utils" "/usr/sbin/rpc.nfsd"
-remove "nfs-utils" "/usr/sbin/rpc.svcgssd"
-remove "nfs-utils" "/usr/sbin/rpcdebug"
-remove "nfs-utils" "/usr/sbin/showmount"
-remove "nfs-utils" "/usr/sbin/sm-notify"
-remove "nfs-utils" "/usr/sbin/start-statd"
-remove "nfs-utils" "/var/lib/nfs/etab"
-remove "nfs-utils" "/var/lib/nfs/rmtab"
-remove "nfs-utils" "/var/lib/nfs/state"
-remove "nfs-utils" "/var/lib/nfs/xtab"
-remove "notification-daemon" "/usr/${libdir}/*"
-remove "notification-daemon" "/usr/libexec/*"
-remove "notification-daemon" "/usr/share/locale/*"
-remove "nss" "/etc/pki/*"
-remove "nss-softokn" "/usr/${libdir}/nss/*"
-remove "ntfs-3g" "/bin/lowntfs-3g"
-remove "ntfs-3g" "/bin/ntfs-3g.*"
-remove "ntfs-3g" "/bin/ntfsmount"
-remove "ntfs-3g" "/sbin/mount.lowntfs-3g"
-remove "ntfs-3g" "/usr/share/hal/*"
-remove "ntfs-3g" "/usr/bin/*"
-remove "ntfsprogs" "/sbin/*"
-remove "openldap" "/etc/openldap/*"
-remove "openldap" "/usr/${libdir}/libldap_r-*"
-remove "openldap" "/usr/${libdir}/libldap_r-*"
-remove "openldap" "/usr/${libdir}/libldif-*"
-remove "openldap" "/usr/${libdir}/libldif-*"
-remove "openssh" "/etc/ssh/*"
-remove "openssh" "/usr/libexec/*"
-remove "openssh-clients" "/etc/ssh/*"
-remove "openssh-clients" "/usr/bin/slogin"
-remove "openssh-clients" "/usr/bin/ssh-*"
-remove "openssh-clients" "/usr/${libdir}/*"
-remove "openssh-clients" "/usr/libexec/*"
-remove "openssh-server" "/etc/ssh/*"
-remove "openssh-server" "/usr/${libdir}/*"
-remove "openssh-server" "/usr/libexec/*"
-remove "openssl" "/etc/pki/*"
-remove "openssl" "/usr/bin/*"
-remove "openssl" "/usr/${libdir}/openssl/*"
-remove "pam" "/sbin/*"
-remove "pam" "/usr/share/locale/*"
-remove "pciutils" "/usr/sbin/*"
-remove "pcmciautils" "/sbin/*"
-remove "pcre" "/usr/bin/*"
-remove "pcre" "/usr/${libdir}/*"
-remove "policycoreutils" "/etc/*"
-remove "policycoreutils" "/usr/bin/*"
-remove "policycoreutils" "/usr/share/locale/*"
-remove "polkit" "/usr/bin/*"
-remove "polkit-desktop-policy" "/var/lib/*"
-remove "popt" "/usr/share/locale/*"
-remove "procps" "/sbin/*"
-remove "procps" "/usr/bin/free"
-remove "procps" "/usr/bin/pgrep"
-remove "procps" "/usr/bin/pkill"
-remove "procps" "/usr/bin/pmap"
-remove "procps" "/usr/bin/pwdx"
-remove "procps" "/usr/bin/skill"
-remove "procps" "/usr/bin/slabtop"
-remove "procps" "/usr/bin/snice"
-remove "procps" "/usr/bin/tload"
-remove "procps" "/usr/bin/uptime"
-remove "procps" "/usr/bin/vmstat"
-remove "procps" "/usr/bin/w"
-remove "procps" "/usr/bin/watch"
-remove "psmisc" "/sbin/*"
-remove "psmisc" "/usr/share/locale/*"
-remove "pygtk2" "/usr/bin/*"
-remove "pygtk2" "/usr/${libdir}/pygtk/*"
-remove "pykickstart" "/usr/bin/*"
-remove "pykickstart" "/usr/share/locale/*"
-remove "python-bugzilla" "/usr/bin/*"
-remove "python-ethtool" "/usr/sbin/*"
-remove "python-meh" "/usr/share/locale/*"
-remove "readline" "/usr/${libdir}/*"
-remove "report" "/usr/bin/*"
-remove "report" "/usr/include/*"
-remove "report" "/usr/${libdir}/libstrata_*"
-remove "report" "/usr/share/locale/*"
-remove "rpm" "/usr/bin/*"
-remove "rpm" "/usr/lib/rpm/platform/*"
-remove "rpm" "/usr/share/locale/*"
-remove "rsync" "/etc/*"
-remove "samba-common" "/etc/*"
-remove "samba-common" "/usr/bin/*"
-remove "samba-common" "/usr/include/*"
-remove "samba-common" "/usr/${libdir}/*"
-remove "samba-common" "/usr/share/locale/*"
-remove "samba-winbind-clients" "/${libdir}/libnss_*"
-remove "samba-winbind-clients" "/usr/${libdir}/libnss_*"
-remove "sed" "/usr/share/locale/*"
-remove "selinux-policy-targeted" "/usr/share/selinux/*"
-remove "smartmontools" "/etc/*"
-remove "smartmontools" "/usr/sbin/smartd"
-remove "smartmontools" "/usr/sbin/update-smart-drivedb"
-remove "smartmontools" "/usr/share/smartmontools/*"
-remove "sqlite" "/usr/bin/*"
-remove "system-config-date" "/etc/*"
-remove "system-config-date" "/usr/bin/*"
-remove "system-config-date" "/usr/share/icons/*"
-remove "system-config-keyboard" "/etc/*"
-remove "system-config-keyboard" "/usr/bin/*"
-remove "system-config-keyboard" "/usr/share/icons/*"
-remove "systemd" "/bin/*"
-remove "systemd" "/lib/systemd/*"
-remove "systemd" "/usr/share/systemd/*"
-remove "sysvinit-tools" "/bin/*"
-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" "/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/*"
-remove "xfsprogs" "/${libdir}/*"
-remove "xfsprogs" "/usr/sbin/xfs_bmapd"
-remove "xfsprogs" "/usr/sbin/xfs_estimate"
-remove "xfsprogs" "/usr/sbin/xfs_freeze"
-remove "xfsprogs" "/usr/sbin/xfs_fsr"
-remove "xfsprogs" "/usr/sbin/xfs_growfs"
-remove "xfsprogs" "/usr/sbin/xfs_info"
-remove "xfsprogs" "/usr/sbin/xfs_io"
-remove "xfsprogs" "/usr/sbin/xfs_logprint"
-remove "xfsprogs" "/usr/sbin/xfs_mdrestore"
-remove "xfsprogs" "/usr/sbin/xfs_metadump"
-remove "xfsprogs" "/usr/sbin/xfs_mkfile"
-remove "xfsprogs" "/usr/sbin/xfs_ncheck"
-remove "xfsprogs" "/usr/sbin/xfs_quota"
-remove "xfsprogs" "/usr/sbin/xfs_rtcp"
-remove "xfsprogs" "/usr/share/locale/*"
-remove "xkeyboard-config" "/usr/share/locale/*"
-remove "xorg-x11-drv-intel" "/usr/${libdir}/libI*"
-remove "xorg-x11-drv-openchrome" "/usr/${libdir}/libchrome*"
-remove "xorg-x11-drv-synaptics" "/usr/bin/*"
-remove "xorg-x11-drv-vmmouse" "/usr/bin/*"
-remove "xorg-x11-drv-wacom" "/usr/bin/*"
-remove "xorg-x11-fonts-ethiopic" "/etc/X11/*"
-remove "xorg-x11-fonts-ethiopic" "/usr/share/X11/fonts/OTF/*"
-remove "xorg-x11-fonts-misc" "/etc/X11/*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/encodings/*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/10x20*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/12x*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/18x18*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/4x6*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/5x7*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/5x8*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/6x10*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/6x12*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/6x9*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/7x*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/8x*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/9x*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/arabic*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/cl*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/cu-*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/cu12*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/cuarabic*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/cudevnag*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/dec*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/gb*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/hang*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/jiskan*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/k14*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/micro*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/nil2*"
-remove "xorg-x11-fonts-misc" "/usr/share/X11/fonts/misc/olg*"
-remove "xorg-x11-server-utils" "/usr/bin/iceauth"
-remove "xorg-x11-server-utils" "/usr/bin/sessreg"
-remove "xorg-x11-server-utils" "/usr/bin/showrgb"
-remove "xorg-x11-server-utils" "/usr/bin/xgamma"
-remove "xorg-x11-server-utils" "/usr/bin/xhost"
-remove "xorg-x11-server-utils" "/usr/bin/xmodmap"
-remove "xorg-x11-server-utils" "/usr/bin/xrdb"
-remove "xorg-x11-server-utils" "/usr/bin/xrefresh"
-remove "xorg-x11-server-utils" "/usr/bin/xset"
-remove "xorg-x11-server-utils" "/usr/bin/xsetmode"
-remove "xorg-x11-server-utils" "/usr/bin/xsetpointer"
-remove "xorg-x11-server-utils" "/usr/bin/xsetroot"
-remove "xorg-x11-server-utils" "/usr/bin/xstdcmap"
-remove "yum" "etc/*"
-remove "yum" "/usr/share/locale/*"
-remove "yum" "/usr/share/yum-cli/*"
-remove "zenity" "/usr/share/gnome/help/*"
-remove "zenity" "/usr/share/omf/*"
-remove "${product}-logos" "/etc/*"
-remove "${product}-logos" "/usr/share/firstboot/*"
-remove "${product}-logos" "/usr/share/gnome-screensaver/*"
-remove "${product}-logos" "/usr/share/icons/Bluecurve/*"
-remove "${product}-logos" "/usr/share/icons/oxygen/*"
-remove "${product}-logos" "/usr/share/pixmaps/*"
-remove "${product}-logos" "/usr/share/plymouth/*"
diff --git a/src/pylorax/TODO b/src/pylorax/TODO
index 2ee87a6c..e61863d5 100644
--- a/src/pylorax/TODO
+++ b/src/pylorax/TODO
@@ -1,19 +1,5 @@
FIXME:
-- make TemplateRunner handle ramdisk.tmpl and installtree
- - DONE: rewrite ramdisk.tmpl a bit
- - DONE: install -> installpkg
- - DONE: remove -> removepkg
- - DONE: remove --path -> remove
- - DONE: module takes multiple args
- - DONE: rewrite installtree as template
- - DONE: split installtree into postinstall/cleanup
- - add TemplateRunner commands
- - installpkg, removepkg, module
- - also do_installpkg, do_removepkg
- - or maybe run_transaction?
- handle [compression] conf keys (type, speed)
-- run prelink on runtime image
- - chroot ${root} /etc/cron.daily/prelink
Good ideas:
@@ -21,6 +7,8 @@ Good ideas:
- update imgutils to be able to partition images
- via dmsetup stuff in anaconda.storage?
- allow alternate runtime images via conf key
+- run prelink on runtime image
+ - chroot ${root} /etc/cron.daily/prelink
Someday:
diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py
index 30bd7f54..a892fb6e 100644
--- a/src/pylorax/__init__.py
+++ b/src/pylorax/__init__.py
@@ -38,15 +38,13 @@ from base import BaseLoraxClass, DataHolder
import output
import yum
-import yumhelper
import ltmpl
import imgutils
import constants
from sysutils import *
-from treebuilder import TreeBuilder
-from installtree import LoraxInstallTree
+from treebuilder import RuntimeBuilder, TreeBuilder
from buildstamp import BuildStamp
from treeinfo import TreeInfo
from discinfo import DiscInfo
@@ -158,7 +156,7 @@ class Lorax(BaseLoraxClass):
# do we have all lorax required commands?
self.lcmds = constants.LoraxRequiredCommands()
- # TODO: actually check for required commands
+ # TODO: actually check for required commands (runcmd etc)
# do we have a proper yum base object?
logger.info("checking yum base object")
@@ -166,49 +164,25 @@ class Lorax(BaseLoraxClass):
logger.critical("no yum base object")
sys.exit(1)
- logger.info("setting up yum helper")
- self.yum = yumhelper.LoraxYumHelper(ybo)
- logger.debug("using install root: {0}".format(self.yum.installroot))
+ logger.debug("using install root: {0}".format(ybo.installroot))
logger.info("setting up build architecture")
- self.arch = ArchData(self.get_buildarch())
+ self.arch = ArchData(get_buildarch(ybo))
for attr in ('buildarch', 'basearch', 'libdir'):
logger.debug("self.arch.%s = %s", attr, getattr(self.arch,attr))
- logger.info("setting up install tree")
- self.installtree = LoraxInstallTree(self.yum, self.arch.libdir)
-
logger.info("setting up build parameters")
product = DataHolder(name=product, version=version, release=release,
variant=variant, bugurl=bugurl, is_beta=is_beta)
self.product = product
logger.debug("product data: %s" % product)
- logger.info("parsing the runtime template")
- tfile = joinpaths(self.conf.get("lorax", "sharedir"),
- self.conf.get("templates", "ramdisk"))
+ templatedir = self.conf.get("lorax", "sharedir")
+ rb = RuntimeBuilder(product, arch, self.outputdir, ybo, templatedir)
- # TODO: normalize with arch templates:
- # tvars = dict(product=product, arch=arch)
- tvars = { "basearch": self.arch.basearch,
- "buildarch": self.arch.buildarch,
- "libdir" : self.arch.libdir,
- "product": self.product.name.lower() }
-
- template = ltmpl.LoraxTemplate()
- template.parse(tfile, tvars)
-
- logger.info("creating tree directories")
- for d in template.getdata("mkdir"):
- os.makedirs(joinpaths(self.installtree.root, d))
-
- # install packages
- logger.info("getting list of required packages")
- for package in template.getdata("install"):
- self.installtree.yum.install(package)
-
- skipbroken = self.conf.getboolean("yum", "skipbroken")
- self.installtree.yum.process_transaction(skipbroken)
+ logger.info("installing runtime packages")
+ rb.yum.conf.skip_broken = self.conf.getboolean("yum", "skipbroken")
+ rb.install()
# write .buildstamp
buildstamp = BuildStamp(self.product.name, self.product.version,
@@ -219,55 +193,13 @@ class Lorax(BaseLoraxClass):
logger.debug("saving pkglists to %s", self.workdir)
dname = joinpaths(self.workdir, "pkglists")
os.makedirs(dname)
- for pkgname, pkgobj in self.installtree.yum.installed_packages.items():
- with open(joinpaths(dname, pkgname), "w") as fobj:
+ for pkgobj in ybo.doPackageLists(pkgnarrow='installed').installed:
+ with open(joinpaths(dname, pkgobj.name), "w") as fobj:
for fname in pkgobj.filelist:
fobj.write("{0}\n".format(fname))
- logger.info("removing locales")
- self.installtree.remove_locales()
-
- logger.info("creating keymaps")
- if self.arch.basearch not in ("s390", "s390x"):
- self.installtree.create_keymaps(basearch=self.arch.basearch)
-
- logger.info("creating screenfont")
- self.installtree.create_screenfont(basearch=self.arch.basearch)
-
- logger.info("moving stubs")
- self.installtree.move_stubs()
-
- logger.info("getting list of required modules")
- # Need a list to pass to cleanup_kernel_modules, not a generator
- modules = list(template.getdata("module"))
-
- self.installtree.install_kernel_modules(modules)
-
- logger.info("moving anaconda repos")
- self.installtree.move_repos()
-
- logger.info("creating depmod.conf")
- self.installtree.create_depmod_conf()
-
- # set up /sbin/init
- if self.arch.basearch in ("s390", "s390x"):
- self.installtree.setup_s390_init()
- else:
- self.installtree.setup_init()
- # misc tree modifications
- self.installtree.misc_tree_modifications()
-
- # get config files
- config_dir = joinpaths(self.conf.get("lorax", "sharedir"),
- "config_files")
-
- self.installtree.get_config_files(config_dir)
- self.installtree.setup_sshd(config_dir)
- if self.arch.basearch in ("s390", "s390x"):
- self.installtree.generate_ssh_keys()
-
- # get anaconda portions
- self.installtree.get_anaconda_portions()
+ logger.info("doing post-install configuration")
+ rb.postinstall()
# write .discinfo
discinfo = DiscInfo(self.product.release, self.arch.basearch)
@@ -277,12 +209,8 @@ class Lorax(BaseLoraxClass):
installroot = joinpaths(self.workdir, "installroot")
linktree(self.installtree.root, installroot)
- logger.info("getting list of not required packages")
- removepkgs = template.getdata("remove", mode="lines")
- self.installtree.remove_packages(removepkgs)
-
- logger.info("cleaning up python files")
- self.installtree.cleanup_python_files()
+ logger.info("cleaning unneeded files")
+ rb.clean()
logger.info("creating the runtime image")
# TODO: different img styles / create_runtime implementations
@@ -293,13 +221,13 @@ class Lorax(BaseLoraxClass):
logger.info("preparing to build output tree and boot images")
treebuilder = TreeBuilder(self.product, self.arch,
installroot, self.outputdir,
- templatedir=self.conf.get("lorax", "sharedir"))
+ templatedir)
# TODO: different image styles may do this part differently
logger.info("rebuilding initramfs images")
- treebuilder.rebuild_initrds(add_args=["--xz", "--add", "btrfs"])
+ treebuilder.rebuild_initrds(add_args=["--xz"])
- # TODO: keep small initramfs for split initramfs/runtime media
+ # TODO: keep small initramfs for split initramfs/runtime media?
logger.info("adding runtime to initrds")
treebuilder.initrd_append(runtimedir)
@@ -313,22 +241,22 @@ class Lorax(BaseLoraxClass):
treeinfo.add_section(section, data)
treeinfo.write(joinpaths(self.outputdir, ".treeinfo"))
- def get_buildarch(self):
- # get architecture of the available anaconda package
- _, available = self.yum.search("anaconda")
+def get_buildarch(ybo):
+ # get architecture of the available anaconda package
+ available = ybo.doPackageLists(patterns=["anaconda"]).available
- if available:
+ if available:
+ anaconda = available.pop(0)
+ # src is not a real arch
+ if anaconda.arch == "src":
anaconda = available.pop(0)
- # src is not a real arch
- if anaconda.arch == "src":
- anaconda = available.pop(0)
- buildarch = anaconda.arch
- else:
- # fallback to the system architecture
- logger.warning("using system architecture")
- buildarch = os.uname()[4]
+ buildarch = anaconda.arch
+ else:
+ # fallback to the system architecture
+ logger.warning("using system architecture")
+ buildarch = os.uname()[4]
- return buildarch
+ return buildarch
def create_runtime(inroot, outdir):
runtime = "squashfs.img"
diff --git a/src/pylorax/installtree.py b/src/pylorax/installtree.py
deleted file mode 100644
index ee999e9f..00000000
--- a/src/pylorax/installtree.py
+++ /dev/null
@@ -1,567 +0,0 @@
-#
-# installtree.py
-#
-# Copyright (C) 2010 Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-#
-# Red Hat Author(s): Martin Gracik
-#
-
-import logging
-logger = logging.getLogger("pylorax.installtree")
-
-import sys
-import os
-import shutil
-import gzip
-import re
-import glob
-import time
-import subprocess
-import operator
-
-from base import BaseLoraxClass, DataHolder
-import constants
-from sysutils import *
-
-
-class LoraxInstallTree(BaseLoraxClass):
-
- def __init__(self, yum, libdir):
- BaseLoraxClass.__init__(self)
- self.yum = yum
- self.root = self.yum.installroot
- self.libdir = libdir
-
- self.lcmds = constants.LoraxRequiredCommands()
-
- def remove_locales(self):
- chroot = lambda: os.chroot(self.root)
-
- # get locales we need to keep
- langtable = joinpaths(self.root, "usr/share/anaconda/lang-table")
- if not os.path.exists(langtable):
- logger.critical("could not find anaconda lang-table, exiting")
- sys.exit(1)
-
- # remove unneeded locales from /usr/share/locale
- with open(langtable, "r") as fobj:
- langs = fobj.readlines()
-
- langs = map(lambda l: l.split()[1], langs)
-
- localedir = joinpaths(self.root, "usr/share/locale")
- for fname in os.listdir(localedir):
- fpath = joinpaths(localedir, fname)
- if os.path.isdir(fpath) and fname not in langs:
- shutil.rmtree(fpath)
-
- # move the lang-table to etc
- shutil.move(langtable, joinpaths(self.root, "etc"))
-
- def create_keymaps(self, basearch):
- keymaps = joinpaths(self.root, "etc/keymaps.gz")
-
- # look for override
- override = "keymaps-override-{0}".format(basearch)
- override = joinpaths(self.root, "usr/share/anaconda", override)
- if os.path.isfile(override):
- logger.debug("using keymaps override")
- shutil.move(override, keymaps)
- else:
- # create keymaps
- cmd = [joinpaths(self.root, "usr/libexec/anaconda", "getkeymaps"),
- basearch, keymaps, self.root]
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
- proc.wait()
-
- return True
-
- def create_screenfont(self, basearch):
- dst = joinpaths(self.root, "etc/screenfont.gz")
-
- screenfont = "screenfont-{0}.gz".format(basearch)
- screenfont = joinpaths(self.root, "usr/share/anaconda", screenfont)
- if not os.path.isfile(screenfont):
- return False
- else:
- shutil.move(screenfont, dst)
-
- return True
-
- def move_stubs(self):
- stubs = ("list-harddrives", "loadkeys", "mknod",
- "raidstart", "raidstop")
-
- for stub in stubs:
- src = joinpaths(self.root, "usr/share/anaconda",
- "{0}-stub".format(stub))
- dst = joinpaths(self.root, "usr/bin", stub)
- if os.path.isfile(src):
- shutil.move(src, dst)
-
- # move restart-anaconda
- src = joinpaths(self.root, "usr/share/anaconda", "restart-anaconda")
- dst = joinpaths(self.root, "usr/bin")
- shutil.move(src, dst)
-
- # move sitecustomize.py
- pythonpath = joinpaths(self.root, "usr", self.libdir, "python?.?")
- for path in glob.glob(pythonpath):
- src = joinpaths(path, "site-packages/pyanaconda/sitecustomize.py")
- dst = joinpaths(path, "site-packages")
- shutil.move(src, dst)
-
- def remove_packages(self, remove):
- rdb = {}
- order = []
- for item in remove:
- package = None
- pattern = None
-
- if item[0] == "--path":
- # remove files
- package = None
- pattern = item[1]
- else:
- # remove package
- package = item[0]
-
- try:
- pattern = item[1]
- except IndexError:
- pattern = None
-
- if package not in rdb:
- rdb[package] = [pattern]
- order.append(package)
- elif pattern not in rdb[package]:
- rdb[package].append(pattern)
-
- for package in order:
- pattern_list = rdb[package]
- logger.debug("{0}\t{1}".format(package, pattern_list))
- self.yum.remove(package, pattern_list)
-
- def cleanup_python_files(self):
- for root, _, fnames in os.walk(self.root):
- for fname in fnames:
- if fname.endswith(".py"):
- path = joinpaths(root, fname, follow_symlinks=False)
- pyo, pyc = path + "o", path + "c"
- if os.path.isfile(pyo):
- os.unlink(pyo)
- if os.path.isfile(pyc):
- os.unlink(pyc)
-
- os.symlink("/dev/null", pyc)
-
- def move_modules(self):
- shutil.move(joinpaths(self.root, "lib/modules"),
- joinpaths(self.root, "modules"))
- shutil.move(joinpaths(self.root, "lib/firmware"),
- joinpaths(self.root, "firmware"))
-
- os.symlink("../modules", joinpaths(self.root, "lib/modules"))
- os.symlink("../firmware", joinpaths(self.root, "lib/firmware"))
-
- def cleanup_kernel_modules(self, keepmodules, kernelver):
- logger.info("cleaning up kernel modules for %s", kernelver)
- moddir = joinpaths(self.root, "modules", kernelver)
- fwdir = joinpaths(self.root, "firmware")
-
- # expand required modules
- modules = set()
- pattern = re.compile(r"\.ko$")
-
- for name in keepmodules:
- if name.startswith("="):
- group = name[1:]
- if group in ("scsi", "ata"):
- mpath = joinpaths(moddir, "modules.block")
- elif group == "net":
- mpath = joinpaths(moddir, "modules.networking")
- else:
- mpath = joinpaths(moddir, "modules.{0}".format(group))
-
- if os.path.isfile(mpath):
- with open(mpath, "r") as fobj:
- for line in fobj:
- module = pattern.sub("", line.strip())
- modules.add(module)
- else:
- modules.add(name)
-
- # resolve modules dependencies
- moddep = joinpaths(moddir, "modules.dep")
- with open(moddep, "r") as fobj:
- lines = map(lambda line: line.strip(), fobj.readlines())
-
- modpattern = re.compile(r"^.*/(?P.*)\.ko:(?P.*)$")
- deppattern = re.compile(r"^.*/(?P.*)\.ko$")
- unresolved = True
-
- while unresolved:
- unresolved = False
- for line in lines:
- match = modpattern.match(line)
- modname = match.group("name")
- if modname in modules:
- # add the dependencies
- for dep in match.group("deps").split():
- match = deppattern.match(dep)
- depname = match.group("name")
- if depname not in modules:
- unresolved = True
- modules.add(depname)
-
- # required firmware
- firmware = set()
- firmware.add("atmel_at76c504c-wpa.bin")
- firmware.add("iwlwifi-3945-1.ucode")
- firmware.add("iwlwifi-3945.ucode")
- firmware.add("zd1211/zd1211_uph")
- firmware.add("zd1211/zd1211_uphm")
- firmware.add("zd1211/zd1211b_uph")
- firmware.add("zd1211/zd1211b_uphm")
-
- # remove not needed modules
- for root, _, fnames in os.walk(moddir):
- for fname in fnames:
- path = os.path.join(root, fname)
- name, ext = os.path.splitext(fname)
-
- if ext == ".ko":
- if name not in modules:
- os.unlink(path)
- logger.debug("removed module {0}".format(path))
- else:
- # get the required firmware
- cmd = [self.lcmds.MODINFO, "-F", "firmware", path]
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
- output = proc.stdout.read()
- firmware |= set(output.split())
-
- # remove not needed firmware
- firmware = map(lambda fw: joinpaths(fwdir, fw), list(firmware))
- for root, _, fnames in os.walk(fwdir):
- for fname in fnames:
- path = joinpaths(root, fname)
- if path not in firmware:
- os.unlink(path)
- logger.debug("removed firmware {0}".format(path))
-
- # get the modules paths
- modpaths = {}
- for root, _, fnames in os.walk(moddir):
- for fname in fnames:
- modpaths[fname] = joinpaths(root, fname)
-
- # create the modules list
- modlist = {}
- for modtype, fname in (("scsi", "modules.block"),
- ("eth", "modules.networking")):
-
- fname = joinpaths(moddir, fname)
- with open(fname, "r") as fobj:
- lines = map(lambda l: l.strip(), fobj.readlines())
- lines = filter(lambda l: l, lines)
-
- for line in lines:
- modname, ext = os.path.splitext(line)
- if (line not in modpaths or
- modname in ("floppy", "libiscsi", "scsi_mod")):
- continue
-
- cmd = [self.lcmds.MODINFO, "-F", "description", modpaths[line]]
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
- output = proc.stdout.read()
-
- try:
- desc = output.splitlines()[0]
- desc = desc.strip()[:65]
- except IndexError:
- desc = "{0} driver".format(modname)
-
- info = '{0}\n\t{1}\n\t"{2}"\n'
- info = info.format(modname, modtype, desc)
- modlist[modname] = info
-
- # write the module-info
- moduleinfo = joinpaths(os.path.dirname(moddir), "module-info")
- with open(moduleinfo, "w") as fobj:
- fobj.write("Version 0\n")
- for modname in sorted(modlist.keys()):
- fobj.write(modlist[modname])
-
- def compress_modules(self, kernelver):
- logger.debug("compressing modules for %s", kernelver)
- moddir = joinpaths(self.root, "modules", kernelver)
-
- for root, _, fnames in os.walk(moddir):
- for fname in filter(lambda f: f.endswith(".ko"), fnames):
- path = os.path.join(root, fname)
- with open(path, "rb") as fobj:
- data = fobj.read()
-
- gzipped = gzip.open("{0}.gz".format(path), "wb")
- gzipped.write(data)
- gzipped.close()
-
- os.unlink(path)
-
- def run_depmod(self, kernelver):
- logger.debug("running depmod for %s", kernelver)
- systemmap = "System.map-{0}".format(kernelver)
- systemmap = joinpaths(self.root, "boot", systemmap)
-
- cmd = [self.lcmds.DEPMOD, "-a", "-F", systemmap, "-b", self.root,
- kernelver]
-
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
- retcode = proc.wait()
- if not retcode == 0:
- logger.critical(proc.stdout.read())
- sys.exit(1)
-
- moddir = joinpaths(self.root, "modules", kernelver)
-
- # remove *map files
- mapfiles = joinpaths(moddir, "*map")
- for fpath in glob.glob(mapfiles):
- os.unlink(fpath)
-
- # remove build and source symlinks
- for fname in ["build", "source"]:
- os.unlink(joinpaths(moddir, fname))
-
- def move_repos(self):
- src = joinpaths(self.root, "etc/yum.repos.d")
- dst = joinpaths(self.root, "etc/anaconda.repos.d")
- shutil.move(src, dst)
-
- def create_depmod_conf(self):
- text = "search updates built-in\n"
-
- with open(joinpaths(self.root, "etc/depmod.d/dd.conf"), "w") as fobj:
- fobj.write(text)
-
- def setup_s390_init(self):
- # copy shutdown
- src = joinpaths(self.root, "usr", self.libdir, "anaconda/shutdown")
- dst = joinpaths(self.root, "sbin", "shutdown")
- os.unlink(dst)
- shutil.copy2(src, dst)
-
- # copy linuxrc.s390
- src = joinpaths(self.root, "usr/share/anaconda/linuxrc.s390")
- dst = joinpaths(self.root, "sbin", "init")
- os.unlink(dst)
- shutil.copy2(src, dst)
-
- def setup_init(self):
- # replace init with anaconda init
- src = joinpaths(self.root, "usr", self.libdir, "anaconda", "init")
- dst = joinpaths(self.root, "sbin", "init")
- os.unlink(dst)
- shutil.copy2(src, dst)
-
- # init symlinks
- target = "/sbin/init"
- name = joinpaths(self.root, "init")
- os.symlink(target, name)
-
- for fname in ["halt", "poweroff", "reboot"]:
- name = joinpaths(self.root, "sbin", fname)
- os.unlink(name)
- os.symlink("init", name)
-
- for fname in ["runlevel", "shutdown", "telinit"]:
- name = joinpaths(self.root, "sbin", fname)
- os.unlink(name)
-
- def misc_tree_modifications(self):
- # create resolv.conf
- touch(joinpaths(self.root, "etc", "resolv.conf"))
-
- # create a basic /bin/login script that'll automatically start up
- # bash as a login shell. This is needed because we can't pass bash
- # arguments from the agetty command line, and there's not really a
- # better way to autologin root.
- with open(joinpaths(self.root, "bin/login"), "w") as fobj:
- fobj.write("#!/bin/bash\n")
- fobj.write("exec -l /bin/bash\n")
-
- def get_config_files(self, src_dir):
- # anaconda needs to change a couple of the default gconf entries
- gconf = joinpaths(self.root, "etc", "gconf", "gconf.xml.defaults")
-
- # 0 - path, 1 - entry type, 2 - value
- gconf_settings = \
- [("/apps/metacity/general/button_layout", "string", ":"),
- ("/apps/metacity/general/action_right_click_titlebar",
- "string", "none"),
- ("/apps/metacity/general/num_workspaces", "int", "1"),
- ("/apps/metacity/window_keybindings/close", "string", "disabled"),
- ("/apps/metacity/global_keybindings/run_command_window_screenshot",
- "string", "disabled"),
- ("/apps/metacity/global_keybindings/run_command_screenshot",
- "string", "disabled"),
- ("/apps/metacity/global_keybindings/switch_to_workspace_down",
- "string", "disabled"),
- ("/apps/metacity/global_keybindings/switch_to_workspace_left",
- "string", "disabled"),
- ("/apps/metacity/global_keybindings/switch_to_workspace_right",
- "string", "disabled"),
- ("/apps/metacity/global_keybindings/switch_to_workspace_up",
- "string", "disabled"),
- ("/desktop/gnome/interface/accessibility", "bool", "true"),
- ("/desktop/gnome/interface/at-spi-corba", "bool", "true")]
-
- for path, entry_type, value in gconf_settings:
- cmd = [self.lcmds.GCONFTOOL, "--direct",
- "--config-source=xml:readwrite:{0}".format(gconf),
- "-s", "-t", entry_type, path, value]
-
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
- proc.wait()
-
- # get rsyslog config
- src = joinpaths(src_dir, "rsyslog.conf")
- dst = joinpaths(self.root, "etc")
- shutil.copy2(src, dst)
-
- # get .bash_history
- src = joinpaths(src_dir, ".bash_history")
- dst = joinpaths(self.root, "root")
- shutil.copy2(src, dst)
-
- # get .profile
- src = joinpaths(src_dir, ".profile")
- dst = joinpaths(self.root, "root")
- shutil.copy2(src, dst)
-
- # get libuser.conf
- src = joinpaths(src_dir, "libuser.conf")
- dst = joinpaths(self.root, "etc")
- shutil.copy2(src, dst)
-
- # get selinux config
- if os.path.exists(joinpaths(self.root, "etc/selinux/targeted")):
- src = joinpaths(src_dir, "selinux.config")
- dst = joinpaths(self.root, "etc/selinux", "config")
- shutil.copy2(src, dst)
-
- def setup_sshd(self, src_dir):
- # get sshd config
- src = joinpaths(src_dir, "sshd_config.anaconda")
- dst = joinpaths(self.root, "etc", "ssh")
- shutil.copy2(src, dst)
-
- src = joinpaths(src_dir, "pam.sshd")
- dst = joinpaths(self.root, "etc", "pam.d", "sshd")
- shutil.copy2(src, dst)
-
- dst = joinpaths(self.root, "etc", "pam.d", "login")
- shutil.copy2(src, dst)
-
- dst = joinpaths(self.root, "etc", "pam.d", "remote")
- shutil.copy2(src, dst)
-
- # enable root shell logins and
- # 'install' account that starts anaconda on login
- passwd = joinpaths(self.root, "etc", "passwd")
- with open(passwd, "a") as fobj:
- fobj.write("sshd:x:74:74:Privilege-separated "
- "SSH:/var/empty/sshd:/sbin/nologin\n")
- fobj.write("install:x:0:0:root:/root:/sbin/loader\n")
-
- shadow = joinpaths(self.root, "etc", "shadow")
- with open(shadow, "w") as fobj:
- fobj.write("root::14438:0:99999:7:::\n")
- fobj.write("install::14438:0:99999:7:::\n")
-
- # change permissions
- chmod_(shadow, 400)
-
- def generate_ssh_keys(self):
- logger.info("generating SSH1 RSA host key")
- rsa1 = joinpaths(self.root, "etc/ssh/ssh_host_key")
- cmd = [self.lcmds.SSHKEYGEN, "-q", "-t", "rsa1", "-f", rsa1,
- "-C", "", "-N", ""]
- p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
- p.wait()
-
- logger.info("generating SSH2 RSA host key")
- rsa2 = joinpaths(self.root, "etc/ssh/ssh_host_rsa_key")
- cmd = [self.lcmds.SSHKEYGEN, "-q", "-t", "rsa", "-f", rsa2,
- "-C", "", "-N", ""]
- p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
- p.wait()
-
- logger.info("generating SSH2 DSA host key")
- dsa = joinpaths(self.root, "etc/ssh/ssh_host_dsa_key")
- cmd = [self.lcmds.SSHKEYGEN, "-q", "-t", "dsa", "-f", dsa,
- "-C", "", "-N", ""]
- p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
- p.wait()
-
- # change key file permissions
- for key in [rsa1, rsa2, dsa]:
- chmod_(key, 0600)
- chmod_(key + ".pub", 0644)
-
-
- def get_anaconda_portions(self):
- src = joinpaths(self.root, "usr", self.libdir, "anaconda", "loader")
- dst = joinpaths(self.root, "sbin")
- shutil.copy2(src, dst)
-
- src = joinpaths(self.root, "usr/share/anaconda", "loader.tr")
- dst = joinpaths(self.root, "etc")
- shutil.move(src, dst)
-
- src = joinpaths(self.root, "usr/libexec/anaconda", "auditd")
- dst = joinpaths(self.root, "sbin")
- shutil.copy2(src, dst)
-
- def compress(self, outfile, type="xz", speed="9"):
- chdir = lambda: os.chdir(self.root)
- start = time.time()
-
- find = subprocess.Popen([self.lcmds.FIND, "."], stdout=subprocess.PIPE,
- preexec_fn=chdir)
-
- cpio = subprocess.Popen([self.lcmds.CPIO,
- "--quiet", "-H", "newc", "-o"],
- stdin=find.stdout, stdout=subprocess.PIPE,
- preexec_fn=chdir)
-
- compressed = subprocess.Popen([type, "-%s" % speed], stdin=cpio.stdout,
- stdout=open(outfile, "wb"))
-
- logger.debug("compressing")
- rc = compressed.wait()
-
- elapsed = time.time() - start
-
- return True, elapsed
-
- def install_kernel_modules(self, keepmodules):
- self.move_modules()
- for kernel in os.listdir(joinpaths(self.root, "modules")):
- self.cleanup_kernel_modules(keepmodules, kernel)
- self.compress_modules(kernel)
- self.run_depmod(kernel)
diff --git a/src/pylorax/yumhelper.py b/src/pylorax/yumhelper.py
index d0f9087d..d050f5b9 100644
--- a/src/pylorax/yumhelper.py
+++ b/src/pylorax/yumhelper.py
@@ -21,153 +21,12 @@
import logging
logger = logging.getLogger("pylorax.yumhelper")
-
-import sys
-import os
-import fnmatch
-import glob
-import shutil
-import re
-
-import yum
-import yum.callbacks
-import yum.rpmtrans
-
+import sys, os, re
+import yum, yum.callbacks, yum.rpmtrans
import output
-from sysutils import joinpaths
-
-
-class LoraxYumHelper(object):
-
- def __init__(self, ybo):
- self.ybo = ybo
-
- # create our own installroot, the pungi one may be poluted
- installroot = joinpaths(self.ybo.conf.installroot, "installroot")
- os.makedirs(installroot)
- self.ybo.conf.installroot = installroot
-
- self.installroot = self.ybo.conf.installroot
- self.installed_packages = self.get_packages("installed")
-
- def install(self, pattern):
- try:
- self.ybo.install(name=pattern)
- except yum.Errors.InstallError:
- try:
- self.ybo.install(pattern=pattern)
- except yum.Errors.InstallError as e:
- msg = "cannot install {0}: {1}"
- logger.error(msg.format(pattern, e))
- return False
-
- return True
-
- def remove(self, package, pattern_list):
- if package:
- pkgobj = self.installed_packages.get(package)
- if not pkgobj:
- msg = "cannot erase {0}: Package not installed"
- logger.error(msg.format(package))
- return False
-
- # match every file if no pattern specified
- if None in pattern_list:
- if len(pattern_list) > 1:
- msg = "redundant patterns specified, " \
- "removing whole package {0}"
- logger.warning(msg.format(pkgobj.name))
-
- pattern_list = ["*"]
-
- logger.debug("erasing package {0}".format(pkgobj.name))
-
- total = len(pkgobj.filelist)
- newline = False
- count = 0
- for n, fname in enumerate(pkgobj.filelist, start=1):
- msg = "[{0:3.0f}%] erasing {1.ui_envra}\r"
- msg = msg.format(float(n) / float(total) * 100, pkgobj)
- output.LoraxOutput().write(msg)
- newline = True
-
- for pattern in pattern_list:
- if fnmatch.fnmatch(fname, pattern):
- fullpath = joinpaths(self.installroot, fname)
- if (os.path.islink(fullpath) or
- os.path.isfile(fullpath)):
-
- os.unlink(fullpath)
- logger.debug("removed {0}".format(fullpath))
- count += 1
-
- if newline:
- output.LoraxOutput().write("\n")
-
- if not count:
- msg = "no files matched patterns {0}"
- logger.warning(msg.format(pattern_list))
-
- else:
- for pattern in pattern_list:
- msg = "erasing files matching pattern {0}"
- logger.info(msg.format(pattern))
-
- fullpattern = joinpaths(self.installroot, pattern)
- count = 0
- for fname in glob.glob(fullpattern):
- # if there are symlinks, we could already removed the file
- if not os.path.exists(fname):
- continue
-
- if os.path.islink(fname) or os.path.isfile(fname):
- os.unlink(fname)
- else:
- shutil.rmtree(fname)
-
- logger.debug("removed {0}".format(fname))
- count += 1
-
- if not count:
- msg = "no files matched pattern {0}"
- logger.error(msg.format(pattern))
-
- return True
-
- def process_transaction(self, skip_broken=False):
- # skip broken
- self.ybo.conf.skip_broken = skip_broken
- self.ybo.buildTransaction()
-
- self.ybo.repos.setProgressBar(LoraxDownloadCallback())
-
- try:
- self.ybo.processTransaction(callback=LoraxTransactionCallback(),
- rpmDisplay=LoraxRpmCallback())
- except yum.Errors.YumRPMCheckError as e:
- logger.error("yum transaction error: {0}".format(e))
- sys.exit(1)
-
- self.ybo.closeRpmDB()
-
- self.installed_packages = self.get_packages("installed")
-
- def search(self, pattern):
- pl = self.ybo.doPackageLists(patterns=[pattern])
- return pl.installed, pl.available
-
- def get_packages(self, ptype="available"):
- if ptype not in ("available", "installed"):
- raise TypeError
-
- pl = self.ybo.doPackageLists(pkgnarrow=ptype)
-
- d = {}
- for pkgobj in getattr(pl, ptype):
- d[pkgobj.name] = pkgobj
-
- return d
+__all__ = ['LoraxDownloadCallback', 'LoraxTransactionCallback',
+ 'LoraxRpmCallback']
class LoraxDownloadCallback(yum.callbacks.DownloadBaseCallback):