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
11
votes
7 answers

can an RPM spec file "include" other files?

Is there a kind of "include" directive in RPM spec? I couldn't find an answer by googling. Motivation: I have a RPM spec template which the build process modifies with the version, revision and other build-specific data. This is done by sed…
davka
  • 13,974
  • 11
  • 61
  • 86
10
votes
1 answer

Making an RPM which sets POSIX files capabilities

How does one make an RPM which sets the POSIX capabilities of a file? If I try doing rpmbuild as a non-root user then I get an error when my makefile's install hooks try to run setcap, but if I don't run setcap how will rpmbuild copy the…
Matthew Cline
  • 2,312
  • 1
  • 19
  • 36
9
votes
3 answers

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

I am building a custom rpm to install apache, among other things. When i try and build i get the above error, and then it lists /httpd-2.2.17/ and all of its subfiles. As far as i know, this is the build directory so it shouldn't be packaged. To…
Chris
  • 4,425
  • 5
  • 34
  • 49
9
votes
3 answers

Shipping *.so and binaries while building RPM package

I have created a python application in which I would like to ship .so and some binary files in the final RPM package. After long reading I found a way to add binaries/ image and other data files in setup.py. Now, when I build an RPM with python…
sundar_ima
  • 3,604
  • 8
  • 33
  • 52
9
votes
1 answer

How to run a shell command in RPM spec file?

How do I run a shell command in spec file? I want to execute something similar like: uname -r | sed s/(...stuff...)/(...stuff...)
Amumu
  • 17,924
  • 31
  • 84
  • 131
8
votes
1 answer

How to install rpmdev tools on ubuntu?

I am creating my first package using RPM on ubuntu machine.But I am getting so many difficulties.I tried so many commands to install rpmdevtools using "yum" but it is giving error as There are not repos enabled. When I try to install it using…
Shah Ritesh
  • 111
  • 1
  • 2
  • 6
8
votes
2 answers

RPM build No such file or directory

I want to create simple RPM file with many small files. [root@laptop rpm]# tree . ├── BUILD ├── BUILDROOT ├── RPMS ├── SOURCES │   └── some_agent-1.0.tar.gz ├── SPECS │   ├── kernel.spec │   └── kernel.spec~ └── SRPMS 6 directories, 3…
user1285928
  • 1,328
  • 29
  • 98
  • 147
8
votes
1 answer

RPM spec missing uninstall section?

I see no uninstall section in RPM spec documentation. I do see preun and postun. Is there uninstall phase? What exactly happens during uninstall phase? Basing on %files section, a list of files is removed? and that's it?
Michal
  • 2,078
  • 19
  • 29
8
votes
1 answer

rpm & rpmbuild - using global environment variable in the %files section

I have been struggling for a while with this one. So I wrote a .specs file for my project and everything went fine. The rpm is built, the installation is smooth... but then I got some trouble because now, I have to use a custom global environment…
Rinita
  • 147
  • 1
  • 1
  • 9
8
votes
4 answers

Using Jenkins BUILD NUMBER in RPM spec file

Name: My Software Version: 1.0.5 Release: 1 Summary: This is my software Not sure if anyone has tried this before or if it is easy, but: A spec file has two unique indicators for its…
Sagar
  • 9,456
  • 6
  • 54
  • 96
7
votes
4 answers

CentOS 5.5 - symbolic link creation into RPM spec file

I need to create the following symbolic links into RPM file /bin/ln -sf libcrypto.so.0.9.8e /lib/libcrypto.so.0.9.8 /bin/ln -sf libssl.so.0.9.8e /lib/libssl.so.0.9.8 In my RPM spec…
Dima
  • 1,253
  • 3
  • 21
  • 31
7
votes
0 answers

Install entire folder and files in it, RPM spec file

I have a spec file to build an rpm package, in my %install section I have this: %install install -m 700 foo/bar/filesToCopy/. $RPM_BUILD_ROOT/ The filesToCopy folder is a tree exactly how the package file tree should look like. It has all the sub…
Jimmie
  • 397
  • 2
  • 5
  • 20
7
votes
1 answer

symlink in particular directory using rpm spec

rpm created using spec file will create directory "directory1" and all files in /var/lib/directory1. For another use case i want to create another directory in "/var/lib" which should be a symlink to directory1. eg: cd /var/lib/ ls -la directory2…
Kevin Parker
  • 1,350
  • 3
  • 14
  • 18
7
votes
1 answer

Question mark and exclamation point syntax in srpm spec file

I'm trying to understand how the Postgres 9.1 rpms are built on CentOS/RHEL 6, so I'm taking a look at the spec file from the source rpms. What does the following syntax do/mean? Specifically, the question mark and exclamation…
Banjer
  • 8,118
  • 5
  • 46
  • 61
7
votes
3 answers

Can some specific autodetected dependency be ignored upon rpmbuild

rpmbuild can autodetect dependencies by looking up shared libraries required by binaries included in the package and, while this is a good think almost every time, there are time when it is undesirable but only for some specific libraries. I am…
a1an
  • 3,526
  • 5
  • 37
  • 57
1
2
3
38 39