Revision: 5199
http://ipcop.svn.sourceforge.net/ipcop/?rev=5199&view=rev
Author: gespinasse
Date: 2010-12-04 06:02:38 +0000 (Sat, 04 Dec 2010)
Log Message:
-----------
Set the timezone inside the chroot to the same setting than the building machine
date inside ./make.sh shell should be exactly the same now.
If you use right zoneinfo setting on host, only posix will be used inside
Better log for nice change and minor beautify tweak
Modified Paths:
--------------
ipcop/trunk/lfs/glibc
ipcop/trunk/make.sh
Modified: ipcop/trunk/lfs/glibc
===================================================================
--- ipcop/trunk/lfs/glibc 2010-12-03 06:24:57 UTC (rev 5198)
+++ ipcop/trunk/lfs/glibc 2010-12-04 06:02:38 UTC (rev 5199)
@@ -218,7 +218,7 @@
localedef -i zh_CN -f GB18030 zh_CN.GB18030
# Configuring timezone
- cp --remove-destination /usr/share/zoneinfo/GMT /etc/localtime
+ cp --remove-destination $$(cat $(DIR_DL)/TIMEZONE) /etc/localtime
# Remove timezone not include (make the list smaller)
# historical hardlink at zoneinfo root and right directory with leap
seconds
find /usr/share/zoneinfo/* -maxdepth 0 -not -path
'/usr/share/zoneinfo/posix' -exec rm -rf {} \;
Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2010-12-03 06:24:57 UTC (rev 5198)
+++ ipcop/trunk/make.sh 2010-12-04 06:02:38 UTC (rev 5199)
@@ -953,9 +953,9 @@
# Setting our nice level
if [ x`nice` != x"${NICE}" ]; then
+ echo -ne "Setting our nice level to ${SET_OPT_COL}:
${INFO}${NICE}${NORMAL}"
echo "Setting our nice level to ${NICE}" >> ${PREPLOGFILE}
- echo -ne "Setting our nice level to ${NICE}"
- ${SUDO} ${RENICE} ${NICE} $$ > /dev/null
+ ${SUDO} ${RENICE} ${NICE} $$ >> ${PREPLOGFILE} 2>&1
if [ x`nice` != x"${NICE}" ]; then
exiterror "Failed to set correct nice level"
@@ -966,7 +966,7 @@
# Set SCHED_BATCH
if [ -x /usr/bin/schedtool ]; then
- echo -ne "Setting kernel schedular to SCHED_BATCH"
+ echo -ne "Setting kernel schedular to ${SET_OPT_COL}:
${INFO}SCHED_BATCH${NORMAL}"
/usr/bin/schedtool -B $$
if [ ${?} -eq 0 ]; then
@@ -1073,10 +1073,38 @@
echo -n "Running compilation tests : "
beautify message INFO "$RUNNING_TEST"
+ # Set same timezone in the chroot as the build machine, so time is
consistant
+ # or once glibc is installed, system has a different time
+ # Case /etc/timezone debian/ubuntu
+ [ -f /etc/timezone ] && TIMEZONE="/usr/share/zoneinfo/posix/$(cat
/etc/timezone)"
+ # Case localtime symlink
+ [ -h /etc/localtime ] && TIMEZONE="$(ls -l /etc/localtime | sed 's/
//g' |cut -d '>' -f2)"
+ # Case copy or hardlink to localtime, more time consumming than symlink
+ if [ -f /etc/localtime ]; then
+ MD5=$(md5sum /etc/localtime | cut -d ' ' -f1)
+ TIMEZONE="$(find /usr/share/zoneinfo/{posix,right} -type f
-exec md5sum {} \; | grep $MD5 | awk '{print $2}')"
+ # If leap second is used on host, switch to posix as the only
part installed
+ TIMEZONE="$(echo $TIMEZONE | sed 's|\/right\/|/posix/|')"
+ # Maybe support non posix, non right? not yet
+ fi
+
+ # We are out of luck if we didn't find the timezone
+ if [ -z $TIMEZONE ]; then
+ TIMEZONE=/usr/share/zoneinfo/posix/GMT
+ beautify message WARN "Chroot timezone set by default to GMT"
+ beautify message WARN "Report how localtime is set on your
machine"
+ else
+ echo -e "Chroot timezone ${SET_OPT_COL}:
${INFO}${TIMEZONE}${NORMAL}"
+ fi
+ # Just save TIMEZONE for now, root will set localtime during the build
+ # Use cache as user-owned, ${LFS}/usr/src is set owned by root in stage2
+ echo ${TIMEZONE} >${BASEDIR}/cache/TIMEZONE
+ unset MD5 TIMEZONE
+
# svn info does not grow on commit but on update
if [ -d ${BASEDIR}/.svn ]; then
SVNREV=$(svn info | grep Revision)
- echo -e "last svn up ${BOLD}${SVNREV}${NORMAL}"
+ echo -e "Last svn up ${SET_OPT_COL}: ${INFO}${SVNREV}${NORMAL}"
fi
# Remove pre-install list of installed files in case user erase some
files before to build again
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Ipcop-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-svn