public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] [rfc] laying groundwork for cbuild
@ 2006-12-31 15:09 Mike Frysinger
  2007-01-04 18:15 ` Chris Gianelloni
  2007-01-16 15:56 ` Chris Gianelloni
  0 siblings, 2 replies; 9+ messages in thread
From: Mike Frysinger @ 2006-12-31 15:09 UTC (permalink / raw
  To: gentoo-catalyst


[-- Attachment #1.1: Type: text/plain, Size: 178 bytes --]

attached patch redoes all of the logic for handling of chost and personality 
builds and inserts cbuild in all the right places

any qualms before i take it further ?
-mike

[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]

[-- Attachment #2: catalyst-cbuild.patch --]
[-- Type: text/x-diff, Size: 18811 bytes --]

Index: modules/generic_stage_target.py
===================================================================
--- modules/generic_stage_target.py	(revision 1203)
+++ modules/generic_stage_target.py	(working copy)
@@ -18,40 +18,21 @@
 		
 		self.valid_values.extend(["version_stamp","target","subarch",\
 			"rel_type","profile","snapshot","source_subpath","portage_confdir",\
-			"cflags","cxxflags","ldflags","chost","hostuse","portage_overlay",\
+			"cflags","cxxflags","ldflags","cbuild","chost","hostuse","portage_overlay",\
 			"distcc_hosts","makeopts","pkgcache_path","kerncache_path"])
 		
 		self.set_valid_build_kernel_vars(addlargs)
 		generic_target.__init__(self,myspec,addlargs)
-		# map the mainarch we are running under to the mainarches we support for
-		# building stages and LiveCDs. (for example, on amd64, we can build
-		# stages for x86 or amd64.
-		targetmap={ 	
-				"x86" : ["x86"],
-				"amd64" : ["x86","amd64"],
-				"sparc64" : ["sparc","sparc64"],
-				"ia64" : ["ia64"],
-				"alpha" : ["alpha"],
-				"sparc" : ["sparc"],
-				"sh" : ["sh"],
-				"s390" : ["s390"],
-				"ppc" : ["ppc"],
-				"ppc64" : ["ppc","ppc64"],
-				"hppa" : ["hppa"],
-				"mips" : ["mips"],
-				"arm" : ["arm"]
-		}
-		
-		machinemap={ 	
+		machinemap={
 				"i386" : "x86",
 				"i486" : "x86",
 				"i586" : "x86",
 				"i686" : "x86",
 				"x86_64" : "amd64",
+				"sparc" : "sparc",
 				"sparc64" : "sparc64",
 				"ia64" : "ia64",
 				"alpha" : "alpha",
-				"sparc" : "sparc",
 				"sh2" : "sh",
 				"sh3" : "sh",
 				"sh4" : "sh",
@@ -61,8 +42,12 @@
 				"s390" : "s390",
 				"ppc" : "ppc",
 				"ppc64" : "ppc64",
-				"parisc" : "hppa",
-				"parisc64" : "hppa",
+				"powerpc" : "powerpc",
+				"powerpc64" : "powerpc64",
+				"parisc" : "parisc",
+				"parisc64" : "parisc",
+				"hppa" : "hppa",
+				"hppa64" : "hppa",
 				"mips" : "mips",
 				"mips64" : "mips",
 				"arm" : "arm",
@@ -71,31 +56,38 @@
 				"armv5b" : "arm"
 		}
 		
-		mymachine=os.uname()[4]
-		if not machinemap.has_key(mymachine):
-			raise CatalystError, "Unknown machine type "+mymachine
-			
-		self.settings["hostarch"]=machinemap[mymachine]
-		self.archmap={}
-		self.subarchmap={}
+		if self.settings.has_key("chost"):
+			hostmachine = self.settings["chost"].split("-")[0]
+		else:
+			hostmachine = os.uname()[4]
+		if not machinemap.has_key(hostmachine):
+			raise CatalystError, "Unknown host machine type "+hostmachine
+		self.settings["hostarch"] = machinemap[hostmachine]
+		if self.settings.has_key("cbuild"):
+			buildmachine = self.settings["cbuild"].split("-")[0]
+		else:
+			buildmachine = os.uname()[4]
+		if not machinemap.has_key(buildmachine):
+			raise CatalystError, "Unknown build machine type "+buildmachine
+		self.settings["buildarch"] = machinemap[buildmachine]
+		self.settings["crosscompile"] = (self.settings["hostarch"] != self.settings["buildarch"])
+		self.archmap = {}
+		self.subarchmap = {}
 		
-		for x in targetmap[self.settings["hostarch"]]:
-			try:
-				fh=open(self.settings["sharedir"]+"/arch/"+x+".py")
-				# This next line loads the plugin as a module and assigns it to
-				# archmap[x]
-				self.archmap[x]=imp.load_module(x,fh,"arch/"+x+".py",(".py","r",imp.PY_SOURCE))
-				# This next line registers all the subarches supported in the
-				# plugin
-				self.archmap[x].register(self.subarchmap)
-				fh.close()	
-			
-			except IOError:
-				msg("Can't find "+x+".py plugin in "+self.settings["sharedir"]+"/arch/")
+		x = self.settings["hostarch"]
+		try:
+			fh = open(self.settings["sharedir"]+"/arch/"+x+".py")
+			# this next line loads the plugin as a module and assigns it to archmap[x]
+			self.archmap[x] = imp.load_module(x,fh,"arch/"+x+".py",(".py","r",imp.PY_SOURCE))
+			# this next line registers all the subarches supported in the plugin
+			self.archmap[x].register(self.subarchmap)
+			fh.close()
+		except IOError:
+			msg("Can't find "+x+".py plugin in "+self.settings["sharedir"]+"/arch/")
 		# Call arch constructor, pass our settings
 		try:
 			self.arch=self.subarchmap[self.settings["subarch"]](self.settings)
-                except:
+		except:
 			print "Invalid subarch: "+self.settings["subarch"]
 			print "Choose one of the following:",
 			for x in self.subarchmap:
@@ -104,14 +96,16 @@
 			sys.exit(2)
 
 		print "Using target:",self.settings["target"]
-		# self.settings["mainarch"] should now be set by our arch constructor,
-		# so we print a nice informational message:
-		if self.settings["mainarch"]==self.settings["hostarch"]:
+		# print a nice informational message:
+		if self.settings["buildarch"]==self.settings["hostarch"]:
 			print "Building natively for",self.settings["hostarch"]
-		
+		elif self.settings["crosscompile"]:
+			print "Cross-compiling on",self.settings["buildarch"],"for different machine type",\
+				self.settings["hostarch"]
 		else:
-			print "Building on",self.settings["hostarch"],"for alternate machine type",\
-				self.settings["mainarch"]
+			print "Building on",self.settings["buildarch"],"for alternate personality type",\
+				self.settings["hostarch"]
+
 		# This should be first to be set as other set_ options depend on this
 		self.set_spec_prefix()
 		
@@ -205,6 +199,10 @@
 			# for the chroot:
 			self.env["CCACHE_DIR"]="/var/tmp/ccache"	
 
+	def override_cbuild(self):
+		if self.makeconf.has_key("CBUILD"):
+			self.settings["CBUILD"]=self.makeconf["CBUILD"]
+
 	def override_chost(self):
 		if self.makeconf.has_key("CHOST"):
 			self.settings["CHOST"]=self.makeconf["CHOST"]
@@ -832,7 +830,8 @@
 
 	def chroot_setup(self):
 		self.makeconf=read_makeconf(self.settings["chroot_path"]+"/etc/make.conf")
-		self.override_chost()	
+		self.override_cbuild()
+		self.override_chost()
 		self.override_cflags()
 		self.override_cxxflags()	
 		self.override_ldflags()	
@@ -869,7 +868,8 @@
 				cmd("mv "+self.settings["chroot_path"]+"/etc/hosts "+self.settings["chroot_path"]+\
 					"/etc/hosts.bck", "Could not backup /etc/hosts",env=self.env)
 				cmd("cp /etc/hosts "+self.settings["chroot_path"]+"/etc/hosts", "Could not copy /etc/hosts",env=self.env)
-			#self.override_chost()	
+			#self.override_cbuild()
+			#self.override_chost()
 			#self.override_cflags()
 			#self.override_cxxflags()	
 			#self.override_ldflags()	
@@ -888,6 +888,8 @@
 			if self.settings.has_key("LDFLAGS"):
 				myf.write('LDFLAGS="'+self.settings["LDFLAGS"]+'"\n')
 			myf.write("# This should not be changed unless you know exactly what you are doing.  You\n# should probably be using a different stage, instead.\n")
+			if self.settings.has_key("CBUILD"):
+				myf.write('CBUILD="'+self.settings["CBUILD"]+'"\n')
 			myf.write('CHOST="'+self.settings["CHOST"]+'"\n')
 		    
 		    # Figure out what our USE vars are for building
@@ -1078,7 +1080,7 @@
                         self.purge()
 
 		for x in self.settings["action_sequence"]:
-			print "Running action sequence: "+x
+			print "--- Running action sequence: "+x
 			sys.stdout.flush()
 			try:
 				apply(getattr(self,x))
Index: targets/netboot/netboot-combine.sh
===================================================================
--- targets/netboot/netboot-combine.sh	(revision 1203)
+++ targets/netboot/netboot-combine.sh	(working copy)
@@ -15,7 +15,7 @@
 
 # First install the boot package that we need
 booter=""
-case ${clst_mainarch} in
+case ${clst_hostarch} in
 	alpha)
 		booter=""
 	;;
@@ -51,7 +51,7 @@
 	create_normal_loop ${clst_chroot_path}/tmp/staging/initrd-${kname} ${clst_target_path} initrd-${kname}.igz
 	rm -r ${clst_chroot_path}/tmp/staging/initrd-${kname}
 
-	case ${clst_mainarch} in
+	case ${clst_hostarch} in
 		alpha)
 			# Until aboot is patched this is broken currently.
 			# please use catalyst 1.1.5 or older
@@ -93,10 +93,10 @@
 			;;
 		sparc*)
 			#TEST TEST TEST TEST
-			#elftoaout -o /netboot-${kname}.${clst_mainarch} /usr/src/linux/vmlinux
-			#elftoaout -o /netboot-${kname}.${clst_mainarch} /${kname}
-			#piggy=${clst_mainarch/sparc/piggyback}
-			#${piggy} /netboot-${kname}.${clst_mainarch} /usr/src/linux/System.map /initrd-${kname}.igz
+			#elftoaout -o /netboot-${kname}.${clst_hostarch} /usr/src/linux/vmlinux
+			#elftoaout -o /netboot-${kname}.${clst_hostarch} /${kname}
+			#piggy=${clst_hostarch/sparc/piggyback}
+			#${piggy} /netboot-${kname}.${clst_hostarch} /usr/src/linux/System.map /initrd-${kname}.igz
 			;;
 		x86)
 			mknbi-linux \
