pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/40101: textproc/asciidoc spuriously reports unsafe pathnames



>Number:         40101
>Category:       pkg
>Synopsis:       textproc/asciidoc spuriously reports unsafe pathnames
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 04 00:25:00 +0000 2008
>Originator:     Tom Yu
>Release:        pkgsrc trunk 20081201
>Organization:
>Environment:
Darwin SPARK-GAP.MIT.EDU 9.5.0 Darwin Kernel Version 9.5.0: Wed Sep  3 11:29:43 
PDT 2008; root:xnu-1228.7.58~1/RELEASE_I386 i386


>Description:
The version of asciidoc in pkgsrc erroneously reports unsafe pathnames when 
building some documentation for other packages.  In my case, this was for 
devel/scmgit-doc.  Upstream already has a patch committed:

http://hg.sharesource.org/asciidoc/rev/fa6db1ff4369

but this is not in the patches directory for this package.

Example:

rm -f git-add.html+ git-add.html
asciidoc -b xhtml11 -d manpage -f asciidoc.conf \
                 -a asciidoc7compatible -agit_version=1.6.0.2 -o git-add.html+ g
it-add.txt
ERROR: unsafe: include file: /usr/pkg/share/asciidoc/./stylesheets/xhtml11.css
ERROR: unsafe: include file: /usr/pkg/share/asciidoc/./stylesheets/xhtml11-quirk
s.css
ERROR: unsafe: include file: /usr/pkg/share/asciidoc/xhtml11-quirks.conf
gnumake[1]: *** [git-add.html] Error 1
gnumake: *** [doc] Error 2


>How-To-Repeat:
Attempt to build devel/scmgit-doc on a Mac OS X 10.5 machine where /usr/pkg is 
symlinked to a UFS filesystem.  asciidoc will fail on "unsafe: include file".
>Fix:
Index: textproc/asciidoc/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/textproc/asciidoc/distinfo,v
retrieving revision 1.5
diff -u -r1.5 distinfo
--- textproc/asciidoc/distinfo  10 Jun 2008 13:06:30 -0000      1.5
+++ textproc/asciidoc/distinfo  4 Dec 2008 00:07:22 -0000
@@ -4,3 +4,4 @@
 RMD160 (asciidoc-8.2.6.tar.gz) = c07d2eaa04d16275c44756236023c0789cf54310
 Size (asciidoc-8.2.6.tar.gz) = 739790 bytes
 SHA1 (patch-aa) = f8e1128a7ea77a6c4bcfa023b6fcb040cc3882de
+SHA1 (patch-ab) = 9fcf5c91ebbf8a8ff9c7a6f64d3fa21bb38669c1
Index: textproc/asciidoc/patches/patch-ab
===================================================================
RCS file: textproc/asciidoc/patches/patch-ab
diff -N textproc/asciidoc/patches/patch-ab
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ textproc/asciidoc/patches/patch-ab  4 Dec 2008 00:07:22 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- asciidoc.py.orig   2008-04-18 17:54:45.000000000 -0400
++++ asciidoc.py
+@@ -124,7 +124,7 @@ def file_in(fname, directory):
+         directory = os.getcwd()
+     else:
+         assert os.path.isdir(directory)
+-        directory = os.path.abspath(directory)
++        directory = os.path.realpath(directory)
+     fname = os.path.realpath(fname)
+     return os.path.commonprefix((directory, fname)) == directory
+ 




Home | Main Index | Thread Index | Old Index