Gentoo Archives: gentoo-commits

From: "Ned Ludd (solar)" <solar@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/uclibc: ChangeLog uclibc-0.9.30_rc1.ebuild
Date: Tue, 23 Sep 2008 21:30:56
Message-Id: E1KiFTB-0002Zg-En@stork.gentoo.org
1 solar 08/09/23 21:30:53
2
3 Modified: ChangeLog
4 Added: uclibc-0.9.30_rc1.ebuild
5 Log:
6 - Initial import of 0.9.30_rc1 branch for gentoo testing/QA before final the release. (many thanks to torindel for helping out with this)
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.37 sys-libs/uclibc/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/ChangeLog?rev=1.37&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/ChangeLog?rev=1.37&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/ChangeLog?r1=1.36&r2=1.37
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v
19 retrieving revision 1.36
20 retrieving revision 1.37
21 diff -u -r1.36 -r1.37
22 --- ChangeLog 23 Aug 2008 03:32:16 -0000 1.36
23 +++ ChangeLog 23 Sep 2008 21:30:52 -0000 1.37
24 @@ -1,6 +1,12 @@
25 # ChangeLog for sys-libs/uclibc
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.36 2008/08/23 03:32:16 cardoe Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.37 2008/09/23 21:30:52 solar Exp $
29 +
30 +*uclibc-0.9.30_rc1 (23 Sep 2008)
31 +
32 + 23 Sep 2008; <solar@g.o> +uclibc-0.9.30_rc1.ebuild:
33 + - Initial import of 0.9.30_rc1 branch for gentoo testing/QA before final the
34 + release. (many thanks to torindel for helping out with this)
35
36 23 Aug 2008; Doug Goldstein <cardoe@g.o> metadata.xml:
37 add GLEP 56 USE flag desc from use.local.desc
38
39
40
41 1.1 sys-libs/uclibc/uclibc-0.9.30_rc1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30_rc1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30_rc1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: uclibc-0.9.30_rc1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30_rc1.ebuild,v 1.1 2008/09/23 21:30:52 solar Exp $
51
52 #ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc"
53 #inherit subversion
54 inherit eutils flag-o-matic toolchain-funcs savedconfig
55
56 export CBUILD=${CBUILD:-${CHOST}}
57 export CTARGET=${CTARGET:-${CHOST}}
58 if [[ ${CTARGET} == ${CHOST} ]] ; then
59 if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
60 export CTARGET=${CATEGORY/cross-}
61 fi
62 fi
63 # Handle the case where we want uclibc on glibc ...
64 if [[ ${CTARGET} == ${CHOST} ]] && [[ ${CHOST} != *-uclibc* ]] ; then
65 export UCLIBC_AND_GLIBC="sitting in a tree"
66 export CTARGET=${CHOST%%-*}-pc-linux-uclibc
67 fi
68
69 MY_P=uClibc-0.9.30-rc1
70 SVN_VER=""
71 PATCH_VER="0.1"
72 DESCRIPTION="C library for developing embedded Linux systems"
73 HOMEPAGE="http://www.uclibc.org/"
74 SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2
75 iconv? ( !userlocales? ( pregen? ( http://www.uclibc.org/downloads/uClibc-locale-030818.tgz
76 ) ) )"
77 [[ -z ${SVN_VER} ]] || \
78 SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2"
79 [[ -z ${PATCH_VER} ]] || \
80 SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2"
81
82 LICENSE="LGPL-2"
83 [[ ${CTARGET} != ${CHOST} ]] \
84 && SLOT="${CTARGET}" \
85 || SLOT="0"
86 KEYWORDS="-* ~arm ~m68k -mips ~ppc ~sh ~sparc ~x86 ~amd64"
87 IUSE="build uclibc-compat debug hardened iconv ipv6 minimal nls pregen userlocales wordexp crosscompile_opts_headers-only"
88 RESTRICT="strip"
89
90 RDEPEND=""
91 if [[ ${CTARGET} == ${CHOST} ]] ; then
92 DEPEND="virtual/os-headers app-misc/pax-utils"
93 PROVIDE="virtual/libc"
94 else
95 DEPEND=""
96 fi
97
98 S=${WORKDIR}/${MY_P}
99
100 alt_build_kprefix() {
101 if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \
102 || [[ -n ${UCLIBC_AND_GLIBC} ]]
103 then
104 echo /usr/include
105 else
106 echo /usr/${CTARGET}/usr/include
107 fi
108 }
109 just_headers() {
110 use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
111 }
112
113 uclibc_endian() {
114 # XXX: this wont work for a toolchain which is bi-endian, but we
115 # dont have any such thing at the moment, so not a big deal
116 touch "${T}"/endian.s
117 $(tc-getAS) "${T}"/endian.s -o "${T}"/endian.o
118 case $(file "${T}"/endian.o) in
119 *" MSB "*) echo "big";;
120 *" LSB "*) echo "little";;
121 *) echo "NFC";;
122 esac
123 rm -f "${T}"/endian.{s,o}
124 }
125
126 pkg_setup() {
127 just_headers && return 0
128 has_version ${CATEGORY}/uclibc || return 0
129 [[ -n ${UCLIBC_AND_GLIBC} ]] && return 0
130 [[ ${ROOT} != "/" ]] && return 0
131 [[ ${CATEGORY} == cross-* ]] && return 0
132
133 if use iconv ; then
134 eerror "iconv - bad idea"
135 fi
136 if use nls ; then
137 eerror "nls - even worse idea"
138 fi
139 if use pregen || use userlocales ; then
140 eerror "pregen, userlocales - meaningless without nls"
141 fi
142 if use iconv || use nls || use pregen || use userlocales ; then
143 eerror "compile without nls/gettext support"
144 fi
145 if ! built_with_use --missing false ${CATEGORY}/uclibc nls && use nls && ! use pregen ; then
146 eerror "You previously built uclibc with USE=-nls."
147 eerror "You cannot generate locale data with this"
148 eerror "system. Please rerun emerge with USE=pregen."
149 die "host cannot support locales"
150 elif built_with_use --missing false ${CATEGORY}/uclibc nls && ! use nls ; then
151 eerror "You previously built uclibc with USE=nls."
152 eerror "Rebuilding uClibc with USE=-nls will prob"
153 eerror "destroy your system."
154 # die "switching from nls is baaaad"
155 fi
156 }
157
158 PIE_STABLE="arm mips ppc x86"
159
160 CPU_ALPHA=""
161 CPU_AMD64=""
162 CPU_ARM="GENERIC_ARM ARM{610,710,7TDMI,720T,920T,922T,926T,10T,1136JF_S,1176JZ{_,F_}S,_{SA110,SA1100,XSCALE,IWMMXT}}"
163 CPU_IA64=""
164 CPU_M68K=""
165 CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}} MIPS_{N64,O32,N32}_ABI"
166 CPU_PPC=""
167 CPU_SH="SH{2,3,4,5}"
168 CPU_SPARC="SPARC_V{7,8,9,9B}"
169 CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH"
170 IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_SPARC} ${CPU_X86}"
171
172 check_cpu_opts() {
173 local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])"
174 [[ -z ${!cpu_var} ]] && return 0
175
176 if [[ -z ${UCLIBC_CPU} ]] ; then
177 ewarn "You really should consider setting UCLIBC_CPU"
178 ewarn "Otherwise, the build will be generic (read: slow)."
179 ewarn "Available CPU options:"
180 UCLIBC_CPU=$(eval echo ${!cpu_var})
181 echo ${UCLIBC_CPU}
182 case ${CTARGET} in
183 mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";;
184 sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";;
185 i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";;
186 *) export UCLIBC_CPU=${UCLIBC_CPU%% *};;
187 esac
188 else
189 local cpu found=0
190 for cpu in $(eval echo ${!cpu_var}) ; do
191 [[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break
192 done
193 if [[ ${found} -eq 0 ]] ; then
194 ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported"
195 ewarn "Valid choices:"
196 eval echo ${!cpu_var}
197 die "pick a supported cpu type"
198 fi
199 fi
200 }
201
202 set_opt() {
203 sed -i -e "/^\# $1 is not set/d" -e "/^$1=.*/d" .config
204 echo "$1=$2" >> .config
205 }
206
207 src_unpack() {
208 [[ -n ${ESVN_REPO_URI} ]] \
209 && subversion_src_unpack \
210 || unpack ${A}
211 cd "${S}"
212
213 check_cpu_opts
214
215 echo
216 einfo "Runtime Prefix: /"
217 einfo "Devel Prefix: /usr"
218 einfo "Kernel Prefix: $(alt_build_kprefix)"
219 einfo "CBUILD: ${CBUILD}"
220 einfo "CHOST: ${CHOST}"
221 einfo "CTARGET: ${CTARGET}"
222 einfo "CPU: ${UCLIBC_CPU:-default}"
223 einfo "ENDIAN: $(uclibc_endian)"
224 echo
225
226 ########## PATCHES ##########
227
228 [[ -n ${SVN_VER} ]] && \
229 epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch
230
231 if [[ -n ${PATCH_VER} ]] ; then
232 unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2
233 EPATCH_SUFFIX="patch"
234 epatch "${WORKDIR}"/patch
235 # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f)
236 cp "${WORKDIR}"/patch/math/libm/* "${S}"/libm/ || die
237 epatch "${WORKDIR}"/patch/math
238 fi
239
240 if [[ -d "${FILESDIR}"/patches-${PV} ]] ; then
241 EPATCH_SUFFIX="patch"
242 epatch "${FILESDIR}"/patches-${PV}
243 if [[ -d "${FILESDIR}"/patches-${PV}/math/libm ]] ; then
244 # math functions (sinf,cosf,tanf,atan2f,powf,fabsf,copysignf,scalbnf,rem_pio2f)
245 cp "${FILESDIR}"/patches-${PV}/math/libm/* "${S}"/libm/ || die
246 epatch "${FILESDIR}"/patches-${PV}/math
247 fi
248 fi
249
250 ########## CPU SELECTION ##########
251
252 local target config_target
253 case $(tc-arch) in
254 alpha) target="alpha"; config_target="no cpu-specific options";;
255 amd64) target="x86_64"; config_target="no cpu-specific options";;
256 arm) target="arm"; config_target="GENERIC_ARM";;
257 ia64) target="ia64"; config_target="no cpu-specific options";;
258 m68k) target="m68k"; config_target="no cpu-specific options";;
259 mips) target="mips"; config_target="MIPS_ISA_1";;
260 ppc) target="powerpc"; config_target="no cpu-specific options";;
261 sh) target="sh"; config_target="SH4";;
262 sparc) target="sparc"; config_target="no cpu-specific options";;
263 x86) target="i386"; config_target="GENERIC_386";;
264 *) die "$(tc-arch) lists no defaults :/";;
265 esac
266 sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \
267 extra/Configs/Config.${target}
268 sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak
269
270 ########## CONFIG SETUP ##########
271
272 make ARCH=${target} defconfig >/dev/null || die "could not config"
273
274 for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} ; do
275 sed -i -e "s:${def}=y:# ${def} is not set:" .config
276 done
277 if use debug ; then
278 set_opt SUPPORT_LD_DEBUG y
279 set_opt DODEBUG y
280 fi
281
282 sed -i -e '/ARCH_.*_ENDIAN/d' .config
283 set_opt "ARCH_WANTS_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN" y
284
285 if [[ $(tc-is-softfloat) != "no" ]] ; then
286 set_opt UCLIBC_HAS_FPU n
287 fi
288
289 if [[ ${CTARGET/eabi} != ${CTARGET} ]] ; then
290 set_opt CONFIG_ARM_OABI n
291 set_opt CONFIG_ARM_EABI y
292 fi
293
294 local moredefs="COMPAT_ATEXIT"
295 local compat_sym=atexit
296
297 # We need todo this for a few months. .29 is a major upgrade.
298 # Don't do it from cross-compiling case though
299 if ! use uclibc-compat ; then
300 if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \
301 ! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then
302 local fnames=""
303 einfo "Doing a scanelf in paths for bins containing the ${compat_sym} symbol"
304 fnames=$(scanelf -pyqs${compat_sym} -F%F#s)
305 if [[ -z ${fnames} ]] ; then
306 einfo "This system is clean."
307 einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1"
308 moredefs=""
309 else
310 ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled."
311 ewarn "qfile -Cq $(echo ${fnames}) | sort | uniq"
312 echo
313 ewarn "Leaving on ${moredefs}"
314 fi
315 else
316 moredefs=""
317 fi
318 fi
319 for def in ${moredefs} MALLOC_GLIBC_COMPAT DO_C99_MATH UCLIBC_HAS_{RPC,FULL_RPC,CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC,FTW} UCLIBC_HAS_REENTRANT_RPC UCLIBC_HAS_GNU_GLOB PTHREADS_DEBUG_SUPPORT UCLIBC_HAS_TZ_FILE_READ_MANY UCLIBC_HAS_FENV UCLIBC_SUSV3_LEGACY UCLIBC_SUSV3_LEGACY_MACROS UCLIBC_HAS_PROGRAM_INVOCATION_NAME ; do
320 set_opt "${def}" y
321 done
322 set_opt UCLIBC_HAS_CTYPE_UNSAFE n
323
324 if use iconv ; then
325 set_opt UCLIBC_HAS_LOCALE y
326 set_opt UCLIBC_HAS_XLOCALE n
327 set_opt UCLIBC_HAS_GLIBC_DIGIT_GROUPING y
328 set_opt UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING y
329
330 if use nls ; then
331 set_opt UCLIBC_HAS_GETTEXT_AWARENESS y
332 set_opt UCLIBC_MJN3_ONLY y
333 else
334 set_opt UCLIBC_HAS_GETTEXT_AWARENESS n
335 fi
336
337 if use pregen ; then
338 set_opt UCLIBC_PREGENERATED_LOCALE_DATA y
339 set_opt UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA y
340 if use userlocales ; then
341 cp "${DISTDIR}"/${MY_P}-user-locale.tar.gz \
342 extra/locale/uClibc-locale-030818.tgz \
343 || die "could not copy ${MY_P}-user-locale.tar.gz"
344 else
345 cp "${DISTDIR}"/uClibc-locale-030818.tgz \
346 extra/locale/uClibc-locale-030818.tgz \
347 || die "could not copy locale"
348 fi
349 else
350 set_opt UCLIBC_PREGENERATED_LOCALE_DATA n
351 fi
352 else
353 set_opt UCLIBC_HAS_LOCALE n
354 fi
355
356 use ipv6 && set_opt UCLIBC_HAS_IPV6 y
357
358 use wordexp && set_opt UCLIBC_HAS_WORDEXP y
359
360 # we need to do it independently of hardened to get ssp.c built into libc
361 set_opt UCLIBC_HAS_SSP y
362 set_opt UCLIBC_HAS_SSP_COMPAT y
363 set_opt UCLIBC_HAS_ARC4RANDOM y
364 set_opt PROPOLICE_BLOCK_ABRT n
365 set_opt PROPOLICE_BLOCK_SEGV y
366
367 # arm/mips do not emit PT_GNU_STACK, but if we enable this here
368 # it will be emitted as RWE, ppc has to be checked, x86 needs it
369 # this option should be used independently of hardened
370 # relro could be also moved out of hardened
371 if has $(tc-arch) x86 ; then
372 set_opt UCLIBC_BUILD_NOEXECSTACK y
373 else
374 set_opt UCLIBC_BUILD_NOEXECSTACK n
375 fi
376 set_opt UCLIBC_BUILD_RELRO y
377 if use hardened ; then
378 if has $(tc-arch) ${PIE_STABLE} ; then
379 set_opt UCLIBC_BUILD_PIE y
380 else
381 set_opt UCLIBC_BUILD_PIE n
382 fi
383 set_opt SSP_QUICK_CANARY n
384 set_opt UCLIBC_BUILD_SSP y
385 set_opt UCLIBC_BUILD_NOW y
386 else
387 set_opt UCLIBC_BUILD_PIE n
388 set_opt SSP_QUICK_CANARY y
389 set_opt UCLIBC_BUILD_SSP n
390 set_opt UCLIBC_BUILD_NOW n
391 fi
392
393 restore_config .config
394
395 # setup build and run paths
396 local cross=${CTARGET}-
397 type -p ${cross}ar > /dev/null || cross=""
398 sed -i \
399 -e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \
400 -e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \
401 -e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \
402 -e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \
403 -e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \
404 -e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \
405 .config || die
406
407 yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig"
408
409 cp .config myconfig
410
411 emake -s clean > /dev/null || die "could not clean"
412 }
413
414 setup_locales() {
415 cd "${S}"/extra/locale
416 if use userlocales && [[ -f ${ROOT}/etc/locales.build ]] ; then
417 :;
418 elif use minimal ; then
419 find ./charmaps -name ASCII.pairs > codesets.txt
420 find ./charmaps -name ISO-8859-1.pairs >> codesets.txt
421 cat <<-EOF > locales.txt
422 @euro e
423 UTF-8 yes
424 8-bit yes
425 en_US ISO-8859-1
426 en_US.UTF-8 UTF-8
427 EOF
428 else
429 find ./charmaps -name '*.pairs' > codesets.txt
430 cp LOCALES locales.txt
431 fi
432 cd -
433 }
434
435 src_compile() {
436 cp myconfig .config
437
438 emake headers || die "make headers failed"
439 just_headers && return 0
440
441 if use iconv && ! use pregen ; then
442 cd extra/locale
443 make clean || die "make locale clean failed"
444 setup_locales
445 emake || die "make locales failed"
446 cd ../..
447 fi
448
449 emake || die "make failed"
450 if [[ ${CTARGET} != ${CHOST} ]] ; then
451 emake -C utils hostutils || die "make hostutils failed"
452 elif [[ ${CHOST} == *-uclibc* ]] ; then
453 emake utils || die "make utils failed"
454 fi
455 }
456
457 src_test() {
458 [[ ${CHOST} != ${CTARGET} ]] && return 0
459 [[ ${CBUILD} != ${CHOST} ]] && return 0
460
461 # assert test fails on pax/grsec enabled kernels - normal
462 # vfork test fails in sandbox (both glibc/uclibc)
463 make UCLIBC_ONLY=1 check || die "test failed"
464 }
465
466 src_install() {
467 local sysroot=${D}
468 [[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}"
469
470 local target="install"
471 just_headers && target="install_headers"
472 emake DESTDIR="${sysroot}" ${target} || die "install failed"
473
474 just_headers && return 0
475
476 save_config .config
477
478 # remove files coming from kernel-headers
479 rm -rf "${sysroot}"/usr/include/{linux,asm*}
480
481 # Make sure we install the sys-include symlink so that when
482 # we build a 2nd stage cross-compiler, gcc finds the target
483 # system headers correctly. See gcc/doc/gccinstall.info
484 if [[ ${CTARGET} != ${CHOST} ]] ; then
485 dosym usr/include /usr/${CTARGET}/sys-include
486 newbin utils/ldconfig.host ${CTARGET}-ldconfig || die
487 newbin utils/ldd.host ${CTARGET}-ldd || die
488 return 0
489 fi
490
491 if [[ ${CHOST} == *-uclibc* ]] ; then
492 make DESTDIR="${D}" install_utils || die "install-utils failed"
493 dobin extra/scripts/getent
494 fi
495
496 if ! use build ; then
497 dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3
498 doman docs/man/*.[1-9]
499 fi
500 }
501
502 pkg_postinst() {
503 [[ ${CTARGET} != ${CHOST} ]] && return 0
504 [[ ${CHOST} != *-uclibc* ]] && return 0
505
506 if [[ ! -e ${ROOT}/etc/TZ ]] ; then
507 ewarn "Please remember to set your timezone in /etc/TZ"
508 [[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc
509 echo "UTC" > "${ROOT}"/etc/TZ
510 fi
511
512 if [[ ${ROOT} == "/" ]] ; then
513 # update cache before reloading init
514 /sbin/ldconfig
515 # reload init ...
516 [[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null
517 fi
518 }