Index: targets/support/functions.sh
===================================================================
--- targets/support/functions.sh	(revision 1203)
+++ targets/support/functions.sh	(working copy)
@@ -211,3 +211,7 @@
 		;;
 	esac
 }																												
+
+run_crossdev() {
+	crossdev ${clst_CHOST}
+}
Index: targets/support/netboot2-final.sh
===================================================================
--- targets/support/netboot2-final.sh	(revision 1203)
+++ targets/support/netboot2-final.sh	(working copy)
@@ -21,7 +21,7 @@
 
 # Any post-processing necessary for each architecture can be done here.  This
 # may include things like sparc's elftoaout, x86's PXE boot, etc.
-case ${clst_mainarch} in
+case ${clst_hostarch} in
 	alpha)
 		sleep 0
 		;;
Index: targets/support/bootloader-setup.sh
===================================================================
--- targets/support/bootloader-setup.sh	(revision 1203)
+++ targets/support/bootloader-setup.sh	(working copy)
@@ -13,7 +13,7 @@
 
 default_append_line="root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot"
 
-case ${clst_mainarch} in
+case ${clst_hostarch} in
 	alpha)
 		# NO SOFTLEVEL SUPPORT YET
 		acfg=$1/etc/aboot.conf
Index: targets/support/create-iso.sh
===================================================================
--- targets/support/create-iso.sh	(revision 1203)
+++ targets/support/create-iso.sh	(working copy)
@@ -7,7 +7,7 @@
 ## START RUNSCRIPT
 
 # Check for our CD ISO creation tools
