Gentoo Archives: gentoo-commits

From: Yuta SATOH <nigoro.gentoo@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoo-bsd:master commit in: sys-apps/baselayout/files/, sys-apps/baselayout/
Date: Thu, 23 Aug 2012 11:05:24
Message-Id: 1345648627.044f1b055d29177aabd669acb43208057686816a.yuta_satoh@gentoo
1 commit: 044f1b055d29177aabd669acb43208057686816a
2 Author: Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
3 AuthorDate: Wed Aug 22 15:17:07 2012 +0000
4 Commit: Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
5 CommitDate: Wed Aug 22 15:17:07 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=044f1b05
7
8 remove baselayout fixed in official tree, close bug #419465
9
10 ---
11 sys-apps/baselayout/Manifest | 3 -
12 sys-apps/baselayout/baselayout-2.1-r1.ebuild | 241 --------------------
13 .../baselayout/files/baselayout-2.1-fbsd.patch | 15 --
14 3 files changed, 0 insertions(+), 259 deletions(-)
15
16 diff --git a/sys-apps/baselayout/Manifest b/sys-apps/baselayout/Manifest
17 deleted file mode 100644
18 index 4dd1e57..0000000
19 --- a/sys-apps/baselayout/Manifest
20 +++ /dev/null
21 @@ -1,3 +0,0 @@
22 -AUX baselayout-2.1-fbsd.patch 492 RMD160 23040872d3f6fe77f6e2e8558cccaea3e154b067 SHA1 0225e5a12e634af82213c230cb94e84b906add7e SHA256 adc5843d3ef57949b0d03d6eecad587fc1019ad62b5a12149458bb986792579d
23 -DIST baselayout-2.1.tar.bz2 40398 RMD160 bba874c5d3290848236703125c130107c1244f55 SHA1 84783a773ec050700b3b0ce4c7645ae878f7f7fb SHA256 2ac6f2156513a2820a0eeeecc2cf7e7c0b5e0c750b324f1e21912d5f3cda4956
24 -EBUILD baselayout-2.1-r1.ebuild 8096 RMD160 16581b0602dce8fac5f47c9cbf8fa37d61b7ac17 SHA1 918ee6a72be0c1dd31a370a0a3f818aba7387a5d SHA256 61cb5dbbc1fdaad3c191cc1aedd88543dee82ea3e8512a4e6d552eab08dbf236
25
26 diff --git a/sys-apps/baselayout/baselayout-2.1-r1.ebuild b/sys-apps/baselayout/baselayout-2.1-r1.ebuild
27 deleted file mode 100644
28 index f4f9474..0000000
29 --- a/sys-apps/baselayout/baselayout-2.1-r1.ebuild
30 +++ /dev/null
31 @@ -1,241 +0,0 @@
32 -# Copyright 1999-2012 Gentoo Foundation
33 -# Distributed under the terms of the GNU General Public License v2
34 -# $Header: $
35 -
36 -inherit eutils multilib
37 -
38 -DESCRIPTION="Filesystem baselayout and init scripts"
39 -HOMEPAGE="http://www.gentoo.org/"
40 -SRC_URI="mirror://gentoo/${P}.tar.bz2
41 - http://dev.gentoo.org/~vapier/dist/${P}.tar.bz2"
42 -
43 -LICENSE="GPL-2"
44 -SLOT="0"
45 -KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
46 -IUSE="build kernel_linux"
47 -
48 -PDEPEND="sys-apps/openrc"
49 -
50 -src_unpack() {
51 - unpack ${A}
52 - cd "${S}"
53 -
54 - epatch "${FILESDIR}"/${PN}-2.1-fbsd.patch
55 -}
56 -
57 -pkg_setup() {
58 - multilib_layout
59 -}
60 -
61 -# Create our multilib dirs - the Makefile has no knowledge of this
62 -multilib_warn() {
63 - local syms=$1 dirs=$2 def_libdir=$3
64 -
65 - [ -z "${syms}${dirs}" ] && return
66 -
67 - ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB}, so that means"
68 - if [ -z "${syms}" ] ; then
69 - ewarn "you need to have these paths as symlinks to ${def_libdir}:"
70 - ewarn "$1"
71 - fi
72 -}
73 -multilib_layout() {
74 - local libdir libdirs=$(get_all_libdirs) def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI)
75 - : ${libdirs:=lib} # it isn't that we don't trust multilib.eclass...
76 -
77 - [ -z "${def_libdir}" ] && die "your DEFAULT_ABI=$DEFAULT_ABI appears to be invalid"
78 -
79 - # figure out which paths should be symlinks and which should be directories
80 - local dirs syms exp d
81 - for libdir in ${libdirs} ; do
82 - exp=( {,usr/,usr/local/}${libdir} )
83 - for d in "${exp[@]/#/${ROOT}}" ; do
84 - # most things should be dirs
85 - if [ "${SYMLINK_LIB}" = "yes" ] && [ "${libdir}" = "lib" ] ; then
86 - [ ! -h "${d}" ] && [ -e "${d}" ] && dirs+=" ${d}"
87 - else
88 - [ -h "${d}" ] && syms+=" ${d}"
89 - fi
90 - done
91 - done
92 - if [ -n "${syms}${dirs}" ] ; then
93 - ewarn "Your system profile has SYMLINK_LIB=${SYMLINK_LIB:-no}, so that means you need to"
94 - ewarn "have these paths configured as follows:"
95 - [ -n "${dirs}" ] && ewarn "symlinks to '${def_libdir}':${dirs}"
96 - [ -n "${syms}" ] && ewarn "directories:${syms}"
97 - ewarn "The ebuild will attempt to fix these, but only for trivial conversions."
98 - ewarn "If things fail, you will need to manually create/move the directories."
99 - echo
100 - fi
101 -
102 - # setup symlinks and dirs where we expect them to be; do not migrate
103 - # data ... just fall over in that case.
104 - local prefix
105 - for prefix in "${ROOT}"{,usr/,usr/local/} ; do
106 - if [ "${SYMLINK_LIB}" = yes ] ; then
107 - # we need to make sure "lib" points to the native libdir
108 - if [ -h "${prefix}lib" ] ; then
109 - # it's already a symlink! assume it's pointing to right place ...
110 - continue
111 - elif [ -d "${prefix}lib" ] ; then
112 - # "lib" is a dir, so need to convert to a symlink
113 - ewarn "Converting ${prefix}lib from a dir to a symlink"
114 - rm -f "${prefix}lib"/.keep
115 - if rmdir "${prefix}lib" 2>/dev/null ; then
116 - ln -s ${def_libdir} "${prefix}lib" || die
117 - else
118 - die "non-empty dir found where we needed a symlink: ${prefix}lib"
119 - fi
120 - else
121 - # nothing exists, so just set it up sanely
122 - ewarn "Initializing ${prefix}lib as a symlink"
123 - mkdir -p "${prefix}" || die
124 - rm -f "${prefix}lib" || die
125 - ln -s ${def_libdir} "${prefix}lib" || die
126 - fi
127 - else
128 - # we need to make sure "lib" is a dir
129 - if [ -h "${prefix}lib" ] ; then
130 - # "lib" is a symlink, so need to convert to a dir
131 - ewarn "Converting ${prefix}lib from a symlink to a dir"
132 - rm -f "${prefix}lib" || die
133 - if [ -d "${prefix}lib32" ] ; then
134 - ewarn "Migrating ${prefix}lib32 to ${prefix}lib"
135 - mv "${prefix}lib32" "${prefix}lib" || die
136 - else
137 - mkdir -p "${prefix}lib" || die
138 - fi
139 - elif [ -d "${prefix}lib" ] ; then
140 - # make sure the old "lib" ABI location does not exist; we
141 - # only symlinked the lib dir on systems where we moved it
142 - # to "lib32" ...
143 - case ${CHOST} in
144 - i?86*|x86_64*|powerpc*|sparc*|s390*)
145 - if [ -d "${prefix}lib32" ] ; then
146 - rm -f "${prefix}lib32"/.keep
147 - if ! rmdir "${prefix}lib32" 2>/dev/null ; then
148 - ewarn "You need to merge ${prefix}lib32 into ${prefix}lib"
149 - die "non-empty dir found where there should be none: ${prefix}lib32"
150 - fi
151 - fi
152 - ;;
153 - esac
154 - else
155 - # nothing exists, so just set it up sanely
156 - ewarn "Initializing ${prefix}lib as a dir"
157 - mkdir -p "${prefix}" || die
158 - rm -f "${prefix}lib" || die
159 - ln -s ${def_libdir} "${prefix}lib" || die
160 - fi
161 - fi
162 - done
163 -}
164 -
165 -pkg_preinst() {
166 - # Bug #217848 - Since the remap_dns_vars() called by pkg_preinst() of
167 - # the baselayout-1.x ebuild copies all the real configs from the user's
168 - # /etc/conf.d into ${D}, it makes them all appear to be the default
169 - # versions. In order to protect them from being unmerged after this
170 - # upgrade, modify their timestamps.
171 - touch "${ROOT}"/etc/conf.d/* 2>/dev/null
172 -
173 - # This is written in src_install (so it's in CONTENTS), but punt all
174 - # pending updates to avoid user having to do etc-update (and make the
175 - # pkg_postinst logic simpler).
176 - rm -f "${ROOT}"/etc/._cfg????_gentoo-release
177 -
178 - # We need to install directories and maybe some dev nodes when building
179 - # stages, but they cannot be in CONTENTS.
180 - # Also, we cannot reference $S as binpkg will break so we do this.
181 - multilib_layout
182 - if use build ; then
183 - emake -C "${D}/usr/share/${PN}" DESTDIR="${ROOT}" layout || die
184 - fi
185 - rm -f "${D}"/usr/share/${PN}/Makefile
186 -}
187 -
188 -src_install() {
189 - emake \
190 - OS=$(usex kernel_FreeBSD BSD Linux) \
191 - DESTDIR="${D}" \
192 - install || die
193 - dodoc ChangeLog.svn
194 -
195 - # need the makefile in pkg_preinst
196 - insinto /usr/share/${PN}
197 - doins Makefile || die
198 -
199 - # handle multilib paths. do it here because we want this behavior
200 - # regardless of the C library that you're using. we do explicitly
201 - # list paths which the native ldconfig searches, but this isn't
202 - # problematic as it doesn't change the resulting ld.so.cache or
203 - # take longer to generate. similarly, listing both the native
204 - # path and the symlinked path doesn't change the resulting cache.
205 - local libdir ldpaths
206 - for libdir in $(get_all_libdirs) ; do
207 - ldpaths+=":/${libdir}:/usr/${libdir}:/usr/local/${libdir}"
208 - done
209 - echo "LDPATH='${ldpaths#:}'" >> "${D}"/etc/env.d/00basic
210 -
211 - # rc-scripts version for testing of features that *should* be present
212 - echo "Gentoo Base System release ${PV}" > "${D}"/etc/gentoo-release
213 -}
214 -
215 -pkg_postinst() {
216 - local x
217 -
218 - # We installed some files to /usr/share/baselayout instead of /etc to stop
219 - # (1) overwriting the user's settings
220 - # (2) screwing things up when attempting to merge files
221 - # (3) accidentally packaging up personal files with quickpkg
222 - # If they don't exist then we install them
223 - for x in master.passwd passwd shadow group fstab ; do
224 - [ -e "${ROOT}etc/${x}" ] && continue
225 - [ -e "${ROOT}usr/share/baselayout/${x}" ] || continue
226 - cp -p "${ROOT}usr/share/baselayout/${x}" "${ROOT}"etc
227 - done
228 -
229 - # Force shadow permissions to not be world-readable #260993
230 - for x in shadow ; do
231 - [ -e "${ROOT}etc/${x}" ] && chmod o-rwx "${ROOT}etc/${x}"
232 - done
233 -
234 - # Take care of the etc-update for the user
235 - if [ -e "${ROOT}"/etc/._cfg0000_gentoo-release ] ; then
236 - mv "${ROOT}"/etc/._cfg0000_gentoo-release "${ROOT}"/etc/gentoo-release
237 - fi
238 -
239 - # whine about users that lack passwords #193541
240 - if [[ -e ${ROOT}/etc/shadow ]] ; then
241 - local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${ROOT}"/etc/shadow)
242 - if [[ -n ${bad_users} ]] ; then
243 - echo
244 - ewarn "The following users lack passwords!"
245 - ewarn ${bad_users}
246 - fi
247 - fi
248 -
249 - # baselayout leaves behind a lot of .keep files, so let's clean them up
250 - find "${ROOT}"/lib*/rcscripts/ -name .keep -exec rm -f {} + 2>/dev/null
251 - find "${ROOT}"/lib*/rcscripts/ -depth -type d -exec rmdir {} + 2>/dev/null
252 -
253 - # whine about users with invalid shells #215698
254 - if [[ -e ${ROOT}/etc/passwd ]] ; then
255 - local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' /etc/passwd | sort)
256 - if [[ -n ${bad_shells} ]] ; then
257 - echo
258 - ewarn "The following users have non-existent shells!"
259 - ewarn "${bad_shells}"
260 - fi
261 - fi
262 -
263 - # http://bugs.gentoo.org/361349
264 - if use kernel_linux; then
265 - mkdir -p "${ROOT}"/run
266 -
267 - if ! grep -qs "^tmpfs.*/run " "${ROOT}"/proc/mounts ; then
268 - echo
269 - ewarn "You should reboot the system now to get /run mounted with tmpfs!"
270 - fi
271 - fi
272 -}
273
274 diff --git a/sys-apps/baselayout/files/baselayout-2.1-fbsd.patch b/sys-apps/baselayout/files/baselayout-2.1-fbsd.patch
275 deleted file mode 100644
276 index 34f1f33..0000000
277 --- a/sys-apps/baselayout/files/baselayout-2.1-fbsd.patch
278 +++ /dev/null
279 @@ -1,15 +0,0 @@
280 -diff -Nur baselayout-2.1.orig/Makefile baselayout-2.1/Makefile
281 ---- baselayout-2.1.orig/Makefile 2011-10-01 04:49:52.000000000 +0900
282 -+++ baselayout-2.1/Makefile 2012-06-03 03:04:53.000000000 +0900
283 -@@ -70,8 +70,10 @@
284 - touch $(DESTDIR)/var/tmp/.keep
285 - install -m 1777 -d $(DESTDIR)/tmp
286 - touch $(DESTDIR)/tmp/.keep
287 -+ifeq ($(OS),Linux)
288 - ln -snf /run $(DESTDIR)/var/run
289 - ln -snf /run/lock $(DESTDIR)/var/lock
290 -+endif
291 - # FHS compatibility symlinks stuff
292 - ln -snf /var/tmp $(DESTDIR)/usr/tmp
293 -
294 -