Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs/
Date: Wed, 22 Sep 2021 01:19:29
Message-Id: 1632273556.bb93f0a6faaed5028794f7aaebc5644eb6ca8af5.sam@gentoo
1 commit: bb93f0a6faaed5028794f7aaebc5644eb6ca8af5
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 22 01:17:19 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 22 01:19:16 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb93f0a6
7
8 sys-fs/zfs: disable systemd on musl
9
10 Needed to fix build failures on musl (where we don't
11 have systemd anyway):
12 ```
13 zfs-mount-generator.c: In function 'line_worker':
14 zfs-mount-generator.c:238:24: warning: implicit declaration of function 'strndupa'; did you mean 'strndup'? [-Wimplicit-function-declaration]
15 238 | pool = strndupa(pool, toktmp - pool);
16 | ^~~~~~~~
17 | strndup
18 zfs-mount-generator.c:238:22: warning: assignment to 'const char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
19 238 | pool = strndupa(pool, toktmp - pool);
20 | ^
21 ```
22
23 Reported-by: Jory A. Pratt <anarchy <AT> gentoo.org>
24 Signed-off-by: Sam James <sam <AT> gentoo.org>
25
26 sys-fs/zfs/zfs-2.1.0-r1.ebuild | 4 ++++
27 sys-fs/zfs/zfs-2.1.1-r1.ebuild | 5 ++++-
28 sys-fs/zfs/zfs-9999.ebuild | 5 ++++-
29 3 files changed, 12 insertions(+), 2 deletions(-)
30
31 diff --git a/sys-fs/zfs/zfs-2.1.0-r1.ebuild b/sys-fs/zfs/zfs-2.1.0-r1.ebuild
32 index 9f8ac5af220..2ab356846cf 100644
33 --- a/sys-fs/zfs/zfs-2.1.0-r1.ebuild
34 +++ b/sys-fs/zfs/zfs-2.1.0-r1.ebuild
35 @@ -54,6 +54,10 @@ BDEPEND="virtual/awk
36 nls? ( sys-devel/gettext )
37 python? (
38 dev-python/setuptools[${PYTHON_USEDEP}]
39 + || (
40 + dev-python/packaging[${PYTHON_USEDEP}]
41 + dev-python/distlib[${PYTHON_USEDEP}]
42 + )
43 )
44 "
45
46
47 diff --git a/sys-fs/zfs/zfs-2.1.1-r1.ebuild b/sys-fs/zfs/zfs-2.1.1-r1.ebuild
48 index e1514c972f1..b18fbb26061 100644
49 --- a/sys-fs/zfs/zfs-2.1.1-r1.ebuild
50 +++ b/sys-fs/zfs/zfs-2.1.1-r1.ebuild
51 @@ -180,7 +180,6 @@ src_configure() {
52 local myconf=(
53 --bindir="${EPREFIX}/bin"
54 --enable-shared
55 - --enable-systemd
56 --enable-sysvinit
57 --localstatedir="${EPREFIX}/var"
58 --sbindir="${EPREFIX}/sbin"
59 @@ -194,6 +193,10 @@ src_configure() {
60 --with-systemdunitdir="$(systemd_get_systemunitdir)"
61 --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
62 --with-vendor=gentoo
63 + # Building zfs-mount-generator.c on musl breaks as strndupa
64 + # isn't available. But systemd doesn't support musl anyway, so
65 + # just disable building it.
66 + $(use_enable !elibc_musl systemd)
67 $(use_enable debug)
68 $(use_enable nls)
69 $(use_enable pam)
70
71 diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
72 index 10db2b452cb..43755044ed6 100644
73 --- a/sys-fs/zfs/zfs-9999.ebuild
74 +++ b/sys-fs/zfs/zfs-9999.ebuild
75 @@ -182,7 +182,6 @@ src_configure() {
76 local myconf=(
77 --bindir="${EPREFIX}/bin"
78 --enable-shared
79 - --enable-systemd
80 --enable-sysvinit
81 --localstatedir="${EPREFIX}/var"
82 --sbindir="${EPREFIX}/sbin"
83 @@ -196,6 +195,10 @@ src_configure() {
84 --with-systemdunitdir="$(systemd_get_systemunitdir)"
85 --with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset"
86 --with-vendor=gentoo
87 + # Building zfs-mount-generator.c on musl breaks as strndupa
88 + # isn't available. But systemd doesn't support musl anyway, so
89 + # just disable building it.
90 + $(use_enable !elibc_musl systemd)
91 $(use_enable debug)
92 $(use_enable nls)
93 $(use_enable pam)