Gentoo Archives: gentoo-commits

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