Contents of /branches/magellan-next/core/shadow/shadow-4.1.4.3-r4.smage2
Parent Directory | Revision Log
Revision 8860 -
(show annotations)
(download)
Wed Aug 3 17:43:56 2011 UTC (13 years, 1 month ago) by niro
File size: 3970 byte(s)
Wed Aug 3 17:43:56 2011 UTC (13 years, 1 month ago) by niro
File size: 3970 byte(s)
auto added: ver bump to 4.1.4.3-r4
1 | # $Id$ |
2 | |
3 | PNAME="shadow" |
4 | PVER="4.1.4.3" |
5 | PBUILD="r4" |
6 | |
7 | PCATEGORIE="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 | ftp://pkg-${PNAME}.alioth.debian.org/pub/pkg-${PNAME}/${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 | mirror://${PNAME}/${PNAME}-4.1.4.2-groupmod-username.patch |
40 | ) |
41 | |
42 | UP2DATE="updatecmd ${HOMEPAGE} | grep 'New release' | sed 's/.*: \(.*\).*/\1/;q'" |
43 | |
44 | src_prepare() |
45 | { |
46 | munpack ${SRCFILE} || die |
47 | |
48 | # fixes useradd default settings (create_mail_spool) |
49 | mpatch ${PNAME}-4.1.2.1-defaults.patch || die |
50 | |
51 | # fixes username issues with groupadd if pam is enabled |
52 | # see: http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/2009-November/007850.html |
53 | mpatch ${PNAME}-4.1.4.2-groupmod-username.patch || die |
54 | |
55 | # do not build 'groups'; coreutils provide a better version |
56 | all-abis "sed -i 's/groups$(EXEEXT) //' src/Makefile.in" || die |
57 | all-abis "sed -i '/groups/d' man/Makefile.in" || die |
58 | } |
59 | |
60 | src_compile() |
61 | { |
62 | # configures shadow with pam |
63 | mconfigure \ |
64 | --enable-shared \ |
65 | --with-libpam \ |
66 | --with-libcrack \ |
67 | --with-libcrypt \ |
68 | --enable-nls \ |
69 | --without-selinux \ |
70 | || die |
71 | |
72 | mmake || die |
73 | } |
74 | |
75 | src_install() |
76 | { |
77 | # needed directories |
78 | minstalldir /etc/{default,skel} || die |
79 | |
80 | # added exec_prefix for better bin location |
81 | mmake DESTDIR=${BINDIR} install || die |
82 | |
83 | minstalletc etc/limits limits || die |
84 | minstalletc etc/login.access login.access || die |
85 | |
86 | # makes recovery easier, when /usr is not mounted :) |
87 | mv -v ${BINDIR}/usr/bin/passwd ${BINDIR}/bin || die |
88 | mlink /bin/passwd /usr/bin || die |
89 | |
90 | # install pam related configuration files |
91 | minstallpam login-${PAMD_LOGIN_REV} login || die |
92 | minstallpam su-${PAMD_SU_REV} su || die |
93 | local i |
94 | for i in chage chfn chgpasswd chpasswd chsh \ |
95 | groupadd groupdel groupmems groupmod \ |
96 | newusers passwd useradd userdel usermod |
97 | do |
98 | minstallpam chage-${PAMD_CHAGE_REV} ${i} || die |
99 | done |
100 | |
101 | # disable these checks as pam controls them now |
102 | sed -e "s/^DIALUPS_CHECK_ENAB/# &/" \ |
103 | -e "s/^LASTLOG_ENAB/# &/" \ |
104 | -e "s/^MAIL_CHECK_ENAB/# &/" \ |
105 | -e "s/^PORTTIME_CHECKS_ENAB/# &/" \ |
106 | -e "s/^CONSOLE/# &/" \ |
107 | -e "s/^MOTD_FILE/# &/" \ |
108 | -e "s/^NOLOGINS_FILE/# &/" \ |
109 | -e "s/^PASS_MIN_LEN/# &/" \ |
110 | -e "s/^SU_WHEEL_ONLY/# &/" \ |
111 | -e "s/^CONSOLE_GROUPS/# &/" \ |
112 | -e "s/^ENVIRON_FILE/# &/" \ |
113 | -e "s/^OBSCURE_CHECKS_ENAB/# &/" \ |
114 | -e "s/^CRACKLIB_DICTPATH/# &/" \ |
115 | -e "s/^PASS_CHANGE_TRIES/# &/" \ |
116 | -e "s/^PASS_ALWAYS_WARN/# &/" \ |
117 | -e "s/^FAILLOG_ENAB/# &/" \ |
118 | -e "s/^QUOTAS_ENAB/# &/" \ |
119 | -e "s/^FTMP_FILE/# &/" \ |
120 | -e "s/^ENV_HZ/# &/" \ |
121 | -e "s/^CHFN_AUTH/# &/" \ |
122 | etc/login.defs > ${BINDIR}/etc/login.defs || die |
123 | |
124 | # fix some pathes in login.defs |
125 | # md5crypt is also controlled by pam ! |
126 | sed -i -e "s/^MD5_CRYPT_ENAB/# &/" \ |
127 | -e 's%/var/spool/mail%/var/mail%' \ |
128 | -e 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' \ |
129 | ${BINDIR}/etc/login.defs || die |
130 | } |
131 | |
132 | postinstall() |
133 | { |
134 | if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] |
135 | then |
136 | /usr/sbin/pwconv |
137 | /usr/sbin/grpconv |
138 | elif [[ -x /sbin/chroot ]] && [[ -d ${MROOT} ]] |
139 | then |
140 | chroot ${MROOT} /usr/sbin/pwconv || die |
141 | chroot ${MROOT} /usr/sbin/grpconv || die |
142 | else |
143 | echo "pwconv and grpconv could not run in MROOT='${MROOT}'." |
144 | echo "PAM is not usable without any shadow/gshadow files." |
145 | echo "Please chroot in your systemroot and run them by hand." |
146 | fi |
147 | } |