Questions tagged [rpm-spec]

The rpm spec file contains the information required by RPM to build a package.

The spec file is at the heart of RPM's packaging building process. Similar in concept to a , it contains information required by RPM to build the package, as well as instructions telling RPM how to build it. The spec file also dictates exactly what files are a part of the package, and where they should be installed.

(From the max-rpm book)

This tag is closely related to and . You should research those tags to see if a similar question exists.

578 questions
4
votes
2 answers

Revert rpm installation on %post failed

In %post, I am running few tests that will validate the rpm installation. But If tests got failed or post script failed, How can I revert the rpm installation ?
Mohyt
  • 990
  • 2
  • 10
  • 26
4
votes
1 answer

RPM Spec file - how to get rpm package location in %pre script

I am working with RPM package manager for about a month now. Currently I want to use rpm -U to upgrade already existing content from previous RPM execution but I need to know the rpm package location on the file system. The only way I can think of…
even2be
  • 415
  • 1
  • 3
  • 7
4
votes
2 answers

Escaping in rpm spec file

I am trying to set the rpath in my spec file with a statement like export LDFLAGS="-Wl-rpath=$ORIGIN/../lib" But I can't correctly escape "$ORIGIN". I need the command to gcc to contain the string "$ORIGIN", not expand it anywhere along the line. I…
pythonic metaphor
  • 10,296
  • 18
  • 68
  • 110
4
votes
1 answer

Getting error while building rpm - File not found by glob:

I am building rpm on RHEL-6/64 bit server. # rpmbuild -bb extras/rpm/neatx.spec RPM build errors: File not found by glob: /root/rpmbuild/BUILDROOT/neatx-0.1-1.el6.x86_64/usr/lib/python2.6/site-packages/neatx/* I do see the same…
user1149518
  • 101
  • 6
  • 13
4
votes
1 answer

Add extra file into the rpm building process

i have the source-code of an application that supports adding python plugins. i have written a python script and want to build a custom rpm that by-default includes my script. So that i do not have to additionally add it after the rpm…
erbdex
  • 1,899
  • 3
  • 22
  • 40
4
votes
2 answers

Conditionally include file in an RPM

How can I conditionally include a file in an .rpm based on a define _foobar being set or not? The define _foobar would contain the absolute path inside the build root. The file is there. According to the documentation, I expected the following to…
0xC0000022L
  • 20,597
  • 9
  • 86
  • 152
4
votes
1 answer

Version Controlling rpm spec files

I'm configuring a build machine to produce rpms for a large number of very similar projects. The spec file for each project is slightly different, both in name and sometimes in dependencies and other attributes. Each project has its own git…
TechyShishy
  • 144
  • 4
4
votes
1 answer

How to create RPM subpackages using the same paths for different envs?

I would like to use a rpm to build subpackages for different environments (live,testing,developer) but for the same files, so having a package called name-config-live, one called name-config-testing and one called name-config-developer and in them…
Sorin
  • 43
  • 4
3
votes
1 answer

installer updation using RPM

I have an RPM package for my application and the path of the installation is /company/application/version. I am finding this difficult as it is a unix platform and there is no registry concept. I need few things to be clarified: How can i check the…
user1234
  • 289
  • 6
  • 13
3
votes
1 answer

rpmbuild failure: error: Installed (but unpackaged) file(s) found:

Not sure if this is the right place to post the question. I am trying to create rpm's for my project, this is the first time I am writing a spec file. When I am building the spec the file with the command rpmbuild -ba name.spec error: Installed…
hue
  • 1,759
  • 3
  • 27
  • 37
3
votes
1 answer

RPM spec made relocatable by adding prefix but while installing i do not see the files installed

Summary: A small lighttpd Name: lighttpd Version: 1.4.28 Release: 1000 License: LGPL Group: Applications/Webserver URL: http://www.lighttpd.com/ Source: http://www.lighttpd.com/lighttpd-%{version}.tar.gz BuildRoot: %{name}-%{version} Prefix:…
vishu
  • 71
  • 2
  • 7
3
votes
1 answer

How to update the RPM version?

How to update a RPM version? Shall i just update it in my spec file and re-build the entire package?
RajSanpui
  • 11,556
  • 32
  • 79
  • 146
3
votes
2 answers

Run docker load inside RPM file

I'm trying to do an offline deployment of a docker image with RPM on CentOS. My spec file is pretty simple : Source1: myimage.tar.gz ... %install cp %{SOURCE1} ... ... %post docker load -i myimage.tar.gz docker-compose up -d docker image prune…
3
votes
1 answer

In an RPM %files section is it possible to specify a directory and all of its files and subdirectories recursively?

I'm working on a packaging system that packages things in RPMs. I have a case where it would be very convenient to specify that I want a directory and every file and subdirectory under it included in the RPM. This of course, would be in the %files…
Omnifarious
  • 54,333
  • 19
  • 131
  • 194
3
votes
1 answer

Side by side RPM versions

What is the "right" way, if any, to design RPMs so that multiple versions can be installed via YUM/RPM side by side without stomping on each other? For libraries, the right answer seems to be related to sonames, although I can't find any good…
tgoodhart
  • 3,111
  • 26
  • 37