Questions tagged [rpmbuild]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
34 views

How to create a rpm according a exist one?

I want to create "snapd" rpm on HUAWEI's OS(openEuler OS), but I have no experience with rpmbuild. In snapd's github repository, there are many spec file for other Linux distribution like ...
cookie's user avatar
  • 11
2 votes
1 answer
75 views

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:...
Siyuan Ren's user avatar
  • 1,312
1 vote
1 answer
49 views

Spec file for rpmbuild to build gdb9 on ec2

I'm using aws's ec2 instance and I need to install a newer version of GDB (I can't use yum install since there is no newer version available for amazon RHEL). My workflow requires to do this process ...
danwgh's user avatar
  • 23
3 votes
0 answers
142 views

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 ...
EddieSub's user avatar
0 votes
1 answer
88 views

Transition %cmake* (*.spec file) to cmake3?

I'd would like to transition an existing *.spec file from the fedora style %cmake* commands to the alternate %cmake3 based one (eg. Amazon Linux 2). What should I replace an existing %cmake_build with ...
malat's user avatar
  • 2,850
0 votes
1 answer
109 views

error: patch 2147483647 defined multiple times

Sorry for the cryptic title, but that's exactly what I get: bash-4.2# rpmbuild --rebuild dcmtk-3.6.7-3.fc39.src.rpm Installing dcmtk-3.6.7-3.fc39.src.rpm warning: user mockbuild does not exist - using ...
malat's user avatar
  • 2,850
0 votes
1 answer
26 views

Is it possible to install an RPM in a RPM?

Can I create an RPM which contains and puts an RPM in a directory, and install that RPM? How?
DrizzleX's user avatar
  • 125
0 votes
1 answer
216 views

Trying to build a source rpm getting: error: Architecture is not included: x86_64

When I try to build a source rpm for podman 4.5 on Alma Linux 8, I'm getting rpmbuild --rebuild ./podman-4.5.0-1.fc39.src.rpm Installing ./podman-4.5.0-1.fc39.src.rpm warning: user mockbuild does not ...
Evan Carroll's user avatar
  • 29.6k
0 votes
1 answer
142 views

How to use an alternate toolset in rpmbuild

I am trying to compile & package the latest version of Zeek (5.0.7) for rhel 7 servers. I get an error saying the "cxx17" is required. Searching the web, I found that it is contained ...
Garnet's user avatar
  • 388
0 votes
0 answers
77 views

rpmbuild giving duplicate file error message

I am trying to build a package for syslog-ng on rhel 8 and keep getting these errors: File listed twice: /usr/lib/.build-id/53/46b0c98ce522ee7f3ac31c3c1de3bf5f62c873 File listed twice: /usr/...
Garnet's user avatar
  • 388
0 votes
1 answer
231 views

SLES15 SP4 | Installation of a rpm package fails when %post scriplet fails with "/usr/lib/1sb/install _initd: No such file or directory"

I have a .spec file to install a rpm. I have the following snippet in post install (%post scriplet) %post -n %{package_name} # Enable the service at boot time %if %{?suse_version:1}0 /usr/lib/lsb/...
Abhishek Dasgupta's user avatar
0 votes
1 answer
210 views

how to pass the DMAKE and DUSE flags to cmake in a spec file (rpmbuild)

A fast question about cmake and spec. If I compile manually with those commands: export CFLAGS="-O2 -fpic" cmake . \ -DCMAKE_CXX_FLAGS:STRING="$CFLAGS" \ -DCMAKE_C_FLAGS:STRING=...
elbarna's user avatar
  • 12.4k
0 votes
0 answers
246 views

RPMDB Corruption Issue - RHEL 7

RPMDB got corrupted recursively on one of my server recursively. 2016-07-07 14:14:31,296 - ERROR - error: rpmdb: BDB0113 Thread/process 6723/140691298633536 failed: BDB1507 Thread died in Berkeley ...
Arunkumar NKL's user avatar
0 votes
3 answers
837 views

How do you build an in-tree kernel module as if it were an out-of-tree kernel module?

I would like to use the Oracle Linux UEK7 Kernel but UEK7 disabled DRBD , which we rely on heavily. However, the .src.rpm is available so theoretically the drbd.ko module could be built against /lib/...
KJ7LNW's user avatar
  • 315
0 votes
1 answer
155 views

How to inject yum/dnf variables into Mock prior to package installation

Context: I have a yum/dnf repo (currently supporting both RHEL7 and RHEL8 so we need to work with both, although it shouldn't make a difference) built inside Artifactory. The team uses a common .repo ...
matthock's user avatar
  • 111
0 votes
0 answers
120 views

How to convert this these commands in ubuntu

am trying to build debian package using debuild command since ubuntu does n't have spec file how to replace the content of spec file to the ubuntu control file and also am facing issue while ...
Fairoz Ahmed Fairoz Ahmed's user avatar
1 vote
1 answer
935 views

Can you exclude a single dependency automatically created by rpmbuild?

I'm using rpmbuild to create an custom rpm to install python3.9 from source. rpmbuild automatically creates dependencies for things that it determines are necessary via means described here. It is ...
Natolio's user avatar
  • 1,212
0 votes
1 answer
3k views

How do you put conditionals in an RPM spec file for %install and %file macros?

I only want files copied into an RPM spec file under a certain condition like: %install if [ %{test}=="true" ]; then cp %{topdirectory}/file1.txt $RPM_BUILD_ROOT/home/user1 fi %files ...
user1068636's user avatar
0 votes
1 answer
704 views

Why can't I see print statements in my RPM spec file?

In my RPM spec file I have the following lines: %pre echo "This is a test" When I run the "rpmbuild" on my spec file, it builds everything correctly, but I never see the ...
user1068636's user avatar
2 votes
1 answer
507 views

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 ...
user1068636's user avatar
0 votes
2 answers
560 views

How do I modify the rpm spec file to require java-1.8.0-openjdk on centos 7?

I normally start with a Minimal Centos 7 and run yum install java-1.8.0-openjdk in order to install a Java Runtime Environment. This works perfectly as I am able to execute JAR files. I am now ...
user1068636's user avatar
3 votes
2 answers
513 views

Installing a newer version of mutt on quite old Debian

I have a machine with Debian 7 (yes, I know this system is quite old, but right now I can't upgrade to a newer version). This version has mutt version 1.5.21 in the repositories, but I would like to ...
raj's user avatar
  • 1,059
2 votes
2 answers
4k views

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's user avatar
  • 1,783
1 vote
1 answer
1k views

rpm: how to disable debuginfo

OS RedHat 8.4 I know that having %debug_package macro in a spec file will generate debuginfo for a package, and will produce mypackage-debuginfo-<VERSION>.<ARCH> rpm. However the funny ...
Mark's user avatar
  • 1,783
1 vote
1 answer
283 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; ...
Eric Sokolowsky's user avatar
1 vote
1 answer
302 views

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 ...
krjdev's user avatar
  • 111
1 vote
1 answer
2k 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 ...
Mose's user avatar
  • 123
3 votes
1 answer
1k 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 ...
Veverke's user avatar
  • 348
2 votes
2 answers
1k 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, ...
Edward's user avatar
  • 2,434
2 votes
1 answer
601 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 ...
danidar's user avatar
  • 101
2 votes
0 answers
671 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/...
danidar's user avatar
  • 101
0 votes
1 answer
603 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/...
Jack's user avatar
  • 1
3 votes
1 answer
65 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/...
Sittin Hawk's user avatar
0 votes
1 answer
246 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 ...
mohammed moha's user avatar
0 votes
1 answer
611 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 ...
Cyrus's user avatar
  • 12.1k
0 votes
1 answer
527 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 ...
locobastos's user avatar
1 vote
1 answer
777 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/...
Wang's user avatar
  • 1,244
1 vote
1 answer
892 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 ...
user3450148's user avatar
3 votes
3 answers
2k 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()(...
kabanus's user avatar
  • 311
0 votes
0 answers
363 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 ...
Ramin Arabbagheri's user avatar
2 votes
1 answer
1k 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 ...
swaechter's user avatar
  • 123
1 vote
1 answer
906 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 ...
CapelucitaRoja's user avatar
0 votes
2 answers
903 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 ...
dutsnekcirf's user avatar
0 votes
1 answer
125 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 ...
the_endian's user avatar
1 vote
1 answer
2k 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 ...
the_endian's user avatar
2 votes
2 answers
2k 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 ...
the_endian's user avatar
0 votes
0 answers
80 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-...
iXô's user avatar
  • 205
0 votes
1 answer
256 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 ...
Cyker's user avatar
  • 4,194
1 vote
0 answers
86 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 ...
Jaybird's user avatar
  • 111
1 vote
1 answer
160 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&...
jstarek's user avatar
  • 1,692