Ticket #30219 (closed defect: fixed)
pgplot: patching fails due to ".." path component
| Reported by: | mcbentz@… | Owned by: | mcalhoun@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.2 |
| Keywords: | Cc: | ryandesign@…, swinbank@… | |
| Port: | pgplot |
Description (last modified by jmr@…) (diff)
While attempting to install pgplot tonight, the installation failed while installing a patch. I had just run selfupdate immediately before installation.
Here's the error message I received:
---> Applying patches to pgplot Error: Target org.macports.patch returned: shell command failed (see log for details) Log for pgplot is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_pgplot/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
And the contents of main.log:
:msg:patch ---> Applying patches to pgplot
:info:patch ---> Applying /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/pgplot/files/patch-makemake.diff
:debug:patch Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_pgplot/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6'
:debug:patch Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_pgplot/work/build" && /usr/bin/patch -p0'
:info:patch /usr/bin/patch: **** rejecting file name with ".." component: ../pgplot/makemake
:info:patch shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_pgplot/work/build" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/pgplot/files/patch-makemake.diff'" returned error 2
:error:patch Target org.macports.patch returned: shell command failed (see log for details)
:debug:patch Backtrace: shell command failed (see log for details)
while executing
"command_exec patch "" "< '$patch'""
(procedure "portpatch::patch_main" line 35)
invoked from within
"$procedure $targetname"
:info:patch Warning: the following items did not execute (for pgplot): org.macports.activate org.macports.patch org.macports.configure org.macports.build org.macports.destroot org.macports.install
:notice:patch Log for pgplot is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_pgplot/main.log
I would appreciate any help here. Architecture is Mac OS X 10.6.8. Thanks!
Change History
comment:1 Changed 23 months ago by jmr@…
- Keywords pgplot patch removed
- Owner changed from macports-tickets@… to mcalhoun@…
- Port set to pgplot
- Description modified (diff)
- Summary changed from pgplot installation fails while installing patches to pgplot: patching fails due to ".." path component
comment:2 Changed 22 months ago by swinbank@…
An easy way to fix this is to use a newer version of patch, as provided by the gpatch port. Changing the Portfile as follows does the trick:
--- /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/graphics/pgplot/Portfile 2011-07-24 18:29:26.000000000 +0200
+++ Portfile 2011-07-24 18:28:34.000000000 +0200
@@ -33,9 +33,10 @@
sha1 1f1c9aa17eeec9a2fb23fd15a0e4a91dcc49ddc1 \
rmd160 4c21cad6613772f4104c65ac3d8d9a42e3c4afe1
+patch.cmd gpatch
patchfiles patch-makemake.diff patch-drivers.list.patch patch-proccom.c.diff
depends_lib port:libpng port:zlib port:xorg-libX11
-depends_build bin:perl:perl5 port:pkgconfig
+depends_build bin:perl:perl5 port:pkgconfig port:gpatch
# Tell the compiler not to treat backslash characters as C-style escape sequences.
configure.fcflags-append -fno-backslash
The pgplot patchfiles haven't changed in 2 years, though, and pgplot built fine for me the last time I tried, so I'm not sure why this is biting now. Has /usr/bin/patch been changed recently?
comment:3 Changed 22 months ago by ryandesign@…
- Cc ryandesign@… added
Yes. /usr/bin/patch in Mac OS X 10.6.8 and 10.7.0 has this additional security restriction. Update the patchfile and portfile to not use ".." components. Do not add a dependency on gpatch.


Please remember to preview and use WikiFormatting, put the name of the port in the Port field, and cc the maintainer.