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/, sys-apps/systemd/files/
Date: Fri, 25 Sep 2015 14:52:32
Message-Id: 1443192693.884081f76bfb615b4ff37f2cbebe02195a94d6d6.floppym@gentoo
1 commit: 884081f76bfb615b4ff37f2cbebe02195a94d6d6
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 25 14:49:55 2015 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 25 14:51:33 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=884081f7
7
8 sys-apps/systemd: Disable cleaning of /tmp and /var/tmp
9
10 Bug: https://bugs.gentoo.org/490676
11
12 Package-Manager: portage-2.2.21_p119
13
14 sys-apps/systemd/files/218-noclean-tmp.patch | 28 +++++
15 sys-apps/systemd/files/226-noclean-tmp.patch | 28 +++++
16 .../{systemd-9999.ebuild => systemd-218-r4.ebuild} | 135 ++++++++++-----------
17 .../{systemd-9999.ebuild => systemd-226-r1.ebuild} | 3 +-
18 sys-apps/systemd/systemd-9999.ebuild | 1 +
19 5 files changed, 121 insertions(+), 74 deletions(-)
20
21 diff --git a/sys-apps/systemd/files/218-noclean-tmp.patch b/sys-apps/systemd/files/218-noclean-tmp.patch
22 new file mode 100644
23 index 0000000..5dcc4b9
24 --- /dev/null
25 +++ b/sys-apps/systemd/files/218-noclean-tmp.patch
26 @@ -0,0 +1,28 @@
27 +From 63e5f76a91e2401e8a6227d0d8ae5e75dd2213b0 Mon Sep 17 00:00:00 2001
28 +From: Mike Gilbert <floppym@g.o>
29 +Date: Fri, 25 Sep 2015 10:26:18 -0400
30 +Subject: [PATCH] tmpfiles: Disable cleaning of /tmp and /var/tmp
31 +
32 +Bug: https://bugs.gentoo.org/490676
33 +---
34 + tmpfiles.d/tmp.conf | 4 ++--
35 + 1 file changed, 2 insertions(+), 2 deletions(-)
36 +
37 +diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf
38 +index b80dab4..241fad5 100644
39 +--- a/tmpfiles.d/tmp.conf
40 ++++ b/tmpfiles.d/tmp.conf
41 +@@ -8,8 +8,8 @@
42 + # See tmpfiles.d(5) for details
43 +
44 + # Clear tmp directories separately, to make them easier to override
45 +-d /tmp 1777 root root 10d
46 +-d /var/tmp 1777 root root 30d
47 ++v /tmp 1777 root root
48 ++v /var/tmp 1777 root root
49 +
50 + # Exclude namespace mountpoints created with PrivateTmp=yes
51 + x /tmp/systemd-private-%b-*
52 +--
53 +2.5.3
54 +
55
56 diff --git a/sys-apps/systemd/files/226-noclean-tmp.patch b/sys-apps/systemd/files/226-noclean-tmp.patch
57 new file mode 100644
58 index 0000000..290b1bd
59 --- /dev/null
60 +++ b/sys-apps/systemd/files/226-noclean-tmp.patch
61 @@ -0,0 +1,28 @@
62 +From 3a44775e2618896526d093f7142934205e46d33a Mon Sep 17 00:00:00 2001
63 +From: Mike Gilbert <floppym@g.o>
64 +Date: Fri, 25 Sep 2015 10:26:18 -0400
65 +Subject: [PATCH] tmpfiles: Disable cleaning of /tmp and /var/tmp
66 +
67 +Bug: https://bugs.gentoo.org/490676
68 +---
69 + tmpfiles.d/tmp.conf | 4 ++--
70 + 1 file changed, 2 insertions(+), 2 deletions(-)
71 +
72 +diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf
73 +index ffdd82f..241fad5 100644
74 +--- a/tmpfiles.d/tmp.conf
75 ++++ b/tmpfiles.d/tmp.conf
76 +@@ -8,8 +8,8 @@
77 + # See tmpfiles.d(5) for details
78 +
79 + # Clear tmp directories separately, to make them easier to override
80 +-v /tmp 1777 root root 10d
81 +-v /var/tmp 1777 root root 30d
82 ++v /tmp 1777 root root
83 ++v /var/tmp 1777 root root
84 +
85 + # Exclude namespace mountpoints created with PrivateTmp=yes
86 + x /tmp/systemd-private-%b-*
87 +--
88 +2.5.3
89 +
90
91 diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-218-r4.ebuild
92 similarity index 84%
93 copy from sys-apps/systemd/systemd-9999.ebuild
94 copy to sys-apps/systemd/systemd-218-r4.ebuild
95 index 2ec9957..7be421d 100644
96 --- a/sys-apps/systemd/systemd-9999.ebuild
97 +++ b/sys-apps/systemd/systemd-218-r4.ebuild
98 @@ -4,32 +4,27 @@
99
100 EAPI=5
101
102 -if [[ ${PV} == 9999 ]]; then
103 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
104 - inherit git-r3
105 -else
106 - SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> ${P}.tar.gz"
107 - KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
108 -fi
109 -
110 -inherit autotools bash-completion-r1 linux-info multilib \
111 - multilib-minimal pam systemd toolchain-funcs udev user
112 +AUTOTOOLS_PRUNE_LIBTOOL_FILES=all
113 +PYTHON_COMPAT=( python{2_7,3_3,3_4} )
114 +inherit autotools-utils bash-completion-r1 linux-info multilib \
115 + multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \
116 + user
117
118 DESCRIPTION="System and service manager for Linux"
119 HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
120 +SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz"
121
122 LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
123 SLOT="0/2"
124 -IUSE="acl apparmor audit cryptsetup curl elfutils gcrypt gnuefi http
125 - idn importd +kdbus +kmod +lz4 lzma nat pam policykit
126 - qrcode +seccomp selinux ssl sysv-utils test vanilla xkb"
127 -
128 -REQUIRED_USE="importd? ( curl gcrypt lzma )"
129 +KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86"
130 +IUSE="acl apparmor audit cryptsetup curl doc elfutils gcrypt gudev http
131 + idn introspection kdbus +kmod +lz4 lzma pam policykit python qrcode +seccomp
132 + selinux ssl sysv-utils terminal test vanilla xkb"
133
134 -MINKV="3.11"
135 +MINKV="3.8"
136
137 -COMMON_DEPEND=">=sys-apps/util-linux-2.27:0=[${MULTILIB_USEDEP}]
138 - sys-libs/libcap:0=[${MULTILIB_USEDEP}]
139 +COMMON_DEPEND=">=sys-apps/util-linux-2.25:0=
140 + sys-libs/libcap:0=
141 !<sys-libs/glibc-2.16
142 acl? ( sys-apps/acl:0= )
143 apparmor? ( sys-libs/libapparmor:0= )
144 @@ -38,26 +33,27 @@ COMMON_DEPEND=">=sys-apps/util-linux-2.27:0=[${MULTILIB_USEDEP}]
145 curl? ( net-misc/curl:0= )
146 elfutils? ( >=dev-libs/elfutils-0.158:0= )
147 gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] )
148 + gudev? ( >=dev-libs/glib-2.34.3:2=[${MULTILIB_USEDEP}] )
149 http? (
150 >=net-libs/libmicrohttpd-0.9.33:0=
151 ssl? ( >=net-libs/gnutls-3.1.4:0= )
152 )
153 idn? ( net-dns/libidn:0= )
154 - importd? (
155 - app-arch/bzip2:0=
156 - sys-libs/zlib:0=
157 - )
158 + introspection? ( >=dev-libs/gobject-introspection-1.31.1:0= )
159 kmod? ( >=sys-apps/kmod-15:0= )
160 lz4? ( >=app-arch/lz4-0_p119:0=[${MULTILIB_USEDEP}] )
161 lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] )
162 - nat? ( net-firewall/iptables:0= )
163 pam? ( virtual/pam:= )
164 + python? ( ${PYTHON_DEPS} )
165 qrcode? ( media-gfx/qrencode:0= )
166 seccomp? ( sys-libs/libseccomp:0= )
167 selinux? ( sys-libs/libselinux:0= )
168 sysv-utils? (
169 !sys-apps/systemd-sysv-utils
170 !sys-apps/sysvinit )
171 + terminal? ( >=dev-libs/libevdev-1.2:0=
172 + >=x11-libs/libxkbcommon-0.5:0=
173 + >=x11-libs/libdrm-2.4:0= )
174 xkb? ( >=x11-libs/libxkbcommon-0.4.1:0= )
175 abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9
176 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
177 @@ -67,11 +63,12 @@ RDEPEND="${COMMON_DEPEND}
178 >=sys-apps/baselayout-2.2
179 !sys-auth/nss-myhostname
180 !sys-fs/eudev
181 - !sys-fs/udev"
182 + !sys-fs/udev
183 + gudev? ( !dev-libs/libgudev )"
184
185 # sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
186 PDEPEND=">=sys-apps/dbus-1.6.8-r1:0[systemd]
187 - >=sys-apps/hwids-20150417[udev]
188 + >=sys-apps/hwids-20130717-r1[udev]
189 >=sys-fs/udev-init-scripts-25
190 policykit? ( sys-auth/polkit )
191 !vanilla? ( sys-apps/gentoo-systemd-integration )"
192 @@ -85,14 +82,16 @@ DEPEND="${COMMON_DEPEND}
193 >=sys-devel/binutils-2.23.1
194 >=sys-devel/gcc-4.6
195 >=sys-kernel/linux-headers-${MINKV}
196 + ia64? ( >=sys-kernel/linux-headers-3.9 )
197 virtual/pkgconfig
198 - gnuefi? ( >=sys-boot/gnu-efi-3.0.2 )
199 - test? ( >=sys-apps/dbus-1.6.8-r1:0 )
200 - app-text/docbook-xml-dtd:4.2
201 - app-text/docbook-xml-dtd:4.5
202 - app-text/docbook-xsl-stylesheets
203 - dev-libs/libxslt:0
204 - >=dev-libs/libgcrypt-1.4.5:0"
205 + doc? ( >=dev-util/gtk-doc-1.18 )
206 + python? ( dev-python/lxml[${PYTHON_USEDEP}] )
207 + test? ( >=sys-apps/dbus-1.6.8-r1:0 )"
208 +
209 +PATCHES=(
210 + "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
211 + "${FILESDIR}/218-noclean-tmp.patch"
212 +)
213
214 pkg_pretend() {
215 local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS
216 @@ -133,20 +132,18 @@ pkg_pretend() {
217 }
218
219 pkg_setup() {
220 - :
221 -}
222 -
223 -src_unpack() {
224 - default
225 - [[ ${PV} != 9999 ]] || git-r3_src_unpack
226 + use python && python-single-r1_pkg_setup
227 }
228
229 src_prepare() {
230 # Bug 463376
231 sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
232 - epatch "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
233 - epatch_user
234 - eautoreconf
235 +
236 + # missing in tarball
237 + cp "${FILESDIR}"/217-systemd-consoled.service.in \
238 + units/user/systemd-consoled.service.in || die
239 +
240 + autotools-utils_src_prepare
241 }
242
243 src_configure() {
244 @@ -155,9 +152,6 @@ src_configure() {
245 # Fix systems broken by bug #509454.
246 [[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
247
248 - # Prevent conflicts with i686 cross toolchain, bug 559726
249 - tc-export AR CC NM OBJCOPY RANLIB
250 -
251 multilib-minimal_src_configure
252 }
253
254 @@ -167,9 +161,6 @@ multilib_src_configure() {
255 # and makes distcc less effective
256 cc_cv_CFLAGS__flto=no
257
258 - # Workaround for gcc-4.7, bug 554454.
259 - cc_cv_CFLAGS__Werror_shadow=no
260 -
261 # Workaround for bug 516346
262 --enable-dependency-tracking
263
264 @@ -189,7 +180,6 @@ multilib_src_configure() {
265 # no deps
266 --enable-efi
267 --enable-ima
268 - --without-python
269
270 # Optional components/dependencies
271 $(multilib_native_use_enable acl)
272 @@ -197,48 +187,59 @@ multilib_src_configure() {
273 $(multilib_native_use_enable audit)
274 $(multilib_native_use_enable cryptsetup libcryptsetup)
275 $(multilib_native_use_enable curl libcurl)
276 + $(multilib_native_use_enable doc gtk-doc)
277 $(multilib_native_use_enable elfutils)
278 $(use_enable gcrypt)
279 - $(multilib_native_use_enable gnuefi)
280 + $(use_enable gudev)
281 $(multilib_native_use_enable http microhttpd)
282 $(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls)
283 $(multilib_native_use_enable idn libidn)
284 - $(multilib_native_use_enable importd)
285 - $(multilib_native_use_enable importd bzip2)
286 - $(multilib_native_use_enable importd zlib)
287 + $(multilib_native_use_enable introspection)
288 $(use_enable kdbus)
289 $(multilib_native_use_enable kmod)
290 $(use_enable lz4)
291 $(use_enable lzma xz)
292 - $(multilib_native_use_enable nat libiptc)
293 $(multilib_native_use_enable pam)
294 $(multilib_native_use_enable policykit polkit)
295 + $(multilib_native_use_with python)
296 + $(multilib_native_use_enable python python-devel)
297 $(multilib_native_use_enable qrcode qrencode)
298 $(multilib_native_use_enable seccomp)
299 $(multilib_native_use_enable selinux)
300 + $(multilib_native_use_enable terminal)
301 $(multilib_native_use_enable test tests)
302 $(multilib_native_use_enable test dbus)
303 $(multilib_native_use_enable xkb xkbcommon)
304
305 + # not supported (avoid automagic deps in the future)
306 + --disable-chkconfig
307 +
308 # hardcode a few paths to spare some deps
309 QUOTAON=/usr/sbin/quotaon
310 QUOTACHECK=/usr/sbin/quotacheck
311
312 - # TODO: we may need to restrict this to gcc
313 - EFI_CC="$(tc-getCC)"
314 -
315 # dbus paths
316 --with-dbuspolicydir="${EPREFIX}/etc/dbus-1/system.d"
317 --with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
318 --with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
319 + --with-dbusinterfacedir="${EPREFIX}/usr/share/dbus-1/interfaces"
320
321 --with-ntp-servers="0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
322 )
323
324 + if ! multilib_is_native_abi; then
325 + myeconfargs+=(
326 + MOUNT_{CFLAGS,LIBS}=' '
327 +
328 + ac_cv_search_cap_init=
329 + ac_cv_header_sys_capability_h=yes
330 + )
331 + fi
332 +
333 # Work around bug 463846.
334 tc-export CC
335
336 - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
337 + autotools-utils_src_configure
338 }
339
340 multilib_src_compile() {
341 @@ -249,6 +250,9 @@ multilib_src_compile() {
342 if multilib_is_native_abi; then
343 emake "${mymakeopts[@]}"
344 else
345 + # prerequisites for gudev
346 + use gudev && emake src/gudev/gudev{enumtypes,marshal}.{c,h}
347 +
348 echo 'gentoo: $(BUILT_SOURCES)' | \
349 emake "${mymakeopts[@]}" -f Makefile -f - gentoo
350 echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \
351 @@ -259,10 +263,6 @@ multilib_src_compile() {
352 multilib_src_test() {
353 multilib_is_native_abi || continue
354
355 - # Needed for bus-related tests
356 - local -x SANDBOX_WRITE=${SANDBOX_WRITE}
357 - addwrite /sys/fs/kdbus
358 -
359 default
360 }
361
362 @@ -285,6 +285,7 @@ multilib_src_install() {
363 install-pkgconfiglibDATA
364 install-includeHEADERS
365 # safe to call unconditionally, 'installs' empty list
366 + install-libgudev_includeHEADERS
367 install-pkgincludeHEADERS
368 )
369
370 @@ -330,7 +331,6 @@ multilib_src_install_all() {
371 rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service || die
372 rm "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service || die
373 rm -r "${D}"/etc/systemd/system/network-online.target.wants || die
374 - rm -r "${D}"/etc/systemd/system/sockets.target.wants || die
375 rm -r "${D}"/etc/systemd/system/sysinit.target.wants || die
376 }
377
378 @@ -406,14 +406,6 @@ migrate_net_name_slot() {
379 fi
380 }
381
382 -reenable_unit() {
383 - if systemctl is-enabled --root="${ROOT}" "$1" &> /dev/null; then
384 - ebegin "Re-enabling $1"
385 - systemctl reenable --root="${ROOT}" "$1"
386 - eend $? || FAIL=1
387 - fi
388 -}
389 -
390 pkg_postinst() {
391 newusergroup() {
392 enewgroup "$1"
393 @@ -448,9 +440,6 @@ pkg_postinst() {
394 # Migrate 80-net-name-slot.rules -> 80-net-setup-link.rules
395 migrate_net_name_slot
396
397 - # Re-enable systemd-networkd for socket activation
398 - reenable_unit systemd-networkd.service
399 -
400 if [[ ${FAIL} ]]; then
401 eerror "One of the postinst commands failed. Please check the postinst output"
402 eerror "for errors. You may need to clean up your system and/or try installing"
403
404 diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-226-r1.ebuild
405 similarity index 99%
406 copy from sys-apps/systemd/systemd-9999.ebuild
407 copy to sys-apps/systemd/systemd-226-r1.ebuild
408 index 2ec9957..9a7bc96 100644
409 --- a/sys-apps/systemd/systemd-9999.ebuild
410 +++ b/sys-apps/systemd/systemd-226-r1.ebuild
411 @@ -28,7 +28,7 @@ REQUIRED_USE="importd? ( curl gcrypt lzma )"
412
413 MINKV="3.11"
414
415 -COMMON_DEPEND=">=sys-apps/util-linux-2.27:0=[${MULTILIB_USEDEP}]
416 +COMMON_DEPEND=">=sys-apps/util-linux-2.26:0=[${MULTILIB_USEDEP}]
417 sys-libs/libcap:0=[${MULTILIB_USEDEP}]
418 !<sys-libs/glibc-2.16
419 acl? ( sys-apps/acl:0= )
420 @@ -145,6 +145,7 @@ src_prepare() {
421 # Bug 463376
422 sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
423 epatch "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
424 + epatch "${FILESDIR}/226-noclean-tmp.patch"
425 epatch_user
426 eautoreconf
427 }
428
429 diff --git a/sys-apps/systemd/systemd-9999.ebuild b/sys-apps/systemd/systemd-9999.ebuild
430 index 2ec9957..ca76f13 100644
431 --- a/sys-apps/systemd/systemd-9999.ebuild
432 +++ b/sys-apps/systemd/systemd-9999.ebuild
433 @@ -145,6 +145,7 @@ src_prepare() {
434 # Bug 463376
435 sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
436 epatch "${FILESDIR}/218-Dont-enable-audit-by-default.patch"
437 + epatch "${FILESDIR}/226-noclean-tmp.patch"
438 epatch_user
439 eautoreconf
440 }