diff options
author | Mike Gilbert <floppym@gentoo.org> | 2017-11-20 17:01:14 -0500 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2017-11-20 17:02:47 -0500 |
commit | 4be05a627b9858a5c530045fef057ec6bb9057f1 (patch) | |
tree | 2487af0bcc52a7137cfbc0f9f106ffcbdfd85043 /sys-apps | |
parent | games-mud/gnome-mud: Restore stable KEYWORDS (diff) | |
download | gentoo-4be05a627b9858a5c530045fef057ec6bb9057f1.tar.gz gentoo-4be05a627b9858a5c530045fef057ec6bb9057f1.tar.bz2 gentoo-4be05a627b9858a5c530045fef057ec6bb9057f1.zip |
sys-apps/systemd: remove ROOTPREFIX variable and add usrmerge USE flag
Package-Manager: Portage-2.3.14_p5, Repoman-2.3.6
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/systemd/metadata.xml | 1 | ||||
-rw-r--r-- | sys-apps/systemd/systemd-9999.ebuild | 35 |
2 files changed, 11 insertions, 25 deletions
diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml index 357ed6005f92..85e4b806ba6c 100644 --- a/sys-apps/systemd/metadata.xml +++ b/sys-apps/systemd/metadata.xml @@ -27,6 +27,7 @@ <flag name="nat">Enable support for network address translation in networkd</flag> <flag name="qrcode">Enable qrcode output support in journal</flag> <flag name="sysv-utils">Install sysvinit compatibility symlinks and manpages for init, telinit, halt, poweroff, reboot, runlevel, and shutdown</flag> + <flag name="usrmerge">Enable /usr merge</flag> <flag name="vanilla">Disable Gentoo-specific behavior and compatibility quirks</flag> <flag name="xkb">Depend on <pkg>x11-libs/libxkbcommon</pkg> to allow logind to control the X11 keymap</flag> </use> diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild index 8256350c5e12..68d217b7d1cc 100644 --- a/sys-apps/systemd/systemd-9999.ebuild +++ b/sys-apps/systemd/systemd-9999.ebuild @@ -20,9 +20,7 @@ HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" LICENSE="GPL-2 LGPL-2.1 MIT public-domain" SLOT="0/2" -IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http - idn importd +kmod libidn2 +lz4 lzma nat pam policykit - qrcode +seccomp selinux ssl sysv-utils test vanilla xkb" +IUSE="acl apparmor audit build cryptsetup curl elfutils +gcrypt gnuefi http idn importd +kmod libidn2 +lz4 lzma nat pam policykit qrcode +seccomp selinux ssl sysv-utils test usrmerge vanilla xkb" REQUIRED_USE="importd? ( curl gcrypt lzma )" @@ -200,9 +198,8 @@ multilib_src_configure() { -Dpamlibdir="$(getpam_mod_dir)" # avoid bash-completion dep -Dbashcompletiondir="$(get_bashcompdir)" - # make sure we get /bin:/sbin in $PATH - -Dsplit-usr=true - -Drootprefix="${EPREFIX}${ROOTPREFIX}" + # make sure we get /bin:/sbin in PATH + -Dsplit-usr=$(usex usrmerge false true) -Dsysvinit-path= -Dsysvrcnd-path= # no deps @@ -299,10 +296,11 @@ multilib_src_install_all() { dodoc "${FILESDIR}"/nsswitch.conf if use sysv-utils; then + local app for app in halt poweroff reboot runlevel shutdown telinit; do - dosym "${EPREFIX}${ROOTPREFIX%/}/bin/systemctl" /sbin/${app} + dosym ../bin/systemctl /sbin/${app} done - dosym "${EPREFIX}${ROOTPREFIX%/}/lib/systemd/systemd" /sbin/init + dosym ../lib/systemd/systemd /sbin/init else # we just keep sysvinit tools, so no need for the mans rm "${ED%/}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \ @@ -328,12 +326,12 @@ multilib_src_install_all() { rm -fr "${ED%/}"/etc/systemd/system/sockets.target.wants || die rm -fr "${ED%/}"/etc/systemd/system/sysinit.target.wants || die - rm -r "${ED%/}${ROOTPREFIX%/}/lib/udev/hwdb.d" || die + rm -r "${ED%/}"/lib/udev/hwdb.d || die - if [[ ! -e "${ED%/}"/usr/lib/systemd/systemd ]]; then + if ! use usrmerge; then # Avoid breaking boot/reboot - dosym "../../..${ROOTPREFIX%/}/lib/systemd/systemd" /usr/lib/systemd/systemd - dosym "../../..${ROOTPREFIX%/}/lib/systemd/systemd-shutdown" /usr/lib/systemd/systemd-shutdown + dosym ../../../lib/systemd/systemd /usr/lib/systemd/systemd + dosym ../../../lib/systemd/systemd-shutdown /usr/lib/systemd/systemd-shutdown fi } @@ -381,19 +379,6 @@ migrate_locale() { fi } -pkg_preinst() { - # If /lib/systemd and /usr/lib/systemd are the same directory, remove the - # symlinks we created in src_install. - if [[ $(realpath "${EROOT%/}${ROOTPREFIX}/lib/systemd") == $(realpath "${EROOT%/}/usr/lib/systemd") ]]; then - if [[ -L ${ED%/}/usr/lib/systemd/systemd ]]; then - rm "${ED%/}/usr/lib/systemd/systemd" || die - fi - if [[ -L ${ED%/}/usr/lib/systemd/systemd-shutdown ]]; then - rm "${ED%/}/usr/lib/systemd/systemd-shutdown" || die - fi - fi -} - pkg_postinst() { newusergroup() { enewgroup "$1" |