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
6
votes
1 answer

Can the Source0 in a RPM Spec be a git repo?

I want to build a rpm of my project automated. So when I push a new tag to my git repo, it should build a rpm from this tag revision. My problem is, how can I prep the sources and specify it in the RPM Spec file? Is it possible to specify the git…
Thilo Cestonaro
  • 182
  • 1
  • 16
6
votes
1 answer

rpm subpackages %install section

Is it possible to have a separate %install section for a subpackage in a spec file? For example, files can be specified for the main package as %files and for the subpackage like this: %files mysubpackage however, I have only seen…
user12066
  • 613
  • 6
  • 23
6
votes
1 answer

Set permissions after RPM install

I use this spec file to use RPM files Name: pack-agent Version: 1.0 Release: 1%{?dist} Summary: Linux Agent installation script Group: Utilities License: license Source0: …
user1285928
  • 1,328
  • 29
  • 98
  • 147
6
votes
1 answer

How to package a .tar.gz file into rpm package

I worked on Redhat Linux, I have a tar.gz file. I want to package this tar.gz file to a rpm package file. In the rpm package phase, I just want to extract the tar.gz file and package all of the staff into the rpm package, when I install the…
FlurryWInd
  • 305
  • 1
  • 4
  • 12
6
votes
2 answers

RPM conditional Requires in spec file possible

As the subject reads, I wonder whether it is possible in the RPM spec file to make required packages dependent on a condition? For instance check in a shell statement if on the install target e.g. the host is using bonding interfaces and only if…
user3520053
  • 61
  • 1
  • 2
6
votes
1 answer

What needs to go in the %files section of an RPM

I have a tar.gz that I am wanting to create a RPM out of and am currently working on the spec file. I couldn't seem to understand what the rule for including files in the %files section of the .spec was. My tar.gz consists of two python packages and…
alh
  • 2,569
  • 6
  • 29
  • 42
6
votes
2 answers

Create an RPM that can also manipulate files and add users

I'm trying to create an RPM in Fedora 15 that will install my software, but in order for my software to work correctly once installed, I also need to edit other (configuration) files on the system, add users/groups, etc. Performing some of these…
flash
  • 63
  • 1
  • 3
5
votes
2 answers

How to exit rpm install in case of an error

I am looking for a way to exit rpm install if some condition is false. I have added a small script in the %pre section that exits install if my condition fails. The problem I am facing is I see that the %pre scriptlet is executed, and rpm install…
Fanatic23
  • 3,378
  • 2
  • 28
  • 51
5
votes
2 answers

during upgrade, how does rpm know which files to delete?

I am new to packaging. This website states that the steps during an upgrade are: Hence, the order of operations during an upgrade is: Run the %pre section of the RPM being installed. Install the files that the RPM provides. Run the %post section of…
Mike
  • 961
  • 6
  • 19
  • 43
5
votes
1 answer

How to detect upgrade when an RPM that obsoletes another RPM is being installed

RPM scriptlets are passed in $1 ( the number of packages of this name which will be left on the system when the action completes ) so they can determine whether a package upgrade or removal is occurring. For reasons outside my control, I believe…
Dan R
  • 198
  • 5
5
votes
1 answer

build rpm without compiling the source file

I am trying a sample rpm package with single file. In my source folder I have python_test_rpm.tar.gz which contains only one python script file. But, the file is not a valid python script. All I want to do is package this and deploy it in a…
baskar
  • 53
  • 1
  • 5
5
votes
1 answer

RPMbuild with executable files

I am trying to build a RPM (rpmbuild -bb spec file). When installing rpm some of executable tcl files are corrupted and all files having same size.
5
votes
1 answer

File listed twice in rpm spec file

The files section of my spec-file looks like this: %files %{prefix}/htdocs/ %config %{prefix}/htdocs/share/settings/config.inc.php Now, since the config file is already included in the %{prefix}/htdocs/ line I get the warning 'File listed…
JochenJung
  • 7,183
  • 12
  • 64
  • 113
5
votes
0 answers

rpm-maven-plugin and OS X

I'm trying to set up a maven project on OSX and use the rpm-maven-plugin to build it as an RPM package. However, even the simplest configuration of the plugin seems to fail. The error I get is Bad exit status from…
NilsH
  • 13,705
  • 4
  • 41
  • 59
5
votes
2 answers

RPM Build Spec file i want to check rpm is being install or update

i want to check the rpm i have created is install or update by user(client) like rpm -ivh abc.rpm or rpm -Uvh abc.rpm is their any %command in spec file to get info regarding this command. my requirement is if i have a rpm named abc-0.1-2.rpm…
meet patel
  • 181
  • 1
  • 2
  • 17
1 2
3
38 39