X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 7B2DCDC71EB for ; Tue, 5 May 2015 00:26:55 +0000 (UTC) Received: from apollo.thewebhostserver.com (apollomail.thewebhostserver.com [46.23.65.248]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 3B1E2DC1651 for ; Tue, 5 May 2015 00:26:50 +0000 (UTC) Received: from [81.4.121.188] (port=56900 helo=localhost.localdomain) by apollo.thewebhostserver.com with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.85) (envelope-from ) id 1YpQhC-000G2w-3n; Tue, 05 May 2015 01:26:46 +0100 From: Stuart Cardall To: alpine-aports@lists.alpinelinux.org Cc: Stuart Cardall Subject: [alpine-aports] [PATCH 3/3] testing/udevil: new aport Date: Tue, 5 May 2015 00:26:28 +0000 Message-Id: <1430785588-65737-3-git-send-email-developer@it-offshore.co.uk> X-Mailer: git-send-email 2.4.0 In-Reply-To: <1430785588-65737-1-git-send-email-developer@it-offshore.co.uk> References: <1430785588-65737-1-git-send-email-developer@it-offshore.co.uk> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - apollo.thewebhostserver.com X-AntiAbuse: Original Domain - lists.alpinelinux.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - it-offshore.co.uk X-Get-Message-Sender-Via: apollo.thewebhostserver.com: authenticated_id: developer@it-offshore.co.uk X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: the build server will need the plugdev group for chown to succeed udevil is an alternative to udisks: https://ignorantguru.github.io/udevil/ Mount / unmount removable devices without being root (also mounts ISO / nfs://, smb://, ftp://, ssh:// WebDAV URLs, and tmpfs/ramfs. SUID bit removed & tested as in & out of the plugdev group. --- testing/udevil/APKBUILD | 44 ++++++++++++++++++++++++++++++++++++++ testing/udevil/udevil.post-install | 22 +++++++++++++++++++ testing/udevil/udevil.pre-install | 4 ++++ 3 files changed, 70 insertions(+) create mode 100644 testing/udevil/APKBUILD create mode 100644 testing/udevil/udevil.post-install create mode 100644 testing/udevil/udevil.pre-install diff --git a/testing/udevil/APKBUILD b/testing/udevil/APKBUILD new file mode 100644 index 0000000..e0147fc --- /dev/null +++ b/testing/udevil/APKBUILD @@ -0,0 +1,44 @@ +# Contributor: Stuart Cardall +# Maintainer: Stuart Cardall +pkgname=udevil +pkgver=0.4.4 +pkgrel=0 +pkgdesc="Mount / unmount removable devices without a password (udisks alternative)" +url="http://ignorantguru.github.io/udevil" +arch="all" +license="GPL3+" +makedepends="$depends_dev glib-dev udev-dev intltool" +install="$pkgname.post-install $pkgname.pre-install" +subpackages="$pkgname-lang" +source="$pkgname-$pkgver.tar.gz::https://github.com/IgnorantGuru/$pkgname/archive/$pkgver.tar.gz" + +_builddir="$srcdir"/$pkgname-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + ./configure \ + --prefix=/usr \ + --disable-systemd || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make -j1 DESTDIR="$pkgdir" install || return 1 + chown root:plugdev "$pkgdir"/usr/bin/udevil || return 1 + chmod u+s,go-s,o-x "$pkgdir"/usr/bin/udevil # remove SUID bit +# chmod ugo-s,ugo+x "$pkgdir"/usr/bin/udevil #remove SUID bit completely +} + +md5sums="281aa065d92c679cb41728069e72b272 udevil-0.4.4.tar.gz" +sha256sums="ad2fd8375bd62622718a04235e9772119459089938dbb78e657955e595822b7c udevil-0.4.4.tar.gz" +sha512sums="adce4916e06d1cc4965521abbcbc2901e53930691167f431cb18e28d3ef8bde740e95a6a5f40dfc58dfd7b4b661b4475d3dd2b6174a5d7a55ae7c65629b82327 udevil-0.4.4.tar.gz" diff --git a/testing/udevil/udevil.post-install b/testing/udevil/udevil.post-install new file mode 100644 index 0000000..f2485ed --- /dev/null +++ b/testing/udevil/udevil.post-install @@ -0,0 +1,22 @@ +#!/bin/sh + +NORMAL="\033[1;0m" +STRONG="\033[1;1m" +GREEN="\033[1;32m" + +print_strong() { + local prompt="${STRONG}$1 ${GREEN}$2${NORMAL}" + printf "${prompt} %s\n" +} + +print_strong "\nTo mount / unmount devices without the root password:" " add your user account to the 'plugdev' group." +print_strong "\nOptional dependencies:" +print_strong "\nzenity: " " (devmon popups)" +print_strong "davfs2: " " (mount WebDAV resources)" +print_strong "cifs-utils: " " (mounting samba shares)" +print_strong "curlftpfs: " " (mounting ftp shares)" +print_strong "nfs-utils: " " (mounting nfs shares)" +print_strong "sshfs-fuse: " " (mounting sftp shares)" +print_strong "eject: " " (eject via devmon)" +exit 0 + diff --git a/testing/udevil/udevil.pre-install b/testing/udevil/udevil.pre-install new file mode 100644 index 0000000..bd4b7de --- /dev/null +++ b/testing/udevil/udevil.pre-install @@ -0,0 +1,4 @@ +#!/bin/sh +addgroup -S plugdev 2>/dev/null +exit 0 + -- 2.4.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---