Revert "Add systemd and agetty to the installation environment."

Add setup_init() and setup_s390_init() to installtree.py to handle
init setup, and stop using systemd so we can make F15 images.

This reverts commit b58190d660.
This commit is contained in:
Will Woods 2011-05-13 13:02:06 -04:00
parent 0f474a0e07
commit 9be6dd2864
3 changed files with 41 additions and 34 deletions

View File

@ -138,7 +138,6 @@ install "smartmontools"
install "smc-meera-fonts" install "smc-meera-fonts"
install "specspo" install "specspo"
install "strace" install "strace"
install "systemd"
install "systemd-sysvinit" install "systemd-sysvinit"
install "tigervnc-server-minimal" install "tigervnc-server-minimal"
install "tigervnc-server-module" install "tigervnc-server-module"
@ -185,7 +184,6 @@ install "${product}-release"
% endif % endif
## required directories ## required directories
mkdir "/etc/sysconfig"
mkdir "/var/run/dbus" mkdir "/var/run/dbus"
## not required packages installed as dependencies ## not required packages installed as dependencies
@ -197,6 +195,7 @@ remove "avahi-autoipd"
remove "avahi-libs" remove "avahi-libs"
remove "basesystem" remove "basesystem"
remove "checkpolicy" remove "checkpolicy"
remove "chkconfig"
remove "clusterlib" remove "clusterlib"
remove "clutter" remove "clutter"
remove "clutter-gesture" remove "clutter-gesture"
@ -227,6 +226,7 @@ remove "fedora-release-rawhide"
remove "fence-agents" remove "fence-agents"
remove "fence-virt" remove "fence-virt"
remove "file" remove "file"
remove "filesystem"
remove "fipscheck" remove "fipscheck"
remove "flac" remove "flac"
remove "fontpackages-filesystem" remove "fontpackages-filesystem"
@ -345,6 +345,7 @@ remove "sound-theme-freedesktop"
remove "squashfs-tools" remove "squashfs-tools"
remove "system-config-firewall-base" remove "system-config-firewall-base"
remove "system-config-users" remove "system-config-users"
remove "systemd-units"
remove "telnet" remove "telnet"
remove "tigervnc-license" remove "tigervnc-license"
remove "ttmkfdir" remove "ttmkfdir"
@ -486,6 +487,7 @@ remove --path "/usr/share/mime/video"
remove --path "/usr/share/mime/x-content" remove --path "/usr/share/mime/x-content"
remove --path "/usr/share/mime/x-epoc" remove --path "/usr/share/mime/x-epoc"
remove --path "/boot" remove --path "/boot"
remove --path "/cgroup"
remove --path "/home" remove --path "/home"
remove --path "/media" remove --path "/media"
remove --path "/mnt" remove --path "/mnt"
@ -495,11 +497,13 @@ remove --path "/usr/etc"
remove --path "/usr/games" remove --path "/usr/games"
remove --path "/usr/local" remove --path "/usr/local"
remove --path "/usr/tmp" remove --path "/usr/tmp"
remove --path "/var/cache"
remove --path "/var/db" remove --path "/var/db"
remove --path "/var/games" remove --path "/var/games"
remove --path "/var/lib/rpm/*" remove --path "/var/lib/rpm/*"
remove --path "/var/lib/yum" remove --path "/var/lib/yum"
remove --path "/var/local" remove --path "/var/local"
remove --path "/var/log"
remove --path "/var/mail" remove --path "/var/mail"
remove --path "/var/nis" remove --path "/var/nis"
remove --path "/var/opt" remove --path "/var/opt"
@ -533,6 +537,7 @@ remove "ModemManager" "/usr/${libdir}/*"
remove "ModemManager" "/usr/sbin/*" remove "ModemManager" "/usr/sbin/*"
remove "ModemManager" "/usr/share/icons/*" remove "ModemManager" "/usr/share/icons/*"
remove "NetworkManager" "/etc/rc.d/*" remove "NetworkManager" "/etc/rc.d/*"
remove "NetworkManager" "/lib/systemd/*"
remove "NetworkManager" "/usr/bin/*" remove "NetworkManager" "/usr/bin/*"
remove "NetworkManager" "/usr/share/NetworkManager/*" remove "NetworkManager" "/usr/share/NetworkManager/*"
remove "NetworkManager" "/usr/share/locale/*/NetworkManager.mo" remove "NetworkManager" "/usr/share/locale/*/NetworkManager.mo"
@ -559,7 +564,6 @@ remove "audit-libs" "/etc/*"
remove "audit-libs" "/${libdir}/libauparse*" remove "audit-libs" "/${libdir}/libauparse*"
remove "authconfig" "/usr/sbin/*" remove "authconfig" "/usr/sbin/*"
remove "authconfig" "/usr/share/*" remove "authconfig" "/usr/share/*"
remove "avahi" "/lib/systemd/*"
remove "avahi" "/usr/share/locale/*" remove "avahi" "/usr/share/locale/*"
remove "bash" "/etc/*" remove "bash" "/etc/*"
remove "bash" "/usr/bin/*" remove "bash" "/usr/bin/*"
@ -577,10 +581,6 @@ remove "ca-certificates" "/etc/pki/java/*"
remove "ca-certificates" "/etc/pki/tls/certs/ca-bundle.trust.crt" remove "ca-certificates" "/etc/pki/tls/certs/ca-bundle.trust.crt"
remove "ca-certificates" "/etc/ssl/*" remove "ca-certificates" "/etc/ssl/*"
remove "cairo" "/usr/${libdir}/libcairo-script*" remove "cairo" "/usr/${libdir}/libcairo-script*"
remove "chkconfig" "/sbin/chkconfig"
remove "chkconfig" "/usr/sbin/alternatives"
remove "chkconfig" "/usr/sbin/update-alternatives"
remove "chkconfig" "/var/lib/alternatives"
remove "cjkuni-uming-fonts" "/etc/X11/*" remove "cjkuni-uming-fonts" "/etc/X11/*"
remove "coreutils" "/etc/*" remove "coreutils" "/etc/*"
remove "coreutils" "/bin/link" remove "coreutils" "/bin/link"
@ -652,6 +652,7 @@ remove "createrepo" "/usr/share/*"
remove "cryptsetup-luks" "/usr/share/*" remove "cryptsetup-luks" "/usr/share/*"
remove "cyrus-sasl-lib" "/usr/sbin/*" remove "cyrus-sasl-lib" "/usr/sbin/*"
remove "db4" "/usr/*" remove "db4" "/usr/*"
remove "dbus" "/lib/systemd/*"
remove "dbus-glib" "/usr/bin/*" remove "dbus-glib" "/usr/bin/*"
remove "dbus-x11" "/etc/X11/*" remove "dbus-x11" "/etc/X11/*"
remove "dejavu-sans-fonts" "/usr/share/fonts/dejavu/DejaVuSans-BoldOblique*" remove "dejavu-sans-fonts" "/usr/share/fonts/dejavu/DejaVuSans-BoldOblique*"
@ -693,7 +694,6 @@ remove "fedora-gnome-theme" "/usr/share/themes/*"
remove "file-libs" "/usr/share/*" remove "file-libs" "/usr/share/*"
remove "findutils" "/usr/bin/oldfind" remove "findutils" "/usr/bin/oldfind"
remove "findutils" "/usr/share/*" remove "findutils" "/usr/share/*"
remove "firstboot" "/lib/systemd/*"
remove "firstboot" "/usr/sbin/*" remove "firstboot" "/usr/sbin/*"
remove "firstboot" "/usr/share/firstboot/*" remove "firstboot" "/usr/share/firstboot/*"
remove "firstboot" "/usr/share/locale/*" remove "firstboot" "/usr/share/locale/*"
@ -863,9 +863,7 @@ remove "hwdata" "/usr/share/hwdata/oui.txt"
remove "hwdata" "/usr/share/hwdata/pnp.ids" remove "hwdata" "/usr/share/hwdata/pnp.ids"
remove "hwdata" "/usr/share/hwdata/upgradelist" remove "hwdata" "/usr/share/hwdata/upgradelist"
remove "initscripts" "/etc/ppp/*" remove "initscripts" "/etc/ppp/*"
remove "initscripts" "/lib/systemd/system/fedora-readonly.service" remove "initscripts" "/lib/systemd/*"
remove "initscripts" "/lib/systemd/system/fedora-storage-init.service"
remove "initscripts" "/lib/systemd/system/fedora-wait-storage.service"
remove "initscripts" "/usr/sbin/*" remove "initscripts" "/usr/sbin/*"
remove "initscripts" "/usr/share/locale/*" remove "initscripts" "/usr/share/locale/*"
remove "iproute" "/etc/*" remove "iproute" "/etc/*"
@ -1110,17 +1108,9 @@ remove "system-config-date" "/usr/share/icons/*"
remove "system-config-keyboard" "/etc/*" remove "system-config-keyboard" "/etc/*"
remove "system-config-keyboard" "/usr/bin/*" remove "system-config-keyboard" "/usr/bin/*"
remove "system-config-keyboard" "/usr/share/icons/*" remove "system-config-keyboard" "/usr/share/icons/*"
remove "systemd-units" "/lib/systemd/system/bluetooth.target" remove "systemd" "/bin/*"
remove "systemd-units" "/lib/systemd/system/http-daemon.target" remove "systemd" "/lib/systemd/*"
remove "systemd-units" "/lib/systemd/system/kexec*" remove "systemd" "/usr/share/systemd/*"
remove "systemd-units" "/lib/systemd/system/local-fs.target.wants/media.mount"
remove "systemd-units" "/lib/systemd/system/mail-transfer-agent.target"
remove "systemd-units" "/lib/systemd/system/media.mount"
remove "systemd-units" "/lib/systemd/system/printer*"
remove "systemd-units" "/lib/systemd/system/*plymouth*"
remove "systemd-units" "/lib/systemd/system/quota*"
remove "systemd-units" "/lib/systemd/system/smartcard*"
remove "systemd-units" "/lib/systemd/system/systemd-remount-api-vfs.service"
remove "sysvinit-tools" "/bin/*" remove "sysvinit-tools" "/bin/*"
remove "sysvinit-tools" "/usr/bin/*" remove "sysvinit-tools" "/usr/bin/*"
remove "tar" "/usr/share/locale/*" remove "tar" "/usr/share/locale/*"
@ -1131,6 +1121,7 @@ remove "util-linux" "/bin/taskset"
remove "util-linux" "/etc/pam.d/chfn" remove "util-linux" "/etc/pam.d/chfn"
remove "util-linux" "/etc/pam.d/chsh" remove "util-linux" "/etc/pam.d/chsh"
remove "util-linux" "/sbin/addpart" remove "util-linux" "/sbin/addpart"
remove "util-linux" "/sbin/agetty"
remove "util-linux" "/sbin/cfdisk" remove "util-linux" "/sbin/cfdisk"
remove "util-linux" "/sbin/ctrlaltdel" remove "util-linux" "/sbin/ctrlaltdel"
remove "util-linux" "/sbin/delpart" remove "util-linux" "/sbin/delpart"

