alarm/devtools-alarm to 20171108-2

This commit is contained in:
Kevin Mihelich 2018-05-12 17:15:15 +00:00
parent 21c7ef25fe
commit 3d624e8af7
2 changed files with 36 additions and 1 deletions

View file

@ -7,7 +7,7 @@
pkgname=devtools-alarm pkgname=devtools-alarm
_pkgname=devtools _pkgname=devtools
pkgver=20171108 pkgver=20171108
pkgrel=1 pkgrel=2
pkgdesc='Tools for Arch Linux ARM package maintainers' pkgdesc='Tools for Arch Linux ARM package maintainers'
arch=('any') arch=('any')
license=('GPL') license=('GPL')
@ -16,6 +16,7 @@ conflicts=('devtools')
provides=('devtools') provides=('devtools')
depends=('namcap' 'openssh' 'subversion' 'rsync' 'arch-install-scripts') depends=('namcap' 'openssh' 'subversion' 'rsync' 'arch-install-scripts')
source=("https://sources.archlinux.org/other/$_pkgname/$_pkgname-$pkgver.tar.gz" source=("https://sources.archlinux.org/other/$_pkgname/$_pkgname-$pkgver.tar.gz"
'add-etc-shadow-entry-for-builduser.patch'
'0001-makechrootpkg-cache-dir.patch' '0001-makechrootpkg-cache-dir.patch'
'0002-arch-nspawn-keep-mirrorlist.patch' '0002-arch-nspawn-keep-mirrorlist.patch'
'0003-makechrootpkg-distcc.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' '0007-makechrootpkg-don-t-delete-MAKEFLAGS-and-PACKAGER.patch'
'0008-fix-namcap-running-by-default.patch') '0008-fix-namcap-running-by-default.patch')
md5sums=('4a24b99bc1cffc63634eb7b3f5b116f1' md5sums=('4a24b99bc1cffc63634eb7b3f5b116f1'
'573830ee23ecffa4971fbc36e5e2b666'
'3cac269603dfd9c2f9c4c2be24e8b149' '3cac269603dfd9c2f9c4c2be24e8b149'
'1f74c22f44a4f2e39cafbd07d03595d5' '1f74c22f44a4f2e39cafbd07d03595d5'
'2a85106eb9b7ffab1eacf41276ce070c' '2a85106eb9b7ffab1eacf41276ce070c'
@ -36,6 +38,7 @@ md5sums=('4a24b99bc1cffc63634eb7b3f5b116f1'
prepare() { prepare() {
cd "${_pkgname}-${pkgver}" cd "${_pkgname}-${pkgver}"
patch -Np1 -i ../add-etc-shadow-entry-for-builduser.patch
patch -p1 -i ../0001-makechrootpkg-cache-dir.patch patch -p1 -i ../0001-makechrootpkg-cache-dir.patch
patch -p1 -i ../0002-arch-nspawn-keep-mirrorlist.patch patch -p1 -i ../0002-arch-nspawn-keep-mirrorlist.patch
patch -p1 -i ../0003-makechrootpkg-distcc.patch patch -p1 -i ../0003-makechrootpkg-distcc.patch

View file

@ -0,0 +1,32 @@
From 5713cd629c97c7a12a600a1dd73ad81d87374eb1 Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <evangelos@foutrelis.com>
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