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
19
votes
5 answers

what does the rpmbuild warning "File listed twice" ACTUALLY MEAN?

I need to specify common attributes for one of the major directories in the package, and special permission for some of it subdirs. e.g. %files %attr(-, myuser, mygroup) /opt/myapp %attr(750, myuser, mygroup) /opt/myapp/bin # no exec permission to…
davka
  • 13,974
  • 11
  • 61
  • 86
18
votes
3 answers

Define Version with script in RPM spec file

I have an RPM Spec file, building on rhel7 with rpmbuild, where I would like to define the Version with a script. I read here http://www.techrepublic.com/article/rpmproc-spec-file/ , That I can do this: %define version 1.2 Version: %{version} And…
Jimmie
  • 397
  • 2
  • 5
  • 20
17
votes
2 answers

what does find-debuginfo.sh in rpmbuild do? how can I get rid of it?

I have two boxes that I'm using to build a source rpm. One of them runs: /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/name-of-package which adds three name.debug files to the RPM_BUID_ROOT. the other build box does not run…
Arthur Ulfeldt
  • 90,827
  • 27
  • 201
  • 284
15
votes
4 answers

Packaging symlinks via rpmbuild?

Is it possible to make rpmbuild to preserve symlinks on packaging? The current behavior is to create copies of files, which I would like to avoid.
SyBer
  • 5,407
  • 13
  • 55
  • 64
15
votes
2 answers

rpmbuild: how to skip generation of "debuginfo" packages (without change SPEC file ; neither .rpmmacros)

We need to (re)generated third party packages on EL7 but we don't want to change SPEC file as suggested (%define debug_package %{nil} https://www.redhat.com/archives/shrike-list/2003-April/msg00069.html) and neither changing the ~/.rpmmacros file as…
Destroyica
  • 4,147
  • 3
  • 33
  • 50
13
votes
6 answers

Is there any syntax or trick to be able to create a multiline rpm spec file macro

Background. $ rpmbuild --version RPM version 4.3.3 I am working on a spec file that needs to process a list of files in multiple scriptlets. DRY (don't repeat youself) has me defining the list once as a macro which is expanded into the various…
Chaim Geretz
  • 826
  • 5
  • 23
13
votes
1 answer

Exclude or delete directory path from %files in rpm.spec file

My spec files path looks like below :…
Prem
  • 131
  • 1
  • 1
  • 4
13
votes
1 answer

Rpmbuild - setting name of created .rpm

I've been trying to find out what's the easiest way to set a fixed filename during rpm creation. Can it be set somewhere in .spec file or as rpmbuild parameter? The default name depends on version and release number. Name of my rpm has to be always…
sync
  • 131
  • 1
  • 1
  • 4
12
votes
4 answers

How to change rpmbuild default directory form /root/rpmbuild directory to other

I have to build a rpm package for some drivers. I need to build the rpm from a .tar.gz archive. The tar ball also contains the .spec file. I have set up my rpmbuild environment as described here:…
user1764386
  • 5,311
  • 9
  • 29
  • 42
12
votes
2 answers

rpmbuild %clean phase without removing files

I am getting the following in my build log: Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.CgE2Qn + umask 022 + cd /export/home/svn_checkouts/*snip*/Output/release/bin/packaging/BUILD + /bin/rm -rf…
devios1
  • 36,899
  • 45
  • 162
  • 260
11
votes
2 answers

How to set owner for directory in the %files?

If I have this line in the %files: %attr(0555, myuser, myuser) /opt/myapp/lib/my.jar Then my.jar will have myuser as owner, but directory /opt/myapp/lib will be owner by root. I don't want to write %attr(0555, myuser, myuser) /opt/myapp/lib/ as I…
Eran Ben-Natan
  • 2,515
  • 2
  • 16
  • 19
11
votes
2 answers

Disable rpmbuild automatic requirement finding

The default behavior of rpmbuild seems to be to scan every file in the buildroot for #! lines and add those interpreters as hard requirements. Is it possible to disable this? I've run into a situation where people are committing scripts with…
jsd
  • 7,673
  • 5
  • 27
  • 47
10
votes
3 answers

Bad exit status from /var/tmp/rpm-tmp.ajKra4 (%prep)

I am having a weird RPM issue, I am new to it so bear with me... I have the spec file created and when I run to do the build I get an error: /var/tmp/rpm-tmp.ajKra4: line 36: cd: hero-01: No such file or directory error: Bad exit status from…
DoCnTex
  • 113
  • 2
  • 5
  • 11
10
votes
3 answers

chkconfig command in rpm spec file

I would like to use 'chkconfig --del NetworkManager' command in the %install section of a rpm spec file. If I include this command the rpm is building fine but when I install that rpm, it looks that the command does not get executed. After…
Souvik
  • 601
  • 1
  • 8
  • 16
10
votes
1 answer

Python 3.5 create .rpm with pyinstaller generated executable

I've got a build generated with a pyinstaller. I need to create .rpm package which will put the executable into the /usr/bin/ and create a systemd service which will run that executable. I found this…
user1935987
  • 3,136
  • 9
  • 56
  • 108
1
2
3
56 57