Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

srpm support? #237

jordansissel opened this Issue Jun 29, 2012 · 14 comments


None yet
9 participants

jordansissel commented Jun 29, 2012


fpm -s srpm -t deb <url or path to srpm>

Could be fun.

"Could be fun"

Your definition of fun.

But its why I love you.


kwilczynski commented Jul 3, 2012

LOL, definitely a +1

wzzrd commented May 27, 2013

Would this also bring -t srpm?


jordansissel commented May 27, 2013

How would '-t srpm' behave (given fpm generally produces what rpm calls 'binary' packages, a 'binary srpm' seems like a strange idea) - Can you explain how you'd like that to work? :)

+1, I'd love to see this as a feature


jordansissel commented May 28, 2013

For folks +1'ing this, do you have a specific use case in mind?

I'm currently packing some quite heavily modified (modified paths/filenames to fit around other binaries, rather than code) Ruby RPMs, and I've found adapting Fedora RPMs for el5 use frustrating because of various dependencies and other issues. FPM creates lovely RPMs of my dir trees (built with rbenv and then modified by hand) but as a build process it's not really sustainable; as soon as we start patching, we're in the kind of mess than RPM helps avoid. I'd have loved FPM to knock out an SRPM that I know will build and that I can then modify as needed or just keep around in case an urgent patch or whatever is required; in my case, I'm just writing spec files from scratch and updating them as needed but each ones takes that bit of time and has those few complexities that FPM's normal functions are nice at avoiding.

wzzrd commented May 28, 2013

What he said ;)

It also would make sure I can reproduce the RPM from the SRPM at some point with absolute certainty it will be the same as the RPM I had FPM make originally, save for some fix I need to make, where using FPM to recreate the RPM might yield slightly different results as the program evolves.


jordansissel commented May 28, 2013

@robredpath have you tried bernd/fpm-cookery? Might be useful here. It helps you write repeatable build processes that are simple and invokes fpm to do the packaging step at the end.

I hadn't! Looks interesting, thanks.

herlo commented Feb 12, 2015

What about having output be srpm or dsrc? I think there are some valid use cases for this, including being able to adjust a few things and rebuild. Plus, rebuilding for the OS (like Fedora) requires source code. It could be very helpful.

I understand that gem2rpm is there, but why not provide both the srpm and the binary rpm as an example.

+1 I would love to have this

I build and package a lot of Debian/Ubuntu packages from source, and occasionally there is a source RPM but no Debian control/etc files, so this could really speed up the process of hunting down the dependencies, figuring out the proper flags, looking up the syntax for how to properly set the DESTDIR in that particular build system, etc.

+1 would love to have it at a target. It's normal to create an SRPM with rpmbuild -bs

# rpmbuild --help
Usage: rpmbuild [OPTION...]

Build options with [ <specfile> | <tarball> | <source package> ]:
  -bp                           build through %prep (unpack sources and apply patches) from <specfile>
  -bc                           build through %build (%prep, then compile) from <specfile>
  -bi                           build through %install (%prep, %build, then install) from <specfile>
  -bl                           verify %files section from <specfile>
  -ba                           build source and binary packages from <specfile>
  -bb                           build binary package only from <specfile>
  -bs                           build source package only from <specfile>

I would like this feature because of the Fedora packaging process that requires an SRPM and spec file. I know there are other tools to do that. But it would be nice having it integrated into fpm to make the whole workflow simpler :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment