summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Delgado2021-02-22 19:47:18 -0500
committerDylan Delgado2021-02-22 19:47:18 -0500
commitfe0d01c1fc264c77f2d939de1e5a4f2b4438608a (patch)
tree409b3bf8a9bd32ba3d7767ad4e656b7dfb7cf9d9
downloadaur-fe0d01c1fc264c77f2d939de1e5a4f2b4438608a.tar.gz
Initial commit
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD81
-rw-r--r--sudo.install9
-rw-r--r--sudo.pam4
-rw-r--r--sudo_logsrvd.service13
5 files changed, 135 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9a2874af2e3c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = sudo
+ pkgdesc = Give certain users the ability to run some commands as root - git version
+ pkgver = SUDO_1_9_0.r543.g5fc6b8c17
+ pkgrel = 1
+ url = https://www.sudo.ws/sudo/
+ install = sudo.install
+ arch = x86_64
+ license = custom
+ depends = glibc
+ depends = libgcrypt
+ depends = pam
+ depends = libldap
+ depends = zlib
+ provides = sudo
+ conflicts = sudo
+ backup = etc/pam.d/sudo
+ backup = etc/sudo.conf
+ backup = etc/sudo_logsrvd.conf
+ backup = etc/sudoers
+ source = git://github.com/sudo-project/sudo.git
+ source = sudo_logsrvd.service
+ source = sudo.pam
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = d1738818070684a5d2c9b26224906aad69a4fea77aabd960fc2675aee2df1fa2
+
+pkgname = sudo
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c55b5a3ffc56
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,81 @@
+# Maintainer: Dylan Delgado <dylan1496 at live dot com>
+# sudo.install, sudo_logsrvd.service and sudo.pam taken from the archlinux/svntogit-packages repo: https://github.com/archlinux/svntogit-packages/tree/master/sudo/trunk
+
+pkgname=sudo
+pkgrel=1
+pkgver=SUDO_1_9_0.r543.g5fc6b8c17
+pkgdesc="Give certain users the ability to run some commands as root - git version"
+arch=('x86_64')
+url="https://www.sudo.ws/sudo/"
+license=('custom')
+depends=('glibc' 'libgcrypt' 'pam' 'libldap' 'zlib')
+conflicts=('sudo')
+provides=('sudo')
+backup=('etc/pam.d/sudo'
+ 'etc/sudo.conf'
+ 'etc/sudo_logsrvd.conf'
+ 'etc/sudoers')
+install=$pkgname.install
+source=("git://github.com/sudo-project/sudo.git"
+ sudo_logsrvd.service
+ sudo.pam)
+sha256sums=('SKIP'
+ 'SKIP'
+ 'd1738818070684a5d2c9b26224906aad69a4fea77aabd960fc2675aee2df1fa2')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$srcdir/$pkgname"
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib \
+ --with-rundir=/run/sudo \
+ --with-vardir=/var/db/sudo \
+ --with-logfac=auth \
+ --enable-gcrypt \
+ --enable-tmpfiles.d \
+ --with-pam \
+ --with-sssd \
+ --with-ldap \
+ --with-ldap-conf-file=/etc/openldap/ldap.conf \
+ --with-env-editor \
+ --with-passprompt="[sudo] password for %p: " \
+ --with-all-insults
+ make
+}
+
+check() {
+ cd "$srcdir/$pkgname"
+ make check
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ make DESTDIR="$pkgdir" install
+
+ # sudo_logsrvd service file (taken from sudo-logsrvd-1.9.0-1.el8.x86_64.rpm)
+ install -Dm644 -t "$pkgdir/usr/lib/systemd/system" ../sudo_logsrvd.service
+
+ # Remove sudoers.dist; not needed since pacman manages updates to sudoers
+ rm "$pkgdir/etc/sudoers.dist"
+
+ # Remove /run/sudo directory; we create it using systemd-tmpfiles
+ rmdir "$pkgdir/run/sudo"
+ rmdir "$pkgdir/run"
+
+ install -Dm644 "$srcdir/sudo.pam" "$pkgdir/etc/pam.d/sudo"
+
+ install -Dm644 doc/LICENSE "$pkgdir/usr/share/licenses/sudo/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/sudo.install b/sudo.install
new file mode 100644
index 000000000000..abf58e37b8bd
--- /dev/null
+++ b/sudo.install
@@ -0,0 +1,9 @@
+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
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/sudo.pam b/sudo.pam
new file mode 100644
index 000000000000..ab053c543002
--- /dev/null
+++ b/sudo.pam
@@ -0,0 +1,4 @@
+#%PAM-1.0
+auth include system-auth
+account include system-auth
+session include system-auth
diff --git a/sudo_logsrvd.service b/sudo_logsrvd.service
new file mode 100644
index 000000000000..a62fef1c137a
--- /dev/null
+++ b/sudo_logsrvd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Sudo central log server
+Documentation=man:sudo_logsrvd(8) man:sudo_logsrvd.conf(5)
+Documentation=https://www.sudo.ws/man.html
+After=syslog.target network.target auditd.service
+
+[Service]
+ExecStart=/usr/bin/sudo_logsrvd -n
+KillMode=process
+Type=exec
+
+[Install]
+WantedBy=multi-user.target