mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
alarm/devtools-alarm to 20180531-1
This commit is contained in:
parent
4d6fdb54e9
commit
1293d984dd
11 changed files with 67 additions and 181 deletions
|
@ -1,14 +1,14 @@
|
|||
From 192aa6fbdf1ed6fc441d56a14adf4479bd2799fa Mon Sep 17 00:00:00 2001
|
||||
From 13c5f51de8bb77778ce5104c689813320e81611d Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 28 Dec 2014 22:25:58 -0700
|
||||
Subject: [PATCH 1/9] makechrootpkg: cache dir
|
||||
Subject: [PATCH 1/7] makechrootpkg: cache dir
|
||||
|
||||
---
|
||||
makechrootpkg.in | 10 ++++++++--
|
||||
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/makechrootpkg.in b/makechrootpkg.in
|
||||
index d4c293f..bf81573 100644
|
||||
index d81be84..8e8e4f5 100644
|
||||
--- a/makechrootpkg.in
|
||||
+++ b/makechrootpkg.in
|
||||
@@ -38,6 +38,7 @@ usage() {
|
||||
|
@ -19,7 +19,7 @@ index d4c293f..bf81573 100644
|
|||
echo '-d <dir> Bind directory into build chroot as read-write'
|
||||
echo '-D <dir> Bind directory into build chroot as read-only'
|
||||
echo '-u Update the working copy of the chroot before building'
|
||||
@@ -323,12 +324,13 @@ main() {
|
||||
@@ -325,12 +326,13 @@ main() {
|
||||
[[ -z "$copy" || $copy = root ]] && copy=copy
|
||||
src_owner=${SUDO_USER:-$USER}
|
||||
|
||||
|
@ -34,7 +34,7 @@ index d4c293f..bf81573 100644
|
|||
r) passeddir="$OPTARG" ;;
|
||||
I) install_pkgs+=("$OPTARG") ;;
|
||||
l) copy="$OPTARG" ;;
|
||||
@@ -350,6 +352,10 @@ main() {
|
||||
@@ -352,6 +354,10 @@ main() {
|
||||
[[ ! -d $chrootdir ]] && die "No chroot dir defined, or invalid path '%s'" "$passeddir"
|
||||
[[ ! -d $chrootdir/root ]] && die "Missing chroot dir root directory. Try using: mkarchroot %s/root base-devel" "$chrootdir"
|
||||
|
||||
|
@ -45,9 +45,9 @@ index d4c293f..bf81573 100644
|
|||
if [[ ${copy:0:1} = / ]]; then
|
||||
copydir=$copy
|
||||
else
|
||||
@@ -413,7 +419,7 @@ main() {
|
||||
@@ -415,7 +421,7 @@ main() {
|
||||
|
||||
prepare_chroot "$copydir" "$USER_HOME" "$keepbuilddir"
|
||||
prepare_chroot "$copydir" "$USER_HOME" "$keepbuilddir" "$run_namcap"
|
||||
|
||||
- if arch-nspawn "$copydir" \
|
||||
+ if arch-nspawn $cache_dir "$copydir" \
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
From b7c0c20f3681aa0982d4f804c18292b4aa3efa72 Mon Sep 17 00:00:00 2001
|
||||
From 39083133c9aa4851fda8fb5619a8a6c9ef519e70 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 28 Dec 2014 22:27:34 -0700
|
||||
Subject: [PATCH 2/9] arch-nspawn: keep mirrorlist
|
||||
Subject: [PATCH 2/7] arch-nspawn: keep mirrorlist
|
||||
|
||||
---
|
||||
arch-nspawn.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch-nspawn.in b/arch-nspawn.in
|
||||
index c55f498..3896992 100644
|
||||
index b9c846e..1821836 100644
|
||||
--- a/arch-nspawn.in
|
||||
+++ b/arch-nspawn.in
|
||||
@@ -80,7 +80,7 @@ build_mount_args() {
|
||||
@@ -81,7 +81,7 @@ build_mount_args() {
|
||||
|
||||
copy_hostconf () {
|
||||
cp -a /etc/pacman.d/gnupg "$working_dir/etc/pacman.d"
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
From 6cdbb9492c27ba80a7120266817775880f273046 Mon Sep 17 00:00:00 2001
|
||||
From 71c1a2307f07d6ddb10c876c532e92827b7eae2c Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 28 Dec 2014 22:32:15 -0700
|
||||
Subject: [PATCH 3/9] makechrootpkg: distcc
|
||||
Subject: [PATCH 3/7] makechrootpkg: distcc
|
||||
|
||||
---
|
||||
makechrootpkg.in | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/makechrootpkg.in b/makechrootpkg.in
|
||||
index bf81573..6f201b2 100644
|
||||
index 8e8e4f5..a920c19 100644
|
||||
--- a/makechrootpkg.in
|
||||
+++ b/makechrootpkg.in
|
||||
@@ -232,7 +232,9 @@ _chrootbuild() {
|
||||
@@ -226,7 +226,9 @@ _chrootbuild() {
|
||||
# use "$" in arguments to commands with "sudo -i". ${foo} or
|
||||
# ${1} is OK, but $foo or $1 isn't.
|
||||
# https://bugzilla.sudo.ws/show_bug.cgi?id=765
|
||||
- sudo -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
|
||||
- sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
|
||||
+ mkdir /build/.distcc
|
||||
+ chown builduser /build/.distcc
|
||||
+ sudo -iu builduser DISTCC_IO_TIMEOUT=1200 DISTCC_DIR='/build/.distcc' bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
|
||||
}
|
||||
|
||||
_chrootnamcap() {
|
||||
+ sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser DISTCC_IO_TIMEOUT=1200 DISTCC_DIR='/build/.distcc' bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
|
||||
ret=$?
|
||||
case $ret in
|
||||
0|14)
|
||||
--
|
||||
2.16.2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 5a4c63d070cdbfa0595c1e090cbf6caba54c08e2 Mon Sep 17 00:00:00 2001
|
||||
From 3c6ea948758d5ffd92e2412c8a9aa398607c140f Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 28 Dec 2014 22:33:00 -0700
|
||||
Subject: [PATCH 4/9] arch-nspawn: arm fix
|
||||
Subject: [PATCH 4/7] arch-nspawn: arm fix
|
||||
|
||||
---
|
||||
arch-nspawn.in | 2 +-
|
||||
|
@ -9,10 +9,10 @@ Subject: [PATCH 4/9] arch-nspawn: arm fix
|
|||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch-nspawn.in b/arch-nspawn.in
|
||||
index 3896992..714fb0a 100644
|
||||
index 1821836..fded89f 100644
|
||||
--- a/arch-nspawn.in
|
||||
+++ b/arch-nspawn.in
|
||||
@@ -111,7 +111,7 @@ eval "$(grep '^CARCH=' "$working_dir/etc/makepkg.conf")"
|
||||
@@ -112,7 +112,7 @@ eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")"
|
||||
|
||||
[[ -z $nosetarch ]] || unset CARCH
|
||||
|
||||
|
@ -22,13 +22,13 @@ index 3896992..714fb0a 100644
|
|||
-E "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin" \
|
||||
--register=no --keep-unit --as-pid2 \
|
||||
diff --git a/makechrootpkg.in b/makechrootpkg.in
|
||||
index 6f201b2..e29d42c 100644
|
||||
index a920c19..bb561ea 100644
|
||||
--- a/makechrootpkg.in
|
||||
+++ b/makechrootpkg.in
|
||||
@@ -258,7 +258,7 @@ download_sources() {
|
||||
|
||||
@@ -260,7 +260,7 @@ download_sources() {
|
||||
# Ensure sources are downloaded
|
||||
sudo -u "$makepkg_user" env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \
|
||||
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \
|
||||
env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \
|
||||
- makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o ||
|
||||
+ makepkg -A --config="$copydir/etc/makepkg.conf" --verifysource -o ||
|
||||
die "Could not download sources."
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
From 3111a45460053111c3f736ccbee88c2f30a403ce Mon Sep 17 00:00:00 2001
|
||||
From 44a2b161185fc8ea89bde621badfcc3c2fc82c64 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 28 Dec 2014 22:33:41 -0700
|
||||
Subject: [PATCH 5/9] makechrootpkg: no default logging
|
||||
Subject: [PATCH 5/7] makechrootpkg: no default logging
|
||||
|
||||
---
|
||||
makechrootpkg.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/makechrootpkg.in b/makechrootpkg.in
|
||||
index e29d42c..ba27249 100644
|
||||
index bb561ea..3ff3673 100644
|
||||
--- a/makechrootpkg.in
|
||||
+++ b/makechrootpkg.in
|
||||
@@ -305,7 +305,7 @@ move_products() {
|
||||
@@ -307,7 +307,7 @@ move_products() {
|
||||
# }}}
|
||||
|
||||
main() {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 476a3b7efbd047ccf4be07ee40a0d1f336084f5a Mon Sep 17 00:00:00 2001
|
||||
From d6bb1126569810ed4bdb895ad26f7a6b8e63419e Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 28 Dec 2014 22:34:04 -0700
|
||||
Subject: [PATCH 6/9] archbuild: no setarch
|
||||
Subject: [PATCH 6/7] archbuild: no setarch
|
||||
|
||||
---
|
||||
archbuild.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/archbuild.in b/archbuild.in
|
||||
index 8339aef..619fc8c 100644
|
||||
index 1e5b582..fbfe8e7 100644
|
||||
--- a/archbuild.in
|
||||
+++ b/archbuild.in
|
||||
@@ -60,7 +60,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
From bc2d5d2809daaed89ea8632f074d5018fa4a3d73 Mon Sep 17 00:00:00 2001
|
||||
From cfbf534257c461056f670e86896c1e7ffeafabde Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sun, 3 Jul 2016 21:32:15 -0600
|
||||
Subject: [PATCH 7/9] makechrootpkg: don't delete MAKEFLAGS and PACKAGER
|
||||
Subject: [PATCH 7/7] makechrootpkg: don't delete MAKEFLAGS and PACKAGER
|
||||
|
||||
---
|
||||
makechrootpkg.in | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/makechrootpkg.in b/makechrootpkg.in
|
||||
index ba27249..6b53337 100644
|
||||
index 3ff3673..b1e96af 100644
|
||||
--- a/makechrootpkg.in
|
||||
+++ b/makechrootpkg.in
|
||||
@@ -188,9 +188,7 @@ prepare_chroot() {
|
||||
$install -m 644 "$USER_HOME/$x" "$copydir/build/$x"
|
||||
done
|
||||
@@ -184,9 +184,7 @@ prepare_chroot() {
|
||||
|
||||
$install -d "$copydir"/{build,startdir,{pkg,srcpkg,src,log}dest}
|
||||
|
||||
- sed -e '/^MAKEFLAGS=/d' -e '/^PACKAGER=/d' -i "$copydir/etc/makepkg.conf"
|
||||
- for x in BUILDDIR=/build PKGDEST=/pkgdest SRCPKGDEST=/srcpkgdest SRCDEST=/srcdest LOGDEST=/logdest \
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
From edc1c3cae8a090eb0d8a132d9c4b28df47d2f6cc Mon Sep 17 00:00:00 2001
|
||||
From: Eli Schwartz <eschwartz@archlinux.org>
|
||||
Date: Sun, 3 Sep 2017 03:53:39 -0400
|
||||
Subject: [PATCH 8/9] makechrootpkg: Fix unconditionally running namcap
|
||||
|
||||
Fixes regression in 2fd5931a8c67289a8a4acd327b3ce99a5d64c8c7
|
||||
|
||||
$run_namcap will always be set to ""
|
||||
`if $not_a_var; then ...; fi` is always truthful when $not_a_var is
|
||||
unset or equal to "" and the `then` clause will always be run.
|
||||
|
||||
I'm not sure why global state variables need to be cloned locally for
|
||||
their sole explicit purpose.
|
||||
|
||||
But for now this patch implements the minimum necessary work to properly
|
||||
pass the "do I want namcap" variable into prepare_chroot() according to
|
||||
the current logic flow.
|
||||
Note that I have still not thorougly tested makechrootpkg.
|
||||
|
||||
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
|
||||
---
|
||||
makechrootpkg.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/makechrootpkg.in b/makechrootpkg.in
|
||||
index 6b53337..d6f48b2 100644
|
||||
--- a/makechrootpkg.in
|
||||
+++ b/makechrootpkg.in
|
||||
@@ -417,7 +417,7 @@ main() {
|
||||
|
||||
download_sources "$copydir" "$makepkg_user"
|
||||
|
||||
- prepare_chroot "$copydir" "$USER_HOME" "$keepbuilddir"
|
||||
+ prepare_chroot "$copydir" "$USER_HOME" "$keepbuilddir" "$run_namcap"
|
||||
|
||||
if arch-nspawn $cache_dir "$copydir" \
|
||||
--bind="$PWD:/startdir" \
|
||||
--
|
||||
2.16.2
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
From 1a967b0e55c8033ad62a022fb5c3443c2f72297e Mon Sep 17 00:00:00 2001
|
||||
From: Eli Schwartz <eschwartz@archlinux.org>
|
||||
Date: Sun, 18 Mar 2018 01:46:44 -0400
|
||||
Subject: [PATCH 9/9] makechrootpkg: fix verifysource with pacman-git
|
||||
|
||||
In pacman-git commit d8717a6a9666ec80c8645d190d6f9c7ab73084ac makepkg
|
||||
started checking that the setuid/setgid bit could be removed on the
|
||||
$BUILDDIR in order to prevent this propagating to the packages
|
||||
themselves. Unfortunately, this requires the temporary builddir used
|
||||
during the --verifysource stage of makepkg, to be owned by $makepkg_user
|
||||
which was not the case as it is created as root using mktemp (and given
|
||||
world rwx in addition to the restricted deletion bit.)
|
||||
|
||||
Obviously makepkg cannot chmod a directory that it does not own. Fix
|
||||
this by making $makepkg_user the owner of that directory, as should have
|
||||
been the case all along.
|
||||
|
||||
(Giving world rwx is illogical on general principle. The fact that this
|
||||
is a workaround for makepkg demanding these directories be writable even
|
||||
when they are not going to be used for the makepkg options in question,
|
||||
is not justification for being careless.)
|
||||
|
||||
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
|
||||
---
|
||||
makechrootpkg.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/makechrootpkg.in b/makechrootpkg.in
|
||||
index d6f48b2..2821986 100644
|
||||
--- a/makechrootpkg.in
|
||||
+++ b/makechrootpkg.in
|
||||
@@ -252,7 +252,7 @@ download_sources() {
|
||||
|
||||
local builddir
|
||||
builddir="$(mktemp -d)"
|
||||
- chmod 1777 "$builddir"
|
||||
+ chown "$makepkg_user:$makepkg_user" "$builddir"
|
||||
|
||||
# Ensure sources are downloaded
|
||||
sudo -u "$makepkg_user" env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \
|
||||
--
|
||||
2.16.2
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: PKGBUILD 182399 2013-04-10 05:34:09Z pierre $
|
||||
# $Id$
|
||||
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
|
@ -6,41 +6,44 @@
|
|||
|
||||
pkgname=devtools-alarm
|
||||
_pkgname=devtools
|
||||
pkgver=20171108
|
||||
pkgrel=2.1
|
||||
pkgver=20180531
|
||||
pkgrel=1
|
||||
pkgdesc='Tools for Arch Linux ARM package maintainers'
|
||||
arch=('any')
|
||||
license=('GPL')
|
||||
url='http://projects.archlinux.org/devtools.git/'
|
||||
url='https://git.archlinux.org/devtools.git/'
|
||||
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'
|
||||
depends=('namcap' 'openssh' 'subversion' 'rsync' 'arch-install-scripts'
|
||||
'git' 'bzr' 'mercurial')
|
||||
source=("https://sources.archlinux.org/other/$_pkgname/$_pkgname-$pkgver.tar.gz"{,.sig}
|
||||
'0001-makechrootpkg-cache-dir.patch'
|
||||
'0002-arch-nspawn-keep-mirrorlist.patch'
|
||||
'0003-makechrootpkg-distcc.patch'
|
||||
'0004-arch-nspawn-arm-fix.patch'
|
||||
'0005-makechrootpkg-no-default-logging.patch'
|
||||
'0006-archbuild-no-setarch.patch'
|
||||
'0007-makechrootpkg-don-t-delete-MAKEFLAGS-and-PACKAGER.patch'
|
||||
'0008-makechrootpkg-Fix-unconditionally-running-namcap.patch'
|
||||
'0009-makechrootpkg-fix-verifysource-with-pacman-git.patch')
|
||||
md5sums=('4a24b99bc1cffc63634eb7b3f5b116f1'
|
||||
'573830ee23ecffa4971fbc36e5e2b666'
|
||||
'6f0857c607eecd7cae37395cf28a6c81'
|
||||
'c73c9aa27af9bbcb8649c476a33cce6e'
|
||||
'28bca7b3fe32ea5236e5dfbccf51551e'
|
||||
'3007724b09d64626d949d698cb5a0816'
|
||||
'5ba5b5da4a4a0d37c4651c48241589d2'
|
||||
'0664e294a68e343c29e3ec01bfdd189c'
|
||||
'048314c00ef274602c8fc830db63c61a'
|
||||
'9b915424e24d3245fd9786133bc203c1'
|
||||
'1dd4421374a9a661472e2139573b6364')
|
||||
'0007-makechrootpkg-don-t-delete-MAKEFLAGS-and-PACKAGER.patch')
|
||||
validpgpkeys=('487EACC08557AD082088DABA1EB2638FF56C0C53'
|
||||
'4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC'
|
||||
'86CFFCA918CF3AF47147588051E8B148A9999C34'
|
||||
'8FC15A064950A99DD1BD14DD39E4B877E62EB915'
|
||||
'8218F88849AAC522E94CF470A5E9288C4FA415FA'
|
||||
'B81B051F2D7FC867AAFF35A58DBD63B82072D77A'
|
||||
'F3691687D867B81B51CE07D9BBE43771487328A9'
|
||||
'6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD')
|
||||
md5sums=('ed3c757184e633faeea09747a7b91bb1'
|
||||
'SKIP'
|
||||
'5233b5e7572c58810e3392ca03aa2394'
|
||||
'5bebd338b48d76b87c46175e034e3518'
|
||||
'bfba8bb3677ec381e2356ff7e4a70f24'
|
||||
'2a46eb18fc4bb549099e5eda321a8f0d'
|
||||
'154a0953d8f2fc6e226ad0302e9f318f'
|
||||
'91b9152cfa71911d55e0fff0b18c7e5b'
|
||||
'd92b4828159222c8aef0940b4cf13eaa')
|
||||
|
||||
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
|
||||
|
@ -48,8 +51,6 @@ prepare() {
|
|||
patch -p1 -i ../0005-makechrootpkg-no-default-logging.patch
|
||||
patch -p1 -i ../0006-archbuild-no-setarch.patch
|
||||
patch -p1 -i ../0007-makechrootpkg-don-t-delete-MAKEFLAGS-and-PACKAGER.patch
|
||||
patch -p1 -i ../0008-makechrootpkg-Fix-unconditionally-running-namcap.patch
|
||||
patch -p1 -i ../0009-makechrootpkg-fix-verifysource-with-pacman-git.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
@ -59,5 +60,5 @@ build() {
|
|||
|
||||
package() {
|
||||
cd "${_pkgname}-${pkgver}"
|
||||
make PREFIX=/usr DESTDIR=${pkgdir} install
|
||||
make PREFIX=/usr DESTDIR="${pkgdir}" install
|
||||
}
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
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
|
||||
|
Loading…
Reference in a new issue