Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/baselayout/
Date: Mon, 12 Nov 2018 11:13:55
Message-Id: 1542021223.1290aa226a91adaf3bc7435fca0c56f45c824f09.polynomial-c@gentoo
1 commit: 1290aa226a91adaf3bc7435fca0c56f45c824f09
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 12 11:13:29 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 12 11:13:43 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1290aa22
7
8 sys-apps/baselayout: Removed old.
9
10 Package-Manager: Portage-2.3.51, Repoman-2.3.12
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 sys-apps/baselayout/baselayout-2.6.ebuild | 273 ------------------------------
14 1 file changed, 273 deletions(-)
15
16 diff --git a/sys-apps/baselayout/baselayout-2.6.ebuild b/sys-apps/baselayout/baselayout-2.6.ebuild
17 deleted file mode 100644
18 index 0428b0afbb9..00000000000
19 --- a/sys-apps/baselayout/baselayout-2.6.ebuild
20 +++ /dev/null
21 @@ -1,273 +0,0 @@
22 -# Copyright 1999-2018 Gentoo Foundation
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=6
26 -
27 -inherit multilib versionator prefix
28 -
29 -DESCRIPTION="Filesystem baselayout and init scripts"
30 -HOMEPAGE="https://www.gentoo.org/"
31 -if [[ ${PV} = 9999 ]]; then
32 - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/${PN}.git"
33 - inherit git-r3
34 -else
35 - SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
36 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
37 -fi
38 -
39 -LICENSE="GPL-2"
40 -SLOT="0"
41 -IUSE="build kernel_FreeBSD kernel_linux +split-usr"
42 -
43 -pkg_setup() {
44 - multilib_layout
45 -}
46 -
47 -# Create our multilib dirs - the Makefile has no knowledge of this
48 -multilib_layout() {
49 - local def_libdir libdir libdirs
50 - def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
51 - libdirs=$(get_all_libdirs)
52 - : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
53 -
54 - [ -z "${def_libdir}" ] &&
55 - die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid"
56 -
57 - # figure out which paths should be symlinks and which should be directories
58 - local dirs syms exp d
59 - for libdir in ${libdirs} ; do
60 - if use split-usr ; then
61 - exp=( {,usr/,usr/local/}${libdir} )
62 - else
63 - exp=( {usr/,usr/local/}${libdir} )
64 - fi
65 - for d in "${exp[@]}" ; do
66 - # most things should be dirs
67 - if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then
68 - [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}"
69 - else
70 - [ -h "${d}" ] && syms+=" ${d}"
71 - fi
72 - done
73 - done
74 - if [ -n "${syms}${dirs}" ] ; then
75 - ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to"
76 - ewarn "have these paths configured as follows:"
77 - [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}"
78 - [ -n "${syms}" ] && ewarn "directories:${syms}"
79 - ewarn "The ebuild will attempt to fix these, but only for trivial conversions."
80 - ewarn "If things fail, you will need to manually create/move the directories."
81 - echo
82 - fi
83 -
84 - # setup symlinks and dirs where we expect them to be; do not migrate
85 - # data ... just fall over in that case.
86 - local prefix prefix_lst
87 - if use split-usr ; then
88 - prefix_lst=( "${EROOT}"{,usr/,usr/local/} )
89 - else
90 - prefix_lst=( "${EROOT}"{usr/,usr/local/} )
91 - fi
92 - for prefix in "${prefix_lst[@]}"; do
93 - if [ "${SYMLINK_LIB}" = yes ] ; then
94 - # we need to make sure "lib" points to the native libdir
95 - if [ -h "${prefix}lib" ] ; then
96 - # it's already a symlink! assume it's pointing to right place ...
97 - continue
98 - elif [ -d "${prefix}lib" ] ; then
99 - # "lib" is a dir, so need to convert to a symlink
100 - ewarn "Converting ${prefix}lib from a dir to a symlink"
101 - rm -f "${prefix}lib"/.keep
102 - if rmdir "${prefix}lib" 2>/dev/null ; then
103 - ln -s ${def_libdir} "${prefix}lib" || die
104 - else
105 - die "non-empty dir found where we needed a symlink: ${prefix}lib"
106 - fi
107 - else
108 - # nothing exists, so just set it up sanely
109 - ewarn "Initializing ${prefix}lib as a symlink"
110 - mkdir -p "${prefix}" || die
111 - rm -f "${prefix}lib" || die
112 - ln -s ${def_libdir} "${prefix}lib" || die
113 - mkdir -p "${prefix}${def_libdir}" #423571
114 - fi
115 - else
116 - # we need to make sure "lib" is a dir
117 - if [ -h "${prefix}lib" ] ; then
118 - # "lib" is a symlink, so need to convert to a dir
119 - ewarn "Converting ${prefix}lib from a symlink to a dir"
120 - rm -f "${prefix}lib" || die
121 - if [ -d "${prefix}lib32" ] ; then
122 - ewarn "Migrating ${prefix}lib32 to ${prefix}lib"
123 - mv "${prefix}lib32" "${prefix}lib" || die
124 - else
125 - mkdir -p "${prefix}lib" || die
126 - fi
127 - elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; then
128 - # make sure the old "lib" ABI location does not exist; we
129 - # only symlinked the lib dir on systems where we moved it
130 - # to "lib32" ...
131 - case ${CHOST} in
132 - *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
133 - i?86*|x86_64*|powerpc*|sparc*|s390*)
134 - if [[ -d ${prefix}lib32 && ! -h ${prefix}lib32 ]] ; then
135 - rm -f "${prefix}lib32"/.keep
136 - if ! rmdir "${prefix}lib32" 2>/dev/null ; then
137 - ewarn "You need to merge ${prefix}lib32 into ${prefix}lib"
138 - die "non-empty dir found where there should be none: ${prefix}lib32"
139 - fi
140 - fi
141 - ;;
142 - esac
143 - else
144 - # nothing exists, so just set it up sanely
145 - ewarn "Initializing ${prefix}lib as a dir"
146 - mkdir -p "${prefix}lib" || die
147 - fi
148 - fi
149 - done
150 - if ! use split-usr ; then
151 - for libdir in ${libdirs}; do
152 - if [[ ! -e "${EROOT}${libdir}" ]]; then
153 - ln -s usr/"${libdir}" "${EROOT}${libdir}"
154 - fi
155 - done
156 - fi
157 -}
158 -
159 -pkg_preinst() {
160 - # This is written in src_install (so it's in CONTENTS), but punt all
161 - # pending updates to avoid user having to do etc-update (and make the
162 - # pkg_postinst logic simpler).
163 - rm -f "${EROOT}"/etc/._cfg????_gentoo-release
164 -
165 - # We need to install directories and maybe some dev nodes when building
166 - # stages, but they cannot be in CONTENTS.
167 - # Also, we cannot reference $S as binpkg will break so we do this.
168 - multilib_layout
169 - if use build ; then
170 - if use split-usr ; then
171 - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout
172 - else
173 - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout-usrmerge
174 - fi
175 - fi
176 - rm -f "${ED}"/usr/share/${PN}/Makefile
177 -}
178 -
179 -src_prepare() {
180 - default
181 - if use prefix; then
182 - hprefixify -e "/EUID/s,0,${EUID}," -q '"' etc/profile
183 - hprefixify etc/{env.d/50baselayout,shells} share.Linux/passwd
184 - echo PATH=/usr/bin:/bin >> etc/env.d/99host
185 - echo ROOTPATH=/usr/sbin:/sbin:/usr/bin:/bin >> etc/env.d/99host
186 - fi
187 -
188 - # handle multilib paths. do it here because we want this behavior
189 - # regardless of the C library that you're using. we do explicitly
190 - # list paths which the native ldconfig searches, but this isn't
191 - # problematic as it doesn't change the resulting ld.so.cache or
192 - # take longer to generate. similarly, listing both the native
193 - # path and the symlinked path doesn't change the resulting cache.
194 - local libdir ldpaths
195 - for libdir in $(get_all_libdirs) ; do
196 - ldpaths+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
197 - ldpaths+=":${EPREFIX}/usr/local/${libdir}"
198 - done
199 - echo "LDPATH='${ldpaths#:}'" >> etc/env.d/50baselayout
200 -
201 - # rc-scripts version for testing of features that *should* be present
202 - echo "Gentoo Base System release ${PV}" > etc/gentoo-release
203 -}
204 -
205 -src_install() {
206 - emake \
207 - OS=$(usex kernel_FreeBSD BSD Linux) \
208 - DESTDIR="${ED}" \
209 - install
210 - dodoc ChangeLog
211 -
212 - # need the makefile in pkg_preinst
213 - insinto /usr/share/${PN}
214 - doins Makefile
215 -}
216 -
217 -pkg_postinst() {
218 - local x
219 -
220 - # We installed some files to /usr/share/baselayout instead of /etc to stop
221 - # (1) overwriting the user's settings
222 - # (2) screwing things up when attempting to merge files
223 - # (3) accidentally packaging up personal files with quickpkg
224 - # If they don't exist then we install them
225 - for x in master.passwd passwd shadow group fstab ; do
226 - [ -e "${EROOT}etc/${x}" ] && continue
227 - [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
228 - cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
229 - done
230 -
231 - # Force shadow permissions to not be world-readable #260993
232 - for x in shadow ; do
233 - [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
234 - done
235 -
236 - # Take care of the etc-update for the user
237 - if [ -e "${EROOT}"etc/._cfg0000_gentoo-release ] ; then
238 - mv "${EROOT}"etc/._cfg0000_gentoo-release "${EROOT}"etc/gentoo-release
239 - fi
240 -
241 - # whine about users that lack passwords #193541
242 - if [[ -e "${EROOT}"etc/shadow ]] ; then
243 - local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
244 - if [[ -n ${bad_users} ]] ; then
245 - echo
246 - ewarn "The following users lack passwords!"
247 - ewarn ${bad_users}
248 - fi
249 - fi
250 -
251 - # whine about users with invalid shells #215698
252 - if [[ -e "${EROOT}"etc/passwd ]] ; then
253 - local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' "${EROOT}"etc/passwd | sort)
254 - if [[ -n ${bad_shells} ]] ; then
255 - echo
256 - ewarn "The following users have non-existent shells!"
257 - ewarn "${bad_shells}"
258 - fi
259 - fi
260 -
261 - # https://bugs.gentoo.org/361349
262 - if use kernel_linux; then
263 - mkdir -p "${EROOT}"run
264 -
265 - local found fstype mountpoint
266 - while read -r _ mountpoint fstype _; do
267 - [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
268 - done < "${ROOT}"proc/mounts
269 - [[ -z ${found} ]] &&
270 - ewarn "You should reboot now to get /run mounted with tmpfs!"
271 - fi
272 -
273 - for x in ${REPLACING_VERSIONS}; do
274 - if ! version_is_at_least 2.4 ${x}; then
275 - ewarn "After updating ${EROOT}etc/profile, please run"
276 - ewarn "env-update && . /etc/profile"
277 - fi
278 -
279 - if ! version_is_at_least 2.6 ${x}; then
280 - ewarn "Please run env-update then log out and back in to"
281 - ewarn "update your path."
282 - fi
283 - # clean up after 2.5 typos
284 - # https://bugs.gentoo.org/show_bug.cgi?id=656380
285 - if [[ ${x} == 2.5 ]]; then
286 - rm -fr "${EROOT}{,usr"
287 - fi
288 - done
289 -
290 - if [[ -e "${EROOT}"etc/env.d/00basic ]]; then
291 - ewarn "${EROOT}etc/env.d/00basic is now ${EROOT}etc/env.d/50baselayout"
292 - ewarn "Please migrate your changes."
293 - fi
294 -}