What is packaging and why should you care?
Or: Only heathens install tarballs
Todd Zullinger <
tmz+cplug@pobox.com
>
Anal retentive package monkey (and small-time
Fedora packager
)
Package management series goals
Provide an understanding of what packages are and why they should be used
Explain how to take advantage of various package management tools
Teach how to create new packages or update existing packages in various formats
Present information needed to make an informed choice on which packaging system best fits a particular environment
Persuade you to never allow a tarball to be installed on any of your systems
Briefly, what is a package?
Collection of files, metadata, and helper scripts to install and configure software on your system
Instructions for extracting source code from a tarball (or other archive), building it into a binary, and installing it
Database of package information that can be queried
From tarball to binary
configure && make && make install
This is
WRONG!
Very, very
WRONG!!
You are a
bad admin
if you do this
You might as well kill kittens
Think of the kittens
No (sane) way to reliably remove software
No (sane) way to verify files installed have not been modified
No (sane) way to handle dependencies
No (sane) way to record build options or what patches were applied
No (sane) way to prevent file conflicts
Numerous methods and tools used
Build tools must be installed
Packages to the rescue!
Accountability
Reproducibility
Dependency tracking
Easy install
Clean removal
Sysadmin sanity
Profit!
Accountability
Is
foo
installed? What version?
What files does
foo
install?
Where did
/usr/bin/foo
come from?
Is
foo
a legitimate package from my distro?
What have I installed recently?
Reproducibility
Build once, install on multiple systems
Documented build process, compile options, patches, etc.
Eliminate spurious differences between systems
Ensure systems have the same packages and versions installed
Dependency tracking
Package
foo
may require
libcrack
Ensure
libcrack
is installed when
foo
is installed
Update
foo
when
libcrack
is updated (if necessary)
Remove
foo
when
libcrack
is removed
Some systems even know if
libcrack
was installed as a dependency of
foo
and can remove
libcrack
when foo is removed
Track packages needed in order to build
Easy install
Ensure any user or group accounts it needs are created
Modify config files
Update desktop menus, icons, font caches, etc.
Configure, enable, and/or start services
Execute system commands and/or run scripts
Clean removal
Delete all files that were installed
Remove any users or groups that were created
Undo config file changes
Stop running services provided by the package
Execute system commands and/or run scripts
Common package formats
deb — used on Debian, Knoppix, Ubuntu and others
rpm — used on CentOS, Fedora, Mandriva, Red Hat, SUSE and others
tgz — used on Slackware
ebuild — used on Gentoo
Coming soon to CPLUG
If you liked this talk, you might also enjoy:
Getting to know your package manager
debs
rpms
ebuilds
Packaging roundup (aka, My package manager can beat up your package manager)
http://pobox.com/~tmz/cplug/packaging-intro/