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

How to create a RPM which install python dependencies?

I have a python application that has flask dependency. All I need is to create an RPM out of this application and with this RPM I should be able to install the dependencies to another machine. Things I have tried, Created a setup.py file,…
2
votes
1 answer

RPM weak dependencies

In my RPM spec file I have declared that my software package requires a C++ compiler to build: BuildRequires: gcc-c++ Now I want to make it possible to build this package using devtoolset-8 (or even clang in the future). How can I make the…
sorush-r
  • 10,490
  • 17
  • 89
  • 173
2
votes
1 answer

RPM + rpm installation (not create directory according to SPEC)

I need advice about the following I build simple spec file and build rpm I transfer the new rpm to other Linux machine in order to install the new rpm according to the spec file the new rpm -> test.sh-6.2-2.i386.rpm should create the…
jon
  • 89
  • 3
  • 10
2
votes
1 answer

rpm upgrade can't replace directory with file?

I have a previous version of a package I maintain, that contained a subdirectory with files in it. The upgrade is happening on RHEL/CentOS 7. For example my version 1.0 RPM contained: /opt/foo/etc/bar/x/y /opt/foo/etc/bar/z etc. In the newer…
MadScientist
  • 92,819
  • 9
  • 109
  • 136
2
votes
2 answers

RPM + writing script in the spec file

is it possible to write ksh script in the spec file? the target is during rpm -i my_rpm.rpm according to the spec file , ksh script will do some installation & configuration for example run other script and edit some files THX
jon
  • 89
  • 3
  • 10
2
votes
1 answer

CentOS7: rpmbuild - Unable to recognise the format of the input file

I'm trying to build an extremely simple rpm over centos7. I just copy some pre-compiled executables from the tar.gz to /usr/bin/my_rpms/rpm1. Here is my install section: %install mkdir -p %{buildroot}/usr/bin/my_rpms/rpm1/ install -D prog prog.o -t…
Bob Sacamano
  • 699
  • 15
  • 39
2
votes
4 answers

rpm conditional with substring?

I have a spec file that uses a conditional like %if "%{pkgname}" = "wobble" Requires: extra-thing .... %endif and now need to treat wobble-thing, wobble-otherthing and any other wobble* as satisfying the same conditon. Easy, you'd think. I…
Craig Ringer
  • 307,061
  • 76
  • 688
  • 778
2
votes
2 answers

How to change RPM's destination when using rpmbuild

I am building an RPM with rpmbuild from a spec file in a directory foo but whenever I run rpmbuild it creates the rpm in my home directory at ~/rpmbuild/RPMS. How can I change the destination of the RPM and get the whole rpmbuild directory to be in…
gk12345
  • 416
  • 4
  • 15
2
votes
1 answer

rpmbuild spec files, and rpm - some deep confusion

I'm trying to use rpmbuild to do the following. I have a prebuilt project, about 100 files in a single directory, as a tar file. I want to create an RPM which will bundle those files, and when installed on a new machine using rpm -i, will unpack the…
user3587642
  • 110
  • 1
  • 7
2
votes
2 answers

%arm in RPM spec file

I am building an RPM from source tarball, patches, and a .spec file. I am doing so to add my platform-specific patch. I have read the given .spec file, and got notice that there are lines such as: %ifarch %{arm} When I saw similar lines like that,…
Stephen
  • 609
  • 6
  • 12
2
votes
2 answers

RPM .spec how to escape preun and postun?

I have build a package_version_1.rpm. Now im trying to build a package_version_2.rpm. Default behavior of the RPM will remove any file from package_version_1.rpm that is not upgraded from package_version_2.rpm. To achieve what i want i must install…
Chris
  • 21
  • 3
2
votes
1 answer

Get user while packaging rpm

I am trying to get USER-NAME in my spec file while packaging rpm. "$HOME" command gives me USER in case of running in bash. Spec file also works like bash but when I run the similar command in %post section of spec file, I get 'root' as output. This…
Wajahat
  • 107
  • 1
  • 2
  • 10
2
votes
1 answer

RPM Packaging - No SOURCES files included in RPM

I have binary file that I would like place under /etc/myapp/bin/app Here is my SPECS/app.spec file %define _topdir /root/rpmbuild %define name my-app %define release 2 %define version 2.1 %define buildroot …
Mir Adnan
  • 844
  • 11
  • 24
2
votes
1 answer

Add property to folder

I have a spec file in Jenkins uploading artifacts to Artifactory repository path test-local/web/develop/web-DEVELOP-12/ where 12 is the build number from Jenkins. All artifacts are uploaded under web-DEVELOP-XX. I would like this folder to have the…
Squirrel
  • 1,283
  • 1
  • 13
  • 22
2
votes
0 answers

Different versions of rpmbuild list different dependencies

I am building a netbeans 8.1 platform application for CentOS6 and CentOS7. These OS's host rpmbuild 4.8.0 and 4.11.3 respectively. On each OS, I can package the application into a ZIP file distribution in the netbeans 8.1 IDE, which is then…
user12066
  • 613
  • 6
  • 23