Magellan Linux

Annotation of /trunk/core/shadow/shadow-4.1.5.1-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12876 - (hide annotations) (download)
Wed Jul 4 18:52:14 2012 UTC (11 years, 11 months ago) by niro
File size: 3821 byte(s)
-really fixed package for usr-move
1 niro 12876 # $Id$
2    
3     PNAME="shadow"
4     PVER="4.1.5.1"
5     PBUILD="r2"
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.7
14     >= app-shells/bash-4
15     >= sys-libs/pam-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.3
29     PAMD_LOGIN_REV=1.3
30     PAMD_SU_REV=1.3
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}/pamd-systemauth/passwd
39     mirror://${PNAME}/${PNAME}-4.1.2.1-defaults.patch
40     mirror://${PNAME}/${PNAME}-4.1.5-missing-include.patch
41     )
42    
43     UP2DATE="updatecmd ${HOMEPAGE} | grep 'New release' | sed 's/.*: \(.*\).*/\1/;q'"
44    
45     src_prepare()
46     {
47     munpack ${SRCFILE} || die
48    
49     # fixes useradd default settings (create_mail_spool)
50     mpatch ${PNAME}-4.1.2.1-defaults.patch || die
51    
52     # fix a missing include
53     mpatch ${PNAME}-4.1.5-missing-include.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     --bindir=/usr/bin \
65     --sbindir=/usr/sbin \
66     --enable-shared \
67     --with-libpam \
68     --with-libcrack \
69     --with-libcrypt \
70     --enable-nls \
71     --without-selinux \
72     || die
73    
74     mmake || die
75     }
76    
77     src_install()
78     {
79     # needed directories
80     minstalldir /etc/{default,skel} || die
81    
82     # added exec_prefix for better bin location
83     mmake DESTDIR=${BINDIR} install || die
84    
85     minstalletc etc/limits limits || die
86     minstalletc etc/login.access login.access || die
87    
88     # install pam related configuration files
89     minstallpam login-${PAMD_LOGIN_REV} login || die
90     minstallpam su-${PAMD_SU_REV} su || die
91     local i
92     for i in chgpasswd chpasswd passwd
93     do
94     minstallpam passwd ${i} || die
95     done
96     for i in chage chfn chsh \
97     groupadd groupdel groupmems groupmod \
98     newusers useradd userdel usermod
99     do
100     minstallpam chage-${PAMD_CHAGE_REV} ${i} || die
101     done
102    
103     # disable these checks as pam controls them now
104     sed -e "s/^DIALUPS_CHECK_ENAB/# &/" \
105     -e "s/^LASTLOG_ENAB/# &/" \
106     -e "s/^MAIL_CHECK_ENAB/# &/" \
107     -e "s/^PORTTIME_CHECKS_ENAB/# &/" \
108     -e "s/^CONSOLE/# &/" \
109     -e "s/^MOTD_FILE/# &/" \
110     -e "s/^NOLOGINS_FILE/# &/" \
111     -e "s/^PASS_MIN_LEN/# &/" \
112     -e "s/^SU_WHEEL_ONLY/# &/" \
113     -e "s/^CONSOLE_GROUPS/# &/" \
114     -e "s/^ENVIRON_FILE/# &/" \
115     -e "s/^OBSCURE_CHECKS_ENAB/# &/" \
116     -e "s/^CRACKLIB_DICTPATH/# &/" \
117     -e "s/^PASS_CHANGE_TRIES/# &/" \
118     -e "s/^PASS_ALWAYS_WARN/# &/" \
119     -e "s/^FAILLOG_ENAB/# &/" \
120     -e "s/^QUOTAS_ENAB/# &/" \
121     -e "s/^FTMP_FILE/# &/" \
122     -e "s/^ENV_HZ/# &/" \
123     -e "s/^CHFN_AUTH/# &/" \
124     etc/login.defs > ${BINDIR}/etc/login.defs || die
125    
126     # fix some pathes in login.defs
127     # md5crypt is also controlled by pam !
128     sed -i -e "s/^MD5_CRYPT_ENAB/# &/" \
129     -e 's%/var/spool/mail%/var/mail%' \
130     -e 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' \
131     ${BINDIR}/etc/login.defs || die
132     }
133    
134     postinstall()
135     {
136     if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
137     then
138     /usr/sbin/pwconv
139     /usr/sbin/grpconv
140     elif [[ -x /sbin/chroot ]] && [[ -d ${MROOT} ]]
141     then
142     chroot ${MROOT} /usr/sbin/pwconv || die
143     chroot ${MROOT} /usr/sbin/grpconv || die
144     else
145     echo "pwconv and grpconv could not run in MROOT='${MROOT}'."
146     echo "PAM is not usable without any shadow/gshadow files."
147     echo "Please chroot in your systemroot and run them by hand."
148     fi
149     }