Contents of /trunk/core/shadow/shadow-4.1.5-r1.smage2
Parent Directory | Revision Log
Revision 11290 -
(show annotations)
(download)
Fri Mar 2 12:53:47 2012 UTC (12 years, 2 months ago) by niro
File size: 3689 byte(s)
Fri Mar 2 12:53:47 2012 UTC (12 years, 2 months ago) by niro
File size: 3689 byte(s)
-removed deprecated patches
1 | # $Id$ |
2 | |
3 | PNAME="shadow" |
4 | PVER="4.1.5" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="sys-apps" |
8 | |
9 | DESCRIPTION="Utilities to deal with user accounts, with pam support." |
10 | HOMEPAGE="http://pkg-shadow.alioth.debian.org/" |
11 | |
12 | DEPEND=">= virtual/glibc |
13 | >= sys-apps/base-files-0.5 |
14 | >= app-shells/bash-4 |
15 | >= sys-libs/pam-1.1.1 |
16 | >= sys-libs/cracklib-2.8" |
17 | |
18 | SDEPEND=">= sys-dev/autoconf-5 |
19 | >= sys-dev/automake-4 |
20 | >= sys-dev/libtool-2.2" |
21 | |
22 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
23 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
24 | |
25 | # no shared libs get installed, is multilib needed anymore? |
26 | sminclude multilib mtools |
27 | |
28 | PAMD_CHAGE_REV=1.2 |
29 | PAMD_LOGIN_REV=1.2 |
30 | PAMD_SU_REV=1.2 |
31 | |
32 | SRC_URI=( |
33 | http://pkg-${PNAME}.alioth.debian.org/releases/${SRCFILE} |
34 | mirror://${PNAME}/${SRCFILE} |
35 | mirror://${PNAME}/pamd-systemauth/chage-${PAMD_CHAGE_REV} |
36 | mirror://${PNAME}/pamd-systemauth/login-${PAMD_LOGIN_REV} |
37 | mirror://${PNAME}/pamd-systemauth/su-${PAMD_SU_REV} |
38 | mirror://${PNAME}/${PNAME}-4.1.2.1-defaults.patch |
39 | ) |
40 | |
41 | UP2DATE="updatecmd ${HOMEPAGE} | grep 'New release' | sed 's/.*: \(.*\).*/\1/;q'" |
42 | |
43 | src_prepare() |
44 | { |
45 | munpack ${SRCFILE} || die |
46 | |
47 | # fixes useradd default settings (create_mail_spool) |
48 | mpatch ${PNAME}-4.1.2.1-defaults.patch || die |
49 | |
50 | # do not build 'groups'; coreutils provide a better version |
51 | all-abis "sed -i 's/groups$(EXEEXT) //' src/Makefile.in" || die |
52 | all-abis "sed -i '/groups/d' man/Makefile.in" || die |
53 | } |
54 | |
55 | src_compile() |
56 | { |
57 | # configures shadow with pam |
58 | mconfigure \ |
59 | --enable-shared \ |
60 | --with-libpam \ |
61 | --with-libcrack \ |
62 | --with-libcrypt \ |
63 | --enable-nls \ |
64 | --without-selinux \ |
65 | || die |
66 | |
67 | mmake || die |
68 | } |
69 | |
70 | src_install() |
71 | { |
72 | # needed directories |
73 | minstalldir /etc/{default,skel} || die |
74 | |
75 | # added exec_prefix for better bin location |
76 | mmake DESTDIR=${BINDIR} install || die |
77 | |
78 | minstalletc etc/limits limits || die |
79 | minstalletc etc/login.access login.access || die |
80 | |
81 | # makes recovery easier, when /usr is not mounted :) |
82 | mv -v ${BINDIR}/usr/bin/passwd ${BINDIR}/bin || die |
83 | mlink /bin/passwd /usr/bin || die |
84 | |
85 | # install pam related configuration files |
86 | minstallpam login-${PAMD_LOGIN_REV} login || die |
87 | minstallpam su-${PAMD_SU_REV} su || die |
88 | local i |
89 | for i in chage chfn chgpasswd chpasswd chsh \ |
90 | groupadd groupdel groupmems groupmod \ |
91 | newusers passwd useradd userdel usermod |
92 | do |
93 | minstallpam chage-${PAMD_CHAGE_REV} ${i} || die |
94 | done |
95 | |
96 | # disable these checks as pam controls them now |
97 | sed -e "s/^DIALUPS_CHECK_ENAB/# &/" \ |
98 | -e "s/^LASTLOG_ENAB/# &/" \ |
99 | -e "s/^MAIL_CHECK_ENAB/# &/" \ |
100 | -e "s/^PORTTIME_CHECKS_ENAB/# &/" \ |
101 | -e "s/^CONSOLE/# &/" \ |
102 | -e "s/^MOTD_FILE/# &/" \ |
103 | -e "s/^NOLOGINS_FILE/# &/" \ |
104 | -e "s/^PASS_MIN_LEN/# &/" \ |
105 | -e "s/^SU_WHEEL_ONLY/# &/" \ |
106 | -e "s/^CONSOLE_GROUPS/# &/" \ |
107 | -e "s/^ENVIRON_FILE/# &/" \ |
108 | -e "s/^OBSCURE_CHECKS_ENAB/# &/" \ |
109 | -e "s/^CRACKLIB_DICTPATH/# &/" \ |
110 | -e "s/^PASS_CHANGE_TRIES/# &/" \ |
111 | -e "s/^PASS_ALWAYS_WARN/# &/" \ |
112 | -e "s/^FAILLOG_ENAB/# &/" \ |
113 | -e "s/^QUOTAS_ENAB/# &/" \ |
114 | -e "s/^FTMP_FILE/# &/" \ |
115 | -e "s/^ENV_HZ/# &/" \ |
116 | -e "s/^CHFN_AUTH/# &/" \ |
117 | etc/login.defs > ${BINDIR}/etc/login.defs || die |
118 | |
119 | # fix some pathes in login.defs |
120 | # md5crypt is also controlled by pam ! |
121 | sed -i -e "s/^MD5_CRYPT_ENAB/# &/" \ |
122 | -e 's%/var/spool/mail%/var/mail%' \ |
123 | -e 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' \ |
124 | ${BINDIR}/etc/login.defs || die |
125 | } |
126 | |
127 | postinstall() |
128 | { |
129 | if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] |
130 | then |
131 | /usr/sbin/pwconv |
132 | /usr/sbin/grpconv |
133 | elif [[ -x /sbin/chroot ]] && [[ -d ${MROOT} ]] |
134 | then |
135 | chroot ${MROOT} /usr/sbin/pwconv || die |
136 | chroot ${MROOT} /usr/sbin/grpconv || die |
137 | else |
138 | echo "pwconv and grpconv could not run in MROOT='${MROOT}'." |
139 | echo "PAM is not usable without any shadow/gshadow files." |
140 | echo "Please chroot in your systemroot and run them by hand." |
141 | fi |
142 | } |