-case ${clst_mainarch} in
+case ${clst_hostarch} in
 	mips)
    		cdmaker="sgibootcd"
 		cdmakerpkg="sys-boot/sgibootcd"
@@ -28,7 +28,7 @@
 then
 	case ${clst_livecd_type} in
 		gentoo-*)
-			case ${clst_mainarch} in
+			case ${clst_hostarch} in
 				alpha)
 					clst_iso_volume_id="Gentoo Linux - Alpha"
 				;;
@@ -76,7 +76,7 @@
 fi
 
 # Here we actually create the ISO images for each architecture
-case ${clst_mainarch} in
+case ${clst_hostarch} in
 	alpha)
 		case ${clst_fstype} in
 			zisofs)
Index: targets/support/pre-kmerge.sh
===================================================================
--- targets/support/pre-kmerge.sh	(revision 1203)
+++ targets/support/pre-kmerge.sh	(working copy)
@@ -13,7 +13,7 @@
 		# Setup case structure for livecd_type
 		case ${clst_livecd_type} in
 			gentoo-release-minimal | gentoo-release-universal)
-				case ${clst_mainarch} in
+				case ${clst_hostarch} in
 					amd64|x86)
 						sed -i 's/initramfs_data.cpio.gz /initramfs_data.cpio.gz -r 1024x768 /' /usr/share/genkernel/genkernel
 					;;
