summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/pmount
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/pmount')
-rw-r--r--sys-apps/pmount/Manifest1
-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.ebuild83
-rw-r--r--sys-apps/pmount/pmount-0.9.99_alpha-r5.ebuild86
7 files changed, 337 insertions, 0 deletions
diff --git a/sys-apps/pmount/Manifest b/sys-apps/pmount/Manifest
new file mode 100644
index 000000000000..c511235b05c7
--- /dev/null
+++ b/sys-apps/pmount/Manifest
@@ -0,0 +1 @@
+DIST pmount_0.9.99-alpha.orig.tar.bz2 364282 SHA256 ca06bd0c429d3db9382433f378d07bf763534f70fe71015322678e321b0679e5 SHA512 12105674f099afb82302c0960f4f50a4bc75382071940e897d9c65b57a0f4de1fafdaa2a4c05f0fa5cba55453ae0c21376b9891353cad1afa88e5fbd9f63d5e9 WHIRLPOOL 18172b606f20f1b95ff0b60fa5c83de14c04fa2b774598fdf1ef21746c0cc77c63469ed436d752d7a172e90847b38635b08e3e80db28294fdf3d102408cbdfc9
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..5cb9324943ab
--- /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>
+ <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..184d07a7dfa8
--- /dev/null
+++ b/sys-apps/pmount/pmount-0.9.99_alpha-r3.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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..f5052e7fe24a
--- /dev/null
+++ b/sys-apps/pmount/pmount-0.9.99_alpha-r5.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+}