[arch-commits] Commit in shadow/trunk (PKGBUILD)
Dave Reisner
dreisner at archlinux.org
Fri Oct 4 15:24:19 UTC 2019
Date: Friday, October 4, 2019 @ 15:24:19
Author: dreisner
Revision: 363775
Ship /etc/defaults/useradd with mode 600 (FS#64106)
Modified:
shadow/trunk/PKGBUILD
----------+
PKGBUILD | 27 +++++++++------------------
1 file changed, 9 insertions(+), 18 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-10-04 15:05:34 UTC (rev 363774)
+++ PKGBUILD 2019-10-04 15:24:19 UTC (rev 363775)
@@ -51,23 +51,20 @@
cd "$pkgname"
local backports=(
+ edf7547ad5aa650be868cf2dac58944773c12d75
+ e293aa9cfca0619a63616af75532637dab60d49d
)
for commit in "${backports[@]}"; do
git cherry-pick -n "$commit"
done
-
- autoreconf -v -f --install
-
- # supress etc/pam.d/*, we provide our own
- sed -i '/^SUBDIRS/s/pam\.d//' etc/Makefile.in
}
build() {
cd "$pkgname"
+ autoreconf -fisv
./configure \
- LIBS="-lcrypt" \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/bin \
@@ -92,11 +89,11 @@
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/shadow/LICENSE"
# useradd defaults
- install -Dm644 "$srcdir/useradd.defaults" "$pkgdir/etc/default/useradd"
+ install -Dm600 "$srcdir/useradd.defaults" "$pkgdir/etc/default/useradd"
- # systemd timer
+ # systemd units
install -D -m644 "$srcdir/shadow.timer" "$pkgdir/usr/lib/systemd/system/shadow.timer"
- install -D -m644 "$srcdir/shadow.service" $pkgdir/usr/lib/systemd/system/shadow.service
+ install -D -m644 "$srcdir/shadow.service" "$pkgdir/usr/lib/systemd/system/shadow.service"
install -d -m755 "$pkgdir/usr/lib/systemd/system/timers.target.wants"
ln -s ../shadow.timer "$pkgdir/usr/lib/systemd/system/timers.target.wants/shadow.timer"
@@ -104,7 +101,7 @@
install -Dm644 "$srcdir/login.defs" "$pkgdir/etc/login.defs"
# PAM config - custom
- install -dm755 "$pkgdir/etc/pam.d"
+ rm "$pkgdir/etc/pam.d"/*
install -t "$pkgdir/etc/pam.d" -m644 "$srcdir"/{passwd,chgpasswd,chpasswd,newusers}
# PAM config - from tarball
@@ -117,12 +114,10 @@
done
# Remove evil/broken tools
- rm "$pkgdir"/usr/sbin/logoutd
+ rm "$pkgdir"/usr/bin/logoutd
# Remove utilities provided by util-linux
- rm \
- "$pkgdir"/usr/bin/{login,su,chsh,chfn,sg,nologin} \
- "$pkgdir"/usr/sbin/{vipw,vigr}
+ rm "$pkgdir"/usr/bin/{login,su,chsh,chfn,sg,nologin,vipw,vigr}
# but we keep newgrp, as sg is really an alias to it
mv "$pkgdir"/usr/bin/{newgrp,sg}
@@ -142,8 +137,4 @@
rmdir \
"$pkgdir"/usr/share/man/{fi,id,zh_TW}/man1 \
"$pkgdir"/usr/share/man/{fi,ko/man8}
-
- # move everything else to /usr/bin, because this isn't handled by ./configure
- mv "$pkgdir"/usr/sbin/* "$pkgdir"/usr/bin
- rmdir "$pkgdir/usr/sbin"
}
More information about the arch-commits
mailing list