diff --git a/alarm/devtools-alarm/PKGBUILD b/alarm/devtools-alarm/PKGBUILD index dd7112b62..61be9f570 100644 --- a/alarm/devtools-alarm/PKGBUILD +++ b/alarm/devtools-alarm/PKGBUILD @@ -7,7 +7,7 @@ pkgname=devtools-alarm _pkgname=devtools pkgver=20171108 -pkgrel=1 +pkgrel=2 pkgdesc='Tools for Arch Linux ARM package maintainers' arch=('any') license=('GPL') @@ -16,6 +16,7 @@ conflicts=('devtools') provides=('devtools') depends=('namcap' 'openssh' 'subversion' 'rsync' 'arch-install-scripts') source=("https://sources.archlinux.org/other/$_pkgname/$_pkgname-$pkgver.tar.gz" + 'add-etc-shadow-entry-for-builduser.patch' '0001-makechrootpkg-cache-dir.patch' '0002-arch-nspawn-keep-mirrorlist.patch' '0003-makechrootpkg-distcc.patch' @@ -25,6 +26,7 @@ source=("https://sources.archlinux.org/other/$_pkgname/$_pkgname-$pkgver.tar.gz" '0007-makechrootpkg-don-t-delete-MAKEFLAGS-and-PACKAGER.patch' '0008-fix-namcap-running-by-default.patch') md5sums=('4a24b99bc1cffc63634eb7b3f5b116f1' + '573830ee23ecffa4971fbc36e5e2b666' '3cac269603dfd9c2f9c4c2be24e8b149' '1f74c22f44a4f2e39cafbd07d03595d5' '2a85106eb9b7ffab1eacf41276ce070c' @@ -36,6 +38,7 @@ md5sums=('4a24b99bc1cffc63634eb7b3f5b116f1' prepare() { cd "${_pkgname}-${pkgver}" + patch -Np1 -i ../add-etc-shadow-entry-for-builduser.patch patch -p1 -i ../0001-makechrootpkg-cache-dir.patch patch -p1 -i ../0002-arch-nspawn-keep-mirrorlist.patch patch -p1 -i ../0003-makechrootpkg-distcc.patch diff --git a/alarm/devtools-alarm/add-etc-shadow-entry-for-builduser.patch b/alarm/devtools-alarm/add-etc-shadow-entry-for-builduser.patch new file mode 100644 index 000000000..ae6658851 --- /dev/null +++ b/alarm/devtools-alarm/add-etc-shadow-entry-for-builduser.patch @@ -0,0 +1,32 @@ +From 5713cd629c97c7a12a600a1dd73ad81d87374eb1 Mon Sep 17 00:00:00 2001 +From: Evangelos Foutras +Date: Sat, 12 May 2018 11:52:18 +0300 +Subject: [PATCH] makechrootpkg: add /etc/shadow entry for builduser + +Without it, sudo 1.8.23 will return an error: + + sudo: PAM account management error: Authentication + service cannot retrieve authentication info +--- + makechrootpkg.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/makechrootpkg.in b/makechrootpkg.in +index 8e33499..57231d5 100644 +--- a/makechrootpkg.in ++++ b/makechrootpkg.in +@@ -176,9 +176,10 @@ prepare_chroot() { + # We can't use useradd without chrooting, otherwise it invokes PAM modules + # which we might not be able to load (i.e. when building i686 packages on + # an x86_64 host). +- sed -e '/^builduser:/d' -i "$copydir"/etc/{passwd,group} ++ sed -e '/^builduser:/d' -i "$copydir"/etc/{passwd,shadow,group} + printf >>"$copydir/etc/group" 'builduser:x:%d:\n' "$builduser_gid" + printf >>"$copydir/etc/passwd" 'builduser:x:%d:%d:builduser:/build:/bin/bash\n' "$builduser_uid" "$builduser_gid" ++ printf >>"$copydir/etc/shadow" 'builduser:!!:%d::::::\n' "$(( $(date -u +%s) / 86400 ))" + + $install -d "$copydir"/{build,build/.gnupg,startdir,{pkg,srcpkg,src,log}dest} + +-- +2.17.0 +