util-linux: set correct perms to some utils and don't error out if chgrp fails.
This commit is contained in:
parent
4214e1fd61
commit
68f7fc8383
2 changed files with 14 additions and 5 deletions
|
@ -3,8 +3,11 @@
|
||||||
#
|
#
|
||||||
case "${ACTION}" in
|
case "${ACTION}" in
|
||||||
post)
|
post)
|
||||||
# Change group in some files.
|
set +e
|
||||||
bin/chgrp tty usr/bin/write usr/bin/wall
|
# Do not fail if chgrp fails (probably due to permissions).
|
||||||
[ $? -eq 0 ] && echo "Setting 'tty' group to wall(1) and write(1)."
|
for f in wall write; do
|
||||||
|
chgrp tty usr/bin/${f} || \
|
||||||
|
echo "WARNING: failed to change ${f}(1) group to tty."
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'util-linux'
|
# Template file for 'util-linux'
|
||||||
pkgname=util-linux
|
pkgname=util-linux
|
||||||
version=2.22.2
|
version=2.22.2
|
||||||
revision=1
|
revision=2
|
||||||
depends="coreutils shadow>=4.1.5.1_3"
|
depends="coreutils shadow>=4.1.5.1_3"
|
||||||
makedepends="pkg-config zlib-devel ncurses-devel pam-devel"
|
makedepends="pkg-config zlib-devel ncurses-devel pam-devel"
|
||||||
replaces="util-linux-ng>=0 e2fsprogs<=1.41.14_1 eject>=0 shadow<4.1.5.1_3"
|
replaces="util-linux-ng>=0 e2fsprogs<=1.41.14_1 eject>=0 shadow<4.1.5.1_3"
|
||||||
|
@ -27,6 +27,7 @@ conf_files="
|
||||||
/etc/pam.d/chfn
|
/etc/pam.d/chfn
|
||||||
/etc/pam.d/chsh
|
/etc/pam.d/chsh
|
||||||
/etc/pam.d/su
|
/etc/pam.d/su
|
||||||
|
/etc/pam.d/su-l
|
||||||
/etc/pam.d/login"
|
/etc/pam.d/login"
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
|
@ -49,12 +50,17 @@ do_build() {
|
||||||
do_install() {
|
do_install() {
|
||||||
make DESTDIR=${DESTDIR} install
|
make DESTDIR=${DESTDIR} install
|
||||||
|
|
||||||
|
# Correct perms for newgrp, chfn, chsh, wall and write.
|
||||||
|
chmod u+s $DESTDIR/usr/bin/{newgrp,chsh,chfn}
|
||||||
|
chmod g+s $DESTDIR/usr/bin/{wall,write}
|
||||||
|
|
||||||
# pam login utils.
|
# pam login utils.
|
||||||
vinstall $FILESDIR/login.pam 644 etc/pam.d login
|
vinstall $FILESDIR/login.pam 644 etc/pam.d login
|
||||||
vinstall $FILESDIR/su.pam 644 etc/pam.d su
|
vinstall $FILESDIR/su.pam 644 etc/pam.d su
|
||||||
|
vinstall $FILESDIR/su.pam 644 etc/pam.d su-l
|
||||||
vinstall $FILESDIR/common.pam 644 etc/pam.d chfn
|
vinstall $FILESDIR/common.pam 644 etc/pam.d chfn
|
||||||
vinstall $FILESDIR/common.pam 644 etc/pam.d chsh
|
vinstall $FILESDIR/common.pam 644 etc/pam.d chsh
|
||||||
|
|
||||||
# Provide sg(1) symlink.
|
# Provide sg(1) symlink.
|
||||||
cd ${DESTDIR}/usr/bin && ln -sf newgrp sg
|
ln -sfr ${DESTDIR}/usr/bin/newgrp ${DESTDIR}/usr/bin/sg
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue