OSX 10.6.8 上的 macports 和补丁问题
我似乎无法使用 MacPorts 安装任何东西。当 MacPorts 到达尝试应用补丁的阶段时,不可避免地会出现问题。它发出嘎嘎声是因为显然 /usr/bin/patch
有一个安全补丁,可以防止它自己在目录树中向上修补。典型的错误消息:
:info:patch /usr/bin/patch: **** rejecting file name with ".." component: ../libunwind/include/libunwind.h
我看到有关此问题的一些各种错误报告,例如 https://trac.macports。 org/ticket/29871 和 https://trac.macports.org/ticket/29813,但没有真正的解决方案。
有补丁可以打吗?
I can't seem to install anything with MacPorts. Problems inevitably arise when MacPorts gets to the stage where it tries to apply patches. It croaks because apparently /usr/bin/patch
has a security patch that prevents itself from patching upwards in the directory tree. A typical error message:
:info:patch /usr/bin/patch: **** rejecting file name with ".." component: ../libunwind/include/libunwind.h
I see some various bug reports on this issue such as https://trac.macports.org/ticket/29871 and https://trac.macports.org/ticket/29813, but no real solutions.
Is there a patch to patch?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不使用 Macports(所以我无法测试这个可能的解决方案),但也许您可以尝试安装 GNU 版本的
patch
。 Macports 中确实有一个 portfile。它安装为gpatch
,但您可以轻松创建一个符号链接,例如/opt/bin/patch -> /opt/bin/gpatch
。此外,您需要确保路径中的/opt/bin
出现在/usr/bin
之前。尽管端口文件需要应用补丁,但幸运的是它不使用任何
..
路径组件。这个安全补丁似乎起源于二月份2011 年。由于 2.6.1 早于此,我相信这种方法应该有效。
I do not use Macports (so I cannot test this possible solution), but perhaps you could try installing the GNU version of
patch
. There is indeed a portfile for it within Macports. It installs asgpatch
, but you could easily create a symbolic link such that/opt/bin/patch -> /opt/bin/gpatch
. Additionally, you will need to ensure that/opt/bin
appears before/usr/bin
in your path.Although the portfile requires a patch to be applied, it fortunately does not use any
..
path components.It appears as though this security patch originated in February of 2011. As 2.6.1 predates this, I believe this method should work.