From root@prometheus.scode.org  Mon Jul 20 20:28:11 2009
Return-Path: <root@prometheus.scode.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3DCC61065689
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 20 Jul 2009 20:28:11 +0000 (UTC)
	(envelope-from root@prometheus.scode.org)
Received: from proxy1.bredband.net (proxy1.bredband.net [195.54.101.71])
	by mx1.freebsd.org (Postfix) with ESMTP id EDF7E8FC19
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 20 Jul 2009 20:28:10 +0000 (UTC)
	(envelope-from root@prometheus.scode.org)
Received: from iph2.telenor.se (195.54.127.133) by proxy1.bredband.net (7.3.140.3)
        id 49F5A15201BA32DC for FreeBSD-gnats-submit@freebsd.org; Mon, 20 Jul 2009 22:28:09 +0200
Received: from c-9b9b72d5.03-51-73746f3.cust.bredbandsbolaget.se (HELO prometheus.scode.org) ([213.114.155.155])
  by iph2.telenor.se with ESMTP; 20 Jul 2009 22:28:09 +0200
Received: by prometheus.scode.org (Postfix, from userid 0)
	id 990213ABBA7; Mon, 20 Jul 2009 22:28:17 +0200 (CEST)
Message-Id: <20090720202817.990213ABBA7@prometheus.scode.org>
Date: Mon, 20 Jul 2009 22:28:17 +0200 (CEST)
From: Peter Schuller <peter.schuller@infidyne.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [MAINTAINER] textproc/asciidoc: use realpath instead of GNU readlink
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         136940
>Category:       ports
>Synopsis:       [MAINTAINER] textproc/asciidoc: use realpath instead of GNU readlink
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wxs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 20 20:30:04 UTC 2009
>Closed-Date:    Tue Jul 28 14:54:56 UTC 2009
>Last-Modified:  Tue Jul 28 15:00:09 UTC 2009
>Originator:     peter.schuller@infidyne.com
>Release:        FreeBSD 8.0-BETA1 amd64
>Organization:
>Environment:
System: FreeBSD prometheus.scode.org 8.0-BETA1 FreeBSD 8.0-BETA1 #0: Thu Jul  9 00:51:47 CEST
>Description:
Patch a2x to use realpath instead of relying on non-existing GNU readlink.

Problem discovered and patch submitted by Baptiste Daroussin.

Added file(s):
- files/patch-a2x

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- asciidoc-8.4.5_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/textproc/asciidoc.orig/Makefile /usr/ports/textproc/asciidoc/Makefile
--- /usr/ports/textproc/asciidoc.orig/Makefile	2009-07-06 00:24:18.000000000 +0200
+++ /usr/ports/textproc/asciidoc/Makefile	2009-07-20 22:26:37.556331060 +0200
@@ -7,6 +7,7 @@
 
 PORTNAME=	asciidoc
 PORTVERSION=	8.4.5
+PORTREVISION=	1
 CATEGORIES=	textproc
 MASTER_SITES=	http://www.methods.co.nz/asciidoc/ \
 		SF
diff -ruN --exclude=CVS /usr/ports/textproc/asciidoc.orig/files/patch-a2x /usr/ports/textproc/asciidoc/files/patch-a2x
--- /usr/ports/textproc/asciidoc.orig/files/patch-a2x	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/textproc/asciidoc/files/patch-a2x	2009-07-20 22:23:42.163169197 +0200
@@ -0,0 +1,11 @@
+--- ./a2x.orig	2009-07-20 13:49:35.139308000 +0000
++++ ./a2x	2009-07-20 13:52:55.111653855 +0000
+@@ -13,7 +13,7 @@
+ if [ ! -e "$REALNAME" ]; then
+     REALNAME=$(which "$REALNAME")
+ fi
+-REALNAME="$(readlink -f "$REALNAME")"
++REALNAME="$(realpath "$REALNAME")"
+ CONF_DIR=/etc/asciidoc
+ # FOP executable is named fop on some systems.
+ FOP_COMMAND="fop.sh"
--- asciidoc-8.4.5_1.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->wxs 
Responsible-Changed-By: wxs 
Responsible-Changed-When: Mon Jul 20 20:48:06 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136940 

