Bug 173299 - [exp-run] test bmake conversion
Summary: [exp-run] test bmake conversion
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Simon J. Gerraty
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-02 19:20 UTC by Simon J. Gerraty
Modified: 2013-05-28 02:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon J. Gerraty freebsd_committer freebsd_triage 2012-11-02 19:20:00 UTC
	
Can we please get a ports exp-run, to test the effectiveness of the
bmake conversion.

The "patch" is a script in a tarball on freefall in
~sjg/ports2bmake.tar.gz

How-To-Repeat: 	

untar ports2bmake.tar.gz 
run the script either in ports or with arg pointing to it
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-11-02 19:28:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->linimon

take.
Comment 2 Simon J. Gerraty 2012-12-04 16:10:32 UTC
FYI I have updated ~sjg/ports2bmake.tar.gz on freefall.
Smoke tested on a clean 7.4-RELEASE install.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2013-02-20 05:19:37 UTC
State Changed
From-To: open->open

I am no longer in a position to test this. 


Comment 4 Mark Linimon freebsd_committer freebsd_triage 2013-02-20 05:19:37 UTC
Responsible Changed
From-To: linimon->portmgr
Comment 5 Simon J. Gerraty 2013-04-09 19:48:23 UTC
FYI I just re-tested 

http://people.freebsd.org/~sjg/ports2bmake.tar.gz

on ports tree updated today (r315771).
Comment 6 Baptiste Daroussin freebsd_committer freebsd_triage 2013-04-30 07:21:33 UTC
This method won't fit any of the clean builder correctly.

First it will require to rebuild bmake prior to each package building which
will bring an important overhead.
Second, on the builders like pointyhat and poudriere the network is not
available except for make fetch phase, and only the distfiles specified by
the port we are trying to build are available.
Meaning that building bmake will fail.

regards,
Bapt
Comment 7 Simon J. Gerraty 2013-04-30 19:20:26 UTC
>This method won't fit any of the clean builder correctly.

For the setup you describe, it does not sound like anything outside of
the base OS can work?

Is it unreasonable to suggest that people who want to operate in the way
you describe, should first install bmake in /usr/bin ?
Once bmake is available (in /usr/bin or /usr/local/bin), ports should
"just work".

The automatic fetch/install of bmake is to help normal ports users on
older releases.
Systems like pointyhat - are not exactly "normal" ?

Thanks
--sjg
Comment 8 dfilter service freebsd_committer freebsd_triage 2013-05-02 00:58:46 UTC
Author: sjg
Date: Wed May  1 23:58:39 2013
New Revision: 250164
URL: http://svnweb.freebsd.org/changeset/base/250164

Log:
  Local hack to allow smooth transition for ports.
  bsd.port.mk can set .MAKE.FreeBSD_UL=yes
  to cause :L and :U to have their old behavior.
  This should be reverted when 8.3 is EOL.
  
  PR:		173299
  Reviewed by:	obrien

Modified:
  head/contrib/bmake/var.c

