1 |
commit: 7858950db7c249b04ccf3791af8afc3e396a09ef |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 25 10:06:40 2020 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 25 10:06:51 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7858950d |
7 |
|
8 |
sys-apps/shadow: Removed old |
9 |
|
10 |
Package-Manager: Portage-2.3.85, Repoman-2.3.20 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
sys-apps/shadow/shadow-4.8-r2.ebuild | 236 ----------------------------------- |
14 |
1 file changed, 236 deletions(-) |
15 |
|
16 |
diff --git a/sys-apps/shadow/shadow-4.8-r2.ebuild b/sys-apps/shadow/shadow-4.8-r2.ebuild |
17 |
deleted file mode 100644 |
18 |
index 217787bfae1..00000000000 |
19 |
--- a/sys-apps/shadow/shadow-4.8-r2.ebuild |
20 |
+++ /dev/null |
21 |
@@ -1,236 +0,0 @@ |
22 |
-# Copyright 1999-2019 Gentoo Authors |
23 |
-# Distributed under the terms of the GNU General Public License v2 |
24 |
- |
25 |
-EAPI=7 |
26 |
- |
27 |
-inherit autotools libtool pam |
28 |
- |
29 |
-DESCRIPTION="Utilities to deal with user accounts" |
30 |
-HOMEPAGE="https://github.com/shadow-maint/shadow" |
31 |
-SRC_URI="https://github.com/shadow-maint/shadow/releases/download/${PV}/${P}.tar.xz" |
32 |
- |
33 |
-LICENSE="BSD GPL-2" |
34 |
-SLOT="0" |
35 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" |
36 |
-IUSE="acl audit bcrypt +cracklib nls pam selinux skey split-usr +su xattr" |
37 |
-# Taken from the man/Makefile.am file. |
38 |
-LANGS=( cs da de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW ) |
39 |
- |
40 |
-DEPEND=" |
41 |
- acl? ( sys-apps/acl:0= ) |
42 |
- audit? ( >=sys-process/audit-2.6:0= ) |
43 |
- cracklib? ( >=sys-libs/cracklib-2.7-r3:0= ) |
44 |
- nls? ( virtual/libintl ) |
45 |
- pam? ( sys-libs/pam:0= ) |
46 |
- skey? ( sys-auth/skey:0= ) |
47 |
- selinux? ( |
48 |
- >=sys-libs/libselinux-1.28:0= |
49 |
- sys-libs/libsemanage:0= |
50 |
- ) |
51 |
- su? ( !sys-apps/util-linux[su] ) |
52 |
- xattr? ( sys-apps/attr:0= ) |
53 |
-" |
54 |
-BDEPEND=" |
55 |
- app-arch/xz-utils |
56 |
- sys-devel/gettext |
57 |
-" |
58 |
-RDEPEND=" |
59 |
- ${DEPEND} |
60 |
- pam? ( >=sys-auth/pambase-20150213 ) |
61 |
-" |
62 |
- |
63 |
-PATCHES=( |
64 |
- "${FILESDIR}/${PN}-4.1.3-dots-in-usernames.patch" |
65 |
- "${FILESDIR}/${P}-revert-bin-merge.patch" |
66 |
-) |
67 |
- |
68 |
-src_prepare() { |
69 |
- default |
70 |
- eautoreconf |
71 |
- #elibtoolize |
72 |
-} |
73 |
- |
74 |
-src_configure() { |
75 |
- local myeconfargs=( |
76 |
- --disable-account-tools-setuid |
77 |
- --enable-shared=no |
78 |
- --enable-static=yes |
79 |
- --with-btrfs |
80 |
- --without-group-name-max-length |
81 |
- --without-tcb |
82 |
- $(use_enable nls) |
83 |
- $(use_with acl) |
84 |
- $(use_with audit) |
85 |
- $(use_with bcrypt) |
86 |
- $(use_with cracklib libcrack) |
87 |
- $(use_with elibc_glibc nscd) |
88 |
- $(use_with pam libpam) |
89 |
- $(use_with selinux) |
90 |
- $(use_with skey) |
91 |
- $(use_with su) |
92 |
- $(use_with xattr attr) |
93 |
- ) |
94 |
- econf "${myeconfargs[@]}" |
95 |
- |
96 |
- has_version 'sys-libs/uclibc[-rpc]' && sed -i '/RLOGIN/d' config.h #425052 |
97 |
- |
98 |
- if use nls ; then |
99 |
- local l langs="po" # These are the pot files. |
100 |
- for l in ${LANGS[*]} ; do |
101 |
- has ${l} ${LINGUAS-${l}} && langs+=" ${l}" |
102 |
- done |
103 |
- sed -i "/^SUBDIRS = /s:=.*:= ${langs}:" man/Makefile || die |
104 |
- fi |
105 |
-} |
106 |
- |
107 |
-set_login_opt() { |
108 |
- local comment="" opt=$1 val=$2 |
109 |
- if [[ -z ${val} ]]; then |
110 |
- comment="#" |
111 |
- sed -i \ |
112 |
- -e "/^${opt}\>/s:^:#:" \ |
113 |
- "${ED}"/etc/login.defs || die |
114 |
- else |
115 |
- sed -i -r \ |
116 |
- -e "/^#?${opt}\>/s:.*:${opt} ${val}:" \ |
117 |
- "${ED}"/etc/login.defs |
118 |
- fi |
119 |
- local res=$(grep "^${comment}${opt}\>" "${ED}"/etc/login.defs) |
120 |
- einfo "${res:-Unable to find ${opt} in /etc/login.defs}" |
121 |
-} |
122 |
- |
123 |
-src_install() { |
124 |
- emake DESTDIR="${D}" suidperms=4711 install |
125 |
- |
126 |
- # Remove libshadow and libmisc; see bug 37725 and the following |
127 |
- # comment from shadow's README.linux: |
128 |
- # Currently, libshadow.a is for internal use only, so if you see |
129 |
- # -lshadow in a Makefile of some other package, it is safe to |
130 |
- # remove it. |
131 |
- rm -f "${ED}"/{,usr/}$(get_libdir)/lib{misc,shadow}.{a,la} |
132 |
- |
133 |
- insinto /etc |
134 |
- if ! use pam ; then |
135 |
- insopts -m0600 |
136 |
- doins etc/login.access etc/limits |
137 |
- fi |
138 |
- |
139 |
- # needed for 'useradd -D' |
140 |
- insinto /etc/default |
141 |
- insopts -m0600 |
142 |
- doins "${FILESDIR}"/default/useradd |
143 |
- |
144 |
- if use split-usr ; then |
145 |
- # move passwd to / to help recover broke systems #64441 |
146 |
- # We cannot simply remove this or else net-misc/scponly |
147 |
- # and other tools will break because of hardcoded passwd |
148 |
- # location |
149 |
- dodir /bin |
150 |
- mv "${ED}"/usr/bin/passwd "${ED}"/bin/ || die |
151 |
- dosym ../../bin/passwd /usr/bin/passwd |
152 |
- fi |
153 |
- |
154 |
- cd "${S}" || die |
155 |
- insinto /etc |
156 |
- insopts -m0644 |
157 |
- newins etc/login.defs login.defs |
158 |
- |
159 |
- set_login_opt CREATE_HOME yes |
160 |
- if ! use pam ; then |
161 |
- set_login_opt MAIL_CHECK_ENAB no |
162 |
- set_login_opt SU_WHEEL_ONLY yes |
163 |
- set_login_opt CRACKLIB_DICTPATH /usr/$(get_libdir)/cracklib_dict |
164 |
- set_login_opt LOGIN_RETRIES 3 |
165 |
- set_login_opt ENCRYPT_METHOD SHA512 |
166 |
- set_login_opt CONSOLE |
167 |
- else |
168 |
- dopamd "${FILESDIR}"/pam.d-include/shadow |
169 |
- |
170 |
- for x in chpasswd chgpasswd newusers; do |
171 |
- newpamd "${FILESDIR}"/pam.d-include/passwd ${x} |
172 |
- done |
173 |
- |
174 |
- for x in chage chsh chfn \ |
175 |
- user{add,del,mod} group{add,del,mod} ; do |
176 |
- newpamd "${FILESDIR}"/pam.d-include/shadow ${x} |
177 |
- done |
178 |
- |
179 |
- # comment out login.defs options that pam hates |
180 |
- local opt sed_args=() |
181 |
- for opt in \ |
182 |
- CHFN_AUTH \ |
183 |
- CONSOLE \ |
184 |
- CRACKLIB_DICTPATH \ |
185 |
- ENV_HZ \ |
186 |
- ENVIRON_FILE \ |
187 |
- FAILLOG_ENAB \ |
188 |
- FTMP_FILE \ |
189 |
- LASTLOG_ENAB \ |
190 |
- MAIL_CHECK_ENAB \ |
191 |
- MOTD_FILE \ |
192 |
- NOLOGINS_FILE \ |
193 |
- OBSCURE_CHECKS_ENAB \ |
194 |
- PASS_ALWAYS_WARN \ |
195 |
- PASS_CHANGE_TRIES \ |
196 |
- PASS_MIN_LEN \ |
197 |
- PORTTIME_CHECKS_ENAB \ |
198 |
- QUOTAS_ENAB \ |
199 |
- SU_WHEEL_ONLY |
200 |
- do |
201 |
- set_login_opt ${opt} |
202 |
- sed_args+=( -e "/^#${opt}\>/b pamnote" ) |
203 |
- done |
204 |
- sed -i "${sed_args[@]}" \ |
205 |
- -e 'b exit' \ |
206 |
- -e ': pamnote; i# NOTE: This setting should be configured via /etc/pam.d/ and not in this file.' \ |
207 |
- -e ': exit' \ |
208 |
- "${ED}"/etc/login.defs || die |
209 |
- |
210 |
- # remove manpages that pam will install for us |
211 |
- # and/or don't apply when using pam |
212 |
- find "${ED}"/usr/share/man -type f \ |
213 |
- '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \ |
214 |
- -delete |
215 |
- |
216 |
- # Remove pam.d files provided by pambase. |
217 |
- rm "${ED}"/etc/pam.d/{login,passwd} || die |
218 |
- if use su ; then |
219 |
- rm "${ED}"/etc/pam.d/su || die |
220 |
- fi |
221 |
- fi |
222 |
- |
223 |
- # Remove manpages that are handled by other packages |
224 |
- find "${ED}"/usr/share/man \ |
225 |
- '(' -name id.1 -o -name passwd.5 -o -name getspnam.3 ')' \ |
226 |
- -delete |
227 |
- |
228 |
- cd "${S}" || die |
229 |
- dodoc ChangeLog NEWS TODO |
230 |
- newdoc README README.download |
231 |
- cd doc || die |
232 |
- dodoc HOWTO README* WISHLIST *.txt |
233 |
-} |
234 |
- |
235 |
-pkg_preinst() { |
236 |
- rm -f "${EROOT}"/etc/pam.d/system-auth.new \ |
237 |
- "${EROOT}/etc/login.defs.new" |
238 |
-} |
239 |
- |
240 |
-pkg_postinst() { |
241 |
- # Enable shadow groups. |
242 |
- if [ ! -f "${EROOT}"/etc/gshadow ] ; then |
243 |
- if grpck -r -R "${EROOT}" 2>/dev/null ; then |
244 |
- grpconv -R "${EROOT}" |
245 |
- else |
246 |
- ewarn "Running 'grpck' returned errors. Please run it by hand, and then" |
247 |
- ewarn "run 'grpconv' afterwards!" |
248 |
- fi |
249 |
- fi |
250 |
- |
251 |
- [[ ! -f "${EROOT}"/etc/subgid ]] && |
252 |
- touch "${EROOT}"/etc/subgid |
253 |
- [[ ! -f "${EROOT}"/etc/subuid ]] && |
254 |
- touch "${EROOT}"/etc/subuid |
255 |
- |
256 |
- einfo "The 'adduser' symlink to 'useradd' has been dropped." |
257 |
-} |