/
package.yml
109 lines (91 loc) · 3.76 KB
/
package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name : shadow
version : 4.14.7
release : 28
source :
- https://github.com/shadow-maint/shadow/releases/download/4.14.7/shadow-4.14.7.tar.xz : 3f380f74468b2087d882851573593172046672d93f462edbc0ca1d78dfee54da
license : BSD-3-Clause
component : system.base
homepage : https://github.com/shadow-maint/shadow
summary : login and password tools
description: |
Utilities for managing shadow password files and user/group accounts
builddeps :
- pkgconfig(libacl)
- pkgconfig(libattr)
- pkgconfig(libeconf)
- pkgconfig(libxcrypt)
setup : |
%patch -p1 -i $pkgfiles/0001-Adapt-login.defs-for-PAM-and-util-linux.patch
%patch -p1 -i $pkgfiles/0002-Solus-login.defs-changes.patch
# add extra check, preventing accidental deletion of other user's home dirs when using `userdel -r <user with home in />`
export CFLAGS="$CFLAGS -DEXTRA_CHECK_HOME_DIR"
# File capabilities are not supported by ypkg yet, so use suid for newgidmap/newuidmap
%configure \
--disable-account-tools-setuid \
--enable-man \
--enable-vendordir=/usr/share/defaults/etc/ \
--with-libpam \
--with-yescrypt \
--without-fcaps \
--without-libbsd \
--without-nscd \
--without-su
build : |
%make
install : |
%make_install
make DESTDIR="$installdir" -C man install
# Get rid of groups
find $installdir/usr/share/man -type f -name "groups.*" | xargs rm -frv
rm -fv $installdir/usr/bin/groups
# Get rid of faillog (Not used)
find $installdir/usr/share/man -type f -name "faillog.*" | xargs rm -frv
rm -fv $installdir/usr/bin/faillog
# Get rid of logoutd (Not used)
find $installdir/usr/share/man -type f -name "logoutd.*" | xargs rm -frv
rm -fv $installdir/usr/sbin/logoutd
# Get rid of chfn (util-linux)
find $installdir/usr/share/man -type f -name "chfn.*" | xargs rm -frv
rm -fv $installdir/usr/bin/chfn
# Get rid of chsh (util-linux)
find $installdir/usr/share/man -type f -name "chsh.*" | xargs rm -frv
rm -fv $installdir/usr/bin/chsh
# Get rid of login (util-linux)
find $installdir/usr/share/man -type f -name "login.*" | xargs rm -frv
rm -fv $installdir/usr/bin/login
# Get rid of newgrp (util-linux)
find $installdir/usr/share/man -type f -name "newgrp.*" | xargs rm -frv
rm -fv $installdir/usr/bin/newgrp
# Get rid of nologin (util-linux)
find $installdir/usr/share/man -type f -name "nologin.*" | xargs rm -frv
rm -fv $installdir/usr/sbin/nologin
# Get rid of vigr (util-linux)
find $installdir/usr/share/man -type f -name "vigr.*" | xargs rm -frv
rm -fv $installdir/usr/sbin/vigr
# Get rid of vipr (util-linux)
find $installdir/usr/share/man -type f -name "vipr.*" | xargs rm -frv
rm -fv $installdir/usr/bin/vipr
# Get rid of vipw (util-linux)
find $installdir/usr/share/man -type f -name "vipw.*" | xargs rm -frv
rm -fv $installdir/usr/sbin/vipw
# Set up stateless support for pam.d
rm -rfv $installdir/etc/pam.d
install -dm00755 $installdir/usr/share/defaults/etc/pam.d
install -m00644 $pkgfiles/pam.d/* -t $installdir/usr/share/defaults/etc/pam.d
# Login.defs
install -Dm00644 $installdir/etc/login.defs $installdir/usr/share/defaults/etc/login.defs
rm -v $installdir/etc/login.defs
rmdir $installdir/etc
# Install compat links T10615
for TOP in {bin,sbin}; do
install -D -d -m 00755 $installdir/$TOP
pushd $installdir/usr/$TOP
for FILE in *; do
ln -sv /usr/$TOP/$FILE $installdir/$TOP/$FILE
done
popd
done
# Cleanup
find $installdir -type d -empty -print -delete
## TODO:
# - Stateless /etc/skel