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: Tue, 06 Feb 2018 18:57:03
Message-Id: 1517943389.6194e626c0bf9d5d198aab9aa7bb536b76faa486.williamh@gentoo
1 commit: 6194e626c0bf9d5d198aab9aa7bb536b76faa486
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 6 18:54:41 2018 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 6 18:56:29 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6194e626
7
8 sys-apps/baselayout: remove version 2.3
9
10 Package-Manager: Portage-2.3.19, Repoman-2.3.6
11
12 sys-apps/baselayout/Manifest | 1 -
13 sys-apps/baselayout/baselayout-2.3.ebuild | 241 ------------------------------
14 2 files changed, 242 deletions(-)
15
16 diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
17 index 532aa128c21..33d8ce22d8f 100644
18 --- a/sys-apps/baselayout/Manifest
19 +++ b/sys-apps/baselayout/Manifest
20 @@ -1,2 +1 @@
21 -DIST baselayout-2.3.tar.bz2 32266 BLAKE2B 6535bb451e393accd7c041079188c8c76b318f449adf2e5d1579496a27951de12b8404fb4ded3c143b60fe59ad04017a1a53e4a4ce864559f192fc96f1269a05 SHA512 cf9636c7d5c1fb4abf63dd931dc8ceaa30cf871f5e576a53dcc207abd54b8eec7778a1ef29766e2e8f5c0a098b9b3d07361717ae190027d1e102aceb4a07cacb
22 DIST baselayout-2.4.1.tar.bz2 31307 BLAKE2B da26f7fbeefa5efecb6e5d9ded6c2bf3148cd1fcfc6ebb86535f5a9c086c4bb55f6a8420a3c0d0f7008251637f3e4653db875ec427745d039f753008d2f21be2 SHA512 e505ad81834aafb574ffee9bc1fce216c1c8c7fa11b0095580f87a37e4b9efb057ee78db7cd5affc64f05d5dd0592c671304414c119b37d86dfaa1e7b84ce7c1
23
24 diff --git a/sys-apps/baselayout/baselayout-2.3.ebuild b/sys-apps/baselayout/baselayout-2.3.ebuild
25 deleted file mode 100644
26 index 153e53b5ebe..00000000000
27 --- a/sys-apps/baselayout/baselayout-2.3.ebuild
28 +++ /dev/null
29 @@ -1,241 +0,0 @@
30 -# Copyright 1999-2018 Gentoo Foundation
31 -# Distributed under the terms of the GNU General Public License v2
32 -
33 -EAPI=5
34 -
35 -inherit eutils multilib
36 -
37 -DESCRIPTION="Filesystem baselayout and init scripts"
38 -HOMEPAGE="https://www.gentoo.org/"
39 -SRC_URI="https://dev.gentoo.org/~williamh/dist/${P}.tar.bz2"
40 -
41 -LICENSE="GPL-2"
42 -SLOT="0"
43 -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
44 -IUSE="build kernel_linux"
45 -
46 -pkg_setup() {
47 - multilib_layout
48 -}
49 -
50 -# Create our multilib dirs - the Makefile has no knowledge of this
51 -multilib_layout() {
52 - local libdir libdirs=$(get_all_libdirs) def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
53 - : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
54 -
55 - [ -z "${def_libdir}" ] && 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 - exp=( {,usr/,usr/local/}${libdir} )
61 - for d in "${exp[@]}" ; do
62 - # most things should be dirs
63 - if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then
64 - [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}"
65 - else
66 - [ -h "${d}" ] && syms+=" ${d}"
67 - fi
68 - done
69 - done
70 - if [ -n "${syms}${dirs}" ] ; then
71 - ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to"
72 - ewarn "have these paths configured as follows:"
73 - [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}"
74 - [ -n "${syms}" ] && ewarn "directories:${syms}"
75 - ewarn "The ebuild will attempt to fix these, but only for trivial conversions."
76 - ewarn "If things fail, you will need to manually create/move the directories."
77 - echo
78 - fi
79 -
80 - # setup symlinks and dirs where we expect them to be; do not migrate
81 - # data ... just fall over in that case.
82 - local prefix
83 - for prefix in "${EROOT}"{,usr/,usr/local/} ; do
84 - if [ "${SYMLINK_LIB}" = yes ] ; then
85 - # we need to make sure "lib" points to the native libdir
86 - if [ -h "${prefix}lib" ] ; then
87 - # it's already a symlink! assume it's pointing to right place ...
88 - continue
89 - elif [ -d "${prefix}lib" ] ; then
90 - # "lib" is a dir, so need to convert to a symlink
91 - ewarn "Converting ${prefix}lib from a dir to a symlink"
92 - rm -f "${prefix}lib"/.keep
93 - if rmdir "${prefix}lib" 2>/dev/null ; then
94 - ln -s ${def_libdir} "${prefix}lib" || die
95 - else
96 - die "non-empty dir found where we needed a symlink: ${prefix}lib"
97 - fi
98 - else
99 - # nothing exists, so just set it up sanely
100 - ewarn "Initializing ${prefix}lib as a symlink"
101 - mkdir -p "${prefix}" || die
102 - rm -f "${prefix}lib" || die
103 - ln -s ${def_libdir} "${prefix}lib" || die
104 - mkdir -p "${prefix}${def_libdir}" #423571
105 - fi
106 - else
107 - # we need to make sure "lib" is a dir
108 - if [ -h "${prefix}lib" ] ; then
109 - # "lib" is a symlink, so need to convert to a dir
110 - ewarn "Converting ${prefix}lib from a symlink to a dir"
111 - rm -f "${prefix}lib" || die
112 - if [ -d "${prefix}lib32" ] ; then
113 - ewarn "Migrating ${prefix}lib32 to ${prefix}lib"
114 - mv "${prefix}lib32" "${prefix}lib" || die
115 - else
116 - mkdir -p "${prefix}lib" || die
117 - fi
118 - elif [ -d "${prefix}lib" ] && ! has lib32 ${libdirs} ; then
119 - # make sure the old "lib" ABI location does not exist; we
120 - # only symlinked the lib dir on systems where we moved it
121 - # to "lib32" ...
122 - case ${CHOST} in
123 - *-gentoo-freebsd*) ;; # We want it the other way on fbsd.
124 - i?86*|x86_64*|powerpc*|sparc*|s390*)
125 - if [ -d "${prefix}lib32" ] ; then
126 - rm -f "${prefix}lib32"/.keep
127 - if ! rmdir "${prefix}lib32" 2>/dev/null ; then
128 - ewarn "You need to merge ${prefix}lib32 into ${prefix}lib"
129 - die "non-empty dir found where there should be none: ${prefix}lib32"
130 - fi
131 - fi
132 - ;;
133 - esac
134 - else
135 - # nothing exists, so just set it up sanely
136 - ewarn "Initializing ${prefix}lib as a dir"
137 - mkdir -p "${prefix}lib" || die
138 - fi
139 - fi
140 - done
141 -}
142 -
143 -pkg_preinst() {
144 - # Bug #217848 - Since the remap_dns_vars() called by pkg_preinst() of
145 - # the baselayout-1.x ebuild copies all the real configs from the user's
146 - # /etc/conf.d into ${D}, it makes them all appear to be the default
147 - # versions. In order to protect them from being unmerged after this
148 - # upgrade, modify their timestamps.
149 - touch "${EROOT}"/etc/conf.d/* 2>/dev/null
150 -
151 - # This is written in src_install (so it's in CONTENTS), but punt all
152 - # pending updates to avoid user having to do etc-update (and make the
153 - # pkg_postinst logic simpler).
154 - rm -f "${EROOT}"/etc/._cfg????_gentoo-release
155 -
156 - # We need to install directories and maybe some dev nodes when building
157 - # stages, but they cannot be in CONTENTS.
158 - # Also, we cannot reference $S as binpkg will break so we do this.
159 - multilib_layout
160 - if use build ; then
161 - emake -C "${ED}/usr/share/${PN}" DESTDIR="${EROOT}" layout || die
162 - fi
163 - rm -f "${ED}"/usr/share/${PN}/Makefile
164 -}
165 -
166 -src_prepare() {
167 - if use prefix; then
168 - sed -i -r\
169 - -e "/PATH=/!s:/(etc|usr/bin|bin):\"${EPREFIX}\"/\1:g" \
170 - -e "/PATH=/s|([:\"])/|\1${EPREFIX}/|g" \
171 - -e "/PATH=.*\/sbin/s|\"$|:/usr/sbin:/sbin\"|" \
172 - -e "/PATH=.*\/bin/s|\"$|:/usr/bin:/bin\"|" \
173 - etc/profile || die
174 - sed -i -r \
175 - -e "s:/(etc/env.d|opt|usr):${EPREFIX}/\1:g" \
176 - -e "/^PATH=/s|\"$|:${EPREFIX}/usr/sbin:${EPREFIX}/sbin\"|" \
177 - etc/env.d/00basic || die
178 - sed -i "s:/bin:${EPREFIX}/bin:" etc/shells || die
179 - sed -i -r \
180 - -e "s,:/(root|bin|sbin|var|),:${EPREFIX}/\1,g" \
181 - share.Linux/passwd || die
182 - fi
183 -
184 - # handle multilib paths. do it here because we want this behavior
185 - # regardless of the C library that you're using. we do explicitly
186 - # list paths which the native ldconfig searches, but this isn't
187 - # problematic as it doesn't change the resulting ld.so.cache or
188 - # take longer to generate. similarly, listing both the native
189 - # path and the symlinked path doesn't change the resulting cache.
190 - local libdir ldpaths
191 - for libdir in $(get_all_libdirs) ; do
192 - ldpaths+=":${EPREFIX}/${libdir}:${EPREFIX}/usr/${libdir}"
193 - ldpaths+=":${EPREFIX}/usr/local/${libdir}"
194 - done
195 - echo "LDPATH='${ldpaths#:}'" >> etc/env.d/00basic
196 -
197 - # rc-scripts version for testing of features that *should* be present
198 - echo "Gentoo Base System release ${PV}" > etc/gentoo-release
199 -}
200 -
201 -src_install() {
202 - emake \
203 - OS=$(usex kernel_FreeBSD BSD Linux) \
204 - DESTDIR="${ED}" \
205 - install
206 - dodoc ChangeLog
207 -
208 - # need the makefile in pkg_preinst
209 - insinto /usr/share/${PN}
210 - doins Makefile
211 -}
212 -
213 -pkg_postinst() {
214 - local x
215 -
216 - # We installed some files to /usr/share/baselayout instead of /etc to stop
217 - # (1) overwriting the user's settings
218 - # (2) screwing things up when attempting to merge files
219 - # (3) accidentally packaging up personal files with quickpkg
220 - # If they don't exist then we install them
221 - for x in master.passwd passwd shadow group fstab ; do
222 - [ -e "${EROOT}etc/${x}" ] && continue
223 - [ -e "${EROOT}usr/share/baselayout/${x}" ] || continue
224 - cp -p "${EROOT}usr/share/baselayout/${x}" "${EROOT}"etc
225 - done
226 -
227 - # Force shadow permissions to not be world-readable #260993
228 - for x in shadow ; do
229 - [ -e "${EROOT}etc/${x}" ] && chmod o-rwx "${EROOT}etc/${x}"
230 - done
231 -
232 - # Take care of the etc-update for the user
233 - if [ -e "${EROOT}"etc/._cfg0000_gentoo-release ] ; then
234 - mv "${EROOT}"etc/._cfg0000_gentoo-release "${EROOT}"etc/gentoo-release
235 - fi
236 -
237 - # whine about users that lack passwords #193541
238 - if [[ -e "${EROOT}"etc/shadow ]] ; then
239 - local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${EROOT}"/etc/shadow)
240 - if [[ -n ${bad_users} ]] ; then
241 - echo
242 - ewarn "The following users lack passwords!"
243 - ewarn ${bad_users}
244 - fi
245 - fi
246 -
247 - # baselayout leaves behind a lot of .keep files, so let's clean them up
248 - find "${EROOT}"lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
249 - find "${EROOT}"lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
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 - if ! grep -qs "^tmpfs.*/run " "${ROOT}"proc/mounts ; then
266 - echo
267 - ewarn "You should reboot the system now to get /run mounted with tmpfs!"
268 - fi
269 - fi
270 -}