jordansissel / fpm

Effing package management! Build packages for multiple platforms (deb, rpm, etc) with great ease and sanity.
http://fpm.readthedocs.io/en/latest/
Other
11.13k stars 1.07k forks source link

// , Missing requirement: Need executable 'rpmbuild' to convert dir to rpm {:level=>:error} #997

Open v6 opened 9 years ago

v6 commented 9 years ago

// , Shouldn't the README mention the need for rpmbuild, or for the Debian equivalent, for building .rpm or .deb` files?

This might seem obvious, but it stumped me for a few minutes, at least:

$ sudo yum install rpmbuild                                                            [ruby-2.2.3]
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.advancedhosters.com
 * epel: fedora.mirrors.pair.com
 * extras: centos.mirror.constant.com
 * updates: mirror.es.its.nyu.edu
No package rpmbuild available.
Error: Nothing to do
[~/shared]$ sudo yum search rpmbuild                                                             [ruby-2.2.3]
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.advancedhosters.com
 * epel: fedora.mirrors.pair.com
 * extras: centos.mirror.constant.com
 * updates: mirror.es.its.nyu.edu
============================================ N/S matched: rpmbuild ============================================
drupal7-rpmbuild.noarch : Rpmbuild files for drupal7
perl-macros.x86_64 : Macros for rpmbuild

  Name and summary matches only, use "search all" for everything.

Perhaps I'm assuming too low of a common denominator among my fellow developers, but this does seem like it's worth mentioning in the README, at least.

P.S. Whoever is doing the dirty work to keep the tests and niggly weirder parts of FPM going, you have my silent appreciation. It's saved me many an hour.

glensc commented 9 years ago

i think package is named rpm-build

ps, what's with the "//" everywhere you write?

hatt commented 9 years ago

As @glensc says, the package is called rpm-build and is documented in the CentOS and Fedora packaging guidelines. I think the mistake here is assuming FPM reimplements everything. As much as we'd like to be native Ruby (see projects like arr-pm), it isn't feasible so often we fall back to the regular tools and wrap them in a consistent way. The error message and tests are pretty clear on what's going on here so while FPM doesn't expect you to know what's required on target systems, it does expect your local system to be properly setup. People tend to use the tools they're comfortable with so I think this is a fair expectation.

Thanks for the feedback on tests, we could always write more but it's good to see the effort we've put into them being appreciated :smile:

pimjansen commented 6 years ago

Have the same issue on Ubuntu, seems that the docs are invalid since it needs package "rpm" too on Ubunu/Deb:

sudo apt-get install rpm

steffanhalv commented 6 years ago

For macOS:

brew install rpm

mathieu-aubin commented 6 years ago

yum provides */rpmbuild

would give you a list of the packages that provide any file named rpmbuild.. This is just for information purposes

yum search rpm

could have also been of help

cheseremtitus24 commented 3 years ago

yum provides */rpmbuild

would give you a list of the packages that provide any file named rpmbuild.. This is just for information purposes

yum search rpm

could have also been of help

dnf install rpm-build.x86_64

mig8447 commented 11 months ago

For macOS:

brew install rpm

This is no longer possible since RPM now requires Linux in brew

jordansissel commented 11 months ago

This is no longer possible since RPM now requires Linux in brew

ahh that’s a bummer. I’m sorry this now seems out of our hands. I do hope to eventually move away from requiring rpmbuild which would help with this problem. If this becomes more important to folks, I’m available for hire to improve fpm such that rpm and rpmbuild are not required for building rpms.

the change in brew’s rpm recipe is here: https://github.com/Homebrew/homebrew-core/pull/144033 with a small note in the commit message that they believe rpm has no use on macos.

jordansissel commented 11 months ago

I don’t know why GitHub reopened this when I commented 🤷‍♂️

glensc commented 7 months ago

I don’t know why GitHub reopened this when I commented 🤷‍♂️

Because there are two buttons in closed issues where you have enough mana to re-open issue

image