Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Sep 2012 21:24:35 +0100 (BST)
From:      Chris Rees <crees@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/171621: [PATCH] bsd.port.mk; allow Real Names in MAINTAINER lines
Message-ID:  <20120913202435.4793D15179@pegasus.bayofrum.net>
Resent-Message-ID: <201209132030.q8DKU2md014384@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         171621
>Category:       ports
>Synopsis:       [PATCH] bsd.port.mk; allow Real Names in MAINTAINER lines
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 13 20:30:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Chris Rees
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD pegasus.bayofrum.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sun Apr 29 12:29:02 BST 2012 root@pegasus.bayofrum.net:/usr/obj/usr/src/sys/PEGASUS amd64


	
>Description:
	I think it would be very nice to include Real Names in MAINTAINER
lines, just as OpenBSD does.  Stephen@ floated this idea originally, so credit
should go to him.

	There is no technical reason not to do this, and the patch attached will keep the old behaviour for make describe and make maintainer.  The only code that could suffer is code that runs make -VMAINTAINER rather than make maintainer.

	Matthew, p5-FreeBSD-Portindex runs make describe, so no problems there.

	Shaun, portscout will run make -VMAINTAINER if it can't find the maintainer address in INDEX.  I can't see this ever happening... but you can replace -VMAINTAINER with -V_MAINTAINER and it will work just fine.

	Dan, how does freshports get its information?  Will it survive with maintainer entries like that?

	Joe, portlint should stop complaining about this [1].

	How does pointyhat get the MAINTAINER line, and again will it care about the extra data if it doesn't use make maintainer [2]?  I can't find the source code, so I can't check it.

[1] http://www.bayofrum.net/~crees/patches/portlint-relax.diff

[2] http://portsmon.freebsd.org/portoverview.py

	I'm not aware of any issues with this... I'm sure if anything does break, the simplest solution is to replace MAINTAINER with _MAINTAINER in the offending code.

	The autoassigner will still work, because it's still a valid email address.

>How-To-Repeat:
	
>Fix:

	I think that the best way to go about this would be to strictly limit the changes initally to a small subset of ports, and iron out problems if they appear.  It's really not a big change.



--- bsd-port-mk-maintainer-not-just-email.diff begins here ---
Index: bsd.gnome.mk
===================================================================
--- bsd.gnome.mk	(revision 304122)
+++ bsd.gnome.mk	(working copy)
@@ -806,7 +806,7 @@
 SUB_LIST+=		GNOME_SUBR=${GNOME_SUBR}
 .endif
 
-.if ${MAINTAINER}=="gnome@FreeBSD.org"
+.if ${MAINTAINER:M*@*:C,^<([^>]*)>$,\1,}=="gnome@FreeBSD.org"
 CONFIGURE_FAIL_MESSAGE= "Please run the gnomelogalyzer, available from \"http://www.freebsd.org/gnome/gnomelogalyzer.sh\", which will diagnose the problem and suggest a solution. If - and only if - the gnomelogalyzer cannot solve the problem, report the build failure to the FreeBSD GNOME team at ${MAINTAINER}, and attach (a) \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\", (b) the output of the failed make command, and (c) the gnomelogalyzer output. Also, it might be a good idea to provide an overview of all packages installed on your system (i.e. an \`ls ${PKG_DBDIR}\`). Put your attachment up on any website, copy-and-paste into http://freebsd-gnome.pastebin.com, or use send-pr(1) with the attachment. Try to avoid sending any attachments to the mailing list (${MAINTAINER}), because attachments sent to FreeBSD mailing lists are usually discarded by the mailing list software."
 .endif
 
Index: bsd.port.mk
===================================================================
--- bsd.port.mk	(revision 304122)
+++ bsd.port.mk	(working copy)
@@ -1181,7 +1181,7 @@
 
 
 # Get the default maintainer
-MAINTAINER?=	ports@FreeBSD.org
+MAINTAINER?=	FreeBSD Ports Mailing List <ports@FreeBSD.org>
 
 # Get the architecture
 .if !defined(ARCH)
@@ -2865,9 +2865,14 @@
 #  by user.
 EXTRACT_ONLY?=	${_DISTFILES}
 
+# Show traditional MAINTAINER, first word with @ in, stripped of surroundings
+.for m in ${MAINTAINER:M*@*}
+_MAINTAINER?=	${m:C,^<([^>]*)>$,\1,}
+.endfor
+
 .if !target(maintainer)
 maintainer:
-	@${ECHO_CMD} "${MAINTAINER}"
+	@${ECHO_MSG} "${_MAINTAINER}"
 .endif
 
 .if !target(check-makefile)
@@ -5553,7 +5558,7 @@
 describe:
 	@(${ECHO_CMD} -n "${PKGNAME}|${.CURDIR}|${PREFIX}|"; \
 	${ECHO_CMD} -n ${COMMENT:Q}; \
-	${ECHO_CMD} -n "|${_DESCR}|${MAINTAINER}|${CATEGORIES}|${_EXTRACT_DEPENDS}|${_PATCH_DEPENDS}|${_FETCH_DEPENDS}|${_BUILD_DEPENDS:O:u}|${_RUN_DEPENDS:O:u}|"; \
+	${ECHO_CMD} -n "|${_DESCR}|${_MAINTAINER}|${CATEGORIES}|${_EXTRACT_DEPENDS}|${_PATCH_DEPENDS}|${_FETCH_DEPENDS}|${_BUILD_DEPENDS:O:u}|${_RUN_DEPENDS:O:u}|"; \
 	while read one two discard; do \
 		case "$$one" in \
 		WWW:)   case "$$two" in \
@@ -5592,8 +5597,7 @@
 			-e '/%%COMMENT%%/d' \
 			-e 's|%%DESCR%%|'"$$(${ECHO_CMD} ${DESCR} | \
 								 ${SED} -e 's|${.CURDIR}/||')"'|' \
-			-e 's|%%EMAIL%%|'"$$(${ECHO_CMD} "${MAINTAINER}" | \
-								 ${SED} -e 's/([^)]*)//;s/.*<//;s/>.*//')"'|g' \
+			-e 's|%%EMAIL%%|${_MAINTAINER}|g' \
 			-e 's|%%MAINTAINER%%|${MAINTAINER}|g' \
 			-e 's|%%WEBSITE%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-www-site)"'|' \
 			-e 's|%%BUILD_DEPENDS%%|'"$$(cd ${.CURDIR} && eval ${MAKE} pretty-print-build-depends-list)"'|' \
--- bsd-port-mk-maintainer-not-just-email.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120913202435.4793D15179>