From neuhauser@chello.cz Thu May 6 16:59:34 2004 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E18516A4CE for ; Thu, 6 May 2004 16:59:34 -0700 (PDT) Received: from smtp.dkm.cz (smtp.dkm.cz [62.24.64.34]) by mx1.FreeBSD.org (Postfix) with SMTP id B855043D46 for ; Thu, 6 May 2004 16:59:32 -0700 (PDT) (envelope-from neuhauser@chello.cz) Received: (qmail 85839 invoked by uid 0); 6 May 2004 23:59:31 -0000 Received: from r3al16.mistral.cz (HELO isis.wad.cz) (213.220.229.16) by smtp.dkm.cz with SMTP; 6 May 2004 23:59:31 -0000 Received: by isis.wad.cz (Postfix, from userid 1001) id 073A82FDA01; Fri, 7 May 2004 01:59:31 +0200 (CEST) Message-Id: <20040506235931.073A82FDA01@isis.wad.cz> Date: Fri, 7 May 2004 01:59:31 +0200 (CEST) From: Roman Neuhauser Reply-To: Roman Neuhauser To: FreeBSD-gnats-submit@freebsd.org Cc: Subject: [PATCH] fix ECHO_MSG breakage in java ports X-Send-Pr-Version: 3.113 X-GNATS-Notify: >Number: 66342 >Category: ports >Synopsis: [PATCH] fix ECHO_MSG breakage in java ports >Confidential: no >Severity: non-critical >Priority: low >Responsible: portmgr >State: suspended >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu May 06 17:00:31 PDT 2004 >Closed-Date: >Last-Modified: Mon Jan 2 20:30:13 UTC 2012 >Originator: Roman Neuhauser >Release: FreeBSD 4.9-RELEASE-p2 i386 >Organization: >Environment: System: FreeBSD isis.wad.cz 4.9-RELEASE-p2 FreeBSD 4.9-RELEASE-p2 #3: Sun Mar 7 02:11:16 CET 2004 root@isis.wad.cz:/usr/obj/usr/src/sys/FREEPUPPY2_6 i386 >Description: several ports in the java category set ECHO_MSG=printf to display formatted IGNORE variables with embedded \n escapes, but ECHO_MSG redefinition breaks other uses. they should probably redefine IGNORECMD instead. >How-To-Repeat: cd /usr/ports/java/shujit && make clean >Fix: --- ports::java-IGNORE_CMD.patch begins here --- Index: java/diablo-jdk13/Makefile =================================================================== RCS file: /home/ncvs/ports/java/diablo-jdk13/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- java/diablo-jdk13/Makefile 4 Feb 2004 05:21:26 -0000 1.6 +++ java/diablo-jdk13/Makefile 6 May 2004 21:14:44 -0000 @@ -65,7 +65,7 @@ .endif .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ Because of licensing restrictions, you must fetch the distribution\n\ manually. Please access\n\ Index: java/diablo-jre13/Makefile =================================================================== RCS file: /home/ncvs/ports/java/diablo-jre13/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- java/diablo-jre13/Makefile 4 Feb 2004 05:21:26 -0000 1.6 +++ java/diablo-jre13/Makefile 6 May 2004 21:14:44 -0000 @@ -65,7 +65,7 @@ .endif .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ Because of licensing restrictions, you must fetch the distribution\n\ manually. Please access\n\ Index: java/jdk12/Makefile =================================================================== RCS file: /home/ncvs/ports/java/jdk12/Makefile,v retrieving revision 1.32 diff -u -r1.32 Makefile --- java/jdk12/Makefile 6 Feb 2004 16:49:54 -0000 1.32 +++ java/jdk12/Makefile 6 May 2004 21:14:44 -0000 @@ -80,7 +80,7 @@ # Check for patchset .if !exists(${DISTDIR}/${PATCHSETFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ The source distribution exists on your system, but due to\n\ licensing restrictions you still need to download the\n\ @@ -91,7 +91,7 @@ # Check for JDK sources .if !exists(${DISTDIR}/${SRCFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ Because of licensing restrictions, you must fetch the source distribution\n\ manually. Please access http://www.sun.com/software/java2/download.html\n\ Index: java/jdk13/Makefile =================================================================== RCS file: /home/ncvs/ports/java/jdk13/Makefile,v retrieving revision 1.75 diff -u -r1.75 Makefile --- java/jdk13/Makefile 6 Feb 2004 17:03:09 -0000 1.75 +++ java/jdk13/Makefile 6 May 2004 21:14:44 -0000 @@ -145,7 +145,7 @@ # Check for patchset .if !exists(${DISTDIR}/${PATCHSETFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ The source distribution exists on your system, but due to\n\ licensing restrictions you still need to download the\n\ @@ -156,7 +156,7 @@ # Check for JDK sources .if !exists(${DISTDIR}/${SRCFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ Because of licensing restrictions, you must fetch the source distribution\n\ manually. Please access http://www.sun.com/software/java2/download.html\n\ @@ -170,7 +170,7 @@ # HotSpot and/or native threads require a recent version of FreeBSD .if ( defined(WITH_NATIVE_THREADS) || defined(WITH_HOTSPOT) ) && ( ${OSVERSION} < 470101 || ( ${OSVERSION} >= 500000 && ${OSVERSION} < 500043 ) ) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ You must have a version of FreeBSD later than 4.7-STABLE February 2003\n\ or 5-CURRENT February 2003 to use either native threads or HotSpot.\n Index: java/jdk14/Makefile =================================================================== RCS file: /home/ncvs/ports/java/jdk14/Makefile,v retrieving revision 1.78 diff -u -r1.78 Makefile --- java/jdk14/Makefile 5 Mar 2004 13:43:40 -0000 1.78 +++ java/jdk14/Makefile 6 May 2004 21:14:44 -0000 @@ -137,7 +137,7 @@ # Check for JDK sources .if !exists(${DISTDIR}/${SCSL_SRCFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ Because of licensing restrictions, you must fetch the source distribution\n\ manually. Please access http://www.sun.com/software/java2/download.html\n\ @@ -149,7 +149,7 @@ ${DISTDIR}.\n .endif .if !exists(${DISTDIR}/${SCSL_BINFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ Because of licensing restrictions, you must fetch the source distribution\n\ manually. Please access http://www.sun.com/software/java2/download.html\n\ @@ -163,7 +163,7 @@ # Check for patchset .if !exists(${DISTDIR}/${PATCHSETFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ The source distribution exists on your system, but due to\n\ licensing restrictions you still need to download the\n\ Index: java/jmf/Makefile =================================================================== RCS file: /home/ncvs/ports/java/jmf/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- java/jmf/Makefile 9 Feb 2004 16:22:27 -0000 1.1 +++ java/jmf/Makefile 6 May 2004 21:14:44 -0000 @@ -36,7 +36,7 @@ # Check for JMF sources .if !exists(${DISTDIR}/${DISTFILES}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ Because of licensing restrictions, you must fetch the source distribution\n\ manually. Please access:\n\ Index: java/linux-ibm-jdk14/Makefile =================================================================== RCS file: /home/ncvs/ports/java/linux-ibm-jdk14/Makefile,v retrieving revision 1.8 diff -u -r1.8 Makefile --- java/linux-ibm-jdk14/Makefile 15 Apr 2004 22:55:14 -0000 1.8 +++ java/linux-ibm-jdk14/Makefile 6 May 2004 21:14:44 -0000 @@ -39,7 +39,7 @@ .include .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE=:\n\ Because of licensing restrictions, you must manually fetch the IBM Java SDK\n\ ${JDK_VERSION} for Linux archive (${DISTNAME}${EXTRACT_SUFX}). Please access\n\ Index: java/poseidon/Makefile =================================================================== RCS file: /home/ncvs/ports/java/poseidon/Makefile,v retrieving revision 1.2 diff -u -r1.2 Makefile --- java/poseidon/Makefile 9 Apr 2004 21:48:02 -0000 1.2 +++ java/poseidon/Makefile 6 May 2004 21:14:44 -0000 @@ -25,7 +25,7 @@ .include .if !exists(${DISTDIR}/${DISTFILES}) -ECHO_MSG=/usr/bin/printf +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." IGNORE= :\n\ Because of licensing restrictions, you must fetch the source distribution\n\ manually. Please access http://www.gentleware.com/products/download.php4\n\ --- ports::java-IGNORE_CMD.patch ends here --- >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-ports-bugs->java Responsible-Changed-By: arved Responsible-Changed-When: Tue May 11 08:25:44 PDT 2004 Responsible-Changed-Why: Over to java Mailinglist for evaluation. http://www.freebsd.org/cgi/query-pr.cgi?pr=66342 From: Herve Quiroz To: freebsd-gnats-submit@FreeBSD.org, neuhauser@chello.cz Cc: Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Wed, 12 May 2004 12:33:39 +0200 --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Roman, I recently tried to find a fix for this problem. I agree IGNORECMD has to be changed to something else but with your patch the following page still has problem: http://www.freshports.org/ports-ignore.php BTW, Java ports are not the only ones who use printf(1) (and '\n') so I think there should be something right in bsd.port.mk that would pretty-format things when needed. This solution (modifying bsd.port.mk) would benefit to other ports, such as audio/gnump3d, databases/msql, games/linux-q3ademo... Attached is a patch I sent to Alexey lately. It's a bit of sed(1) magic to justify output. I've got some problem with sed(1) when invoked from make(1). That's why there are two lines added in bsd.port.mk: - The first one is the "correct" regular expression but it doesn't work (that's why it is commented). - The second is some kind of cheat, replacing '\n' by '%' in the regular expression, and then filtering through tr(1) to produce 'n'. This is quite ugly if you ask me but it works. BTW, if you know how to make sed works in make, please tell me... it's not the first time I'm struck with such an issue. I only provide a patch for java/jdk14 as this is just an example to illustrate my comments. Please tell me what you think of this. Herve --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bsd.port.mk.diff" --- bsd.port.mk.original Mon Apr 26 16:21:59 2004 +++ bsd.port.mk Mon Apr 26 16:48:13 2004 @@ -2577,7 +2577,8 @@ .if defined(IGNORE_SILENT) IGNORECMD= ${DO_NADA} .else -IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." +#IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." | ${SED} 's/ */ /g ; s/[^ ]$$/ / ; s/.\{1,80\} /&\n/g' +IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." | ${SED} 's/ */ /g ; s/[^ ]$$/ / ; s/.\{1,80\} /&%/g' | ${TR} "%" "\n" .endif .for target in check-sanity fetch checksum extract patch configure all build install reinstall package --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="Makefile.diff" --- Makefile.original Mon Apr 26 17:06:50 2004 +++ Makefile Mon Apr 26 17:05:53 2004 @@ -137,39 +137,39 @@ # Check for JDK sources .if !exists(${DISTDIR}/${SCSL_SRCFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf -IGNORE= :\n\ -Because of licensing restrictions, you must fetch the source distribution\n\ -manually. Please access http://www.sun.com/software/java2/download.html\n\ -with a web browser and follow the \"Download\" link for the\n\ -\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register,\n\ -but you can create an account on this page. After registration and\n\ -accepting the Sun Community Source License, select \"J2SESDK\" and\n\ -download the source file, ${SCSL_SRCFILE}. Please place this file in\n\ -${DISTDIR}.\n +#ECHO_MSG=/usr/bin/printf +IGNORE= : \ +Because of licensing restrictions, you must fetch the source distribution \ +manually. Please access http://www.sun.com/software/java2/download.html \ +with a web browser and follow the \"Download\" link for the \ +\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register, \ +but you can create an account on this page. After registration and \ +accepting the Sun Community Source License, select \"J2SESDK\" and \ +download the source file, ${SCSL_SRCFILE}. Please place this file in \ +${DISTDIR}. .endif .if !exists(${DISTDIR}/${SCSL_BINFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf -IGNORE= :\n\ -Because of licensing restrictions, you must fetch the source distribution\n\ -manually. Please access http://www.sun.com/software/java2/download.html\n\ -with a web browser and follow the \"Download\" link for the\n\ -\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register,\n\ -but you can create an account on this page. After registration and\n\ -accepting the Sun Community Source License, select \"J2SESDK\" and\n\ -download the source file, ${SCSL_BINFILE}. Please place this file in\n\ -${DISTDIR}.\n +#ECHO_MSG=/usr/bin/printf +IGNORE= : \ +Because of licensing restrictions, you must fetch the source distribution \ +manually. Please access http://www.sun.com/software/java2/download.html \ +with a web browser and follow the \"Download\" link for the \ +\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register, \ +but you can create an account on this page. After registration and \ +accepting the Sun Community Source License, select \"J2SESDK\" and \ +download the source file, ${SCSL_BINFILE}. Please place this file in \ +${DISTDIR}. .endif # Check for patchset .if !exists(${DISTDIR}/${PATCHSETFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf -IGNORE= :\n\ -The source distribution exists on your system, but due to\n\ -licensing restrictions you still need to download the\n\ -patchset, ${PATCHSETFILE}, from\n\ -http://www.eyesbeyond.com/freebsddom/java/jdk14.html.\n\ -Please place the patchset in ${DISTDIR}.\n +#ECHO_MSG=/usr/bin/printf +IGNORE= : \ +The source distribution exists on your system, but due to \ +licensing restrictions you still need to download the \ +patchset, ${PATCHSETFILE}, from \ +http://www.eyesbeyond.com/freebsddom/java/jdk14.html. \ +Please place the patchset in ${DISTDIR}. .endif # JDK 1.4.2 require recent version of FreeBSD due to recent libc_r updates. --rwEMma7ioTxnRzrJ-- From: Roman Neuhauser To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Wed, 12 May 2004 15:06:41 +0200 # herve.quiroz@esil.univ-mrs.fr / 2004-05-12 12:33:39 +0200: > Roman, > > I recently tried to find a fix for this problem. I agree IGNORECMD has > to be changed to something else but with your patch the following page > still has problem: > > http://www.freshports.org/ports-ignore.php what kind of problem? you don't tell me what I should be looking for. > This solution (modifying bsd.port.mk) would benefit to other ports, such > as audio/gnump3d, databases/msql, games/linux-q3ademo... > > Attached is a patch I sent to Alexey lately. It's a bit of sed(1) magic > to justify output. I've got some problem with sed(1) when invoked from > make(1). That's why there are two lines added in bsd.port.mk: > > - The first one is the "correct" regular expression but it doesn't work > (that's why it is commented). right. you can't use the "\n" escape in replacement in the s command. > - The second is some kind of cheat, replacing '\n' by '%' in the regular > expression, and then filtering through tr(1) to produce 'n'. This is > quite ugly if you ask me but it works. it breaks ports whose IGNORE variable contains %. > --- bsd.port.mk.original Mon Apr 26 16:21:59 2004 > +++ bsd.port.mk Mon Apr 26 16:48:13 2004 > @@ -2577,7 +2577,8 @@ > .if defined(IGNORE_SILENT) > IGNORECMD= ${DO_NADA} > .else > -IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." > +#IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." | ${SED} 's/ */ /g ; s/[^ ]$$/ / ; s/.\{1,80\} /&\n/g' > +IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." | ${SED} 's/ */ /g ; s/[^ ]$$/ / ; s/.\{1,80\} /&%/g' | ${TR} "%" "\n" > .endif > > .for target in check-sanity fetch checksum extract patch configure all build install reinstall package another problem is that the third subst, if it worked, would break long lines inside words, and would not reflow the text, producing short line overflows. moreover, this patch, goes against my recent push to reduce unnecessary commands in ${PORTSDIR}/Mk/*, so I guess it's not surprising I'm not terribly excited. -- FreeBSD 4.9-RELEASE-p2 1:25PM up 1 day, 5:46, 4 users, load averages: 0.00, 0.00, 0.00 Responsible-Changed-From-To: java->freebsd-java Responsible-Changed-By: linimon Responsible-Changed-When: Mon May 17 13:18:51 PDT 2004 Responsible-Changed-Why: Rationalize assignments of java items http://www.freebsd.org/cgi/query-pr.cgi?pr=66342 Responsible-Changed-From-To: freebsd-java->portmgr Responsible-Changed-By: linimon Responsible-Changed-When: Fri May 28 12:21:12 PDT 2004 Responsible-Changed-Why: Actually, this problem is generic to any port that wants to set a multiline IGNORE message -- and these are almost all ports that need to be fetched manually. So this is really something that needs to be fixed in bsd.port.mk. The patch below attempts to be the dullest solution to the problem, but I do not know if/how it will affect FreshPorts. I have included the output from java/jmf if this patch is used. Kris has indicated that he wants to rethink the IGNORE/NO_PACKAGE strategy, so he is the obvious one to look at either this short-term hack or a "real" solution. Index: bsd.port.mk =================================================================== RCS file: /home/FreeBSD/pcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.488 diff -u -r1.488 bsd.port.mk --- bsd.port.mk 19 Apr 2004 23:39:52 -0000 1.488 +++ bsd.port.mk 28 May 2004 19:16:26 -0000 @@ -2577,7 +2595,7 @@ .if defined(IGNORE_SILENT) IGNORECMD= ${DO_NADA} .else -IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." +IGNORECMD= ${PRINTF} "===> ${PKGNAME} ${IGNORE}." .endif .for target in check-sanity fetch checksum extract patch configure all build install reinstall package ------- the result: $ make install ===> jmf-2.1.1e : Because of licensing restrictions, you must fetch the source distribution manually. Please access: http://java.sun.com/products/java-media/jmf/2.1.1/download.html with a web browser and follow the "Download JMF 2.1.1e" link Select download format: cross-platform format Please place this file in /home/pcvs/ports/distfiles. .$ not optimal, but not dreadful. http://www.freebsd.org/cgi/query-pr.cgi?pr=66342 From: Herve Quiroz To: freebsd-gnats-submit@freebsd.org, neuhauser@chello.cz Cc: linimon@freebsd.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Wed, 3 Nov 2004 14:41:51 +0100 Mark, What about using fmt(1) for such purpose? For instance it would ease the life of maintainers as they would not need to justify the text by hand. This task is indeed complex when using variables such as ${DISTDIR} and the like as their length may change depending on user configuration. BTW, I noticed that fmt is already used in bsd.port.mk to display CONFIGURE_FAIL_MESSAGE. Here is a patch for bsd.port.mk to implement this and a patch for java/jdk14 to test it (the same as I already submitted actually). Herve Index: bsd.port.mk =================================================================== RCS file: /var/fcvs/ports/Mk/bsd.port.mk,v retrieving revision 1.499 diff -u -r1.499 bsd.port.mk --- bsd.port.mk 7 Oct 2004 17:59:18 -0000 1.499 +++ bsd.port.mk 3 Nov 2004 13:22:05 -0000 @@ -2644,7 +2644,7 @@ .if defined(IGNORE_SILENT) IGNORECMD= ${DO_NADA} .else -IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." +IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." | /usr/bin/fmt 75 79 .endif .for target in check-sanity fetch checksum extract patch configure all build install reinstall package Index: Makefile =================================================================== RCS file: /var/fcvs/ports/java/jdk14/Makefile,v retrieving revision 1.81 diff -u -r1.81 Makefile --- Makefile 20 Oct 2004 23:22:55 -0000 1.81 +++ Makefile 3 Nov 2004 13:34:29 -0000 @@ -138,39 +138,36 @@ # Check for JDK sources .if !exists(${DISTDIR}/${SCSL_SRCFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf -IGNORE= :\n\ -Because of licensing restrictions, you must fetch the source distribution\n\ -manually. Please access http://www.sun.com/software/java2/download.html\n\ -with a web browser and follow the \"Download\" link for the\n\ -\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register,\n\ -but you can create an account on this page. After registration and\n\ -accepting the Sun Community Source License, select \"J2SESDK\" and\n\ -download the source file, ${SCSL_SRCFILE}. Please place this file in\n\ -${DISTDIR}.\n +IGNORE= :\ +Because of licensing restrictions, you must fetch the source distribution\ +manually. Please access http://www.sun.com/software/java2/download.html\ +with a web browser and follow the \"Download\" link for the\ +\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register,\ +but you can create an account on this page. After registration and\ +accepting the Sun Community Source License, select \"J2SESDK\" and\ +download the source file, ${SCSL_SRCFILE}. Please place this file in\ +${DISTDIR}. .endif .if !exists(${DISTDIR}/${SCSL_BINFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf -IGNORE= :\n\ -Because of licensing restrictions, you must fetch the source distribution\n\ -manually. Please access http://www.sun.com/software/java2/download.html\n\ -with a web browser and follow the \"Download\" link for the\n\ -\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register,\n\ -but you can create an account on this page. After registration and\n\ -accepting the Sun Community Source License, select \"J2SESDK\" and\n\ -download the source file, ${SCSL_BINFILE}. Please place this file in\n\ -${DISTDIR}.\n +IGNORE= :\ +Because of licensing restrictions, you must fetch the source distribution\ +manually. Please access http://www.sun.com/software/java2/download.html\ +with a web browser and follow the \"Download\" link for the\ +\"Java(TM) SDK ${JDK_VERSION}\". You will be required to log in and register,\ +but you can create an account on this page. After registration and\ +accepting the Sun Community Source License, select \"J2SESDK\" and\ +download the source file, ${SCSL_BINFILE}. Please place this file in\ +${DISTDIR}. .endif # Check for patchset .if !exists(${DISTDIR}/${PATCHSETFILE}) && !defined(PACKAGE_BUILDING) -ECHO_MSG=/usr/bin/printf -IGNORE= :\n\ -The source distribution exists on your system, but due to\n\ -licensing restrictions you still need to download the\n\ -patchset, ${PATCHSETFILE}, from\n\ -http://www.eyesbeyond.com/freebsddom/java/jdk14.html.\n\ -Please place the patchset in ${DISTDIR}.\n +IGNORE= :\ +The source distribution exists on your system, but due to\ +licensing restrictions you still need to download the\ +patchset, ${PATCHSETFILE}, from\ +http://www.eyesbeyond.com/freebsddom/java/jdk14.html. \ +Please place the patchset in ${DISTDIR}. .endif # JDK 1.4.2 require recent version of FreeBSD due to recent libc_r updates. From: Sam Lawrance To: neuhauser@chello.cz, bug-followup@FreeBSD.org Cc: Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Thu, 19 May 2005 14:09:50 +1000 This is still a problem. Perhaps a less drastic change instead of switching ECHO_MSG to printf, would be to use the sh(1) builtin echo with the -e option. It seems all ports are using printf for is to get the C-style escaping, which echo -e can provide. From: Roman Neuhauser To: Sam Lawrance Cc: bug-followup@FreeBSD.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Thu, 19 May 2005 18:52:47 +0200 # boris@brooknet.com.au / 2005-05-19 14:09:50 +1000: > This is still a problem. Perhaps a less drastic change instead of > switching ECHO_MSG to printf, would be to use the sh(1) builtin echo > with the -e option. What makes this change less drastic? -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 From: Sam Lawrance To: Roman Neuhauser Cc: bug-followup@FreeBSD.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Fri, 20 May 2005 09:18:52 +1000 On Thu, 2005-05-19 at 18:52 +0200, Roman Neuhauser wrote: > # boris@brooknet.com.au / 2005-05-19 14:09:50 +1000: > > This is still a problem. Perhaps a less drastic change instead of > > switching ECHO_MSG to printf, would be to use the sh(1) builtin echo > > with the -e option. > > What makes this change less drastic? > Using echo -e there's no need to change the escaping of any of the currently problematic IGNORE messages, and everything else should work as expected. It's a minimal change. From: Roman Neuhauser To: Sam Lawrance Cc: bug-followup@FreeBSD.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Fri, 20 May 2005 09:37:50 +0200 # boris@brooknet.com.au / 2005-05-20 09:18:52 +1000: > On Thu, 2005-05-19 at 18:52 +0200, Roman Neuhauser wrote: > > # boris@brooknet.com.au / 2005-05-19 14:09:50 +1000: > > > This is still a problem. Perhaps a less drastic change instead of > > > switching ECHO_MSG to printf, would be to use the sh(1) builtin echo > > > with the -e option. > > > > What makes this change less drastic? > > > > Using echo -e there's no need to change the escaping of any of the > currently problematic IGNORE messages, and everything else should work > as expected. It's a minimal change. Do you have a patch? -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 From: Sam Lawrance To: Roman Neuhauser Cc: bug-followup@FreeBSD.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Fri, 20 May 2005 18:00:49 +1000 On Fri, 2005-05-20 at 09:37 +0200, Roman Neuhauser wrote: > # boris@brooknet.com.au / 2005-05-20 09:18:52 +1000: > > On Thu, 2005-05-19 at 18:52 +0200, Roman Neuhauser wrote: > > > # boris@brooknet.com.au / 2005-05-19 14:09:50 +1000: > > > > This is still a problem. Perhaps a less drastic change instead of > > > > switching ECHO_MSG to printf, would be to use the sh(1) builtin echo > > > > with the -e option. > > > > > > What makes this change less drastic? > > > > > > > Using echo -e there's no need to change the escaping of any of the > > currently problematic IGNORE messages, and everything else should work > > as expected. It's a minimal change. > > Do you have a patch? > Here's one that sets ECHO_CMD in bsd.port.mk, and removes the printf bits from the java ports listed in the PR. http://people.tecnik93.com/~sam/patch-echo-cmd From: Roman Neuhauser To: Sam Lawrance Cc: bug-followup@FreeBSD.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Fri, 20 May 2005 10:15:05 +0200 # boris@brooknet.com.au / 2005-05-20 18:00:49 +1000: > On Fri, 2005-05-20 at 09:37 +0200, Roman Neuhauser wrote: > > # boris@brooknet.com.au / 2005-05-20 09:18:52 +1000: > > > On Thu, 2005-05-19 at 18:52 +0200, Roman Neuhauser wrote: > > > > # boris@brooknet.com.au / 2005-05-19 14:09:50 +1000: > > > > > This is still a problem. Perhaps a less drastic change instead of > > > > > switching ECHO_MSG to printf, would be to use the sh(1) builtin echo > > > > > with the -e option. > > > > > > > > What makes this change less drastic? > > > > > > Using echo -e there's no need to change the escaping of any of the > > > currently problematic IGNORE messages, and everything else should work > > > as expected. It's a minimal change. > > > > Do you have a patch? > > Here's one that sets ECHO_CMD in bsd.port.mk, and removes the printf > bits from the java ports listed in the PR. > > http://people.tecnik93.com/~sam/patch-echo-cmd I'm somewhat reluctant to believe that this has no side effects. Can you build INDEX and/or the README.html files with this patch? -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 From: Sam Lawrance To: Roman Neuhauser Cc: bug-followup@FreeBSD.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Fri, 20 May 2005 20:58:28 +1000 On Fri, 2005-05-20 at 10:15 +0200, Roman Neuhauser wrote: > # boris@brooknet.com.au / 2005-05-20 18:00:49 +1000: > > Here's one that sets ECHO_CMD in bsd.port.mk, and removes the printf > > bits from the java ports listed in the PR. > > > > http://people.tecnik93.com/~sam/patch-echo-cmd > > I'm somewhat reluctant to believe that this has no side effects. > Can you build INDEX and/or the README.html files with this patch? Hm, you are right. It's quite broken. The line in bsd.port.mk ECHO_CMD?= echo # Shell builtin led me to believe it was actually using the sh builtin echo. Apparently this is true only in some cases. With that patch: root@dirk root# cd /usr/ports/java/jdk13 root@dirk jdk13# mv /bin/echo /bin/echo.orig root@dirk jdk13# make ===> jdk-1.3.1p9_5 : Because of licensing restrictions, you must fetch the source distribution manually. Please access http://www.sun.com/software/java2/download.html with a web browser and follow the "Download" link for the "Java(TM) SDK 1.3.1". You will be required to log in and register, but you can create an account on this page. After registration and accepting the Sun Community Source License, select "J2SESDK" and download the source file, j2sdk-1_3_1-src.tar.gz. Please place this file in /usr/ports/distfiles. . root@dirk jdk13# which is using the builtin echo just fine as I expected. But then this: root@dirk jdk13# make readme ===> Creating README.html for jdk-1.3.1p9_5 echo:No such file or directory echo:No such file or directory sed: 1: "s|%%WEBSITE%%|-n and/o ...": unescaped newline inside substitute pattern *** Error code 1 Stop in /usr/ports/java/jdk13. *** Error code 1 Stop in /usr/ports/java/jdk13. root@dirk jdk13# which is trying to use the executable. It seems that ${ECHO_CMD} inside backquotes uses the executable, not the builtin: root@dirk jdk13# sh # echo -e 'blah \n' blah # echo `echo -e 'blah \n'` blah # From: Sam Lawrance To: Roman Neuhauser Cc: bug-followup@FreeBSD.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Fri, 20 May 2005 21:07:36 +1000 I think my last assertion is incorrect, but it still doesn't work anyway :( From: Roman Neuhauser To: Sam Lawrance Cc: bug-followup@FreeBSD.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Fri, 20 May 2005 22:53:20 +0200 # boris@brooknet.com.au / 2005-05-20 21:07:36 +1000: > I think my last assertion is incorrect, but it still doesn't work > anyway :( Ok, so how about using the original version which redefines IGNORECMD? It could be modified to use IGNORECMD_PRINTF=yes to get rid of the duplicated IGNORECMD definitions. I never got a reply specifying the reported problem with http://www.freshports.org/ports-ignore.php so I think it's ok. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 From: Sam Lawrance To: Roman Neuhauser Cc: bug-followup@freebsd.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Sat, 21 May 2005 11:30:27 +1000 On Fri, 2005-05-20 at 22:53 +0200, Roman Neuhauser wrote: > # boris@brooknet.com.au / 2005-05-20 21:07:36 +1000: > > I think my last assertion is incorrect, but it still doesn't work > > anyway :( > > Ok, so how about using the original version which redefines > IGNORECMD? It could be modified to use IGNORECMD_PRINTF=yes > to get rid of the duplicated IGNORECMD definitions. > > I never got a reply specifying the reported problem with > http://www.freshports.org/ports-ignore.php so I think it's ok. The original patch doesn't work at all (IGNORECMD is redefined by bsd.port.mk). linimon's patch flies okay with the manual-fetch IGNORE message. In either case though, the original problem remains. Redefining IGNORECMD to use printf still causes trouble for FORBIDDEN, BROKEN, ONLY_FOR_ARCHS, NOT_FOR_ARCHS etcetera due to the use of quoting. eg, with linimon's patch: root@dirk jdk13# make BROKEN="what will happen now" printf: missing format character ===> jdk-1.3.1p9_5 is*** Error code 1 Stop in /usr/ports/java/jdk13. root@dirk jdk13# root@dirk jdk13# make BROKEN="what will happen now" -V IGNORECMD /usr/bin/printf "===> jdk-1.3.1p9_5 "is marked as broken: what will happen now"." hq's patch with fmt seems okay (so far :) ... From: Roman Neuhauser To: Sam Lawrance Cc: bug-followup@freebsd.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Sat, 21 May 2005 12:06:51 +0200 # boris@brooknet.com.au / 2005-05-21 11:30:27 +1000: > On Fri, 2005-05-20 at 22:53 +0200, Roman Neuhauser wrote: > > # boris@brooknet.com.au / 2005-05-20 21:07:36 +1000: > > > I think my last assertion is incorrect, but it still doesn't work > > > anyway :( > > > > Ok, so how about using the original version which redefines > > IGNORECMD? It could be modified to use IGNORECMD_PRINTF=yes > > to get rid of the duplicated IGNORECMD definitions. > > > > I never got a reply specifying the reported problem with > > http://www.freshports.org/ports-ignore.php so I think it's ok. > > The original patch doesn't work at all (IGNORECMD is redefined by > bsd.port.mk). I would bet it worked when I submitted it, hmm... > linimon's patch flies okay with the manual-fetch IGNORE message. In > either case though, the original problem remains. Redefining IGNORECMD > to use printf still causes trouble for FORBIDDEN, BROKEN, > ONLY_FOR_ARCHS, NOT_FOR_ARCHS etcetera due to the use of quoting. > > eg, with linimon's patch: > > root@dirk jdk13# make BROKEN="what will happen now" > printf: missing format character > ===> jdk-1.3.1p9_5 is*** Error code 1 Divorcing the individual commands (with common default) would take care of this, right? I'm going to generate a patch to this effect. > Stop in /usr/ports/java/jdk13. > root@dirk jdk13# > root@dirk jdk13# make BROKEN="what will happen now" -V IGNORECMD > /usr/bin/printf "===> jdk-1.3.1p9_5 "is marked as broken: what will happen now"." > > hq's patch with fmt seems okay (so far :) ... I'm afraid that tacking fmt on the tail of IGNORECMD will break formatted ignore messages elsewhere. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 State-Changed-From-To: open->feedback State-Changed-By: linimon State-Changed-When: Fri May 25 03:07:07 UTC 2007 State-Changed-Why: Now that the quoting issues with IGNORE and BROKEN are working, is the original submitter interested in picking this up again? http://www.freebsd.org/cgi/query-pr.cgi?pr=66342 State-Changed-From-To: feedback->suspended State-Changed-By: linimon State-Changed-When: Sat Mar 1 23:42:55 UTC 2008 State-Changed-Why: Feedback hasn't been received, but this believed to still be a problem. http://www.freebsd.org/cgi/query-pr.cgi?pr=66342 From: Mark Linimon To: bug-followup@FreeBSD.org Cc: linimon@FreeBSD.org Subject: Re: ports/66342: [PATCH] fix ECHO_MSG breakage in java ports Date: Mon, 2 Jan 2012 14:21:57 -0600 Trying to review an ancient PR here. First, let's note that for the individual ports patches, the only one to still apply is for java/jmf/Makefile. The other ports' Makefile (or their successors still in the tree) have all been reworked. However, I still believe that this usage still exists in other ports, and thus that the bsd.port.mk change is probably still worth thinking about. >Unformatted: