Questions tagged [rpm]

RPM Package Manager (RPM) is a package management system for unix based operating systems.

RPM Package Manager (RPM) (originally Red Hat Package Manages) is a powerful and mature command-line driven package management system capable of installing, uninstalling, verifying, querying, and updating primarily and nowadays also software packages. Each software package consists of an archive of files along with information about the package in "Binary RPMs" like its version, a description, and the like.

2353 questions
24
votes
1 answer

How to extract a file from an rpm to the current directory?

I recently found out about the existence of cpio and how it can be used, among many other things, to extract individual files from an rpm in conjunction with the rpm2cpio tool, like this: rpm2cpio mypackage.rpm | cpio -idmv…
PabloDario
  • 241
  • 1
  • 2
  • 4
22
votes
6 answers

Can I use rpm to expand the macros in a specfile?

The concrete example being I have lots of specfiles with Source0: or other Source lines containing macros. How can I have these macros expanded without actually starting a build on the specfile or writing my own parser?
user376403
  • 1,085
  • 2
  • 9
  • 18
21
votes
3 answers

Installing git on a cPanel server

I need to install git on cPanel but I am finding a lot of information indicating that this is not a simple process. I have a cPanel/WHM instance on a CentOS distribution and am trying to install git without breaking cPanel. The information I have…
Ali Samii
  • 1,672
  • 4
  • 28
  • 49
21
votes
3 answers

python distutils not include the SWIG generated module

I am using distutils to create an rpm from my project. I have this directory tree: project/ my_module/ data/file.dat my_module1.py my_module2.py src/ header1.h …
microo8
  • 3,568
  • 5
  • 37
  • 67
20
votes
2 answers

Python RPM I built won't install

Because I have to install multiple versions of Python on multiple Oracle Linux servers which are built via a kickstart process, I wanted to build a python rpm for our yum repository. I was able to build Python manually using 'make altinstall' which…
Ilane
  • 484
  • 7
  • 18
20
votes
1 answer

Rpm upgrade handling of config files

I'm playing around with the rpm -upgrade command and noticed rpm has different ways of handling modified configuration files so it doesn't get lost during the upgrade. From what I understand, if a config file was modified and the package is upgraded…
user459811
  • 2,874
  • 10
  • 37
  • 63
20
votes
3 answers

rpmbuild Installed (but unpackaged) files source

I'm trying to build an RPM from binaries on a REDHAT 6 system. I have all the files included in the %files section (find /path/to/fake/install -type f >> specfile) When I run rpmbuild -bb specfile --target x86_64 I get Checking for unpackaged…
Trevor
  • 1,369
  • 2
  • 13
  • 28
19
votes
3 answers

How do you make _topdir relative to the location of the .spec file when building an RPM?

I have a .spec file that relies on a variable called _topdir. Right now when you checkout the SRPM source from git, you have to go and change where _topdir is pointing to to get the rpmbuild to function correctly. # We need the following line so…
user177800
19
votes
5 answers

what does the rpmbuild warning "File listed twice" ACTUALLY MEAN?

I need to specify common attributes for one of the major directories in the package, and special permission for some of it subdirs. e.g. %files %attr(-, myuser, mygroup) /opt/myapp %attr(750, myuser, mygroup) /opt/myapp/bin # no exec permission to…
davka
  • 13,974
  • 11
  • 61
  • 86
19
votes
7 answers

Where to find packages names and versions for RedHat?

How can I find out whether a specific RedHat release (RHEL4, RHEL5...) contains a certain package (or a certain version of a package)? For Debian and Ubuntu, there's packages.debian.org and packages.ubuntu.com; is there a similar web site for…
oliver
  • 6,204
  • 9
  • 46
  • 50
18
votes
2 answers

How to instruct yum to install a specific package (rpm) from a specific repo

If the rpm package is available in multiple repos (configured in /etc/yum.repos.d/ directory), yum is scanning all the repo files and installing it from the one which has the latest version of that package. I want the package to be downloaded from a…
Vivek
  • 11,938
  • 19
  • 92
  • 127
18
votes
3 answers

Define Version with script in RPM spec file

I have an RPM Spec file, building on rhel7 with rpmbuild, where I would like to define the Version with a script. I read here http://www.techrepublic.com/article/rpmproc-spec-file/ , That I can do this: %define version 1.2 Version: %{version} And…
Jimmie
  • 397
  • 2
  • 5
  • 20
18
votes
2 answers

Installing an empty directory with RPM

In my install section of my rpm Spec file I have a bunch of mkdir's to create the directories I need. The ones that don't have any files installed in them get pruned out in the end and don't end up getting created. How can I ensure that the empty…
Nikordaris
  • 2,297
  • 5
  • 20
  • 30
18
votes
1 answer

Difference between rpm -ivh and rpm -Uvh

Hi i am newbie in linux can anyone explains me the difference between rpm -ivh and rpm -Uvh
zaree
  • 641
  • 2
  • 6
  • 15
18
votes
5 answers

Erase multiple packages using rpm or yum

I was given access to a server with 50+ php rpms installed. I'm trying to remove them all. Basically, I'm trying to combine these two commands: rpm -qa | grep 'php' and rpm --erase I know a little about pipes and redirection, but I don't see how…
jerry
  • 2,743
  • 9
  • 41
  • 61