Merge pull request #385 from marineam/systemd2

Systemd 210
This commit is contained in:
Michael Marineau 2014-03-04 14:26:42 -08:00
commit 90bea6d943
9 changed files with 692 additions and 94 deletions

View File

@ -0,0 +1 @@
kdbus

View File

@ -1,7 +1,3 @@
sys-apps/systemd ~amd64 ~x86
sys-apps/systemd-ui ~amd64 ~x86
sys-apps/systemd-sysv-utils ~amd64 ~x86
sys-apps/efunctions ~amd64 ~x86
sys-apps/gentoo-systemd-integration ~amd64 ~x86 sys-apps/gentoo-systemd-integration ~amd64 ~x86
# Various dependencies that also need to be up-to-date # Various dependencies that also need to be up-to-date

View File

@ -12,7 +12,7 @@ SRC_URI="http://www.freedesktop.org/software/systemd/${MY_P}.tar.xz"
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
KEYWORDS="~amd64 ~x86" KEYWORDS="amd64 arm ppc ppc64 x86"
IUSE="symlink-usr" IUSE="symlink-usr"
RDEPEND="!sys-apps/sysvinit RDEPEND="!sys-apps/sysvinit

View File

@ -1,33 +1,2 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
AUX 206-0001-logind-update-state-file-after-generating-the-sessio.patch 3341 SHA256 642a08dbcfa0517515570fd7537569ce0c7caa0c2b90274e80d999b6dd8e8d6a SHA512 1a901777c0a586ad5e4fcf6380784e451754c9ac65cf6e83641a6a2af2bed9f0741316d6aedb5d960a6c828186f4dcce79c7cc8234607f7f164253abd7cdfeed WHIRLPOOL 34639bc6dd4250209383c97061c09ded8d01f8962e19a39a9b2d848edf4fc4c6dbd3d6a5ff5563c2057c033d8a95ef46de7f116e3bbaee330bdbc26bb60d5b91
AUX 206-0002-Add-usr-share-keymaps-to-localectl-supported-locatio.patch 996 SHA256 494bd90cb327cd0bd08f7d8183802d6c91238b1cfab19dee312c704869fa23b6 SHA512 ff4db4bfb2d4050b276c487e9d7cba39b9cd26b62ff455c2c0d21f31f6d313453de73743974266f6ba1ee4aca50639c1abba40f73ed58f32dda8831b3b649337 WHIRLPOOL bada3e79aa856e7a67ffb6603f27b94d3b359536036e12c931181e6e768c0e0c91edfdab0c0d30bdd40fffb1bc27d653700aa3c410e122ae0653003b1bdad5cd
AUX 206-0003-tmpfiles-support-passing-prefix-multiple-times.patch 2991 SHA256 94d66e0bdd45fea0648971e9ef234e03bb743fd32444d972f5e8f293847aed01 SHA512 980134aac21cb7f0883a6326f62abaa32adf65b5b1263d14a2efacdadf2a7f46f4549b79077f0f087914e3b513981763f7065c915f959853ae34a6a1b2c0b323 WHIRLPOOL 73a3b5737c80c2ff6ae8050ca471bd2cf6d62a85de82d482eb12819d6eef90739ffd785b8f65ad17d88def79685a69e561373cf2aa57c88dd582002e37b06107
AUX 206-0004-tmpfiles-introduce-exclude-prefix.patch 6467 SHA256 dc87aab586d1b4c1fa3747df6c10e48472f404dcda83a41609bf12340cece0c7 SHA512 24707c2e865bf832b76ae127e4796bbc264da69600643ecd626b1acc03609602b5517975da29dd664cd3148e0696161298c1778ccbeb6559fe520cd33414a1c5 WHIRLPOOL 12394930e1aadb98cc24826352430c1de06ac5b5d58ff841e4ca415569cf8bda3c1509a580b647595f3a752988c348a773a808890db76c9e323e01137d48e8eb
AUX 206-0005-tmpfiles-setup-exclude-dev-prefixes-files.patch 857 SHA256 1fdd94d2968aab1ac909dda98efd11a805ba5cbaeab765f1bc477816a61ae38f SHA512 774bfb95667c405d6d63e5e60a1b814d7125170700753135a41b5af4186872f907a8dc486e8dff0c222b7f3cf66776f52f76fb5354a40293c90cca739558007e WHIRLPOOL 29039d1a63012bf1f7bd419b6056c95150b940fc9009a941af6cdad6dfb43732614cef6594c6c9e2b16b29e2de8a55566f00b336d1f7c05706e699323b626cb2
AUX 206-0006-allow-tabs-in-configuration-files.patch 1991 SHA256 2fe01d46e79cde6dc15d0462b2568056e679f8d5556601c1b2cd832417de2957 SHA512 bbb03e8a7358897f1b29d88640c21dad29fa4daa68c72bcc6f2269ae233bc9dbce3cb35268f17db4d48fde8d9b2f1e574101e65b4dd0dcc559b75a06cb32d1e9 WHIRLPOOL 1db0cb922741da0163d3ab425d4399938d5f9ca74c70be60c8a8d9b6d0b9036416c51f1d09ee2b48468a48021464f5e9e8f8e6e619bd9c20e886f8e61e139170
AUX 206-0007-allow-tabs-in-configuration-files2.patch 667 SHA256 391bdd6936809096d000506ef4c800d938ff1b979b5740a920350b710f81133a SHA512 7adbbd72678a07e0865b8ca0daf95ce0a441370c37d7bef1e459c08abb085237f3ee6c06db0cc7617f3786329c9feb9f7617b1b66dfc28de99c1bb9e3dfb11f7 WHIRLPOOL 540ba0c2814c4bd3675a2ee998507f7e74dd43e7ab123e2aeec0c674cdfd123ccfce37a0eaceb05f691fc101465a7c046dfe4d91775005bb16c8340987ac7eb0
AUX gentoo-run.conf 226 SHA256 a23fa3b35b4e9d5f1c41dc77cb5be1cec492eb903a57472df3d93a053db28ca7 SHA512 5fe5af27c99426bc1a3494fce9b6f0425cbfe11f6879c95d4efb4ea67b5b036f0573c49ad4396835f15a92a3d7424f6a453d951d63d0ae10d6af92e98e6848db WHIRLPOOL bfaa7425ee4b2c1467bc6fc9dc934d14a4fb43a9b5eaf61a13f5b2229648fe585a6e8d950082e2c2cedab1f938021dd3e29445ecbc72cc4a95056d00b6b7c9ed
AUX var-lock.mount 541 SHA256 2929247db87c75b82d651ae902183b2a9fab48052b422008fa8ec2aafc22868a SHA512 8a4d72c63794676a01db2792b44fa39ec4ea80db97f2b54904f5b118a776c08721d360f8bb2ed15da12e922dbac3f2a431d6a6f98831bef3520d781d97d665db WHIRLPOOL e83955a1d86400ee16d35d61eaa35fb3050af2b2805a2049c37a602be1bd60233caaa1cadbbd4a3b3e425a44629c9cac921a5c4b2fca9003a45e49b89298ca50
AUX var-run.mount 536 SHA256 55b9e277560b875475535f8121ad45e7fcee836bb48efe2c4f361ff89d450888 SHA512 173097fc2318be854b09ee5244d1dd6291cf6c6ad0c18f1bbbb12b186d309a4299d3866e52659f91a37ff2541583d85754841e55c35ea93dd1916dce0bebb1f6 WHIRLPOOL 47cfff43bdadd7ea59d920dee102283d5eeae6ecfb64aeaf7ee23890f3483cb3f3fdb43ad014bb074122b34d86bf6a6a707a42819b6ee7fd66506808a0557a01
DIST systemd-201.tar.xz 2128876 SHA256 d6299f1a0bc2122002d731808d3825c6b566d1ffe899c03ed5ebec7e70c8cc10 SHA512 e181b0bd0d0169890f99733d5e61ca506115b50d702b24895add5240ef3929ed9add87b0d3fd34a3366c1830339f6e4b5aa50f763f6d7d75b80ce677d35c385d WHIRLPOOL 84465cc8b3a97c2fbf120c8515ced6a759c1dec2df525b92a552308e1060475bf889de92a05ad470a2d56b582e3190dcc37aa4d009c8a0714411894cfed99376
DIST systemd-204.tar.xz 2186264 SHA256 072c393503c7c1e55ca7acf3db659cbd28c7fe5fa94fab3db95360bafd96731b SHA512 a2fe02f8ab4197bb4ff40c1c3e145370ebc5f3edfe97e6eb179086c42270523f76b49b5dd7dae0c52742a71bfb6a4217ecfa27cc6032faf5d4fe10b1264ed110 WHIRLPOOL 13baafbab202d2b1aa538281261a2bd70faa8634d4dc61f3ade6780f2e27b3e35919b7eb8a9258b66150924c8f2e82aa310a9a952f1f4e8128038b544a5c09df
DIST systemd-206.tar.xz 2340536 SHA256 4c993de071118ea1df7ffc4be26ef0b0d78354ef15b2743a2783d20edfcde9de SHA512 0e8270981f549875519485657ccf4f8f69f6e4d2000dba3419c39bd710abbf6e8ab5fce038b75a220e6fc1ba2d66e1582d492feb7710d0539c5f7a5918d5ae31 WHIRLPOOL f8033865f236aa06c649d40ccaa3c8cb12de1f42863d3f824740b2f076945fc5c9dd131cadd995b313b20b04363d32507e85de61afae7f77ac9c62c3ad236b83
DIST systemd-207.tar.xz 2363804 SHA256 ac1f8120315e7969063bbb0c181c8dc59509aeaf10c4266077c257a182ad5942 SHA512 566c6126fea038cb182608f7b9c3bb4410d0622cb637f30c60fba73c9052f7a36d2b0f790e3d94bb751080448ba14cee600481da378f5e97b0f5becfc849be54 WHIRLPOOL 823c3064e1e961599011d4cd027f5e2d0ba3b434c67b880d1a541720220f40c7cc82211f3f086042dbb440b2c7e11e1379aa0d656e33a2a7ba5b1d7e45b904f7 DIST systemd-207.tar.xz 2363804 SHA256 ac1f8120315e7969063bbb0c181c8dc59509aeaf10c4266077c257a182ad5942 SHA512 566c6126fea038cb182608f7b9c3bb4410d0622cb637f30c60fba73c9052f7a36d2b0f790e3d94bb751080448ba14cee600481da378f5e97b0f5becfc849be54 WHIRLPOOL 823c3064e1e961599011d4cd027f5e2d0ba3b434c67b880d1a541720220f40c7cc82211f3f086042dbb440b2c7e11e1379aa0d656e33a2a7ba5b1d7e45b904f7
EBUILD systemd-201.ebuild 8320 SHA256 a7e696450c4ec2875c38678b26b6445e5b53672edf42553178ff2661cf14fb29 SHA512 ddf8484af18c3a995dce1b544c0e8099cc0a78422c113533be036365adb03ca6d915243fd256dfebea320baa6db602fd1f4790fbaceffad08b8d31494c828f73 WHIRLPOOL e8e90d0e6bc6dae01bd589547ba7c5af604046f02b9b5aaca6fa7e99681b9e415fec4bb5d3a265a98392bf26942b9c80d6e22509ebaa0a842f5091ed36f919b3 DIST systemd-209.tar.xz 2607304 SHA256 4cadef26adcd846e3f2b90502e64f590430baf59aea87491d25aac2e50b23d18 SHA512 0d9a4f1f69b51da0621f15c2e0fde94540be767117b97298a66eab79ecb8bc0288fd7c568253be3a48a4c6d4881a822bf84434dc17028fc6f8a94fa1cc1b27cb WHIRLPOOL bebcb5fa76f91788c30ce6320e9c51325dd3b2f9ce81509e822f3f2a510b252c38aa3de19f429db6fbb2d7f0be9cfb6e7c6908041361fcd3f0350482a78e7d20
EBUILD systemd-204.ebuild 8302 SHA256 8ab8f6d06d4f3e31cb3cb0f8411fa612b69068cf7b1f80436507b959af287481 SHA512 268f27595cc2d55ec81b32eda1d42afe76907e351db21adae019cba96dbbcefa56f2a1ff22d9330af23d7b9328b11bc225c098f36bea3990ef1988bb71528d92 WHIRLPOOL a113c4a70b38ce1cb3ebbc13a63d5d98d3cb247c4e55c348f3090f3dffefb5e0ee64d4246d975f076a0de2079d423ccd43d59a3d39ed6f1c51eeadba6126383e
EBUILD systemd-206-r3.ebuild 10806 SHA256 b65de528f90a4c37d8a8b2f4a0040e84b531a3c9fd2de8faeb874e03b5ea845c SHA512 87e8649f7e6671f5740d0b0ff5dbd4af0ab9e224bed205177650c403b83be0c52931e04c8bdc1003241b8a6de6afce989096e6592dd4099441bc4083fff00236 WHIRLPOOL f87ba65374d7d824cfd9db05ef89805fd627c5ebf2b7b9b1081319b70289f136cd904dbdf8c53fd33f8b7ea1809ec3736644cba383a49300d2201cec62fbb2fb
EBUILD systemd-206-r4.ebuild 10454 SHA256 1593e4d21ed5e3b1ba19da643236135ba2873b0bab0b874fe2a52c849c033f7c SHA512 38d63ac62876e22f760f68422d566c4a2d4f0e8f0cb357173d1aceddea21f24f17f7f3ebec11c9676cd18e5d2a8db236001711df2ac050ff3941baf8a0068775 WHIRLPOOL acf31ed9e0df0db1e266d8733a7cb5ce0bf4c52b64cff121c84ea0c65d82eddc1de46848e57e52b97a8e8b56a8d3b6ad6db8c2d2fe75d69a9f84c7cb4563c4f8
EBUILD systemd-206-r5.ebuild 10645 SHA256 04f8ef0cbbb522bb66f8a05dbb687b722ba6afe68d79420f0ce4f58cfe84b4cd SHA512 ceca3ac47dd086330a61a010899e36228e50f07459f45a047d290350ce212017a705a291b6a47094d2a4f79487c253cc238a0f0cdc6a781690f1812b357b2e2b WHIRLPOOL e33d10ee1172f21c4f0e7a0422c5c67a7dbc93807f5f8419f1c8e2daea3559623d2e81e4358c717f0680b616ea035755945cebfb0a5dd6c0d2aa74fc26366676
EBUILD systemd-207.ebuild 8478 SHA256 50ce4919055396d6616deefa695c008b898f7715212d17d3b04ee4ceafc909e8 SHA512 4b007a54c258a6ad14af2634c09c4b354a079faa9c8003ad90ea8456d00b6adb4c07b8cd4a3f9bf10eb9b0f157417d95ff4f93dd5d950823ec39a739c5ef3b30 WHIRLPOOL 231c57961d7b7addff796d352f30ade80564d711bd48d24c0b268f63b86d71b3a538c4209de87b07396d137ef04e80bbff834e4bf5468da233d30102c7ba1ae2
EBUILD systemd-9999-r1.ebuild 8863 SHA256 50d1fd9e1536478be4d2c6a8cd401cf446682f67a138670cb74e838a2fb2b47e SHA512 9cb501818bb8de4566068e03d78ef2c22b38d4b54e005a8086cec731768cc4716e36c4fbe20aa3c4190c41b9de4876f3f4790b8631228a99ad58fc5fea8049d4 WHIRLPOOL ebb006d00a0c13fe2a6b50c40936b431378e6b0e044451e52b74e7695917d0feb796ed4859401f13be0e8ea47230f8fc616bf0e5c3c5c627906c57d01b9568a0
MISC ChangeLog 32929 SHA256 29762c6ac4357228d96a6c4a8e4cbbaacdb19bf1ed019de9d9e3173e68dc06bc SHA512 7da9f2b7f6e5ac7c9b44d265ea776165e05b8f03275d3f2f9f03503918ae6228ba93b26fc4dabf2734d1a5bef397df40bae882780f1a4cb588e533d51609123c WHIRLPOOL efa7bf9de655d82bae54a3688e6c87985079aa1a28ff3f43ea237becb1542b193a8e0e6ff1badc962742da721aa599e0456bc1cef072bf7f2026533dbfd6ba42
MISC metadata.xml 1108 SHA256 7555f673c5676c2efb2696cf49117e1198134e8c2d575052d817c50bbc4f5f45 SHA512 10b8a0dff66f163dc747e294ead1455fa0b84414eab9aa1950da08f92245eb725d77f04346276a4e727bf0d5b6adc5f6c744b770b1a47dc916ddef7d641affd9 WHIRLPOOL ae3413df80c029c8f84e092568d05e02e3c81695c741319be98ceadddbd680c589e68ec6250a653849eca6d0fe3aace7c2004f54cc2f7a9201b60af524edff28
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
iF4EAREIAAYFAlI0rngACgkQC77qH+pIQ6TFggD/T0p0NSiVPTmQ8AN615FyYL4U
q05Qn8hU63odU/lQ4QMA/3b98IglSyKLOT1i5h+ZcYol6AhYyv3BgbasBxt0RHtA
=ipJl
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,13 @@
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 1a02935..e6f8ce7 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1349,7 +1349,7 @@ static int reset_audit_loginuid(void) {
return 0;
r = read_one_line_file("/proc/self/loginuid", &p);
- if (r == -EEXIST)
+ if (r == -ENOENT)
return 0;
if (r < 0) {
log_error("Failed to read /proc/self/loginuid: %s", strerror(-r));

View File

@ -16,7 +16,7 @@ SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz"
LICENSE="GPL-2 LGPL-2.1 MIT public-domain" LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
SLOT="0" SLOT="0"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" KEYWORDS="amd64 arm ppc ppc64 x86"
IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection
+kmod lzma openrc pam policykit python qrcode selinux tcpd test +kmod lzma openrc pam policykit python qrcode selinux tcpd test
vanilla xattr" vanilla xattr"

View File

@ -0,0 +1 @@
systemd-9999.ebuild

View File

@ -1,19 +1,26 @@
# Copyright 1999-2013 Gentoo Foundation # Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999-r1.ebuild,v 1.16 2013/09/14 18:44:05 floppym Exp $ # $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v 1.100 2014/03/03 22:19:31 floppym Exp $
EAPI=5 EAPI=5
#if LIVE if [[ ${PV} == 9999 ]]; then
AUTOTOOLS_AUTORECONF=yes AUTOTOOLS_AUTORECONF=yes
EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN} EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN}
http://cgit.freedesktop.org/${PN}/${PN}/" http://cgit.freedesktop.org/${PN}/${PN}/"
inherit git-2 inherit git-r3
#endif
elif [[ ${PV} == *9999 ]]; then
EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN}-stable
http://cgit.freedesktop.org/${PN}/${PN}-stable/"
EGIT_BRANCH=v${PV%%.*}-stable
inherit git-r3
fi
AUTOTOOLS_PRUNE_LIBTOOL_FILES=all AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
PYTHON_COMPAT=( python2_7 ) PYTHON_COMPAT=( python{2_7,3_2,3_3} )
inherit autotools-utils bash-completion-r1 fcaps linux-info multilib \ inherit autotools-utils bash-completion-r1 fcaps linux-info multilib \
multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \ multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \
user user
@ -23,91 +30,118 @@ HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz" SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz"
LICENSE="GPL-2 LGPL-2.1 MIT public-domain" LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
SLOT="0" SLOT="0/2"
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection
+kmod lzma openrc pam policykit python qrcode selinux tcpd test kdbus +kmod lzma pam policykit python qrcode +seccomp selinux tcpd
vanilla xattr" test vanilla xattr openrc"
MINKV="3.0" MINKV="3.0"
COMMON_DEPEND=">=sys-apps/dbus-1.6.8-r1 COMMON_DEPEND=">=sys-apps/util-linux-2.20:0=
>=sys-apps/util-linux-2.20 sys-libs/libcap:0=
sys-libs/libcap acl? ( sys-apps/acl:0= )
acl? ( sys-apps/acl ) audit? ( >=sys-process/audit-2:0= )
audit? ( >=sys-process/audit-2 ) cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
cryptsetup? ( >=sys-fs/cryptsetup-1.6 ) gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0= )
gcrypt? ( >=dev-libs/libgcrypt-1.4.5 ) gudev? ( dev-libs/glib:2=[${MULTILIB_USEDEP}] )
gudev? ( >=dev-libs/glib-2[${MULTILIB_USEDEP}] ) http? ( net-libs/libmicrohttpd:0= )
http? ( net-libs/libmicrohttpd ) introspection? ( >=dev-libs/gobject-introspection-1.31.1:0= )
introspection? ( >=dev-libs/gobject-introspection-1.31.1 ) kmod? ( >=sys-apps/kmod-15:0= )
kmod? ( >=sys-apps/kmod-14-r1 ) lzma? ( app-arch/xz-utils:0=[${MULTILIB_USEDEP}] )
lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] ) pam? ( virtual/pam:= )
pam? ( virtual/pam )
python? ( ${PYTHON_DEPS} ) python? ( ${PYTHON_DEPS} )
qrcode? ( media-gfx/qrencode ) qrcode? ( media-gfx/qrencode:0= )
selinux? ( sys-libs/libselinux ) seccomp? ( >=sys-libs/libseccomp-2.1:0= )
tcpd? ( sys-apps/tcp-wrappers ) selinux? ( sys-libs/libselinux:0= )
xattr? ( sys-apps/attr ) tcpd? ( sys-apps/tcp-wrappers:0= )
xattr? ( sys-apps/attr:0= )
abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
# baselayout-2.2 has /run # baselayout-2.2 has /run
RDEPEND="${COMMON_DEPEND} RDEPEND="${COMMON_DEPEND}
>=sys-apps/baselayout-2.2 >=sys-apps/baselayout-2.2
openrc? ( >=sys-fs/udev-init-scripts-25 )
|| ( || (
>=sys-apps/util-linux-2.22 >=sys-apps/util-linux-2.22
<sys-apps/sysvinit-2.88-r4 <sys-apps/sysvinit-2.88-r4
) )
!vanilla? ( sys-apps/gentoo-systemd-integration )
!sys-auth/nss-myhostname !sys-auth/nss-myhostname
!<sys-libs/glibc-2.10 !<sys-libs/glibc-2.14
!sys-fs/udev" !sys-fs/udev"
PDEPEND=">=sys-apps/hwids-20130717-r1[udev] # sys-apps/daemon: the daemon only (+ build-time lib dep for tests)
policykit? ( sys-auth/polkit )" PDEPEND=">=sys-apps/dbus-1.6.8-r1:0
>=sys-apps/hwids-20130717-r1[udev]
openrc? ( >=sys-fs/udev-init-scripts-25 )
policykit? ( sys-auth/polkit )
!vanilla? ( sys-apps/gentoo-systemd-integration )"
# Newer linux-headers needed by ia64, bug #480218
DEPEND="${COMMON_DEPEND} DEPEND="${COMMON_DEPEND}
app-arch/xz-utils app-arch/xz-utils:0
app-text/docbook-xml-dtd:4.2
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
dev-util/gperf dev-util/gperf
>=dev-util/intltool-0.50 >=dev-util/intltool-0.50
>=sys-devel/binutils-2.23.1 >=sys-devel/binutils-2.23.1
>=sys-devel/gcc-4.6 >=sys-devel/gcc-4.6
>=sys-kernel/linux-headers-${MINKV} >=sys-kernel/linux-headers-${MINKV}
ia64? ( >=sys-kernel/linux-headers-3.9 )
virtual/pkgconfig virtual/pkgconfig
doc? ( >=dev-util/gtk-doc-1.18 )" doc? ( >=dev-util/gtk-doc-1.18 )
python? ( dev-python/lxml[${PYTHON_USEDEP}] )
test? ( >=sys-apps/dbus-1.6.8-r1:0 )"
#if LIVE if [[ ${PV} == *9999 ]]; then
DEPEND="${DEPEND} DEPEND="${DEPEND}
app-text/docbook-xml-dtd:4.2
app-text/docbook-xml-dtd:4.5
app-text/docbook-xsl-stylesheets
dev-libs/libxslt:0
dev-libs/gobject-introspection dev-libs/gobject-introspection
>=dev-libs/libgcrypt-1.4.5 >=dev-libs/libgcrypt-1.4.5:0"
>=dev-util/gtk-doc-1.18"
SRC_URI= SRC_URI=
KEYWORDS= KEYWORDS=
fi
src_prepare() { src_prepare() {
gtkdocize --docdir docs/ || die epatch "${FILESDIR}"/210-0001-fix-detection-of-missing-loginuid.patch
if [[ ${PV} == *9999 ]]; then
if use doc; then
gtkdocize --docdir docs/ || die
else
echo 'EXTRA_DIST =' > docs/gtk-doc.make
fi
fi
# Bug 463376
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
autotools-utils_src_prepare autotools-utils_src_prepare
} }
#endif
pkg_pretend() { pkg_pretend() {
local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS ~DEVTMPFS local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS ~DEVTMPFS ~DMIID
~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~PROC_FS ~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~PROC_FS
~SECCOMP ~SIGNALFD ~SYSFS ~TIMERFD ~SECCOMP ~SIGNALFD ~SYSFS ~TIMERFD
~!IDE ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2" ~!IDE ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
~!GRKERNSEC_PROC"
use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
use pam && CONFIG_CHECK+=" ~AUDITSYSCALL" use pam && CONFIG_CHECK+=" ~AUDITSYSCALL"
use xattr && CONFIG_CHECK+=" ~TMPFS_XATTR"
kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
use firmware-loader || CONFIG_CHECK+=" ~!FW_LOADER_USER_HELPER" use firmware-loader || CONFIG_CHECK+=" ~!FW_LOADER_USER_HELPER"
if linux_config_exists; then
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
ewarn "It's recommended to set an empty value to the following kernel config option:"
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
fi
fi
if [[ ${MERGE_TYPE} != binary ]]; then if [[ ${MERGE_TYPE} != binary ]]; then
if [[ $(gcc-major-version) -lt 4 if [[ $(gcc-major-version) -lt 4
|| ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]] || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]]
@ -139,6 +173,13 @@ pkg_setup() {
multilib_src_configure() { multilib_src_configure() {
local myeconfargs=( local myeconfargs=(
# disable -flto since it is an optimization flag
# and makes distcc less effective
cc_cv_CFLAGS__flto=no
--with-pamconfdir=/usr/share/pam.d
--with-dbuspolicydir=/usr/share/dbus-1/system.d
--disable-maintainer-mode
--localstatedir=/var --localstatedir=/var
--with-pamlibdir=$(getpam_mod_dir) --with-pamlibdir=$(getpam_mod_dir)
# avoid bash-completion dep # avoid bash-completion dep
@ -160,13 +201,15 @@ multilib_src_configure() {
$(use_enable gudev) $(use_enable gudev)
$(use_enable http microhttpd) $(use_enable http microhttpd)
$(use_enable introspection) $(use_enable introspection)
$(use_enable kdbus)
$(use_enable kmod) $(use_enable kmod)
$(use_enable lzma xz) $(use_enable lzma xz)
$(use_enable pam) $(use_enable pam)
$(use_enable policykit polkit) $(use_enable policykit polkit)
$(use_with python)
$(use_enable python python-devel) $(use_enable python python-devel)
$(use python && echo PYTHON_CONFIG=/usr/bin/python-config-${EPYTHON#python})
$(use_enable qrcode qrencode) $(use_enable qrcode qrencode)
$(use_enable seccomp)
$(use_enable selinux) $(use_enable selinux)
$(use_enable tcpd tcpwrap) $(use_enable tcpd tcpwrap)
$(use_enable test tests) $(use_enable test tests)
@ -204,9 +247,11 @@ multilib_src_configure() {
--disable-kmod --disable-kmod
--disable-libcryptsetup --disable-libcryptsetup
--disable-microhttpd --disable-microhttpd
--disable-networkd
--disable-pam --disable-pam
--disable-polkit --disable-polkit
--disable-qrencode --disable-qrencode
--disable-seccomp
--disable-selinux --disable-selinux
--disable-tcpwrap --disable-tcpwrap
--disable-tests --disable-tests
@ -233,6 +278,8 @@ multilib_src_compile() {
# prerequisites for gudev # prerequisites for gudev
use gudev && emake src/gudev/gudev{enumtypes,marshal}.{c,h} use gudev && emake src/gudev/gudev{enumtypes,marshal}.{c,h}
echo 'gentoo: $(BUILT_SOURCES)' | \
emake "${mymakeopts[@]}" -f Makefile -f - gentoo
echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \ echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \
emake "${mymakeopts[@]}" -f Makefile -f - gentoo emake "${mymakeopts[@]}" -f Makefile -f - gentoo
fi fi
@ -246,6 +293,10 @@ multilib_src_test() {
multilib_src_install() { multilib_src_install() {
local mymakeopts=( local mymakeopts=(
# automake fails with parallel libtool relinking
# https://bugs.gentoo.org/show_bug.cgi?id=491398
-j1
udevlibexecdir="${MY_UDEVDIR}" udevlibexecdir="${MY_UDEVDIR}"
dist_udevhwdb_DATA= dist_udevhwdb_DATA=
DESTDIR="${D}" DESTDIR="${D}"
@ -265,10 +316,21 @@ multilib_src_install() {
emake "${mymakeopts[@]}" emake "${mymakeopts[@]}"
fi fi
# install compat pkg-config files
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() { multilib_src_install_all() {
prune_libtool_files --modules prune_libtool_files --modules
einstalldocs
# we just keep sysvinit tools, so no need for the mans # we just keep sysvinit tools, so no need for the mans
rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \ rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
@ -278,18 +340,83 @@ multilib_src_install_all() {
# Disable storing coredumps in journald, bug #433457 # Disable storing coredumps in journald, bug #433457
mv "${D}"/usr/lib/sysctl.d/50-coredump.conf{,.disabled} || die mv "${D}"/usr/lib/sysctl.d/50-coredump.conf{,.disabled} || die
# Preserve empty dirs in /etc & /var, bug #437008 # Preserve empty dir /var, bug #437008
keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \ keepdir /var/lib/systemd
/etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd }
# Symlink /etc/sysctl.conf for easy migration. migrate_locale() {
dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf 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() { pkg_postinst() {
# for udev rules
enewgroup dialout
enewgroup systemd-journal enewgroup systemd-journal
if use http; then if use http; then
enewgroup systemd-journal-gateway enewgroup systemd-journal-gateway
@ -303,13 +430,25 @@ pkg_postinst() {
udevadm hwdb --update --root="${ROOT%/}" udevadm hwdb --update --root="${ROOT%/}"
fi fi
if [[ ${ROOT} == "" || ${ROOT} == "/" ]]; then udev_reload || FAIL=1
udevadm control --reload
fi
# Bug 468876 # Bug 468876
fcaps cap_dac_override,cap_sys_ptrace=ep usr/bin/systemd-detect-virt fcaps cap_dac_override,cap_sys_ptrace=ep usr/bin/systemd-detect-virt
# 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 if [[ ! -L "${ROOT}"/etc/mtab ]]; then
ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts." 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 "Not having it is not supported by upstream and will cause tools like 'df'"

View File

@ -0,0 +1,479 @@
# 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.100 2014/03/03 22:19:31 floppym Exp $
EAPI=5
if [[ ${PV} == 9999 ]]; then
AUTOTOOLS_AUTORECONF=yes
EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN}
http://cgit.freedesktop.org/${PN}/${PN}/"
inherit git-r3
elif [[ ${PV} == *9999 ]]; then
AUTOTOOLS_AUTORECONF=yes
EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN}-stable
http://cgit.freedesktop.org/${PN}/${PN}-stable/"
EGIT_BRANCH=v${PV%%.*}-stable
inherit git-r3
fi
AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
PYTHON_COMPAT=( python{2_7,3_2,3_3} )
inherit autotools-utils bash-completion-r1 fcaps 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 audit cryptsetup doc +firmware-loader gcrypt gudev http introspection
kdbus +kmod lzma pam policykit python qrcode +seccomp selinux tcpd
test vanilla xattr openrc"
MINKV="3.0"
COMMON_DEPEND=">=sys-apps/util-linux-2.20:0=
sys-libs/libcap:0=
acl? ( sys-apps/acl:0= )
audit? ( >=sys-process/audit-2:0= )
cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0= )
gudev? ( dev-libs/glib:2=[${MULTILIB_USEDEP}] )
http? ( net-libs/libmicrohttpd:0= )
introspection? ( >=dev-libs/gobject-introspection-1.31.1:0= )
kmod? ( >=sys-apps/kmod-15:0= )
lzma? ( app-arch/xz-utils:0=[${MULTILIB_USEDEP}] )
pam? ( virtual/pam:= )
python? ( ${PYTHON_DEPS} )
qrcode? ( media-gfx/qrencode:0= )
seccomp? ( >=sys-libs/libseccomp-2.1:0= )
selinux? ( sys-libs/libselinux:0= )
tcpd? ( sys-apps/tcp-wrappers:0= )
xattr? ( sys-apps/attr: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/util-linux-2.22
<sys-apps/sysvinit-2.88-r4
)
!sys-auth/nss-myhostname
!<sys-libs/glibc-2.14
!sys-fs/udev"
# sys-apps/daemon: the daemon only (+ build-time lib dep for tests)
PDEPEND=">=sys-apps/dbus-1.6.8-r1:0
>=sys-apps/hwids-20130717-r1[udev]
openrc? ( >=sys-fs/udev-init-scripts-25 )
policykit? ( sys-auth/polkit )
!vanilla? ( sys-apps/gentoo-systemd-integration )"
# Newer linux-headers needed by ia64, bug #480218
DEPEND="${COMMON_DEPEND}
app-arch/xz-utils:0
dev-util/gperf
>=dev-util/intltool-0.50
>=sys-devel/binutils-2.23.1
>=sys-devel/gcc-4.6
>=sys-kernel/linux-headers-${MINKV}
ia64? ( >=sys-kernel/linux-headers-3.9 )
virtual/pkgconfig
doc? ( >=dev-util/gtk-doc-1.18 )
python? ( dev-python/lxml[${PYTHON_USEDEP}] )
test? ( >=sys-apps/dbus-1.6.8-r1:0 )"
if [[ ${PV} == *9999 ]]; then
DEPEND="${DEPEND}
app-text/docbook-xml-dtd:4.2
app-text/docbook-xml-dtd:4.5
app-text/docbook-xsl-stylesheets
dev-libs/libxslt:0
dev-libs/gobject-introspection
>=dev-libs/libgcrypt-1.4.5:0"
SRC_URI=
KEYWORDS=
fi
src_prepare() {
if [[ ${PV} == *9999 ]]; then
if use doc; then
gtkdocize --docdir docs/ || die
else
echo 'EXTRA_DIST =' > docs/gtk-doc.make
fi
fi
# Bug 463376
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
autotools-utils_src_prepare
}
pkg_pretend() {
local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS ~DEVTMPFS ~DMIID
~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~PROC_FS
~SECCOMP ~SIGNALFD ~SYSFS ~TIMERFD
~!IDE ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
~!GRKERNSEC_PROC"
use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
use pam && CONFIG_CHECK+=" ~AUDITSYSCALL"
use xattr && CONFIG_CHECK+=" ~TMPFS_XATTR"
kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
use firmware-loader || CONFIG_CHECK+=" ~!FW_LOADER_USER_HELPER"
if linux_config_exists; then
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
ewarn "It's recommended to set an empty value to the following kernel config option:"
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
fi
fi
if [[ ${MERGE_TYPE} != binary ]]; then
if [[ $(gcc-major-version) -lt 4
|| ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]]
then
eerror "systemd requires at least gcc 4.6 to build. Please switch the active"
eerror "gcc version using gcc-config."
die "systemd requires at least gcc 4.6"
fi
fi
if [[ ${MERGE_TYPE} != buildonly ]]; then
if kernel_is -lt ${MINKV//./ }; then
ewarn "Kernel version at least ${MINKV} required"
fi
if ! use firmware-loader && kernel_is -lt 3 8; then
ewarn "You seem to be using kernel older than 3.8. Those kernel versions"
ewarn "require systemd with USE=firmware-loader to support loading"
ewarn "firmware. Missing this flag may cause some hardware not to work."
fi
check_extra_config
fi
}
pkg_setup() {
use python && python-single-r1_pkg_setup
}
multilib_src_configure() {
local myeconfargs=(
# disable -flto since it is an optimization flag
# and makes distcc less effective
cc_cv_CFLAGS__flto=no
--with-pamconfdir=/usr/share/pam.d
--with-dbuspolicydir=/usr/share/dbus-1/system.d
--disable-maintainer-mode
--localstatedir=/var
--with-pamlibdir=$(getpam_mod_dir)
# avoid bash-completion dep
--with-bashcompletiondir="$(get_bashcompdir)"
# make sure we get /bin:/sbin in $PATH
--enable-split-usr
# disable sysv compatibility
--with-sysvinit-path=
--with-sysvrcnd-path=
# no deps
--enable-efi
--enable-ima
# optional components/dependencies
$(use_enable acl)
$(use_enable audit)
$(use_enable cryptsetup libcryptsetup)
$(use_enable doc gtk-doc)
$(use_enable gcrypt)
$(use_enable gudev)
$(use_enable http microhttpd)
$(use_enable introspection)
$(use_enable kdbus)
$(use_enable kmod)
$(use_enable lzma xz)
$(use_enable pam)
$(use_enable policykit polkit)
$(use_with python)
$(use_enable python python-devel)
$(use_enable qrcode qrencode)
$(use_enable seccomp)
$(use_enable selinux)
$(use_enable tcpd tcpwrap)
$(use_enable test tests)
$(use_enable xattr)
# not supported (avoid automagic deps in the future)
--disable-chkconfig
# hardcode a few paths to spare some deps
QUOTAON=/usr/sbin/quotaon
QUOTACHECK=/usr/sbin/quotacheck
)
# Keep using the one where the rules were installed.
MY_UDEVDIR=$(get_udevdir)
if use firmware-loader; then
myeconfargs+=(
--with-firmware-path="/lib/firmware/updates:/lib/firmware"
)
fi
# Added for testing; this is UNSUPPORTED by the Gentoo systemd team!
if [[ -n ${ROOTPREFIX+set} ]]; then
myeconfargs+=(
--with-rootprefix="${ROOTPREFIX}"
--with-rootlibdir="${ROOTPREFIX}/$(get_libdir)"
)
fi
if ! multilib_is_native_abi; then
myeconfargs+=(
ac_cv_search_cap_init=
ac_cv_header_sys_capability_h=yes
DBUS_CFLAGS=' '
DBUS_LIBS=' '
--disable-acl
--disable-audit
--disable-gcrypt
--disable-gtk-doc
--disable-introspection
--disable-kmod
--disable-libcryptsetup
--disable-microhttpd
--disable-networkd
--disable-pam
--disable-polkit
--disable-qrencode
--disable-seccomp
--disable-selinux
--disable-tcpwrap
--disable-tests
--disable-xattr
--disable-xz
--disable-python-devel
)
fi
# Work around bug 463846.
tc-export CC
autotools-utils_src_configure
}
multilib_src_compile() {
local mymakeopts=(
udevlibexecdir="${MY_UDEVDIR}"
)
if multilib_is_native_abi; then
emake "${mymakeopts[@]}"
else
# prerequisites for gudev
use gudev && emake src/gudev/gudev{enumtypes,marshal}.{c,h}
echo 'gentoo: $(BUILT_SOURCES)' | \
emake "${mymakeopts[@]}" -f Makefile -f - gentoo
echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \
emake "${mymakeopts[@]}" -f Makefile -f - gentoo
fi
}
multilib_src_test() {
multilib_is_native_abi || continue
default
}
multilib_src_install() {
local mymakeopts=(
# automake fails with parallel libtool relinking
# https://bugs.gentoo.org/show_bug.cgi?id=491398
-j1
udevlibexecdir="${MY_UDEVDIR}"
dist_udevhwdb_DATA=
DESTDIR="${D}"
)
if multilib_is_native_abi; then
emake "${mymakeopts[@]}" install
else
mymakeopts+=(
install-libLTLIBRARIES
install-pkgconfiglibDATA
install-includeHEADERS
# safe to call unconditionally, 'installs' empty list
install-libgudev_includeHEADERS
install-pkgincludeHEADERS
)
emake "${mymakeopts[@]}"
fi
# install compat pkg-config files
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() {
prune_libtool_files --modules
einstalldocs
# 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
# 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
}
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() {
enewgroup systemd-journal
if use http; then
enewgroup systemd-journal-gateway
enewuser systemd-journal-gateway -1 -1 -1 systemd-journal-gateway
fi
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 468876
fcaps cap_dac_override,cap_sys_ptrace=ep usr/bin/systemd-detect-virt
# 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 ! 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
}
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
}