7011369 gmake complains about fresh userland bits
authorNorm Jacobs <Norm.Jacobs@Sun.COM>
Fri, 14 Jan 2011 13:12:28 -0800
changeset 58 d8024c042a00
parent 57 91dc164c5b46
child 59 7500d63edb42
7011369 gmake complains about fresh userland bits 7011699 USERLAND prefix relocation is broken 7011719 userland doesn't need to be able to build python 2.4 bits. 7011956 userland-fetch friendliness enhancements
components/Makefile
components/a2ps/Makefile
make-rules/configure.mk
make-rules/setup.py.mk
make-rules/shared-macros.mk
tools/userland-fetch
--- a/components/Makefile	Wed Jan 05 13:27:53 2011 -0800
+++ b/components/Makefile	Fri Jan 14 13:12:28 2011 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2010, Oracle and/or it's affiliates.  All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../make-rules/shared-macros.mk
@@ -36,7 +36,7 @@
 	@$(BASS_O_MATIC) --workspace=$(WS_TOP) --components=paths \
 		| sed -e 's;^$(shell pwd)/;COMPONENT_DIRS += ;g' >[email protected]
 
-include components.mk
+-include components.mk
 
 
 download:		TARGET = download
@@ -98,6 +98,6 @@
 	@$(BASS_O_MATIC) --workspace=$(WS_TOP) --components=depend \
 		| sed -e 's;$(shell pwd)/;;g' >[email protected]
 
-include depends.mk
+-include depends.mk
 
 FORCE:
--- a/components/a2ps/Makefile	Wed Jan 05 13:27:53 2011 -0800
+++ b/components/a2ps/Makefile	Fri Jan 14 13:12:28 2011 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2010, Oracle and/or it's affiliates.  All rights reserved.
+# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 include ../../make-rules/shared-macros.mk
 
@@ -37,12 +37,10 @@
 include ../../make-rules/configure.mk
 include ../../make-rules/ips.mk
 
-CONFIGURE_OPTIONS  +=		--prefix=/usr
 CONFIGURE_OPTIONS  +=		--enable-shared
 CONFIGURE_OPTIONS  +=		--disable-static
 CONFIGURE_OPTIONS  +=		--sysconfdir=/etc/gnu
-CONFIGURE_OPTIONS  +=		--mandir=/usr/share/man
-CONFIGURE_OPTIONS  +=		--infodir=/usr/share/info
+CONFIGURE_OPTIONS  +=		--infodir=$(CONFIGURE_INFODIR)
 CONFIGURE_OPTIONS  +=		--with-medium=letter
 
 # because viewpathing isn't quite right in this version of a2ps
--- a/make-rules/configure.mk	Wed Jan 05 13:27:53 2011 -0800
+++ b/make-rules/configure.mk	Fri Jan 14 13:12:28 2011 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2010, 2011 Oracle and/or it's affiliates.  All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 
 #
@@ -45,20 +45,33 @@
 #
 # If component specific make targets need to be used for build or install, they
 # can be specified in
+
 #	COMPONENT_BUILD_TARGETS, COMPONENT_INSTALL_TARGETS
 #
 
 CONFIG_SHELL =	/bin/bash
 
+CONFIGURE_PREFIX =	/usr
+
+CONFIGURE_BINDIR.32 =	$(CONFIGURE_PREFIX)/bin
+CONFIGURE_BINDIR.64 =	$(CONFIGURE_PREFIX)/bin/$(MACH64)
+CONFIGURE_LIBDIR.32 =	$(CONFIGURE_PREFIX)/lib
+CONFIGURE_LIBDIR.64 =	$(CONFIGURE_PREFIX)/lib/$(MACH64)
+CONFIGURE_MANDIR =	$(CONFIGURE_PREFIX)/share/man
+CONFIGURE_LOCALEDIR =	$(CONFIGURE_PREFIX)/share/locale
+# all texinfo documentation seems to go to /usr/share/info no matter what
+CONFIGURE_INFODIR =	/usr/share/info
+
 CONFIGURE_ENV = CONFIG_SHELL="$(CONFIG_SHELL)"
 
-CONFIGURE_OPTIONS += --prefix=/usr
 CONFIGURE_OPTIONS += CC="$(CC)"
 CONFIGURE_OPTIONS += CXX="$(CCC)"
-CONFIGURE_OPTIONS.32 += --bindir=/usr/bin
-CONFIGURE_OPTIONS.32 += --libdir=/usr/lib
-CONFIGURE_OPTIONS.64 += --bindir=/usr/bin/$(MACH64)
-CONFIGURE_OPTIONS.64 += --libdir=/usr/lib/$(MACH64)
+CONFIGURE_OPTIONS += --prefix=$(CONFIGURE_PREFIX)
+CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
+CONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.$(BITS))
+CONFIGURE_OPTIONS += --libdir=$(CONFIGURE_LIBDIR.$(BITS))
+
+COMPONENT_INSTALL_ARGS +=	DESTDIR=$(PROTO_DIR)
 
 $(COMPONENT_SRC)/build-$(MACH32)/.configured:	BITS=32
 $(COMPONENT_SRC)/build-$(MACH64)/.configured:	BITS=64
