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/ecryptfs-utils/
Date: Mon, 17 Aug 2020 00:51:10
Message-Id: 1597625454.4542f5205ad1bc953e54ccbc487f5e6ebe3a5f8c.sam@gentoo
1 commit: 4542f5205ad1bc953e54ccbc487f5e6ebe3a5f8c
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Aug 17 00:50:54 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Aug 17 00:50:54 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4542f520
7
8 sys-fs/ecryptfs-utils: forcibly disable Python bindings
9
10 From Tiago's original PR:
11 "This package only supports Python 2, so disable the bindings with
12 --disable-pywrap and remove the USE flag. The tools themselves don't
13 require Python, they're either binaries or shell scripts."
14
15 Committing separately because I want to do this in a revbump
16 due to other cleanups and in case someone wants to shout
17 about the Python bindings being somehow useful.
18
19 Thanks-to: Tiago Sousa <tiagosousa <AT> gmail.com>
20 Bug: https://bugs.gentoo.org/735486
21 Package-Manager: Portage-3.0.2, Repoman-2.3.23
22 Signed-off-by: Sam James <sam <AT> gentoo.org>
23
24 .../ecryptfs-utils-111_p20170609-r1.ebuild | 82 ++++++++++++++++++++++
25 1 file changed, 82 insertions(+)
26
27 diff --git a/sys-fs/ecryptfs-utils/ecryptfs-utils-111_p20170609-r1.ebuild b/sys-fs/ecryptfs-utils/ecryptfs-utils-111_p20170609-r1.ebuild
28 new file mode 100644
29 index 00000000000..10553c846c2
30 --- /dev/null
31 +++ b/sys-fs/ecryptfs-utils/ecryptfs-utils-111_p20170609-r1.ebuild
32 @@ -0,0 +1,82 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit autotools flag-o-matic linux-info pam
39 +
40 +MY_PN=${PN/-utils//}
41 +DESCRIPTION="eCryptfs userspace utilities"
42 +HOMEPAGE="https://launchpad.net/ecryptfs"
43 +SRC_URI="https://dev.gentoo.org/~bkohler/dist/${P}.tar.gz"
44 +S="${WORKDIR}/~${MY_PN}/${MY_PN}/trunk/"
45 +
46 +LICENSE="GPL-2"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
49 +IUSE="doc gpg gtk nls openssl pam pkcs11 suid tpm"
50 +
51 +BDEPEND="
52 + >=dev-util/intltool-0.41.0
53 + sys-devel/gettext
54 + virtual/pkgconfig
55 +"
56 +RDEPEND="
57 + >=dev-libs/libgcrypt-1.2.0:0=
58 + dev-libs/nss
59 + >=sys-apps/keyutils-1.5.11-r1:=
60 + gpg? ( app-crypt/gpgme:= )
61 + gtk? ( x11-libs/gtk+:2 )
62 + openssl? ( >=dev-libs/openssl-0.9.7:= )
63 + pam? ( sys-libs/pam )
64 + pkcs11? (
65 + >=dev-libs/openssl-0.9.7:=
66 + >=dev-libs/pkcs11-helper-1.04
67 + )
68 + tpm? ( app-crypt/trousers )"
69 +DEPEND="${RDEPEND}"
70 +
71 +pkg_setup() {
72 + CONFIG_CHECK="~ECRYPT_FS"
73 + linux-info_pkg_setup
74 +}
75 +
76 +src_prepare() {
77 + default
78 + eautoreconf
79 +}
80 +
81 +src_configure() {
82 + append-cppflags -D_FILE_OFFSET_BITS=64
83 +
84 + econf \
85 + --enable-nss \
86 + --with-pamdir=$(getpam_mod_dir) \
87 + --disable-pywrap \
88 + $(use_enable doc docs) \
89 + $(use_enable gpg) \
90 + $(use_enable gtk gui) \
91 + $(use_enable nls) \
92 + $(use_enable openssl) \
93 + $(use_enable pam) \
94 + $(use_enable pkcs11 pkcs11-helper) \
95 + $(use_enable tpm tspi)
96 +}
97 +
98 +src_install() {
99 + emake DESTDIR="${D}" install
100 +
101 + use suid && fperms u+s /sbin/mount.ecryptfs_private
102 +
103 + find "${ED}" -name '*.la' -exec rm -f '{}' + || die
104 +}
105 +
106 +pkg_postinst() {
107 + if use suid; then
108 + ewarn
109 + ewarn "You have chosen to install ${PN} with the binary setuid root. This"
110 + ewarn "means that if there are any undetected vulnerabilities in the binary,"
111 + ewarn "then local users may be able to gain root access on your machine."
112 + ewarn
113 + fi
114 +}