Questions tagged [rpmbuild]

This tag is for questions about rpmbuild, a tool for building RPM packages.

Filter by
Sorted by
Tagged with
1 vote
1 answer
19 views

Modifying compiler options when building RPMS that use cmake

I'm building a package on Rocky 8 that works fine on Fedora 35. When I tried to compile it on Rocky 8 using rpmbuild -ba, I got the error: relocation xxxxx can not be used when making a shared object; ...
user avatar
0 votes
0 answers
30 views

openSUSE - Many cannot determine ksym provides errors when packaging vanilla Kernel (git tag v5.17)

I am trying to build a RPM package for openSUSE Leap 15.2, because I need some special drivers, which are not implemented (or not back-ported) to Kernel v5.3. Cloned the GitHub repository from Linus ...
user avatar
  • 101
1 vote
1 answer
61 views

rpmbuild fails | Missing dependencies (However missing dependencies are installed)

I'm attempting to build RPM's & Repo's for various agent's we use at my company. This particular package has a private library and I'm unable to figure out what the problem is. The package seems ...
user avatar
  • 123
1 vote
1 answer
64 views

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 ...
user avatar
  • 298
2 votes
2 answers
127 views

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, ...
user avatar
  • 2,056
2 votes
0 answers
63 views

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 ...
user avatar
  • 61
0 votes
0 answers
118 views

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/...
user avatar
  • 61
0 votes
1 answer
67 views

Linux RPMBUILD SPEC, how to Install to custom location /usr/local/file1 not always /usr dirctory

I'm having problem for RPM to be installed to /usr/local/file1, it always installs to /usr/local/file1/usr. I even used ./configure --prefix /usr/local/file1 and it still installed to /usr/local/...
user avatar
  • 1
3 votes
1 answer
43 views

Confusion on Fedora RPM build

I'm trying to rebuild Fedora with some changes in the .config file of the kernel configurations. I'm trying to follow the steps in this guide: https://fedoraproject.org/wiki/Building_a_custom_kernel/...
user avatar
0 votes
1 answer
53 views

rpmbuild spec enable configure build file

I am using rpmbuild for util-linux. This command works for me: rpmbuild -ba ~/rpmbuild/SOURCES/util-linux.spec In the file util-linux-2.23.2.tar.xz there is a file with the name configure and this ...
user avatar
0 votes
0 answers
34 views

Dnf install doesnt use my %post in my rpm but dnf localinstall does

I am working on a test RPM and trying to run a script in %post. When i dnf install test.rpm i get Test-Updates-1-1.el8.noarch.rpm ...
user avatar
0 votes
1 answer
121 views

Copy file with rpm in %pretrans

How can I get a .tgz file from rpmbuild's SOURCES directory within the %pretrans section to a target system using a RPM and extract it there? I would have to do it in the %pretrans section because the ...
user avatar
  • 11.2k
0 votes
1 answer
70 views

Same RPM for multiples CentOS major versions

I've created a little bash script and build it into a RPM package. This little bash script works very well on CentOS 5, CentOS 6 and CentOS 7 (and probably on CentOS 8, not checked) My question is: Do ...
user avatar
1 vote
0 answers
208 views

what the `--build-in-place` actually mean in rpmbuild?

I checkout a git repo of https://github.com/rpmfusion/buildsys-build-rpmfusion.git First I thought use rpmbuild -bs --build-in-place buildsys-build-rpmfusion.spec can avoid copy source to ~/rpmbuild/...
user avatar
  • 930
1 vote
1 answer
264 views

Fedora 33 RPM package provides its own libraries won't install says "nothing provides"

This should be watching ice melt simple, but it is not. I'm on Fedora 33 and creating an RPM for the Diamond text editor. I've got the Debian stuff all done and works great. Diamond uses the ...
user avatar
2 votes
2 answers
682 views

Tell yum where a local shared library dependency is

