Questions tagged [rpm-spec]

This tag is for RPM spec files, the source file for building RPM packages using rpmbuild.

This tag is to be used for questions pertaining to writing RPM spec files, that is, the spec files used to build RPM packages.

76 questions
6
votes
1 answer

RPM install file conflict from previous install

I am getting install failure due to file conflicts. I am facing this issue only on Red Hat Linux 7. Same spec file works on Ubuntu and other Linux distributions. I tried putting echo on %pre, %post, %preun and %postun sections but I never reached…
Satyajit Singh
6
votes
3 answers

What does "-14" mean in a dump of RPM macros

It's possible to dump the available / defined macros when authoring a RPM spec file by using: rpm --showrc or rpm --eval %dump or including the %dump builtin macro in the spec file itself and examining the output from the RPM build process (the…
Mark Edington
  • 503
  • 4
  • 11
5
votes
1 answer

Where I can find original CentOS RPM Spec files?

Recently CentOS upgraded from 7.5 to 7.6 and now one of the packages upgraded to a newer version I'm not ready to use yet. I'm planning instead to build and support an older version of this package. I wonder if there a way to extract or see…
Alexander S
  • 61
  • 1
  • 3
4
votes
0 answers

How to build an RPM package for python app that works in Fedora 28 and 29, which have different default Python3 version?

What I Want To Do I'm trying to build an RPM package of my app that could be installed in different Fedora distros, which have different default Python 3 versions (i.e. Fedora 28 has python3.6, and Fedora 29 has python3.7) I'm using this to build an…
3
votes
0 answers

Options for managing user created files in rpm spec file

How is best to handle files in an rpm spec file that may or may not exist with these specifics: Part of the files delivered are example files under a /conf.d/ directory. The files are installed as conf.d/example.conf-. It is expected that the user…
EddieSub
  • 31
  • 2
3
votes
1 answer

If I do not care about debug support in red hat packages, what are the drawbacks of turning build-id support off in the specs file?

As a follow up on this question, what if I am not interested in having these debug features - how do I simply prevent these build-id files (debug info packages?) from being installed ? Ultimately I do not care (at least for the near future) about…
Veverke
  • 338
  • 3
  • 16
3
votes
1 answer

How do I set a RPM package to require Java 8 or higher, whose dependencies can be satisfied by Java 11

I'm trying to package an RPM that requires any Java version above Java 8. The RPM works fine if there's no Java installed, or if JRE/JDK for 8 is installed. HOWEVER if I install OpenJDK 11, when I install my RPM it will try to install Java 8…
jenny
  • 227
  • 2
  • 10
2
votes
1 answer

rpmbuild: handle naming differences of packages in different distributions

I'm writing a RPM spec file for building my software. The software depends on Crypto++. Crypto++ is named differently on different distributions, for example, on OpenSUSE, I should write BuildRequires: libcryptopp-devel But on Fedora, it should…
Siyuan Ren
  • 1,302
  • 2
  • 11
  • 15
2
votes
1 answer

Correct way to modify config files in an upstream RPM?

What's the right way to create an RPM that modifies the %config(noreplace) files installed by another RPM? Specific instance of the general question: We want to modify the repository definitions installed by almalinux-repos so that the definitions…
David M
  • 123
  • 4
2
votes
1 answer

How do you modify the RPM spec file to require perl libraries on centos 7?

I normally start with a Minimal Centos 7 and run yum install perl-libs.x86_64 This works perfectly. I am now trying to create an RPM spec file that uses the "Requires" clause to package dependencies like: Requires: perl-libs.x86_64 However,…
user1068636
  • 193
  • 6
2
votes
2 answers

rpm: define my own variable in spec file

Is there a way to declare my own variable inside of a spec file and refer to it as %{my_var} ?
Mark
  • 1,763
  • 5
  • 25
  • 45
2
votes
2 answers

Make OS-dependent Requires section in an RPM spec file

Situation I have an RPM that uses semanage (SELinux policy management tool) and restorecon (SELinux context configuration tool) in the post-installation and pre-uninstallation stages. Unfortunately, between RHEL 6/7 and 8, the package containing…
Edward
  • 2,364
  • 3
  • 16
  • 26
2
votes
0 answers

build rpm for python2 if python3 is not installed

I want to package a python application which can run on both python2 and python3 for we have still old systems running python2. the default should be python3 but in case of python3 is not installed. I would like to build it for python2. without…
danidar
  • 91
  • 2
  • 5
2
votes
0 answers

shebang changed to /usr/libexec/platform-python when building python rpm packages

I am trying to build a RPM from a python application on RHEL8.2 machine. the shebang on the scripts are set correctly to #!/usr/bin/python3 however for some reason the shebang gets changed to #!/usr/libexec/platform-python -s when the RPM is…
danidar
  • 91
  • 2
  • 5
2
votes
1 answer

How do you set an environment variable for the current session in an rpm?

I am producing an rpm for Sia in ClearOS7 (based on Centos7) and have hit a brick wall. I am trying to set SIA_DATA_DIR=/var/lib/siad-data for the session where I am installing the rpm. It is needed for both the sia daemon and for the siac app which…
Nick Howitt
  • 21
  • 2
  • 4
1
2 3 4 5 6