@@ -32,14 +32,14 @@
 		sed -e "s/@@MYDATE@@/${clst_netboot2_builddate}/g" \
 		    -e "s/@@RELVER@@/${clst_version_stamp}/g" \
 			${clst_root_path}usr/share/genkernel/netboot/linuxrc.x \
-				> ${clst_root_path}usr/share/genkernel/${clst_mainarch}/linuxrc
+				> ${clst_root_path}usr/share/genkernel/${clst_hostarch}/linuxrc
 
 		echo ">>> Copying support files to ${clst_root_path} ..."
 		cp -pPRf ${clst_root_path}usr/share/genkernel/netboot/misc/* \
 			${clst_merge_path}
 
 		echo ">>> Copying busybox config ..."
-		cp -f ${clst_root_path}usr/share/genkernel/${clst_mainarch}/nb-busybox.cf \
-			${clst_root_path}usr/share/genkernel/${clst_mainarch}/busy-config
+		cp -f ${clst_root_path}usr/share/genkernel/${clst_hostarch}/nb-busybox.cf \
+			${clst_root_path}usr/share/genkernel/${clst_hostarch}/busy-config
 	;;
 esac
Index: arch/hppa.py
===================================================================
--- arch/hppa.py	(revision 1203)
+++ arch/hppa.py	(working copy)
@@ -7,7 +7,6 @@
 	"Abstract base class for all hppa builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="hppa"
 		self.settings["CHROOT"]="chroot"
 		self.settings["CFLAGS"]="-O2 -pipe"
 		self.settings["CXXFLAGS"]="-O2 -pipe"
Index: arch/mips.py
===================================================================
--- arch/mips.py	(revision 1203)
+++ arch/mips.py	(working copy)
@@ -7,7 +7,6 @@
 	"Abstract base class for all mips builders [Big-endian]"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="mips"
 		self.settings["CHROOT"]="chroot"
 		self.settings["CHOST"]="mips-unknown-linux-gnu"
 
@@ -15,7 +14,6 @@
 	"Abstract base class for all mipsel builders [Little-endian]"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="mips"
 		self.settings["CHROOT"]="chroot"
 		self.settings["CHOST"]="mipsel-unknown-linux-gnu"
 
Index: arch/sparc.py
===================================================================
--- arch/sparc.py	(revision 1203)
+++ arch/sparc.py	(working copy)
@@ -7,11 +7,11 @@
 	"abstract base class for all sparc builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="sparc"
-		if self.settings["hostarch"]=="sparc64":
+		if self.settings["buildarch"]=="sparc64":
 			if not os.path.exists("/bin/linux32"):
 				raise CatalystError,"required /bin/linux32 executable not found (\"emerge setarch\" to fix.)"
 			self.settings["CHROOT"]="linux32 chroot"
+			self.settings["crosscompile"] = False;
 		else:
 			self.settings["CHROOT"]="chroot"
 
Index: arch/sh.py
===================================================================
--- arch/sh.py	(revision 1203)
+++ arch/sh.py	(working copy)
@@ -7,14 +7,12 @@
 	"Abstract base class for all sh builders [Little-endian]"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="sh"
 		self.settings["CHROOT"]="chroot"
 
 class generic_sheb(builder.generic):
 	"Abstract base class for all sheb builders [Big-endian]"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="sh"
 		self.settings["CHROOT"]="chroot"
 
 class arch_sh(generic_sh):
Index: arch/amd64.py
===================================================================
--- arch/amd64.py	(revision 1203)
+++ arch/amd64.py	(working copy)
@@ -6,7 +6,6 @@
 	"abstract base class for all amd64 builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="amd64"
 		self.settings["CHROOT"]="chroot"
 
 class arch_amd64(generic_amd64):
Index: arch/ppc64.py
===================================================================
--- arch/ppc64.py	(revision 1203)
+++ arch/ppc64.py	(working copy)
@@ -6,7 +6,6 @@
 	"abstract base class for all ppc64 builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="ppc64"
 		self.settings["CHROOT"]="chroot"
 
 class arch_ppc64(generic_ppc64):
Index: arch/s390.py
===================================================================
--- arch/s390.py	(revision 1203)
+++ arch/s390.py	(working copy)
@@ -7,7 +7,6 @@
 	"abstract base class for all s390 builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="s390"
 		self.settings["CHROOT"]="chroot"
 
 class arch_s390(generic_s390):
Index: arch/arm.py
===================================================================
--- arch/arm.py	(revision 1203)
+++ arch/arm.py	(working copy)
@@ -7,7 +7,6 @@
 	"Abstract base class for all arm (little endian) builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="arm"
 		self.settings["CHROOT"]="chroot"
 		self.settings["CFLAGS"]="-O2 -pipe"
 		self.settings["CXXFLAGS"]="-O1 -pipe"
@@ -16,7 +15,6 @@
 	"Abstract base class for all arm (big endian) builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="arm"
 		self.settings["CHROOT"]="chroot"
 		self.settings["CFLAGS"]="-O2 -pipe"
 		self.settings["CXXFLAGS"]="-O1 -pipe"
Index: arch/ppc.py
===================================================================
--- arch/ppc.py	(revision 1203)
+++ arch/ppc.py	(working copy)
@@ -12,12 +12,12 @@
 	"abstract base class for all ppc builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="ppc"
 		self.settings["CHOST"]="powerpc-unknown-linux-gnu"
-		if self.settings["hostarch"]=="ppc64":
+		if self.settings["buildarch"]=="ppc64":
 			if not os.path.exists("/bin/linux32"):
 				raise CatalystError,"required /bin/linux32 executable not found (\"emerge setarch\" to fix."
 			self.settings["CHROOT"]="linux32 chroot"
+			self.settings["crosscompile"] = False;
 		else:
 			self.settings["CHROOT"]="chroot"
 
Index: arch/sparc64.py
===================================================================
--- arch/sparc64.py	(revision 1203)
+++ arch/sparc64.py	(working copy)
@@ -7,7 +7,6 @@
 	"abstract base class for all sparc64 builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="sparc64"
 		self.settings["CHROOT"]="chroot"
 
 class arch_sparc64(generic_sparc64):
Index: arch/ia64.py
===================================================================
--- arch/ia64.py	(revision 1203)
+++ arch/ia64.py	(working copy)
@@ -7,7 +7,6 @@
 	"builder class for ia64"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="ia64"
 		self.settings["CHROOT"]="chroot"
 		self.settings["CFLAGS"]="-O2 -pipe"
 		self.settings["CFLAGS"]="-O2 -pipe"
Index: arch/alpha.py
===================================================================
--- arch/alpha.py	(revision 1203)
+++ arch/alpha.py	(working copy)
@@ -7,7 +7,6 @@
 	"abstract base class for all alpha builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="alpha"
 		self.settings["CHROOT"]="chroot"
 		self.settings["CFLAGS"]="-mieee -pipe"
 
Index: arch/x86.py
===================================================================
--- arch/x86.py	(revision 1203)
+++ arch/x86.py	(working copy)
@@ -7,11 +7,11 @@
 	"abstract base class for all x86 builders"
 	def __init__(self,myspec):
 		builder.generic.__init__(self,myspec)
-		self.settings["mainarch"]="x86"
-		if self.settings["hostarch"]=="amd64":
+		if self.settings["buildarch"]=="amd64":
 			if not os.path.exists("/bin/linux32"):
 				raise CatalystError,"required /bin/linux32 executable not found (\"emerge setarch\" to fix.)"
 			self.settings["CHROOT"]="linux32 chroot"
+			self.settings["crosscompile"] = False;
 		else:
 			self.settings["CHROOT"]="chroot"
 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-catalyst] [rfc] laying groundwork for cbuild
  2006-12-31 15:09 [gentoo-catalyst] [rfc] laying groundwork for cbuild Mike Frysinger
@ 2007-01-04 18:15 ` Chris Gianelloni
  2007-01-05  9:35   ` Mike Frysinger
  2007-01-16 15:56 ` Chris Gianelloni
  1 sibling, 1 reply; 9+ messages in thread
From: Chris Gianelloni @ 2007-01-04 18:15 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

On Sun, 2006-12-31 at 10:09 -0500, Mike Frysinger wrote:
> attached patch redoes all of the logic for handling of chost and personality 
> builds and inserts cbuild in all the right places
> 
> any qualms before i take it further ?

None here.

Is this safe to apply $soon or do we need to wait for the whole shebang?
I'm going to be rolling up 2.0.2 in the next couple weeks (at most) and
am trying to get as much going as I can.  What I have in SVN currently
has been tested and all appears to work properly, so I'm getting close
to another release.

-- 
Chris Gianelloni
Release Engineering Strategic Lead
Alpha/AMD64/x86 Architecture Teams
Games Developer/Council Member/Foundation Trustee
Gentoo Foundation

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-catalyst] [rfc] laying groundwork for cbuild
  2007-01-04 18:15 ` Chris Gianelloni
@ 2007-01-05  9:35   ` Mike Frysinger
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2007-01-05  9:35 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

On Thursday 04 January 2007 13:15, Chris Gianelloni wrote:
> Is this safe to apply $soon or do we need to wait for the whole shebang?

the patch i posted should be ok by itself ... it merely changes semantics, it 
doesnt require any further changes to retain current functionality afaik
-mike

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-catalyst] [rfc] laying groundwork for cbuild
  2006-12-31 15:09 [gentoo-catalyst] [rfc] laying groundwork for cbuild Mike Frysinger
  2007-01-04 18:15 ` Chris Gianelloni
@ 2007-01-16 15:56 ` Chris Gianelloni
  2007-01-16 22:15   ` Mike Frysinger
  1 sibling, 1 reply; 9+ messages in thread
From: Chris Gianelloni @ 2007-01-16 15:56 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

On Sun, 2006-12-31 at 10:09 -0500, Mike Frysinger wrote:
> attached patch redoes all of the logic for handling of chost and personality 
> builds and inserts cbuild in all the right places
> 
> any qualms before i take it further ?

In this patch, what replaces targetmap?  I currently can't compile for
x86 on amd64 with this.

Invalid subarch: i686
Choose one of the following: amd64
Catalyst aborting....

-- 
Chris Gianelloni
Release Engineering Strategic Lead
Alpha/AMD64/x86 Architecture Teams
Games Developer/Council Member/Foundation Trustee
Gentoo Foundation

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-catalyst] [rfc] laying groundwork for cbuild
  2007-01-16 15:56 ` Chris Gianelloni
@ 2007-01-16 22:15   ` Mike Frysinger
  2007-01-17 15:07     ` Chris Gianelloni
  0 siblings, 1 reply; 9+ messages in thread
From: Mike Frysinger @ 2007-01-16 22:15 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Tuesday 16 January 2007 10:56, Chris Gianelloni wrote:
> On Sun, 2006-12-31 at 10:09 -0500, Mike Frysinger wrote:
> > attached patch redoes all of the logic for handling of chost and
> > personality builds and inserts cbuild in all the right places
> >
> > any qualms before i take it further ?
>
> In this patch, what replaces targetmap?  I currently can't compile for
> x86 on amd64 with this.

the individual arch file handles it now

 - user [optionally] sets up chost/cbuild
 - arch/$chost.py checks $cbuild to see if personality changing is possible

> Invalid subarch: i686
> Choose one of the following: amd64
> Catalyst aborting....

can you post your .spec file ?
-mike

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-catalyst] [rfc] laying groundwork for cbuild
  2007-01-16 22:15   ` Mike Frysinger
@ 2007-01-17 15:07     ` Chris Gianelloni
  2007-01-20  5:31       ` Mike Frysinger
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Gianelloni @ 2007-01-17 15:07 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]

On Tue, 2007-01-16 at 17:15 -0500, Mike Frysinger wrote:
> On Tuesday 16 January 2007 10:56, Chris Gianelloni wrote:
> > On Sun, 2006-12-31 at 10:09 -0500, Mike Frysinger wrote:
> > > attached patch redoes all of the logic for handling of chost and
> > > personality builds and inserts cbuild in all the right places
> > >
> > > any qualms before i take it further ?
> >
> > In this patch, what replaces targetmap?  I currently can't compile for
> > x86 on amd64 with this.
> 
> the individual arch file handles it now
> 
>  - user [optionally] sets up chost/cbuild
>  - arch/$chost.py checks $cbuild to see if personality changing is possible
> 
> > Invalid subarch: i686
> > Choose one of the following: amd64
> > Catalyst aborting....
> 
> can you post your .spec file ?

It was a livedvd spec, so I'll just post the top.  Allow me to state
that this worked perfectly before applying your patch, which, unlike my
usual care, I applied without bothering to test... ;]

subarch: i686
version_stamp: installer-2007.0
target: livecd-stage1
rel_type: default
profile: default-linux/x86/dev/2007.0/desktop
snapshot: 2007.0
source_subpath: default/stage3-i686-desktop-2007.0
livecd/use:
        atm
        branding
        livecd
        mozbranding
        socks5

livecd/packages:
        app-admin/gkrellm

Anyway, I'm running this on an amd64 machine.  Before, catalyst was able
to allow all of the x86 subarches to be built on amd64 w/ no special
options added to the spec file.  I'd like to return to this behavior,
since it will adversely affect many of us.

-- 
Chris Gianelloni
Release Engineering Strategic Lead
Alpha/AMD64/x86 Architecture Teams
Games Developer/Council Member/Foundation Trustee
Gentoo Foundation

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-catalyst] [rfc] laying groundwork for cbuild
  2007-01-17 15:07     ` Chris Gianelloni
@ 2007-01-20  5:31       ` Mike Frysinger
  2007-01-20 13:26         ` Chris Gianelloni
  2007-01-20 13:29         ` Chris Gianelloni
  0 siblings, 2 replies; 9+ messages in thread
From: Mike Frysinger @ 2007-01-20  5:31 UTC (permalink / raw
  To: gentoo-catalyst


[-- Attachment #1.1: Type: text/plain, Size: 358 bytes --]

On Wednesday 17 January 2007 10:07, Chris Gianelloni wrote:
> It was a livedvd spec, so I'll just post the top.  Allow me to state
> that this worked perfectly before applying your patch, which, unlike my
> usual care, I applied without bothering to test... ;]

whiner :p

try the attached patch please

any plans to implement any sort of test suite ?
-mike

[-- Attachment #1.2: catalyst-use-subarch.patch --]
[-- Type: text/x-diff, Size: 1048 bytes --]

Index: modules/generic_stage_target.py
===================================================================
--- modules/generic_stage_target.py	(revision 1206)
+++ modules/generic_stage_target.py	(working copy)
@@ -57,11 +57,14 @@ class generic_stage_target(generic_targe
 		
 		if self.settings.has_key("chost"):
 			hostmachine = self.settings["chost"].split("-")[0]
-		else:
-			hostmachine = os.uname()[4]
-		if not machinemap.has_key(hostmachine):
-			raise CatalystError, "Unknown host machine type "+hostmachine
-		self.settings["hostarch"] = machinemap[hostmachine]
+			if not machinemap.has_key(hostmachine):
+				raise CatalystError, "Unknown host machine type "+hostmachine
+			self.settings["hostarch"] = machinemap[hostmachine]
+		else:
+			hostmachine = self.settings["subarch"]
+			if machinemap.has_key(hostmachine):
+				hostmachine = machinemap[hostmachine]
+			self.settings["hostarch"] = hostmachine
 		if self.settings.has_key("cbuild"):
 			buildmachine = self.settings["cbuild"].split("-")[0]
 		else:

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-catalyst] [rfc] laying groundwork for cbuild
  2007-01-20  5:31       ` Mike Frysinger
@ 2007-01-20 13:26         ` Chris Gianelloni
  2007-01-20 13:29         ` Chris Gianelloni
  1 sibling, 0 replies; 9+ messages in thread
From: Chris Gianelloni @ 2007-01-20 13:26 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

On Sat, 2007-01-20 at 00:31 -0500, Mike Frysinger wrote:
> On Wednesday 17 January 2007 10:07, Chris Gianelloni wrote:
> > It was a livedvd spec, so I'll just post the top.  Allow me to state
> > that this worked perfectly before applying your patch, which, unlike my
> > usual care, I applied without bothering to test... ;]
> 
> whiner :p
> 
> try the attached patch please

Same problem.

> any plans to implement any sort of test suite ?

Well, I usually try building at least livecd-stage1/livecd-stage2 with
the changes prior to adding them to SVN.  In the case of a patch
touching some other location only, like a stage4 patch, I usually run
through a stage4 before commit.

-- 
Chris Gianelloni
Release Engineering Strategic Lead
Alpha/AMD64/x86 Architecture Teams
Games Developer/Council Member/Foundation Trustee
Gentoo Foundation

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-catalyst] [rfc] laying groundwork for cbuild
  2007-01-20  5:31       ` Mike Frysinger
  2007-01-20 13:26         ` Chris Gianelloni
@ 2007-01-20 13:29         ` Chris Gianelloni
  1 sibling, 0 replies; 9+ messages in thread
From: Chris Gianelloni @ 2007-01-20 13:29 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Sat, 2007-01-20 at 00:31 -0500, Mike Frysinger wrote:
> On Wednesday 17 January 2007 10:07, Chris Gianelloni wrote:
> > It was a livedvd spec, so I'll just post the top.  Allow me to state
> > that this worked perfectly before applying your patch, which, unlike my
> > usual care, I applied without bothering to test... ;]
> 
> whiner :p
> 
> try the attached patch please
> 
> any plans to implement any sort of test suite ?

Ignore that last message.  Your patch fixed it (at least for amd64/x86).

-- 
Chris Gianelloni
Release Engineering Strategic Lead
Alpha/AMD64/x86 Architecture Teams
Games Developer/Council Member/Foundation Trustee
Gentoo Foundation

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-01-20 13:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-31 15:09 [gentoo-catalyst] [rfc] laying groundwork for cbuild Mike Frysinger
2007-01-04 18:15 ` Chris Gianelloni
2007-01-05  9:35   ` Mike Frysinger
2007-01-16 15:56 ` Chris Gianelloni
2007-01-16 22:15   ` Mike Frysinger
2007-01-17 15:07     ` Chris Gianelloni
2007-01-20  5:31       ` Mike Frysinger
2007-01-20 13:26         ` Chris Gianelloni
2007-01-20 13:29         ` Chris Gianelloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox