Has anyone created .rpm or .deb files for RedHat, SuSe or Debian systems? Do you do everything from the command line or have you found any graphical tools to help with the process? Mainly so that you don't forget any important parts. This may not be necessary on a Linux system as there are fewer pieces to an installed app than in Windows and no registry (unless you count gconf). Please point me at any docs/URLs you found to be helpful in learning the process. I've skimmed the Debian Policy Manual for the important points, but I assume that more of it will become clear after I build and test a few .debs.
I'm looking into the process to see if I can do this, since that is what I do in my day job for Windows systems. I use Wise Package Studio and have used SMS Installer and Ghost Installer to make .msi and .exe files. I am currently looking at Installshield and Nullsoft Installer to add to those Windows skills. I haven't yet broken open an RPM or DEB, but have looked at the examples in the couple of howtos I read. http://www.novell.com/coolsolutions/cooldev/features/a_redhat_rpms_to_suse_c... http://linuxdevices.com/articles/AT8047723203.html http://www.debian.org/doc/debian-policy/ch-binary.html
One thing I like about Wise Package Studio is the ability to see all the files to be installed as a part of a package and quickly switch to a view of the registry, .ini files, Add/Remove Programs Menu info and settings, install order or other views of the parts of the package. Most of this appears like browsing the filesystem in Konquerer/Explorer. You can easily add individual files/registry keys or whole directories/regkey trees.
Brian Kelsay
Quoting Brian Kelsay [email protected]:
Has anyone created .rpm or .deb files for RedHat, SuSe or Debian systems?
[snip]
Please point me at any docs/URLs you found to be helpful in learning the process.
-- Dave Hull http://insipid.com
Hi,
On Wed, Dec 08, 2004 at 02:24:35PM -0600, Brian Kelsay wrote:
Has anyone created .rpm or .deb files for RedHat, SuSe or Debian systems? Do you do everything from the command line or have you found any graphical tools to help with the process?
Take a look at checkinstall
It will do the hard part for an rpm .spec file, haven't tried it with .deb files. From the introduction:
A lot of people has asked me how can they remove from their boxes a program they compiled and installed from source. Some times - very few - the program's author adds an "uninstall" rule to the Makefile, but that's not usually the case. That's my primary reason to write checkinstall. After you ./configure;make your program, It will run "make install" (or whatever you tell it to run) and keep track of every file modified by this installation, using the excellent installwatch utility written by Pancrazio 'Ezio' de Mauro [email protected].
When "make install" is done, checkinstall will create a Slackware, RPM or Debian package and install it with Slackware's installpkg, "rpm -i" or "dpkg -i" as appropriate, so you can view it's contents in /var/log/packages or remove it with removepkg (for Slackware), "rpm -ql" and "rpm -e" (RPM) or "dpkg -I" and "dpkg -r" (Debian).
A lot of RPM creation depends on how well the source package has been structured. For instance, you can build an RPM for the most recent spamassassin by downloading Mail-SpamAssassin-3.0.1.tar.gz and then running:
rpmbuild -tb Mail-SpamAssassin-3.0.1.tar.gz
That won't work on your average source package though. If a source package were set up properly for rpmbuild, it would probably include an "Uninstall" hook in the makefile too.
One method is to pipe the output from the installation commands (make configure, make, make install, whatever) into a file so you can check what was done and reverse it. Or just read the makefile.
Hi,
On Thu, Dec 09, 2004 at 05:35:56PM -0600, Jonathan Hutchins wrote:
A lot of RPM creation depends on how well the source package has been structured. For instance, you can build an RPM for the most recent spamassassin by downloading Mail-SpamAssassin-3.0.1.tar.gz and then running:
rpmbuild -tb Mail-SpamAssassin-3.0.1.tar.gz
That won't work on your average source package though. If a source package were set up properly for rpmbuild, it would probably include an "Uninstall" hook in the makefile too.
Actually, I've been surprised at how often this works. "rpmbuild -tb" means "use the rpm .spec file you find inside the tarball". If you have a rpm .spec file then you're home free. The .spec file has a list of files that get installed so the uninstall (rpm -e) works. If you have a .spec file then you don't need checkinstall. Checkinstall's claim to fame is that it uses "installwatch" to make a list of files that get installed and then uses that to make a .spec file.
Your point about how the source package is structured (in particular the makefile) does affect checkinstall. It defaults to "make install" as the command that causes the files to be installed but realizes that this is not always the case. Its examples are "make install_packages" or "make modules_install" or "install.sh". So it requires that you read the README and/or INSTALL files to see what to do. This is probably why it isn't already part of something like Synaptic, Aptitude, or Karchiver.