From: Peter Schuller <peter.schuller@infidyne.com>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org,
	baptiste.daroussin@gmail.com
Cc:  
Subject: Re: ports/136940: [MAINTAINER] textproc/asciidoc: use realpath
 instead of GNU readlink
Date: Thu, 23 Jul 2009 18:57:49 +0200

 --4SFOXa2GPu3tIq4H
 Content-Type: multipart/mixed; boundary="jRHKVT23PllUwdXP"
 Content-Disposition: inline
 
 
 --jRHKVT23PllUwdXP
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Turns out there are multiple references to readlink -f. The attached
 updated patch should be complete.
 
 Also, although this is unrelated to readlink, more patching was needed
 because it depends on a GNU:ish getopt. The attached patch:
 
 (1) Replaces all readlinke -f references.
 (2) Makes a2x use /usr/local/bin/getopt.
 (3) Adds misc/getopt as a run dependency.
 
 Please commit that instead of the original patch.
 
 --=20
 / Peter Schuller
 
 PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@infidyne.com>'
 Key retrieval: Send an E-Mail to getpgpkey@scode.org
 E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org
 
 
 --jRHKVT23PllUwdXP
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="patch-asciidoc_a2x.diff"
 Content-Transfer-Encoding: quoted-printable
 
 =3D=3D=3D> Generating patch
 =3D=3D=3D> Viewing diff with more
 diff -ruN --exclude=3DCVS /usr/ports/textproc/asciidoc.orig/Makefile /usr/p=
 orts/textproc/asciidoc/Makefile
 --- /usr/ports/textproc/asciidoc.orig/Makefile	2009-07-06 00:24:18.00000000=
 0 +0200
 +++ /usr/ports/textproc/asciidoc/Makefile	2009-07-23 18:55:34.317635427 +02=
 00
 @@ -7,6 +7,7 @@
 =20
  PORTNAME=3D	asciidoc
  PORTVERSION=3D	8.4.5
 +PORTREVISION=3D	1
  CATEGORIES=3D	textproc
  MASTER_SITES=3D	http://www.methods.co.nz/asciidoc/ \
  		SF
 @@ -14,7 +15,8 @@
  MAINTAINER=3D	peter.schuller@infidyne.com
  COMMENT=3D	A text document format for writing short documents and man pages
 =20
 -RUN_DEPENDS=3D	bash:${PORTSDIR}/shells/bash
 +RUN_DEPENDS+=3D	bash:${PORTSDIR}/shells/bash \
 +		getopt>=3D0:${PORTSDIR}/misc/getopt
 =20
  USE_PYTHON=3D	2.4+
  USE_GMAKE=3D	yes
 diff -ruN --exclude=3DCVS /usr/ports/textproc/asciidoc.orig/files/patch-a2x=
  /usr/ports/textproc/asciidoc/files/patch-a2x
 --- /usr/ports/textproc/asciidoc.orig/files/patch-a2x	1970-01-01 01:00:00.0=
 00000000 +0100
 +++ /usr/ports/textproc/asciidoc/files/patch-a2x	2009-07-23 18:53:36.150171=
 883 +0200
 @@ -0,0 +1,61 @@
 +--- a2x.orig	2009-07-23 18:51:01.485493322 +0200
 ++++ a2x	2009-07-23 18:52:01.107211768 +0200
 +@@ -9,11 +9,12 @@
 +=20
 + VERSION=3D1.0.0
 + BASENAME=3D$(basename "$0")
 ++GETOPT=3D/usr/local/bin/getopt
 + REALNAME=3D"$0"
 + if [ ! -e "$REALNAME" ]; then
 +     REALNAME=3D$(which "$REALNAME")
 + fi
 +-REALNAME=3D"$(readlink -f "$REALNAME")"
 ++REALNAME=3D"$(/bin/realpath "$REALNAME")"
 + CONF_DIR=3D/etc/asciidoc
 + # FOP executable is named fop on some systems.
 + FOP_COMMAND=3D"fop.sh"
 +@@ -244,14 +245,14 @@
 +     if [ -z "$*" ]; then
 +         help; exit 0
 +     fi
 +-    require "getopt"
 +-    getopt -T >/dev/null
 ++    require "$GETOPT"
 ++    $GETOPT -T >/dev/null
 +     if [ $? -ne 4 ]; then
 +         quit "enhanced getopt(1) required"
 +     fi
 +     short_opts=3D"a:d:D:f:hLnsv"
 +     long_opts=3D"attribute:,asciidoc-opts:,destination-dir:,doctype:,help=
 ,icons-dir:,dry-run,format:,copy,icons,skip-asciidoc,stylesheet:,unsafe,ver=
 sion,verbose,xsltproc-opts:,dblatex-opts:,fop,fop-opts:,no-xmllint"
 +-    args=3D$(getopt -o $short_opts -l $long_opts -n $BASENAME -- "$@" 2>/=
 dev/null)
 ++    args=3D$($GETOPT -o $short_opts -l $long_opts -n $BASENAME -- "$@" 2>=
 /dev/null)
 +     if [ $? -ne 0 ]; then
 +         quit "invalid command options, run: a2x --help"
 +     fi
 +@@ -494,7 +495,7 @@
 +         quit "file not found: $xsl"
 +     fi
 +     to_docbook
 +-    xml=3D$(readlink -f "$SRC_DIR/$SRC_NAME.xml")
 ++    xml=3D$(/bin/realpath "$SRC_DIR/$SRC_NAME.xml")
 +     html=3D"$SRC_NAME.html"
 +     copy_stylesheet_and_icons "$DESTINATION_DIR"
 +     execute_command_2 "cd \"$DESTINATION_DIR\""
 +@@ -527,7 +528,7 @@
 +         quit "file not found: $xsl"
 +     fi
 +     to_docbook
 +-    xml=3D$(readlink -f "$SRC_DIR/$SRC_NAME.xml")
 ++    xml=3D$(/bin/realpath "$SRC_DIR/$SRC_NAME.xml")
 +     if [ ! -d "$chunkdir" ]; then
 +         execute_command_2 "mkdir \"$chunkdir\""
 +     fi
 +@@ -549,7 +550,7 @@
 +         quit "file not found: $xsl"
 +     fi
 +     to_docbook "-d manpage"
 +-    xml=3D$(readlink -f "$SRC_DIR/$SRC_NAME.xml")
 ++    xml=3D$(/bin/realpath "$SRC_DIR/$SRC_NAME.xml")
 +     execute_command_2 "cd \"$DESTINATION_DIR\""
 +     execute_command_2 "xsltproc $XSLTPROC_OPTS --nonet \
 +         \"$xsl\" \"$xml\""
 =3D=3D=3D> Done
 
 --jRHKVT23PllUwdXP--
 
 --4SFOXa2GPu3tIq4H
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.12 (FreeBSD)
 
 iEYEARECAAYFAkpolowACgkQDNor2+l1i30q4ACfUAjgEigUR5VJh2ZHq1f1F8Wo
 itsAoLTnJOHYr/IJBtSp6475zblIe+gr
 =TSLi
 -----END PGP SIGNATURE-----
 
 --4SFOXa2GPu3tIq4H--

