Added two patches from Joshua Kinard <kumba@gentoo.org> to fix stage1 not having...
authorChris Gianelloni <wolf31o2@gentoo.org>
Wed, 21 Jun 2006 22:11:54 +0000 (22:11 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Wed, 21 Jun 2006 22:11:54 +0000 (22:11 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1151 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
catalyst
modules/netboot2_target.py
modules/stage1_target.py
targets/netboot2/netboot2-copyfile.sh
targets/support/pre-kmerge.sh

index 4fc7fe7af1c5fcf37b36440718041e5ff5507b0a..6808f538a6c0f81c4aebf040b59332f3f7ddb132 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.635 2006/06/20 19:32:31 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.636 2006/06/21 22:11:54 wolf31o2 Exp $
+
+  21 Jun 2006; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
+  modules/netboot2_target.py, modules/stage1_target.py,
+  targets/netboot2/netboot2-copyfile.sh, targets/support/pre-kmerge.sh:
+  Added two patches from Joshua Kinard <kumba@gentoo.org> to fix stage1 not
+  having /proc mounted during the preclean stage and also to clean up the
+  netboot2 code. This is 2.0_rc48.
 
   20 Jun 2006; Chris Gianelloni <wolf31o2@gentoo.org>
   targets/support/unmerge.sh:
index 040db05e77bb5b1f5338205ca7fced65294722c5..11269a650397cc73ff253ac9cc1e31a3956d8f40 100755 (executable)
--- a/catalyst
+++ b/catalyst
@@ -1,7 +1,7 @@
 #!/usr/bin/python -OO
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.155 2006/06/09 00:31:51 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.156 2006/06/21 22:11:54 wolf31o2 Exp $
 
 # Maintained in full by:
 # Eric Edgar <rocket@gentoo.org>
@@ -11,7 +11,7 @@ import os,sys,imp,string,getopt
 import pdb
 
 __maintainer__="Chris Gianelloni <wolf31o2@gentoo.org>"
-__version__="2.0_rc47"
+__version__="2.0_rc48"
 
 conf_values={}
 
index 383af2772605a5cda2a5b418ffafea0d9284929f..88adfcc0c291e0d24346fa358fadc4323c3e49e1 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/netboot2_target.py,v 1.2 2006/01/20 17:19:42 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/netboot2_target.py,v 1.3 2006/06/21 22:11:54 wolf31o2 Exp $
 
 """
 Builder class for a netboot build, version 2
@@ -15,7 +15,6 @@ class netboot2_target(generic_stage_target):
                self.required_values=[
                        "boot/kernel",
                        "netboot2/builddate",
-                       "netboot2/busybox_config",
                        "netboot2/packages",                    
                        "netboot2/use"                  
                ]
@@ -44,10 +43,6 @@ class netboot2_target(generic_stage_target):
                # /tmp/image
                self.settings["merge_path"]=normpath("/tmp/image")
 
-               for envvar in "CFLAGS", "CXXFLAGS":
-                       if not os.environ.has_key(envvar) and not addlargs.has_key(envvar):
-                               self.settings[envvar] = "-Os -pipe"
-
        def set_dest_path(self):
                if self.settings.has_key("merge_path"):
                        self.settings["destpath"]=normpath(self.settings["chroot_path"]+self.settings["merge_path"])
index e68990a4f157d25c41cf780a6f32f143b18cbdf8..38e6da1565dcbe2abeaaf747279fb07723bbf623 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.23 2006/01/29 18:58:03 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage1_target.py,v 1.24 2006/06/21 22:11:54 wolf31o2 Exp $
 
 """
 Builder class for a stage1 installation tarball build.
@@ -20,7 +20,7 @@ class stage1_target(generic_stage_target):
                print "stage1 stage path is "+self.settings["stage_path"]
        
        def set_root_path(self):
-              # ROOT= variable for emerges
+               # sets the root path, relative to 'chroot_path', of the stage1 root
                self.settings["root_path"]=normpath("/tmp/stage1root")
                print "stage1 root path is "+self.settings["root_path"]
        
@@ -59,6 +59,16 @@ class stage1_target(generic_stage_target):
                        print "\tIf you break it, you buy it. Don't complain to us about it."
                        print "\tDont say we did not warn you\n"
 
+       def set_mounts(self):
+               # stage_path/proc probably doesn't exist yet, so create it
+               if not os.path.exists(self.settings["stage_path"]+"/proc"):
+                       os.makedirs(self.settings["stage_path"]+"/proc")
+
+               # alter the mount mappings to bind mount proc onto it
+               self.mounts.append("/tmp/stage1root/proc")
+               self.mountmap["/tmp/stage1root/proc"]="/proc"
+
+
 def register(foo):
        foo.update({"stage1":stage1_target})
        return foo
index 662967f628f81391bbdf4cece807d69f3d31f570..a2a9c197e4f9b7582291b41255770c8a3b9bf707 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot2/netboot2-copyfile.sh,v 1.1 2006/01/13 15:09:07 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot2/netboot2-copyfile.sh,v 1.2 2006/06/21 22:11:54 wolf31o2 Exp $
 
 . /tmp/chroot-functions.sh
 
@@ -11,6 +11,14 @@ echo ">>> Copying initramfs files to ${clst_merge_path} (in chroot) ..."
 [ ! -d "${clst_merge_path}" ] && mkdir -p ${clst_merge_path}
 for f in ${clst_files}
 do 
+       # copy it to the merge path
        cp -af --parents ${f} ${clst_merge_path}
+
+       # if the file is an ELF binary, strip unneeded stuff from it
+       if [ -x "${f}" ] && [ ! -L "${f}" ]; then
+               if [ "$(head -c 4 ${f} 2>/dev/null | tail -c 3)" = "ELF" ]; then
+                       strip -R .comment -R .note ${clst_merge_path}${f}
+               fi
+       fi
 done
 echo ""
index 1dba443af3bc96ab305be11497cf2c34fa2b6e0d..94012f1ed22b79c456000e5a7df5872488c62fd1 100755 (executable)
@@ -39,6 +39,7 @@ case ${clst_target} in
                cp -af ${clst_root_path}usr/share/genkernel/netboot/misc/* ${clst_merge_path}
 
                echo ">>> Copying busybox config ..."
-               cp -f ${clst_netboot2_busybox_config} /usr/share/genkernel/${clst_mainarch}/busy-config
+               cp -f ${clst_root_path}usr/share/genkernel/${clst_mainarch}/nb-busybox.cf \
+                       ${clst_root_path}usr/share/genkernel/${clst_mainarch}/busy-config
        ;;
 esac