APT for RPM Simplified package management for rpm

  • Slides: 27
Download presentation
APT for RPM Simplified package management for rpm based distributions Rosario Esposito 1 Francesco

APT for RPM Simplified package management for rpm based distributions Rosario Esposito 1 Francesco Maria Taurino 1, 2 Gennaro Tortone 1 INFN - Napoli 1 INFM - UDR Napoli 2 HEPi. X/HEPNT 2003 – Vancouver

Linux Linux strengths allowed this operating system to gain a central place in the

Linux Linux strengths allowed this operating system to gain a central place in the IT market Package management played an important role in this process The Linux system’s coherency is assured maintaining databases of installed files. In this way installing or removing programs gets an easy task Nowadays only few programs are installed using source files HEPi. X/HEPNT 2003 – Vancouver 2

Packages In more widespread linux distributions, programs are distributed in binary RPM, DEB or

Packages In more widespread linux distributions, programs are distributed in binary RPM, DEB or modified TGZ formats RPM (Red. Hat Package Management) packages are used on Red. Hat, Mandrake, Suse, Conectiva DEB are used on the open source distribution Debian and its forks Modified TGZ are used on Slack. Ware HEPi. X/HEPNT 2003 – Vancouver 3

Dependencies Dependencies management is a very useful feature of package management software They keep

Dependencies Dependencies management is a very useful feature of package management software They keep systems in a consistent state and guarantee the applications to run in the expected way rpm or dpkg commands have limited dependencies management features They can report which library a package relies on, but the library can itself relies on other packages… HEPi. X/HEPNT 2003 – Vancouver 4

Scenarios System Administrator After installation, usually an os needs some updated packages Experiment software

Scenarios System Administrator After installation, usually an os needs some updated packages Experiment software has to be installed on machines Grid Add grid programs to installed machines HEPi. X/HEPNT 2003 – Vancouver 5

Dependencies - Example Installing a package “mod_test 1” : # rpm -Uvh mod_test 1

Dependencies - Example Installing a package “mod_test 1” : # rpm -Uvh mod_test 1 -xxx. rpm error: failed dependencies: package-a 1 is needed by mod_test 1 # rpm -Uvh package-a 1 -xxxx. rpm error: failed dependencies: package-b 2 is needed by package-a 1 # rpm -Uvh package-b 2 -xxxx. rpm And so on… HEPi. X/HEPNT 2003 – Vancouver 6

