Gentoo Archives: gentoo-commits

From: Piotr Karbowski <slashbeast@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/pmount/, sys-apps/pmount/files/
Date: Sun, 02 Aug 2020 18:40:34
Message-Id: 1596393616.a23022d217ec3068127bb88b1898e1f37a88ba15.slashbeast@gentoo
1 commit: a23022d217ec3068127bb88b1898e1f37a88ba15
2 Author: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 2 18:38:22 2020 +0000
4 Commit: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 2 18:40:16 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a23022d2
7
8 sys-apps/pmount: 0.9.99_alpha-r6 bump with exfat support.
9
10 Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org>
11
12 .../files/pmount-0.9.99_alpha-exfat-support.patch | 12 +++
13 sys-apps/pmount/pmount-0.9.99_alpha-r6.ebuild | 87 ++++++++++++++++++++++
14 2 files changed, 99 insertions(+)
15
16 diff --git a/sys-apps/pmount/files/pmount-0.9.99_alpha-exfat-support.patch b/sys-apps/pmount/files/pmount-0.9.99_alpha-exfat-support.patch
17 new file mode 100644
18 index 00000000000..b5f1074e24b
19 --- /dev/null
20 +++ b/sys-apps/pmount/files/pmount-0.9.99_alpha-exfat-support.patch
21 @@ -0,0 +1,12 @@
22 +diff --git a/src/fs.c b/src/fs.c
23 +index 65ea0c7..2a12b60 100644
24 +--- a/src/fs.c
25 ++++ b/src/fs.c
26 +@@ -21,6 +21,7 @@
27 + static struct FS supported_fs[] = {
28 + { "udf", "nosuid,nodev,user", 1, "000", ",iocharset=%s" },
29 + { "iso9660", "nosuid,nodev,user", 1, NULL, ",iocharset=%s" },
30 ++ { "exfat", "nosuid,nodev,user", 1, "077"},
31 + { "vfat", "nosuid,nodev,user,quiet,shortname=mixed", 1, "077",
32 + ",iocharset=%s",",fmask=%04o,dmask=%04o"},
33 + { "hfsplus", "nosuid,nodev,user", 1, NULL, 0 },
34
35 diff --git a/sys-apps/pmount/pmount-0.9.99_alpha-r6.ebuild b/sys-apps/pmount/pmount-0.9.99_alpha-r6.ebuild
36 new file mode 100644
37 index 00000000000..8336e554d75
38 --- /dev/null
39 +++ b/sys-apps/pmount/pmount-0.9.99_alpha-r6.ebuild
40 @@ -0,0 +1,87 @@
41 +# Copyright 1999-2020 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=7
45 +inherit bash-completion-r1
46 +
47 +DESCRIPTION="Policy based mounter that gives the ability to mount removable devices as a user"
48 +HOMEPAGE="https://launchpad.net/pmount"
49 +SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV/_/-}.orig.tar.bz2"
50 +S=${WORKDIR}/${P/_/-}
51 +
52 +LICENSE="GPL-2"
53 +SLOT="0"
54 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
55 +IUSE="crypt"
56 +
57 +RDEPEND="
58 + acct-group/plugdev
59 + >=sys-apps/util-linux-2.17.2
60 + crypt? ( >=sys-fs/cryptsetup-1.0.6-r2 )"
61 +DEPEND="${RDEPEND}
62 + dev-util/intltool
63 + sys-devel/gettext"
64 +
65 +PATCHES=(
66 + "${FILESDIR}"/${PN}-0.9.19-testsuite-missing-dir.patch
67 + "${FILESDIR}"/${P}-locale-regex.patch
68 + "${FILESDIR}"/${P}-exfat-support.patch
69 +
70 +)
71 +
72 +src_prepare() {
73 + # Restore default value from pmount <= 0.9.23 wrt #393633
74 + sed -i -e '/^not_physically_logged_allow/s:=.*:= yes:' etc/pmount.conf || die
75 +
76 + cat <<-EOF > po/POTFILES.skip || die
77 + src/conffile.c
78 + src/configuration.c
79 + src/loop.c
80 + EOF
81 +
82 + default
83 +}
84 +
85 +src_configure() {
86 + econf --disable-hal
87 +}
88 +
89 +src_test() {
90 + local testdir=${S}/tests/check_fstab
91 +
92 + ln -s a "${testdir}/b" &&
93 + ln -s d "${testdir}/c" &&
94 + ln -s c "${testdir}/e" ||
95 + die "Unable to create fake symlinks required for testsuite"
96 +
97 + emake check
98 +}
99 +
100 +src_install() {
101 + # Must be run SETUID+SETGID, bug #250106
102 + exeinto /usr/bin
103 + exeopts -m 6710 -g plugdev
104 + doexe src/{p,pu}mount
105 +
106 + dodoc AUTHORS ChangeLog TODO
107 + doman man/{{p,pu}mount.1,pmount.conf.5}
108 +
109 + insinto /etc
110 + doins etc/pmount.{allow,conf}
111 +
112 + keepdir /media #501772
113 +
114 + newbashcomp "${FILESDIR}/${PN}.bash-completion" "${PN}"
115 + bashcomp_alias pmount pumount
116 +}
117 +
118 +pkg_postinst() {
119 + elog
120 + elog "This package has been installed setuid and setgid."
121 +
122 + elog "The permissions are as such that only users that belong to the plugdev"
123 + elog "group are allowed to run this. But if a script run by root mounts a"
124 + elog "device, members of the plugdev group will have access to it."
125 + elog
126 + elog "Please add your user to the plugdev group to be able to mount USB drives"
127 +}