From 7d6dd11fe348fb76c3b8bb9e55285b480852cfca Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Wed, 16 Apr 2014 15:03:15 -0700 Subject: [PATCH 1/2] cleanup(sys-apps/systemd): Remove unused files. These are installed by gentoo-systemd-integration these days. --- .../sys-apps/systemd/files/gentoo-run.conf | 5 ----- .../sys-apps/systemd/files/var-lock.mount | 19 ------------------- .../sys-apps/systemd/files/var-run.mount | 19 ------------------- 3 files changed, 43 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/gentoo-run.conf delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/var-lock.mount delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/var-run.mount diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/gentoo-run.conf b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/gentoo-run.conf deleted file mode 100644 index 5b3bcab8f3..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/gentoo-run.conf +++ /dev/null @@ -1,5 +0,0 @@ -# New OpenRC versions replace /var/lock with a symlink to /run/lock. -# We just create that directory for now, just in case. -# Of course, it's not guaranteed that'll satisfy all relevant packages. - -d /run/lock 0755 root root - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/var-lock.mount b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/var-lock.mount deleted file mode 100644 index 07277adac3..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/var-lock.mount +++ /dev/null @@ -1,19 +0,0 @@ -# This file is part of systemd. -# -# systemd 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. - -[Unit] -Description=Lock Directory -Before=local-fs.target -# skip mounting if the directory does not exist or is a symlink -ConditionPathIsDirectory=/var/lock -ConditionPathIsSymbolicLink=!/var/lock - -[Mount] -What=/run/lock -Where=/var/lock -Type=bind -Options=bind diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/var-run.mount b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/var-run.mount deleted file mode 100644 index ab4da424c9..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/var-run.mount +++ /dev/null @@ -1,19 +0,0 @@ -# This file is part of systemd. -# -# systemd 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. - -[Unit] -Description=Runtime Directory -Before=local-fs.target -# skip mounting if the directory does not exist or is a symlink -ConditionPathIsDirectory=/var/run -ConditionPathIsSymbolicLink=!/var/run - -[Mount] -What=/run -Where=/var/run -Type=bind -Options=bind From b1fb592053a1cd19e7fede6615d14707d6e4e302 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Wed, 16 Apr 2014 15:06:22 -0700 Subject: [PATCH 2/2] fix(sys-apps/systemd): Don't prune systemd dirs Assorted config directories in /etc are normally empty but without them users generally have no idea that they can actually use them. Switch to installing them again and add tmpfiles rules to recreate them. --- .../sys-apps/systemd/files/systemd-coreos.conf | 9 +++++++++ .../{systemd-212-r1.ebuild => systemd-212-r2.ebuild} | 6 +----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/systemd-coreos.conf rename sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/{systemd-212-r1.ebuild => systemd-212-r2.ebuild} (98%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/systemd-coreos.conf b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/systemd-coreos.conf new file mode 100644 index 0000000000..07cc22308f --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/systemd-coreos.conf @@ -0,0 +1,9 @@ +d /etc/binfmt.d - - - - - +d /etc/modules-load.d - - - - - +d /etc/sysctl.d - - - - - +d /etc/systemd - - - - - +d /etc/systemd/network - - - - - +d /etc/systemd/system - - - - - +d /etc/systemd/user - - - - - +d /etc/tmpfiles.d - - - - - +d /var/lib/systemd - - - - - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r2.ebuild similarity index 98% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r2.ebuild index 31a58818c2..c2869ba324 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r2.ebuild @@ -350,11 +350,7 @@ multilib_src_install_all() { # Disable storing coredumps in journald, bug #433457 mv "${D}"/usr/lib/sysctl.d/50-coredump.conf{,.disabled} || die - # Preserve empty dir /var, bug #437008 - keepdir /var/lib/systemd - - # Keep /etc clean - rmdir "${D}"/etc/{binfmt,modules-load,sysctl,tmpfiles}.d || die + systemd_dotmpfilesd "${FILESDIR}"/systemd-coreos.conf # Don't default to graphical.target rm "${D}"/usr/lib/systemd/system/default.target || die