From cf07cc98348e323e26acaca37bbab4bcf2b6cafc Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Tue, 4 Mar 2014 16:14:07 -0800 Subject: [PATCH 1/2] fix(sys-apps/systemd): Fix default.target in /usr instead of /etc --- ...0.0.1-r39.ebuild => coreos-init-0.0.1-r40.ebuild} | 0 .../coreos-base/coreos-init/coreos-init-9999.ebuild | 5 +---- .../{systemd-207-r4.ebuild => systemd-207-r5.ebuild} | 0 .../sys-apps/systemd/systemd-207.ebuild | 12 +++++++----- .../sys-apps/systemd/systemd-210.ebuild | 12 +++++++----- .../sys-apps/systemd/systemd-9999.ebuild | 12 +++++++----- 6 files changed, 22 insertions(+), 19 deletions(-) rename sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/{coreos-init-0.0.1-r39.ebuild => coreos-init-0.0.1-r40.ebuild} (100%) rename sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/{systemd-207-r4.ebuild => systemd-207-r5.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r39.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r40.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r39.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-0.0.1-r40.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild index 3de8d2f9ca..864d2a7873 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos-init/coreos-init-9999.ebuild @@ -37,7 +37,7 @@ DEPEND=" RDEPEND="${DEPEND} sys-block/parted sys-apps/gptfdisk - sys-apps/systemd + >=sys-apps/systemd-207-r5 " src_install() { @@ -48,9 +48,6 @@ src_install() { emake DESTDIR="${D}" install fi - # Set the default target to multi-user not graphical, this is CoreOS! - dosym /usr/lib/systemd/system/multi-user.target /etc/systemd/system/default.target - systemd_enable_service basic.target coreos-startup.target # Services! diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207-r4.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207-r5.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207-r4.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207-r5.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207.ebuild index b3a7496b9b..6ab5e40640 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207.ebuild @@ -242,11 +242,6 @@ multilib_src_install() { emake "${mymakeopts[@]}" fi - - rmdir ${D}/etc/binfmt.d - rmdir ${D}/etc/sysctl.d - rmdir ${D}/etc/tmpfiles.d - rmdir ${D}/etc/modules-load.d } multilib_src_install_all() { @@ -262,6 +257,13 @@ multilib_src_install_all() { # Preserve empty dir /var, bug #437008 keepdir /var/lib/systemd + + # Keep /etc clean + rmdir "${D}"/etc/{binfmt,modules-load,sysctl,tmpfiles}.d || die + + # Don't default to graphical.target + rm "${D}"/usr/lib/systemd/system/default.target || die + dosym multi-user.target /usr/lib/systemd/system/default.target } pkg_postinst() { diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-210.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-210.ebuild index cb79a46647..8918cb649b 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-210.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-210.ebuild @@ -321,11 +321,6 @@ multilib_src_install() { local pcfiles=( src/compat-libs/libsystemd-{daemon,id128,journal,login}.pc ) emake "${mymakeopts[@]}" install-pkgconfiglibDATA \ pkgconfiglib_DATA="${pcfiles[*]}" - - rmdir ${D}/etc/binfmt.d - rmdir ${D}/etc/sysctl.d - rmdir ${D}/etc/tmpfiles.d - rmdir ${D}/etc/modules-load.d } multilib_src_install_all() { @@ -342,6 +337,13 @@ multilib_src_install_all() { # Preserve empty dir /var, bug #437008 keepdir /var/lib/systemd + + # Keep /etc clean + rmdir "${D}"/etc/{binfmt,modules-load,sysctl,tmpfiles}.d || die + + # Don't default to graphical.target + rm "${D}"/usr/lib/systemd/system/default.target || die + dosym multi-user.target /usr/lib/systemd/system/default.target } migrate_locale() { diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild index b85775a1e5..618ed1a0c8 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild @@ -328,11 +328,6 @@ multilib_src_install() { local pcfiles=( src/compat-libs/libsystemd-{daemon,id128,journal,login}.pc ) emake "${mymakeopts[@]}" install-pkgconfiglibDATA \ pkgconfiglib_DATA="${pcfiles[*]}" - - rmdir ${D}/etc/binfmt.d - rmdir ${D}/etc/sysctl.d - rmdir ${D}/etc/tmpfiles.d - rmdir ${D}/etc/modules-load.d } multilib_src_install_all() { @@ -349,6 +344,13 @@ multilib_src_install_all() { # Preserve empty dir /var, bug #437008 keepdir /var/lib/systemd + + # Keep /etc clean + rmdir "${D}"/etc/{binfmt,modules-load,sysctl,tmpfiles}.d || die + + # Don't default to graphical.target + rm "${D}"/usr/lib/systemd/system/default.target || die + dosym multi-user.target /usr/lib/systemd/system/default.target } migrate_locale() { From 67e77500f3249b6c7eda131dc196f19d90642083 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Tue, 4 Mar 2014 16:56:19 -0800 Subject: [PATCH 2/2] fix(sys-apps/systemd): Don't enable services in /etc, move to /usr --- .../{systemd-207-r5.ebuild => systemd-207-r6.ebuild} | 0 .../sys-apps/systemd/systemd-207.ebuild | 9 +++++++++ .../sys-apps/systemd/systemd-210.ebuild | 12 ++++++++++++ .../sys-apps/systemd/systemd-9999.ebuild | 12 ++++++++++++ 4 files changed, 33 insertions(+) rename sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/{systemd-207-r5.ebuild => systemd-207-r6.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207-r5.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207-r6.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207-r5.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207-r6.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207.ebuild index 6ab5e40640..62d250e8e8 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-207.ebuild @@ -264,6 +264,15 @@ multilib_src_install_all() { # Don't default to graphical.target rm "${D}"/usr/lib/systemd/system/default.target || die dosym multi-user.target /usr/lib/systemd/system/default.target + + # Move a few services enabled in /etc to /usr + rm "${D}"/etc/systemd/system/getty.target.wants/getty@tty1.service || die + rmdir "${D}"/etc/systemd/system/getty.target.wants || die + dosym ../getty@.service /usr/lib/systemd/system/getty.target.wants/getty@tty1.service + + rm "${D}"/etc/systemd/system/multi-user.target.wants/remote-fs.target || die + rmdir "${D}"/etc/systemd/system/multi-user.target.wants || die + systemd_enable_service multi-user.target remote-fs.target } pkg_postinst() { diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-210.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-210.ebuild index 8918cb649b..951a917538 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-210.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-210.ebuild @@ -344,6 +344,18 @@ multilib_src_install_all() { # Don't default to graphical.target rm "${D}"/usr/lib/systemd/system/default.target || die dosym multi-user.target /usr/lib/systemd/system/default.target + + # Move a few services enabled in /etc to /usr + rm "${D}"/etc/systemd/system/getty.target.wants/getty@tty1.service || die + rmdir "${D}"/etc/systemd/system/getty.target.wants || die + dosym ../getty@.service /usr/lib/systemd/system/getty.target.wants/getty@tty1.service + + rm "${D}"/etc/systemd/system/multi-user.target.wants/remote-fs.target \ + "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service \ + || die + rmdir "${D}"/etc/systemd/system/multi-user.target.wants || die + systemd_enable_service multi-user.target remote-fs.target + systemd_enable_service multi-user.target systemd-networkd.service } migrate_locale() { diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild index 618ed1a0c8..1d7e474d07 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-9999.ebuild @@ -351,6 +351,18 @@ multilib_src_install_all() { # Don't default to graphical.target rm "${D}"/usr/lib/systemd/system/default.target || die dosym multi-user.target /usr/lib/systemd/system/default.target + + # Move a few services enabled in /etc to /usr + rm "${D}"/etc/systemd/system/getty.target.wants/getty@tty1.service || die + rmdir "${D}"/etc/systemd/system/getty.target.wants || die + dosym ../getty@.service /usr/lib/systemd/system/getty.target.wants/getty@tty1.service + + rm "${D}"/etc/systemd/system/multi-user.target.wants/remote-fs.target \ + "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service \ + || die + rmdir "${D}"/etc/systemd/system/multi-user.target.wants || die + systemd_enable_service multi-user.target remote-fs.target + systemd_enable_service multi-user.target systemd-networkd.service } migrate_locale() {