software package management l.
Skip this Video
Loading SlideShow in 5 Seconds..
Software Package Management PowerPoint Presentation
Download Presentation
Software Package Management

Loading in 2 Seconds...

  share
play fullscreen
1 / 14
Download Presentation

Software Package Management - PowerPoint PPT Presentation

RexAlvis
352 Views
Download Presentation

Software Package Management

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Software Package Management WeeSan Lee <weesan@cs.ucr.edu>

  2. Roadmap • What is software package management? • RPM • YUM • pkgtools

  3. 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) • Meta-package manager • Locate packages on the Internet, download, install and analyze inter-package dependencies. eg. • yum (rpm) • apt-get (deb and rpm)

  4. RPM • Redhat Package Management • To query what software packages have been installed • $ rpm -qa • To query a software package • $ rpm -q emacs • To install a software package • $ rpm -i emacs-21.4-19.el5.i386.rpm • Error: Failed dependencies: • To uninstall/erase a software package • $ rpm -e emacs

  5. RPM • Disadvantages • Very primitive • Have to resolve software dependencies manually

  6. 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 installed • gcc.i386 4.1.2-14.e15 installed • … • Available Packages • … • emacs.i386 21.4-19.e16 base • …

  7. YUM • To find out if emacs has been install • $ yum list emacs • To install emacs • $ yum install emacs • To remove emacs • $ yum remove emacs

  8. Some Observations • All software packages are installed to the following directories: • /usr/bin/ • /etc/ • /usr/lib/ • /usr/include • … • What’s wrong with this picture? • Too Window’ish - everything goes to system32 • No idea which files belong to which packages • What’s wrong with that? • Need to reinstall all packages when rebuilding a system

  9. 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 • … • What’s 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 !!!

  10. 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

  11. pkgtools • To compile the source • $ gzip -cd /import/src/emacs-22.1.tar.gz | tar xvfp - • $ ./configure --prefix=/import/pkgs/emacs • $ make • $ make install • To install/enable (make soft-links) emacs • $ pkginstall emacs • To uninstall/disable (remove soft-links) emacs • $ pkgremove emacs • To find out the info of a software • $ pkginfo emacs • emacs-20.7 weesan ftp://ftp.gnu.org/gnu/emacs/ Wed Oct 16 18:02:26 PDT 2002 *

  12. pkgtools • Advantages? Disadvantages? • Why /import? Why not /usr/local? • Similar reason why we have /usr/csshare

  13. 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

  14. 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