1 |
commit: 46d93604b6cfaeda6830a7587030e300dff04207 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 28 21:00:52 2022 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 28 21:01:24 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46d93604 |
7 |
|
8 |
sys-apps/baselayout: drop 2.7, 2.7-r1, 2.7-r2 |
9 |
|
10 |
Signed-off-by: William Hubbs <williamh <AT> gentoo.org> |
11 |
|
12 |
sys-apps/baselayout/baselayout-2.7-r1.ebuild | 317 -------------------------- |
13 |
sys-apps/baselayout/baselayout-2.7-r2.ebuild | 318 --------------------------- |
14 |
sys-apps/baselayout/baselayout-2.7.ebuild | 312 -------------------------- |
15 |
3 files changed, 947 deletions(-) |
16 |
|
17 |
diff --git a/sys-apps/baselayout/baselayout-2.7-r1.ebuild b/sys-apps/baselayout/baselayout-2.7-r1.ebuild |
18 |
deleted file mode 100644 |
19 |
index 69b7db6825d2..000000000000 |
20 |
--- a/sys-apps/baselayout/baselayout-2.7-r1.ebuild |
21 |
+++ /dev/null |
22 |
@@ -1,317 +0,0 @@ |
23 |
-# Copyright 1999-2022 Gentoo Authors |
24 |
-# Distributed under the terms of the GNU General Public License v2 |
25 |
- |
26 |
-EAPI=6 |
27 |
- |
28 |
-inherit multilib versionator prefix |
29 |
- |
30 |
-DESCRIPTION="Filesystem baselayout and init scripts" |
31 |
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" |
32 |
-if [[ ${PV} = 9999 ]]; then |
33 |
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git" |
34 |
- inherit git-r3 |
35 |
-else |
36 |
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2" |
37 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
38 |
-fi |
39 |
- |
40 |
-LICENSE="GPL-2" |
41 |
-SLOT="0" |
42 |
-IUSE="build +split-usr" |
43 |
- |
44 |
-pkg_setup() { |
45 |
- multilib_layout |
46 |
-} |
47 |
- |
48 |
-# Create our multilib dirs - the Makefile has no knowledge of this |
49 |
-multilib_layout() { |
50 |
- local dir def_libdir libdir libdirs |
51 |
- local prefix prefix_lst |
52 |
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI) |
53 |
- libdirs=$(get_all_libdirs) |
54 |
- : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass... |
55 |
- |
56 |
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then |
57 |
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} ) |
58 |
- for prefix in "${prefix_lst[@]}"; do |
59 |
- for libdir in ${libdirs}; do |
60 |
- dir="${prefix}${libdir}" |
61 |
- if [[ -e "${dir}" ]]; then |
62 |
- [[ ! -d "${dir}" ]] && |
63 |
- die "${dir} exists but is not a directory" |
64 |
- continue |
65 |
- fi |
66 |
- if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then |
67 |
- einfo "symlinking ${dir} to usr/${libdir}" |
68 |
- ln -s usr/${libdir} ${dir} || |
69 |
- die " Unable to make ${dir} symlink" |
70 |
- else |
71 |
- einfo "creating directory ${dir}" |
72 |
- mkdir -p "${dir}" || |
73 |
- die "Unable to create ${dir} directory" |
74 |
- fi |
75 |
- done |
76 |
- done |
77 |
- return 0 |
78 |
- fi |
79 |
- |
80 |
- [ -z "${def_libdir}" ] && |
81 |
- die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid" |
82 |
- |
83 |
- # figure out which paths should be symlinks and which should be directories |
84 |
- local dirs syms exp d |
85 |
- for libdir in ${libdirs} ; do |
86 |
- if use split-usr ; then |
87 |
- exp=( {,usr/,usr/local/}${libdir} ) |
88 |
- else |
89 |
- exp=( {usr/,usr/local/}${libdir} ) |
90 |
- fi |
91 |
- for d in "${exp[@]}" ; do |
92 |
- # most things should be dirs |
93 |
- if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then |
94 |
- [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}" |
95 |
- else |
96 |
- [ -h "${d}" ] && syms+=" ${d}" |
97 |
- fi |
98 |
- done |
99 |
- done |
100 |
- if [ -n "${syms}${dirs}" ] ; then |
101 |
- ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to" |
102 |
- ewarn "have these paths configured as follows:" |
103 |
- [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}" |
104 |
- [ -n "${syms}" ] && ewarn "directories:${syms}" |
105 |
- ewarn "The ebuild will attempt to fix these, but only for trivial conversions." |
106 |
- ewarn "If things fail, you will need to manually create/move the directories." |
107 |
- echo |
108 |
- fi |
109 |
- |
110 |
- # setup symlinks and dirs where we expect them to be; do not migrate |
111 |
- # data ... just fall over in that case. |
112 |
- if use split-usr ; then |
113 |
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} ) |
114 |
- else |
115 |
- prefix_lst=( "${EROOT}"{usr/,usr/local/} ) |
116 |
- fi |
117 |
- for prefix in "${prefix_lst[@]}"; do |
118 |
- if [ "${SYMLINK_LIB}" = yes ] ; then |
119 |
- # we need to make sure "lib" points to the native libdir |
120 |
- if [ -h "${prefix}lib" ] ; then |
121 |
- # it's already a symlink! assume it's pointing to right place ... |
122 |
- continue |
123 |
- elif [ -d "${prefix}lib" ] ; then |
124 |
- # "lib" is a dir, so need to convert to a symlink |
125 |
- ewarn "Converting ${prefix}lib from a dir to a symlink" |
126 |
- rm -f "${prefix}lib"/.keep || die |
127 |
- if rmdir "${prefix}lib" 2>/dev/null ; then |
128 |
- ln -s ${def_libdir} "${prefix}lib" || die |
129 |
- else |
130 |
- die "non-empty dir found where we needed a symlink: ${prefix}lib" |
131 |
- fi |
132 |
- else |
133 |
- # nothing exists, so just set it up sanely |
134 |
- ewarn "Initializing ${prefix}lib as a symlink" |
135 |
- mkdir -p "${prefix}" || die |
136 |
- rm -f "${prefix}lib" || die |
137 |
- ln -s ${def_libdir} "${prefix}lib" || die |
138 |
- mkdir -p "${prefix}${def_libdir}" || die #423571 |
139 |
- fi |
140 |
- else |
141 |
- # we need to make sure "lib" is a dir |
142 |
- if [ -h "${prefix}lib" ] ; then |
143 |
- # "lib" is a symlink, so need to convert to a dir |
144 |
- ewarn "Converting ${prefix}lib from a symlink to a dir" |
145 |
- rm -f "${prefix}lib" || die |
146 |
- if [ -d "${prefix}lib32" ] ; then |
147 |
- ewarn "Migrating ${prefix}lib32 to ${prefix}lib" |
148 |
- mv "${prefix}lib32" "${prefix}lib" || die |
149 |
- else |
150 |
- mkdir -p "${prefix}lib" || die |
151 |
- fi |
152 |
- elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; then |
153 |
- # make sure the old "lib" ABI location does not exist; we |
154 |
- # only symlinked the lib dir on systems where we moved it |
155 |
- # to "lib32" ... |
156 |
- case ${CHOST} in |
157 |
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd. |
158 |
- i?86*|x86_64*|powerpc*|sparc*|s390*) |
159 |
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then |
160 |
- rm -f "${prefix}lib32"/.keep || die |
161 |
- if ! rmdir "${prefix}lib32" 2>/dev/null ; then |
162 |
- ewarn "You need to merge ${prefix}lib32 into ${prefix}lib" |
163 |
- die "non-empty dir found where there should be none: ${prefix}lib32" |
164 |
- fi |
165 |
- fi |
166 |
- ;; |
167 |
- esac |
168 |
- else |
169 |
- # nothing exists, so just set it up sanely |
170 |
- ewarn "Initializing ${prefix}lib as a dir" |
171 |
- mkdir -p "${prefix}lib" || die |
172 |
- fi |
173 |
- fi |
174 |
- done |
175 |
- if ! use split-usr ; then |
176 |
- for libdir in ${libdirs}; do |
177 |
- if [[ ! -e "${EROOT}${libdir}" ]]; then |
178 |
- ln -s usr/"${libdir}" "${EROOT}${libdir}" || |
179 |
- die " Unable to make ${EROOT}${libdir} symlink" |
180 |
- fi |
181 |
- done |
182 |
- fi |
183 |
-} |
184 |
- |
185 |
-pkg_preinst() { |
186 |
- # This is written in src_install (so it's in CONTENTS), but punt all |
187 |
- # pending updates to avoid user having to do etc-update (and make the |
188 |
- # pkg_postinst logic simpler). |
189 |
- rm -f "${EROOT}"/etc/._cfg????_gentoo-release || die |
190 |
- |
191 |
- # We need to install directories and maybe some dev nodes when building |
192 |
- # stages, but they cannot be in CONTENTS. |
193 |
- # Also, we cannot reference $S as binpkg will break so we do this. |
194 |
- multilib_layout |
195 |
- if use build ; then |
196 |
- if use split-usr ; then |
197 |
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout |
198 |
- else |
199 |
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge |
200 |
- fi |
201 |
- fi |
202 |
- rm -f "${ED}"/usr/share/${PN}/Makefile || die |
203 |
-} |
204 |
- |
205 |
-src_prepare() { |
206 |
- default |
207 |
- if use prefix; then |
208 |
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile |
209 |
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd |
210 |
- echo PATH=/usr/bin:/bin >> etc/env.d/99host |
211 |
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host |
212 |
- fi |
213 |
- |
214 |
- # don't want symlinked directories in PATH on systems with usr-merge |
215 |
- if ! use split-usr; then |
216 |
- sed \ |
217 |
- -e 's|/usr/local/sbin:||g' \ |
218 |
- -e 's|:/usr/sbin:|:|g' \ |
219 |
- -e 's|:/sbin:|:|g' \ |
220 |
- -e 's|:/bin:|:|g' \ |
221 |
- -i etc/env.d/50baselayout || die |
222 |
- fi |
223 |
- |
224 |
- # handle multilib paths. do it here because we want this behavior |
225 |
- # regardless of the C library that you're using. we do explicitly |
226 |
- # list paths which the native ldconfig searches, but this isn't |
227 |
- # problematic as it doesn't change the resulting ld.so.cache or |
228 |
- # take longer to generate. similarly, listing both the native |
229 |
- # path and the symlinked path doesn't change the resulting cache. |
230 |
- local libdir ldpaths |
231 |
- for libdir in $(get_all_libdirs) ; do |
232 |
- use split-usr && ldpaths+=":${EPREFIX}/${libdir}" |
233 |
- ldpaths+=":${EPREFIX}/usr/${libdir}" |
234 |
- ldpaths+=":${EPREFIX}/usr/local/${libdir}" |
235 |
- done |
236 |
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout |
237 |
- |
238 |
- # rc-scripts version for testing of features that *should* be present |
239 |
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release |
240 |
-} |
241 |
- |
242 |
-src_install() { |
243 |
- emake \ |
244 |
- OS=Linux \ |
245 |
- DESTDIR="${ED}" \ |
246 |
- install |
247 |
- dodoc ChangeLog |
248 |
- rm "${ED}"/etc/sysctl.d/README || die |
249 |
- |
250 |
- # need the makefile in pkg_preinst |
251 |
- insinto /usr/share/${PN} |
252 |
- doins Makefile |
253 |
- |
254 |
- # This is needed for https://bugs.gentoo.org/732142 |
255 |
- dodir /usr/lib |
256 |
- mv "${ED}"/etc/os-release "${ED}"/usr/lib || die |
257 |
- dosym ../usr/lib/os-release /etc/os-release |
258 |
-} |
259 |
- |
260 |
-pkg_postinst() { |
261 |
- local x |
262 |
- |
263 |
- # We installed some files to /usr/share/baselayout instead of /etc to stop |
264 |
- # (1) overwriting the user's settings |
265 |
- # (2) screwing things up when attempting to merge files |
266 |
- # (3) accidentally packaging up personal files with quickpkg |
267 |
- # If they don't exist then we install them |
268 |
- for x in master.passwd passwd shadow group fstab ; do |
269 |
- [ -e "${EROOT}etc/${x}" ] && continue |
270 |
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue |
271 |
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc || die |
272 |
- done |
273 |
- |
274 |
- # Force shadow permissions to not be world-readable #260993 |
275 |
- for x in shadow ; do |
276 |
- if [ -e "${EROOT}etc/${x}" ] ; then |
277 |
- chmod o-rwx "${EROOT}etc/${x}" || die |
278 |
- fi |
279 |
- done |
280 |
- |
281 |
- # Take care of the etc-update for the user |
282 |
- if [ -e "${EROOT}"etc/._cfg0000_gentoo-release ] ; then |
283 |
- mv "${EROOT}"etc/._cfg0000_gentoo-release "${EROOT}"etc/gentoo-release || die |
284 |
- fi |
285 |
- |
286 |
- # whine about users that lack passwords #193541 |
287 |
- if [[ -e "${EROOT}"etc/shadow ]] ; then |
288 |
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow) |
289 |
- if [[ -n ${bad_users} ]] ; then |
290 |
- echo |
291 |
- ewarn "The following users lack passwords!" |
292 |
- ewarn ${bad_users} |
293 |
- fi |
294 |
- fi |
295 |
- |
296 |
- # whine about users with invalid shells #215698 |
297 |
- if [[ -e "${EROOT}"etc/passwd ]] ; then |
298 |
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort) |
299 |
- if [[ -n ${bad_shells} ]] ; then |
300 |
- echo |
301 |
- ewarn "The following users have non-existent shells!" |
302 |
- ewarn "${bad_shells}" |
303 |
- fi |
304 |
- fi |
305 |
- |
306 |
- # https://bugs.gentoo.org/361349 |
307 |
- if use kernel_linux; then |
308 |
- mkdir -p "${EROOT}"run || die |
309 |
- |
310 |
- local found fstype mountpoint |
311 |
- while read -r _ mountpoint fstype _; do |
312 |
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1 |
313 |
- done < "${ROOT}"proc/mounts |
314 |
- [[ -z ${found} ]] && |
315 |
- ewarn "You should reboot now to get /run mounted with tmpfs!" |
316 |
- fi |
317 |
- |
318 |
- for x in ${REPLACING_VERSIONS}; do |
319 |
- if ! version_is_at_least 2.4 ${x}; then |
320 |
- ewarn "After updating ${EROOT}etc/profile, please run" |
321 |
- ewarn "env-update && . /etc/profile" |
322 |
- fi |
323 |
- |
324 |
- if ! version_is_at_least 2.6 ${x}; then |
325 |
- ewarn "Please run env-update then log out and back in to" |
326 |
- ewarn "update your path." |
327 |
- fi |
328 |
- # clean up after 2.5 typos |
329 |
- # https://bugs.gentoo.org/show_bug.cgi?id=656380 |
330 |
- if [[ ${x} == 2.5 ]]; then |
331 |
- rm -fr "${EROOT}{,usr" || die |
332 |
- fi |
333 |
- done |
334 |
- |
335 |
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then |
336 |
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout" |
337 |
- ewarn "Please migrate your changes." |
338 |
- fi |
339 |
-} |
340 |
|
341 |
diff --git a/sys-apps/baselayout/baselayout-2.7-r2.ebuild b/sys-apps/baselayout/baselayout-2.7-r2.ebuild |
342 |
deleted file mode 100644 |
343 |
index 3e57665e1bf2..000000000000 |
344 |
--- a/sys-apps/baselayout/baselayout-2.7-r2.ebuild |
345 |
+++ /dev/null |
346 |
@@ -1,318 +0,0 @@ |
347 |
-# Copyright 1999-2022 Gentoo Authors |
348 |
-# Distributed under the terms of the GNU General Public License v2 |
349 |
- |
350 |
-EAPI=7 |
351 |
- |
352 |
-inherit multilib prefix |
353 |
- |
354 |
-DESCRIPTION="Filesystem baselayout and init scripts" |
355 |
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" |
356 |
-if [[ ${PV} = 9999 ]]; then |
357 |
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git" |
358 |
- inherit git-r3 |
359 |
-else |
360 |
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2" |
361 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
362 |
-fi |
363 |
- |
364 |
-LICENSE="GPL-2" |
365 |
-SLOT="0" |
366 |
-IUSE="build +split-usr" |
367 |
- |
368 |
-pkg_setup() { |
369 |
- multilib_layout |
370 |
-} |
371 |
- |
372 |
-# Create our multilib dirs - the Makefile has no knowledge of this |
373 |
-multilib_layout() { |
374 |
- local dir def_libdir libdir libdirs |
375 |
- local prefix prefix_lst |
376 |
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI) |
377 |
- libdirs=$(get_all_libdirs) |
378 |
- |
379 |
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then |
380 |
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} ) |
381 |
- for prefix in "${prefix_lst[@]}"; do |
382 |
- for libdir in ${libdirs}; do |
383 |
- dir="${prefix}${libdir}" |
384 |
- if [[ -e "${dir}" ]]; then |
385 |
- [[ ! -d "${dir}" ]] && |
386 |
- die "${dir} exists but is not a directory" |
387 |
- continue |
388 |
- fi |
389 |
- if ! use split-usr && [[ ${prefix} = ${EROOT}/ ]]; then |
390 |
- libdir="${libdir%%/*}" |
391 |
- dir="${prefix}${libdir}" |
392 |
- einfo "symlinking ${dir} to usr/${libdir}" |
393 |
- ln -s usr/${libdir} ${dir} || |
394 |
- die "Unable to make ${dir} symlink" |
395 |
- else |
396 |
- einfo "creating directory ${dir}" |
397 |
- mkdir -p "${dir}" || |
398 |
- die "Unable to create ${dir} directory" |
399 |
- fi |
400 |
- done |
401 |
- done |
402 |
- return 0 |
403 |
- fi |
404 |
- |
405 |
- [ -z "${def_libdir}" ] && |
406 |
- die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid" |
407 |
- |
408 |
- # figure out which paths should be symlinks and which should be directories |
409 |
- local dirs syms exp d |
410 |
- for libdir in ${libdirs} ; do |
411 |
- if use split-usr ; then |
412 |
- exp=( {,usr/,usr/local/}${libdir} ) |
413 |
- else |
414 |
- exp=( {usr/,usr/local/}${libdir} ) |
415 |
- fi |
416 |
- for d in "${exp[@]}" ; do |
417 |
- # most things should be dirs |
418 |
- if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then |
419 |
- [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}" |
420 |
- else |
421 |
- [ -h "${d}" ] && syms+=" ${d}" |
422 |
- fi |
423 |
- done |
424 |
- done |
425 |
- if [ -n "${syms}${dirs}" ] ; then |
426 |
- ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to" |
427 |
- ewarn "have these paths configured as follows:" |
428 |
- [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}" |
429 |
- [ -n "${syms}" ] && ewarn "directories:${syms}" |
430 |
- ewarn "The ebuild will attempt to fix these, but only for trivial conversions." |
431 |
- ewarn "If things fail, you will need to manually create/move the directories." |
432 |
- echo |
433 |
- fi |
434 |
- |
435 |
- # setup symlinks and dirs where we expect them to be; do not migrate |
436 |
- # data ... just fall over in that case. |
437 |
- if use split-usr ; then |
438 |
- prefix_lst=( "${EROOT}"/{,usr/,usr/local/} ) |
439 |
- else |
440 |
- prefix_lst=( "${EROOT}"/{usr/,usr/local/} ) |
441 |
- fi |
442 |
- for prefix in "${prefix_lst[@]}"; do |
443 |
- if [ "${SYMLINK_LIB}" = yes ] ; then |
444 |
- # we need to make sure "lib" points to the native libdir |
445 |
- if [ -h "${prefix}lib" ] ; then |
446 |
- # it's already a symlink! assume it's pointing to right place ... |
447 |
- continue |
448 |
- elif [ -d "${prefix}lib" ] ; then |
449 |
- # "lib" is a dir, so need to convert to a symlink |
450 |
- ewarn "Converting ${prefix}lib from a dir to a symlink" |
451 |
- rm -f "${prefix}lib"/.keep || die |
452 |
- if rmdir "${prefix}lib" 2>/dev/null ; then |
453 |
- ln -s ${def_libdir} "${prefix}lib" || die |
454 |
- else |
455 |
- die "non-empty dir found where we needed a symlink: ${prefix}lib" |
456 |
- fi |
457 |
- else |
458 |
- # nothing exists, so just set it up sanely |
459 |
- ewarn "Initializing ${prefix}lib as a symlink" |
460 |
- mkdir -p "${prefix}" || die |
461 |
- rm -f "${prefix}lib" || die |
462 |
- ln -s ${def_libdir} "${prefix}lib" || die |
463 |
- mkdir -p "${prefix}${def_libdir}" || die #423571 |
464 |
- fi |
465 |
- else |
466 |
- # we need to make sure "lib" is a dir |
467 |
- if [ -h "${prefix}lib" ] ; then |
468 |
- # "lib" is a symlink, so need to convert to a dir |
469 |
- ewarn "Converting ${prefix}lib from a symlink to a dir" |
470 |
- rm -f "${prefix}lib" || die |
471 |
- if [ -d "${prefix}lib32" ] ; then |
472 |
- ewarn "Migrating ${prefix}lib32 to ${prefix}lib" |
473 |
- mv "${prefix}lib32" "${prefix}lib" || die |
474 |
- else |
475 |
- mkdir -p "${prefix}lib" || die |
476 |
- fi |
477 |
- elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; then |
478 |
- # make sure the old "lib" ABI location does not exist; we |
479 |
- # only symlinked the lib dir on systems where we moved it |
480 |
- # to "lib32" ... |
481 |
- case ${CHOST} in |
482 |
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd. |
483 |
- i?86*|x86_64*|powerpc*|sparc*|s390*) |
484 |
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then |
485 |
- rm -f "${prefix}lib32"/.keep || die |
486 |
- if ! rmdir "${prefix}lib32" 2>/dev/null ; then |
487 |
- ewarn "You need to merge ${prefix}lib32 into ${prefix}lib" |
488 |
- die "non-empty dir found where there should be none: ${prefix}lib32" |
489 |
- fi |
490 |
- fi |
491 |
- ;; |
492 |
- esac |
493 |
- else |
494 |
- # nothing exists, so just set it up sanely |
495 |
- ewarn "Initializing ${prefix}lib as a dir" |
496 |
- mkdir -p "${prefix}lib" || die |
497 |
- fi |
498 |
- fi |
499 |
- done |
500 |
- if ! use split-usr ; then |
501 |
- for libdir in ${libdirs}; do |
502 |
- if [[ ! -e "${EROOT}${libdir}" ]]; then |
503 |
- ln -s usr/"${libdir}" "${EROOT}${libdir}" || |
504 |
- die "Unable to make ${EROOT}${libdir} symlink" |
505 |
- fi |
506 |
- done |
507 |
- fi |
508 |
-} |
509 |
- |
510 |
-pkg_preinst() { |
511 |
- # This is written in src_install (so it's in CONTENTS), but punt all |
512 |
- # pending updates to avoid user having to do etc-update (and make the |
513 |
- # pkg_postinst logic simpler). |
514 |
- rm -f "${EROOT}"/etc/._cfg????_gentoo-release || die |
515 |
- |
516 |
- # We need to install directories and maybe some dev nodes when building |
517 |
- # stages, but they cannot be in CONTENTS. |
518 |
- # Also, we cannot reference $S as binpkg will break so we do this. |
519 |
- multilib_layout |
520 |
- if use build ; then |
521 |
- if use split-usr ; then |
522 |
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout |
523 |
- else |
524 |
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge |
525 |
- fi |
526 |
- fi |
527 |
- rm -f "${ED}"/usr/share/${PN}/Makefile || die |
528 |
-} |
529 |
- |
530 |
-src_prepare() { |
531 |
- default |
532 |
- if use prefix; then |
533 |
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile |
534 |
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd |
535 |
- echo PATH=/usr/bin:/bin >> etc/env.d/99host |
536 |
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host |
537 |
- fi |
538 |
- |
539 |
- # don't want symlinked directories in PATH on systems with usr-merge |
540 |
- if ! use split-usr; then |
541 |
- sed \ |
542 |
- -e 's|/usr/local/sbin:||g' \ |
543 |
- -e 's|:/usr/sbin:|:|g' \ |
544 |
- -e 's|:/sbin:|:|g' \ |
545 |
- -e 's|:/bin:|:|g' \ |
546 |
- -i etc/env.d/50baselayout || die |
547 |
- fi |
548 |
- |
549 |
- # handle multilib paths. do it here because we want this behavior |
550 |
- # regardless of the C library that you're using. we do explicitly |
551 |
- # list paths which the native ldconfig searches, but this isn't |
552 |
- # problematic as it doesn't change the resulting ld.so.cache or |
553 |
- # take longer to generate. similarly, listing both the native |
554 |
- # path and the symlinked path doesn't change the resulting cache. |
555 |
- local libdir ldpaths |
556 |
- for libdir in $(get_all_libdirs) ; do |
557 |
- use split-usr && ldpaths+=":${EPREFIX}/${libdir}" |
558 |
- ldpaths+=":${EPREFIX}/usr/${libdir}" |
559 |
- ldpaths+=":${EPREFIX}/usr/local/${libdir}" |
560 |
- done |
561 |
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout |
562 |
- |
563 |
- # rc-scripts version for testing of features that *should* be present |
564 |
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release |
565 |
-} |
566 |
- |
567 |
-src_install() { |
568 |
- emake \ |
569 |
- OS=Linux \ |
570 |
- DESTDIR="${ED}" \ |
571 |
- install |
572 |
- dodoc ChangeLog |
573 |
- rm "${ED}"/etc/sysctl.d/README || die |
574 |
- |
575 |
- # need the makefile in pkg_preinst |
576 |
- insinto /usr/share/${PN} |
577 |
- doins Makefile |
578 |
- |
579 |
- # This is needed for https://bugs.gentoo.org/732142 |
580 |
- dodir /usr/lib |
581 |
- mv "${ED}"/etc/os-release "${ED}"/usr/lib || die |
582 |
- dosym ../usr/lib/os-release /etc/os-release |
583 |
-} |
584 |
- |
585 |
-pkg_postinst() { |
586 |
- local x |
587 |
- |
588 |
- # We installed some files to /usr/share/baselayout instead of /etc to stop |
589 |
- # (1) overwriting the user's settings |
590 |
- # (2) screwing things up when attempting to merge files |
591 |
- # (3) accidentally packaging up personal files with quickpkg |
592 |
- # If they don't exist then we install them |
593 |
- for x in master.passwd passwd shadow group fstab ; do |
594 |
- [ -e "${EROOT}/etc/${x}" ] && continue |
595 |
- [ -e "${EROOT}/usr/share/baselayout/${x}" ] || continue |
596 |
- cp -p "${EROOT}/usr/share/baselayout/${x}" "${EROOT}"/etc || die |
597 |
- done |
598 |
- |
599 |
- # Force shadow permissions to not be world-readable #260993 |
600 |
- for x in shadow ; do |
601 |
- if [ -e "${EROOT}/etc/${x}" ] ; then |
602 |
- chmod o-rwx "${EROOT}/etc/${x}" || die |
603 |
- fi |
604 |
- done |
605 |
- |
606 |
- # Take care of the etc-update for the user |
607 |
- if [ -e "${EROOT}"/etc/._cfg0000_gentoo-release ] ; then |
608 |
- mv "${EROOT}"/etc/._cfg0000_gentoo-release "${EROOT}"/etc/gentoo-release || die |
609 |
- fi |
610 |
- |
611 |
- # whine about users that lack passwords #193541 |
612 |
- if [[ -e "${EROOT}"/etc/shadow ]] ; then |
613 |
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow) |
614 |
- if [[ -n ${bad_users} ]] ; then |
615 |
- echo |
616 |
- ewarn "The following users lack passwords!" |
617 |
- ewarn ${bad_users} |
618 |
- fi |
619 |
- fi |
620 |
- |
621 |
- # whine about users with invalid shells #215698 |
622 |
- if [[ -e "${EROOT}"/etc/passwd ]] ; then |
623 |
- local bad_shells=$(awk -F: 'system("test -e ${ROOT}" $7) { print $1 " - " $7}' "${EROOT}"/etc/passwd | sort) |
624 |
- if [[ -n ${bad_shells} ]] ; then |
625 |
- echo |
626 |
- ewarn "The following users have non-existent shells!" |
627 |
- ewarn "${bad_shells}" |
628 |
- fi |
629 |
- fi |
630 |
- |
631 |
- # https://bugs.gentoo.org/361349 |
632 |
- if use kernel_linux; then |
633 |
- mkdir -p "${EROOT}"/run || die |
634 |
- |
635 |
- local found fstype mountpoint |
636 |
- while read -r _ mountpoint fstype _; do |
637 |
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1 |
638 |
- done < "${ROOT}"/proc/mounts |
639 |
- [[ -z ${found} ]] && |
640 |
- ewarn "You should reboot now to get /run mounted with tmpfs!" |
641 |
- fi |
642 |
- |
643 |
- for x in ${REPLACING_VERSIONS}; do |
644 |
- if ver_test 2.4 -lt ${x}; then |
645 |
- ewarn "After updating ${EROOT}/etc/profile, please run" |
646 |
- ewarn "env-update && . /etc/profile" |
647 |
- fi |
648 |
- |
649 |
- if ver_test 2.6 -lt ${x}; then |
650 |
- ewarn "Please run env-update then log out and back in to" |
651 |
- ewarn "update your path." |
652 |
- fi |
653 |
- # clean up after 2.5 typos |
654 |
- # https://bugs.gentoo.org/show_bug.cgi?id=656380 |
655 |
- if [[ ${x} == 2.5 ]]; then |
656 |
- rm -fr "${EROOT}/{,usr" || die |
657 |
- fi |
658 |
- done |
659 |
- |
660 |
- if [[ -e "${EROOT}"/etc/env.d/00basic ]]; then |
661 |
- ewarn "${EROOT}/etc/env.d/00basic is now ${EROOT}/etc/env.d/50baselayout" |
662 |
- ewarn "Please migrate your changes." |
663 |
- fi |
664 |
-} |
665 |
|
666 |
diff --git a/sys-apps/baselayout/baselayout-2.7.ebuild b/sys-apps/baselayout/baselayout-2.7.ebuild |
667 |
deleted file mode 100644 |
668 |
index b9c1e7df5282..000000000000 |
669 |
--- a/sys-apps/baselayout/baselayout-2.7.ebuild |
670 |
+++ /dev/null |
671 |
@@ -1,312 +0,0 @@ |
672 |
-# Copyright 1999-2022 Gentoo Authors |
673 |
-# Distributed under the terms of the GNU General Public License v2 |
674 |
- |
675 |
-EAPI=6 |
676 |
- |
677 |
-inherit multilib versionator prefix |
678 |
- |
679 |
-DESCRIPTION="Filesystem baselayout and init scripts" |
680 |
-HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage" |
681 |
-if [[ ${PV} = 9999 ]]; then |
682 |
- EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git" |
683 |
- inherit git-r3 |
684 |
-else |
685 |
- SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2" |
686 |
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" |
687 |
-fi |
688 |
- |
689 |
-LICENSE="GPL-2" |
690 |
-SLOT="0" |
691 |
-IUSE="build +split-usr" |
692 |
- |
693 |
-pkg_setup() { |
694 |
- multilib_layout |
695 |
-} |
696 |
- |
697 |
-# Create our multilib dirs - the Makefile has no knowledge of this |
698 |
-multilib_layout() { |
699 |
- local dir def_libdir libdir libdirs |
700 |
- local prefix prefix_lst |
701 |
- def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI) |
702 |
- libdirs=$(get_all_libdirs) |
703 |
- : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass... |
704 |
- |
705 |
- if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then |
706 |
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} ) |
707 |
- for prefix in "${prefix_lst[@]}"; do |
708 |
- for libdir in ${libdirs}; do |
709 |
- dir="${prefix}${libdir}" |
710 |
- if [[ -e "${dir}" ]]; then |
711 |
- [[ ! -d "${dir}" ]] && |
712 |
- die "${dir} exists but is not a directory" |
713 |
- continue |
714 |
- fi |
715 |
- if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then |
716 |
- einfo "symlinking ${dir} to usr/${libdir}" |
717 |
- ln -s usr/${libdir} ${dir} || |
718 |
- die " Unable to make ${dir} symlink" |
719 |
- else |
720 |
- einfo "creating directory ${dir}" |
721 |
- mkdir -p "${dir}" || |
722 |
- die "Unable to create ${dir} directory" |
723 |
- fi |
724 |
- done |
725 |
- done |
726 |
- return 0 |
727 |
- fi |
728 |
- |
729 |
- [ -z "${def_libdir}" ] && |
730 |
- die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid" |
731 |
- |
732 |
- # figure out which paths should be symlinks and which should be directories |
733 |
- local dirs syms exp d |
734 |
- for libdir in ${libdirs} ; do |
735 |
- if use split-usr ; then |
736 |
- exp=( {,usr/,usr/local/}${libdir} ) |
737 |
- else |
738 |
- exp=( {usr/,usr/local/}${libdir} ) |
739 |
- fi |
740 |
- for d in "${exp[@]}" ; do |
741 |
- # most things should be dirs |
742 |
- if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then |
743 |
- [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}" |
744 |
- else |
745 |
- [ -h "${d}" ] && syms+=" ${d}" |
746 |
- fi |
747 |
- done |
748 |
- done |
749 |
- if [ -n "${syms}${dirs}" ] ; then |
750 |
- ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to" |
751 |
- ewarn "have these paths configured as follows:" |
752 |
- [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}" |
753 |
- [ -n "${syms}" ] && ewarn "directories:${syms}" |
754 |
- ewarn "The ebuild will attempt to fix these, but only for trivial conversions." |
755 |
- ewarn "If things fail, you will need to manually create/move the directories." |
756 |
- echo |
757 |
- fi |
758 |
- |
759 |
- # setup symlinks and dirs where we expect them to be; do not migrate |
760 |
- # data ... just fall over in that case. |
761 |
- if use split-usr ; then |
762 |
- prefix_lst=( "${EROOT}"{,usr/,usr/local/} ) |
763 |
- else |
764 |
- prefix_lst=( "${EROOT}"{usr/,usr/local/} ) |
765 |
- fi |
766 |
- for prefix in "${prefix_lst[@]}"; do |
767 |
- if [ "${SYMLINK_LIB}" = yes ] ; then |
768 |
- # we need to make sure "lib" points to the native libdir |
769 |
- if [ -h "${prefix}lib" ] ; then |
770 |
- # it's already a symlink! assume it's pointing to right place ... |
771 |
- continue |
772 |
- elif [ -d "${prefix}lib" ] ; then |
773 |
- # "lib" is a dir, so need to convert to a symlink |
774 |
- ewarn "Converting ${prefix}lib from a dir to a symlink" |
775 |
- rm -f "${prefix}lib"/.keep || die |
776 |
- if rmdir "${prefix}lib" 2>/dev/null ; then |
777 |
- ln -s ${def_libdir} "${prefix}lib" || die |
778 |
- else |
779 |
- die "non-empty dir found where we needed a symlink: ${prefix}lib" |
780 |
- fi |
781 |
- else |
782 |
- # nothing exists, so just set it up sanely |
783 |
- ewarn "Initializing ${prefix}lib as a symlink" |
784 |
- mkdir -p "${prefix}" || die |
785 |
- rm -f "${prefix}lib" || die |
786 |
- ln -s ${def_libdir} "${prefix}lib" || die |
787 |
- mkdir -p "${prefix}${def_libdir}" || die #423571 |
788 |
- fi |
789 |
- else |
790 |
- # we need to make sure "lib" is a dir |
791 |
- if [ -h "${prefix}lib" ] ; then |
792 |
- # "lib" is a symlink, so need to convert to a dir |
793 |
- ewarn "Converting ${prefix}lib from a symlink to a dir" |
794 |
- rm -f "${prefix}lib" || die |
795 |
- if [ -d "${prefix}lib32" ] ; then |
796 |
- ewarn "Migrating ${prefix}lib32 to ${prefix}lib" |
797 |
- mv "${prefix}lib32" "${prefix}lib" || die |
798 |
- else |
799 |
- mkdir -p "${prefix}lib" || die |
800 |
- fi |
801 |
- elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; then |
802 |
- # make sure the old "lib" ABI location does not exist; we |
803 |
- # only symlinked the lib dir on systems where we moved it |
804 |
- # to "lib32" ... |
805 |
- case ${CHOST} in |
806 |
- *-gentoo-freebsd*) ;; # We want it the other way on fbsd. |
807 |
- i?86*|x86_64*|powerpc*|sparc*|s390*) |
808 |
- if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then |
809 |
- rm -f "${prefix}lib32"/.keep || die |
810 |
- if ! rmdir "${prefix}lib32" 2>/dev/null ; then |
811 |
- ewarn "You need to merge ${prefix}lib32 into ${prefix}lib" |
812 |
- die "non-empty dir found where there should be none: ${prefix}lib32" |
813 |
- fi |
814 |
- fi |
815 |
- ;; |
816 |
- esac |
817 |
- else |
818 |
- # nothing exists, so just set it up sanely |
819 |
- ewarn "Initializing ${prefix}lib as a dir" |
820 |
- mkdir -p "${prefix}lib" || die |
821 |
- fi |
822 |
- fi |
823 |
- done |
824 |
- if ! use split-usr ; then |
825 |
- for libdir in ${libdirs}; do |
826 |
- if [[ ! -e "${EROOT}${libdir}" ]]; then |
827 |
- ln -s usr/"${libdir}" "${EROOT}${libdir}" || |
828 |
- die " Unable to make ${EROOT}${libdir} symlink" |
829 |
- fi |
830 |
- done |
831 |
- fi |
832 |
-} |
833 |
- |
834 |
-pkg_preinst() { |
835 |
- # This is written in src_install (so it's in CONTENTS), but punt all |
836 |
- # pending updates to avoid user having to do etc-update (and make the |
837 |
- # pkg_postinst logic simpler). |
838 |
- rm -f "${EROOT}"/etc/._cfg????_gentoo-release || die |
839 |
- |
840 |
- # We need to install directories and maybe some dev nodes when building |
841 |
- # stages, but they cannot be in CONTENTS. |
842 |
- # Also, we cannot reference $S as binpkg will break so we do this. |
843 |
- multilib_layout |
844 |
- if use build ; then |
845 |
- if use split-usr ; then |
846 |
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout |
847 |
- else |
848 |
- emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge |
849 |
- fi |
850 |
- fi |
851 |
- rm -f "${ED}"/usr/share/${PN}/Makefile || die |
852 |
-} |
853 |
- |
854 |
-src_prepare() { |
855 |
- default |
856 |
- if use prefix; then |
857 |
- hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile |
858 |
- hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd |
859 |
- echo PATH=/usr/bin:/bin >> etc/env.d/99host |
860 |
- echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host |
861 |
- fi |
862 |
- |
863 |
- # don't want symlinked directories in PATH on systems with usr-merge |
864 |
- if ! use split-usr; then |
865 |
- sed \ |
866 |
- -e 's|/usr/local/sbin:||g' \ |
867 |
- -e 's|:/usr/sbin:|:|g' \ |
868 |
- -e 's|:/sbin:|:|g' \ |
869 |
- -e 's|:/bin:|:|g' \ |
870 |
- -i etc/env.d/50baselayout || die |
871 |
- fi |
872 |
- |
873 |
- # handle multilib paths. do it here because we want this behavior |
874 |
- # regardless of the C library that you're using. we do explicitly |
875 |
- # list paths which the native ldconfig searches, but this isn't |
876 |
- # problematic as it doesn't change the resulting ld.so.cache or |
877 |
- # take longer to generate. similarly, listing both the native |
878 |
- # path and the symlinked path doesn't change the resulting cache. |
879 |
- local libdir ldpaths |
880 |
- for libdir in $(get_all_libdirs) ; do |
881 |
- use split-usr && ldpaths+=":${EPREFIX}/${libdir}" |
882 |
- ldpaths+=":${EPREFIX}/usr/${libdir}" |
883 |
- ldpaths+=":${EPREFIX}/usr/local/${libdir}" |
884 |
- done |
885 |
- echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout |
886 |
- |
887 |
- # rc-scripts version for testing of features that *should* be present |
888 |
- echo "Gentoo Base System release ${PV}" > etc/gentoo-release |
889 |
-} |
890 |
- |
891 |
-src_install() { |
892 |
- emake \ |
893 |
- OS=Linux \ |
894 |
- DESTDIR="${ED}" \ |
895 |
- install |
896 |
- dodoc ChangeLog |
897 |
- rm "${ED}"/etc/sysctl.d/README || die |
898 |
- |
899 |
- # need the makefile in pkg_preinst |
900 |
- insinto /usr/share/${PN} |
901 |
- doins Makefile |
902 |
-} |
903 |
- |
904 |
-pkg_postinst() { |
905 |
- local x |
906 |
- |
907 |
- # We installed some files to /usr/share/baselayout instead of /etc to stop |
908 |
- # (1) overwriting the user's settings |
909 |
- # (2) screwing things up when attempting to merge files |
910 |
- # (3) accidentally packaging up personal files with quickpkg |
911 |
- # If they don't exist then we install them |
912 |
- for x in master.passwd passwd shadow group fstab ; do |
913 |
- [ -e "${EROOT}etc/${x}" ] && continue |
914 |
- [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue |
915 |
- cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc || die |
916 |
- done |
917 |
- |
918 |
- # Force shadow permissions to not be world-readable #260993 |
919 |
- for x in shadow ; do |
920 |
- if [ -e "${EROOT}etc/${x}" ] ; then |
921 |
- chmod o-rwx "${EROOT}etc/${x}" || die |
922 |
- fi |
923 |
- done |
924 |
- |
925 |
- # Take care of the etc-update for the user |
926 |
- if [ -e "${EROOT}"etc/._cfg0000_gentoo-release ] ; then |
927 |
- mv "${EROOT}"etc/._cfg0000_gentoo-release "${EROOT}"etc/gentoo-release || die |
928 |
- fi |
929 |
- |
930 |
- # whine about users that lack passwords #193541 |
931 |
- if [[ -e "${EROOT}"etc/shadow ]] ; then |
932 |
- local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow) |
933 |
- if [[ -n ${bad_users} ]] ; then |
934 |
- echo |
935 |
- ewarn "The following users lack passwords!" |
936 |
- ewarn ${bad_users} |
937 |
- fi |
938 |
- fi |
939 |
- |
940 |
- # whine about users with invalid shells #215698 |
941 |
- if [[ -e "${EROOT}"etc/passwd ]] ; then |
942 |
- local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort) |
943 |
- if [[ -n ${bad_shells} ]] ; then |
944 |
- echo |
945 |
- ewarn "The following users have non-existent shells!" |
946 |
- ewarn "${bad_shells}" |
947 |
- fi |
948 |
- fi |
949 |
- |
950 |
- # https://bugs.gentoo.org/361349 |
951 |
- if use kernel_linux; then |
952 |
- mkdir -p "${EROOT}"run || die |
953 |
- |
954 |
- local found fstype mountpoint |
955 |
- while read -r _ mountpoint fstype _; do |
956 |
- [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1 |
957 |
- done < "${ROOT}"proc/mounts |
958 |
- [[ -z ${found} ]] && |
959 |
- ewarn "You should reboot now to get /run mounted with tmpfs!" |
960 |
- fi |
961 |
- |
962 |
- for x in ${REPLACING_VERSIONS}; do |
963 |
- if ! version_is_at_least 2.4 ${x}; then |
964 |
- ewarn "After updating ${EROOT}etc/profile, please run" |
965 |
- ewarn "env-update && . /etc/profile" |
966 |
- fi |
967 |
- |
968 |
- if ! version_is_at_least 2.6 ${x}; then |
969 |
- ewarn "Please run env-update then log out and back in to" |
970 |
- ewarn "update your path." |
971 |
- fi |
972 |
- # clean up after 2.5 typos |
973 |
- # https://bugs.gentoo.org/show_bug.cgi?id=656380 |
974 |
- if [[ ${x} == 2.5 ]]; then |
975 |
- rm -fr "${EROOT}{,usr" || die |
976 |
- fi |
977 |
- done |
978 |
- |
979 |
- if [[ -e "${EROOT}"etc/env.d/00basic ]]; then |
980 |
- ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout" |
981 |
- ewarn "Please migrate your changes." |
982 |
- fi |
983 |
-} |