Questions tagged [rpmbuild]

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

rpmbuild prepares RPM packages (see the tag) from scenarios also known as spec-files. spec-files provide information to rpmbuild about necessary steps which should be executed to produce RPM packages.

In general, RPM preparing routine consists of the following steps:

  1. Creating of building environment:

    mkdir ~/rpmbuild
    mkdir ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
    # Directories summary:
    #
    # BUILD     in this directory source code will be built
    # BUILDROOT in this directory software will be installed before packing in the package
    # RPMS      this directory contains completed (binary) RPM packages
    # SOURCES   where you should put the sources for the application
    # SPECS     where you should place the spec file(s)
    # SRPMS     this directory contains completed source RPM packages
    
  2. Putting source files into the ~/rpmbuild/SOURCES directory.

  3. Putting spec-files into the ~/rpmbuild/SPECS directory.
  4. Running rpmbuild options /path/to/spec/file.

See also the rpmbuild(8) man page and detailed instructions in the Fedora RPM Guide.

140 questions
5
votes
1 answer

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 source code for a while now as noarch RPMs. Recently…
kaizenCoder
  • 537
  • 4
  • 8
  • 15
5
votes
2 answers

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 packages include a variety of software, including…
jayhendren
  • 8,224
  • 2
  • 30
  • 55
4
votes
0 answers

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 is just a matter of running this script: wget…
BenMorel
  • 4,447
  • 8
  • 36
  • 46
4
votes
2 answers

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: user mockbuild does not exist - using root warning:…
Cyker
  • 4,174
  • 6
  • 34
  • 45
4
votes
2 answers

How to avoid undesirable dependencies in rpm package?

I am making a package for RHEL7. When I try to install the package, I get # yum localinstall mypackage-0.0-1.el7.rpm (...) --> Running transaction check ---> Package webmin-GPI-init.noarch 0:0.0-1.el7 will be installed --> Processing Dependency:…
MUY Belgium
  • 1,234
  • 2
  • 14
  • 31
4
votes
2 answers

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…
Avinash Nair
  • 221
  • 4
  • 10
4
votes
2 answers

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.i386 Huh? That's strange: [root@local_host ]#…
Jon
  • 495
  • 1
  • 6
  • 19
4
votes
1 answer

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 section of the RPM. It sucks maintaining the same…
GoinOff
  • 589
  • 3
  • 13
  • 27
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
2 answers

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 have mutt at least 2.0.7, because I will soon need…
raj
  • 981
  • 2
  • 10
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

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/Source_RPM However, all throughout the wiki, it's…
Sittin Hawk
  • 141
  • 1
  • 6
3
votes
2 answers

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()(64bit) This is installed at /usr/lib64 but not…
kabanus
  • 311
  • 1
  • 16
3
votes
1 answer

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 on copr machines, or did I miss some…
Cyker
  • 4,174
  • 6
  • 34
  • 45
3
votes
1 answer

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.py, patched and re-built src.rpms). Running the…
1
2 3
9 10