From 0a21e553b9eaa0eb12ec9e7061c940cecfceb02a Mon Sep 17 00:00:00 2001 From: Pacho Ramos Date: Fri, 19 Dec 2014 17:07:52 +0000 Subject: [PATCH] Add a USE flag to replace sys-apps/systemd-sysv-utils (#528006) Package-Manager: portage-2.2.15/cvs/Linux x86_64 Manifest-Sign-Key: 0xA188FBD4 --- sys-apps/systemd/ChangeLog | 11 +- sys-apps/systemd/Manifest | 15 +- sys-apps/systemd/metadata.xml | 1 + sys-apps/systemd/systemd-216-r2.ebuild | 509 +++++++++++++++++++++++++ sys-apps/systemd/systemd-217-r4.ebuild | 502 ++++++++++++++++++++++++ sys-apps/systemd/systemd-218-r1.ebuild | 502 ++++++++++++++++++++++++ sys-apps/systemd/systemd-9999.ebuild | 20 +- 7 files changed, 1547 insertions(+), 13 deletions(-) create mode 100644 sys-apps/systemd/systemd-216-r2.ebuild create mode 100644 sys-apps/systemd/systemd-217-r4.ebuild create mode 100644 sys-apps/systemd/systemd-218-r1.ebuild diff --git a/sys-apps/systemd/ChangeLog b/sys-apps/systemd/ChangeLog index af135bb5e838..4d74823006b5 100644 --- a/sys-apps/systemd/ChangeLog +++ b/sys-apps/systemd/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-apps/systemd # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.326 2014/12/19 16:58:09 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/ChangeLog,v 1.327 2014/12/19 17:07:50 pacho Exp $ + +*systemd-218-r1 (19 Dec 2014) +*systemd-217-r4 (19 Dec 2014) +*systemd-216-r2 (19 Dec 2014) + + 19 Dec 2014; Pacho Ramos +systemd-216-r2.ebuild, + +systemd-217-r4.ebuild, +systemd-218-r1.ebuild, metadata.xml, + systemd-9999.ebuild: + Add a USE flag to replace sys-apps/systemd-sysv-utils (#528006) 19 Dec 2014; Pacho Ramos -files/212-0001-sd-rtnl-fix-off-by-one.patch, diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest index c0021acd2782..e9c2c801e0c6 100644 --- a/sys-apps/systemd/Manifest +++ b/sys-apps/systemd/Manifest @@ -12,15 +12,18 @@ DIST systemd-218.tar.xz 3782276 SHA256 1b0768b53b6c6d813a93a4b8fe1f80cf53561b090 DIST systemd-gentoo-patches-217-r1.tar.xz 8388 SHA256 09a75238e12f520560de2a0714a0c37f206e25ae2c348cbfbf6ea526307e7a1b SHA512 bf310fa0dbcc82c49d7d537fb0cddd79ab83c836888706b946f110424a35cd71da9c509cc968a2dc3ccbb5ef6947b2d8b45b9d58a64da3c3dea269d8e8cf5fa7 WHIRLPOOL aad35822a2bed9f60a04245bd79434833e6f08331768b3bac2cea59c37e405064c29b5dca2f767eeace723a6daaf456862667aebc1c4b4a47548c817b5721755 EBUILD systemd-215-r3.ebuild 16057 SHA256 2da4addf870b75d67ef6bf8676beba3df6bec14d9cf7f207b12ab13744d4d9ea SHA512 32991ac75dcf24471330483cd66212c4e7cc32be257636b0c55be2beed91f24fbdd89455b9c1bff6ad8b67fc064add0417c00b5ed590bb3ec9b0c95ab2dcd080 WHIRLPOOL 923749465bc8c90a610f9abcbea66dd79fdce0fde29e0766468d925cc17764db829d150b281d7c08b0125b3d643f3aafd77e26f8271c883cdbafb277089a3342 EBUILD systemd-216-r1.ebuild 15637 SHA256 8fbf530eb7d9b02701571c0a3771ff15e4ad3630fd0616eb508664337e3644a5 SHA512 a1c30c8cfef7f20c52738c84ca5cc149cc080ef46bf778584e7afdd32153f633140ea5211e4a87c96f955fbea6c62d31a1dc9702613c3d905ffcab6bb24c6340 WHIRLPOOL aa9b9e921cd6b59ee82857c1e16fa9bde9087f0aad85813661f41dd6663968c1d68e8ce2277da03a5858457109684e80eb87a76a4c2912f1a0d124bb2e70a884 +EBUILD systemd-216-r2.ebuild 15967 SHA256 a1fecb5766e085e896e00cea1975f63e50ae269a46c6902f473cd3707382ee73 SHA512 9f04203a344f8799328c4b5ac5ecd743ed4edc4c2f3d9e30c2141afcf1e007b1b5cb0f1681656e3e122e7d7c5aaffce815d04ecafd08392cc954fdb59749eca6 WHIRLPOOL a47661edd7383358080433523d96fc6ec4bcfa41e4d50c45c7952b6522bfa63fe208e9d875879b6aca3c21c3779a73e483c96f88b7a9be7b41212e6979a32219 EBUILD systemd-217-r3.ebuild 15572 SHA256 1e04c7dd56c989efda7546f86f3165be5a68e215ea4f8795fe2237f10b328e09 SHA512 979e61dce72446fb73b325021d662dbdc99f6c63c2d9ce4614cb8c6d3daa1d31c155d53daec2ce3b2c5d4e84916cb631beead049cf0d9c0d73106ca89b8e0ef1 WHIRLPOOL 58f17767fb81f0a459353fbb747f6dd4df2f1cc30d3510aeea8d34ec2182e94c46b6bd3ef916bccba8039471f1f243d9da1b06ae1f7c6b837d384e4665110ed4 +EBUILD systemd-217-r4.ebuild 15811 SHA256 0157be2da212c331ad0a7e26a525932b0c5294ef2f41260ca435c04726209cd1 SHA512 70f81d7cff54bea0c1492097d957dfccc4ee473a11d0cd12407e25a902c3fe8ad0e812822141f76403a4979c94f2fd326c2c6223cfec6c674db3b7da6de0fb13 WHIRLPOOL 7d14403db539aec949c1274a6361d05940ce718c0128f62f8426f8322b7cf4634085ecdacf5ab57756a48149058ba815b4878c520460456e245b5c3bafc02e1a +EBUILD systemd-218-r1.ebuild 15797 SHA256 193b95dbc064da2946a845e5ef9ddaa6ce53691630eedd179935a564aa94c979 SHA512 4443b005b65994f3c0b735a2ce146e0f6aff72732c0bf91b904ed3980c419344598a2fb8d56e7c54bf1bea5d8dab3f3a6d6541ad9b709ab8975b7c5511e79e12 WHIRLPOOL a567b80a05d3a2fe270c574f420283c82047747f9a5a1840d5329648fdcba5c6f27b89789c40d63637acda68d7199d6f3b65954ab5f475a54a9f90f0c91e585a EBUILD systemd-218.ebuild 15555 SHA256 a517ce8478c19b1e3e34e3462b625341f2fe78173a626e64bda8b4b49964532a SHA512 29d740558476e507eb1a0dc022025318ec313a5b8f4d274edf1bccaf9e9e6316abd2abf9a9c6452f86f222d9f190a27ab40e09705486893b97cfa17a198418be WHIRLPOOL ade3bd663c3e112587b8214fe90d7f53f0cbab71461cc464fcf1b82b1bb0538eb29eaa81e78e3952943753aae2da51eb50bd36bff4a8215fcf2cd0e56dbbb75c -EBUILD systemd-9999.ebuild 15946 SHA256 7a7852b8a73dc9ceccb1a05675e8cd290f49fc4e7243216714a5243bed4d135d SHA512 7b558ddc6ac42d62a2e1d425ed059cf3409dd1a15ca3614cecf3e6b46d707bd436a09a430e8fa082f5170086f989a185e8cce1d5fe535495c2d2166341a2a80a WHIRLPOOL b91c006aee719c833da72780e1078efbee02158b48b0a0d82ecaf1c0457ebab84ea515154fe61c22a20f75d44c54f984b0beb6eee00f4c0cc074ab86d42f12f9 -MISC ChangeLog 58457 SHA256 7df3d7ef3ddcbac9a5c3c3ef9a48466135ac6f8e1e2fcdfebebf56e5b112ab35 SHA512 1c8d1e73aa503184c503729e8e9c757e737fb4317400a9b66989ff2d2e76741cbc8bd1541c5a4f118c8db382144d1dca309b081506b2b3ff34c3739aed53361d WHIRLPOOL 69187b1c605c53d105b6181db3c0fdd649f16713c1259bfcd5aa54af60b5ff5d40c7756e381d1b78b8b1e788e69c85075946ed32eee88434014e76d5a956a73a -MISC metadata.xml 1474 SHA256 f7ce860dd266f682528dcf29749fa5b10bcecbffdf8f1f629d41ab6d9f7e6e28 SHA512 f690ef20293d552e92c471d0da0998f5abf39979a8cda9f05cd8ef2c633406aab9fb7ef686638ab5ad59f07b303da89838febcb572de108c8bc57aa6df56f812 WHIRLPOOL 16c38645bd34353df55b723852276e05e8c3a0e0d0faa3cd68698b841ade901041bcc536e2ce9a1498529c15c3cf33ebfe6a4ad4e4daac7ac0fc390947d12325 +EBUILD systemd-9999.ebuild 16185 SHA256 efd4d95b5980a0a5b171bdaa21313ea413ed23f7d0add11229ff47645ae7e1cd SHA512 41d0066e86c703a77136419362170b3a5c4beb16710121d3b98f27c0bb91f1d0dbf825ee132dbe7d598eea6a29635cc53ebcb9f1d7c4693291efe555350f613b WHIRLPOOL cc2e97480818d8be15db1b0c00676b951886536e5fc9c6dda32858096080d02497455a64081a1cf0cf42907e96d410786cf574cce9ff8704caf4df9faa46500a +MISC ChangeLog 58772 SHA256 fd0c4b0b7bae40f11fe34a3981a0425f1a48027df3a4e4f789946ec16b3334ce SHA512 ae5e3198b0678d899d8d7fea30f628cdc841f3a42563ee98d0042850824437e264a89176e5cf00f7eefb27d54278e5f41e6c88b55ec08c821ff17d5fb280eef9 WHIRLPOOL 5edcccb84d393c3f05c2a770cec29c2c8cfcc5aa7cb7f96da9d630bfc717228c42e2a613e83934ad414cfc0085c9a9b947fa86e8e27e63df1b881e6e3da0910a +MISC metadata.xml 1560 SHA256 324b6648be6be5d66bd83621c4f60ff8fa7ca1bb7a5951f06a303869546bba5f SHA512 1af44b819ae101735ed53f3560fb72245db816d55f8309b4ed9e0e7ed98a6c8012c478acf141f66a14a4b3c5092abdfd314468de2cd62f3f1b05cf2081f7c0b3 WHIRLPOOL 06e876f88111c5a23ed08d92d67076620e0bc1d88a10d733a17cbd66f8ce0d21b3a56ed10f976fd0450e66d3e1d728696c081376e35a6f6834af4c365db26e98 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iEYEAREIAAYFAlSUWSIACgkQCaWpQKGI+9QywACdH1/jq+Uo5k4pFtkC2pmIeZmK -Ib0An3sifMUaRFKyv6EkAbQuHB8pMQEE -=m3YO +iEYEAREIAAYFAlSUW2gACgkQCaWpQKGI+9QVYQCeO6MQj67SixEhbsmxCcOYJGvz +JGkAn2b9iRpsxifStWVLVqSvfKCK6ynP +=Hujs -----END PGP SIGNATURE----- diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml index 3440fb6510ac..e6a53096b5af 100644 --- a/sys-apps/systemd/metadata.xml +++ b/sys-apps/systemd/metadata.xml @@ -19,6 +19,7 @@ Enable lz4 compression for the journal Enable qrcode output support in journal Enable system call filtering via seccomp + Install sysvinit compatibility symlinks and manpages Enable experimental userspace virtual terminal support Disable Gentoo-specific behavior and compatibility quirks Validate XKB keymap in logind diff --git a/sys-apps/systemd/systemd-216-r2.ebuild b/sys-apps/systemd/systemd-216-r2.ebuild new file mode 100644 index 000000000000..234287b9a9c2 --- /dev/null +++ b/sys-apps/systemd/systemd-216-r2.ebuild @@ -0,0 +1,509 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-216-r2.ebuild,v 1.1 2014/12/19 17:07:50 pacho Exp $ + +EAPI=5 + +AUTOTOOLS_PRUNE_LIBTOOL_FILES=all +PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} ) +inherit autotools-utils bash-completion-r1 linux-info multilib \ + multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \ + user + +DESCRIPTION="System and service manager for Linux" +HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd" +SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0/2" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="acl apparmor audit cryptsetup curl doc elfutils +firmware-loader gcrypt gudev http + idn introspection kdbus +kmod lz4 lzma pam policykit python qrcode +seccomp + selinux ssl sysv-utils test vanilla" + +MINKV="3.8" + +COMMON_DEPEND=">=sys-apps/util-linux-2.20:0= + sys-libs/libcap:0= + acl? ( sys-apps/acl:0= ) + apparmor? ( sys-libs/libapparmor:0= ) + audit? ( >=sys-process/audit-2:0= ) + cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= ) + curl? ( net-misc/curl:0= ) + elfutils? ( >=dev-libs/elfutils-0.158:0= ) + gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) + gudev? ( >=dev-libs/glib-2.34.3:2=[${MULTILIB_USEDEP}] ) + http? ( + >=net-libs/libmicrohttpd-0.9.33:0= + ssl? ( >=net-libs/gnutls-3.1.4:0= ) + ) + idn? ( net-dns/libidn:0= ) + introspection? ( >=dev-libs/gobject-introspection-1.31.1:0= ) + kmod? ( >=sys-apps/kmod-15:0= ) + lz4? ( >=app-arch/lz4-0_p119:0=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) + pam? ( virtual/pam:= ) + python? ( ${PYTHON_DEPS} ) + qrcode? ( media-gfx/qrencode:0= ) + seccomp? ( sys-libs/libseccomp:0= ) + selinux? ( sys-libs/libselinux:0= ) + sysv-utils? ( !sys-apps/sysvinit + >=sys-apps/util-linux-2.24.1-r2 ) + abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" + +# baselayout-2.2 has /run +RDEPEND="${COMMON_DEPEND} + >=sys-apps/baselayout-2.2 + || ( + >=sys-apps/util-linux-2.22 + "${locale_conf}" <<-EOF + # This file has been created by the sys-apps/systemd ebuild. + # See locale.conf(5) and localectl(1). + + # LANG=${LANG} + EOF + eend ${?} || FAIL=1 + fi + fi + + if [[ ! -L ${envd_locale} ]]; then + # now, if env.d/??locale is not a symlink (to locale.conf)... + if [[ -e ${envd_locale} ]]; then + # ...warn the user that he has duplicate locale settings + ewarn + ewarn "To ensure consistent behavior, you should replace ${envd_locale}" + ewarn "with a symlink to ${locale_conf}. Please migrate your settings" + ewarn "and create the symlink with the following command:" + ewarn "ln -s -n -f ../locale.conf ${envd_locale}" + ewarn + else + # ...or just create the symlink if there's nothing here + ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" + ln -n -s ../locale.conf "${envd_locale_def}" + eend ${?} || FAIL=1 + fi + fi +} + +migrate_net_name_slot() { + # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, + # do the same for 80-net-setup-link.rules to keep the old behavior + local net_move=no + local net_name_slot_sym=no + local net_rules_path="${EROOT%/}"/etc/udev/rules.d + local net_name_slot="${net_rules_path}"/80-net-name-slot.rules + local net_setup_link="${net_rules_path}"/80-net-setup-link.rules + if [[ -e ${net_setup_link} ]]; then + net_move=no + elif [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]]; then + net_move=yes + elif [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then + net_move=yes + net_name_slot_sym=yes + fi + if [[ ${net_move} == yes ]]; then + ebegin "Copying ${net_name_slot} to ${net_setup_link}" + + if [[ ${net_name_slot_sym} == yes ]]; then + ln -nfs /dev/null "${net_setup_link}" + else + cp "${net_name_slot}" "${net_setup_link}" + fi + eend $? || FAIL=1 + fi +} + +pkg_postinst() { + newusergroup() { + enewgroup "$1" + enewuser "$1" -1 -1 -1 "$1" + } + + enewgroup input + enewgroup systemd-journal + newusergroup systemd-bus-proxy + newusergroup systemd-journal-gateway + newusergroup systemd-journal-remote + newusergroup systemd-journal-upload + newusergroup systemd-network + newusergroup systemd-resolve + newusergroup systemd-timesync + use http && newusergroup systemd-journal-gateway + + systemd_update_catalog + + # Keep this here in case the database format changes so it gets updated + # when required. Despite that this file is owned by sys-apps/hwids. + if has_version "sys-apps/hwids[udev]"; then + udevadm hwdb --update --root="${ROOT%/}" + fi + + udev_reload || FAIL=1 + + # Bug 465468, make sure locales are respect, and ensure consistency + # between OpenRC & systemd + migrate_locale + + # Migrate 80-net-name-slot.rules -> 80-net-setup-link.rules + migrate_net_name_slot + + if [[ ${FAIL} ]]; then + eerror "One of the postinst commands failed. Please check the postinst output" + eerror "for errors. You may need to clean up your system and/or try installing" + eerror "systemd again." + eerror + fi + + if [[ ! -L "${ROOT}"/etc/mtab ]]; then + ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts." + ewarn "Not having it is not supported by upstream and will cause tools like 'df'" + ewarn "and 'mount' to not work properly. Please run:" + ewarn " # ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'" + ewarn + fi + + if [[ $(readlink "${ROOT}"/etc/resolv.conf) == */run/systemd/network/resolv.conf ]]; then + ewarn "resolv.conf is now generated by systemd-resolved. To use it, enable" + ewarn "systemd-resolved.service, and create a symlink from /etc/resolv.conf" + ewarn "to /run/systemd/resolve/resolv.conf" + ewarn + fi + + if ! has_version sys-apps/systemd-ui; then + elog "To get additional features, a number of optional runtime dependencies may" + elog "be installed:" + elog "- sys-apps/systemd-ui: for GTK+ systemadm UI and gnome-ask-password-agent" + fi + + if has_version sys-apps/openrc && + ! has_version sys-fs/udev-init-scripts; then + elog "If you plan to boot using OpenRC and udev or eudev, you" + elog "need to install the udev-init-scripts package." + fi +} + +pkg_prerm() { + # If removing systemd completely, remove the catalog database. + if [[ ! ${REPLACED_BY_VERSION} ]]; then + rm -f -v "${EROOT}"/var/lib/systemd/catalog/database + fi +} diff --git a/sys-apps/systemd/systemd-217-r4.ebuild b/sys-apps/systemd/systemd-217-r4.ebuild new file mode 100644 index 000000000000..64537bc63b2b --- /dev/null +++ b/sys-apps/systemd/systemd-217-r4.ebuild @@ -0,0 +1,502 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-217-r4.ebuild,v 1.1 2014/12/19 17:07:50 pacho Exp $ + +EAPI=5 + +AUTOTOOLS_PRUNE_LIBTOOL_FILES=all +PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} ) +inherit autotools-utils bash-completion-r1 linux-info multilib \ + multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \ + user + +DESCRIPTION="System and service manager for Linux" +HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd" +SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz + http://dev.gentoo.org/~floppym/dist/systemd-gentoo-patches-217-r1.tar.xz" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0/2" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="acl apparmor audit cryptsetup curl doc elfutils gcrypt gudev http + idn introspection kdbus +kmod lz4 lzma pam policykit python qrcode +seccomp + selinux ssl sysv-utils terminal test vanilla" + +MINKV="3.8" + +COMMON_DEPEND=">=sys-apps/util-linux-2.25:0= + sys-libs/libcap:0= + acl? ( sys-apps/acl:0= ) + apparmor? ( sys-libs/libapparmor:0= ) + audit? ( >=sys-process/audit-2:0= ) + cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= ) + curl? ( net-misc/curl:0= ) + elfutils? ( >=dev-libs/elfutils-0.158:0= ) + gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) + gudev? ( >=dev-libs/glib-2.34.3:2=[${MULTILIB_USEDEP}] ) + http? ( + >=net-libs/libmicrohttpd-0.9.33:0= + ssl? ( >=net-libs/gnutls-3.1.4:0= ) + ) + idn? ( net-dns/libidn:0= ) + introspection? ( >=dev-libs/gobject-introspection-1.31.1:0= ) + kmod? ( >=sys-apps/kmod-15:0= ) + lz4? ( >=app-arch/lz4-0_p119:0=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) + pam? ( virtual/pam:= ) + python? ( ${PYTHON_DEPS} ) + qrcode? ( media-gfx/qrencode:0= ) + seccomp? ( sys-libs/libseccomp:0= ) + selinux? ( sys-libs/libselinux:0= ) + sysv-utils? ( !sys-apps/sysvinit ) + terminal? ( dev-libs/libevdev:0= + >=x11-libs/libxkbcommon-0.4:0= + x11-libs/libdrm:0= ) + abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" + +# baselayout-2.2 has /run +RDEPEND="${COMMON_DEPEND} + >=sys-apps/baselayout-2.2 + !sys-apps/systemd-sysv-utils + !sys-auth/nss-myhostname + !=sys-apps/dbus-1.8.8 if/when this is dropped. + local pcfiles=( src/compat-libs/libsystemd-{daemon,id128,journal,login}.pc ) + emake "${mymakeopts[@]}" install-pkgconfiglibDATA \ + pkgconfiglib_DATA="${pcfiles[*]}" +} + +multilib_src_install_all() { + prune_libtool_files --modules + einstalldocs + + if use sysv-utils; then + for app in halt poweroff reboot runlevel shutdown telinit; do + dosym "..${ROOTPREFIX}/bin/systemctl" /sbin/${app} + done + else + # we just keep sysvinit tools, so no need for the mans + rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \ + || die + rm "${D}"/usr/share/man/man1/init.1 || die + fi + + # Disable storing coredumps in journald, bug #433457 + mv "${D}"/usr/lib/sysctl.d/50-coredump.conf{,.disabled} || die + + # Preserve empty dirs in /etc & /var, bug #437008 + keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \ + /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \ + /var/log/journal/remote + + # Symlink /etc/sysctl.conf for easy migration. + dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf + + # If we install these symlinks, there is no way for the sysadmin to remove them + # permanently. + rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service + rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service + rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-timesyncd.service + rm -rf "${D}"/etc/systemd/system/network-online.target.wants +} + +migrate_locale() { + local envd_locale_def="${EROOT%/}/etc/env.d/02locale" + local envd_locale=( "${EROOT%/}"/etc/env.d/??locale ) + local locale_conf="${EROOT%/}/etc/locale.conf" + + if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then + # If locale.conf does not exist... + if [[ -e ${envd_locale} ]]; then + # ...either copy env.d/??locale if there's one + ebegin "Moving ${envd_locale} to ${locale_conf}" + mv "${envd_locale}" "${locale_conf}" + eend ${?} || FAIL=1 + else + # ...or create a dummy default + ebegin "Creating ${locale_conf}" + cat > "${locale_conf}" <<-EOF + # This file has been created by the sys-apps/systemd ebuild. + # See locale.conf(5) and localectl(1). + + # LANG=${LANG} + EOF + eend ${?} || FAIL=1 + fi + fi + + if [[ ! -L ${envd_locale} ]]; then + # now, if env.d/??locale is not a symlink (to locale.conf)... + if [[ -e ${envd_locale} ]]; then + # ...warn the user that he has duplicate locale settings + ewarn + ewarn "To ensure consistent behavior, you should replace ${envd_locale}" + ewarn "with a symlink to ${locale_conf}. Please migrate your settings" + ewarn "and create the symlink with the following command:" + ewarn "ln -s -n -f ../locale.conf ${envd_locale}" + ewarn + else + # ...or just create the symlink if there's nothing here + ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" + ln -n -s ../locale.conf "${envd_locale_def}" + eend ${?} || FAIL=1 + fi + fi +} + +migrate_net_name_slot() { + # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, + # do the same for 80-net-setup-link.rules to keep the old behavior + local net_move=no + local net_name_slot_sym=no + local net_rules_path="${EROOT%/}"/etc/udev/rules.d + local net_name_slot="${net_rules_path}"/80-net-name-slot.rules + local net_setup_link="${net_rules_path}"/80-net-setup-link.rules + if [[ -e ${net_setup_link} ]]; then + net_move=no + elif [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]]; then + net_move=yes + elif [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then + net_move=yes + net_name_slot_sym=yes + fi + if [[ ${net_move} == yes ]]; then + ebegin "Copying ${net_name_slot} to ${net_setup_link}" + + if [[ ${net_name_slot_sym} == yes ]]; then + ln -nfs /dev/null "${net_setup_link}" + else + cp "${net_name_slot}" "${net_setup_link}" + fi + eend $? || FAIL=1 + fi +} + +pkg_postinst() { + newusergroup() { + enewgroup "$1" + enewuser "$1" -1 -1 -1 "$1" + } + + enewgroup input + enewgroup systemd-journal + newusergroup systemd-bus-proxy + newusergroup systemd-journal-gateway + newusergroup systemd-journal-remote + newusergroup systemd-journal-upload + newusergroup systemd-network + newusergroup systemd-resolve + newusergroup systemd-timesync + use http && newusergroup systemd-journal-gateway + + systemd_update_catalog + + # Keep this here in case the database format changes so it gets updated + # when required. Despite that this file is owned by sys-apps/hwids. + if has_version "sys-apps/hwids[udev]"; then + udevadm hwdb --update --root="${ROOT%/}" + fi + + udev_reload || FAIL=1 + + # Bug 465468, make sure locales are respect, and ensure consistency + # between OpenRC & systemd + migrate_locale + + # Migrate 80-net-name-slot.rules -> 80-net-setup-link.rules + migrate_net_name_slot + + if [[ ${FAIL} ]]; then + eerror "One of the postinst commands failed. Please check the postinst output" + eerror "for errors. You may need to clean up your system and/or try installing" + eerror "systemd again." + eerror + fi + + if [[ ! -L "${ROOT}"/etc/mtab ]]; then + ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts." + ewarn "Not having it is not supported by upstream and will cause tools like 'df'" + ewarn "and 'mount' to not work properly. Please run:" + ewarn " # ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'" + ewarn + fi + + if [[ $(readlink "${ROOT}"/etc/resolv.conf) == */run/systemd/network/resolv.conf ]]; then + ewarn "resolv.conf is now generated by systemd-resolved. To use it, enable" + ewarn "systemd-resolved.service, and create a symlink from /etc/resolv.conf" + ewarn "to /run/systemd/resolve/resolv.conf" + ewarn + fi + + if ! has_version sys-apps/systemd-ui; then + elog "To get additional features, a number of optional runtime dependencies may" + elog "be installed:" + elog "- sys-apps/systemd-ui: for GTK+ systemadm UI and gnome-ask-password-agent" + fi + + if has_version sys-apps/openrc && + ! has_version sys-fs/udev-init-scripts; then + elog "If you plan to boot using OpenRC and udev or eudev, you" + elog "need to install the udev-init-scripts package." + fi +} + +pkg_prerm() { + # If removing systemd completely, remove the catalog database. + if [[ ! ${REPLACED_BY_VERSION} ]]; then + rm -f -v "${EROOT}"/var/lib/systemd/catalog/database + fi +} diff --git a/sys-apps/systemd/systemd-218-r1.ebuild b/sys-apps/systemd/systemd-218-r1.ebuild new file mode 100644 index 000000000000..87de7e8ff751 --- /dev/null +++ b/sys-apps/systemd/systemd-218-r1.ebuild @@ -0,0 +1,502 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-218-r1.ebuild,v 1.1 2014/12/19 17:07:50 pacho Exp $ + +EAPI=5 + +AUTOTOOLS_PRUNE_LIBTOOL_FILES=all +PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} ) +inherit autotools-utils bash-completion-r1 linux-info multilib \ + multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \ + user + +DESCRIPTION="System and service manager for Linux" +HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd" +SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz" + +LICENSE="GPL-2 LGPL-2.1 MIT public-domain" +SLOT="0/2" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="acl apparmor audit cryptsetup curl doc elfutils gcrypt gudev http + idn introspection kdbus +kmod lz4 lzma pam policykit python qrcode +seccomp + selinux ssl sysv-utils terminal test vanilla xkb" + +MINKV="3.8" + +COMMON_DEPEND=">=sys-apps/util-linux-2.25:0= + sys-libs/libcap:0= + acl? ( sys-apps/acl:0= ) + apparmor? ( sys-libs/libapparmor:0= ) + audit? ( >=sys-process/audit-2:0= ) + cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= ) + curl? ( net-misc/curl:0= ) + elfutils? ( >=dev-libs/elfutils-0.158:0= ) + gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) + gudev? ( >=dev-libs/glib-2.34.3:2=[${MULTILIB_USEDEP}] ) + http? ( + >=net-libs/libmicrohttpd-0.9.33:0= + ssl? ( >=net-libs/gnutls-3.1.4:0= ) + ) + idn? ( net-dns/libidn:0= ) + introspection? ( >=dev-libs/gobject-introspection-1.31.1:0= ) + kmod? ( >=sys-apps/kmod-15:0= ) + lz4? ( >=app-arch/lz4-0_p119:0=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) + pam? ( virtual/pam:= ) + python? ( ${PYTHON_DEPS} ) + qrcode? ( media-gfx/qrencode:0= ) + seccomp? ( sys-libs/libseccomp:0= ) + selinux? ( sys-libs/libselinux:0= ) + sysv-utils? ( !sys-apps/sysvinit ) + terminal? ( >=dev-libs/libevdev-1.2:0= + >=x11-libs/libxkbcommon-0.5:0= + >=x11-libs/libdrm-2.4:0= ) + xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) + abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" + +# baselayout-2.2 has /run +RDEPEND="${COMMON_DEPEND} + >=sys-apps/baselayout-2.2 + !sys-apps/systemd-sysv-utils + !sys-auth/nss-myhostname + !=sys-apps/dbus-1.8.8 if/when this is dropped. + local pcfiles=( src/compat-libs/libsystemd-{daemon,id128,journal,login}.pc ) + emake "${mymakeopts[@]}" install-pkgconfiglibDATA \ + pkgconfiglib_DATA="${pcfiles[*]}" +} + +multilib_src_install_all() { + prune_libtool_files --modules + einstalldocs + + if use sysv-utils; then + for app in halt poweroff reboot runlevel shutdown telinit; do + dosym "..${ROOTPREFIX}/bin/systemctl" /sbin/${app} + done + else + # we just keep sysvinit tools, so no need for the mans + rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \ + || die + rm "${D}"/usr/share/man/man1/init.1 || die + fi + + # Disable storing coredumps in journald, bug #433457 + mv "${D}"/usr/lib/sysctl.d/50-coredump.conf{,.disabled} || die + + # Preserve empty dirs in /etc & /var, bug #437008 + keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \ + /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \ + /var/log/journal/remote + + # Symlink /etc/sysctl.conf for easy migration. + dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf + + # If we install these symlinks, there is no way for the sysadmin to remove them + # permanently. + rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service + rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service + rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-timesyncd.service + rm -rf "${D}"/etc/systemd/system/network-online.target.wants +} + +migrate_locale() { + local envd_locale_def="${EROOT%/}/etc/env.d/02locale" + local envd_locale=( "${EROOT%/}"/etc/env.d/??locale ) + local locale_conf="${EROOT%/}/etc/locale.conf" + + if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then + # If locale.conf does not exist... + if [[ -e ${envd_locale} ]]; then + # ...either copy env.d/??locale if there's one + ebegin "Moving ${envd_locale} to ${locale_conf}" + mv "${envd_locale}" "${locale_conf}" + eend ${?} || FAIL=1 + else + # ...or create a dummy default + ebegin "Creating ${locale_conf}" + cat > "${locale_conf}" <<-EOF + # This file has been created by the sys-apps/systemd ebuild. + # See locale.conf(5) and localectl(1). + + # LANG=${LANG} + EOF + eend ${?} || FAIL=1 + fi + fi + + if [[ ! -L ${envd_locale} ]]; then + # now, if env.d/??locale is not a symlink (to locale.conf)... + if [[ -e ${envd_locale} ]]; then + # ...warn the user that he has duplicate locale settings + ewarn + ewarn "To ensure consistent behavior, you should replace ${envd_locale}" + ewarn "with a symlink to ${locale_conf}. Please migrate your settings" + ewarn "and create the symlink with the following command:" + ewarn "ln -s -n -f ../locale.conf ${envd_locale}" + ewarn + else + # ...or just create the symlink if there's nothing here + ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" + ln -n -s ../locale.conf "${envd_locale_def}" + eend ${?} || FAIL=1 + fi + fi +} + +migrate_net_name_slot() { + # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, + # do the same for 80-net-setup-link.rules to keep the old behavior + local net_move=no + local net_name_slot_sym=no + local net_rules_path="${EROOT%/}"/etc/udev/rules.d + local net_name_slot="${net_rules_path}"/80-net-name-slot.rules + local net_setup_link="${net_rules_path}"/80-net-setup-link.rules + if [[ -e ${net_setup_link} ]]; then + net_move=no + elif [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]]; then + net_move=yes + elif [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then + net_move=yes + net_name_slot_sym=yes + fi + if [[ ${net_move} == yes ]]; then + ebegin "Copying ${net_name_slot} to ${net_setup_link}" + + if [[ ${net_name_slot_sym} == yes ]]; then + ln -nfs /dev/null "${net_setup_link}" + else + cp "${net_name_slot}" "${net_setup_link}" + fi + eend $? || FAIL=1 + fi +} + +pkg_postinst() { + newusergroup() { + enewgroup "$1" + enewuser "$1" -1 -1 -1 "$1" + } + + enewgroup input + enewgroup systemd-journal + newusergroup systemd-bus-proxy + newusergroup systemd-journal-gateway + newusergroup systemd-journal-remote + newusergroup systemd-journal-upload + newusergroup systemd-network + newusergroup systemd-resolve + newusergroup systemd-timesync + use http && newusergroup systemd-journal-gateway + + systemd_update_catalog + + # Keep this here in case the database format changes so it gets updated + # when required. Despite that this file is owned by sys-apps/hwids. + if has_version "sys-apps/hwids[udev]"; then + udevadm hwdb --update --root="${ROOT%/}" + fi + + udev_reload || FAIL=1 + + # Bug 465468, make sure locales are respect, and ensure consistency + # between OpenRC & systemd + migrate_locale + + # Migrate 80-net-name-slot.rules -> 80-net-setup-link.rules + migrate_net_name_slot + + if [[ ${FAIL} ]]; then + eerror "One of the postinst commands failed. Please check the postinst output" + eerror "for errors. You may need to clean up your system and/or try installing" + eerror "systemd again." + eerror + fi + + if [[ ! -L "${ROOT}"/etc/mtab ]]; then + ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts." + ewarn "Not having it is not supported by upstream and will cause tools like 'df'" + ewarn "and 'mount' to not work properly. Please run:" + ewarn " # ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'" + ewarn + fi + + if [[ $(readlink "${ROOT}"/etc/resolv.conf) == */run/systemd/network/resolv.conf ]]; then + ewarn "resolv.conf is now generated by systemd-resolved. To use it, enable" + ewarn "systemd-resolved.service, and create a symlink from /etc/resolv.conf" + ewarn "to /run/systemd/resolve/resolv.conf" + ewarn + fi + + if ! has_version sys-apps/systemd-ui; then + elog "To get additional features, a number of optional runtime dependencies may" + elog "be installed:" + elog "- sys-apps/systemd-ui: for GTK+ systemadm UI and gnome-ask-password-agent" + fi + + if has_version sys-apps/openrc && + ! has_version sys-fs/udev-init-scripts; then + elog "If you plan to boot using OpenRC and udev or eudev, you" + elog "need to install the udev-init-scripts package." + fi +} + +pkg_prerm() { + # If removing systemd completely, remove the catalog database. + if [[ ! ${REPLACED_BY_VERSION} ]]; then + rm -f -v "${EROOT}"/var/lib/systemd/catalog/database + fi +} diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild index a22e80084785..99ad95769ae8 100644 --- a/sys-apps/systemd/systemd-9999.ebuild +++ b/sys-apps/systemd/systemd-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v 1.149 2014/12/14 15:58:27 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v 1.150 2014/12/19 17:07:50 pacho Exp $ EAPI=5 @@ -27,7 +27,7 @@ SLOT="0/2" KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" IUSE="acl apparmor audit cryptsetup curl doc elfutils gcrypt gudev http idn introspection kdbus +kmod lz4 lzma pam policykit python qrcode +seccomp - selinux ssl terminal test vanilla xkb" + selinux ssl sysv-utils terminal test vanilla xkb" MINKV="3.8" @@ -55,6 +55,7 @@ COMMON_DEPEND=">=sys-apps/util-linux-2.25:0= qrcode? ( media-gfx/qrencode:0= ) seccomp? ( sys-libs/libseccomp:0= ) selinux? ( sys-libs/libselinux:0= ) + sysv-utils? ( !sys-apps/sysvinit ) terminal? ( >=dev-libs/libevdev-1.2:0= >=x11-libs/libxkbcommon-0.5:0= >=x11-libs/libdrm-2.4:0= ) @@ -65,6 +66,7 @@ COMMON_DEPEND=">=sys-apps/util-linux-2.25:0= # baselayout-2.2 has /run RDEPEND="${COMMON_DEPEND} >=sys-apps/baselayout-2.2 + !sys-apps/systemd-sysv-utils !sys-auth/nss-myhostname !