We are installing a custom rpm which we built using rpmbuild. During the install it fails with a dependency on specific file, in our case specifically libnvidia-ml.so.1: Requires: libnvidia-ml.so.1()(...
user avatar
  • 271
0 votes
0 answers
215 views

Why is RPM not finding my package version, even though it lists it as available?

I am creating RPMs from spec files. I was installing java8 latest rev as a dependency, and it always worked fine. Today I needed to pin the java8 version down to a specific rev, but I'm getting an ...
user avatar
2 votes
1 answer
345 views

Build RPM subpackages without a base package

According to a RPM documentation/guide (http://ftp.rpm.org/max-rpm/ch-rpm-subpack.html) one can use subpackages to build multiple RPM packages with a single SPEC file. In the mentioned link the ...
user avatar
  • 123
1 vote
1 answer
395 views

RPM->installing a new version of a program which has different name

I need to install a version 2.2 of a program X. In repo the default version is 2.0. I built the rpm with rpm-build and I have an rpm called X-2.2. The program from the repo is called X2.0 so package ...
user avatar
0 votes
2 answers
307 views

Is it possible to determine which build flags were used on a pre-built RPM package?

I have been using the Quagga dynamic routing daemon on a CentOS 6 VM. I'd like to use a feature that is only accessible if the RPM was built with the --multipath=X flag. The RPM I'm using was already ...
user avatar
0 votes
1 answer
59 views

How can I tell if a SRPM package will have components which will run as root?

Some packages install software which needs to run with root privileges, such as the sudo package. Others, such as vim, do not inherently need to run with root privileges. Is there a generic way to ...
user avatar
1 vote
1 answer
862 views

How can I reliably modify build configs and add compiler flags in C/C++ RPM files?

I need to change the build configuration of a large number of rpm files for testing purposes. I'm only speaking of C/C++ code here. I'm not necessarily looking to do automation, but I could use a hand ...
user avatar
2 votes
2 answers
672 views

What are some effective ways to build & run an SRPM without installing it?

I am on Fedora 31 and I do software development. I need to work with code in many source RPM packages for relatively short periods of time. For this reason, I'd like to simply build the package, but ...
user avatar
0 votes
0 answers
45 views

Trying to build a RPM for dahdi lead to boot fail on the destination machine

I am trying to build a rpm for Centos 7 to be able to install dahdi without the need of build tools on the destination machine. For that, I tried to create this specs file : Name: dahdi-...
user avatar
  • 183
0 votes
1 answer
161 views

Use copr with rpmfusion-nonfree packages

I'm building a custom ffmpeg with fdk-aac-devel. This dependency is located in rpmfusing-nonfree. So copr build fails because it cannot find this package. Is there a way for me to install this ...
user avatar
  • 3,754
1 vote
0 answers
37 views

rpm_build modifying sh files

When I run rpm_build, it changes the first line of sh files from #!/bin/sh to #!/usr/bin/sh - any idea what might cause this? I observe this change whether I install the rpm or extract the files ...
user avatar
  • 111
1 vote
1 answer
103 views

How are the pkgrel, extraver, snapinfo and minorbump fields of RPM's Release tag used?

The documentation for creating RPM packages in Fedora Linux states that There are potentially four fields which comprise the structured Release: tag: package release number (<pkgrel&...
user avatar
  • 1,634
1 vote
1 answer
360 views

How do you configure rpm-build on fedora 31 to use xz and NOT zstd?

I cannot use zstd for rpm-build compression because I need to install the rpm that i build on a centos 8 machine, which does not have zstd supported, and I'm unable to install anything new on that ...
user avatar
  • 11
0 votes
1 answer
774 views

cron job setup using rpm is not working

I've below cron file SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin LOG_DIR=/var/log/myapp-services-cron MYAPP_SERVICES_DIR=/opt/myorg/apps/myapp-services * * ...
user avatar
1 vote
2 answers
63 views

Rpmlint "use-tmp-in-%postun" error

rpmlint output: E: use-tmp-in-%postun Spec file: %postun rm -r /var/aci /tmp/aci_tmp 2> /dev/null Also, I cant remove package How I can remove directory in /tmp after or before uninstalling ...
user avatar
  • 166
1 vote
2 answers
2k views

Passing configure option to rpmbuild?

To build a piece of software I normally do rpmbuild -ta slurm*.tar.bz2 However I now need to configure the software with the option --with-pmix=/home/user/git/pmix/install/2.1 Is this possible ...
user avatar
  • 123
1 vote
1 answer
144 views

Empty directories are left over after uninstallation of package on higher version of RPM on LINUX

RPM version 4.8.0: [root@sdl34815 x8664]# rpm -ivh tmfi1700-17.00.00.00.rpm Preparing... ########################################### [100%] 1:tmfi1700 ###############################...
user avatar
  • 26
1 vote
3 answers
2k views

rpmbuild isn't using the current working directory, instead using users home?

When I use rpmbuild I get, No such file or directory. # rpmbuild -ba ./SPECS/myFoo.spec error: File /root/rpmbuild/SOURCES/myFoo.tar.gz: No such file or directory It seems to be reading from my home ...
user avatar
  • 22.4k
2 votes
1 answer
1k views

How can you specify ./configure args with rpmbuild?

I'm trying to build an rpm with nginx, and the nginx rtmp module. I got my nginx source tar.gz, and my rtmp tar.gz, and placed them in the SOURCES dir. I then made this spec file: Name: nginx ...
user avatar
  • 1,752
0 votes
1 answer
87 views

rpmbuild, then install the rpm, then upgrade from repositories

I am a very novice administrator. Building my own production environment is my target. Which will be similar to professional ones. I wonder if it is better to install critical applications from the ...
user avatar
4 votes
0 answers
356 views

Is it possible to create an RPM package from an install script?

I'd like to easily create RPM packages for some random projects that do not come bundled as RPM (or whose RPMs are severely outdated). Take the Pop OS GTK theme as an example. Installing the theme ...
user avatar
  • 4,027
1 vote
0 answers
82 views

Why is my rpmbuild %{dist} .fc30.fc30 instead of just .fc30?

I have a .spec file: Name: somefile Version: 1.0.0 Release: 1%{?dist} ... Which produces an RPM: somefile-1.0.0-1.fc30.fc30.noarch.rpm Why is %{dist} applying .fc30 twice? ...
user avatar
  • 2,145
1 vote
3 answers
161 views

Why is the procedure for building RPMs so isolated?

I'm learning how to create RPMs for my own packages. Normally I can do everything while logged into my own account but instructions on making RPMs always seem to want you to use some other account. ...
user avatar
  • 2,145
0 votes
1 answer
746 views

Centos 7 RPM Packaging - Create a desktop shortcut during installation

I am developing a cross-platform UI with .Net Core and am packaging it using RPM Package Manager. I have created the RPM file to be locally installed. The %install section of my spec file looks like ...
user avatar
0 votes
1 answer
139 views

`rpm -q` and `yum` break after `rpm --rebuild`

In order to repair the RPM database, I ran rpm --rebuild. Afterward, I cannot find any package using rpm -qa, and yum does not work,as the logs below show. [root@local03 ~]# yum Traceback (most ...
user avatar
0 votes
1 answer
199 views

rpmbuild qemu.spec without test [duplicate]

I am using qemu by compiling qemu.spec. I often run the command 'rpmbuild -ba qemu.spec' because I am changing the source frequently, but it seems to take a long time to complete because of the test ...
user avatar
  • 31
0 votes
1 answer
106 views

Can not get correct source tar.gz in copr.fedorainfracloud.org

I try build wal-g into rpm on copr.fedorainfracloud.org Github repo https://github.com/patsevanton/wal-g-rpm Project https://copr.fedorainfracloud.org/coprs/antonpatsev/wal-g/ Log https://copr-be....
user avatar
1 vote
0 answers
430 views

Building custom RPM with boolean BuildsRequires and Requires

I'm trying to use boolean logic for my dependencies (https://rpm.org/user_doc/boolean_dependencies.html) in a custom spec file, but I'm running into trouble. .spec snippet BuildRequires: libxml2-...
user avatar
1 vote
1 answer
989 views

Configuring a MacOS-based rpmbuild to deliver platform-independent RPMs

I need to build an RPM for a Java software package on MacOS. I'm using rpmbuild from homebrew, version 4.14.2.1. The toolchain is set up correctly, and I get a valid RPM at the end. There is just one ...
user avatar
  • 1,634
0 votes
1 answer
669 views

How to configure rpmbuild to forbid installing 32 bit package in 64 bit systems?

I'm packaging software in RPM and distributing it in different packages by architecture (32bit or 64bit). Some libraries of my 32bit package have binaries that cannot be executed in 64bit systems (...
user avatar
1 vote
1 answer
1k views

CentOS 7 - problem encountered with the set up of spec file during creation of RPM package

I'm aiming to translate a Debian package to an RPM package to install it on a CentOS Linux 7 (Red Hat). I used alien to accomplish it: alien --to-rpm --scripts --keep-version --generate debian_pkg.deb....
user avatar
3 votes
1 answer
306 views

No Python on Fedora 29 Copr

One of my src rpms submitted to Copr for build failed because there is no Python implementation; is this because something is wrong with the src rpm itself, or there is simply no Python implementation ...
user avatar
  • 3,754
0 votes
1 answer
1k views

Fedora rpm vs Redhat rpm?

We are performing a docker installation on one of our VMS. We have doubts whether Fedora rpms specifically in EPEL fedora are similar to those for RedHat 7.5. Is there any difference (rpm) docker ...
user avatar
0 votes
1 answer
544 views

Custom options during RPM install with rpmbuild

I would like to use custom options during RPM install. I use rpmbuild to craft the RPM so I have the SPEC file. Can I define my own option that I can use in the SPEC file (e.g. rpm -i --r_password=...
user avatar
  • 105
0 votes
1 answer
440 views

Rebuild from src.rpm using new version

This is a follow up to my previous question regarding Building QuantLib on Amazon Linux. I followed the instructions in the answer posted by MLu: Download the source RPM (QuantLib-1.4-7.el7.src.rpm) ...
user avatar
  • 115