1

During my time as a SysAdmin, I have encountered applications that provide no rpm packages to install on redhat-based distributions - only a source tarball. The source tarball does not provide a spec file which would simplify the process of rpm package creation. Instead, the source tarball only provides a bash/ksh/ script which must be executed as root to install the application on the system.

I have tried to create an rpm package which essentially runs the install script to perform the install script. I have also tried to do the right thing by attempting to rpmbuild the package as a non-root user, and modifying the install script as best i can to ensure that the script's install dirs refer to rpm enviromentals/macros. But with a complicated install script that is a few hundred lines long, which also calls other scripts into play... well, I was bound to fail in this endeavour.

Is there a better way to package up such .spec-less source tarballs? Would a better solution be to:

  1. somehow take a snapshot of the system before the application install
  2. install the source tarball with the provided install script
  3. take a snapshot of the system after the installation, and determine the changes/additions made by the installation
  4. put the list of changes/additions in a spec file, and create an rpm package this way?

Any useful/relevant/instructive/amusing/profound input and advice to this problem will be much appreciated.

Thank you in advance

hqt
  • 11
  • 2

2 Answers2

0

I've seen many scripts like you mention, and I suspect I can tell you with certainty the company selling you these horrible installs.

Your best bet is to request a proper installable package. Read up on why a package is better than a configure;make;make-install and is better than this install.sh nonsense. Armed with that, even if it's talking points, try and get them into the 3rd millennium . It will be hard, but ultimately most rewarding.

Barring that, you will need that package built (and by now you will have read why). Unfortunately, there are some apps and vendors whose payload can't be packaged, because they compile, query the destination host, look for a license, compile a bit more, etc. My bias here is well-honed.

user2066657
  • 444
  • 1
  • 4
  • 23
0

I think the best solution is to request the upstream to provide a spec file for the applications. Another way could be request experience package maintainer to package the application. Or you can probably explore to checkinstall as it tracked the install file using Makefile. If you want to package yourself, you should read this link as it provides explanation and with many examples.

Jasonw
  • 5,054
  • 7
  • 43
  • 48