@@ -89,6 +102,6 @@
 $(COMPONENT_SRC)/build-%/.installed:	$(COMPONENT_SRC)/build-%/.built
 	$(COMPONENT_PRE_INSTALL_ACTION)
 	(cd $(@D) ; $(ENV) $(COMPONENT_INSTALL_ENV) $(GMAKE) \
-			DESTDIR=$(PROTO_DIR) $(COMPONENT_INSTALL_TARGETS))
+			$(COMPONENT_INSTALL_ARGS) $(COMPONENT_INSTALL_TARGETS))
 	$(COMPONENT_POST_INSTALL_ACTION)
 	$(TOUCH) [email protected]
--- a/make-rules/setup.py.mk	Wed Jan 05 13:27:53 2011 -0800
+++ b/make-rules/setup.py.mk	Fri Jan 14 13:12:28 2011 -0800
@@ -18,16 +18,14 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2010, Oracle and/or it's affiliates.  All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 
 $(COMPONENT_SRC)/build-%-2.6/.built:		PYTHON_VERSION=2.6
-$(COMPONENT_SRC)/build-%-2.4/.built:		PYTHON_VERSION=2.4
 $(COMPONENT_SRC)/build-$(MACH32)-%/.built:	BITS=32
 $(COMPONENT_SRC)/build-$(MACH64)-%/.built:	BITS=64
 
 $(COMPONENT_SRC)/build-%-2.6/.installed:	PYTHON_VERSION=2.6
-$(COMPONENT_SRC)/build-%-2.4/.installed:	PYTHON_VERSION=2.4
 $(COMPONENT_SRC)/build-$(MACH32)-%/.installed:	BITS=32
 $(COMPONENT_SRC)/build-$(MACH64)-%/.installed:	BITS=64
 
--- a/make-rules/shared-macros.mk	Wed Jan 05 13:27:53 2011 -0800
+++ b/make-rules/shared-macros.mk	Fri Jan 14 13:12:28 2011 -0800
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2010, Oracle and/or it's affiliates.  All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 
 PATH=/usr/bin:/usr/gnu/bin
@@ -42,7 +42,7 @@
 COMPILER =		studio
 BITS =			32
 PYTHON_VERSION =	2.6
-PYTHON_VERSIONS =	2.4 2.6
+PYTHON_VERSIONS =	2.6
 
 WS_LOGS =	$(WS_TOP)/logs
 WS_REPO =	$(WS_TOP)/repo
@@ -113,9 +113,6 @@
 
 LD =		/usr/bin/ld
 
-PYTHON.2.4.32 =	/usr/bin/python2.4
-PYTHON.2.4.64 =	/usr/bin/$(MACH64)/python2.4
-
 PYTHON.2.6.32 =	/usr/bin/python2.6
 PYTHON.2.6.64 =	/usr/bin/$(MACH64)/python2.6
 
--- a/tools/userland-fetch	Wed Jan 05 13:27:53 2011 -0800
+++ b/tools/userland-fetch	Fri Jan 14 13:12:28 2011 -0800
@@ -19,7 +19,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2010, Oracle and/or it's affiliates.  All rights reserved.
+# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 #
 # fetch.py - a file download utility
@@ -41,10 +41,7 @@
 	except IOError:
 		return False
 
-	if (hash == None):
-		return True
-
-	algorithm, value = hash.split(':')
+	algorithm, hashvalue = hash.split(':')
 	try:
 		m = hashlib.new(algorithm)
 	except ValueError:
@@ -56,7 +53,7 @@
 		if block == '':
 			break
 
-	return m.hexdigest() == value
+	return "%s:%s" % (algorithm, m.hexdigest())
 
 def download(url, filename = None):
 	src = None
@@ -158,30 +155,37 @@
 
 		if scheme in [ None, 'file' ]:
 			if os.path.exists(path) == False:
-				print "not found, skipping"
+				print "not found, skipping file copy"
 				continue
 			elif name != path:
 				if link_arg == False:
-					print "copying...",
+					print "\n    copying..."
 					shutil.copy2(path, name)
 				else:
-					print "linking...",
+					print "\n    linking..."
 					os.symlink(path, name)
 			else:
 				pass
 		elif scheme in [ 'http', 'https', 'ftp' ]:
-			print "downloading...",
+			print "\n    downloading...",
 			name = download(url, file_arg)
 			if name == None:
 				print "failed"
 				continue
 
-		print "validating...",
-		if validate(name, hash_arg):
+		print "\n    validating...",
+		if hash_arg == None:
+			print "skipping (no hash)"
+			sys.exit(0)
+			
+		realhash = validate(name, hash_arg)
+		if realhash == hash_arg:
 			print "ok"
 			sys.exit(0)
 		else:
-			print "corrupt"
+			print "corruption detected"
+			print "    expected: %s" % hash_arg
+			print "    actual:   %s" % realhash
 
 		try:
 			os.remove(name)