[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ipcop-svn
Subject:    [Ipcop-svn] SF.net SVN: ipcop:[3872] ipcop/trunk
From:       gespinasse () users ! sourceforge ! net
Date:       2009-11-23 19:19:46
Message-ID: E1NCeRu-0001JR-0r () 3kljzd1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 3872
          http://ipcop.svn.sourceforge.net/ipcop/?rev=3872&view=rev
Author:   gespinasse
Date:     2009-11-23 19:19:45 +0000 (Mon, 23 Nov 2009)

Log Message:
-----------
Remove to the need to have /usr/src writable by everyone.
This fix some coreutils-8.1 tests with perl when /usr/src/<package> is 
added to the PATH

Now /usr/src is owned by build user on toolchain stage.
On stage2, ownership is passed to root

On stage2, don't fake to create directories like /bin,/dev,/proc,/sys 
already created by make.sh.
Similary, bash symlink need to exist before stage2 run, so that's 
unneeded to try there.

/us/local/src is not used, removed
Do we need /opt ?

Reorder stage2 rootfile and add a few missing files

We no more need to create /etc in make.sh, that's a remaining part when 
/etc was mounted

Modified Paths:
--------------
    ipcop/trunk/config/rootfiles/common/stage2
    ipcop/trunk/lfs/stage2
    ipcop/trunk/make.sh

Modified: ipcop/trunk/config/rootfiles/common/stage2
===================================================================
--- ipcop/trunk/config/rootfiles/common/stage2	2009-11-23 16:35:58 UTC (rev 3871)
+++ ipcop/trunk/config/rootfiles/common/stage2	2009-11-23 19:19:45 UTC (rev 3872)
@@ -1,7 +1,6 @@
 ##
 ## stage2
 ##
-proc
 dev/console
 dev/null
 #boot
@@ -32,20 +31,8 @@
 #home/nobody
 #lib
 mnt
-#opt/bin
-#opt/doc
-#opt/include
-#opt/info
-#opt/lib
-#opt/man
-#opt/man/man1
-#opt/man/man2
-#opt/man/man3
-#opt/man/man4
-#opt/man/man5
-#opt/man/man6
-#opt/man/man7
-#opt/man/man8
+#opt
+proc
 #root
 #sbin
 sbin/mkinitramfs
@@ -58,7 +45,9 @@
 #usr/lib
 #usr/lib/libgcc_s.so
 #usr/lib/libgcc_s.so.1
+#usr/local
 #usr/local/bin
+#usr/local/bin/install-diff.pl
 #usr/local/doc
 #usr/local/include
 #usr/local/info
@@ -83,7 +72,6 @@
 #usr/local/share/nls
 #usr/local/share/terminfo
 #usr/local/share/zoneinfo
-#usr/local/src
 #usr/man
 #usr/sbin
 #usr/share
@@ -104,6 +92,7 @@
 #usr/share/nls
 #usr/share/terminfo
 #usr/share/zoneinfo
+#var
 #var/cache
 var/empty
 #var/lib

Modified: ipcop/trunk/lfs/stage2
===================================================================
--- ipcop/trunk/lfs/stage2	2009-11-23 16:35:58 UTC (rev 3871)
+++ ipcop/trunk/lfs/stage2	2009-11-23 19:19:45 UTC (rev 3872)
@@ -58,11 +58,14 @@
 $(TARGET) : $(firstword $(MAKEFILE_LIST))
 	@$(PREBUILD)
 
-	# Create directories
-	-mkdir -p /{bin,boot,dev,home,lib,lib/firmware,mnt,proc} 
-	-mkdir -p /{root,sbin,sys,tmp,usr/local,var,opt}
+	# Change ownership of directories already created by make.sh
+	# use 0:0 as etc is not yet installed
+	chown 0:0 /usr /usr/src
+	# Create directories not already made by make.sh
+	-mkdir -p /{boot,etc,home,lib/firmware,mnt}
+	-mkdir -p /{root,sbin,tmp,usr/local,var,opt}
 	-for dirname in /usr /usr/local; do \
-		mkdir -p $$dirname/{bin,include,lib,sbin,share,src}; \
+		mkdir -p $$dirname/{bin,include,lib,sbin,share}; \
 		ln -sfn share/{man,doc,info} $$dirname; \
 		mkdir -p $$dirname/share/{dict,doc,info,locale,man}; \
 		mkdir -p $$dirname/share/{nls,misc,terminfo,zoneinfo}; \
@@ -70,7 +73,7 @@
 	done
 
 	# Check for some important links and create them if they don't exist
-	if [ ! -e /bin/bash ]; then ln -sfn /$(TOOLS_DIR)/bin/bash /bin/bash && ln -sf bash \
/bin/sh; fi +	# bash links are made inside make.sh as we can't reach that point \
without  if [ ! -e /bin/cat ]; then ln -sfn /$(TOOLS_DIR)/bin/cat /bin/cat; fi
 	if [ ! -e /bin/pwd ]; then ln -sfn /$(TOOLS_DIR)/bin/pwd /bin/pwd; fi
 	if [ ! -e /bin/stty ]; then ln -sfn /$(TOOLS_DIR)/bin/stty /bin/stty; fi

Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh	2009-11-23 16:35:58 UTC (rev 3871)
+++ ipcop/trunk/make.sh	2009-11-23 19:19:45 UTC (rev 3872)
@@ -957,29 +957,31 @@
 		${MKDIR} ${BASEDIR}/test_${MACHINE}/${BUILDDATE}
 	fi
 
+	# let src user owned, so we don't need to grant everyone a write access
+	# that make some coreutils tests to fail because /usr/src/<package> is added to \
PATH during test +	# and perl complain about 'Insecure directory in $ENV{PATH} while \
running with -T switch' +	${MKDIR} ${LFS}/usr/src
+
 	if [ x"${USE_DISTCC}" == x"yes" -a ! -z "${DISTCC_HOSTS}" ]; then
 		${MKDIR} ${DISTCC_DIR}
 		${SUDO} ${MKDIR} ${LFS}/usr/src/distcc
 	fi
 
+	# needed to create them now before to 'mount bind' them
 	${SUDO} ${MKDIR} ${BASEDIR}/build_${MACHINE}/${INSTALLER_DIR}
-	${SUDO} ${MKDIR} ${LFS}/bin
 	${SUDO} ${MKDIR} ${LFS}/${TOOLS_DIR}
 	${SUDO} ${MKDIR} ${LFS}/dev/pts
 	${SUDO} ${MKDIR} ${LFS}/proc
 	${SUDO} ${MKDIR} ${LFS}/sys
 	${SUDO} ${MKDIR} ${LFS}/usr/src/{cache,ccache,config,doc,html,langs,lfs,log_${MACHINE},src,test_${MACHINE},updates}
  ${SUDO} ${MKDIR} ${LFS}/${INSTALLER_DIR}
-	${SUDO} ${MKDIR} ${LFS}/etc
 
-	# If everyone can write to ${LFS}/usr/src, at least set the sticky bit
-	${SUDO} ${CHMOD} 1777 ${LFS}/usr/src
-
 	#################################################################################
 	# Make sure ${LFS}/bin/bash exists.  We used to do this check in lfs/bash, but	#
 	# it's better to do it here so that the toolchain becomes completely		#
 	# self-sufficient (ie you can start with no build_MACHINE/ipcop and lfs/stage2)	#
 	#################################################################################
+	${SUDO} ${MKDIR} ${LFS}/bin
 	if [ ! -f ${LFS}/bin/bash ]; then
 		${SUDO} ${LN} /${TOOLS_DIR}/bin/bash ${LFS}/bin/bash
 		${SUDO} ${LN} bash ${LFS}/bin/sh


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic