Questions tagged [rpmbuild]

rpmbuild command used to build rpms from rpm SPEC files

rpmbuild is the command used to build rpms from a rpm SPEC file.

854 questions
154
votes
9 answers

What is the minimum I have to do to create an RPM file?

I just want to create an RPM file to distribute my Linux binary "foobar", with only a couple of dependencies. It has a config file, /etc/foobar.conf and should be installed in /usr/bin/foobar. Unfortunately the documentation for RPM is 27 chapters…
Steve Hanov
  • 11,316
  • 16
  • 62
  • 69
56
votes
3 answers

Automatically install build dependencies prior to building an RPM package

I am trying to build a .rpm package. I have just followed the steps to do that. Till now all steps were gone fine but now i just stuck with this step. I just ran the following command and got this error: rpmbuild -ba asterisk.spec error: Failed…
Juned
  • 6,290
  • 7
  • 45
  • 93
45
votes
7 answers

extract the spec file from rpm package

Is there any way to extract the spec file from rpm package ( I have only RPM file ) not by rpm --scripts -qp my-great-app-1.1.2.rpm ( this syntax not get the spec file only the scripts from the rpm)
jon
  • 903
  • 5
  • 14
  • 21
40
votes
4 answers

How do I get rpmbuild to download all of the sources for a particular .spec?

I am adding some sources to an existing rpm .spec file by URL and don't have them downloaded yet. Is there a way to get rpmbuild to download the sources rather than doing it manually?
joeforker
  • 40,459
  • 37
  • 151
  • 246
36
votes
2 answers

How to set the build area for rpmbuild per-invocation

I'm modifying an automated build, and want to tell rpmbuild to use a specific build area when invoking it. This is similar to an existing question, but more specific. I don't want to run any of the build commands as the root user; the aim is only…
bignose
  • 30,281
  • 14
  • 77
  • 110
36
votes
3 answers

How to pass user defined parameters to rpmbuild to fill variables

is it possible to pass parameters to rpmbuild to fill user defined variables that are called inside the spec file? Example: The user defined variable %{foobar} which is called in the .spec file (but empty) should be filled with the variable which…
mat1010
  • 756
  • 1
  • 9
  • 17
31
votes
1 answer

RPM spec file - Is it possible to dynamically populate a spec file variable

I have a spec file. I need to %define a spec variable that gets its value from a one line file on the system. For example %define path `cat /home/user/path_file` and in path_file is one line /var/www/html/hosts This partially works. I say that…
last_shogun
  • 337
  • 1
  • 4
  • 8
30
votes
4 answers

RPM upgrade uninstalls the RPM

I am upgrading our project RPM. The problem is when I upgrade from projectname-1.0-0 to projectname-1.0-1, it first installs the new project and uninstalls the old project, which, in overall view, removes my project entirely. I have used "vv"…
Vidya
  • 301
  • 1
  • 3
  • 5
27
votes
4 answers

rpmbuild change compression format

I try to pack some map files for our geoserver in an internal rpm package. For the build part, this is just to copy the files. I think this works as expected. But it takes terribly long to pack those 20GB of images. I've read that rpm internally…
mkraemerx
  • 1,713
  • 2
  • 17
  • 21
24
votes
2 answers

Unpacking an RPM file and repacking It

I have a RPM file. I have to make some changes to that RPM , repack it and Test. Can anyone help me?
Monojeet
  • 551
  • 3
  • 6
  • 7
24
votes
2 answers

rpmbuild %{dist} not defined on CentOS 5.5?

I'm attempting to use the %{dist} tag in my RPM spec file to provide distribution-specific dependencies between Fedora Core (e.g. fc12), CentOS 5 (e.g. el5) and Amazon's Linux AMI: Release: %_svn_revision%{?dist} and #…
Barry Wark
  • 107,306
  • 24
  • 181
  • 206
24
votes
5 answers

How to set the rpmbuild destination folder

I noticed rpmbuild (-bb and --buildroot options) creates the .rpm in different locations depending of what OS are you using: GNU/Linux Ubuntu <= 9.04: /usr/src/rpm/... GNU/Linux Ubuntu >= 9.10: /home/rpmbuild/... GNU/Linux Fedora:…
Htechno
  • 5,901
  • 4
  • 27
  • 37
20
votes
2 answers

Python RPM I built won't install

Because I have to install multiple versions of Python on multiple Oracle Linux servers which are built via a kickstart process, I wanted to build a python rpm for our yum repository. I was able to build Python manually using 'make altinstall' which…
Ilane
  • 484
  • 7
  • 18
20
votes
3 answers

rpmbuild Installed (but unpackaged) files source

I'm trying to build an RPM from binaries on a REDHAT 6 system. I have all the files included in the %files section (find /path/to/fake/install -type f >> specfile) When I run rpmbuild -bb specfile --target x86_64 I get Checking for unpackaged…
Trevor
  • 1,369
  • 2
  • 13
  • 28
19
votes
3 answers

How do you make _topdir relative to the location of the .spec file when building an RPM?

I have a .spec file that relies on a variable called _topdir. Right now when you checkout the SRPM source from git, you have to go and change where _topdir is pointing to to get the rpmbuild to function correctly. # We need the following line so…
user177800
1
2 3
56 57