99 lines
3 KiB
Bash
99 lines
3 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgname=sudo
|
|
_sudover=1.9.14p3
|
|
pkgrel=01
|
|
pkgver=${_sudover/p/.p}
|
|
pkgdesc="Give certain users the ability to run some commands as root w/o systemd"
|
|
url="https://www.sudo.ws/sudo/"
|
|
groups=( jobbot )
|
|
depends=('glibc' 'openssl' 'pam' 'libldap' 'zlib')
|
|
backup=('etc/pam.d/sudo'
|
|
'etc/sudo.conf'
|
|
'etc/sudo_logsrvd.conf'
|
|
'etc/sudoers')
|
|
install=$pkgname.install
|
|
source=(https://www.sudo.ws/sudo/dist/$pkgname-$_sudover.tar.gz{,.sig}
|
|
# $pkgname-CVE-2022-43995.patch::https://github.com/sudo-project/sudo/commit/bd209b9f16fc.patch
|
|
# sudo_logsrvd.service
|
|
# $pkgname-configure-add-missing-bracket.patch::https://github.com/sudo-project/sudo/commit/defec5d46eec.patch
|
|
# $pkgname-tests-pick-first-utf-8-locale.patch::https://github.com/sudo-project/sudo/commit/2845ceafb06d.patch
|
|
sudo.pam)
|
|
|
|
prepare() {
|
|
cd $pkgname-$_sudover
|
|
|
|
# https://github.com/sudo-project/sudo/issues/238
|
|
# patch -Np1 -i ../$pkgname-configure-add-missing-bracket.patch
|
|
|
|
# https://github.com/sudo-project/sudo/issues/241
|
|
# patch -Np1 -i ../$pkgname-tests-pick-first-utf-8-locale.patch
|
|
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname-$_sudover
|
|
./configure \
|
|
--prefix=/usr \
|
|
--sbindir=/usr/bin \
|
|
--libexecdir=/usr/lib \
|
|
--with-rundir=/run/sudo \
|
|
--with-vardir=/var/db/sudo \
|
|
--with-logfac=auth \
|
|
--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-insults=no
|
|
make
|
|
}
|
|
|
|
# # fails 2 checks and fails to build with check
|
|
# # again 1.10 fails 2 tests
|
|
#check() {
|
|
# cd "$srcdir/$pkgname-$_sudover"
|
|
# make check
|
|
#}
|
|
#
|
|
|
|
package() {
|
|
depends+=('libcrypto.so' 'libssl.so')
|
|
|
|
cd $pkgname-$_sudover
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
# 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
|
|
## useless as well in joborun-pkg
|
|
rmdir "$pkgdir/run/sudo"
|
|
rmdir "$pkgdir/run"
|
|
|
|
install -Dm644 "$srcdir/sudo.pam" "$pkgdir/etc/pam.d/sudo"
|
|
install -Dm644 LICENSE.md -t "$pkgdir/usr/share/licenses/sudo"
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=('custom')
|
|
|
|
validpgpkeys=('59D1E9CCBA2B376704FDD35BA9F4C021CEA470FB') # "Todd C. Miller <Todd.Miller@sudo.ws>"
|
|
|
|
sha256sums=(a08318b1c4bc8582c004d4cd9ae2903abc549e7e46ba815e41fe81d1c0782b62 # sudo-1.9.14p3.tar.gz
|
|
3df2a6d3cb2645b1a7b00f4d1413f551b3c32f1ad21b02573ee667053031c163 # sudo-1.9.14p3.tar.gz.sig
|
|
d1738818070684a5d2c9b26224906aad69a4fea77aabd960fc2675aee2df1fa2) # sudo.pam
|
|
|
|
## 94f5277a3c6436d18f9f645e0ce9a8e6fb84ee7a465e6519b2646f1d830242a5 sudo-1.9.14.p3-01-x86_64.pkg.tar.lz
|
|
|