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/
Date: Fri, 30 Oct 2020 12:44:44
Message-Id: 1604061869.7e9282e743a89208086317d097a8ebf70b845d59.gyakovlev@gentoo
1 commit: 7e9282e743a89208086317d097a8ebf70b845d59
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Oct 30 12:34:20 2020 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 30 12:44:29 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e9282e7
7
8 sys-apps/systemd-tmpfiles: improve src_test, enable tests on musl
9
10 it no longer compiles full systemd
11
12 Package-Manager: Portage-3.0.8, Repoman-3.0.2
13 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
14
15 .../systemd-tmpfiles/systemd-tmpfiles-246.ebuild | 26 ++++++++++++----------
16 1 file changed, 14 insertions(+), 12 deletions(-)
17
18 diff --git a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
19 index 81f82626e0f..f47e1b24c1e 100644
20 --- a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
21 +++ b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
22 @@ -4,7 +4,8 @@
23 EAPI=7
24
25 MINKV="3.11"
26 -inherit meson
27 +PYTHON_COMPAT=( python3_{7..9} )
28 +inherit meson python-any-r1
29
30 DESCRIPTION="Creates, deletes and cleans up volatile and temporary files and directories"
31 HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
32 @@ -14,11 +15,13 @@ SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${P
33 LICENSE="BSD-2 GPL-2 LGPL-2.1 MIT public-domain"
34 SLOT="0"
35 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
36 +IUSE="test"
37 +RESTRICT="!test? ( test )"
38
39 DEPEND="
40 - >=sys-kernel/linux-headers-${MINKV}
41 sys-apps/acl:0=
42 >=sys-apps/util-linux-2.30:0=
43 + >=sys-kernel/linux-headers-${MINKV}
44 sys-libs/libcap:0=
45 "
46 RDEPEND="${DEPEND}
47 @@ -36,14 +39,15 @@ BDEPEND="
48 >=sys-apps/coreutils-8.16
49 sys-devel/m4
50 virtual/pkgconfig
51 + test? ( ${PYTHON_DEPS} )
52 "
53
54 -# test pass, but some unrelated efi parts that
55 -# are impossible to skip fail to build
56 -RESTRICT="elibc_musl? ( test )"
57 -
58 S="${WORKDIR}/systemd-${PV}"
59
60 +pkg_setup() {
61 + use test && python-any-r1_pkg_setup
62 +}
63 +
64 src_prepare() {
65 # musl patchset from:
66 # http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd
67 @@ -137,8 +141,8 @@ src_configure() {
68 systemd_disable_options=( ${systemd_disable_options[@]/%/=false} )
69
70 local emesonargs=(
71 - -Dtmpfiles=true
72 -Dacl=true
73 + -Dtmpfiles=true
74 -Dstandalone-binaries=true # this and below option does the magic
75 -Dstatic-libsystemd=true
76 -Dsysvinit-path=''
77 @@ -181,11 +185,9 @@ src_install() {
78 }
79
80 src_test() {
81 - # selection of relevant tests
82 - # unfortunately full suite will be built to run tests, but we still
83 - # install just what we need and not a bit more.
84 - local tests=( test-{acl-util,tmpfiles,chase-symlinks,path} )
85 - meson_src_test "${tests[@]}"
86 + # 'meson test' will compile full systemd, but we can still outsmart it
87 + "${EPYTHON}" src/test/test-systemd-tmpfiles.py \
88 + "${BUILD_DIR}"/systemd-tmpfiles.standalone || die
89 }
90
91 # adapted from opentmpfiles ebuild