OSX 10.6.8 上的 macports 和补丁问题

发布于 2024-11-19 03:37:35 字数 566 浏览 1 评论 0原文

我似乎无法使用 MacPorts 安装任何东西。当 MacPorts 到达尝试应用补丁的阶段时,不可避免地会出现问题。它发出嘎嘎声是因为显然 /usr/bin/patch 有一个安全补丁,可以防止它自己在目录树中向上修补。典型的错误消息:

:info:patch /usr/bin/patch: **** rejecting file name with ".." component: ../libunwind/include/libunwind.h

我看到有关此问题的一些各种错误报告,例如 https://trac.macports。 org/ticket/29871https://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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

反话 2024-11-26 03:37:35

我不使用 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 as gpatch, 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文