如何在 MacOS 系统上构建 RPM?

发布于 2024-10-21 04:56:36 字数 302 浏览 9 评论 0原文

我运行的是 Mac OS X 10.6.6。我想构建一些纯数据 RPM。

直到最近,我的大部分开发工作都是在运行 CentOS 的 VM 上完成的,但我已经能够将这些任务一一转移到 Mac 上。我一直在使用 Fink 来访问我需要的开放/免费工具,但我还没有准备好使用 Fink 不稳定版,那里RPM5 软件包已经有一段时间了。

我还尝试从源代码构建 RPM 实用程序,但迄今为止运气不佳。

还有其他人在 Mac 上本地构建 RPM 吗?如果是这样,怎么办?

I'm running Mac OS X 10.6.6. I have some data-only RPMs that I'd like to build.

Until recently I've done most of my development on a VM running CentOS, but one by one I've been able to transition these tasks to the Mac proper. I've been using Fink to access the Open/Free tools I need, but I'm not ready to go to Fink unstable, where the RPM5 package has been for a while.

I've also tried to build the RPM utilities from source, with little luck so far.

Is anyone else building RPMs natively on a Mac? If so, how?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

仲春光 2024-10-28 04:56:36

您可以使用 Homebrew 包管理器在 MacOS 上安装 rpmbuild。

brew install rpm

这会安装一堆软件包,包括用于构建 rpm 的 rpmbuild。然后您可以运行以下命令来创建 rpm

rpmbuild <specfile>

You can install rpmbuild on MacOS using Homebrew package manager.

brew install rpm

This installs a bunch of packages including rpmbuild which is used to build an rpm. You can then run the following command to create an rpm

rpmbuild <specfile>
无可置疑 2024-10-28 04:56:36

我今天也遇到了同样的情况,但我刚刚通过首先安装 MacPorts 然后从那里安装来成功构建并运行 rpm。在你可以构建之前,它需要绝对可笑的 1.8GB 下载,因为它需要从 Apple Store 安装 1.6GB 的(免费)Xcode 开发人员工具包,然后安装另一个 140MB 的命令行工具包。

因此,首先请仔细遵循此处明确说明的每一步来安装 MacPorts:
http://www.macports.org/install.php

完成所有这些操作后,请务必运行更新命令(如安装说明中所述),以便下载可用的软件 ports 包(如果不这样做,它会说“找不到 rpm”):

sudo port -v selfupdate

完成所有操作后,运行以下命令来获取 rpm 并构建它:

sudo port install rpm

在我的 2011 年初配备 Lion 的 MacBook Pro 上,下载所有内容并进行构建大约需要 10 分钟。

整个过程需要一段时间,但很有效。祝你好运!

I was in this same situation today, but I've just successfully built and run rpm by first installing MacPorts and then installing from there. It requires an absolutely ludicrous 1.8GB of downloads before you can even build because it requires installing the (free) Xcode developer tools package from the Apple Store at 1.6GB, then another 140MB package of command line tools.

So, first carefully follow every step of the clear instructions here to install MacPorts:
http://www.macports.org/install.php

After doing all that, be sure to run the update command (as mentioned in the install instructions) so that it downloads the available software ports package (it'll say "can't find rpm" if you don't):

sudo port -v selfupdate

Once all that is done, run the following to fetch rpm and build it:

sudo port install rpm

On my early 2011 MacBook Pro with Lion, it took about 10 minutes to download everything and build.

The whole process takes a while, but it works. Good luck!

呆橘 2024-10-28 04:56:36

正如 @user132447 指出的,您需要将驱动器重新格式化为 MacOS 扩展(区分大小写)。

作为 CentOS 一部分的 rpmRPM5 构建。两者是两个不同的项目。稍后可能会在 MacOS 上运行,但我建议您使用仅基于 RPM 的虚拟机(或单独的系统)。这肯定会节省您长时间修复和关心不那么有用的问题。

rpm.org 的 RPM 尚不支持 MacOS(我猜它是构建的 - 至少是最新版本),而这是 CentOS 使用的 rpm。

As @user132447 pointed out, you will need to reformat the drive to MacOS extended (case sensitive).

The rpm which is part of CentOS is different then the RPM5 build. Both are two different projects. And later may work on MacOS, but I would recommend you to go using VMs (or separate systems) which are RPM based only. That will surely save you long hours of fixing and caring about not so useful issues.

RPM from rpm.org doesn't support MacOS yet (it builds I guess - at least the latest version), and this is the rpm which CentOS uses.

热情消退 2024-10-28 04:56:36

我一直在使用 RPM for Darwin 来构建基于 Maven 的项目来创建 RPM 工件。

I've been using RPM for Darwin for building maven based projects that create RPM artifacts.

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