aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored neville <ed@s5h.net>2021-07-19 21:00:31 +0100
committerKevin Daudt <kdaudt@alpinelinux.org>2021-09-02 17:32:05 +0000
commite56c334da79cabe194243f226a5e8caf5f436b1d (patch)
tree40e5669c3db207f630b0e432e743255311ca9a20
parent9d2f65930162d4f60251cdd245a6276caaea2a0f (diff)
downloadaports-e56c334da79cabe194243f226a5e8caf5f436b1d.tar.gz
aports-e56c334da79cabe194243f226a5e8caf5f436b1d.tar.bz2
aports-e56c334da79cabe194243f226a5e8caf5f436b1d.tar.xz
testing/please: new aport
https://gitlab.com/edneville/please memory safe rust alternative to sudo
-rw-r--r--testing/please/APKBUILD48
-rw-r--r--testing/please/please.pam4
2 files changed, 52 insertions, 0 deletions
diff --git a/testing/please/APKBUILD b/testing/please/APKBUILD
new file mode 100644
index 0000000000..1b6449b20a
--- /dev/null
+++ b/testing/please/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Ed Neville <ed@s5h.net>
+# Maintainer: Ed Neville <ed@s5h.net>
+pkgname=please
+pkgver=0.4.2
+pkgrel=0
+pkgdesc="sudo alternative with regex support"
+url="https://gitlab.com/edneville/please"
+arch="all !s390x !mips64 !riscv64" # limited by rust/cargo
+license="GPL-3.0-or-later"
+makedepends="cargo linux-pam-dev chrpath"
+source="https://gitlab.com/edneville/please/-/archive/v$pkgver/please-v$pkgver.tar.gz"
+options="suid" # Required to call setuid with target uids
+builddir="$srcdir/$pkgname-v$pkgver"
+subpackages="$pkgname-doc"
+
+build() {
+ cargo build --release --locked
+}
+
+check() {
+ cargo test --locked
+}
+
+doc() {
+ default_doc
+}
+
+package() {
+ install -Dm4755 target/release/please "$pkgdir/usr/bin/please"
+ install -Dm4755 target/release/pleaseedit "$pkgdir/usr/bin/pleaseedit"
+ chrpath -d "$pkgdir"/usr/bin/please*
+
+ cp "$builddir/man/please.1" "$builddir/man/pleaseedit.1"
+ install -Dm644 "$builddir/man/please.1" "$pkgdir/usr/share/man/man1/please.1"
+ install -Dm644 "$builddir/man/pleaseedit.1" "$pkgdir/usr/share/man/man1/pleaseedit.1"
+ install -Dm644 "$builddir/man/please.ini.5" "$pkgdir/usr/share/man/man5/please.ini.5"
+ install -Dm644 "$builddir/examples/please.ini" "$pkgdir/usr/share/doc/$pkgname/please.ini"
+ install -Dm644 "$builddir/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
+
+ mkdir -p "$pkgdir/etc/pam.d"
+ for pamf in please pleaseedit; do
+ install -Dm0644 "$srcdir/../please.pam" "$pkgdir/etc/pam.d/$pamf"
+ done
+}
+
+sha512sums="
+38958b3a1a249124d0bc9d49cec96c252091a1adb96082a2af8784ee418efce368e0c8892eefb256ecc9b701e76f26aa5d94f1c504345d8a48721a3f254c172b please-v0.4.2.tar.gz
+"
diff --git a/testing/please/please.pam b/testing/please/please.pam
new file mode 100644
index 0000000000..6c8fac30ae
--- /dev/null
+++ b/testing/please/please.pam
@@ -0,0 +1,4 @@
+auth include base-auth
+account include base-account
+password include base-password
+session include base-session