/[gentoo-x86]/sys-apps/shadow/shadow-4.0.3-r2.ebuild
Gentoo

Contents of /sys-apps/shadow/shadow-4.0.3-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Dec 15 10:44:23 2002 UTC (17 years, 6 months ago) by bjb
Branch: MAIN
CVS Tags: GENTOO_1_4_SNAP_2003010800
Changes since 1.7: +2 -2 lines
During removal of sparc64 keywords from the ebuilds a bad sed introduced problematic KEYWORDS line that contained an illegal character before the alpha keyword. Fixed.

1 # Copyright 1999-2002 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /home/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.0.3-r2.ebuild,v 1.7 2002/12/09 04:37:26 manson Exp $
4
5 IUSE=""
6
7 inherit libtool
8
9 FORCE_SYSTEMAUTH_UPDATE="no"
10
11 S="${WORKDIR}/${P}"
12 HOMEPAGE="http://shadow.pld.org.pl/"
13 DESCRIPTION="Utilities to deal with user accounts"
14 SRC_URI="ftp://ftp.pld.org.pl/software/shadow/${P}.tar.gz"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS="x86 ppc sparc alpha"
19
20 DEPEND=">=sys-libs/pam-0.75-r4
21 >=sys-libs/cracklib-2.7-r3
22 sys-devel/gettext"
23
24 RDEPEND=">=sys-libs/pam-0.75-r4
25 >=sys-libs/cracklib-2.7-r3"
26
27
28 pkg_preinst() {
29 rm -f ${ROOT}/etc/pam.d/system-auth.new
30 }
31
32 src_unpack() {
33 unpack ${A}
34
35 # Get su to call pam_open_session(), and also set DISPLAY and XAUTHORITY,
36 # else the session entries in /etc/pam.d/su never get executed, and
37 # pam_xauth for one, is then never used. This should close bug #8831.
38 #
39 # <azarah@gentoo.org> (19 Oct 2002)
40 cd ${S}; patch -p1 < ${FILESDIR}/${P}-su-pam_open_session.patch-v2 || die
41 }
42
43 src_compile() {
44 elibtoolize
45
46 local myconf=""
47 use nls || myconf="${myconf} --disable-nls"
48
49 ./configure --disable-desrpc \
50 --with-libcrypt \
51 --with-libcrack \
52 --with-libpam \
53 --enable-shared=no \
54 --enable-static=yes \
55 --host=${CHOST} \
56 ${myconf} || die "bad configure"
57
58 # Parallel make fails sometimes
59 make || die "compile problem"
60 }
61
62 src_install() {
63 dodir /etc/default /etc/skel
64
65 make prefix=${D}/usr \
66 exec_prefix=${D} \
67 mandir=${D}/usr/share/man \
68 install || die "install problem"
69
70 # Do not install this login, but rather the one from
71 # pam-login, as this one have a serious root exploit
72 # with pam_limits in use.
73 rm ${D}/bin/login
74
75 mv ${D}/lib ${D}/usr
76 dosed "s:/lib':/usr/lib':g" /usr/lib/libshadow.la
77 dosed "s:/lib/:/usr/lib/:g" /usr/lib/libshadow.la
78 dosed "s:/lib':/usr/lib':g" /usr/lib/libmisc.la
79 dosed "s:/lib/:/usr/lib/:g" /usr/lib/libmisc.la
80 dosym /usr/bin/newgrp /usr/bin/sg
81 dosym /usr/sbin/useradd /usr/sbin/adduser
82 dosym /usr/sbin/vipw /usr/sbin/vigr
83 # Remove dead links
84 rm -f ${D}/bin/{sg,vipw}
85
86 insinto /etc
87 # Using a securetty with devfs device names added
88 # (compat names kept for non-devfs compatibility)
89 insopts -m0600 ; doins ${FILESDIR}/securetty
90 insopts -m0600 ; doins ${S}/etc/login.access
91 insopts -m0644 ; doins ${S}/etc/limits
92
93 # needed for 'adduser -D'
94 keepdir /etc/default
95
96 # From sys-apps/pam-login now
97 # insopts -m0644 ; doins ${FILESDIR}/login.defs
98 insinto /etc/pam.d ; insopts -m0644
99 cd ${FILESDIR}/pam.d
100 for x in *
101 do
102 [ -f ${x} ] && doins ${x}
103 done
104 newins system-auth system-auth.new
105 newins shadow chage
106 newins shadow chsh
107 newins shadow chfn
108 newins shadow useradd
109 newins shadow groupadd
110 cd ${S}
111
112 # The manpage install is beyond my comprehension, and
113 # also broken. Just do it over.
114 rm -rf ${D}/usr/share/man/*
115 for x in man/*.[0-9]
116 do
117 [ -f ${x} ] || continue
118 local dir="${D}/usr/share/man/man${x##*.}"
119 mkdir -p ${dir}
120 cp ${x} ${dir}
121 done
122
123 # Dont install the manpage, since we dont use
124 # login with shadow
125 rm -f ${D}/usr/share/man/man1/login.*
126 # We use pam, so this is not applicable.
127 rm -f ${D}/usr/share/man/man5/suauth.*
128
129 cd ${S}/doc
130 dodoc ANNOUNCE INSTALL LICENSE README WISHLIST
131 docinto txt
132 dodoc HOWTO LSM README.* *.txt
133
134 # Fix sparc serial console
135 if [ "${ARCH}" = "sparc" -o "${ARCH}" = "" ]
136 then
137 # ttyS0 and its devfsd counterpart (Sparc serial port "A")
138 dosed 's:\(vc/1\)$:tts/0\n\1:' /etc/securetty
139 dosed 's:\(tty1\)$:ttyS0\n\1:' /etc/securetty
140 fi
141 }
142
143 pkg_postinst() {
144
145 local CHECK1="$(md5sum ${ROOT}/etc/pam.d/system-auth | cut -d ' ' -f 1)"
146 local CHECK2="$(md5sum ${ROOT}/etc/pam.d/system-auth.new | cut -d ' ' -f 1)"
147
148 if [ "${CHECK1}" != "${CHECK2}" -a "${FORCE_SYSTEMAUTH_UPDATE}" = "yes" ]
149 then
150 ewarn "Due to a security issue, ${ROOT}etc/pam.d/system-auth "
151 ewarn "is being updated automatically. Your old "
152 ewarn "system-auth will be backed up as:"
153 ewarn
154 ewarn " ${ROOT}etc/pam.d/system-auth.bak"
155 echo
156
157 cp -a ${ROOT}/etc/pam.d/system-auth \
158 ${ROOT}/etc/pam.d/system-auth.bak;
159 mv -f ${ROOT}/etc/pam.d/system-auth.new \
160 ${ROOT}/etc/pam.d/system-auth
161 rm -f ${ROOT}/etc/pam.d/._cfg????_system-auth
162 else
163 rm -f ${ROOT}/etc/pam.d/system-auth.new
164 fi
165 }
166

  ViewVC Help
Powered by ViewVC 1.1.20