diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2018-05-20 21:58:28 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2018-05-20 21:58:28 -0400 |
commit | 779a9020f1d290d8ce0517ef1e6d624b4135d01d (patch) | |
tree | 05d02a56f49cd631c32772bbf38a72af5b8ba208 | |
parent | c506c60b50c38dab337fe843c812cb77be606d48 (diff) | |
parent | 049e0ab662f31458262d2179c0206aab4c381b6f (diff) | |
download | devtools-779a9020f1d290d8ce0517ef1e6d624b4135d01d.tar.xz |
Merge branch 'lukeshu/rebase/master'libretools-20180520
-rw-r--r-- | makechrootpkg.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in index b594de2..09c047e 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} @@ -298,7 +299,7 @@ download_sources() { local builddir builddir="$(mktemp -d)" - chmod 1777 "$builddir" + chown "$makepkg_user:" "$builddir" # Ensure sources are downloaded sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \ |