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
1
vote
1 answer

Error while installing RPM -%post script of spec-failed dependencies /bin/sh

I am trying to build RPM for my java code.RPM build and install sections works fine.But,later i have added a shell script in %post section to run shell script file that creates some files and starts the java application.The file gets copied…
Swapna Reddy
  • 149
  • 3
  • 10
1
vote
1 answer

How to know the version of RPM during installation

I have created a script for deployment. During the pre script, is it possible to know whats the version of the rpm I am deploying. I want to create a backup file with the version of the RPM (in its name) so that i can trace back the version of the…
explorer
  • 235
  • 1
  • 4
  • 14
1
vote
1 answer

Dynamic Requires section in RPM based on installation environment

On my setup, where RPM will be installed, will have a file below: #cat /etc/setup-details environment=QA # Now, if environment is QA, i want below Requires: Requires: my-qa-rpm If environment is dev, i want below Requires: Requires: my-dev-rpm How…
Niraj Nandane
  • 1,318
  • 1
  • 13
  • 24
1
vote
0 answers

How do I add informations about bugfixes or security fixes to rpm spec files?

I build rpms with my own spec files. Now I want to add information about bugfixes or security fixes, so that dnf can understand them like: # dnf check-update --bugfix or # dnf check-update --security How can I make this work? Thx, Joerg
Joerg
  • 81
  • 3
1
vote
1 answer

Build a RedHat RPM from a tar file

I have a tar file myapp.tar.gz, that contains binaries. When untared, the directory structure created is something like this: myapp/ -bin/myapp -lib/mylib I want to create a RedHat RPM for myapp, when…
Bruce Banner
  • 193
  • 1
  • 12
1
vote
1 answer

Create RPM package with runtime libraries and executable file

I have created a C++ application under redhat linux environment. Beside this application, I have also created many *.so libraries required by the application. The created application uses some Boost C++ libraries, e.g. -lboost_system, -lboost_thread…
tanlccc
  • 363
  • 1
  • 5
  • 13
1
vote
1 answer

"/var/tmp/rpm-tmp.6K3TRj: line 33: $'\r': command not found" Can't get past this error when building my RPM

I'm trying to build my first RPM, and I keep getting this error: /var/tmp/rpm-tmp.6K3TRj: line 33: $'\r': command not found error: Bad exit status from /var/tmp/rpm-tmp.6K3TRj (%prep) I have seen a few people ask about this error, but I cant find…
J-D
  • 13
  • 5
1
vote
1 answer

rpm build with local Required: some_local_package.rpm

Requires: in the spec files sets the package dependencies, but what will happen if the repo of the requirements is not in the repolist? Is there a way to use pre downloaded rpm files and tell the rpmbuild that the dependencies should be installed…
Edik Mkoyan
  • 309
  • 2
  • 17
1
vote
0 answers

Determine install vs. uninstall phase inside an RPM spec scriptlet (%pre, %post, %triggerun...etc)

I have some code/macros that are used inside scriptlets, but they need to run slightly differently depending on which scriptlet they're in. It's easy enough to distinguish triggers from not triggers by checking $1 and $2, so more specifically all i…
David Davidson
  • 318
  • 3
  • 12
1
vote
1 answer

RPM Spec File Macro Expansion

I am building a kernel module and will need to provide a version for each minor release of the distro. I plan to follow the release naming convention of .elX_Y to designate the major version X and minor Y for the rpm. I am trying to use the…
Tom
  • 111
  • 3
1
vote
0 answers

How can I use rpmrebuild to programmatically change the contents of a file in an rpm?

I have a need to programmatically change the contents of all xml files in several rpms and repackage them with a one-up'd release number. I know I can do this using rpmrebuild by installing the rpms, editing the files at their installed locations…
1
vote
1 answer

how __spec_install_post work in RPM Packaging

I'm checkcing binary strip in RPM Packaging and get this: __spec_install_post: ... __os_install_post ... __os_install_post: ... %{!?_debug_package: /usr/lib/rpm/redhat/brp-strip % {_strip} …
Kevin Chan
  • 59
  • 5
1
vote
1 answer

How to re-build a RPM (rpmrebuild) in non-interactive mode?

I need to re-build an RPM using rpmrebuild where I need to modify the Requires: lines in a spec file. Commands: rpmrebuild --edit-spec --notest-install --package Do you want to continue ? (y/N) y result: Changes in…
Puneeth G R
  • 111
  • 1
  • 8
1
vote
1 answer

Using newly added firewall service in rpm spec script fails

I have a rpm package that adds a new firewall service and during install wants to enable this service. However this fails with "Error: INVALID_SERVICE": $ dnf localinstall -y firewall-spec-test-0.0.1-1.fc35.x86_64.rpm Last metadata expiration check:…
hlovdal
  • 26,565
  • 10
  • 94
  • 165
1
vote
0 answers

rpmbuild/rpm not reading the rcfile

I am learning rpm/rpmbuild and I see strange behavior difference in RPM v4.4.2.3 and RPM v4.14. I created an rpmrc file which has below content macrofiles:/home/rmehta/rpmtest/rpmmacros and rpmmacros has below contents %_name Rakesh When I…