0% found this document useful (0 votes)
44 views14 pages

Software Package Management: Weesan Lee

This document discusses software package management. It describes common package formats like RPM, DEB, and TAR. It also explains package management tools like RPM, YUM, and APT for querying, installing, and uninstalling packages. It proposes an alternative "pkgtools" system that places each package in its own directory with symbolic links to standard locations. This allows easier rebuilding of systems and sharing of packages over NFS without root privileges.

Uploaded by

geongeo
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views14 pages

Software Package Management: Weesan Lee

This document discusses software package management. It describes common package formats like RPM, DEB, and TAR. It also explains package management tools like RPM, YUM, and APT for querying, installing, and uninstalling packages. It proposes an alternative "pkgtools" system that places each package in its own directory with symbolic links to standard locations. This allows easier rebuilding of systems and sharing of packages over NFS without root privileges.

Uploaded by

geongeo
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

Software Package Management

WeeSan Lee <[email protected]>

Roadmap

What is software package management? RPM YUM pkgtools

What is software package management?

A way to distribute software and configuration Eg.


.tar.gz or tgz (Slackware) .rpm (Red Hat, Fedora, SUSE, ) .deb (Debian, Ubuntu) Locate packages on the Internet, download, install and analyze inter-package dependencies. eg.

Meta-package manager

yum (rpm) apt-get (deb and rpm)

RPM

Redhat Package Management To query what software packages have been installed

$ rpm -qa $ rpm -q emacs $ rpm -i emacs-21.4-19.el5.i386.rpm

To query a software package

To install a software package

Error: Failed dependencies:

To uninstall/erase a software package

$ rpm -e emacs

RPM

Disadvantages

Very primitive Have to resolve software dependencies manually

YUM

Yellowdog Update, Modified To find out what software packages have been installed on a system

$ yum list

Installed Packages gawk.i386 3.1.5-14.e15 gcc.i386 4.1.2-14.e15 Available Packages emacs.i386 21.4-19.e16

installed installed

base

YUM

To find out if emacs has been install

$ yum list emacs


$ yum install emacs $ yum remove emacs

To install emacs

To remove emacs

Some Observations

All software packages are installed to the following directories:


/usr/bin/ /etc/ /usr/lib/ /usr/include Too Windowish - everything goes to system32 No idea which files belong to which packages

Whats wrong with this picture?

Whats wrong with that?

Need to reinstall all packages when rebuilding a system

A Potential Solution?

Each software package goes to individual directory, eg. /import/pkgs emacs goes to /import/pkgs/emacs gcc goes to /import/pkgs/gcc Whats wrong with this picture? Need to setup a PATH for each package, eg.

PATH=/import/pkgs/emacs/bin:/import/pkgs/gcc/bin:

It would be nice if /import/bin/emacs /import/bin/gcc And PATH=/import/bin Wait a minute this is the same problem as /usr !!!

pkgtools

/import/pkgs/emacs A placeholder for individual package, such as emacs /import/src/emacs-22.1.tar.gz A place holder for the source code of the package Make soft-links
/import/bin/emacs -> /import/pkgs/emacs/bin/emacs /import/etc/emacs.conf -> /import/pkgs/emacs/etc/emacs.conf * /import/include/ /import/info/ /import/lib/ /import/man/man1/emacs.1 -> /import/pkgs/emacs/man1/emacs.1 /import/sbin/ /import/share/emacs -> /import/pkgs/emacs/share/emacs * There is no emacs.conf

pkgtools

To compile the source


$ gzip -cd /import/src/emacs-22.1.tar.gz | tar xvfp $ ./configure --prefix=/import/pkgs/emacs $ make $ make install
$ pkginstall emacs $ pkgremove emacs $ pkginfo emacs

To install/enable (make soft-links) emacs

To uninstall/disable (remove soft-links) emacs

To find out the info of a software

emacs-20.7 weesan ftp://ftp.gnu.org/gnu/emacs/ Wed Oct 16 18:02:26 PDT 2002 *

pkgtools

Advantages? Disadvantages? Why /import? Why not /usr/local?

Similar reason why we have /usr/csshare

A side note: setgid on a directory


$ ls -ld /import/etc

drwxrwxr-x 2 root installer /import/etc

$ touch /import/etc/a $ ls -l /import/etc/a

-rw-rw-r-- 1 weesan weesan /import/etc/a

$ chmod g+s /import/etc $ ls -ld /import/etc

drwxrwsr-x 2 root installer /import/etc

$ touch /import/etc/b $ ls -l /import/etc/b

-rw-rw-r-- 1 weesan installer /import/etc/b

Conclusion

rpm or .deb are too primitive yum or apt-get is good for default system installation pkgtools is good for:

Customized or local packages /import can be mounted over NFS for sharing Allow users to install software without root access

You might also like