1 |
commit: c31aca67fbcb0c9e360a4dfde0a78c4ab44d9399 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 27 03:03:09 2020 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 27 03:03:23 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c31aca67 |
7 |
|
8 |
sys-fs/zfs: update live ebuild, add minimal useflag |
9 |
|
10 |
it can be used to avoid python dependency completely |
11 |
|
12 |
Bug: https://bugs.gentoo.org/701522 |
13 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
14 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
15 |
|
16 |
sys-fs/zfs/metadata.xml | 1 + |
17 |
sys-fs/zfs/zfs-9999.ebuild | 18 +++++++++++------- |
18 |
2 files changed, 12 insertions(+), 7 deletions(-) |
19 |
|
20 |
diff --git a/sys-fs/zfs/metadata.xml b/sys-fs/zfs/metadata.xml |
21 |
index 85d50d081af..9ce9230943f 100644 |
22 |
--- a/sys-fs/zfs/metadata.xml |
23 |
+++ b/sys-fs/zfs/metadata.xml |
24 |
@@ -11,6 +11,7 @@ |
25 |
</maintainer> |
26 |
<use> |
27 |
<flag name="kernel-builtin">Disable dependency on sys-fs/zfs-kmod under the assumption that ZFS is part of the kernel source tree</flag> |
28 |
+ <flag name="minimal">Don't install python scripts (arcstat, dbufstat etc) and avoid dependency on <pkg>dev-lang/python</pkg></flag> |
29 |
<flag name="pam">Install zfs_key pam module, for automatically loading zfs encryption keys for home datasets</flag> |
30 |
<flag name="rootfs">Enable dependencies required for booting off a pool containing a rootfs</flag> |
31 |
<flag name="test-suite">Install regression test suite</flag> |
32 |
|
33 |
diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild |
34 |
index 11bc0febcb0..4c5e4f2901c 100644 |
35 |
--- a/sys-fs/zfs/zfs-9999.ebuild |
36 |
+++ b/sys-fs/zfs/zfs-9999.ebuild |
37 |
@@ -21,10 +21,9 @@ fi |
38 |
|
39 |
LICENSE="BSD-2 CDDL MIT" |
40 |
SLOT="0" |
41 |
-IUSE="custom-cflags debug kernel-builtin libressl pam python +rootfs test-suite static-libs" |
42 |
+IUSE="custom-cflags debug kernel-builtin libressl minimal pam python +rootfs test-suite static-libs" |
43 |
|
44 |
DEPEND=" |
45 |
- ${PYTHON_DEPS} |
46 |
net-libs/libtirpc[static-libs?] |
47 |
sys-apps/util-linux[static-libs?] |
48 |
sys-libs/zlib[static-libs(+)?] |
49 |
@@ -32,6 +31,7 @@ DEPEND=" |
50 |
virtual/libudev[static-libs(-)?] |
51 |
libressl? ( dev-libs/libressl:0=[static-libs?] ) |
52 |
!libressl? ( dev-libs/openssl:0=[static-libs?] ) |
53 |
+ !minimal? ( ${PYTHON_DEPS} ) |
54 |
pam? ( sys-libs/pam ) |
55 |
python? ( |
56 |
virtual/python-cffi[${PYTHON_USEDEP}] |
57 |
@@ -65,7 +65,11 @@ RDEPEND="${DEPEND} |
58 |
) |
59 |
" |
60 |
|
61 |
-REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
62 |
+REQUIRED_USE=" |
63 |
+ !minimal? ( ${PYTHON_REQUIRED_USE} ) |
64 |
+ python? ( !minimal ) |
65 |
+ test-suite? ( !minimal ) |
66 |
+" |
67 |
|
68 |
RESTRICT="test" |
69 |
|
70 |
@@ -130,15 +134,15 @@ src_configure() { |
71 |
--with-linux="${KV_DIR}" |
72 |
--with-linux-obj="${KV_OUT_DIR}" |
73 |
--with-udevdir="$(get_udevdir)" |
74 |
- --with-pamconfigsdir="${EPREFIX}/unwanted_debian_files" |
75 |
+ --with-pamconfigsdir="${EPREFIX}/unwanted_files" |
76 |
--with-pammoduledir="$(getpam_mod_dir)" |
77 |
- --with-python="${EPYTHON}" |
78 |
--with-systemdunitdir="$(systemd_get_systemunitdir)" |
79 |
--with-systemdpresetdir="${EPREFIX}/lib/systemd/system-preset" |
80 |
$(use_enable debug) |
81 |
$(use_enable pam) |
82 |
$(use_enable python pyzfs) |
83 |
$(use_enable static-libs static) |
84 |
+ $(usex minimal --without-python --with-python="${EPYTHON}") |
85 |
) |
86 |
|
87 |
econf "${myconf[@]}" |
88 |
@@ -158,7 +162,7 @@ src_install() { |
89 |
|
90 |
gen_usr_ldscript -a uutil nvpair zpool zfs zfs_core |
91 |
|
92 |
- use pam && { rm -rv "${ED}/unwanted_debian_files" || die ; } |
93 |
+ use pam && { rm -rv "${ED}/unwanted_files" || die ; } |
94 |
|
95 |
use test-suite || { rm -r "${ED}/usr/share/zfs" || die ; } |
96 |
|
97 |
@@ -179,7 +183,7 @@ src_install() { |
98 |
fi |
99 |
|
100 |
# enforce best available python implementation |
101 |
- python_fix_shebang "${ED}/bin" |
102 |
+ use minimal || python_fix_shebang "${ED}/bin" |
103 |
} |
104 |
|
105 |
pkg_postinst() { |