Some solutions Up 2 date – Red. Hat Red. Carpet – Ximian YOU (Ya.

Some solutions Up 2 date – Red. Hat Red. Carpet – Ximian YOU (Ya. ST Online Update) – Suse YUP (Yellow. Dog Updater) – Yellow. Dog PPC Urpmi – Mandrake YUM (Yellow. Dog Updater Modified) APT (Advanced Packaging Tool) – Debian (and rpm. . . ) HEPi. X/HEPNT 2003 – Vancouver 7

Up 2 date et al. . . Up 2 date, Red. Carpet, YOU and

Up 2 date et al. . . Up 2 date, Red. Carpet, YOU and YUP solve the dependencies and upgrade problems for rpm. Red. Carpet is also available for Debian They are bounded to Red. Hat, Ximian, Suse and Yellow. Dog distribution servers, or their mirrors They require expensive software in order to create ad -hoc software repository, so if a package is not available on their repositories it’s not installable with these tools Typically they have an X or ncurses interface Usually they cannot be used in non-interactive way HEPi. X/HEPNT 2003 – Vancouver 8

HEPi. X/HEPNT 2003 – Vancouver 9

HEPi. X/HEPNT 2003 – Vancouver 9

Urpmi (1/2) Urpmi is a wrapper for the rpm commands Available only for Mandrake

Urpmi (1/2) Urpmi is a wrapper for the rpm commands Available only for Mandrake distributions It’s possible to use package repositories different from the Mandrake official ones It has a good graphical front-end, but all functions are also available in command line and in non-interactive mode There are several commands for various functions HEPi. X/HEPNT 2003 – Vancouver 10

Urpmi (2/2) urpmi. addmedia, urpmi. removemedia: remove a media used by urpmi add and

Urpmi (2/2) urpmi. addmedia, urpmi. removemedia: remove a media used by urpmi add and urpmq : query the package database urpmf : search the packages which contain the given file name urpmi : package installation Automatic upgrade on a Mandrake machine # urpmi. update_source ; urpmi --auto-select --media update_source HEPi. X/HEPNT 2003 – Vancouver 11

YUM YUM is a fresh project, based on YUP It’s written in python and

YUM YUM is a fresh project, based on YUP It’s written in python and exploits some portions of code of Anaconda, the Red. Hat installer With YUM you can create ad-hoc packages repositories Currently available only for Red. Hat Its logic is slightly different from APT YOUNG, BUT VERY POWERFUL… http: //linux. duke. edu/projects/yum HEPi. X/HEPNT 2003 – Vancouver 12

APT APT is a system created in the Debian community to automatically manage the

APT APT is a system created in the Debian community to automatically manage the packages dependencies APT can install, remove and upgrade packages, managing dependencies and downloading the packages It’s a frontend to other tools, and it uses the underlying package management system, like the rpm or dpkg commands It’s able to fetch packages from several media (cdrom, ftp, http, nfs), and it can be used to create ad-hoc software repositories HEPi. X/HEPNT 2003 – Vancouver 13

APT – Using (1/3) [root]@[/] # apt-get install nautilus Reading Package Lists. . .

APT – Using (1/3) [root]@[/] # apt-get install nautilus Reading Package Lists. . . Done Building Dependency Tree. . . Done The following extra packages will be installed: bonobo libmedusa 0 libnautilus 0 The following NEW packages will be installed: bonobo libmedusa 0 libnautilus 0 packages upgraded, 4 newly installed, 0 to remove and 1 not upgraded. Need to get 8329 k. B of archives. After unpacking 17. 2 MB will be used. Do you want to continue? [Y/n] HEPi. X/HEPNT 2003 – Vancouver 14

APT – Using (2/3) [root]@[/] # apt-get remove gnome-panel Reading Package Lists. . .

APT – Using (2/3) [root]@[/] # apt-get remove gnome-panel Reading Package Lists. . . Done Building Dependency Tree. . . Done The following packages will be REMOVED: gnome-applets gnome-panel-data gnome-session 0 packages upgraded, 0 newly installed, 4 to remove and 1 not upgraded. Need to get 0 B of archives. After unpacking 14. 6 MB will be freed. Do you want to continue? [Y/n] HEPi. X/HEPNT 2003 – Vancouver 15

APT – Using (3/3) [root]@[/] # apt-cache search pdf kghostview - Post. Script viewer

APT – Using (3/3) [root]@[/] # apt-cache search pdf kghostview - Post. Script viewer for KDE tetex - The Te. X text formatting system. xpdf - A PDF file viewer for the X Window System … [root]@[/] # apt-cache show xpdf … Filename: xpdf-1. 00 -3. i 386. rpm Description: A PDF file viewer for the X Window System. Xpdf is an X Window System based viewer for Portable Document Format (PDF) files. Xpdf is a small and efficient program which uses standard X fonts. HEPi. X/HEPNT 2003 – Vancouver 16

APT for RPM Brazilian distribution Conectiva ported the apt system on its linux distribution,

APT for RPM Brazilian distribution Conectiva ported the apt system on its linux distribution, which uses rpm packages Apt is now available for all distributions using rpm, also thanks to the Source. Forge project apt 4 rpm (http: //apt 4 rpm. sourceforge. net) Some features of Debian apt are not yet available, like package priority or requests to change configuration files, because of some differences in deb and rpm format HEPi. X/HEPNT 2003 – Vancouver 17

APT – repository creation Create the directory tree <arch>/RPMS. os, <arch>/RPMS. updates, <arch>/base (for

APT – repository creation Create the directory tree <arch>/RPMS. os, <arch>/RPMS. updates, <arch>/base (for apt specific files) Ex: /linux/apt/redhat/7. 3/i 386/RPMS. os In RPMS. os: copy the distribution rpms In RPMS. updates: copy the updates rpms Give the command genbasedir --topdir=/linux/apt --bloat --bz 2 only redhat/7. 3/i 386 os (for “os” section) genbasedir --topdir=/linux/apt --bloat --bz 2 only redhat/7. 3/i 386 updates (for “updates” section) HEPi. X/HEPNT 2003 – Vancouver 18

APT – repository source. list Create an apache virtual host <Virtual. Host *> Server.

APT – repository source. list Create an apache virtual host <Virtual. Host *> Server. Name apt. na. infn. it Document. Root /linux/apt <Directory /linux/apt> Options +Indexes </Directory> </Virtual. Host> The source. list file to access this repository is rpm http: //apt. na. infn. it redhat/7. 3/i 386 os updates HEPi. X/HEPNT 2003 – Vancouver 19

APT – Naples repository We have an apt repository in our campus in Naples,

APT – Naples repository We have an apt repository in our campus in Naples, accessible at http: //apt. na. infn. it apt packages for Red. Hat 7. 2, 7. 3, 8 e 9 and corresponding sources. list files for os and updates are available on this site Updates rpms and apt lists are updated every night HEPi. X/HEPNT 2003 – Vancouver 20

Distros and repositories Yellow. Dog Linux PPC includes apt New Red. Hat beta distro

Distros and repositories Yellow. Dog Linux PPC includes apt New Red. Hat beta distro includes apt Suse is plannig to include apt Some public repositories for Red. Hat www. freshrpms. net apt-rpm. tuxfamily. org apt. 42 h. de HEPi. X/HEPNT 2003 – Vancouver 21

APT - Benefits Apt simplifies package management on rpm based distributions, even on Red.

APT - Benefits Apt simplifies package management on rpm based distributions, even on Red. Hat, most used distribution in HEP environments Systems update is possible with only two commands: # apt-get update; apt-get -y upgrade Using a local repository is possible to upgrade machines using no external links It is possible to include non standard packages in local repositories. . . HEPi. X/HEPNT 2003 – Vancouver 22

In. GRID - Installing GRID (1/4) We are developing a procedure to install the

In. GRID - Installing GRID (1/4) We are developing a procedure to install the Grid-IT distribution on Red. Hat 7. 3 with kickstart, APT and LCFGng Kickstart Unattended installations Known and well documented behaviour Perhaps more flexible than other tools APT Simplified package management Automatic package download to satisfy dependencies HEPi. X/HEPNT 2003 – Vancouver 23

In. GRID (2/4) LCFGng University of Edinburgh project to setup and maintain Unix systems

In. GRID (2/4) LCFGng University of Edinburgh project to setup and maintain Unix systems It can configure many system files, execute scripts, create users, etc Client-server architecture to manage many systems from a single machine HEPi. X/HEPNT 2003 – Vancouver 24

In. GRID (3/4) RH Kickstart Installation APT “Gridification” LCFGng Configuration HEPi. X/HEPNT 2003 –

In. GRID (3/4) RH Kickstart Installation APT “Gridification” LCFGng Configuration HEPi. X/HEPNT 2003 – Vancouver 25

In. GRID (4/4) We install a RH 73 machine via kickstart Then we run

In. GRID (4/4) We install a RH 73 machine via kickstart Then we run a script # ingrid CE to install computing element packages via APT After the first reboot LCFG customizes all configuration files This system is actually used to install grid resources in the INFN, INFM and Physics Department laboratories in Naples HEPi. X/HEPNT 2003 – Vancouver 26

References Apt - http: //packages. debian. org/apt Apt 4 rpm - http: //apt 4

References Apt - http: //packages. debian. org/apt Apt 4 rpm - http: //apt 4 rpm. sourceforge. net Fresh. RPMS - http: //www. freshrpms. net Red. Carpet – http: //www. ximian. com YUM - http: //linux. duke. edu/projects/yum LCFG – http: //www. lcfg. org In. GRID – http: //people. na. infn. it/~taurino/pres/ingrid. ppt (Italian only) HEPi. X/HEPNT 2003 – Vancouver 27