1 |
commit: f87ac1e6d87881c8458bb06b55e116e12107847d |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 2 03:21:59 2017 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 2 03:21:59 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f87ac1e6 |
7 |
|
8 |
sys-apps/systemd: bump to 233 |
9 |
|
10 |
Package-Manager: Portage-2.3.3_p79, Repoman-2.3.1_p72 |
11 |
|
12 |
sys-apps/systemd/Manifest | 2 + |
13 |
sys-apps/systemd/systemd-233.ebuild | 455 ++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 457 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/systemd/Manifest b/sys-apps/systemd/Manifest |
17 |
index 7d29069209c..5c3e6c675d5 100644 |
18 |
--- a/sys-apps/systemd/Manifest |
19 |
+++ b/sys-apps/systemd/Manifest |
20 |
@@ -3,3 +3,5 @@ DIST systemd-231-man.tar.gz 29466 SHA256 aecf91c13333e1791d026b82360d55b4783f8d2 |
21 |
DIST systemd-231.tar.gz 4381464 SHA256 899733ad6c157cedbb89aec4efe3bc824dcfd65a1d6f6bebc7b043f7924e39b4 SHA512 199fa33a0494d1d15f7fe3c796fe14913ad386766571d4d3fbb1cb1c446e04f6d06a965213be4c594a7183e810fc2fd4804fe14f64f21b0a1278b717889811c6 WHIRLPOOL 7779291e9fb9873cb1773b8583cf6d4b7dec837363ea89c4a73c1e397a76752b66f8b57d8fc4d9cef768cc1855b5e325ad88a8a69eb5380aa924e0a6dead41b1 |
22 |
DIST systemd-232-man.tar.gz 30579 SHA256 23fee775eece788322841e61d6b3bd8c0c13f54a94a40124af816b27cd9f7b69 SHA512 533ab1a41533b080aad2de7f8579b9b97081668e60cb94fc305316a43e9b0ebb85a959199e0d07278010e437e254b7eebc35f76aabb4bf3cb39a70dcb834a06f WHIRLPOOL 0c13be0a8546f720e72977549fc49ab000377e630856eb5541b948c8105cf4994bba6e694297f3c5cff596293e2a0f857f1346964c6878b32c14fb83a3ce9335 |
23 |
DIST systemd-232.tar.gz 4529048 SHA256 1172c7c7d5d72fbded53186e7599d5272231f04cc8b72f9a0fb2c5c20dfc4880 SHA512 5dbe52f655ec2901b1bfbb1256f83ba26bc82c13097ac9a82e4fbb97886551530f9888c369592f1b410cfff40d6d127b985533a3e29cfab5b30d18739ee5dcb1 WHIRLPOOL f2a1499584c5b5c4d9e945e45ef5e0eef2e8be77acdbd7b3b29a8c8b62dc7a10c162a856df7107c19e2eb19e63bc43a33433686472ca30909237981683cbe980 |
24 |
+DIST systemd-233-man.tar.gz 31386 SHA256 825e62eb82c4e23997061fc8f56f7ec9bb1e6ac1111d279c76c926cc2bfbf1dc SHA512 cc5215d3590ffc3c9203a64c14d6adeb0148c421c1396b8c1e43dcb58763b687ce99bdee327dd8a00abab7198171e73b22109a3f2032e4cec6adf2dcc85acf40 WHIRLPOOL ff1f36beff377f675047271df38503e8b71d615ea73c5fdfebf465edaf1fe29b4f89e3194d65cdf84eec9b7c3156de597627fdaffa4b86018520aaa127a7a159 |
25 |
+DIST systemd-233.tar.gz 4660737 SHA256 8b3e99da3d4164b66581830a7f2436c0c8fe697b5fbdc3927bdb960646be0083 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e WHIRLPOOL ce19f6a546b8f899cfa952e49d47f063fd29186be4a53391bc30ea2c487eb2c140a74ad843a1dc499bb61bba3e9ca055613852291e38b85af5d79c59409dc176 |
26 |
|
27 |
diff --git a/sys-apps/systemd/systemd-233.ebuild b/sys-apps/systemd/systemd-233.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..76a3dd24f6d |
30 |
--- /dev/null |
31 |
+++ b/sys-apps/systemd/systemd-233.ebuild |
32 |
@@ -0,0 +1,455 @@ |
33 |
+# Copyright 1999-2017 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+if [[ ${PV} == 9999 ]]; then |
39 |
+ EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
40 |
+ inherit git-r3 |
41 |
+else |
42 |
+ SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz |
43 |
+ !doc? ( https://dev.gentoo.org/~floppym/dist/${P}-man.tar.gz )" |
44 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
45 |
+fi |
46 |
+ |
47 |
+PYTHON_COMPAT=( python{3_4,3_5,3_6} ) |
48 |
+ |
49 |
+inherit autotools bash-completion-r1 linux-info multilib-minimal pam python-any-r1 systemd toolchain-funcs udev user |
50 |
+ |
51 |
+DESCRIPTION="System and service manager for Linux" |
52 |
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
53 |
+ |
54 |
+LICENSE="GPL-2 LGPL-2.1 MIT public-domain" |
55 |
+SLOT="0/2" |
56 |
+IUSE="acl apparmor audit build cryptsetup curl doc elfutils +gcrypt gnuefi http |
57 |
+ idn importd +kmod +lz4 lzma nat pam policykit |
58 |
+ qrcode +seccomp selinux ssl sysv-utils test vanilla xkb" |
59 |
+ |
60 |
+REQUIRED_USE="importd? ( curl gcrypt lzma )" |
61 |
+ |
62 |
+MINKV="3.11" |
63 |
+ |
64 |
+COMMON_DEPEND=">=sys-apps/util-linux-2.27.1:0=[${MULTILIB_USEDEP}] |
65 |
+ sys-libs/libcap:0=[${MULTILIB_USEDEP}] |
66 |
+ !<sys-libs/glibc-2.16 |
67 |
+ acl? ( sys-apps/acl:0= ) |
68 |
+ apparmor? ( sys-libs/libapparmor:0= ) |
69 |
+ audit? ( >=sys-process/audit-2:0= ) |
70 |
+ cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= ) |
71 |
+ curl? ( net-misc/curl:0= ) |
72 |
+ elfutils? ( >=dev-libs/elfutils-0.158:0= ) |
73 |
+ gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) |
74 |
+ http? ( |
75 |
+ >=net-libs/libmicrohttpd-0.9.33:0= |
76 |
+ ssl? ( >=net-libs/gnutls-3.1.4:0= ) |
77 |
+ ) |
78 |
+ idn? ( net-dns/libidn:0= ) |
79 |
+ importd? ( |
80 |
+ app-arch/bzip2:0= |
81 |
+ sys-libs/zlib:0= |
82 |
+ ) |
83 |
+ kmod? ( >=sys-apps/kmod-15:0= ) |
84 |
+ lz4? ( >=app-arch/lz4-0_p131:0=[${MULTILIB_USEDEP}] ) |
85 |
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) |
86 |
+ nat? ( net-firewall/iptables:0= ) |
87 |
+ pam? ( virtual/pam:=[${MULTILIB_USEDEP}] ) |
88 |
+ qrcode? ( media-gfx/qrencode:0= ) |
89 |
+ seccomp? ( >=sys-libs/libseccomp-2.3.1:0= ) |
90 |
+ selinux? ( sys-libs/libselinux:0= ) |
91 |
+ sysv-utils? ( |
92 |
+ !sys-apps/systemd-sysv-utils |
93 |
+ !sys-apps/sysvinit ) |
94 |
+ xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= ) |
95 |
+ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 |
96 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" |
97 |
+ |
98 |
+# baselayout-2.2 has /run |
99 |
+RDEPEND="${COMMON_DEPEND} |
100 |
+ >=sys-apps/baselayout-2.2 |
101 |
+ selinux? ( sec-policy/selinux-base-policy[systemd] ) |
102 |
+ !build? ( || ( |
103 |
+ sys-apps/util-linux[kill(-)] |
104 |
+ sys-process/procps[kill(+)] |
105 |
+ sys-apps/coreutils[kill(-)] |
106 |
+ ) ) |
107 |
+ !sys-auth/nss-myhostname |
108 |
+ !<sys-kernel/dracut-044 |
109 |
+ !sys-fs/eudev |
110 |
+ !sys-fs/udev" |
111 |
+ |
112 |
+# sys-apps/dbus: the daemon only (+ build-time lib dep for tests) |
113 |
+PDEPEND=">=sys-apps/dbus-1.9.8[systemd] |
114 |
+ >=sys-apps/hwids-20150417[udev] |
115 |
+ >=sys-fs/udev-init-scripts-25 |
116 |
+ policykit? ( sys-auth/polkit ) |
117 |
+ !vanilla? ( sys-apps/gentoo-systemd-integration )" |
118 |
+ |
119 |
+# Newer linux-headers needed by ia64, bug #480218 |
120 |
+DEPEND="${COMMON_DEPEND} |
121 |
+ app-arch/xz-utils:0 |
122 |
+ dev-util/gperf |
123 |
+ >=dev-util/intltool-0.50 |
124 |
+ >=sys-apps/coreutils-8.16 |
125 |
+ >=sys-kernel/linux-headers-${MINKV} |
126 |
+ virtual/pkgconfig |
127 |
+ gnuefi? ( >=sys-boot/gnu-efi-3.0.2 ) |
128 |
+ test? ( sys-apps/dbus ) |
129 |
+ app-text/docbook-xml-dtd:4.2 |
130 |
+ app-text/docbook-xml-dtd:4.5 |
131 |
+ app-text/docbook-xsl-stylesheets |
132 |
+ dev-libs/libxslt:0 |
133 |
+ doc? ( $(python_gen_any_dep 'dev-python/lxml[${PYTHON_USEDEP}]') ) |
134 |
+" |
135 |
+ |
136 |
+python_check_deps() { |
137 |
+ has_version --host-root "dev-python/lxml[${PYTHON_USEDEP}]" |
138 |
+} |
139 |
+ |
140 |
+pkg_pretend() { |
141 |
+ local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS |
142 |
+ ~CHECKPOINT_RESTORE ~DEVTMPFS ~DMIID ~EPOLL ~FANOTIFY ~FHANDLE |
143 |
+ ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS ~SIGNALFD ~SYSFS |
144 |
+ ~TIMERFD ~TMPFS_XATTR ~UNIX |
145 |
+ ~CRYPTO_HMAC ~CRYPTO_SHA256 ~CRYPTO_USER_API_HASH |
146 |
+ ~!FW_LOADER_USER_HELPER ~!GRKERNSEC_PROC ~!IDE ~!SYSFS_DEPRECATED |
147 |
+ ~!SYSFS_DEPRECATED_V2" |
148 |
+ |
149 |
+ use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" |
150 |
+ use seccomp && CONFIG_CHECK+=" ~SECCOMP ~SECCOMP_FILTER" |
151 |
+ kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG" |
152 |
+ kernel_is -lt 4 7 && CONFIG_CHECK+=" ~DEVPTS_MULTIPLE_INSTANCES" |
153 |
+ |
154 |
+ if linux_config_exists; then |
155 |
+ local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH) |
156 |
+ if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then |
157 |
+ ewarn "It's recommended to set an empty value to the following kernel config option:" |
158 |
+ ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}" |
159 |
+ fi |
160 |
+ fi |
161 |
+ |
162 |
+ if [[ ${MERGE_TYPE} != buildonly ]]; then |
163 |
+ if kernel_is -lt ${MINKV//./ }; then |
164 |
+ ewarn "Kernel version at least ${MINKV} required" |
165 |
+ fi |
166 |
+ |
167 |
+ check_extra_config |
168 |
+ fi |
169 |
+} |
170 |
+ |
171 |
+pkg_setup() { |
172 |
+ : |
173 |
+} |
174 |
+ |
175 |
+src_unpack() { |
176 |
+ default |
177 |
+ [[ ${PV} != 9999 ]] || git-r3_src_unpack |
178 |
+} |
179 |
+ |
180 |
+src_prepare() { |
181 |
+ # Bug 463376 |
182 |
+ sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die |
183 |
+ |
184 |
+ local PATCHES=( |
185 |
+ ) |
186 |
+ |
187 |
+ if ! use vanilla; then |
188 |
+ PATCHES+=( |
189 |
+ "${FILESDIR}/218-Dont-enable-audit-by-default.patch" |
190 |
+ "${FILESDIR}/228-noclean-tmp.patch" |
191 |
+ "${FILESDIR}/233-systemd-user-pam.patch" |
192 |
+ ) |
193 |
+ fi |
194 |
+ |
195 |
+ [[ -d "${WORKDIR}"/patches ]] && PATCHES+=( "${WORKDIR}"/patches ) |
196 |
+ |
197 |
+ default |
198 |
+ |
199 |
+ eautoreconf |
200 |
+} |
201 |
+ |
202 |
+src_configure() { |
203 |
+ # Keep using the one where the rules were installed. |
204 |
+ MY_UDEVDIR=$(get_udevdir) |
205 |
+ # Fix systems broken by bug #509454. |
206 |
+ [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev |
207 |
+ |
208 |
+ # Prevent conflicts with i686 cross toolchain, bug 559726 |
209 |
+ tc-export AR CC NM OBJCOPY RANLIB |
210 |
+ |
211 |
+ use doc && python_setup |
212 |
+ |
213 |
+ multilib-minimal_src_configure |
214 |
+} |
215 |
+ |
216 |
+multilib_src_configure() { |
217 |
+ local myeconfargs=( |
218 |
+ # disable -flto since it is an optimization flag |
219 |
+ # and makes distcc less effective |
220 |
+ cc_cv_CFLAGS__flto=no |
221 |
+ # disable -fuse-ld=gold since Gentoo supports explicit linker |
222 |
+ # choice and forcing gold is undesired, #539998 |
223 |
+ # ld.gold may collide with user's LDFLAGS, #545168 |
224 |
+ # ld.gold breaks sparc, #573874 |
225 |
+ cc_cv_LDFLAGS__Wl__fuse_ld_gold=no |
226 |
+ |
227 |
+ # Workaround for gcc-4.7, bug 554454. |
228 |
+ cc_cv_CFLAGS__Werror_shadow=no |
229 |
+ |
230 |
+ # Workaround for bug 516346 |
231 |
+ --enable-dependency-tracking |
232 |
+ |
233 |
+ --disable-maintainer-mode |
234 |
+ --localstatedir=/var |
235 |
+ --with-pamlibdir=$(getpam_mod_dir) |
236 |
+ # avoid bash-completion dep |
237 |
+ --with-bashcompletiondir="$(get_bashcompdir)" |
238 |
+ # make sure we get /bin:/sbin in $PATH |
239 |
+ --enable-split-usr |
240 |
+ # For testing. |
241 |
+ --with-rootprefix="${ROOTPREFIX-/usr}" |
242 |
+ --with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)" |
243 |
+ # disable sysv compatibility |
244 |
+ --with-sysvinit-path= |
245 |
+ --with-sysvrcnd-path= |
246 |
+ # no deps |
247 |
+ --enable-efi |
248 |
+ --enable-ima |
249 |
+ |
250 |
+ # Optional components/dependencies |
251 |
+ $(multilib_native_use_enable acl) |
252 |
+ $(multilib_native_use_enable apparmor) |
253 |
+ $(multilib_native_use_enable audit) |
254 |
+ $(multilib_native_use_enable cryptsetup libcryptsetup) |
255 |
+ $(multilib_native_use_enable curl libcurl) |
256 |
+ $(multilib_native_use_enable elfutils) |
257 |
+ $(use_enable gcrypt) |
258 |
+ $(multilib_native_use_enable gnuefi) |
259 |
+ --with-efi-libdir="/usr/$(get_libdir)" |
260 |
+ $(multilib_native_use_enable http microhttpd) |
261 |
+ $(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls) |
262 |
+ $(multilib_native_use_enable idn libidn) |
263 |
+ $(multilib_native_use_enable importd) |
264 |
+ $(multilib_native_use_enable importd bzip2) |
265 |
+ $(multilib_native_use_enable importd zlib) |
266 |
+ $(multilib_native_use_enable kmod) |
267 |
+ $(use_enable lz4) |
268 |
+ $(use_enable lzma xz) |
269 |
+ $(multilib_native_use_enable nat libiptc) |
270 |
+ $(use_enable pam) |
271 |
+ $(multilib_native_use_enable policykit polkit) |
272 |
+ $(multilib_native_use_enable qrcode qrencode) |
273 |
+ $(multilib_native_use_enable seccomp) |
274 |
+ $(multilib_native_use_enable selinux) |
275 |
+ $(multilib_native_use_enable test tests) |
276 |
+ $(multilib_native_use_enable test dbus) |
277 |
+ $(multilib_native_use_enable xkb xkbcommon) |
278 |
+ $(multilib_native_use_with doc python) |
279 |
+ |
280 |
+ # hardcode a few paths to spare some deps |
281 |
+ KILL=/bin/kill |
282 |
+ QUOTAON=/usr/sbin/quotaon |
283 |
+ QUOTACHECK=/usr/sbin/quotacheck |
284 |
+ |
285 |
+ # TODO: we may need to restrict this to gcc |
286 |
+ EFI_CC="$(tc-getCC)" |
287 |
+ |
288 |
+ # dbus paths |
289 |
+ --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d" |
290 |
+ --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services" |
291 |
+ --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services" |
292 |
+ |
293 |
+ --with-ntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org" |
294 |
+ |
295 |
+ # Breaks screen, tmux, etc. |
296 |
+ --without-kill-user-processes |
297 |
+ ) |
298 |
+ |
299 |
+ # Work around bug 463846. |
300 |
+ tc-export CC |
301 |
+ |
302 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
303 |
+} |
304 |
+ |
305 |
+multilib_src_compile() { |
306 |
+ local mymakeopts=( |
307 |
+ udevlibexecdir="${MY_UDEVDIR}" |
308 |
+ ) |
309 |
+ |
310 |
+ if multilib_is_native_abi; then |
311 |
+ emake "${mymakeopts[@]}" |
312 |
+ else |
313 |
+ emake built-sources |
314 |
+ local targets=( |
315 |
+ '$(rootlib_LTLIBRARIES)' |
316 |
+ '$(lib_LTLIBRARIES)' |
317 |
+ '$(pamlib_LTLIBRARIES)' |
318 |
+ '$(pkgconfiglib_DATA)' |
319 |
+ ) |
320 |
+ echo "gentoo: ${targets[*]}" | emake "${mymakeopts[@]}" -f Makefile -f - gentoo |
321 |
+ fi |
322 |
+} |
323 |
+ |
324 |
+multilib_src_test() { |
325 |
+ multilib_is_native_abi || return 0 |
326 |
+ default |
327 |
+} |
328 |
+ |
329 |
+multilib_src_install() { |
330 |
+ local mymakeopts=( |
331 |
+ # automake fails with parallel libtool relinking |
332 |
+ # https://bugs.gentoo.org/show_bug.cgi?id=491398 |
333 |
+ -j1 |
334 |
+ |
335 |
+ udevlibexecdir="${MY_UDEVDIR}" |
336 |
+ dist_udevhwdb_DATA= |
337 |
+ DESTDIR="${D}" |
338 |
+ ) |
339 |
+ |
340 |
+ if multilib_is_native_abi; then |
341 |
+ emake "${mymakeopts[@]}" install |
342 |
+ else |
343 |
+ mymakeopts+=( |
344 |
+ install-rootlibLTLIBRARIES |
345 |
+ install-libLTLIBRARIES |
346 |
+ install-pamlibLTLIBRARIES |
347 |
+ install-pkgconfiglibDATA |
348 |
+ install-includeHEADERS |
349 |
+ install-pkgincludeHEADERS |
350 |
+ ) |
351 |
+ |
352 |
+ emake "${mymakeopts[@]}" |
353 |
+ fi |
354 |
+} |
355 |
+ |
356 |
+multilib_src_install_all() { |
357 |
+ prune_libtool_files --modules |
358 |
+ einstalldocs |
359 |
+ dodoc "${FILESDIR}"/nsswitch.conf |
360 |
+ |
361 |
+ if [[ ${PV} != 9999 ]]; then |
362 |
+ use doc || doman "${WORKDIR}"/man/systemd.{directives,index}.7 |
363 |
+ fi |
364 |
+ |
365 |
+ if use sysv-utils; then |
366 |
+ for app in halt poweroff reboot runlevel shutdown telinit; do |
367 |
+ dosym "..${ROOTPREFIX-/usr}/bin/systemctl" /sbin/${app} |
368 |
+ done |
369 |
+ dosym "..${ROOTPREFIX-/usr}/lib/systemd/systemd" /sbin/init |
370 |
+ else |
371 |
+ # we just keep sysvinit tools, so no need for the mans |
372 |
+ rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \ |
373 |
+ || die |
374 |
+ rm "${D}"/usr/share/man/man1/init.1 || die |
375 |
+ fi |
376 |
+ |
377 |
+ # Preserve empty dirs in /etc & /var, bug #437008 |
378 |
+ keepdir /etc/binfmt.d /etc/modules-load.d /etc/tmpfiles.d \ |
379 |
+ /etc/systemd/ntp-units.d /etc/systemd/user /var/lib/systemd \ |
380 |
+ /var/log/journal/remote |
381 |
+ |
382 |
+ # Symlink /etc/sysctl.conf for easy migration. |
383 |
+ dosym ../sysctl.conf /etc/sysctl.d/99-sysctl.conf |
384 |
+ |
385 |
+ # If we install these symlinks, there is no way for the sysadmin to remove them |
386 |
+ # permanently. |
387 |
+ rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die |
388 |
+ rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die |
389 |
+ rm -r "${D}"/etc/systemd/system/network-online.target.wants || die |
390 |
+ rm -r "${D}"/etc/systemd/system/sockets.target.wants || die |
391 |
+ rm -r "${D}"/etc/systemd/system/sysinit.target.wants || die |
392 |
+} |
393 |
+ |
394 |
+migrate_locale() { |
395 |
+ local envd_locale_def="${EROOT%/}/etc/env.d/02locale" |
396 |
+ local envd_locale=( "${EROOT%/}"/etc/env.d/??locale ) |
397 |
+ local locale_conf="${EROOT%/}/etc/locale.conf" |
398 |
+ |
399 |
+ if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then |
400 |
+ # If locale.conf does not exist... |
401 |
+ if [[ -e ${envd_locale} ]]; then |
402 |
+ # ...either copy env.d/??locale if there's one |
403 |
+ ebegin "Moving ${envd_locale} to ${locale_conf}" |
404 |
+ mv "${envd_locale}" "${locale_conf}" |
405 |
+ eend ${?} || FAIL=1 |
406 |
+ else |
407 |
+ # ...or create a dummy default |
408 |
+ ebegin "Creating ${locale_conf}" |
409 |
+ cat > "${locale_conf}" <<-EOF |
410 |
+ # This file has been created by the sys-apps/systemd ebuild. |
411 |
+ # See locale.conf(5) and localectl(1). |
412 |
+ |
413 |
+ # LANG=${LANG} |
414 |
+ EOF |
415 |
+ eend ${?} || FAIL=1 |
416 |
+ fi |
417 |
+ fi |
418 |
+ |
419 |
+ if [[ ! -L ${envd_locale} ]]; then |
420 |
+ # now, if env.d/??locale is not a symlink (to locale.conf)... |
421 |
+ if [[ -e ${envd_locale} ]]; then |
422 |
+ # ...warn the user that he has duplicate locale settings |
423 |
+ ewarn |
424 |
+ ewarn "To ensure consistent behavior, you should replace ${envd_locale}" |
425 |
+ ewarn "with a symlink to ${locale_conf}. Please migrate your settings" |
426 |
+ ewarn "and create the symlink with the following command:" |
427 |
+ ewarn "ln -s -n -f ../locale.conf ${envd_locale}" |
428 |
+ ewarn |
429 |
+ else |
430 |
+ # ...or just create the symlink if there's nothing here |
431 |
+ ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" |
432 |
+ ln -n -s ../locale.conf "${envd_locale_def}" |
433 |
+ eend ${?} || FAIL=1 |
434 |
+ fi |
435 |
+ fi |
436 |
+} |
437 |
+ |
438 |
+pkg_postinst() { |
439 |
+ newusergroup() { |
440 |
+ enewgroup "$1" |
441 |
+ enewuser "$1" -1 -1 -1 "$1" |
442 |
+ } |
443 |
+ |
444 |
+ enewgroup input |
445 |
+ enewgroup systemd-journal |
446 |
+ newusergroup systemd-bus-proxy |
447 |
+ newusergroup systemd-coredump |
448 |
+ newusergroup systemd-journal-gateway |
449 |
+ newusergroup systemd-journal-remote |
450 |
+ newusergroup systemd-journal-upload |
451 |
+ newusergroup systemd-network |
452 |
+ newusergroup systemd-resolve |
453 |
+ newusergroup systemd-timesync |
454 |
+ |
455 |
+ systemd_update_catalog |
456 |
+ |
457 |
+ # Keep this here in case the database format changes so it gets updated |
458 |
+ # when required. Despite that this file is owned by sys-apps/hwids. |
459 |
+ if has_version "sys-apps/hwids[udev]"; then |
460 |
+ udevadm hwdb --update --root="${ROOT%/}" |
461 |
+ fi |
462 |
+ |
463 |
+ udev_reload || FAIL=1 |
464 |
+ |
465 |
+ # Bug 465468, make sure locales are respect, and ensure consistency |
466 |
+ # between OpenRC & systemd |
467 |
+ migrate_locale |
468 |
+ |
469 |
+ if [[ ${FAIL} ]]; then |
470 |
+ eerror "One of the postinst commands failed. Please check the postinst output" |
471 |
+ eerror "for errors. You may need to clean up your system and/or try installing" |
472 |
+ eerror "systemd again." |
473 |
+ eerror |
474 |
+ fi |
475 |
+ |
476 |
+ if [[ $(readlink "${ROOT}"etc/resolv.conf) == */run/systemd/* ]]; then |
477 |
+ ewarn "You should replace the resolv.conf symlink:" |
478 |
+ ewarn "ln -snf ${ROOTPREFIX-/usr}/lib/systemd/resolv.conf ${ROOT}etc/resolv.conf" |
479 |
+ fi |
480 |
+} |
481 |
+ |
482 |
+pkg_prerm() { |
483 |
+ # If removing systemd completely, remove the catalog database. |
484 |
+ if [[ ! ${REPLACED_BY_VERSION} ]]; then |
485 |
+ rm -f -v "${EROOT}"/var/lib/systemd/catalog/database |
486 |
+ fi |
487 |
+} |