From: Peter Schuller <peter.schuller@infidyne.com>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org,
	baptiste.daroussin@gmail.com
Cc:  
Subject: Re: ports/136940: [MAINTAINER] textproc/asciidoc: use realpath
 instead of GNU readlink
Date: Thu, 23 Jul 2009 19:03:06 +0200

 --LZvS9be/3tNcYl/X
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 > (2) Makes a2x use /usr/local/bin/getopt.
 
 Sorry, brain lapse. The patch hard-codes
 /usr/local/bin/getopt... Anyways, I suggest either commiting anyway
 for now given that it does not represent a regression (it bails now
 anyway due to getopt), or else wait and I'll submit a fixed version
 (hopefully later tonight).
 
 --=20
 / Peter Schuller
 
 PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@infidyne.com>'
 Key retrieval: Send an E-Mail to getpgpkey@scode.org
 E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org
 
 
 --LZvS9be/3tNcYl/X
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.12 (FreeBSD)
 
 iEYEARECAAYFAkpol8oACgkQDNor2+l1i31xrwCgnhMDgqnKXKsAd1KJw+ena5nL
 F+gAn2vLaDEgEBKKolrX4jPJ20EiPrjf
 =0fdk
 -----END PGP SIGNATURE-----
 
 --LZvS9be/3tNcYl/X--

