[CentOS] Compile vs. RPM

Mon Jan 9 12:27:40 UTC 2006
Ignacio Vazquez-Abrams <ivazquez at ivazquez.net>

On Mon, 2006-01-09 at 00:18 -0800, Mickael Maddison wrote:
> Hello CentOS,
> 
> I'm an old hat, and have been compiling my own MySQL, Apache, PHP,
> OpenSSL, ModSSL, etc. for my webservers for years.  I'm playing around
> with the RPM installs on CentOS, and have basically been able to get
> most things setup so that they "function" about the same.
> 
> If I could stick to RPM's rather than compiling my own sources, it
> would save me a fair bit of time, but of course, it would limit the
> customization benefit.  what I'm wondering, is if anyone on this list
> has any good reasons why one method would be better, more secure, etc
> than the other.  I'm tempted to start using RPM's instead of compile
> sources.
> 
> Comments appreciated, thanks.

Well, let's look at why tarballs might be better than packages:

- Both are customizable before the build, but packages aren't afterward.

No, wait, once a tarball has been compiled then that's it...

- Tarballs are easier to manage since they all go in /usr/local.

Well, no, they get spread throughout /usr/local. OTOH, packages are
managed on a file-by-file basis in the rpmdb. This also makes it easier
to discover if files have been modified or corrupted since installation.

Okay, I'm out of reasons why tarballs are better. Maybe we should look
at the flipside.

- Package builds are reproducible.

So are tarballs, if you're willing to type in or copy all the commands
you used to install them identical to the letter, *plus* can make sure
that you have exactly the same set of tarballs built or -devel packages
installed before you run configure. Better to just let the spec file
handle all that for you ("hey dumbass, you forgot to install
openssl-devel!").

- Package builds can run arbitrary commands.

So can tarballs, but once again with the typing them in or running a
script. With a spec file it's just *all there*.

- Package builds are archivable.

So are tarballs, at least until you misplace the sheet of paper you
wrote the notes on. SRPMs can easily be transmitted via NFS, SMB,
optical media, etc., as a single file, and are rebuildable by running
"rpmbuild --rebuild" against them. Easy peasy.

Well, those are my reasons for using packages over tarballs. I'm sure
others have their reasons, but I can only speak for myself.

-- 
Ignacio Vazquez-Abrams <ivazquez at ivazquez.net>
http://centos.ivazquez.net/

gpg --keyserver hkp://subkeys.pgp.net --recv-key 38028b72
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.centos.org/pipermail/centos/attachments/20060109/28285938/attachment-0005.sig>