summaryrefslogtreecommitdiff
path: root/sys-apps/pmount
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/pmount
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/pmount')
-rw-r--r--sys-apps/pmount/Manifest9
-rw-r--r--sys-apps/pmount/files/pmount-0.9.19-testsuite-missing-dir.patch43
-rw-r--r--sys-apps/pmount/files/pmount-0.9.99_alpha-locale-regex.patch22
-rw-r--r--sys-apps/pmount/files/pmount.bash-completion94
-rw-r--r--sys-apps/pmount/metadata.xml8
-rw-r--r--sys-apps/pmount/pmount-0.9.99_alpha-r3.ebuild82
-rw-r--r--sys-apps/pmount/pmount-0.9.99_alpha-r5.ebuild85
7 files changed, 343 insertions, 0 deletions
diff --git a/sys-apps/pmount/Manifest b/sys-apps/pmount/Manifest
new file mode 100644
index 000000000000..d6fb8dfa710f
--- /dev/null
+++ b/sys-apps/pmount/Manifest
@@ -0,0 +1,9 @@
+AUX pmount-0.9.19-testsuite-missing-dir.patch 1354 SHA256 cbb513b5cfb8d12685e5967359ab4f99b78a144df255f4e6a3ce70686f8b7b10 SHA512 a606b937a39c558fa5c48544fa3451504d3c8f540de97d87630e0d3edd6a984b74d8c52fda189aef818e007820ee146daf6b3ce75aad03b3e8e4309723f5113c WHIRLPOOL 929e2e4e21df0efb56837ed0ec1c07c8a7a5cdb54725eca76aa878c39bbc22e795fea6d897dcb917c51e4758b410889ded997d9b680543192baa47b523d251a9
+AUX pmount-0.9.99_alpha-locale-regex.patch 749 SHA256 149a8e6cfaa5437d26f26d17ce7590dfb80ed6171cde0bc8aaed1f1e088f268e SHA512 9009544a6d424dc6449d8f1ba53521802741b904129e1f4cd729a1051735fda3d6fcfe85d5aa49f6fbc5df62abbcb21fd7ab578cee667efaf3e4c00dc1b8131c WHIRLPOOL 982438fc720b35453bd57e83487690aba07eef29713aec716f1e98e219597b0e7f5bb6afabc26d779631d10f76a4158602ce9d2e051d855032bba806a3cf39d4
+AUX pmount.bash-completion 2935 SHA256 7a184dfd34f2e89123e2d6561582d6ed8ca3a03d0acb299497950a96761b2335 SHA512 b57a37afc2a124c6a4f19924a367d03b315e93575d0b152acde06e43c7dcd1b3d5df46c02d2e5ceef35911edb4f96d1d4113fb6d7cd1e9531fd9840c3729f924 WHIRLPOOL f6767196c5cc253331675792a15e47fa4b85663b69fb31850dd0e66c6cc385ffec54aea0e9c120b85fac592c3b40b8e780b92fc544387bacb86394e0f80f4765
+DIST pmount_0.9.99-alpha.orig.tar.bz2 364282 SHA256 ca06bd0c429d3db9382433f378d07bf763534f70fe71015322678e321b0679e5 SHA512 12105674f099afb82302c0960f4f50a4bc75382071940e897d9c65b57a0f4de1fafdaa2a4c05f0fa5cba55453ae0c21376b9891353cad1afa88e5fbd9f63d5e9 WHIRLPOOL 18172b606f20f1b95ff0b60fa5c83de14c04fa2b774598fdf1ef21746c0cc77c63469ed436d752d7a172e90847b38635b08e3e80db28294fdf3d102408cbdfc9
+EBUILD pmount-0.9.99_alpha-r3.ebuild 2018 SHA256 59b683c296f1ba54db6eb2d7f2112da8080cf33748eb2d65d54f8d061b037c05 SHA512 179c2588a00cb8b856899f99078dc21970664407f5b1fb278b91733577d72687429986270db4ea94dcd7cefbfbf9f886be3884a5a1fb4baa3e0d39cfc6a32b06 WHIRLPOOL 833ff3b04d7663d88e4b6c224d23267a697d66ed53dfff1964b6e58eb9b41d2155bd1d7c8cd82e64f3a9dbef4236138a94fffc32bcfa1977828689d4eb482b5f
+EBUILD pmount-0.9.99_alpha-r5.ebuild 2135 SHA256 8588e5def51674b17b249ef9b50f31534137c781fae745f4207a82bb42892b4a SHA512 accd02aee14bc964e807a0c26528da8b7910172a5c9a289b7033ff4121d3669c8b3828b5e7a47a0fc39fe0b480eac60ae0c07d3e085fe9d4f7f68e07ca0158b6 WHIRLPOOL 1a6016ed78d0a4a385247bcd31d2295e3aae05d9e2691d9adc2e571c1ce426af8bdd46b45ff135eb94e513c143075a5e3c50d1af728c0375913f59b34b6e4615
+MISC ChangeLog 2397 SHA256 46d62225a7d4bc18a0b02584713b3a049153d07e53148b7285b077305a8462e7 SHA512 d750ac2e7a4c34c37cbfd388d826295ccf86358a05dad74d0247f807501e4a899079bf5b7fac705983d4c39983b2b92a3c2430efd4591630ac2c1723dc99f070 WHIRLPOOL 8c854ba910221a0b91ecf8899f340c48e10dc6a22f90ec53a3d3d25f8a648662f7f2256219a09cd2f767bed364555f85563611c8728d111fef48962408ef754d
+MISC ChangeLog-2015 14423 SHA256 c0db42f10691b74f16e34d90417b93e2904c1b24b98e08045151df7d1ba8077a SHA512 06f7abda04505fb8a230fd906b71ec7b0135218f9986726a10a88b2056a2032c581b271eaaf7abd8b4e4e2c4ef875888ba42eeac9327641c3c892b1be7995c5e WHIRLPOOL aadfcaa42bd5d15fb1e4a0f43a3771c8cd7177df476be377dbdd01f02033f2bb181f8e24ecc15a5c3693f74402fb4d7c3c22819904c096f7e51b18bd34c3462d
+MISC metadata.xml 247 SHA256 34d6ed4186bad4ac57e0b4c08b657b14e28852a83c4ccf4d8a62f7829063b1cf SHA512 d6e2ea8a9d74791bcbf3d6311a66bafc20b8f4db3a576d9a8d54b86d7afb231122b8d87f71f3f46360980adf8d815c633b6d5041f9a30fc8656e8fb66057a282 WHIRLPOOL fbd18b3e6e3d777e8d78e91b8d32c5e357fd2a1c754d2c9add4622be682521e59556f466cba397d913f0e63265202744ceaf76dc7823be0a172a9bf4da6a2579
diff --git a/sys-apps/pmount/files/pmount-0.9.19-testsuite-missing-dir.patch b/sys-apps/pmount/files/pmount-0.9.19-testsuite-missing-dir.patch
new file mode 100644
index 000000000000..93d0555f0f3d
--- /dev/null
+++ b/sys-apps/pmount/files/pmount-0.9.19-testsuite-missing-dir.patch
@@ -0,0 +1,43 @@
+From d3f14cfd82cae939d9c487e9cb1a2973dc9b9a4f Mon Sep 17 00:00:00 2001
+From: Romain Perier <mrpouet@gentoo.org>
+Date: Wed, 23 Sep 2009 19:37:55 +0200
+Subject: [PATCH] Fix testsuite due to missing sub-directory (see gitweb on upstream)
+
+---
+ tests/check_fstab/a | 1 +
+ tests/check_fstab/d | 1 +
+ tests/check_fstab/fstab | 6 ++++++
+ 3 files changed, 8 insertions(+), 0 deletions(-)
+ create mode 100644 tests/check_fstab/a
+ create mode 100644 tests/check_fstab/d
+ create mode 100644 tests/check_fstab/fstab
+
+diff --git a/tests/check_fstab/a b/tests/check_fstab/a
+new file mode 100644
+index 0000000..d16d1c5
+--- /dev/null
++++ tests/check_fstab/a
+@@ -0,0 +1 @@
++This file is a 'dummy device file' for the fstab check
+diff --git a/tests/check_fstab/d b/tests/check_fstab/d
+new file mode 100644
+index 0000000..d16d1c5
+--- /dev/null
++++ tests/check_fstab/d
+@@ -0,0 +1 @@
++This file is a 'dummy device file' for the fstab check
+diff --git a/tests/check_fstab/fstab b/tests/check_fstab/fstab
+new file mode 100644
+index 0000000..8ba6f6c
+--- /dev/null
++++ tests/check_fstab/fstab
+@@ -0,0 +1,6 @@
++# A dummy fstab file for
++
++# <file system> <mount point> <type> <options> <dump> <pass>
++check_fstab/a /test1 ext3 defaults 0 0
++check_fstab/e /test2 ext3 defaults 0 0
++
+--
+1.6.5.rc1
+
diff --git a/sys-apps/pmount/files/pmount-0.9.99_alpha-locale-regex.patch b/sys-apps/pmount/files/pmount-0.9.99_alpha-locale-regex.patch
new file mode 100644
index 000000000000..c96fc0554522
--- /dev/null
+++ b/sys-apps/pmount/files/pmount-0.9.99_alpha-locale-regex.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/416985
+
+--- src/conffile.c
++++ src/conffile.c
+@@ -372,7 +372,7 @@ static int cf_prepare_regexps()
+ /* A regexp matching a boolean value*/
+
+ if( regcomp(&declaration_RE,
+- "^[[:blank:]]*([-a-zA-Z_]+)[[:blank:]]*"
++ "^[[:blank:]]*([-[:alpha:]_]+)[[:blank:]]*"
+ "=[[:blank:]]*(.*)$",
+ REG_EXTENDED )) {
+ perror(_("Could not compile regular expression for boolean values"));
+@@ -392,7 +392,7 @@ static int cf_prepare_regexps()
+ }
+
+ if( regcomp(&uint_RE,
+- "^[[:blank:]]*([a-zA-Z_]+)[[:blank:]]*"
++ "^[[:blank:]]*([[:alpha:]_]+)[[:blank:]]*"
+ "=[[:blank:]]*([0-9]+)$",
+ REG_EXTENDED )) {
+ perror(_("Could not compile regular expression for integer values"));
diff --git a/sys-apps/pmount/files/pmount.bash-completion b/sys-apps/pmount/files/pmount.bash-completion
new file mode 100644
index 000000000000..31b63020910c
--- /dev/null
+++ b/sys-apps/pmount/files/pmount.bash-completion
@@ -0,0 +1,94 @@
+#-*- mode: shell-script;-*-
+#
+# Bash Completion snippet for the pmount command
+# Copyright (c) Eduard Bloch, 2009-2011
+#
+# Supports most (all?) of the possible option sets of version 0.9.18 except of
+# too many device/directory arguments, the charset search can also be improved
+#
+# Inputs:
+# $1 -- name of the command whose arguments are being completed
+# $2 -- word being completed
+# $3 -- word preceding the word being completed
+# $COMP_LINE -- current command line
+# $COMP_PONT -- cursor position
+# $COMP_WORDS -- array containing individual words in the current
+# command line
+# $COMP_CWORD -- index into ${COMP_WORDS} of the word containing the
+# current cursor position
+# Output:
+# COMPREPLY array variable contains possible completions
+
+_pmount() {
+
+ local cur prev options devices fslist
+
+ options=' -r --read-only -w --read-write -s --sync -A --noatime -e --exec \
+ -t filesystem --type filesystem -c charset --charset charset -u umask \
+ --umask umask --dmask dmask --fmask fmask -p file --passphrase file \
+ -h --help -d --debug -V --version'
+ fslist=' ascii cp1250 cp1251 cp1255 cp437 cp737 cp775 cp850 cp852 cp855 cp857 cp860 cp861 cp862 cp863 cp864 cp865 cp866 cp869 cp874 cp932 cp936 cp949 cp950 euc-jp iso8859-1 iso8859-13 iso8859-14 iso8859-15 iso8859-2 iso8859-3 iso8859-4 iso8859-5 iso8859-6 iso8859-7 iso8859-9 koi8-r koi8-ru koi8-u utf8'
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(t|-type))
+ COMPREPLY=( $( grep "^[[:space:]]$cur" /proc/filesystems ) )
+ return 0
+ ;;
+
+ -@(c|-charset))
+ COMPREPLY=( $( compgen -W "$fslist" -- $cur ) )
+ return 0
+ ;;
+ -@(u|d|-umask|-dmask))
+ COMPREPLY=( ${cur}0 ${cur}1 ${cur}2 ${cur}3 ${cur}4 ${cur}5 ${cur}6 ${cur}7 )
+ return 0
+ ;;
+
+ -@(p|-passphrase))
+ _filedir
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ devices="$( command ls $(grep -v '^[[:space:]]*#' /etc/pmount.allow ) $(grep 1 /sys/block/*/removable | sed -e 's,/sys/block/,/dev/,;s,/removable:1,*,') 2>/dev/null | sort -u | sed -e 's,\(^/dev/\)\(.*\),\1\2 \2,' )"
+ COMPREPLY=( $( compgen -W "$devices" -- $cur ) )
+ fi
+
+ return 0
+}
+
+
+_pumount() {
+
+ local cur prev options devices mdir
+
+ mdir="$(readlink -f /media)"
+
+ options=' -l --luks-force -h --help -d --debug --version'
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ devices="$( grep $mdir /proc/mounts | sed -e 's,.*/$mdir/,,;s,\ .*,,;s,\(.*\),\1\n/dev/\1,;s,/dev//dev,/dev,' )"
+ COMPREPLY=( $( compgen -W "$devices" -- $cur ) )
+ fi
+
+ return 0
+}
+
+complete -F _pmount $filenames pmount
+complete -F _pumount $filenames pumount
+
diff --git a/sys-apps/pmount/metadata.xml b/sys-apps/pmount/metadata.xml
new file mode 100644
index 000000000000..0319eec4c8be
--- /dev/null
+++ b/sys-apps/pmount/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sys-apps/pmount/pmount-0.9.99_alpha-r3.ebuild b/sys-apps/pmount/pmount-0.9.99_alpha-r3.ebuild
new file mode 100644
index 000000000000..7f24b703357e
--- /dev/null
+++ b/sys-apps/pmount/pmount-0.9.99_alpha-r3.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user
+
+DESCRIPTION="Policy based mounter that gives the ability to mount removable devices as a user"
+HOMEPAGE="http://pmount.alioth.debian.org/"
+SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV/_/-}.orig.tar.bz2"
+#SRC_URI="http://alioth.debian.org/frs/download.php/3530/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86"
+IUSE="crypt"
+
+RDEPEND=">=sys-apps/util-linux-2.17.2
+ crypt? ( >=sys-fs/cryptsetup-1.0.6-r2 )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext"
+
+S=${WORKDIR}/${P/_/-}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # Restore default value from pmount <= 0.9.23 wrt #393633
+ sed -i -e '/^not_physically_logged_allow/s:=.*:= yes:' etc/pmount.conf || die
+
+ cat <<-EOF > po/POTFILES.skip
+ src/conffile.c
+ src/configuration.c
+ src/loop.c
+ EOF
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.19-testsuite-missing-dir.patch \
+ "${FILESDIR}"/${P}-locale-regex.patch
+}
+
+src_configure() {
+ econf --disable-hal
+}
+
+src_test() {
+ local testdir=${S}/tests/check_fstab
+
+ ln -s $testdir/a $testdir/b && ln -s $testdir/d $testdir/c && \
+ ln -s $testdir/c $testdir/e \
+ || die "Unable to create fake symlinks required for testsuite"
+
+ emake check
+}
+
+src_install () {
+ # Must be run SETUID+SETGID, bug #250106
+ exeinto /usr/bin
+ exeopts -m 6710 -g plugdev
+ doexe src/{p,pu}mount
+
+ dodoc AUTHORS ChangeLog TODO
+ doman man/{{p,pu}mount.1,pmount.conf.5}
+
+ insinto /etc
+ doins etc/pmount.{allow,conf}
+
+ keepdir /media #501772
+}
+
+pkg_postinst() {
+ elog
+ elog "This package has been installed setuid and setgid."
+
+ elog "The permissions are as such that only users that belong to the plugdev"
+ elog "group are allowed to run this. But if a script run by root mounts a"
+ elog "device, members of the plugdev group will have access to it."
+ elog
+ elog "Please add your user to the plugdev group to be able to mount USB drives"
+}
diff --git a/sys-apps/pmount/pmount-0.9.99_alpha-r5.ebuild b/sys-apps/pmount/pmount-0.9.99_alpha-r5.ebuild
new file mode 100644
index 000000000000..9b9c545be948
--- /dev/null
+++ b/sys-apps/pmount/pmount-0.9.99_alpha-r5.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user bash-completion-r1
+
+DESCRIPTION="Policy based mounter that gives the ability to mount removable devices as a user"
+HOMEPAGE="http://pmount.alioth.debian.org/"
+SRC_URI="mirror://debian/pool/main/p/${PN}/${PN}_${PV/_/-}.orig.tar.bz2"
+#SRC_URI="http://alioth.debian.org/frs/download.php/3530/${P/_/-}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="crypt"
+
+RDEPEND=">=sys-apps/util-linux-2.17.2
+ crypt? ( >=sys-fs/cryptsetup-1.0.6-r2 )"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ sys-devel/gettext"
+
+S=${WORKDIR}/${P/_/-}
+
+pkg_setup() {
+ enewgroup plugdev
+}
+
+src_prepare() {
+ # Restore default value from pmount <= 0.9.23 wrt #393633
+ sed -i -e '/^not_physically_logged_allow/s:=.*:= yes:' etc/pmount.conf || die
+
+ cat <<-EOF > po/POTFILES.skip
+ src/conffile.c
+ src/configuration.c
+ src/loop.c
+ EOF
+
+ epatch \
+ "${FILESDIR}"/${PN}-0.9.19-testsuite-missing-dir.patch \
+ "${FILESDIR}"/${P}-locale-regex.patch
+}
+
+src_configure() {
+ econf --disable-hal
+}
+
+src_test() {
+ local testdir=${S}/tests/check_fstab
+
+ ln -s $testdir/a $testdir/b && ln -s $testdir/d $testdir/c && \
+ ln -s $testdir/c $testdir/e \
+ || die "Unable to create fake symlinks required for testsuite"
+
+ emake check
+}
+
+src_install () {
+ # Must be run SETUID+SETGID, bug #250106
+ exeinto /usr/bin
+ exeopts -m 6710 -g plugdev
+ doexe src/{p,pu}mount
+
+ dodoc AUTHORS ChangeLog TODO
+ doman man/{{p,pu}mount.1,pmount.conf.5}
+
+ insinto /etc
+ doins etc/pmount.{allow,conf}
+
+ keepdir /media #501772
+
+ newbashcomp "${FILESDIR}/${PN}.bash-completion" "${PN}"
+ bashcomp_alias pmount pumount
+}
+
+pkg_postinst() {
+ elog
+ elog "This package has been installed setuid and setgid."
+
+ elog "The permissions are as such that only users that belong to the plugdev"
+ elog "group are allowed to run this. But if a script run by root mounts a"
+ elog "device, members of the plugdev group will have access to it."
+ elog
+ elog "Please add your user to the plugdev group to be able to mount USB drives"
+}