From: Peter Schuller <peter.schuller@infidyne.com>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Cc:  
Subject: Re: ports/136940: [MAINTAINER] textproc/asciidoc: use realpath
 instead of GNU readlink
Date: Sat, 25 Jul 2009 16:17:27 +0200

 --WYTEVAkct0FjGQmd
 Content-Type: multipart/mixed; boundary="BXVAT5kNtrzKuDFl"
 Content-Disposition: inline
 
 
 --BXVAT5kNtrzKuDFl
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Attached is a new version of the patch. After some digging I didn't
 really find a nice idiomatic way of doing this, so ended up just doing
 the patching of the patched file in post-patch.
 
 --=20
 / Peter Schuller
 
 PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@infidyne.com>'
 Key retrieval: Send an E-Mail to getpgpkey@scode.org
 E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org
 
 
 --BXVAT5kNtrzKuDFl
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="patch-asciidoc_a2x_rev2.diff"
 Content-Transfer-Encoding: quoted-printable
 
 =3D=3D=3D> Generating patch
 =3D=3D=3D> Viewing diff with more
 diff -ruN --exclude=3DCVS /usr/ports/textproc/asciidoc.orig/Makefile /usr/p=
 orts/textproc/asciidoc/Makefile
 --- /usr/ports/textproc/asciidoc.orig/Makefile	2009-07-06 00:24:18.00000000=
 0 +0200
 +++ /usr/ports/textproc/asciidoc/Makefile	2009-07-25 16:12:44.633716190 +02=
 00
 @@ -7,6 +7,7 @@
 =20
  PORTNAME=3D	asciidoc
  PORTVERSION=3D	8.4.5
 +PORTREVISION=3D	1
  CATEGORIES=3D	textproc
  MASTER_SITES=3D	http://www.methods.co.nz/asciidoc/ \
  		SF
 @@ -14,7 +15,8 @@
  MAINTAINER=3D	peter.schuller@infidyne.com
  COMMENT=3D	A text document format for writing short documents and man pages
 =20
 -RUN_DEPENDS=3D	bash:${PORTSDIR}/shells/bash
 +RUN_DEPENDS+=3D	bash:${PORTSDIR}/shells/bash \
 +		getopt>=3D0:${PORTSDIR}/misc/getopt
 =20
  USE_PYTHON=3D	2.4+
  USE_GMAKE=3D	yes
 @@ -32,4 +34,8 @@
  	@${REINPLACE_CMD} -e "s|/bin/bash|${LOCALBASE}/bin/bash|g" \
  		${WRKSRC}/a2x ${WRKSRC}/asciidoc.py
 =20
 +post-patch:
 +	@${REINPLACE_CMD} -e "s|%%PREFIX%%|${LOCALBASE}|g" \
 +		${WRKSRC}/a2x
 +
  .include <bsd.port.mk>
 diff -ruN --exclude=3DCVS /usr/ports/textproc/asciidoc.orig/files/patch-a2x=
  /usr/ports/textproc/asciidoc/files/patch-a2x
 --- /usr/ports/textproc/asciidoc.orig/files/patch-a2x	1970-01-01 01:00:00.0=
 00000000 +0100
 +++ /usr/ports/textproc/asciidoc/files/patch-a2x	2009-07-25 16:11:07.164811=
 737 +0200
 @@ -0,0 +1,61 @@
 +--- a2x.orig	2009-07-23 18:51:01.485493322 +0200
 ++++ a2x	2009-07-23 18:52:01.107211768 +0200
 +@@ -9,11 +9,12 @@
 +=20
 + VERSION=3D1.0.0
 + BASENAME=3D$(basename "$0")
 ++GETOPT=3D%%PREFIX%%/bin/getopt
 + REALNAME=3D"$0"
 + if [ ! -e "$REALNAME" ]; then
 +     REALNAME=3D$(which "$REALNAME")
 + fi
 +-REALNAME=3D"$(readlink -f "$REALNAME")"
 ++REALNAME=3D"$(/bin/realpath "$REALNAME")"
 + CONF_DIR=3D/etc/asciidoc
 + # FOP executable is named fop on some systems.
 + FOP_COMMAND=3D"fop.sh"
 +@@ -244,14 +245,14 @@
 +     if [ -z "$*" ]; then
 +         help; exit 0
 +     fi
 +-    require "getopt"
 +-    getopt -T >/dev/null
 ++    require "$GETOPT"
 ++    $GETOPT -T >/dev/null
 +     if [ $? -ne 4 ]; then
 +         quit "enhanced getopt(1) required"
 +     fi
 +     short_opts=3D"a:d:D:f:hLnsv"
 +     long_opts=3D"attribute:,asciidoc-opts:,destination-dir:,doctype:,help=
 ,icons-dir:,dry-run,format:,copy,icons,skip-asciidoc,stylesheet:,unsafe,ver=
 sion,verbose,xsltproc-opts:,dblatex-opts:,fop,fop-opts:,no-xmllint"
 +-    args=3D$(getopt -o $short_opts -l $long_opts -n $BASENAME -- "$@" 2>/=
 dev/null)
 ++    args=3D$($GETOPT -o $short_opts -l $long_opts -n $BASENAME -- "$@" 2>=
 /dev/null)
 +     if [ $? -ne 0 ]; then
 +         quit "invalid command options, run: a2x --help"
 +     fi
 +@@ -494,7 +495,7 @@
 +         quit "file not found: $xsl"
 +     fi
 +     to_docbook
 +-    xml=3D$(readlink -f "$SRC_DIR/$SRC_NAME.xml")
 ++    xml=3D$(/bin/realpath "$SRC_DIR/$SRC_NAME.xml")
 +     html=3D"$SRC_NAME.html"
 +     copy_stylesheet_and_icons "$DESTINATION_DIR"
 +     execute_command_2 "cd \"$DESTINATION_DIR\""
 +@@ -527,7 +528,7 @@
 +         quit "file not found: $xsl"
 +     fi
 +     to_docbook
 +-    xml=3D$(readlink -f "$SRC_DIR/$SRC_NAME.xml")
 ++    xml=3D$(/bin/realpath "$SRC_DIR/$SRC_NAME.xml")
 +     if [ ! -d "$chunkdir" ]; then
 +         execute_command_2 "mkdir \"$chunkdir\""
 +     fi
 +@@ -549,7 +550,7 @@
 +         quit "file not found: $xsl"
 +     fi
 +     to_docbook "-d manpage"
 +-    xml=3D$(readlink -f "$SRC_DIR/$SRC_NAME.xml")
 ++    xml=3D$(/bin/realpath "$SRC_DIR/$SRC_NAME.xml")
 +     execute_command_2 "cd \"$DESTINATION_DIR\""
 +     execute_command_2 "xsltproc $XSLTPROC_OPTS --nonet \
 +         \"$xsl\" \"$xml\""
 =3D=3D=3D> Done
 
 --BXVAT5kNtrzKuDFl--
 
 --WYTEVAkct0FjGQmd
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.12 (FreeBSD)
 
 iEYEARECAAYFAkprE/YACgkQDNor2+l1i31FTACfao4Gxd5km4IvAk6ZpcP4YngQ
 mKYAn3zCZaPcKXUgjkpDEAJJo6LXYZTB
 =r/cA
 -----END PGP SIGNATURE-----
 
 --WYTEVAkct0FjGQmd--
State-Changed-From-To: open->closed 
State-Changed-By: wxs 
State-Changed-When: Tue Jul 28 14:54:55 UTC 2009 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136940 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/136940: commit references a PR
Date: Tue, 28 Jul 2009 14:50:45 +0000 (UTC)

 wxs         2009-07-28 14:50:25 UTC
 
   FreeBSD ports repository
 
   Modified files:
     textproc/asciidoc    Makefile 
   Added files:
     textproc/asciidoc/files patch-a2x 
   Log:
   - Use realpath(1) instead of GNU readlink.
   - Depend upon misc/getopt.
   - Don't hardcode ${LOCALBASE} in new patch.
   
   PR:             ports/136940
   Submitted by:   Peter Schuller <peter.schuller@infidyne.com> (maintainer)
   
   Revision  Changes    Path
   1.16      +7 -1      ports/textproc/asciidoc/Makefile
   1.1       +61 -0     ports/textproc/asciidoc/files/patch-a2x (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
