Subject: Is the Solaris /bin/sh still considered supported by pkgsrc?
To: tech-pkg@NetBSD.org <tech-pkg@NetBSD.org>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 11/23/2007 12:32:14
This is a multi-part message in MIME format.
--------------000904090401040506030803
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
on Solaris, the current pkgsrc bootstrap uses a reasonable shell for
bmake. We have a lot of code in pkgsrc that looks very ugly just because
we support the Solaris /bin/sh. I would like to clean that up. But
before, we must be sure that no-one is using the Solaris /bin/sh
anymore. The appended patch does exactly this.
Any objections?
When the patch gets committed, we must make sure that bootstrapping
works over an already installed pkgsrc installation. Currently it doesn't:
...
===> Installing for bootstrap-mk-files-20071104
ERROR: bootstrap-mk-files-20070810 is already installed - perhaps an
older version?
Roland
--------------000904090401040506030803
Content-Type: text/x-patch;
name="common.mk.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="common.mk.patch"
Index: common.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/misc/common.mk,v
retrieving revision 1.3
diff -u -p -r1.3 common.mk
--- common.mk 13 Oct 2007 11:04:19 -0000 1.3
+++ common.mk 23 Nov 2007 11:06:52 -0000
@@ -43,6 +43,15 @@ _PKG_DEBUG_SCRIPT= ${SH} -x
RUN= ${_PKG_SILENT}${_PKG_DEBUG} set -e;
+# get rid of any remaining /bin/sh users
+.if ${OPSYS} == "SunOS"
+_SOLARIS_BIN_SH!= (eval "f=prefixok; echo \$${f\#prefix}" 2>/dev/null) || echo "fail"
+. if ${_SOLARIS_BIN_SH} == "fail"
+PKG_FAIL_REASON+= "[common.mk] The Solaris /bin/sh is not supported anymore."
+PKG_FAIL_REASON+= "[common.mk] Please bootstrap pkgsrc again."
+. endif
+.endif
+
.if make(help)
.include "../help/help.mk"
.endif
--------------000904090401040506030803--