summaryrefslogtreecommitdiff
path: root/core/sudo
diff options
context:
space:
mode:
Diffstat (limited to 'core/sudo')
-rw-r--r--core/sudo/PKGBUILD18
-rw-r--r--core/sudo/sudo.install19
-rw-r--r--core/sudo/sudo.tmpfiles.conf1
3 files changed, 35 insertions, 3 deletions
diff --git a/core/sudo/PKGBUILD b/core/sudo/PKGBUILD
index 451604289..24fd68940 100644
--- a/core/sudo/PKGBUILD
+++ b/core/sudo/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 205612 2014-02-09 15:37:47Z foutrelis $
+# $Id: PKGBUILD 208214 2014-03-19 11:02:09Z foutrelis $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=sudo
-_sudover=1.8.9p5
+_sudover=1.8.10p2
pkgver=${_sudover/p/.p}
pkgrel=1
pkgdesc="Give certain users the ability to run some commands as root"
@@ -14,10 +14,13 @@ license=('custom')
groups=('base-devel')
depends=('glibc' 'pam' 'libldap')
backup=('etc/sudoers' 'etc/pam.d/sudo')
+install=$pkgname.install
source=(http://www.sudo.ws/sudo/dist/$pkgname-$_sudover.tar.gz{,.sig}
+ sudo.tmpfiles.conf
sudo.pam)
-sha256sums=('bc9d5c96de5f8b4d2b014f87a37870aef60d2891c869202454069150a21a5c21'
+sha256sums=('ba6cb8db6dccdb92a96e8ae63ca65c410f8b61270b603ab9af4b1154fef379f1'
'SKIP'
+ '080dd97111b3149f8d140ffac68c88acd63da9eacc81fbcc7c43591be13b42fe'
'd1738818070684a5d2c9b26224906aad69a4fea77aabd960fc2675aee2df1fa2')
build() {
@@ -27,6 +30,8 @@ build() {
--prefix=/usr \
--sbindir=/usr/bin \
--libexecdir=/usr/lib \
+ --with-rundir=/run/sudo \
+ --with-vardir=/var/db/sudo \
--with-logfac=auth \
--with-pam \
--with-ldap \
@@ -46,6 +51,13 @@ package() {
cd "$srcdir/$pkgname-$_sudover"
make DESTDIR="$pkgdir" install
+ # Remove /run/sudo directory from the package; we create it using tmpfiles.d
+ rmdir "$pkgdir/run/sudo"
+ rmdir "$pkgdir/run"
+
+ install -Dm644 "$srcdir/sudo.tmpfiles.conf" \
+ "$pkgdir/usr/lib/tmpfiles.d/sudo.conf"
+
install -Dm644 "$srcdir/sudo.pam" "$pkgdir/etc/pam.d/sudo"
install -Dm644 doc/LICENSE "$pkgdir/usr/share/licenses/sudo/LICENSE"
diff --git a/core/sudo/sudo.install b/core/sudo/sudo.install
new file mode 100644
index 000000000..1369cc122
--- /dev/null
+++ b/core/sudo/sudo.install
@@ -0,0 +1,19 @@
+post_install() {
+ if type -P systemd-tmpfiles >/dev/null; then
+ systemd-tmpfiles --create sudo.conf
+ fi
+}
+
+pre_upgrade() {
+ # Permissions of /var/db/sudo were changed from 0700 to 0711 in sudo 1.8.10
+ # http://www.sudo.ws/repos/sudo/rev/5c38d77a2d0c
+ if (($(vercmp $2 1.8.10-1) < 0)); then
+ chmod 0711 var/db/sudo
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/core/sudo/sudo.tmpfiles.conf b/core/sudo/sudo.tmpfiles.conf
new file mode 100644
index 000000000..0bab61444
--- /dev/null
+++ b/core/sudo/sudo.tmpfiles.conf
@@ -0,0 +1 @@
+d /run/sudo 0711 root root -