1 |
vapier 11/10/03 03:59:17 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: baselayout-2.1.ebuild |
5 |
Log: |
6 |
Version bump and multilib overhaul. |
7 |
|
8 |
(Portage version: 2.2.0_alpha59/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.512 sys-apps/baselayout/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout/ChangeLog?rev=1.512&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout/ChangeLog?rev=1.512&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout/ChangeLog?r1=1.511&r2=1.512 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-apps/baselayout/ChangeLog,v |
20 |
retrieving revision 1.511 |
21 |
retrieving revision 1.512 |
22 |
diff -u -r1.511 -r1.512 |
23 |
--- ChangeLog 4 Sep 2011 18:08:04 -0000 1.511 |
24 |
+++ ChangeLog 3 Oct 2011 03:59:17 -0000 1.512 |
25 |
@@ -1,10 +1,15 @@ |
26 |
# ChangeLog for sys-apps/baselayout |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/ChangeLog,v 1.511 2011/09/04 18:08:04 williamh Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/ChangeLog,v 1.512 2011/10/03 03:59:17 vapier Exp $ |
30 |
|
31 |
# See the rc-scripts ChangeLog in subversion for release info: |
32 |
# http://sources.gentoo.org/viewcvs.py/*checkout*/baselayout/trunk/ChangeLog |
33 |
|
34 |
+*baselayout-2.1 (03 Oct 2011) |
35 |
+ |
36 |
+ 03 Oct 2011; Mike Frysinger <vapier@g.o> +baselayout-2.1.ebuild: |
37 |
+ Version bump and multilib overhaul. |
38 |
+ |
39 |
04 Sep 2011; William Hubbs <williamh@g.o> |
40 |
-baselayout-1.12.14-r1.ebuild, -files/baselayout-1.12.14-iproute.patch: |
41 |
Remove baselayout-1 from the tree |
42 |
|
43 |
|
44 |
|
45 |
1.1 sys-apps/baselayout/baselayout-2.1.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout/baselayout-2.1.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/baselayout/baselayout-2.1.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: baselayout-2.1.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2011 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/baselayout-2.1.ebuild,v 1.1 2011/10/03 03:59:17 vapier Exp $ |
55 |
|
56 |
inherit eutils multilib |
57 |
|
58 |
DESCRIPTION="Filesystem baselayout and init scripts" |
59 |
HOMEPAGE="http://www.gentoo.org/" |
60 |
SRC_URI="mirror://gentoo/${P}.tar.bz2 |
61 |
http://dev.gentoo.org/~vapier/dist/${P}.tar.bz2" |
62 |
|
63 |
LICENSE="GPL-2" |
64 |
SLOT="0" |
65 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" |
66 |
IUSE="build" |
67 |
|
68 |
PDEPEND="sys-apps/openrc" |
69 |
|
70 |
pkg_setup() { |
71 |
multilib_layout |
72 |
} |
73 |
|
74 |
# Create our multilib dirs - the Makefile has no knowledge of this |
75 |
multilib_layout() { |
76 |
local libdir libdirs=$(get_all_libdirs) def_libdir=$(get_abi_LIBDIR $DEFAULT_ABI) |
77 |
: ${libdirs:=lib} # it isn't that we don't trust multilib.eclass... |
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}" ] ; then |
93 |
ewarn "Based on your profile, these paths should be directories:" |
94 |
ewarn "${syms}" |
95 |
ewarn "Failure to fix this may result in a broken system." |
96 |
echo |
97 |
fi |
98 |
if [ -n "${dirs}" ] ; then |
99 |
ewarn "Based on your profile, these paths should be symlinks:" |
100 |
ewarn "${dirs}" |
101 |
ewarn "Failure to fix this may result in a broken system." |
102 |
echo |
103 |
fi |
104 |
|
105 |
# setup symlinks and dirs where we expect them to be; do not migrate |
106 |
# data ... just fall over in that case. |
107 |
local prefix |
108 |
for prefix in "${ROOT}"{,usr/,usr/local/} ; do |
109 |
if [ "${SYMLINK_LIB}" = yes ] ; then |
110 |
# we need to make sure "lib" points to the native libdir |
111 |
if [ -h "${prefix}lib" ] ; then |
112 |
# it's already a symlink! assume it's pointing to right place ... |
113 |
continue |
114 |
elif [ -d "${prefix}lib" ] ; then |
115 |
# "lib" is a dir, so need to convert to a symlink |
116 |
ewarn "Converting ${prefix}lib from a dir to a symlink" |
117 |
rm -f "${prefix}lib"/.keep |
118 |
if rmdir "${prefix}lib" 2>/dev/null ; then |
119 |
ln -s ${def_libdir} "${prefix}lib" || die |
120 |
else |
121 |
die "non-empty dir found where we needed a symlink: ${prefix}lib" |
122 |
fi |
123 |
else |
124 |
# nothing exists, so just set it up sanely |
125 |
ewarn "Initializing ${prefix}lib as a symlink" |
126 |
mkdir -p "${prefix}" || die |
127 |
rm -f "${prefix}lib" || die |
128 |
ln -s ${def_libdir} "${prefix}lib" || die |
129 |
fi |
130 |
else |
131 |
# we need to make sure "lib" is a dir |
132 |
if [ -h "${prefix}lib" ] ; then |
133 |
# "lib" is a symlink, so need to convert to a dir |
134 |
ewarn "Converting ${prefix}lib from a symlink to a dir" |
135 |
rm -f "${prefix}lib" || die |
136 |
if [ -d "${prefix}lib32" ] ; then |
137 |
ewarn "Migrating ${prefix}lib32 to ${prefix}lib" |
138 |
mv "${prefix}lib32" "${prefix}lib" || die |
139 |
else |
140 |
mkdir -p "${prefix}lib" || die |
141 |
fi |
142 |
elif [ -d "${prefix}lib" ] ; then |
143 |
# make sure the old "lib" ABI location does not exist; we |
144 |
# only symlinked the lib dir on systems where we moved it |
145 |
# to "lib32" ... |
146 |
if [ -d "${prefix}lib32" ] ; then |
147 |
rm -f "${prefix}lib32"/.keep |
148 |
if ! rmdir "${prefix}lib32" 2>/dev/null ; then |
149 |
ewarn "You need to merge ${prefix}lib32 into ${prefix}lib" |
150 |
die "non-empty dir found where there should be none: ${prefix}lib32" |
151 |
fi |
152 |
fi |
153 |
else |
154 |
# nothing exists, so just set it up sanely |
155 |
ewarn "Initializing ${prefix}lib as a dir" |
156 |
mkdir -p "${prefix}" || die |
157 |
rm -f "${prefix}lib" || die |
158 |
ln -s ${def_libdir} "${prefix}lib" || die |
159 |
fi |
160 |
fi |
161 |
done |
162 |
} |
163 |
|
164 |
pkg_preinst() { |
165 |
# Bug #217848 - Since the remap_dns_vars() called by pkg_preinst() of |
166 |
# the baselayout-1.x ebuild copies all the real configs from the user's |
167 |
# /etc/conf.d into ${D}, it makes them all appear to be the default |
168 |
# versions. In order to protect them from being unmerged after this |
169 |
# upgrade, modify their timestamps. |
170 |
touch "${ROOT}"/etc/conf.d/* 2>/dev/null |
171 |
|
172 |
# This is written in src_install (so it's in CONTENTS), but punt all |
173 |
# pending updates to avoid user having to do etc-update (and make the |
174 |
# pkg_postinst logic simpler). |
175 |
rm -f "${ROOT}"/etc/._cfg????_gentoo-release |
176 |
|
177 |
# We need to install directories and maybe some dev nodes when building |
178 |
# stages, but they cannot be in CONTENTS. |
179 |
# Also, we cannot reference $S as binpkg will break so we do this. |
180 |
multilib_layout |
181 |
if use build ; then |
182 |
emake -C "${D}/usr/share/${PN}" DESTDIR="${ROOT}" layout || die |
183 |
fi |
184 |
rm -f "${D}"/usr/share/${PN}/Makefile |
185 |
} |
186 |
|
187 |
src_install() { |
188 |
emake \ |
189 |
OS=$(usex kernel_FreeBSD BSD Linux) \ |
190 |
DESTDIR="${D}" \ |
191 |
install || die |
192 |
dodoc ChangeLog.svn |
193 |
|
194 |
# need the makefile in pkg_preinst |
195 |
insinto /usr/share/${PN} |
196 |
doins Makefile || die |
197 |
|
198 |
# handle multilib paths. do it here because we want this behavior |
199 |
# regardless of the C library that you're using. we do explicitly |
200 |
# list paths which the native ldconfig searches, but this isn't |
201 |
# problematic as it doesn't change the resulting ld.so.cache or |
202 |
# take longer to generate. similarly, listing both the native |
203 |
# path and the symlinked path doesn't change the resulting cache. |
204 |
local libdir ldpaths |
205 |
for libdir in $(get_all_libdirs) ; do |
206 |
ldpaths+=":/${libdir}:/usr/${libdir}:/usr/local/${libdir}" |
207 |
done |
208 |
echo "LDPATH='${ldpaths#:}'" >> "${D}"/etc/env.d/00basic |
209 |
|
210 |
# rc-scripts version for testing of features that *should* be present |
211 |
echo "Gentoo Base System release ${PV}" > "${D}"/etc/gentoo-release |
212 |
} |
213 |
|
214 |
pkg_postinst() { |
215 |
local x |
216 |
|
217 |
# We installed some files to /usr/share/baselayout instead of /etc to stop |
218 |
# (1) overwriting the user's settings |
219 |
# (2) screwing things up when attempting to merge files |
220 |
# (3) accidentally packaging up personal files with quickpkg |
221 |
# If they don't exist then we install them |
222 |
for x in master.passwd passwd shadow group fstab ; do |
223 |
[ -e "${ROOT}etc/${x}" ] && continue |
224 |
[ -e "${ROOT}usr/share/baselayout/${x}" ] || continue |
225 |
cp -p "${ROOT}usr/share/baselayout/${x}" "${ROOT}"etc |
226 |
done |
227 |
|
228 |
# Force shadow permissions to not be world-readable #260993 |
229 |
for x in shadow ; do |
230 |
[ -e "${ROOT}etc/${x}" ] && chmod o-rwx "${ROOT}etc/${x}" |
231 |
done |
232 |
|
233 |
# Take care of the etc-update for the user |
234 |
if [ -e "${ROOT}"/etc/._cfg0000_gentoo-release ] ; then |
235 |
mv "${ROOT}"/etc/._cfg0000_gentoo-release "${ROOT}"/etc/gentoo-release |
236 |
fi |
237 |
|
238 |
# whine about users that lack passwords #193541 |
239 |
if [[ -e ${ROOT}/etc/shadow ]] ; then |
240 |
local bad_users=$(sed -n '/^[^:]*::/s|^\([^:]*\)::.*|\1|p' "${ROOT}"/etc/shadow) |
241 |
if [[ -n ${bad_users} ]] ; then |
242 |
echo |
243 |
ewarn "The following users lack passwords!" |
244 |
ewarn ${bad_users} |
245 |
fi |
246 |
fi |
247 |
|
248 |
# whine about users with invalid shells #215698 |
249 |
if [[ -e ${ROOT}/etc/passwd ]] ; then |
250 |
local bad_shells=$(awk -F: 'system("test -e " $7) { print $1 " - " $7}' /etc/passwd | sort) |
251 |
if [[ -n ${bad_shells} ]] ; then |
252 |
echo |
253 |
ewarn "The following users have non-existent shells!" |
254 |
ewarn "${bad_shells}" |
255 |
fi |
256 |
fi |
257 |
} |