Questions tagged [rpmbuild]

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

4
votes
1answer
5k views

When to use arch vs. noarch when building RPMs?

Preface By building RPMs I do not mean compiling from source code. I purely mean taking a tar or a 'zip' file with source code or binaries and repackaging it as a RPM. I've been building RPMs from ...
3
votes
1answer
251 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 ...
3
votes
1answer
1k views

Common subroutines in RPM

I have some common code that I would like to execute in the %pre and %post section of my rpm spec file. When I place a subroutine in the %pre section, I need to add the same subroutine to the %post ...
3
votes
1answer
143 views

When does rpmbuild produce i386 vs. i686 packages (Centos 6)

I am working on the build system for a rather large and old industrial software. As a result of the build, it spits out around 20 rpms (built from scratch with rpmbuild, built from scratch via setup....
3
votes
1answer
5k views

Build RPM on Windows with Cygwin but install on Linux

I am trying to figure out an issue that I have with installing an RPM file on openSUSE which I build on Windows (using Cygwin/rpmbuild). When I try to install the RPM on Linux I get an error saying ...
3
votes
2answers
3k views

RPM build check-rpaths error 0x0001

While building my custom rpm package using the below mentioned command rpmbuild -v -bb test.specs I get the below error, + /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot ********************...
3
votes
1answer
3k views

RPM build errors

I am trying to build an RPM but when I use this command to build it: [root@vmdb SPEC]# rpmbuild -v -bb SPEC/supportScripts.spec I always get this error: Executing(%prep): /bin/sh -e /var/tmp/rpm-...
3
votes
2answers
1k views

Why is “dir-or-file-in-usr-local” an error rather than a warning?

I'm building some rpm packages and checking for standards and style conformance using rpmlint. The packages are specific to systems at my place of work and they won't get pushed upstream. Our ...
3
votes
1answer
686 views

Buildiing RPM to behave differently while Install & Upgrade?

I have an RPM package with nearly 4000 files, and the installation of this takes considerable time. However, of those 4000 files, only a fixed list of 25 files change for each release. My query: Is ...
3
votes
1answer
550 views

Automated RPM builds

I'm making my own personal RPM repository. So far, I've built the following packages: x264 libx264 libx264-devel x265 libx265 libx265-devel lame libmp3lame libmp3lame-devel libmfx libmfx-devel ...
2
votes
3answers
2k views

How to install packages for old version of Fedora?

I'm using a Fedora 13 VM, and I need to install some old rpms, but only have the source rpm files. I know that I can use rpmbuild --rebuild to build the binaries, but for whatever reason, rpm-build ...
2
votes
1answer
750 views

How to eliminate the warnings: mockbuild does not exist

I was building a package from SRPM on Fedora: $ rpmbuild --rebuild *.src.rpm ... warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: ...
2
votes
1answer
392 views

Binary file got corrupted after packaging

A quick overview, what I'm doing is bundling a nodejs application using enclose.js into a single binary, then using rpmbuild to turn the whole project with config files into a single package. ...
2
votes
1answer
968 views

Packaging only a certain subset of built files

I'm attempting to package libmp3lame and libmp3lame-devel much the same way that Debian packages it: they have libmp3lame as a package providing the libmp3lame.so shared library, libmp3lame-dev ...
2
votes
2answers
1k views

RPM Says Shared Object Is Missing But I Can Find It With ls

Having a problem installing an openssh rpm I hand-rolled today: [root@local_host ]# rpm -i openssh-6.7p1-1.i386.rpm error: Failed dependencies: libcrypto.so.1.0.0 is needed by openssh-6.7p1-1....
2
votes
1answer
1k views

Specify unpack location in RPM spec file

I have looked all over the Internet for an answer on this and am unable to get anything for it. I am building my own RPM and I need it to unpack certain files to specific directories. These ...
2
votes
0answers
832 views

How to corrupt rpmdb?

Yes, You read it right i actually want to corrupt RPMDB for testing purpose. I tried Googling it but all i got was to, how to rebuild it. So at last i tried rpm --rebuilddb and killed the process ...
2
votes
1answer
732 views

yum-builddep building the dependencies from source

My current way of building packages from srpm: cd ~/rpmbuild/SRPMS yumdownloader --source $p sudo yum-builddep *.src.rpm if some build deps not found, repeat the above steps for each of them rpmbuild ...
2
votes
1answer
892 views

Rebuilt kmod package not updating via `YUM` but is via `rpm`

I have built a package with the following version: kmod-dahdi-linux 10:2.9.1.1-75_shmz65.1.11.2.6.32_431.el6.i686 Which should be an upgrade of the one installed on the system: kmod-dahdi-linux 0:2....
1
vote
2answers
943 views

how to extract the instructions provided by the rpm spec file

I have reviewed several related questions - the closest being: Extract the spec file out of an RPM -- AND I must add I would have phrased my question the same way. However, it seems the .spec file is ...
1
vote
1answer
2k views

How do I skip specific tests when building an rpm?

I am building an RPM of git version 2.13.0. The build has gone ok but one of the tests are failing: Config variable ${LIB_HTTPD_SVN} is not defined Config variable ${LIB_HTTPD_SVN_PATH} is not ...
1
vote
1answer
580 views

What does Requires: Python(package) do for RHEL spec files?

I'm packaging some Python packages currently without RPMs, and some of those depend on others that I'm packaging. While packaging I noticed a format where people do: Require: python(pkg-name), but I'...
1
vote
1answer
4k views

Upgrading kernel 2.6.18 to 2.6.32 on CentOS 5.10

I've been looking on Google for 4 hours and I can't find a solution to my problem. I have a computer running CentOS 5.10 using Kernel 2.6.18-371.9.1.el5 and I would like to upgrade my kernel to 2.6....
1
vote
1answer
2k views

unpack and patch source rpm (rpmbuild -bp) safely

I want to unpack source RPM and apply patches to the upstream source. What is almost OK for me is rpm -i mypkg-*.src.rpm cd ~/rpmbuild rpmbuild -bp SPECS/mypkg.spec # frolic in BUILD/mypkg My ...
1
vote
1answer
2k views

How do you use rpmbuild to make an rpm package when there are file not found or permission errors?

I am trying to create an RPM file for the wget utility. Both of my attempts (with sudo and without sudo) to use the rpmbuild comman fail to create an .rpm file. I run a "sudo rpmbuild" command to ...
1
vote
1answer
2k views

Can I build centos 7 (el7) rpm package on centos 6 (el6) server?

There are some documents teaching me on how to build rpm by myself in centos with rpm-build or mock. I am fine to build them for el6 rpm package. My question is, can I build a rpm package for centos ...
1
vote
1answer
268 views

%pre section of my.rpm is no longer executed on RHEL 6.7

There is a .spec file to build an rpm package for our software. In the %pre section of the .spec file there is a check if a previous major version of our software is installed. If yes, the ...
1
vote
1answer
1k views

How to decide what to mention in .spec file 'Requires: ' filed

I am new in building rpm package.For Creating RPM for my binary I have following dependancies: [tejas@target]$ ldd exe linux-vdso.so.1 => (0x00007fff85bff000) libQtWebKit.so.4 => /opt/...
1
vote
1answer
66 views

Cannot build RPM packages from SRPM using mock

I've successfully built the SRPM and after that step I'm trying to build the RPM from the SRPM. Following is the directory from where I am building the RPM. THe Source RPM are in the following ...
1
vote
2answers
1k views

How to refer to any files or scripts packaged inside RPM from %pre %post scriptlets

I am building an RPM package that packages the various files that includes properties files, config files, scripts, JARs etc. Now when writing the %pre, %post, %preun and %postun scritptlets, I need ...
1
vote
3answers
1k views

how to use rpmbuild for el5 on el6 system

Do any of you have a idea how to build a spec file using rpmbuild for a el5 system while running on el6 host? spec is a simple packaging of py script. Difference between el5 and el6 rpm should by ...
1
vote
1answer
517 views

Building RPM results in nothing generated in RPMS directory

I am building a RPM on RHEL. After following https://fedoraproject.org/wiki/How_to_create_an_RPM_package, I put my front.tar.gz in /rpmbuild/SOURCES, and make the spec file like this: Name: front ...
1
vote
2answers
3k views

How to get spec file path within rpm spec file

The spec file is present inside the source directory. The specfile build section looks like %build cd ~/path/sources make If the spec file path can be detected then the hardcoding of the ~/path/...
1
vote
1answer
1k views

What is the default behavior of %install?

I am attempting to build an RPM using the -bb flag (%prep %build %install %check package). This is the output of the %install step: Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.2kgeNY + umask 022 ...
1
vote
0answers
21 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-...
1
vote
1answer
26 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 ...
1
vote
1answer
186 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....
1
vote
0answers
213 views

how to build compiled rpm of gcc 8.2

I am trying to make an rpm of gcc 8.2 for centos 7. Honestly I am trying my best to understand how to use rpmbuild and .spec file, but it's too hard for me to understand. I tried packaging my hello ...
1
vote
0answers
2k views

RPM build errors: Bad exit status from /var/tmp/rpm-tmp.8ntGMt (%install)

I'm getting an error that I'm not sure how to debug. Any thoughts on the matter? Here are the contents of the shorewall.spec file %global mainver 5.0.4 %global baseurl http://www.shorewall.net/pub/...
1
vote
0answers
522 views

Trying to build (a)kmod package for acpi_call on Fedora, cannot be installed

I want to package a simple kernel module, acpi_call, for Fedora. For this I have followed the kmods2 instructions on RPM Fusion and got the following SPEC file: # Copyright © 2016 Martin Ueding <...
1
vote
1answer
232 views

Enable SCL python27 so other RPMs can see it

Trying to create an RPM that uses Python 2.7 on a RHEL 6 machine. I'm using SCL to enable Python2.7 and building the RPM with it fine. However, when I try to install that RPM on a different system ...
1
vote
2answers
204 views

Build an RPM for a specific minor version of RH

I need an RPM built for a specific minor version of RH, so that it only installs on that minor version (ex RHEL 6.4) and not on other minor versions like RHEL 6.6. Also when rpm/yum installs this pkg ...
1
vote
1answer
671 views

Subpackage with an empty requires section?

I have an RPM build which looks like this: Summary: LAME Ain't an MP3 Encoder. Name: lame Version: 3.99.5 Release: 1 License: LGPL Vendor: The LAME Project Packager: Naftuli Tzvi Kay <---> URL: ...
1
vote
1answer
616 views

How to modify default install directory for rpmbuild command?

On Suse Linux Enterprise Server 11, I use rpmbuild to install a source rpm: linux-a21w:/usr/src/packages/SPECS # rpmbuild -v -bi zlib.spec By default, it installs into /var/tmp/zlib-1.2.7-build ...
1
vote
0answers
791 views

Have Makefile create rpm spec file

I have a makefile to build my program then a makefile to build my rpm package in addition to an rpm spec file to create the rpm. Right now the spec file is manually maintained. However for future ...
1
vote
0answers
53 views

Error while building libxcrypt

I am building the libxcrypt package on my OBS and I am getting the following error: [ 37s] crypt_util.c:268:1: error: type defaults to 'int' in type name [-Werror=implicit-int] [ 37s] crypt_util....
1
vote
1answer
965 views

rpmbuild different path for sysconfdir

I am building rpm for opensips and i want to install this package in /opt/opensips path instead of default system path I have define following in my SPEC file %define _prefix /opt/opensips %...
0
votes
1answer
593 views

Defining macros for authoring RPM files that require Python 3

The python-devel RPM installs a macro definition file: /etc/rpm/macros.python2 However, after installing python36u-devel from the IUS repository I do not have a Python 3 flavor of this file ...
0
votes
2answers
186 views

Spec rpm: I want make gmake -j3

On my .spec file I want to pass alias make=gmake -j3, using a bash script I did alias make="gmake -j3" how to do in a .spec file?
0
votes
1answer
492 views

RPM %install section

So, I am somewhat puzzled by the rpmbuild process. I'm now maintaining a slew of scripts previously created and while most work, there are enough differences between them that finding a consistent ...