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