Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
Date: Fri, 16 Apr 2021 16:38:14
Message-Id: 1618591066.701ffbd641d1867102b5feb98fab4a4df69a0171.williamh@gentoo
1 commit: 701ffbd641d1867102b5feb98fab4a4df69a0171
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 16 16:36:23 2021 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 16 16:37:46 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=701ffbd6
7
8 sys-apps/baselayout: remove old versions
9
10 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
11
12 sys-apps/baselayout/Manifest | 2 -
13 sys-apps/baselayout/baselayout-2.4.1-r2.ebuild | 248 ---------------------
14 sys-apps/baselayout/baselayout-2.6-r1.ebuild | 297 -------------------------
15 3 files changed, 547 deletions(-)
16
17 diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
18 index 293c93ad739..112675aad11 100644
19 --- a/sys-apps/baselayout/Manifest
20 +++ b/sys-apps/baselayout/Manifest
21 @@ -1,3 +1 @@
22 -DIST baselayout-2.4.1.tar.bz2 31307 BLAKE2B da26f7fbeefa5efecb6e5d9ded6c2bf3148cd1fcfc6ebb86535f5a9c086c4bb55f6a8420a3c0d0f7008251637f3e4653db875ec427745d039f753008d2f21be2 SHA512 e505ad81834aafb574ffee9bc1fce216c1c8c7fa11b0095580f87a37e4b9efb057ee78db7cd5affc64f05d5dd0592c671304414c119b37d86dfaa1e7b84ce7c1
23 -DIST baselayout-2.6.tar.bz2 31871 BLAKE2B 4a51d173dc5a2837f78cd1247b5eadd89e7d0b5f2dbc72e75f027b0c23a5db9a386c53e756e80240f36ad4d63e3fe421bf9510c18321d7a31fda140ad47b2860 SHA512 5cad5faf56871ae951120643e29db0c39fea6dc845b4755382bd469eca32639ec6cd0cd046d3c439a7cc607b18770036f9c256260d35beaffb094e23cb13740b
24 DIST baselayout-2.7.tar.bz2 30317 BLAKE2B 7b7c284b7d0a9608a0d03dbde0d62d793829b61d5361f5062fdeb8880a2f792c142e20acf7fa92e713e2ebb0bd1609ca65bc8a4191f2bf2c5df4f474eaeef1ee SHA512 8b28d2dc20fd5887db5c0e6b67a4217c4d0730529023fc57fb1ee95a431e1f492fb21e3e66980bef766819e9f542dc7e4ad3ae25465390194bbf970c3653c88e
25
26 diff --git a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild b/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
27 deleted file mode 100644
28 index c3d6a9fa3dc..00000000000
29 --- a/sys-apps/baselayout/baselayout-2.4.1-r2.ebuild
30 +++ /dev/null
31 @@ -1,248 +0,0 @@
32 -# Copyright 1999-2021 Gentoo Authors
33 -# Distributed under the terms of the GNU General Public License v2
34 -
35 -EAPI=6
36 -
37 -inherit eutils multilib versionator prefix
38 -
39 -DESCRIPTION="Filesystem baselayout and init scripts"
40 -HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
41 -SRC_URI="https://gitweb.gentoo.org/proj/baselayout.git/snapshot/${P}.tar.bz2"
42 -
43 -LICENSE="GPL-2"
44 -SLOT="0"
45 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
46 -IUSE="build kernel_linux"
47 -
48 -pkg_setup() {
49 - multilib_layout
50 -}
51 -
52 -# Create our multilib dirs - the Makefile has no knowledge of this
53 -multilib_layout() {
54 - local libdir libdirs=$(get_all_libdirs) def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
55 - : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
56 -
57 - [ -z "${def_libdir}" ] &&
58 - die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid"
59 -
60 - # figure out which paths should be symlinks and which should be directories
61 - local dirs syms exp d
62 - for libdir in ${libdirs} ; do
63 - exp=( {,usr/,usr/local/}${libdir} )
64 - for d in "${exp[@]}" ; do
65 - # most things should be dirs
66 - if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then
67 - [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}"
68 - else
69 - [ -h "${d}" ] && syms+=" ${d}"
70 - fi
71 - done
72 - done
73 - if [ -n "${syms}${dirs}" ] ; then
74 - ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to"
75 - ewarn "have these paths configured as follows:"
76 - [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}"
77 - [ -n "${syms}" ] && ewarn "directories:${syms}"
78 - ewarn "The ebuild will attempt to fix these, but only for trivial conversions."
79 - ewarn "If things fail, you will need to manually create/move the directories."
80 - echo
81 - fi
82 -
83 - # setup symlinks and dirs where we expect them to be; do not migrate
84 - # data ... just fall over in that case.
85 - local prefix
86 - for prefix in "${EROOT}"{,usr/,usr/local/} ; do
87 - if [ "${SYMLINK_LIB}" = yes ] ; then
88 - # we need to make sure "lib" points to the native libdir
89 - if [ -h "${prefix}lib" ] ; then
90 - # it's already a symlink! assume it's pointing to right place ...
91 - continue
92 - elif [ -d "${prefix}lib" ] ; then
93 - # "lib" is a dir, so need to convert to a symlink
94 - ewarn "Converting ${prefix}lib from a dir to a symlink"
95 - rm -f "${prefix}lib"/.keep
96 - if rmdir "${prefix}lib" 2>/dev/null ; then
97 - ln -s ${def_libdir} "${prefix}lib" || die
98 - else
99 - die "non-empty dir found where we needed a symlink: ${prefix}lib"
100 - fi
101 - else
102 - # nothing exists, so just set it up sanely
103 - ewarn "Initializing ${prefix}lib as a symlink"
104 - mkdir -p "${prefix}" || die
105 - rm -f "${prefix}lib" || die
106 - ln -s ${def_libdir} "${prefix}lib" || die
107 - mkdir -p "${prefix}${def_libdir}" #423571
108 - fi
109 - else
110 - # we need to make sure "lib" is a dir
111 - if [ -h "${prefix}lib" ] ; then
112 - # "lib" is a symlink, so need to convert to a dir
113 - ewarn "Converting ${prefix}lib from a symlink to a dir"
114 - rm -f "${prefix}lib" || die
115 - if [ -d "${prefix}lib32" ] ; then
116 - ewarn "Migrating ${prefix}lib32 to ${prefix}lib"
117 - mv "${prefix}lib32" "${prefix}lib" || die
118 - else
119 - mkdir -p "${prefix}lib" || die
120 - fi
121 - elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; then
122 - # make sure the old "lib" ABI location does not exist; we
123 - # only symlinked the lib dir on systems where we moved it
124 - # to "lib32" ...
125 - case ${CHOST} in
126 - *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
127 - i?86*|x86_64*|powerpc*|sparc*|s390*)
128 - if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
129 - rm -f "${prefix}lib32"/.keep
130 - if ! rmdir "${prefix}lib32" 2>/dev/null ; then
131 - ewarn "You need to merge ${prefix}lib32 into ${prefix}lib"
132 - die "non-empty dir found where there should be none: ${prefix}lib32"
133 - fi
134 - fi
135 - ;;
136 - esac
137 - else
138 - # nothing exists, so just set it up sanely
139 - ewarn "Initializing ${prefix}lib as a dir"
140 - mkdir -p "${prefix}lib" || die
141 - fi
142 - fi
143 - done
144 -}
145 -
146 -pkg_preinst() {
147 - # Bug #217848 - Since the remap_dns_vars() called by pkg_preinst() of
148 - # the baselayout-1.x ebuild copies all the real configs from the user's
149 - # /etc/conf.d into ${D}, it makes them all appear to be the default
150 - # versions. In order to protect them from being unmerged after this
151 - # upgrade, modify their timestamps.
152 - touch "${EROOT}"/etc/conf.d/* 2>/dev/null
153 -
154 - # This is written in src_install (so it's in CONTENTS), but punt all
155 - # pending updates to avoid user having to do etc-update (and make the
156 - # pkg_postinst logic simpler).
157 - rm -f "${EROOT}"/etc/._cfg????_gentoo-release
158 -
159 - # We need to install directories and maybe some dev nodes when building
160 - # stages, but they cannot be in CONTENTS.
161 - # Also, we cannot reference $S as binpkg will break so we do this.
162 - multilib_layout
163 - if use build ; then
164 - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
165 - fi
166 - rm -f "${ED}"/usr/share/${PN}/Makefile
167 -}
168 -
169 -src_prepare() {
170 - default
171 - if use prefix; then
172 - hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
173 - hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
174 - echo PATH=/usr/bin:/bin >> etc/env.d/99host
175 - echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
176 - fi
177 -
178 - # handle multilib paths. do it here because we want this behavior
179 - # regardless of the C library that you're using. we do explicitly
180 - # list paths which the native ldconfig searches, but this isn't
181 - # problematic as it doesn't change the resulting ld.so.cache or
182 - # take longer to generate. similarly, listing both the native
183 - # path and the symlinked path doesn't change the resulting cache.
184 - local libdir ldpaths
185 - for libdir in $(get_all_libdirs) ; do
186 - ldpaths+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
187 - ldpaths+=":${EPREFIX}/usr/local/${libdir}"
188 - done
189 - echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
190 -
191 - # rc-scripts version for testing of features that *should* be present
192 - echo "Gentoo Base System release ${PV}" > etc/gentoo-release
193 -}
194 -
195 -src_install() {
196 - emake \
197 - OS=$(usex kernel_FreeBSD BSD Linux) \
198 - DESTDIR="${ED}" \
199 - install
200 - dodoc ChangeLog
201 -
202 - # need the makefile in pkg_preinst
203 - insinto /usr/share/${PN}
204 - doins Makefile
205 -}
206 -
207 -pkg_postinst() {
208 - local x
209 -
210 - # We installed some files to /usr/share/baselayout instead of /etc to stop
211 - # (1) overwriting the user's settings
212 - # (2) screwing things up when attempting to merge files
213 - # (3) accidentally packaging up personal files with quickpkg
214 - # If they don't exist then we install them
215 - for x in master.passwd passwd shadow group fstab ; do
216 - [ -e "${EROOT}etc/${x}" ] && continue
217 - [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
218 - cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
219 - done
220 -
221 - # Force shadow permissions to not be world-readable #260993
222 - for x in shadow ; do
223 - [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
224 - done
225 -
226 - # Take care of the etc-update for the user
227 - if [ -e "${EROOT}"etc/._cfg0000_gentoo-release ] ; then
228 - mv "${EROOT}"etc/._cfg0000_gentoo-release "${EROOT}"etc/gentoo-release
229 - fi
230 -
231 - # whine about users that lack passwords #193541
232 - if [[ -e "${EROOT}"etc/shadow ]] ; then
233 - local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
234 - if [[ -n ${bad_users} ]] ; then
235 - echo
236 - ewarn "The following users lack passwords!"
237 - ewarn ${bad_users}
238 - fi
239 - fi
240 -
241 - # baselayout leaves behind a lot of .keep files, so let's clean them up
242 - find "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
243 - find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
244 -
245 - # whine about users with invalid shells #215698
246 - if [[ -e "${EROOT}"etc/passwd ]] ; then
247 - local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
248 - if [[ -n ${bad_shells} ]] ; then
249 - echo
250 - ewarn "The following users have non-existent shells!"
251 - ewarn "${bad_shells}"
252 - fi
253 - fi
254 -
255 - # https://bugs.gentoo.org/361349
256 - if use kernel_linux; then
257 - mkdir -p "${EROOT}"run
258 -
259 - local found fstype mountpoint
260 - while read -r _ mountpoint fstype _; do
261 - [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
262 - done < "${ROOT}"proc/mounts
263 - [[ -z ${found} ]] &&
264 - ewarn "You should reboot now to get /run mounted with tmpfs!"
265 - fi
266 -
267 - for x in ${REPLACING_VERSIONS}; do
268 - if ! version_is_at_least 2.4 ${v}; then
269 - ewarn "After updating ${EROOT}etc/profile, please run"
270 - ewarn "env-update and . /etc/profile"
271 - break
272 - fi
273 - done
274 -
275 - if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
276 - ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
277 - ewarn "Please migrate your changes."
278 - fi
279 -}
280
281 diff --git a/sys-apps/baselayout/baselayout-2.6-r1.ebuild b/sys-apps/baselayout/baselayout-2.6-r1.ebuild
282 deleted file mode 100644
283 index 5471a444eb2..00000000000
284 --- a/sys-apps/baselayout/baselayout-2.6-r1.ebuild
285 +++ /dev/null
286 @@ -1,297 +0,0 @@
287 -# Copyright 1999-2020 Gentoo Authors
288 -# Distributed under the terms of the GNU General Public License v2
289 -
290 -EAPI=6
291 -
292 -inherit multilib versionator prefix
293 -
294 -DESCRIPTION="Filesystem baselayout and init scripts"
295 -HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
296 -if [[ ${PV} = 9999 ]]; then
297 - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
298 - inherit git-r3
299 -else
300 - SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
301 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
302 -fi
303 -
304 -LICENSE="GPL-2"
305 -SLOT="0"
306 -IUSE="build kernel_FreeBSD kernel_linux +split-usr"
307 -
308 -pkg_setup() {
309 - multilib_layout
310 -}
311 -
312 -# Create our multilib dirs - the Makefile has no knowledge of this
313 -multilib_layout() {
314 - local dir def_libdir libdir libdirs
315 - local prefix prefix_lst
316 - def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
317 - libdirs=$(get_all_libdirs)
318 - : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
319 -
320 - if [[ -z "${SYMLINK_LIB}" || ${SYMLINK_LIB} = no ]] ; then
321 - prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
322 - for prefix in ${prefix_lst[@]}; do
323 - for libdir in ${libdirs}; do
324 - dir="${prefix}${libdir}"
325 - if [[ -e "${dir}" ]]; then
326 - [[ ! -d "${dir}" ]] &&
327 - die "${dir} exists but is not a directory"
328 - continue
329 - fi
330 - if ! use split-usr && [[ ${prefix} = ${EROOT} ]]; then
331 - einfo "symlinking ${dir} to usr/${libdir}"
332 - ln -s usr/${libdir} ${dir} ||
333 - die " Unable to make ${dir} symlink"
334 - else
335 - einfo "creating directory ${dir}"
336 - mkdir -p "${dir}" ||
337 - die "Unable to create ${dir} directory"
338 - fi
339 - done
340 - done
341 - return 0
342 - fi
343 -
344 - [ -z "${def_libdir}" ] &&
345 - die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid"
346 -
347 - # figure out which paths should be symlinks and which should be directories
348 - local dirs syms exp d
349 - for libdir in ${libdirs} ; do
350 - if use split-usr ; then
351 - exp=( {,usr/,usr/local/}${libdir} )
352 - else
353 - exp=( {usr/,usr/local/}${libdir} )
354 - fi
355 - for d in "${exp[@]}" ; do
356 - # most things should be dirs
357 - if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then
358 - [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}"
359 - else
360 - [ -h "${d}" ] && syms+=" ${d}"
361 - fi
362 - done
363 - done
364 - if [ -n "${syms}${dirs}" ] ; then
365 - ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to"
366 - ewarn "have these paths configured as follows:"
367 - [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}"
368 - [ -n "${syms}" ] && ewarn "directories:${syms}"
369 - ewarn "The ebuild will attempt to fix these, but only for trivial conversions."
370 - ewarn "If things fail, you will need to manually create/move the directories."
371 - echo
372 - fi
373 -
374 - # setup symlinks and dirs where we expect them to be; do not migrate
375 - # data ... just fall over in that case.
376 - if use split-usr ; then
377 - prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
378 - else
379 - prefix_lst=( "${EROOT}"{usr/,usr/local/} )
380 - fi
381 - for prefix in "${prefix_lst[@]}"; do
382 - if [ "${SYMLINK_LIB}" = yes ] ; then
383 - # we need to make sure "lib" points to the native libdir
384 - if [ -h "${prefix}lib" ] ; then
385 - # it's already a symlink! assume it's pointing to right place ...
386 - continue
387 - elif [ -d "${prefix}lib" ] ; then
388 - # "lib" is a dir, so need to convert to a symlink
389 - ewarn "Converting ${prefix}lib from a dir to a symlink"
390 - rm -f "${prefix}lib"/.keep
391 - if rmdir "${prefix}lib" 2>/dev/null ; then
392 - ln -s ${def_libdir} "${prefix}lib" || die
393 - else
394 - die "non-empty dir found where we needed a symlink: ${prefix}lib"
395 - fi
396 - else
397 - # nothing exists, so just set it up sanely
398 - ewarn "Initializing ${prefix}lib as a symlink"
399 - mkdir -p "${prefix}" || die
400 - rm -f "${prefix}lib" || die
401 - ln -s ${def_libdir} "${prefix}lib" || die
402 - mkdir -p "${prefix}${def_libdir}" #423571
403 - fi
404 - else
405 - # we need to make sure "lib" is a dir
406 - if [ -h "${prefix}lib" ] ; then
407 - # "lib" is a symlink, so need to convert to a dir
408 - ewarn "Converting ${prefix}lib from a symlink to a dir"
409 - rm -f "${prefix}lib" || die
410 - if [ -d "${prefix}lib32" ] ; then
411 - ewarn "Migrating ${prefix}lib32 to ${prefix}lib"
412 - mv "${prefix}lib32" "${prefix}lib" || die
413 - else
414 - mkdir -p "${prefix}lib" || die
415 - fi
416 - elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; then
417 - # make sure the old "lib" ABI location does not exist; we
418 - # only symlinked the lib dir on systems where we moved it
419 - # to "lib32" ...
420 - case ${CHOST} in
421 - *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
422 - i?86*|x86_64*|powerpc*|sparc*|s390*)
423 - if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
424 - rm -f "${prefix}lib32"/.keep
425 - if ! rmdir "${prefix}lib32" 2>/dev/null ; then
426 - ewarn "You need to merge ${prefix}lib32 into ${prefix}lib"
427 - die "non-empty dir found where there should be none: ${prefix}lib32"
428 - fi
429 - fi
430 - ;;
431 - esac
432 - else
433 - # nothing exists, so just set it up sanely
434 - ewarn "Initializing ${prefix}lib as a dir"
435 - mkdir -p "${prefix}lib" || die
436 - fi
437 - fi
438 - done
439 - if ! use split-usr ; then
440 - for libdir in ${libdirs}; do
441 - if [[ ! -e "${EROOT}${libdir}" ]]; then
442 - ln -s usr/"${libdir}" "${EROOT}${libdir}"
443 - fi
444 - done
445 - fi
446 -}
447 -
448 -pkg_preinst() {
449 - # This is written in src_install (so it's in CONTENTS), but punt all
450 - # pending updates to avoid user having to do etc-update (and make the
451 - # pkg_postinst logic simpler).
452 - rm -f "${EROOT}"/etc/._cfg????_gentoo-release
453 -
454 - # We need to install directories and maybe some dev nodes when building
455 - # stages, but they cannot be in CONTENTS.
456 - # Also, we cannot reference $S as binpkg will break so we do this.
457 - multilib_layout
458 - if use build ; then
459 - if use split-usr ; then
460 - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
461 - else
462 - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
463 - fi
464 - fi
465 - rm -f "${ED}"/usr/share/${PN}/Makefile
466 -}
467 -
468 -src_prepare() {
469 - default
470 - if use prefix; then
471 - hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
472 - hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
473 - echo PATH=/usr/bin:/bin >> etc/env.d/99host
474 - echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
475 - fi
476 -
477 - # handle multilib paths. do it here because we want this behavior
478 - # regardless of the C library that you're using. we do explicitly
479 - # list paths which the native ldconfig searches, but this isn't
480 - # problematic as it doesn't change the resulting ld.so.cache or
481 - # take longer to generate. similarly, listing both the native
482 - # path and the symlinked path doesn't change the resulting cache.
483 - local libdir ldpaths
484 - for libdir in $(get_all_libdirs) ; do
485 - ldpaths+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
486 - ldpaths+=":${EPREFIX}/usr/local/${libdir}"
487 - done
488 - echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
489 -
490 - # rc-scripts version for testing of features that *should* be present
491 - echo "Gentoo Base System release ${PV}" > etc/gentoo-release
492 -}
493 -
494 -src_install() {
495 - emake \
496 - OS=$(usex kernel_FreeBSD BSD Linux) \
497 - DESTDIR="${ED}" \
498 - install
499 - dodoc ChangeLog
500 -
501 - # need the makefile in pkg_preinst
502 - insinto /usr/share/${PN}
503 - doins Makefile
504 -}
505 -
506 -pkg_postinst() {
507 - local x
508 -
509 - # We installed some files to /usr/share/baselayout instead of /etc to stop
510 - # (1) overwriting the user's settings
511 - # (2) screwing things up when attempting to merge files
512 - # (3) accidentally packaging up personal files with quickpkg
513 - # If they don't exist then we install them
514 - for x in master.passwd passwd shadow group fstab ; do
515 - [ -e "${EROOT}etc/${x}" ] && continue
516 - [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
517 - cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
518 - done
519 -
520 - # Force shadow permissions to not be world-readable #260993
521 - for x in shadow ; do
522 - [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
523 - done
524 -
525 - # Take care of the etc-update for the user
526 - if [ -e "${EROOT}"etc/._cfg0000_gentoo-release ] ; then
527 - mv "${EROOT}"etc/._cfg0000_gentoo-release "${EROOT}"etc/gentoo-release
528 - fi
529 -
530 - # whine about users that lack passwords #193541
531 - if [[ -e "${EROOT}"etc/shadow ]] ; then
532 - local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
533 - if [[ -n ${bad_users} ]] ; then
534 - echo
535 - ewarn "The following users lack passwords!"
536 - ewarn ${bad_users}
537 - fi
538 - fi
539 -
540 - # whine about users with invalid shells #215698
541 - if [[ -e "${EROOT}"etc/passwd ]] ; then
542 - local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
543 - if [[ -n ${bad_shells} ]] ; then
544 - echo
545 - ewarn "The following users have non-existent shells!"
546 - ewarn "${bad_shells}"
547 - fi
548 - fi
549 -
550 - # https://bugs.gentoo.org/361349
551 - if use kernel_linux; then
552 - mkdir -p "${EROOT}"run
553 -
554 - local found fstype mountpoint
555 - while read -r _ mountpoint fstype _; do
556 - [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
557 - done < "${ROOT}"proc/mounts
558 - [[ -z ${found} ]] &&
559 - ewarn "You should reboot now to get /run mounted with tmpfs!"
560 - fi
561 -
562 - for x in ${REPLACING_VERSIONS}; do
563 - if ! version_is_at_least 2.4 ${x}; then
564 - ewarn "After updating ${EROOT}etc/profile, please run"
565 - ewarn "env-update && . /etc/profile"
566 - fi
567 -
568 - if ! version_is_at_least 2.6 ${x}; then
569 - ewarn "Please run env-update then log out and back in to"
570 - ewarn "update your path."
571 - fi
572 - # clean up after 2.5 typos
573 - # https://bugs.gentoo.org/show_bug.cgi?id=656380
574 - if [[ ${x} == 2.5 ]]; then
575 - rm -fr "${EROOT}{,usr"
576 - fi
577 - done
578 -
579 - if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
580 - ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
581 - ewarn "Please migrate your changes."
582 - fi
583 -}