Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd-tmpfiles/, sys-apps/systemd-tmpfiles/files/
Date: Fri, 24 Dec 2021 09:05:22
Message-Id: 1640336642.24543d0cf460e3cf58a55ae4da5228dffb39cb4d.gyakovlev@gentoo
1 commit: 24543d0cf460e3cf58a55ae4da5228dffb39cb4d
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 24 06:13:54 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 24 09:04:02 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24543d0c
7
8 sys-apps/systemd-tmpfiles: drop 249.2
9
10 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
11
12 sys-apps/systemd-tmpfiles/Manifest | 2 -
13 .../files/249-sys-include-posix.patch | 67 ------
14 .../files/systemd-tmpfiles-249.2-meson-0.60.patch | 26 --
15 .../systemd-tmpfiles/systemd-tmpfiles-249.2.ebuild | 263 ---------------------
16 4 files changed, 358 deletions(-)
17
18 diff --git a/sys-apps/systemd-tmpfiles/Manifest b/sys-apps/systemd-tmpfiles/Manifest
19 index 766449cac780..56ae06fe69b3 100644
20 --- a/sys-apps/systemd-tmpfiles/Manifest
21 +++ b/sys-apps/systemd-tmpfiles/Manifest
22 @@ -1,4 +1,2 @@
23 -DIST systemd-musl-patches-249.1-r1.tar.xz 24536 BLAKE2B 25135519112b2a1c638046addb6971ea1997fc7dd8626de90d162a4beb6383b5724df78a14c73be1283df58632fb4a0fcb32f90f50f1886f31a1aded15e9567c SHA512 4655f2a06e1b3310cb27b839360353dfbfdbdaa86f4392aeebf63f63efd441d1953f7ac108be7fed7ea721596d191988ed999e34443e47922afca92db779175a
24 DIST systemd-musl-patches-249.5-r1.tar.xz 25148 BLAKE2B 6717291b5335997dcc327764beffc4ded50a5ac0e777bb3c540b5e355bee419c3d9b4a5605c239392d4c1b0e70792bc87282fa15dc9c09a0465b5608f2909006 SHA512 4bb7566437c280e75402fc435a3437aedad127f7b94c9bd54b94e9e1e7507409ad0898681f23e813b9b47414f58e4ca413b6d4e520bbbf578faec09054bf7f9b
25 -DIST systemd-stable-249.2.tar.gz 10591728 BLAKE2B fb24c681cf2328aa26fa49a8ba20cccd1ee0fae82ec9f9931a69eaa377fc01b2ece12fdf407444514d494b8ac1418f155b0fceeff4925bebaba691f0b8a2acc8 SHA512 4f42a0b93156529a464545361436fa98193e12a7e0809315b9fdedbcf33b81dd2037acac27fb0dfefcb2679bc49ebb6da4d152ecb4b15db797c81f7ca4588a11
26 DIST systemd-stable-249.5.tar.gz 10597897 BLAKE2B 5c573322ef9bcd9d019776d6e2d8625a741c1535c0d06661b5666c2438a70cfc4dc182919bb419829de27a4d93c16717ce24e668faf9bd6b09e57f8bd88be725 SHA512 d6f1a5a6f03f0ed05b111aee75da509c5868c523af6209f33e630724dd0c7e0d0abf16920795d587e6c31a5915d247ebc613cf26d4aecf39f82ebb0690fab75f
27
28 diff --git a/sys-apps/systemd-tmpfiles/files/249-sys-include-posix.patch b/sys-apps/systemd-tmpfiles/files/249-sys-include-posix.patch
29 deleted file mode 100644
30 index 6d9e0039b9c9..000000000000
31 --- a/sys-apps/systemd-tmpfiles/files/249-sys-include-posix.patch
32 +++ /dev/null
33 @@ -1,67 +0,0 @@
34 -Silence annoying #warning's on musl
35 -
36 -https://github.com/systemd/systemd/pull/20362
37 -https://github.com/systemd/systemd/pull/20364
38 -
39 -From f8d54f7810aeea5ff27a5db03e1aab7ea54c8268 Mon Sep 17 00:00:00 2001
40 -From: David Seifert <soap@g.o>
41 -Date: Mon, 2 Aug 2021 12:41:38 +0200
42 -Subject: [PATCH] Use correct `<fcntl.h>` include
43 -
44 -* `<sys/fcntl.h>` is not specified in POSIX
45 ----
46 - src/basic/fileio.h | 2 +-
47 - 1 file changed, 1 insertion(+), 1 deletion(-)
48 -
49 -diff --git a/src/basic/fileio.h b/src/basic/fileio.h
50 -index af797cfafdbf..4295b84a85c5 100644
51 ---- a/src/basic/fileio.h
52 -+++ b/src/basic/fileio.h
53 -@@ -2,11 +2,11 @@
54 - #pragma once
55 -
56 - #include <dirent.h>
57 -+#include <fcntl.h>
58 - #include <stdbool.h>
59 - #include <stddef.h>
60 - #include <stdio.h>
61 - #include <sys/stat.h>
62 --#include <sys/fcntl.h>
63 - #include <sys/types.h>
64 -
65 - #include "macro.h"
66 -From 2b6c0bb2a341c95223ce672249e43c743b03d78c Mon Sep 17 00:00:00 2001
67 -From: David Seifert <soap@g.o>
68 -Date: Mon, 2 Aug 2021 16:09:10 +0200
69 -Subject: [PATCH] Use correct `<poll.h>` include
70 -
71 -* `<sys/poll.h>` is not specified in POSIX
72 ----
73 - src/shared/nscd-flush.c | 2 +-
74 - src/shared/varlink.c | 2 +-
75 - 2 files changed, 2 insertions(+), 2 deletions(-)
76 -
77 -diff --git a/src/shared/nscd-flush.c b/src/shared/nscd-flush.c
78 -index dfc47c423441..19e16d93455c 100644
79 ---- a/src/shared/nscd-flush.c
80 -+++ b/src/shared/nscd-flush.c
81 -@@ -1,5 +1,5 @@
82 - /* SPDX-License-Identifier: LGPL-2.1-or-later */
83 --#include <sys/poll.h>
84 -+#include <poll.h>
85 -
86 - #include "fd-util.h"
87 - #include "io-util.h"
88 -diff --git a/src/shared/varlink.c b/src/shared/varlink.c
89 -index 3a53c16a7242..4033947d3b8c 100644
90 ---- a/src/shared/varlink.c
91 -+++ b/src/shared/varlink.c
92 -@@ -1,7 +1,7 @@
93 - /* SPDX-License-Identifier: LGPL-2.1-or-later */
94 -
95 - #include <malloc.h>
96 --#include <sys/poll.h>
97 -+#include <poll.h>
98 -
99 - #include "alloc-util.h"
100 - #include "errno-util.h"
101
102 diff --git a/sys-apps/systemd-tmpfiles/files/systemd-tmpfiles-249.2-meson-0.60.patch b/sys-apps/systemd-tmpfiles/files/systemd-tmpfiles-249.2-meson-0.60.patch
103 deleted file mode 100644
104 index b931912be23e..000000000000
105 --- a/sys-apps/systemd-tmpfiles/files/systemd-tmpfiles-249.2-meson-0.60.patch
106 +++ /dev/null
107 @@ -1,26 +0,0 @@
108 -https://github.com/systemd/systemd/commit/c29537f39e4f413a6cbfe9669fa121bdd6d8b36f
109 -https://bugs.gentoo.org/821547
110 -
111 -From: Dan Streetman <ddstreet@×××××××××.com>
112 -Date: Fri, 3 Sep 2021 12:43:33 -0400
113 -Subject: [PATCH] meson.build: change operator combining bools from + to and
114 -
115 -upstream meson stopped allowing combining boolean with the plus
116 -operator, and now requires using the logical and operator
117 -
118 -reference:
119 -https://github.com/mesonbuild/meson/commit/43302d3296baff6aeaf8e03f5d701b0402e37a6c
120 -
121 -Fixes: #20632
122 ---- a/meson.build
123 -+++ b/meson.build
124 -@@ -35,7 +35,7 @@ conf.set10('BUILD_MODE_DEVELOPER', get_option('mode') == 'developer',
125 -
126 - want_ossfuzz = get_option('oss-fuzz')
127 - want_libfuzzer = get_option('llvm-fuzz')
128 --if want_ossfuzz + want_libfuzzer > 1
129 -+if want_ossfuzz and want_libfuzzer
130 - error('only one of oss-fuzz or llvm-fuzz can be specified')
131 - endif
132 -
133 -
134
135 diff --git a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-249.2.ebuild b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-249.2.ebuild
136 deleted file mode 100644
137 index ad80dc82cf86..000000000000
138 --- a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-249.2.ebuild
139 +++ /dev/null
140 @@ -1,263 +0,0 @@
141 -# Copyright 2020-2021 Gentoo Authors
142 -# Distributed under the terms of the GNU General Public License v2
143 -
144 -EAPI=7
145 -
146 -if [[ ${PV} == *.* ]]; then
147 - MY_PN=systemd-stable
148 -else
149 - MY_PN=systemd
150 -fi
151 -
152 -MINKV="3.11"
153 -MUSL_PATCHSET="${PV%.*}.1-r1"
154 -PYTHON_COMPAT=( python3_{8..10} )
155 -inherit flag-o-matic meson python-any-r1
156 -
157 -DESCRIPTION="Creates, deletes and cleans up volatile and temporary files and directories"
158 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
159 -SRC_URI="https://github.com/systemd/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_PN}-${PV}.tar.gz
160 - elibc_musl? (
161 - https://dev.gentoo.org/~gyakovlev/distfiles/systemd-musl-patches-${MUSL_PATCHSET}.tar.xz
162 - https://dev.gentoo.org/~soap/distfiles/systemd-musl-patches-${MUSL_PATCHSET}.tar.xz
163 - )"
164 -
165 -LICENSE="BSD-2 GPL-2 LGPL-2.1 MIT public-domain"
166 -SLOT="0"
167 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
168 -IUSE="selinux test"
169 -RESTRICT="!test? ( test )"
170 -
171 -RDEPEND="
172 - sys-apps/acl:0=
173 - >=sys-apps/util-linux-2.30:0=
174 - sys-libs/libcap:0=
175 - selinux? ( sys-libs/libselinux:0= )
176 - virtual/libcrypt:=
177 - !sys-apps/opentmpfiles
178 - !sys-apps/systemd
179 -"
180 -
181 -DEPEND="
182 - ${RDEPEND}
183 - >=sys-kernel/linux-headers-${MINKV}
184 -"
185 -
186 -BDEPEND="
187 - ${PYTHON_DEPS}
188 - $(python_gen_any_dep 'dev-python/jinja[${PYTHON_USEDEP}]')
189 - app-text/docbook-xml-dtd:4.2
190 - app-text/docbook-xml-dtd:4.5
191 - app-text/docbook-xsl-stylesheets
192 - dev-libs/libxslt
193 - dev-util/gperf
194 - >=dev-util/meson-0.46
195 - >=sys-apps/coreutils-8.16
196 - sys-devel/gettext
197 - virtual/pkgconfig
198 -"
199 -
200 -S="${WORKDIR}/${MY_PN}-${PV}"
201 -
202 -PATCHES=(
203 - # backport from 250 to silence musl warnings
204 - "${FILESDIR}/249-sys-include-posix.patch"
205 - "${FILESDIR}/${P}-meson-0.60.patch"
206 -)
207 -
208 -python_check_deps() {
209 - has_version -b "dev-python/jinja[${PYTHON_USEDEP}]"
210 -}
211 -
212 -pkg_pretend() {
213 - if [[ -n ${EPREFIX} ]]; then
214 - ewarn "systemd-tmpfiles uses un-prefixed paths at runtime.".
215 - fi
216 -}
217 -
218 -pkg_setup() {
219 - python-any-r1_pkg_setup
220 -}
221 -
222 -src_prepare() {
223 - # musl patchset from:
224 - # http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd
225 - # check SRC_URI_MUSL in systemd_${PV}.bb file for exact list of musl patches
226 - # we share patch tarball with sys-fs/udev
227 - if use elibc_musl; then
228 - einfo "applying musl patches and workarounds"
229 - eapply "${WORKDIR}/musl-patches"
230 -
231 - # avoids re-definition of struct ethhdr, also 0006-Include-netinet-if_ether.h.patch
232 - append-cppflags '-D__UAPI_DEF_ETHHDR=0'
233 -
234 - # src/basic/rlimit-util.c:46:19: error: format ‘%lu’ expects argument of type ‘long unsigned int’,
235 - # but argument 9 has type ‘rlim_t’ {aka ‘long long unsigned int’}
236 - # not a nice workaround, but it comes from debug messages and we don't really use this component.
237 - append-cflags '-Wno-error=format'
238 - fi
239 -
240 - default
241 -
242 - # https://bugs.gentoo.org/767403
243 - python_fix_shebang src/test/*.py
244 - python_fix_shebang test/*.py
245 - python_fix_shebang tools/*.py
246 -}
247 -
248 -src_configure() {
249 - # disable everything until configure says "enabled features: ACL, tmpfiles, standalone-binaries, static-libsystemd(true)"
250 - # and optionally selinux feature can be enabled to make tmpfiles secontext-aware
251 - local systemd_disable_options=(
252 - adm-group
253 - analyze
254 - apparmor
255 - audit
256 - backlight
257 - binfmt
258 - blkid
259 - bzip2
260 - coredump
261 - dbus
262 - efi
263 - elfutils
264 - environment-d
265 - fdisk
266 - gcrypt
267 - glib
268 - gshadow
269 - gnutls
270 - hibernate
271 - hostnamed
272 - hwdb
273 - idn
274 - ima
275 - initrd
276 - firstboot
277 - kernel-install
278 - kmod
279 - ldconfig
280 - libcryptsetup
281 - libcurl
282 - libfido2
283 - libidn
284 - libidn2
285 - libiptc
286 - link-networkd-shared
287 - link-systemctl-shared
288 - link-timesyncd-shared
289 - link-udev-shared
290 - localed
291 - logind
292 - lz4
293 - machined
294 - microhttpd
295 - networkd
296 - nscd
297 - nss-myhostname
298 - nss-resolve
299 - nss-systemd
300 - oomd
301 - openssl
302 - p11kit
303 - pam
304 - pcre2
305 - polkit
306 - portabled
307 - pstore
308 - pwquality
309 - randomseed
310 - resolve
311 - rfkill
312 - seccomp
313 - smack
314 - sysext
315 - sysusers
316 - timedated
317 - timesyncd
318 - tpm
319 - qrencode
320 - quotacheck
321 - userdb
322 - utmp
323 - vconsole
324 - wheel-group
325 - xdg-autostart
326 - xkbcommon
327 - xz
328 - zlib
329 - zstd
330 - )
331 -
332 - # prepend -D and append =false, e.g. zstd becomes -Dzstd=false
333 - systemd_disable_options=( ${systemd_disable_options[@]/#/-D} )
334 - systemd_disable_options=( ${systemd_disable_options[@]/%/=false} )
335 -
336 - local emesonargs=(
337 - -Drootprefix="${EPREFIX:-/}"
338 - -Dacl=true
339 - -Dtmpfiles=true
340 - -Dstandalone-binaries=true # this and below option does the magic
341 - -Dstatic-libsystemd=true
342 - -Dsysvinit-path=''
343 - ${systemd_disable_options[@]}
344 - $(meson_use selinux)
345 - )
346 - meson_src_configure
347 -}
348 -
349 -src_compile() {
350 - # tmpfiles and sysusers can be built as standalone and link systemd-shared in statically.
351 - # https://github.com/systemd/systemd/pull/16061 original implementation
352 - # we just need to pass -Dstandalone-binaries=true and
353 - # use <name>.standalone target below.
354 - # check meson.build for if have_standalone_binaries condition per target.
355 - local mytargets=(
356 - systemd-tmpfiles.standalone
357 - man/tmpfiles.d.5
358 - man/systemd-tmpfiles.8
359 - )
360 - meson_src_compile "${mytargets[@]}"
361 -}
362 -
363 -src_install() {
364 - # lean and mean installation, single binary and man-pages
365 - pushd "${BUILD_DIR}" > /dev/null || die
366 - into /
367 - newbin systemd-tmpfiles.standalone systemd-tmpfiles
368 -
369 - doman man/{systemd-tmpfiles.8,tmpfiles.d.5}
370 -
371 - popd > /dev/null || die
372 -
373 - # service files adapter from opentmpfiles
374 - newinitd "${FILESDIR}"/stmpfiles-dev.initd stmpfiles-dev
375 - newinitd "${FILESDIR}"/stmpfiles-setup.initd stmpfiles-setup
376 -
377 - # same content, but install as different file
378 - newconfd "${FILESDIR}"/stmpfiles.confd stmpfiles-dev
379 - newconfd "${FILESDIR}"/stmpfiles.confd stmpfiles-setup
380 -}
381 -
382 -src_test() {
383 - # 'meson test' will compile full systemd, but we can still outsmart it
384 - "${EPYTHON}" test/test-systemd-tmpfiles.py \
385 - "${BUILD_DIR}"/systemd-tmpfiles.standalone || die "${FUNCNAME} failed"
386 -}
387 -
388 -# stolen from opentmpfiles ebuild
389 -add_service() {
390 - local initd=$1
391 - local runlevel=$2
392 -
393 - elog "Auto-adding '${initd}' service to your ${runlevel} runlevel"
394 - mkdir -p "${EROOT}/etc/runlevels/${runlevel}"
395 - ln -snf "${EPREFIX}/etc/init.d/${initd}" "${EROOT}/etc/runlevels/${runlevel}/${initd}"
396 -}
397 -
398 -pkg_postinst() {
399 - if [[ -z $REPLACING_VERSIONS ]]; then
400 - add_service stmpfiles-dev sysinit
401 - add_service stmpfiles-setup boot
402 - fi
403 -}