Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd/
Date: Mon, 28 Aug 2017 15:10:29
Message-Id: 1503933024.345a7f2eac7f4b0898acc3c6121aa106a7358d02.floppym@gentoo
1 commit: 345a7f2eac7f4b0898acc3c6121aa106a7358d02
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 28 15:09:55 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 28 15:10:24 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=345a7f2e
7
8 sys-apps/systemd: remove old
9
10 Package-Manager: Portage-2.3.6_p39, Repoman-2.3.3_p17
11
12 sys-apps/systemd/Manifest | 5 -
13 sys-apps/systemd/metadata.xml | 1 -
14 sys-apps/systemd/systemd-226-r2.ebuild | 484 ---------------------------------
15 sys-apps/systemd/systemd-231.ebuild | 454 -------------------------------
16 sys-apps/systemd/systemd-232.ebuild | 456 -------------------------------
17 sys-apps/systemd/systemd-233-r1.ebuild | 459 -------------------------------
18 6 files changed, 1859 deletions(-)
19
20 diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest
21 index ae810c2c99d..e4684c7c942 100644
22 --- a/sys-apps/systemd/Manifest
23 +++ b/sys-apps/systemd/Manifest
24 @@ -1,8 +1,3 @@
25 -DIST systemd-226.tar.gz 3914162 SHA256 baff6a938c5579769330d0224280bf1a1ff5920151d7201545fc9880b6326c67 SHA512 565331661e7d144dcdf1505f9a1a70b20a9b904567478593a8fa47ed18f9eb68a9339cf32f117ede994676a84d0cfe3fcedbc9b8d8c964445b741a32271e5584 WHIRLPOOL 9f0d7b761ad84f0bb557a22738d7fcc1b6515340db776790d9199401017747a62c24de214300c1f00fb33f86284f3498cadbece713d6e66a30903475f6bce273
26 -DIST systemd-231-man.tar.gz 29466 SHA256 aecf91c13333e1791d026b82360d55b4783f8d281c6e80bfe9d6bbf0bac633e4 SHA512 6c359f88da3e5dc01745f7255c021aafe495d9ca16c74277cbcfa05a6903093ec2c4746a34504d04f2aff464eeaa5518519577c831a08f4336552c6b6e05fdfd WHIRLPOOL 55371b404bfc945abc38d4cef5c555223abbee0993d56b506c896a851ba9ce283f0a020fe24ea273d3674f8a9dbe79b843d32eed93a59b2597b7bad113fbc3e1
27 -DIST systemd-231.tar.gz 4381464 SHA256 899733ad6c157cedbb89aec4efe3bc824dcfd65a1d6f6bebc7b043f7924e39b4 SHA512 199fa33a0494d1d15f7fe3c796fe14913ad386766571d4d3fbb1cb1c446e04f6d06a965213be4c594a7183e810fc2fd4804fe14f64f21b0a1278b717889811c6 WHIRLPOOL 7779291e9fb9873cb1773b8583cf6d4b7dec837363ea89c4a73c1e397a76752b66f8b57d8fc4d9cef768cc1855b5e325ad88a8a69eb5380aa924e0a6dead41b1
28 -DIST systemd-232-man.tar.gz 30579 SHA256 23fee775eece788322841e61d6b3bd8c0c13f54a94a40124af816b27cd9f7b69 SHA512 533ab1a41533b080aad2de7f8579b9b97081668e60cb94fc305316a43e9b0ebb85a959199e0d07278010e437e254b7eebc35f76aabb4bf3cb39a70dcb834a06f WHIRLPOOL 0c13be0a8546f720e72977549fc49ab000377e630856eb5541b948c8105cf4994bba6e694297f3c5cff596293e2a0f857f1346964c6878b32c14fb83a3ce9335
29 -DIST systemd-232.tar.gz 4529048 SHA256 1172c7c7d5d72fbded53186e7599d5272231f04cc8b72f9a0fb2c5c20dfc4880 SHA512 5dbe52f655ec2901b1bfbb1256f83ba26bc82c13097ac9a82e4fbb97886551530f9888c369592f1b410cfff40d6d127b985533a3e29cfab5b30d18739ee5dcb1 WHIRLPOOL f2a1499584c5b5c4d9e945e45ef5e0eef2e8be77acdbd7b3b29a8c8b62dc7a10c162a856df7107c19e2eb19e63bc43a33433686472ca30909237981683cbe980
30 DIST systemd-233-man.tar.gz 31386 SHA256 825e62eb82c4e23997061fc8f56f7ec9bb1e6ac1111d279c76c926cc2bfbf1dc SHA512 cc5215d3590ffc3c9203a64c14d6adeb0148c421c1396b8c1e43dcb58763b687ce99bdee327dd8a00abab7198171e73b22109a3f2032e4cec6adf2dcc85acf40 WHIRLPOOL ff1f36beff377f675047271df38503e8b71d615ea73c5fdfebf465edaf1fe29b4f89e3194d65cdf84eec9b7c3156de597627fdaffa4b86018520aaa127a7a159
31 DIST systemd-233.tar.gz 4660737 SHA256 8b3e99da3d4164b66581830a7f2436c0c8fe697b5fbdc3927bdb960646be0083 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e WHIRLPOOL ce19f6a546b8f899cfa952e49d47f063fd29186be4a53391bc30ea2c487eb2c140a74ad843a1dc499bb61bba3e9ca055613852291e38b85af5d79c59409dc176
32 DIST systemd-234.tar.gz 4800186 SHA256 da3e69d10aa1c983d33833372ad4929037b411ac421fb085c8cee79ae1d80b6a SHA512 762336a7d96c6583cf71cad62efce95a0ed93cd0a0d7251f128d10dba8200c0c8df0e5a7d168179ababa5b221295a231e73b7e7ea2697cb3fb5c1b33538efa68 WHIRLPOOL 9ff9f25ce82514db969a427eee51c0483b2bcaaa611f93c1fc17c356ea25eee712217708c54101ecaafd835cd8ac988b16e8ad411b48541a32442b9a0d148f07
33
34 diff --git a/sys-apps/systemd/metadata.xml b/sys-apps/systemd/metadata.xml
35 index 0ff06358a67..357ed6005f9 100644
36 --- a/sys-apps/systemd/metadata.xml
37 +++ b/sys-apps/systemd/metadata.xml
38 @@ -21,7 +21,6 @@
39 <flag name="gcrypt">Enable sealing of journal files using gcrypt; required to build systemd-import/systemd-pull</flag>
40 <flag name="http">Enable embedded HTTP server in journald</flag>
41 <flag name="importd">Enable import daemon</flag>
42 - <flag name="kdbus">Connect to kernel dbus (KDBUS) instead of userspace dbus if available</flag>
43 <flag name="kmod">Enable kernel module loading via <pkg>sys-apps/kmod</pkg></flag>
44 <flag name="libidn2">If IDN support is enabled, use <pkg>net-dns/libidn2</pkg> instead of <pkg>net-dns/libidn</pkg></flag>
45 <flag name="lz4">Enable lz4 compression for the journal</flag>
46
47 diff --git a/sys-apps/systemd/systemd-226-r2.ebuild b/sys-apps/systemd/systemd-226-r2.ebuild
48 deleted file mode 100644
49 index f6b48149c7b..00000000000
50 --- a/sys-apps/systemd/systemd-226-r2.ebuild
51 +++ /dev/null
52 @@ -1,484 +0,0 @@
53 -# Copyright 1999-2017 Gentoo Foundation
54 -# Distributed under the terms of the GNU General Public License v2
55 -
56 -EAPI=5
57 -
58 -if [[ ${PV} == 9999 ]]; then
59 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
60 - inherit git-r3
61 -else
62 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
63 - KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
64 -fi
65 -
66 -inherit autotools bash-completion-r1 linux-info multilib \
67 - multilib-minimal pam systemd toolchain-funcs udev user
68 -
69 -DESCRIPTION="System and service manager for Linux"
70 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
71 -
72 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
73 -SLOT="0/2"
74 -IUSE="acl apparmor audit build cryptsetup curl elfutils gcrypt gnuefi http
75 - idn importd +kdbus +kmod +lz4 lzma nat pam policykit
76 - qrcode +seccomp selinux ssl sysv-utils test vanilla xkb"
77 -
78 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
79 -
80 -MINKV="3.11"
81 -
82 -COMMON_DEPEND=">=sys-apps/util-linux-2.26:0=[${MULTILIB_USEDEP}]
83 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
84 - !<sys-libs/glibc-2.16
85 - acl? ( sys-apps/acl:0= )
86 - apparmor? ( sys-libs/libapparmor:0= )
87 - audit? ( >=sys-process/audit-2:0= )
88 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
89 - curl? ( net-misc/curl:0= )
90 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
91 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
92 - http? (
93 - >=net-libs/libmicrohttpd-0.9.33:0=
94 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
95 - )
96 - idn? ( net-dns/libidn:0= )
97 - importd? (
98 - app-arch/bzip2:0=
99 - sys-libs/zlib:0=
100 - )
101 - kmod? ( >=sys-apps/kmod-15:0= )
102 - lz4? ( >=app-arch/lz4-0_p119:0=[${MULTILIB_USEDEP}] )
103 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
104 - nat? ( net-firewall/iptables:0= )
105 - pam? ( virtual/pam:= )
106 - qrcode? ( media-gfx/qrencode:0= )
107 - seccomp? ( sys-libs/libseccomp:0= )
108 - selinux? ( sys-libs/libselinux:0= )
109 - sysv-utils? (
110 - !sys-apps/systemd-sysv-utils
111 - !sys-apps/sysvinit )
112 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
113 - abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
114 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
115 -
116 -# baselayout-2.2 has /run
117 -RDEPEND="${COMMON_DEPEND}
118 - >=sys-apps/baselayout-2.2
119 - !build? ( || (
120 - sys-apps/util-linux[kill(-)]
121 - sys-process/procps[kill(+)]
122 - sys-apps/coreutils[kill(-)]
123 - ) )
124 - !sys-auth/nss-myhostname
125 - !sys-fs/eudev
126 - !sys-fs/udev"
127 -
128 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
129 -PDEPEND=">=sys-apps/dbus-1.6.8-r1:0[systemd]
130 - >=sys-apps/hwids-20150417[udev]
131 - >=sys-fs/udev-init-scripts-25
132 - policykit? ( sys-auth/polkit )
133 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
134 -
135 -# Newer linux-headers needed by ia64, bug #480218
136 -DEPEND="${COMMON_DEPEND}
137 - app-arch/xz-utils:0
138 - <dev-util/gperf-3.1
139 - >=dev-util/intltool-0.50
140 - >=sys-apps/coreutils-8.16
141 - >=sys-devel/binutils-2.23.1
142 - >=sys-devel/gcc-4.6
143 - >=sys-kernel/linux-headers-${MINKV}
144 - virtual/pkgconfig
145 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
146 - test? ( >=sys-apps/dbus-1.6.8-r1:0 )
147 - app-text/docbook-xml-dtd:4.2
148 - app-text/docbook-xml-dtd:4.5
149 - app-text/docbook-xsl-stylesheets
150 - dev-libs/libxslt:0
151 - >=dev-libs/libgcrypt-1.4.5:0"
152 -
153 -pkg_pretend() {
154 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
155 - ~DEVTMPFS ~DMIID ~EPOLL ~FANOTIFY ~FHANDLE
156 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
157 - ~TIMERFD ~TMPFS_XATTR ~UNIX
158 - ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
159 - ~!SYSFS_DEPRECATED_V2"
160 -
161 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
162 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
163 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
164 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
165 -
166 - if linux_config_exists; then
167 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
168 - if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
169 - ewarn "It's recommended to set an empty value to the following kernel config option:"
170 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
171 - fi
172 - fi
173 -
174 - if [[ ${MERGE_TYPE} != binary ]]; then
175 - if [[ $(gcc-major-version) -lt 4
176 - || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]]
177 - then
178 - eerror "systemd requires at least gcc 4.6 to build. Please switch the active"
179 - eerror "gcc version using gcc-config."
180 - die "systemd requires at least gcc 4.6"
181 - fi
182 - fi
183 -
184 - if [[ ${MERGE_TYPE} != buildonly ]]; then
185 - if kernel_is -lt ${MINKV//./ }; then
186 - ewarn "Kernel version at least ${MINKV} required"
187 - fi
188 -
189 - check_extra_config
190 - fi
191 -}
192 -
193 -pkg_setup() {
194 - :
195 -}
196 -
197 -src_unpack() {
198 - default
199 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
200 -}
201 -
202 -src_prepare() {
203 - # Bug 463376
204 - sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
205 - epatch "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
206 - epatch "${FILESDIR}/226-noclean-tmp.patch"
207 - epatch "${FILESDIR}/CVE-2015-7510.patch"
208 - epatch "${FILESDIR}/226-kcmp.patch"
209 - epatch_user
210 - eautoreconf
211 -}
212 -
213 -src_configure() {
214 - # Keep using the one where the rules were installed.
215 - MY_UDEVDIR=$(get_udevdir)
216 - # Fix systems broken by bug #509454.
217 - [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
218 -
219 - # Prevent conflicts with i686 cross toolchain, bug 559726
220 - tc-export AR CC NM OBJCOPY RANLIB
221 -
222 - multilib-minimal_src_configure
223 -}
224 -
225 -multilib_src_configure() {
226 - local myeconfargs=(
227 - # disable -flto since it is an optimization flag
228 - # and makes distcc less effective
229 - cc_cv_CFLAGS__flto=no
230 -
231 - # Workaround for gcc-4.7, bug 554454.
232 - cc_cv_CFLAGS__Werror_shadow=no
233 -
234 - # Workaround for bug 516346
235 - --enable-dependency-tracking
236 -
237 - --disable-maintainer-mode
238 - --localstatedir=/var
239 - --with-pamlibdir=$(getpam_mod_dir)
240 - # avoid bash-completion dep
241 - --with-bashcompletiondir="$(get_bashcompdir)"
242 - # make sure we get /bin:/sbin in $PATH
243 - --enable-split-usr
244 - # For testing.
245 - --with-rootprefix="${ROOTPREFIX-/usr}"
246 - --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)"
247 - # disable sysv compatibility
248 - --with-sysvinit-path=
249 - --with-sysvrcnd-path=
250 - # no deps
251 - --enable-efi
252 - --enable-ima
253 - --without-python
254 -
255 - # Optional components/dependencies
256 - $(multilib_native_use_enable acl)
257 - $(multilib_native_use_enable apparmor)
258 - $(multilib_native_use_enable audit)
259 - $(multilib_native_use_enable cryptsetup libcryptsetup)
260 - $(multilib_native_use_enable curl libcurl)
261 - $(multilib_native_use_enable elfutils)
262 - $(use_enable gcrypt)
263 - $(multilib_native_use_enable gnuefi)
264 - $(multilib_native_use_enable http microhttpd)
265 - $(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls)
266 - $(multilib_native_use_enable idn libidn)
267 - $(multilib_native_use_enable importd)
268 - $(multilib_native_use_enable importd bzip2)
269 - $(multilib_native_use_enable importd zlib)
270 - $(use_enable kdbus)
271 - $(multilib_native_use_enable kmod)
272 - $(use_enable lz4)
273 - $(use_enable lzma xz)
274 - $(multilib_native_use_enable nat libiptc)
275 - $(multilib_native_use_enable pam)
276 - $(multilib_native_use_enable policykit polkit)
277 - $(multilib_native_use_enable qrcode qrencode)
278 - $(multilib_native_use_enable seccomp)
279 - $(multilib_native_use_enable selinux)
280 - $(multilib_native_use_enable test tests)
281 - $(multilib_native_use_enable test dbus)
282 - $(multilib_native_use_enable xkb xkbcommon)
283 -
284 - # hardcode a few paths to spare some deps
285 - KILL=/bin/kill
286 - QUOTAON=/usr/sbin/quotaon
287 - QUOTACHECK=/usr/sbin/quotacheck
288 -
289 - # TODO: we may need to restrict this to gcc
290 - EFI_CC="$(tc-getCC)"
291 -
292 - # dbus paths
293 - --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
294 - --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
295 - --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
296 -
297 - --with-ntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
298 - )
299 -
300 - # Work around bug 463846.
301 - tc-export CC
302 -
303 - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
304 -}
305 -
306 -multilib_src_compile() {
307 - local mymakeopts=(
308 - udevlibexecdir="${MY_UDEVDIR}"
309 - )
310 -
311 - if multilib_is_native_abi; then
312 - emake "${mymakeopts[@]}"
313 - else
314 - echo 'gentoo: $(BUILT_SOURCES)' | \
315 - emake "${mymakeopts[@]}" -f Makefile -f - gentoo
316 - echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \
317 - emake "${mymakeopts[@]}" -f Makefile -f - gentoo
318 - fi
319 -}
320 -
321 -multilib_src_test() {
322 - multilib_is_native_abi || continue
323 -
324 - # Needed for bus-related tests
325 - local -x SANDBOX_WRITE=${SANDBOX_WRITE}
326 - addwrite /sys/fs/kdbus
327 -
328 - default
329 -}
330 -
331 -multilib_src_install() {
332 - local mymakeopts=(
333 - # automake fails with parallel libtool relinking
334 - # https://bugs.gentoo.org/show_bug.cgi?id=491398
335 - -j1
336 -
337 - udevlibexecdir="${MY_UDEVDIR}"
338 - dist_udevhwdb_DATA=
339 - DESTDIR="${D}"
340 - )
341 -
342 - if multilib_is_native_abi; then
343 - emake "${mymakeopts[@]}" install
344 - else
345 - mymakeopts+=(
346 - install-libLTLIBRARIES
347 - install-pkgconfiglibDATA
348 - install-includeHEADERS
349 - # safe to call unconditionally, 'installs' empty list
350 - install-pkgincludeHEADERS
351 - )
352 -
353 - emake "${mymakeopts[@]}"
354 - fi
355 -
356 - # install compat pkg-config files
357 - # Change dbus to >=sys-apps/dbus-1.8.8 if/when this is dropped.
358 - local pcfiles=( src/compat-libs/libsystemd-{daemon,id128,journal,login}.pc )
359 - emake "${mymakeopts[@]}" install-pkgconfiglibDATA \
360 - pkgconfiglib_DATA="${pcfiles[*]}"
361 -}
362 -
363 -multilib_src_install_all() {
364 - prune_libtool_files --modules
365 - einstalldocs
366 -
367 - if use sysv-utils; then
368 - for app in halt poweroff reboot runlevel shutdown telinit; do
369 - dosym "..${ROOTPREFIX-/usr}/bin/systemctl" /sbin/${app}
370 - done
371 - dosym "..${ROOTPREFIX-/usr}/lib/systemd/systemd" /sbin/init
372 - else
373 - # we just keep sysvinit tools, so no need for the mans
374 - rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
375 - || die
376 - rm "${D}"/usr/share/man/man1/init.1 || die
377 - fi
378 -
379 - # Disable storing coredumps in journald, bug #433457
380 - mv "${D}"/usr/lib/sysctl.d/50-coredump.conf{,.disabled} || die
381 -
382 - # Preserve empty dirs in /etc & /var, bug #437008
383 - keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
384 - /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
385 - /var/log/journal/remote
386 -
387 - # Symlink /etc/sysctl.conf for easy migration.
388 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
389 -
390 - # If we install these symlinks, there is no way for the sysadmin to remove them
391 - # permanently.
392 - rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
393 - rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
394 - rm -r "${D}"/etc/systemd/system/network-online.target.wants || die
395 - rm -r "${D}"/etc/systemd/system/sockets.target.wants || die
396 - rm -r "${D}"/etc/systemd/system/sysinit.target.wants || die
397 -}
398 -
399 -migrate_locale() {
400 - local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
401 - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
402 - local locale_conf="${EROOT%/}/etc/locale.conf"
403 -
404 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
405 - # If locale.conf does not exist...
406 - if [[ -e ${envd_locale} ]]; then
407 - # ...either copy env.d/??locale if there's one
408 - ebegin "Moving ${envd_locale} to ${locale_conf}"
409 - mv "${envd_locale}" "${locale_conf}"
410 - eend ${?} || FAIL=1
411 - else
412 - # ...or create a dummy default
413 - ebegin "Creating ${locale_conf}"
414 - cat > "${locale_conf}" <<-EOF
415 - # This file has been created by the sys-apps/systemd ebuild.
416 - # See locale.conf(5) and localectl(1).
417 -
418 - # LANG=${LANG}
419 - EOF
420 - eend ${?} || FAIL=1
421 - fi
422 - fi
423 -
424 - if [[ ! -L ${envd_locale} ]]; then
425 - # now, if env.d/??locale is not a symlink (to locale.conf)...
426 - if [[ -e ${envd_locale} ]]; then
427 - # ...warn the user that he has duplicate locale settings
428 - ewarn
429 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
430 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
431 - ewarn "and create the symlink with the following command:"
432 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
433 - ewarn
434 - else
435 - # ...or just create the symlink if there's nothing here
436 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
437 - ln -n -s ../locale.conf "${envd_locale_def}"
438 - eend ${?} || FAIL=1
439 - fi
440 - fi
441 -}
442 -
443 -migrate_net_name_slot() {
444 - # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null,
445 - # do the same for 80-net-setup-link.rules to keep the old behavior
446 - local net_move=no
447 - local net_name_slot_sym=no
448 - local net_rules_path="${EROOT%/}"/etc/udev/rules.d
449 - local net_name_slot="${net_rules_path}"/80-net-name-slot.rules
450 - local net_setup_link="${net_rules_path}"/80-net-setup-link.rules
451 - if [[ -e ${net_setup_link} ]]; then
452 - net_move=no
453 - elif [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]]; then
454 - net_move=yes
455 - elif [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then
456 - net_move=yes
457 - net_name_slot_sym=yes
458 - fi
459 - if [[ ${net_move} == yes ]]; then
460 - ebegin "Copying ${net_name_slot} to ${net_setup_link}"
461 -
462 - if [[ ${net_name_slot_sym} == yes ]]; then
463 - ln -nfs /dev/null "${net_setup_link}"
464 - else
465 - cp "${net_name_slot}" "${net_setup_link}"
466 - fi
467 - eend $? || FAIL=1
468 - fi
469 -}
470 -
471 -reenable_unit() {
472 - if systemctl is-enabled --root="${ROOT}" "$1" &> /dev/null; then
473 - ebegin "Re-enabling $1"
474 - systemctl reenable --root="${ROOT}" "$1"
475 - eend $? || FAIL=1
476 - fi
477 -}
478 -
479 -pkg_postinst() {
480 - newusergroup() {
481 - enewgroup "$1"
482 - enewuser "$1" -1 -1 -1 "$1"
483 - }
484 -
485 - enewgroup input
486 - enewgroup systemd-journal
487 - newusergroup systemd-bus-proxy
488 - newusergroup systemd-journal-gateway
489 - newusergroup systemd-journal-remote
490 - newusergroup systemd-journal-upload
491 - newusergroup systemd-network
492 - newusergroup systemd-resolve
493 - newusergroup systemd-timesync
494 - use http && newusergroup systemd-journal-gateway
495 -
496 - systemd_update_catalog
497 -
498 - # Keep this here in case the database format changes so it gets updated
499 - # when required. Despite that this file is owned by sys-apps/hwids.
500 - if has_version "sys-apps/hwids[udev]"; then
501 - udevadm hwdb --update --root="${ROOT%/}"
502 - fi
503 -
504 - udev_reload || FAIL=1
505 -
506 - # Bug 465468, make sure locales are respect, and ensure consistency
507 - # between OpenRC & systemd
508 - migrate_locale
509 -
510 - # Migrate 80-net-name-slot.rules -> 80-net-setup-link.rules
511 - migrate_net_name_slot
512 -
513 - # Re-enable systemd-networkd for socket activation
514 - reenable_unit systemd-networkd.service
515 -
516 - if [[ ${FAIL} ]]; then
517 - eerror "One of the postinst commands failed. Please check the postinst output"
518 - eerror "for errors. You may need to clean up your system and/or try installing"
519 - eerror "systemd again."
520 - eerror
521 - fi
522 -
523 - if [[ $(readlink "${ROOT}"/etc/resolv.conf) == */run/systemd/network/resolv.conf ]]; then
524 - ewarn "resolv.conf is now generated by systemd-resolved. To use it, enable"
525 - ewarn "systemd-resolved.service, and create a symlink from /etc/resolv.conf"
526 - ewarn "to /run/systemd/resolve/resolv.conf"
527 - ewarn
528 - fi
529 -}
530 -
531 -pkg_prerm() {
532 - # If removing systemd completely, remove the catalog database.
533 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
534 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
535 - fi
536 -}
537
538 diff --git a/sys-apps/systemd/systemd-231.ebuild b/sys-apps/systemd/systemd-231.ebuild
539 deleted file mode 100644
540 index 6345a4573b1..00000000000
541 --- a/sys-apps/systemd/systemd-231.ebuild
542 +++ /dev/null
543 @@ -1,454 +0,0 @@
544 -# Copyright 1999-2017 Gentoo Foundation
545 -# Distributed under the terms of the GNU General Public License v2
546 -
547 -EAPI=6
548 -
549 -if [[ ${PV} == 9999 ]]; then
550 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
551 - inherit git-r3
552 -else
553 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz
554 - !doc? ( https://dev.gentoo.org/~floppym/dist/${P}-man.tar.gz )"
555 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
556 -fi
557 -
558 -PYTHON_COMPAT=( python{2_7,3_4,3_5} )
559 -
560 -inherit autotools bash-completion-r1 linux-info multilib-minimal pam python-any-r1 systemd toolchain-funcs udev user
561 -
562 -DESCRIPTION="System and service manager for Linux"
563 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
564 -
565 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
566 -SLOT="0/2"
567 -IUSE="acl apparmor audit build cryptsetup curl doc elfutils +gcrypt gnuefi http
568 - idn importd +kmod +lz4 lzma nat pam policykit
569 - qrcode +seccomp selinux ssl sysv-utils test vanilla xkb"
570 -
571 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
572 -
573 -MINKV="3.11"
574 -
575 -COMMON_DEPEND=">=sys-apps/util-linux-2.27.1:0=[${MULTILIB_USEDEP}]
576 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
577 - !<sys-libs/glibc-2.16
578 - acl? ( sys-apps/acl:0= )
579 - apparmor? ( sys-libs/libapparmor:0= )
580 - audit? ( >=sys-process/audit-2:0= )
581 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
582 - curl? ( net-misc/curl:0= )
583 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
584 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
585 - http? (
586 - >=net-libs/libmicrohttpd-0.9.33:0=
587 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
588 - )
589 - idn? ( net-dns/libidn:0= )
590 - importd? (
591 - app-arch/bzip2:0=
592 - sys-libs/zlib:0=
593 - )
594 - kmod? ( >=sys-apps/kmod-15:0= )
595 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
596 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
597 - nat? ( net-firewall/iptables:0= )
598 - pam? ( virtual/pam:= )
599 - qrcode? ( media-gfx/qrencode:0= )
600 - seccomp? ( sys-libs/libseccomp:0= )
601 - selinux? ( sys-libs/libselinux:0= )
602 - sysv-utils? (
603 - !sys-apps/systemd-sysv-utils
604 - !sys-apps/sysvinit )
605 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
606 - abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
607 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
608 -
609 -# baselayout-2.2 has /run
610 -RDEPEND="${COMMON_DEPEND}
611 - >=sys-apps/baselayout-2.2
612 - selinux? ( sec-policy/selinux-base-policy[systemd] )
613 - !build? ( || (
614 - sys-apps/util-linux[kill(-)]
615 - sys-process/procps[kill(+)]
616 - sys-apps/coreutils[kill(-)]
617 - ) )
618 - !sys-auth/nss-myhostname
619 - !<sys-kernel/dracut-044
620 - !sys-fs/eudev
621 - !sys-fs/udev"
622 -
623 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
624 -PDEPEND=">=sys-apps/dbus-1.8.8:0[systemd]
625 - >=sys-apps/hwids-20150417[udev]
626 - >=sys-fs/udev-init-scripts-25
627 - policykit? ( sys-auth/polkit )
628 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
629 -
630 -# Newer linux-headers needed by ia64, bug #480218
631 -DEPEND="${COMMON_DEPEND}
632 - app-arch/xz-utils:0
633 - dev-util/gperf
634 - >=dev-util/intltool-0.50
635 - >=sys-apps/coreutils-8.16
636 - >=sys-devel/binutils-2.23.1
637 - >=sys-devel/gcc-4.6
638 - >=sys-kernel/linux-headers-${MINKV}
639 - virtual/pkgconfig
640 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
641 - test? ( >=sys-apps/dbus-1.6.8-r1:0 )
642 - app-text/docbook-xml-dtd:4.2
643 - app-text/docbook-xml-dtd:4.5
644 - app-text/docbook-xsl-stylesheets
645 - dev-libs/libxslt:0
646 - doc? ( $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') )
647 -"
648 -
649 -python_check_deps() {
650 - has_version --host-root "dev-python/lxml[${PYTHON_USEDEP}]"
651 -}
652 -
653 -pkg_pretend() {
654 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
655 - ~DEVTMPFS ~DMIID ~EPOLL ~FANOTIFY ~FHANDLE
656 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
657 - ~TIMERFD ~TMPFS_XATTR ~UNIX
658 - ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
659 - ~!SYSFS_DEPRECATED_V2"
660 -
661 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
662 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
663 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
664 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
665 -
666 - if linux_config_exists; then
667 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
668 - if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
669 - ewarn "It's recommended to set an empty value to the following kernel config option:"
670 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
671 - fi
672 - fi
673 -
674 - if [[ ${MERGE_TYPE} != binary ]]; then
675 - if [[ $(gcc-major-version) -lt 4
676 - || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]]
677 - then
678 - eerror "systemd requires at least gcc 4.6 to build. Please switch the active"
679 - eerror "gcc version using gcc-config."
680 - die "systemd requires at least gcc 4.6"
681 - fi
682 - fi
683 -
684 - if [[ ${MERGE_TYPE} != buildonly ]]; then
685 - if kernel_is -lt ${MINKV//./ }; then
686 - ewarn "Kernel version at least ${MINKV} required"
687 - fi
688 -
689 - check_extra_config
690 - fi
691 -}
692 -
693 -pkg_setup() {
694 - :
695 -}
696 -
697 -src_unpack() {
698 - default
699 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
700 -}
701 -
702 -src_prepare() {
703 - # Bug 463376
704 - sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
705 -
706 - local PATCHES=(
707 - "${FILESDIR}"/232-0001-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch
708 - "${FILESDIR}"/232-0002-build-sys-add-check-for-gperf-lookup-function-signat.patch
709 - "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
710 - "${FILESDIR}/228-noclean-tmp.patch"
711 - )
712 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
713 -
714 - default
715 -
716 - eautoreconf
717 -}
718 -
719 -src_configure() {
720 - # Keep using the one where the rules were installed.
721 - MY_UDEVDIR=$(get_udevdir)
722 - # Fix systems broken by bug #509454.
723 - [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
724 -
725 - # Prevent conflicts with i686 cross toolchain, bug 559726
726 - tc-export AR CC NM OBJCOPY RANLIB
727 -
728 - use doc && python_setup
729 -
730 - multilib-minimal_src_configure
731 -}
732 -
733 -multilib_src_configure() {
734 - local myeconfargs=(
735 - # disable -flto since it is an optimization flag
736 - # and makes distcc less effective
737 - cc_cv_CFLAGS__flto=no
738 - # disable -fuse-ld=gold since Gentoo supports explicit linker
739 - # choice and forcing gold is undesired, #539998
740 - # ld.gold may collide with user's LDFLAGS, #545168
741 - # ld.gold breaks sparc, #573874
742 - cc_cv_LDFLAGS__Wl__fuse_ld_gold=no
743 -
744 - # Workaround for gcc-4.7, bug 554454.
745 - cc_cv_CFLAGS__Werror_shadow=no
746 -
747 - # Workaround for bug 516346
748 - --enable-dependency-tracking
749 -
750 - --disable-maintainer-mode
751 - --localstatedir=/var
752 - --with-pamlibdir=$(getpam_mod_dir)
753 - # avoid bash-completion dep
754 - --with-bashcompletiondir="$(get_bashcompdir)"
755 - # make sure we get /bin:/sbin in $PATH
756 - --enable-split-usr
757 - # For testing.
758 - --with-rootprefix="${ROOTPREFIX-/usr}"
759 - --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)"
760 - # disable sysv compatibility
761 - --with-sysvinit-path=
762 - --with-sysvrcnd-path=
763 - # no deps
764 - --enable-efi
765 - --enable-ima
766 -
767 - # Optional components/dependencies
768 - $(multilib_native_use_enable acl)
769 - $(multilib_native_use_enable apparmor)
770 - $(multilib_native_use_enable audit)
771 - $(multilib_native_use_enable cryptsetup libcryptsetup)
772 - $(multilib_native_use_enable curl libcurl)
773 - $(multilib_native_use_enable elfutils)
774 - $(use_enable gcrypt)
775 - $(multilib_native_use_enable gnuefi)
776 - $(multilib_native_use_enable http microhttpd)
777 - $(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls)
778 - $(multilib_native_use_enable idn libidn)
779 - $(multilib_native_use_enable importd)
780 - $(multilib_native_use_enable importd bzip2)
781 - $(multilib_native_use_enable importd zlib)
782 - $(multilib_native_use_enable kmod)
783 - $(use_enable lz4)
784 - $(use_enable lzma xz)
785 - $(multilib_native_use_enable nat libiptc)
786 - $(multilib_native_use_enable pam)
787 - $(multilib_native_use_enable policykit polkit)
788 - $(multilib_native_use_enable qrcode qrencode)
789 - $(multilib_native_use_enable seccomp)
790 - $(multilib_native_use_enable selinux)
791 - $(multilib_native_use_enable test tests)
792 - $(multilib_native_use_enable test dbus)
793 - $(multilib_native_use_enable xkb xkbcommon)
794 - $(multilib_native_use_with doc python)
795 -
796 - # hardcode a few paths to spare some deps
797 - KILL=/bin/kill
798 - QUOTAON=/usr/sbin/quotaon
799 - QUOTACHECK=/usr/sbin/quotacheck
800 -
801 - # TODO: we may need to restrict this to gcc
802 - EFI_CC="$(tc-getCC)"
803 -
804 - # dbus paths
805 - --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
806 - --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
807 - --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
808 -
809 - --with-ntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
810 -
811 - # Breaks screen, tmux, etc.
812 - --without-kill-user-processes
813 - )
814 -
815 - # Work around bug 463846.
816 - tc-export CC
817 -
818 - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
819 -}
820 -
821 -multilib_src_compile() {
822 - local mymakeopts=(
823 - udevlibexecdir="${MY_UDEVDIR}"
824 - )
825 -
826 - if multilib_is_native_abi; then
827 - emake "${mymakeopts[@]}"
828 - else
829 - echo 'gentoo: $(BUILT_SOURCES)' | \
830 - emake "${mymakeopts[@]}" -f Makefile -f - gentoo
831 - echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \
832 - emake "${mymakeopts[@]}" -f Makefile -f - gentoo
833 - fi
834 -}
835 -
836 -multilib_src_test() {
837 - multilib_is_native_abi || return 0
838 - default
839 -}
840 -
841 -multilib_src_install() {
842 - local mymakeopts=(
843 - # automake fails with parallel libtool relinking
844 - # https://bugs.gentoo.org/show_bug.cgi?id=491398
845 - -j1
846 -
847 - udevlibexecdir="${MY_UDEVDIR}"
848 - dist_udevhwdb_DATA=
849 - DESTDIR="${D}"
850 - )
851 -
852 - if multilib_is_native_abi; then
853 - emake "${mymakeopts[@]}" install
854 - else
855 - mymakeopts+=(
856 - install-libLTLIBRARIES
857 - install-pkgconfiglibDATA
858 - install-includeHEADERS
859 - # safe to call unconditionally, 'installs' empty list
860 - install-pkgincludeHEADERS
861 - )
862 -
863 - emake "${mymakeopts[@]}"
864 - fi
865 -}
866 -
867 -multilib_src_install_all() {
868 - prune_libtool_files --modules
869 - einstalldocs
870 -
871 - if [[ ${PV} != 9999 ]]; then
872 - use doc || doman "${WORKDIR}"/man/systemd.{directives,index}.7
873 - fi
874 -
875 - if use sysv-utils; then
876 - for app in halt poweroff reboot runlevel shutdown telinit; do
877 - dosym "..${ROOTPREFIX-/usr}/bin/systemctl" /sbin/${app}
878 - done
879 - dosym "..${ROOTPREFIX-/usr}/lib/systemd/systemd" /sbin/init
880 - else
881 - # we just keep sysvinit tools, so no need for the mans
882 - rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
883 - || die
884 - rm "${D}"/usr/share/man/man1/init.1 || die
885 - fi
886 -
887 - # Preserve empty dirs in /etc & /var, bug #437008
888 - keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
889 - /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
890 - /var/log/journal/remote
891 -
892 - # Symlink /etc/sysctl.conf for easy migration.
893 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
894 -
895 - # If we install these symlinks, there is no way for the sysadmin to remove them
896 - # permanently.
897 - rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
898 - rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
899 - rm -r "${D}"/etc/systemd/system/network-online.target.wants || die
900 - rm -r "${D}"/etc/systemd/system/sockets.target.wants || die
901 - rm -r "${D}"/etc/systemd/system/sysinit.target.wants || die
902 -}
903 -
904 -migrate_locale() {
905 - local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
906 - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
907 - local locale_conf="${EROOT%/}/etc/locale.conf"
908 -
909 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
910 - # If locale.conf does not exist...
911 - if [[ -e ${envd_locale} ]]; then
912 - # ...either copy env.d/??locale if there's one
913 - ebegin "Moving ${envd_locale} to ${locale_conf}"
914 - mv "${envd_locale}" "${locale_conf}"
915 - eend ${?} || FAIL=1
916 - else
917 - # ...or create a dummy default
918 - ebegin "Creating ${locale_conf}"
919 - cat > "${locale_conf}" <<-EOF
920 - # This file has been created by the sys-apps/systemd ebuild.
921 - # See locale.conf(5) and localectl(1).
922 -
923 - # LANG=${LANG}
924 - EOF
925 - eend ${?} || FAIL=1
926 - fi
927 - fi
928 -
929 - if [[ ! -L ${envd_locale} ]]; then
930 - # now, if env.d/??locale is not a symlink (to locale.conf)...
931 - if [[ -e ${envd_locale} ]]; then
932 - # ...warn the user that he has duplicate locale settings
933 - ewarn
934 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
935 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
936 - ewarn "and create the symlink with the following command:"
937 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
938 - ewarn
939 - else
940 - # ...or just create the symlink if there's nothing here
941 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
942 - ln -n -s ../locale.conf "${envd_locale_def}"
943 - eend ${?} || FAIL=1
944 - fi
945 - fi
946 -}
947 -
948 -pkg_postinst() {
949 - newusergroup() {
950 - enewgroup "$1"
951 - enewuser "$1" -1 -1 -1 "$1"
952 - }
953 -
954 - enewgroup input
955 - enewgroup systemd-journal
956 - newusergroup systemd-bus-proxy
957 - newusergroup systemd-coredump
958 - newusergroup systemd-journal-gateway
959 - newusergroup systemd-journal-remote
960 - newusergroup systemd-journal-upload
961 - newusergroup systemd-network
962 - newusergroup systemd-resolve
963 - newusergroup systemd-timesync
964 -
965 - systemd_update_catalog
966 -
967 - # Keep this here in case the database format changes so it gets updated
968 - # when required. Despite that this file is owned by sys-apps/hwids.
969 - if has_version "sys-apps/hwids[udev]"; then
970 - udevadm hwdb --update --root="${ROOT%/}"
971 - fi
972 -
973 - udev_reload || FAIL=1
974 -
975 - # Bug 465468, make sure locales are respect, and ensure consistency
976 - # between OpenRC & systemd
977 - migrate_locale
978 -
979 - if [[ ${FAIL} ]]; then
980 - eerror "One of the postinst commands failed. Please check the postinst output"
981 - eerror "for errors. You may need to clean up your system and/or try installing"
982 - eerror "systemd again."
983 - eerror
984 - fi
985 -
986 - #if [[ $(readlink "${ROOT}"etc/resolv.conf) == */run/systemd/* ]]; then
987 - # ewarn "You should replace the resolv.conf symlink:"
988 - # ewarn "ln -snf ${ROOTPREFIX-/usr}/lib/systemd/resolv.conf ${ROOT}etc/resolv.conf"
989 - #fi
990 -}
991 -
992 -pkg_prerm() {
993 - # If removing systemd completely, remove the catalog database.
994 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
995 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
996 - fi
997 -}
998
999 diff --git a/sys-apps/systemd/systemd-232.ebuild b/sys-apps/systemd/systemd-232.ebuild
1000 deleted file mode 100644
1001 index b952bbbec5b..00000000000
1002 --- a/sys-apps/systemd/systemd-232.ebuild
1003 +++ /dev/null
1004 @@ -1,456 +0,0 @@
1005 -# Copyright 1999-2017 Gentoo Foundation
1006 -# Distributed under the terms of the GNU General Public License v2
1007 -
1008 -EAPI=6
1009 -
1010 -if [[ ${PV} == 9999 ]]; then
1011 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
1012 - inherit git-r3
1013 -else
1014 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz
1015 - !doc? ( https://dev.gentoo.org/~floppym/dist/${P}-man.tar.gz )"
1016 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
1017 -fi
1018 -
1019 -PYTHON_COMPAT=( python{2_7,3_4,3_5} )
1020 -
1021 -inherit autotools bash-completion-r1 linux-info multilib-minimal pam python-any-r1 systemd toolchain-funcs udev user
1022 -
1023 -DESCRIPTION="System and service manager for Linux"
1024 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
1025 -
1026 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
1027 -SLOT="0/2"
1028 -IUSE="acl apparmor audit build cryptsetup curl doc elfutils +gcrypt gnuefi http
1029 - idn importd +kmod +lz4 lzma nat pam policykit
1030 - qrcode +seccomp selinux ssl sysv-utils test vanilla xkb"
1031 -
1032 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
1033 -
1034 -MINKV="3.11"
1035 -
1036 -COMMON_DEPEND=">=sys-apps/util-linux-2.27.1:0=[${MULTILIB_USEDEP}]
1037 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
1038 - !<sys-libs/glibc-2.16
1039 - acl? ( sys-apps/acl:0= )
1040 - apparmor? ( sys-libs/libapparmor:0= )
1041 - audit? ( >=sys-process/audit-2:0= )
1042 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
1043 - curl? ( net-misc/curl:0= )
1044 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
1045 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
1046 - http? (
1047 - >=net-libs/libmicrohttpd-0.9.33:0=
1048 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
1049 - )
1050 - idn? ( net-dns/libidn:0= )
1051 - importd? (
1052 - app-arch/bzip2:0=
1053 - sys-libs/zlib:0=
1054 - )
1055 - kmod? ( >=sys-apps/kmod-15:0= )
1056 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
1057 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
1058 - nat? ( net-firewall/iptables:0= )
1059 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
1060 - qrcode? ( media-gfx/qrencode:0= )
1061 - seccomp? ( >=sys-libs/libseccomp-2.3.1:0= )
1062 - selinux? ( sys-libs/libselinux:0= )
1063 - sysv-utils? (
1064 - !sys-apps/systemd-sysv-utils
1065 - !sys-apps/sysvinit )
1066 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
1067 - abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
1068 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
1069 -
1070 -# baselayout-2.2 has /run
1071 -RDEPEND="${COMMON_DEPEND}
1072 - >=sys-apps/baselayout-2.2
1073 - selinux? ( sec-policy/selinux-base-policy[systemd] )
1074 - !build? ( || (
1075 - sys-apps/util-linux[kill(-)]
1076 - sys-process/procps[kill(+)]
1077 - sys-apps/coreutils[kill(-)]
1078 - ) )
1079 - !sys-auth/nss-myhostname
1080 - !<sys-kernel/dracut-044
1081 - !sys-fs/eudev
1082 - !sys-fs/udev"
1083 -
1084 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
1085 -PDEPEND=">=sys-apps/dbus-1.8.8:0[systemd]
1086 - >=sys-apps/hwids-20150417[udev]
1087 - >=sys-fs/udev-init-scripts-25
1088 - policykit? ( sys-auth/polkit )
1089 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
1090 -
1091 -# Newer linux-headers needed by ia64, bug #480218
1092 -DEPEND="${COMMON_DEPEND}
1093 - app-arch/xz-utils:0
1094 - dev-util/gperf
1095 - >=dev-util/intltool-0.50
1096 - >=sys-apps/coreutils-8.16
1097 - >=sys-kernel/linux-headers-${MINKV}
1098 - virtual/pkgconfig
1099 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
1100 - test? ( >=sys-apps/dbus-1.6.8-r1:0 )
1101 - app-text/docbook-xml-dtd:4.2
1102 - app-text/docbook-xml-dtd:4.5
1103 - app-text/docbook-xsl-stylesheets
1104 - dev-libs/libxslt:0
1105 - doc? ( $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') )
1106 -"
1107 -
1108 -python_check_deps() {
1109 - has_version --host-root "dev-python/lxml[${PYTHON_USEDEP}]"
1110 -}
1111 -
1112 -pkg_pretend() {
1113 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
1114 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~DMIID ~EPOLL ~FANOTIFY ~FHANDLE
1115 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
1116 - ~TIMERFD ~TMPFS_XATTR ~UNIX
1117 - ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
1118 - ~!SYSFS_DEPRECATED_V2"
1119 -
1120 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
1121 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
1122 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
1123 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
1124 -
1125 - if linux_config_exists; then
1126 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
1127 - if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
1128 - ewarn "It's recommended to set an empty value to the following kernel config option:"
1129 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
1130 - fi
1131 - fi
1132 -
1133 - if [[ ${MERGE_TYPE} != buildonly ]]; then
1134 - if kernel_is -lt ${MINKV//./ }; then
1135 - ewarn "Kernel version at least ${MINKV} required"
1136 - fi
1137 -
1138 - check_extra_config
1139 - fi
1140 -}
1141 -
1142 -pkg_setup() {
1143 - :
1144 -}
1145 -
1146 -src_unpack() {
1147 - default
1148 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
1149 -}
1150 -
1151 -src_prepare() {
1152 - # Bug 463376
1153 - sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
1154 -
1155 - local PATCHES=(
1156 - "${FILESDIR}"/232-0001-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch
1157 - "${FILESDIR}"/232-0002-build-sys-add-check-for-gperf-lookup-function-signat.patch
1158 - )
1159 -
1160 - if ! use vanilla; then
1161 - PATCHES+=(
1162 - "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
1163 - "${FILESDIR}/228-noclean-tmp.patch"
1164 - "${FILESDIR}/232-systemd-user-pam.patch"
1165 - )
1166 - fi
1167 -
1168 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
1169 -
1170 - default
1171 -
1172 - eautoreconf
1173 -}
1174 -
1175 -src_configure() {
1176 - # Keep using the one where the rules were installed.
1177 - MY_UDEVDIR=$(get_udevdir)
1178 - # Fix systems broken by bug #509454.
1179 - [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
1180 -
1181 - # Prevent conflicts with i686 cross toolchain, bug 559726
1182 - tc-export AR CC NM OBJCOPY RANLIB
1183 -
1184 - use doc && python_setup
1185 -
1186 - multilib-minimal_src_configure
1187 -}
1188 -
1189 -multilib_src_configure() {
1190 - local myeconfargs=(
1191 - # disable -flto since it is an optimization flag
1192 - # and makes distcc less effective
1193 - cc_cv_CFLAGS__flto=no
1194 - # disable -fuse-ld=gold since Gentoo supports explicit linker
1195 - # choice and forcing gold is undesired, #539998
1196 - # ld.gold may collide with user's LDFLAGS, #545168
1197 - # ld.gold breaks sparc, #573874
1198 - cc_cv_LDFLAGS__Wl__fuse_ld_gold=no
1199 -
1200 - # Workaround for gcc-4.7, bug 554454.
1201 - cc_cv_CFLAGS__Werror_shadow=no
1202 -
1203 - # Workaround for bug 516346
1204 - --enable-dependency-tracking
1205 -
1206 - --disable-maintainer-mode
1207 - --localstatedir=/var
1208 - --with-pamlibdir=$(getpam_mod_dir)
1209 - # avoid bash-completion dep
1210 - --with-bashcompletiondir="$(get_bashcompdir)"
1211 - # make sure we get /bin:/sbin in $PATH
1212 - --enable-split-usr
1213 - # For testing.
1214 - --with-rootprefix="${ROOTPREFIX-/usr}"
1215 - --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)"
1216 - # disable sysv compatibility
1217 - --with-sysvinit-path=
1218 - --with-sysvrcnd-path=
1219 - # no deps
1220 - --enable-efi
1221 - --enable-ima
1222 -
1223 - # Optional components/dependencies
1224 - $(multilib_native_use_enable acl)
1225 - $(multilib_native_use_enable apparmor)
1226 - $(multilib_native_use_enable audit)
1227 - $(multilib_native_use_enable cryptsetup libcryptsetup)
1228 - $(multilib_native_use_enable curl libcurl)
1229 - $(multilib_native_use_enable elfutils)
1230 - $(use_enable gcrypt)
1231 - $(multilib_native_use_enable gnuefi)
1232 - --with-efi-libdir="/usr/$(get_libdir)"
1233 - $(multilib_native_use_enable http microhttpd)
1234 - $(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls)
1235 - $(multilib_native_use_enable idn libidn)
1236 - $(multilib_native_use_enable importd)
1237 - $(multilib_native_use_enable importd bzip2)
1238 - $(multilib_native_use_enable importd zlib)
1239 - $(multilib_native_use_enable kmod)
1240 - $(use_enable lz4)
1241 - $(use_enable lzma xz)
1242 - $(multilib_native_use_enable nat libiptc)
1243 - $(use_enable pam)
1244 - $(multilib_native_use_enable policykit polkit)
1245 - $(multilib_native_use_enable qrcode qrencode)
1246 - $(multilib_native_use_enable seccomp)
1247 - $(multilib_native_use_enable selinux)
1248 - $(multilib_native_use_enable test tests)
1249 - $(multilib_native_use_enable test dbus)
1250 - $(multilib_native_use_enable xkb xkbcommon)
1251 - $(multilib_native_use_with doc python)
1252 -
1253 - # hardcode a few paths to spare some deps
1254 - KILL=/bin/kill
1255 - QUOTAON=/usr/sbin/quotaon
1256 - QUOTACHECK=/usr/sbin/quotacheck
1257 -
1258 - # TODO: we may need to restrict this to gcc
1259 - EFI_CC="$(tc-getCC)"
1260 -
1261 - # dbus paths
1262 - --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
1263 - --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
1264 - --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
1265 -
1266 - --with-ntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
1267 -
1268 - # Breaks screen, tmux, etc.
1269 - --without-kill-user-processes
1270 - )
1271 -
1272 - # Work around bug 463846.
1273 - tc-export CC
1274 -
1275 - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
1276 -}
1277 -
1278 -multilib_src_compile() {
1279 - local mymakeopts=(
1280 - udevlibexecdir="${MY_UDEVDIR}"
1281 - )
1282 -
1283 - if multilib_is_native_abi; then
1284 - emake "${mymakeopts[@]}"
1285 - else
1286 - emake built-sources
1287 - local targets=(
1288 - '$(rootlib_LTLIBRARIES)'
1289 - '$(lib_LTLIBRARIES)'
1290 - '$(pamlib_LTLIBRARIES)'
1291 - '$(pkgconfiglib_DATA)'
1292 - )
1293 - echo "gentoo: ${targets[*]}" | emake "${mymakeopts[@]}" -f Makefile -f - gentoo
1294 - fi
1295 -}
1296 -
1297 -multilib_src_test() {
1298 - multilib_is_native_abi || return 0
1299 - default
1300 -}
1301 -
1302 -multilib_src_install() {
1303 - local mymakeopts=(
1304 - # automake fails with parallel libtool relinking
1305 - # https://bugs.gentoo.org/show_bug.cgi?id=491398
1306 - -j1
1307 -
1308 - udevlibexecdir="${MY_UDEVDIR}"
1309 - dist_udevhwdb_DATA=
1310 - DESTDIR="${D}"
1311 - )
1312 -
1313 - if multilib_is_native_abi; then
1314 - emake "${mymakeopts[@]}" install
1315 - else
1316 - mymakeopts+=(
1317 - install-rootlibLTLIBRARIES
1318 - install-libLTLIBRARIES
1319 - install-pamlibLTLIBRARIES
1320 - install-pkgconfiglibDATA
1321 - install-includeHEADERS
1322 - install-pkgincludeHEADERS
1323 - )
1324 -
1325 - emake "${mymakeopts[@]}"
1326 - fi
1327 -}
1328 -
1329 -multilib_src_install_all() {
1330 - prune_libtool_files --modules
1331 - einstalldocs
1332 - dodoc "${FILESDIR}"/nsswitch.conf
1333 -
1334 - if [[ ${PV} != 9999 ]]; then
1335 - use doc || doman "${WORKDIR}"/man/systemd.{directives,index}.7
1336 - fi
1337 -
1338 - if use sysv-utils; then
1339 - for app in halt poweroff reboot runlevel shutdown telinit; do
1340 - dosym "..${ROOTPREFIX-/usr}/bin/systemctl" /sbin/${app}
1341 - done
1342 - dosym "..${ROOTPREFIX-/usr}/lib/systemd/systemd" /sbin/init
1343 - else
1344 - # we just keep sysvinit tools, so no need for the mans
1345 - rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
1346 - || die
1347 - rm "${D}"/usr/share/man/man1/init.1 || die
1348 - fi
1349 -
1350 - # Preserve empty dirs in /etc & /var, bug #437008
1351 - keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
1352 - /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
1353 - /var/log/journal/remote
1354 -
1355 - # Symlink /etc/sysctl.conf for easy migration.
1356 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
1357 -
1358 - # If we install these symlinks, there is no way for the sysadmin to remove them
1359 - # permanently.
1360 - rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
1361 - rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
1362 - rm -r "${D}"/etc/systemd/system/network-online.target.wants || die
1363 - rm -r "${D}"/etc/systemd/system/sockets.target.wants || die
1364 - rm -r "${D}"/etc/systemd/system/sysinit.target.wants || die
1365 -}
1366 -
1367 -migrate_locale() {
1368 - local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
1369 - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
1370 - local locale_conf="${EROOT%/}/etc/locale.conf"
1371 -
1372 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
1373 - # If locale.conf does not exist...
1374 - if [[ -e ${envd_locale} ]]; then
1375 - # ...either copy env.d/??locale if there's one
1376 - ebegin "Moving ${envd_locale} to ${locale_conf}"
1377 - mv "${envd_locale}" "${locale_conf}"
1378 - eend ${?} || FAIL=1
1379 - else
1380 - # ...or create a dummy default
1381 - ebegin "Creating ${locale_conf}"
1382 - cat > "${locale_conf}" <<-EOF
1383 - # This file has been created by the sys-apps/systemd ebuild.
1384 - # See locale.conf(5) and localectl(1).
1385 -
1386 - # LANG=${LANG}
1387 - EOF
1388 - eend ${?} || FAIL=1
1389 - fi
1390 - fi
1391 -
1392 - if [[ ! -L ${envd_locale} ]]; then
1393 - # now, if env.d/??locale is not a symlink (to locale.conf)...
1394 - if [[ -e ${envd_locale} ]]; then
1395 - # ...warn the user that he has duplicate locale settings
1396 - ewarn
1397 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
1398 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
1399 - ewarn "and create the symlink with the following command:"
1400 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
1401 - ewarn
1402 - else
1403 - # ...or just create the symlink if there's nothing here
1404 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
1405 - ln -n -s ../locale.conf "${envd_locale_def}"
1406 - eend ${?} || FAIL=1
1407 - fi
1408 - fi
1409 -}
1410 -
1411 -pkg_postinst() {
1412 - newusergroup() {
1413 - enewgroup "$1"
1414 - enewuser "$1" -1 -1 -1 "$1"
1415 - }
1416 -
1417 - enewgroup input
1418 - enewgroup systemd-journal
1419 - newusergroup systemd-bus-proxy
1420 - newusergroup systemd-coredump
1421 - newusergroup systemd-journal-gateway
1422 - newusergroup systemd-journal-remote
1423 - newusergroup systemd-journal-upload
1424 - newusergroup systemd-network
1425 - newusergroup systemd-resolve
1426 - newusergroup systemd-timesync
1427 -
1428 - systemd_update_catalog
1429 -
1430 - # Keep this here in case the database format changes so it gets updated
1431 - # when required. Despite that this file is owned by sys-apps/hwids.
1432 - if has_version "sys-apps/hwids[udev]"; then
1433 - udevadm hwdb --update --root="${ROOT%/}"
1434 - fi
1435 -
1436 - udev_reload || FAIL=1
1437 -
1438 - # Bug 465468, make sure locales are respect, and ensure consistency
1439 - # between OpenRC & systemd
1440 - migrate_locale
1441 -
1442 - if [[ ${FAIL} ]]; then
1443 - eerror "One of the postinst commands failed. Please check the postinst output"
1444 - eerror "for errors. You may need to clean up your system and/or try installing"
1445 - eerror "systemd again."
1446 - eerror
1447 - fi
1448 -
1449 - if [[ $(readlink "${ROOT}"etc/resolv.conf) == */run/systemd/* ]]; then
1450 - ewarn "You should replace the resolv.conf symlink:"
1451 - ewarn "ln -snf ${ROOTPREFIX-/usr}/lib/systemd/resolv.conf ${ROOT}etc/resolv.conf"
1452 - fi
1453 -}
1454 -
1455 -pkg_prerm() {
1456 - # If removing systemd completely, remove the catalog database.
1457 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
1458 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
1459 - fi
1460 -}
1461
1462 diff --git a/sys-apps/systemd/systemd-233-r1.ebuild b/sys-apps/systemd/systemd-233-r1.ebuild
1463 deleted file mode 100644
1464 index c0a2a3751ca..00000000000
1465 --- a/sys-apps/systemd/systemd-233-r1.ebuild
1466 +++ /dev/null
1467 @@ -1,459 +0,0 @@
1468 -# Copyright 1999-2017 Gentoo Foundation
1469 -# Distributed under the terms of the GNU General Public License v2
1470 -
1471 -EAPI=6
1472 -
1473 -if [[ ${PV} == 9999 ]]; then
1474 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
1475 - inherit git-r3
1476 -else
1477 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz
1478 - !doc? ( https://dev.gentoo.org/~floppym/dist/${P}-man.tar.gz )"
1479 - KEYWORDS="alpha amd64 ~arm ~arm64 ia64 ppc ppc64 sparc x86"
1480 -fi
1481 -
1482 -PYTHON_COMPAT=( python{3_4,3_5,3_6} )
1483 -
1484 -inherit autotools bash-completion-r1 linux-info multilib-minimal pam python-any-r1 systemd toolchain-funcs udev user
1485 -
1486 -DESCRIPTION="System and service manager for Linux"
1487 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
1488 -
1489 -LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
1490 -SLOT="0/2"
1491 -IUSE="acl apparmor audit build cryptsetup curl doc elfutils +gcrypt gnuefi http
1492 - idn importd +kmod +lz4 lzma nat pam policykit
1493 - qrcode +seccomp selinux ssl sysv-utils test vanilla xkb"
1494 -
1495 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
1496 -
1497 -MINKV="3.11"
1498 -
1499 -COMMON_DEPEND=">=sys-apps/util-linux-2.27.1:0=[${MULTILIB_USEDEP}]
1500 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
1501 - !<sys-libs/glibc-2.16
1502 - acl? ( sys-apps/acl:0= )
1503 - apparmor? ( sys-libs/libapparmor:0= )
1504 - audit? ( >=sys-process/audit-2:0= )
1505 - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= )
1506 - curl? ( net-misc/curl:0= )
1507 - elfutils? ( >=dev-libs/elfutils-0.158:0= )
1508 - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
1509 - http? (
1510 - >=net-libs/libmicrohttpd-0.9.33:0=
1511 - ssl? ( >=net-libs/gnutls-3.1.4:0= )
1512 - )
1513 - idn? ( net-dns/libidn:0= )
1514 - importd? (
1515 - app-arch/bzip2:0=
1516 - sys-libs/zlib:0=
1517 - )
1518 - kmod? ( >=sys-apps/kmod-15:0= )
1519 - lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] )
1520 - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
1521 - nat? ( net-firewall/iptables:0= )
1522 - pam? ( virtual/pam:=[${MULTILIB_USEDEP}] )
1523 - qrcode? ( media-gfx/qrencode:0= )
1524 - seccomp? ( >=sys-libs/libseccomp-2.3.1:0= )
1525 - selinux? ( sys-libs/libselinux:0= )
1526 - sysv-utils? (
1527 - !sys-apps/systemd-sysv-utils
1528 - !sys-apps/sysvinit )
1529 - xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
1530 - abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
1531 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
1532 -
1533 -# baselayout-2.2 has /run
1534 -RDEPEND="${COMMON_DEPEND}
1535 - >=sys-apps/baselayout-2.2
1536 - selinux? ( sec-policy/selinux-base-policy[systemd] )
1537 - !build? ( || (
1538 - sys-apps/util-linux[kill(-)]
1539 - sys-process/procps[kill(+)]
1540 - sys-apps/coreutils[kill(-)]
1541 - ) )
1542 - !sys-auth/nss-myhostname
1543 - !<sys-kernel/dracut-044
1544 - !sys-fs/eudev
1545 - !sys-fs/udev"
1546 -
1547 -# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
1548 -PDEPEND=">=sys-apps/dbus-1.9.8[systemd]
1549 - >=sys-apps/hwids-20150417[udev]
1550 - >=sys-fs/udev-init-scripts-25
1551 - policykit? ( sys-auth/polkit )
1552 - !vanilla? ( sys-apps/gentoo-systemd-integration )"
1553 -
1554 -# Newer linux-headers needed by ia64, bug #480218
1555 -DEPEND="${COMMON_DEPEND}
1556 - app-arch/xz-utils:0
1557 - dev-util/gperf
1558 - >=dev-util/intltool-0.50
1559 - >=sys-apps/coreutils-8.16
1560 - >=sys-kernel/linux-headers-${MINKV}
1561 - virtual/pkgconfig
1562 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
1563 - test? ( sys-apps/dbus )
1564 - app-text/docbook-xml-dtd:4.2
1565 - app-text/docbook-xml-dtd:4.5
1566 - app-text/docbook-xsl-stylesheets
1567 - dev-libs/libxslt:0
1568 - doc? ( $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') )
1569 -"
1570 -
1571 -python_check_deps() {
1572 - has_version --host-root "dev-python/lxml[${PYTHON_USEDEP}]"
1573 -}
1574 -
1575 -pkg_pretend() {
1576 - if [[ ${MERGE_TYPE} != buildonly ]]; then
1577 - local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
1578 - ~CHECKPOINT_RESTORE ~DEVTMPFS ~EPOLL ~FANOTIFY ~FHANDLE
1579 - ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS
1580 - ~TIMERFD ~TMPFS_XATTR ~UNIX
1581 - ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH
1582 - ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED
1583 - ~!SYSFS_DEPRECATED_V2"
1584 -
1585 - use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
1586 - use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER"
1587 - kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
1588 - kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES"
1589 -
1590 - if linux_config_exists; then
1591 - local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
1592 - if [[ -n ${uevent_helper_path} ]] && [[ ${uevent_helper_path} != '""' ]]; then
1593 - ewarn "It's recommended to set an empty value to the following kernel config option:"
1594 - ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
1595 - fi
1596 - if linux_chkconfig_present X86; then
1597 - CONFIG_CHECK+=" ~DMIID"
1598 - fi
1599 - fi
1600 -
1601 - if kernel_is -lt ${MINKV//./ }; then
1602 - ewarn "Kernel version at least ${MINKV} required"
1603 - fi
1604 -
1605 - check_extra_config
1606 - fi
1607 -}
1608 -
1609 -pkg_setup() {
1610 - :
1611 -}
1612 -
1613 -src_unpack() {
1614 - default
1615 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
1616 -}
1617 -
1618 -src_prepare() {
1619 - # Bug 463376
1620 - sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
1621 -
1622 - local PATCHES=(
1623 - "${FILESDIR}/233-0001-Avoid-strict-DM-interface-version-dependencies-5519.patch"
1624 - )
1625 -
1626 - if ! use vanilla; then
1627 - PATCHES+=(
1628 - "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
1629 - "${FILESDIR}/228-noclean-tmp.patch"
1630 - "${FILESDIR}/233-systemd-user-pam.patch"
1631 - )
1632 - fi
1633 -
1634 - [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches )
1635 -
1636 - default
1637 -
1638 - eautoreconf
1639 -}
1640 -
1641 -src_configure() {
1642 - # Keep using the one where the rules were installed.
1643 - MY_UDEVDIR=$(get_udevdir)
1644 - # Fix systems broken by bug #509454.
1645 - [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
1646 -
1647 - # Prevent conflicts with i686 cross toolchain, bug 559726
1648 - tc-export AR CC NM OBJCOPY RANLIB
1649 -
1650 - use doc && python_setup
1651 -
1652 - multilib-minimal_src_configure
1653 -}
1654 -
1655 -multilib_src_configure() {
1656 - local myeconfargs=(
1657 - # disable -flto since it is an optimization flag
1658 - # and makes distcc less effective
1659 - cc_cv_CFLAGS__flto=no
1660 - # disable -fuse-ld=gold since Gentoo supports explicit linker
1661 - # choice and forcing gold is undesired, #539998
1662 - # ld.gold may collide with user's LDFLAGS, #545168
1663 - # ld.gold breaks sparc, #573874
1664 - cc_cv_LDFLAGS__Wl__fuse_ld_gold=no
1665 -
1666 - # Workaround for gcc-4.7, bug 554454.
1667 - cc_cv_CFLAGS__Werror_shadow=no
1668 -
1669 - # Workaround for bug 516346
1670 - --enable-dependency-tracking
1671 -
1672 - --disable-maintainer-mode
1673 - --localstatedir=/var
1674 - --with-pamlibdir=$(getpam_mod_dir)
1675 - # avoid bash-completion dep
1676 - --with-bashcompletiondir="$(get_bashcompdir)"
1677 - # make sure we get /bin:/sbin in $PATH
1678 - --enable-split-usr
1679 - # For testing.
1680 - --with-rootprefix="${ROOTPREFIX-/usr}"
1681 - --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)"
1682 - # disable sysv compatibility
1683 - --with-sysvinit-path=
1684 - --with-sysvrcnd-path=
1685 - # no deps
1686 - --enable-efi
1687 - --enable-ima
1688 -
1689 - # Optional components/dependencies
1690 - $(multilib_native_use_enable acl)
1691 - $(multilib_native_use_enable apparmor)
1692 - $(multilib_native_use_enable audit)
1693 - $(multilib_native_use_enable cryptsetup libcryptsetup)
1694 - $(multilib_native_use_enable curl libcurl)
1695 - $(multilib_native_use_enable elfutils)
1696 - $(use_enable gcrypt)
1697 - $(multilib_native_use_enable gnuefi)
1698 - --with-efi-libdir="/usr/$(get_libdir)"
1699 - $(multilib_native_use_enable http microhttpd)
1700 - $(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls)
1701 - $(multilib_native_use_enable idn libidn)
1702 - $(multilib_native_use_enable importd)
1703 - $(multilib_native_use_enable importd bzip2)
1704 - $(multilib_native_use_enable importd zlib)
1705 - $(multilib_native_use_enable kmod)
1706 - $(use_enable lz4)
1707 - $(use_enable lzma xz)
1708 - $(multilib_native_use_enable nat libiptc)
1709 - $(use_enable pam)
1710 - $(multilib_native_use_enable policykit polkit)
1711 - $(multilib_native_use_enable qrcode qrencode)
1712 - $(multilib_native_use_enable seccomp)
1713 - $(multilib_native_use_enable selinux)
1714 - $(multilib_native_use_enable test tests)
1715 - $(multilib_native_use_enable test dbus)
1716 - $(multilib_native_use_enable xkb xkbcommon)
1717 - $(multilib_native_use_with doc python)
1718 -
1719 - # hardcode a few paths to spare some deps
1720 - KILL=/bin/kill
1721 - QUOTAON=/usr/sbin/quotaon
1722 - QUOTACHECK=/usr/sbin/quotacheck
1723 -
1724 - # TODO: we may need to restrict this to gcc
1725 - EFI_CC="$(tc-getCC)"
1726 -
1727 - # dbus paths
1728 - --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
1729 - --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
1730 - --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
1731 -
1732 - --with-ntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
1733 -
1734 - # Breaks screen, tmux, etc.
1735 - --without-kill-user-processes
1736 - )
1737 -
1738 - # Work around bug 463846.
1739 - tc-export CC
1740 -
1741 - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
1742 -}
1743 -
1744 -multilib_src_compile() {
1745 - local mymakeopts=(
1746 - udevlibexecdir="${MY_UDEVDIR}"
1747 - )
1748 -
1749 - if multilib_is_native_abi; then
1750 - emake "${mymakeopts[@]}"
1751 - else
1752 - emake built-sources
1753 - local targets=(
1754 - '$(rootlib_LTLIBRARIES)'
1755 - '$(lib_LTLIBRARIES)'
1756 - '$(pamlib_LTLIBRARIES)'
1757 - '$(pkgconfiglib_DATA)'
1758 - )
1759 - echo "gentoo: ${targets[*]}" | emake "${mymakeopts[@]}" -f Makefile -f - gentoo
1760 - fi
1761 -}
1762 -
1763 -multilib_src_test() {
1764 - multilib_is_native_abi || return 0
1765 - default
1766 -}
1767 -
1768 -multilib_src_install() {
1769 - local mymakeopts=(
1770 - # automake fails with parallel libtool relinking
1771 - # https://bugs.gentoo.org/show_bug.cgi?id=491398
1772 - -j1
1773 -
1774 - udevlibexecdir="${MY_UDEVDIR}"
1775 - dist_udevhwdb_DATA=
1776 - DESTDIR="${D}"
1777 - )
1778 -
1779 - if multilib_is_native_abi; then
1780 - emake "${mymakeopts[@]}" install
1781 - else
1782 - mymakeopts+=(
1783 - install-rootlibLTLIBRARIES
1784 - install-libLTLIBRARIES
1785 - install-pamlibLTLIBRARIES
1786 - install-pkgconfiglibDATA
1787 - install-includeHEADERS
1788 - install-pkgincludeHEADERS
1789 - )
1790 -
1791 - emake "${mymakeopts[@]}"
1792 - fi
1793 -}
1794 -
1795 -multilib_src_install_all() {
1796 - prune_libtool_files --modules
1797 - einstalldocs
1798 - dodoc "${FILESDIR}"/nsswitch.conf
1799 -
1800 - if [[ ${PV} != 9999 ]]; then
1801 - use doc || doman "${WORKDIR}"/man/systemd.{directives,index}.7
1802 - fi
1803 -
1804 - if use sysv-utils; then
1805 - for app in halt poweroff reboot runlevel shutdown telinit; do
1806 - dosym "..${ROOTPREFIX-/usr}/bin/systemctl" /sbin/${app}
1807 - done
1808 - dosym "..${ROOTPREFIX-/usr}/lib/systemd/systemd" /sbin/init
1809 - else
1810 - # we just keep sysvinit tools, so no need for the mans
1811 - rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \
1812 - || die
1813 - rm "${D}"/usr/share/man/man1/init.1 || die
1814 - fi
1815 -
1816 - # Preserve empty dirs in /etc & /var, bug #437008
1817 - keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \
1818 - /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \
1819 - /var/log/journal/remote
1820 -
1821 - # Symlink /etc/sysctl.conf for easy migration.
1822 - dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf
1823 -
1824 - # If we install these symlinks, there is no way for the sysadmin to remove them
1825 - # permanently.
1826 - rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
1827 - rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
1828 - rm -r "${D}"/etc/systemd/system/network-online.target.wants || die
1829 - rm -r "${D}"/etc/systemd/system/sockets.target.wants || die
1830 - rm -r "${D}"/etc/systemd/system/sysinit.target.wants || die
1831 -}
1832 -
1833 -migrate_locale() {
1834 - local envd_locale_def="${EROOT%/}/etc/env.d/02locale"
1835 - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale )
1836 - local locale_conf="${EROOT%/}/etc/locale.conf"
1837 -
1838 - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then
1839 - # If locale.conf does not exist...
1840 - if [[ -e ${envd_locale} ]]; then
1841 - # ...either copy env.d/??locale if there's one
1842 - ebegin "Moving ${envd_locale} to ${locale_conf}"
1843 - mv "${envd_locale}" "${locale_conf}"
1844 - eend ${?} || FAIL=1
1845 - else
1846 - # ...or create a dummy default
1847 - ebegin "Creating ${locale_conf}"
1848 - cat > "${locale_conf}" <<-EOF
1849 - # This file has been created by the sys-apps/systemd ebuild.
1850 - # See locale.conf(5) and localectl(1).
1851 -
1852 - # LANG=${LANG}
1853 - EOF
1854 - eend ${?} || FAIL=1
1855 - fi
1856 - fi
1857 -
1858 - if [[ ! -L ${envd_locale} ]]; then
1859 - # now, if env.d/??locale is not a symlink (to locale.conf)...
1860 - if [[ -e ${envd_locale} ]]; then
1861 - # ...warn the user that he has duplicate locale settings
1862 - ewarn
1863 - ewarn "To ensure consistent behavior, you should replace ${envd_locale}"
1864 - ewarn "with a symlink to ${locale_conf}. Please migrate your settings"
1865 - ewarn "and create the symlink with the following command:"
1866 - ewarn "ln -s -n -f ../locale.conf ${envd_locale}"
1867 - ewarn
1868 - else
1869 - # ...or just create the symlink if there's nothing here
1870 - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink"
1871 - ln -n -s ../locale.conf "${envd_locale_def}"
1872 - eend ${?} || FAIL=1
1873 - fi
1874 - fi
1875 -}
1876 -
1877 -pkg_postinst() {
1878 - newusergroup() {
1879 - enewgroup "$1"
1880 - enewuser "$1" -1 -1 -1 "$1"
1881 - }
1882 -
1883 - enewgroup input
1884 - enewgroup systemd-journal
1885 - newusergroup systemd-bus-proxy
1886 - newusergroup systemd-coredump
1887 - newusergroup systemd-journal-gateway
1888 - newusergroup systemd-journal-remote
1889 - newusergroup systemd-journal-upload
1890 - newusergroup systemd-network
1891 - newusergroup systemd-resolve
1892 - newusergroup systemd-timesync
1893 -
1894 - systemd_update_catalog
1895 -
1896 - # Keep this here in case the database format changes so it gets updated
1897 - # when required. Despite that this file is owned by sys-apps/hwids.
1898 - if has_version "sys-apps/hwids[udev]"; then
1899 - udevadm hwdb --update --root="${ROOT%/}"
1900 - fi
1901 -
1902 - udev_reload || FAIL=1
1903 -
1904 - # Bug 465468, make sure locales are respect, and ensure consistency
1905 - # between OpenRC & systemd
1906 - migrate_locale
1907 -
1908 - if [[ ${FAIL} ]]; then
1909 - eerror "One of the postinst commands failed. Please check the postinst output"
1910 - eerror "for errors. You may need to clean up your system and/or try installing"
1911 - eerror "systemd again."
1912 - eerror
1913 - fi
1914 -
1915 - if [[ $(readlink "${ROOT}"etc/resolv.conf) == */run/systemd/* ]]; then
1916 - ewarn "You should replace the resolv.conf symlink:"
1917 - ewarn "ln -snf ${ROOTPREFIX-/usr}/lib/systemd/resolv.conf ${ROOT}etc/resolv.conf"
1918 - fi
1919 -}
1920 -
1921 -pkg_prerm() {
1922 - # If removing systemd completely, remove the catalog database.
1923 - if [[ ! ${REPLACED_BY_VERSION} ]]; then
1924 - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database
1925 - fi
1926 -}