View File

@ -249,10 +249,12 @@ class Lorax(BaseLoraxClass):
logger.info("creating depmod.conf") logger.info("creating depmod.conf")
self.installtree.create_depmod_conf() self.installtree.create_depmod_conf()
# misc tree modifications # set up /sbin/init
if self.arch.basearch in ("s390", "s390x"): if self.arch.basearch in ("s390", "s390x"):
# TODO: move this to the arch template self.installtree.setup_s390_init()
self.installtree.misc_s390_modifications() else:
self.installtree.setup_init()
# misc tree modifications
self.installtree.misc_tree_modifications() self.installtree.misc_tree_modifications()
# get config files # get config files

View File

@ -358,22 +358,41 @@ class LoraxInstallTree(BaseLoraxClass):
with open(joinpaths(self.root, "etc/depmod.d/dd.conf"), "w") as fobj: with open(joinpaths(self.root, "etc/depmod.d/dd.conf"), "w") as fobj:
fobj.write(text) fobj.write(text)
def misc_s390_modifications(self): 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 # copy linuxrc.s390
src = joinpaths(self.root, "usr/share/anaconda/linuxrc.s390") src = joinpaths(self.root, "usr/share/anaconda/linuxrc.s390")
dst = joinpaths(self.root, "sbin", "init") dst = joinpaths(self.root, "sbin", "init")
os.unlink(dst) os.unlink(dst)
shutil.copy2(src, dst) shutil.copy2(src, dst)
def misc_tree_modifications(self): 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 # init symlinks
target = "/sbin/init" target = "/sbin/init"
name = joinpaths(self.root, "init") name = joinpaths(self.root, "init")
os.symlink(target, name) os.symlink(target, name)
os.unlink(joinpaths(self.root, "etc/systemd/system/default.target")) for fname in ["halt", "poweroff", "reboot"]:
os.symlink("/lib/systemd/system/anaconda.target", joinpaths(self.root, "etc/systemd/system/default.target")) 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 # create resolv.conf
touch(joinpaths(self.root, "etc", "resolv.conf")) touch(joinpaths(self.root, "etc", "resolv.conf"))
@ -445,11 +464,6 @@ class LoraxInstallTree(BaseLoraxClass):
dst = joinpaths(self.root, "etc/selinux", "config") dst = joinpaths(self.root, "etc/selinux", "config")
shutil.copy2(src, dst) shutil.copy2(src, dst)
# get sysconfig files
src = joinpaths(src_dir, "network")
dst = joinpaths(self.root, "etc/sysconfig")
shutil.copy2(src, dst)
def setup_sshd(self, src_dir): def setup_sshd(self, src_dir):
# get sshd config # get sshd config
src = joinpaths(src_dir, "sshd_config.anaconda") src = joinpaths(src_dir, "sshd_config.anaconda")