pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/45181: textproc/groff pdfroff patch is not portable
>Number: 45181
>Category: pkg
>Synopsis: the new patch uses mktemp with the -p option, which is not
>portable.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 27 02:15:00 +0000 2011
>Originator: Louis Guillaume
>Release: NetBSD 5.1_STABLE
>Organization:
>Environment:
System: NetBSD xxxxxxxxxxxxxxxx 5.1_STABLE NetBSD 5.1_STABLE (GENERIC) #11: Sat
Jul 23 13:03:08 EDT 2011
louis@xxxxxxxxxxxxxxxx:/usr/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Affects NetBSD, but I also found on OS X 10.6. with pkgsrc-2011Q2.
With pkgsrc-2011Q2, we have a new patch in groff, named
patches/patch-contrib_pdfmark_pdfroff.sh.
This patch introduces a mktemp command with the `-p' option, which is not
portable. It seems to only be on Linux AFAICT.
Below is a patch to the patch that works for me. I left the `XXXX' in there to
support Linux, as it still needs a specific template with the `X's. I thought 4
was enough but it's totally arbitrary.
>How-To-Repeat:
Try to run pdfroff after building from pkgsrc-2011Q2 on NetBSD or OS X.
>Fix:
--- textproc/groff/patches/patch-contrib_pdfmark_pdfroff.sh 21 Jul 2011
04:24:07 -0000 1.1.2.2
+++ textproc/groff/patches/patch-contrib_pdfmark_pdfroff.sh 27 Jul 2011
00:39:18 -0000
@@ -18,7 +18,7 @@
#
- WRKFILE=${GROFF_TMPDIR=${TMPDIR-${TMP-${TEMP-"."}}}}/pdf$$.tmp
+ MYTMPDIR=${GROFF_TMPDIR-${TMPDIR-${TMP-${TEMP-"/tmp"}}}}
-+ WRKDIR="`unset TMPDIR && mktemp -dp "$MYTMPDIR" groff-pdfroff.XXXXXXXXXX`"
|| exit
++ WRKDIR="$(TMPDIR=$MYTMPDIR mktemp -d -t groff-pdfroff.XXXX)" || exit
+
+ trap 'rm -rf -- "$WRKDIR"' EXIT
+ trap 'trap - EXIT; rm -rf -- "$WRKDIR"; exit 1' HUP INT QUIT PIPE TERM
Home |
Main Index |
Thread Index |
Old Index