Modified: head/contrib/bmake/var.c
==============================================================================
--- head/contrib/bmake/var.c	Wed May  1 23:04:29 2013	(r250163)
+++ head/contrib/bmake/var.c	Wed May  1 23:58:39 2013	(r250164)
@@ -140,6 +140,17 @@ __RCSID("$NetBSD: var.c,v 1.173 2013/02/
 #include    "job.h"
 
 /*
+ * XXX transition hack for FreeBSD ports.
+ * bsd.port.mk can set .MAKE.FreeBSD_UL=yes
+ * to cause us to treat :[LU] as aliases for :t[lu]
+ * To be reverted when ports converts to :t[lu] (when 8.3 is EOL)
+ */
+#define MAKE_FREEBSD_UL ".MAKE.FreeBSD_UL"
+#ifdef MAKE_FREEBSD_UL
+static int FreeBSD_UL = FALSE;
+#endif
+
+/*
  * This lets us tell if we have replaced the original environ
  * (which we cannot free).
  */
@@ -965,6 +976,11 @@ Var_Set(const char *name, const char *va
 	setenv(MAKE_LEVEL_SAFE, tmp, 1);
 #endif
     }
+#ifdef MAKE_FREEBSD_UL
+    if (strcmp(MAKE_FREEBSD_UL, name) == 0) {
+	FreeBSD_UL = getBoolean(MAKE_FREEBSD_UL, FALSE);
+    }
+#endif
 	
 	
  out:
@@ -2660,8 +2676,24 @@ ApplyModifiers(char *nstr, const char *t
 		free(loop.str);
 		break;
 	    }
-	case 'D':
 	case 'U':
+#ifdef MAKE_FREEBSD_UL
+	    if (FreeBSD_UL) {
+		int nc = tstr[1];
+
+		/* we have to be careful, since :U is used internally */
+		if (nc == ':' || nc == endc) {
+		    char *dp = bmake_strdup(nstr);
+		    for (newStr = dp; *dp; dp++)
+			*dp = toupper((unsigned char)*dp);
+		    cp = tstr + 1;
+		    termc = *cp;
+		    break;		/* yes inside the conditional */
+		}
+		/* FALLTHROUGH */
+	    }
+#endif
+	case 'D':
 	    {
 		Buffer  buf;    	/* Buffer for patterns */
 		int	    wantit;	/* want data in buffer */
@@ -2721,6 +2753,17 @@ ApplyModifiers(char *nstr, const char *t
 		break;
 	    }
 	case 'L':
+#ifdef MAKE_FREEBSD_UL
+	    if (FreeBSD_UL) {
+		char *dp = bmake_strdup(nstr);
+		for (newStr = dp; *dp; dp++)
+		    *dp = tolower((unsigned char)*dp);
+		cp = tstr + 1;
+		termc = *cp;
+		break;
+	    }
+	    /* FALLTHROUGH */
+#endif
 	    {
 		if ((v->flags & VAR_JUNK) != 0)
 		    v->flags |= VAR_KEEP;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 9 Baptiste Daroussin freebsd_committer freebsd_triage 2013-05-02 23:28:49 UTC
Responsible Changed
From-To: portmgr->bapt

Taken for exp-run on recent current with make(1) being bmake(1)
Comment 10 dfilter service freebsd_committer freebsd_triage 2013-05-04 14:07:45 UTC
Author: trociny (src committer)
Date: Sat May  4 13:07:38 2013
New Revision: 317313
URL: http://svnweb.freebsd.org/changeset/ports/317313

Log:
  Add a local hack from base (r250164) to allow smooth transition for
  ports: bsd.port.mk can set .MAKE.FreeBSD_UL=yes to cause :L and :U
  to have their old behavior.
  
  The change is not planned to upstream, thus added as a patch.  This
  should be reverted when 8.3 is EOL.
  
  Suggested by:	bapt
  Discussed with:	sjg
  PR:		ports/173299
  Approved by:	bapt

Added:
  head/devel/bmake/files/
  head/devel/bmake/files/patch-var.c   (contents, props changed)
Modified:
  head/devel/bmake/Makefile

Modified: head/devel/bmake/Makefile
==============================================================================
--- head/devel/bmake/Makefile	Sat May  4 12:52:28 2013	(r317312)
+++ head/devel/bmake/Makefile	Sat May  4 13:07:38 2013	(r317313)
@@ -3,6 +3,7 @@
 
 PORTNAME=	bmake
 PORTVERSION=	20130330
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	ftp://ftp.netbsd.org/pub/NetBSD/misc/sjg/ \
 		http://www.gtlib.cc.gatech.edu/pub/NetBSD/misc/sjg/ \

Added: head/devel/bmake/files/patch-var.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/bmake/files/patch-var.c	Sat May  4 13:07:38 2013	(r317313)
@@ -0,0 +1,87 @@
+------------------------------------------------------------------------
+r250164 | sjg | 2013-05-02 02:58:39 +0300 (Thu, 02 May 2013) | 8 lines
+
+Local hack to allow smooth transition for ports.
+bsd.port.mk can set .MAKE.FreeBSD_UL=yes
+to cause :L and :U to have their old behavior.
+This should be reverted when 8.3 is EOL.
+
+PR:		173299
+Reviewed by:	obrien
+
+--- var.c.orig	2013-03-04 03:01:57.000000000 +0200
++++ var.c	2013-05-04 10:28:21.832274582 +0300
+@@ -140,6 +140,17 @@ __RCSID("$NetBSD: var.c,v 1.173 2013/02/
+ #include    "job.h"
+ 
+ /*
++ * XXX transition hack for FreeBSD ports.
++ * bsd.port.mk can set .MAKE.FreeBSD_UL=yes
++ * to cause us to treat :[LU] as aliases for :t[lu]
++ * To be reverted when ports converts to :t[lu] (when 8.3 is EOL)
++ */
++#define MAKE_FREEBSD_UL ".MAKE.FreeBSD_UL"
++#ifdef MAKE_FREEBSD_UL
++static int FreeBSD_UL = FALSE;
++#endif
++
++/*
+  * This lets us tell if we have replaced the original environ
+  * (which we cannot free).
+  */
+@@ -965,6 +976,11 @@ Var_Set(const char *name, const char *va
+ 	setenv(MAKE_LEVEL_SAFE, tmp, 1);
+ #endif
+     }
++#ifdef MAKE_FREEBSD_UL
++    if (strcmp(MAKE_FREEBSD_UL, name) == 0) {
++	FreeBSD_UL = getBoolean(MAKE_FREEBSD_UL, FALSE);
++    }
++#endif
+ 	
+ 	
+  out:
+@@ -2660,8 +2676,24 @@ ApplyModifiers(char *nstr, const char *t
+ 		free(loop.str);
+ 		break;
+ 	    }
+-	case 'D':
+ 	case 'U':
++#ifdef MAKE_FREEBSD_UL
++	    if (FreeBSD_UL) {
++		int nc = tstr[1];
++
++		/* we have to be careful, since :U is used internally */
++		if (nc == ':' || nc == endc) {
++		    char *dp = bmake_strdup(nstr);
++		    for (newStr = dp; *dp; dp++)
++			*dp = toupper((unsigned char)*dp);
++		    cp = tstr + 1;
++		    termc = *cp;
++		    break;		/* yes inside the conditional */
++		}
++		/* FALLTHROUGH */
++	    }
++#endif
++	case 'D':
+ 	    {
+ 		Buffer  buf;    	/* Buffer for patterns */
+ 		int	    wantit;	/* want data in buffer */
+@@ -2721,6 +2753,17 @@ ApplyModifiers(char *nstr, const char *t
+ 		break;
+ 	    }
+ 	case 'L':
++#ifdef MAKE_FREEBSD_UL
++	    if (FreeBSD_UL) {
++		char *dp = bmake_strdup(nstr);
++		for (newStr = dp; *dp; dp++)
++		    *dp = tolower((unsigned char)*dp);
++		cp = tstr + 1;
++		termc = *cp;
++		break;
++	    }
++	    /* FALLTHROUGH */
++#endif
+ 	    {
+ 		if ((v->flags & VAR_JUNK) != 0)
+ 		    v->flags |= VAR_KEEP;
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 11 Baptiste Daroussin freebsd_committer freebsd_triage 2013-05-05 23:11:51 UTC
The ports tree on current is still in very bad shape but I don't see
anymore errors due to bmake specifically.

You have my approval as portmgr to switch base make to bmake.

regards,
Bapt
Comment 12 Baptiste Daroussin freebsd_committer freebsd_triage 2013-05-05 23:13:02 UTC
Responsible Changed
From-To: bapt->sjg

portmgr approved
Comment 13 Simon J. Gerraty 2013-05-06 05:16:00 UTC
Thanks very much for your help.

>You have my approval as portmgr to switch base make to bmake.
Comment 14 Simon J. Gerraty freebsd_committer freebsd_triage 2013-05-28 02:50:12 UTC
State Changed
From-To: open->closed

Done