Showing posts with label fedora. Show all posts
Showing posts with label fedora. Show all posts

Saturday, 21 April 2012

Rpm Package Management Quick Reference


An updated version of this article at: RPM Package Management Quick Reference

RPM tool


rpm tool deals with rpm packages directly, but cannot deal with packages placed in a repository. Zypper, Yum,... tools deal with repositories.


$rpm -q package_name #e.g rpm -q subversion Query if a package is installed.

$rpm -qf "*/bash" #find which package owns that file.

#rpm -e package_name #deletes a package.

$rpm -qi package_name # shows info about a package.

$rpm -ql package_name # list files contained in package_name


#rpm -i package.rpm # installs a rpm file package.

#rpm -i --force package.rpm # forces package.rpm installation.

#rpm -qpl foo.rpm # shows the files in foo.rpm file package.

$rpm -q --scripts foo # shows installation and uninstallation scripts for foo package.

$rpm -qR foo # shows which dependencies foo package requires.



ZYPPER (OpenSuse 10.3 and up)


#zypper install foo # installs foo package from repository.

#zypper remove foo # removes a package. e.g: zypper remove python-twisted-conch

$zypper info python-twisted-conch # shows package info

$zypper search python # searchs for packages matching python.

#zipper ref && zipper dup # refresh repositories and then update the system.


YUM (Fedora, etc)

Sunday, 15 March 2009

Creating a FEDORA 10 CHROOT Environment in DEBIAN SID

Fedora is a linux distribution supported by a community: fedoraproject.org and by Red Hat enterprise.
Fedora (Wikipedia)

Current release name is Fedora 10.


Fedora packages are provided in rpm format. We can manage these packages using rpm tool, and use yum to deal with repositories.

Debian sid provides the rpm tool so our first task will be installing it in our Debian system:
#aptitude install rpm

This tool will allow us to install fedora packages in our debian system using a separate database and a different directory than / .


We create the directory to place our Fedora chroot environment:
$mkdir Fedora
$cd Fedora
$mkdir Distro


We are going to download the minimal amount of rpm packages required for our Fedora distro.

Navigating through fedora project web page we can find some mirrors, e.g:
http://glup.uv.es/mirror/fedora/linux/
http://ftp.uni-kl.de/pub/linux/fedora/linux/
Choose one near you.

Within those mirrors we find where packages are:
http://glup.uv.es/mirror/fedora/linux/releases/10/Fedora/i386/os/Packages/
http://ftp.uni-kl.de/pub/linux/fedora/linux/releases/10/Fedora/i386/os/Packages/


We can download every package we need using wget tool.
Although we only show the installing rpm command, you will have to download every rpm package prior to install it.
NOTE: Package version may not coincide, but the same package name and same installing order are mandatory.

If we need some file to satisfy a dependency, but don't know which package contains it, this web page