Search code examples
fedorapackagingrpm

The flow from updating sources to making a rpm package


I am new to RPM package making, and wandering how to improve the work flow I use for creating the package. One I use I find quite laborious.(Luckily I did this only once ;-)

  1. So, I have an application dir, with python sources, configuration files, shell scripts and bunch of other data files. foo_app/ /etc/stuff /bin/stuff /lib/python/foo/stuff /var/stuff
  2. I copy the foo_app dir into foo_app-1.0.1

  3. I tar it into foo_app-1.0.0.tar.gz and copy it into rpmbuild/SOURCES/

  4. Then I fire from SPECS dir: rpmbuild -ba foo_app.spec and there it is.
  5. Then I install and test the package on remote machine and oops, there are bugs!
  6. I need to fix it on local machine, repackage the whole thing and and test again on remote.

Would there be some tool that would automate or make easier repeating of those steps? Or is there a way to avoid doing steps 2 and 3?


Solution

  • My main suggestion, I think, would be to work on having the application able to run out of a development directory so you don't have to install it locally just to try it. Alternatively have a "make install" target so you can just install it (outside rpm) for testing.

    But answering your question more specifically, here are two ideas:

    A script that exports a .tar.gz from your source control might help (git help archive) on step 2-3.

    If you have the .spec file inside the .tar.gz you can use rpmbuild -ta some.tar.gz to build the rpms from the tar.gz file.