Questions tagged [specfile]
28 questions
15
votes
6 answers
Reference for RPM spec macros (%setup, %buildroot, etc)
Which man page describes the usage of the top-level RPM spec file macros that are defined in RPM source files directly? I mean, %setup, %buildroot and the like, which are not in /usr/lib/rpm. Looking up the %setup options in a tutorial at rpm.org or…
badbishop
- 898
- 3
- 11
- 21
13
votes
1 answer
RPM Spec How to specify in package so that previous RPM is removed
Question:
What do I put in the foo.spec file so that the RPMs will remove the previous RPM before installing?
Description:
I have created a spec file that creates rpm's for a few packages that use the same source and provide the same service, each…
fatehks
- 141
- 1
- 1
- 7
5
votes
1 answer
How to prevent installation of incompatible rpm packages
I have two rpm packages wich should not get installed together.
After googling around i assume there is no RequiresNot tag or something similar to specify incompatible packages in a specfile.
What is the best solution to prevent installing them…
jgb
- 103
- 7
4
votes
1 answer
How to escape spaces in an rpm spec "source" item?
I'm trying to build an RPM, but the source file from the vendor has a space in the filename, and there doesn't seem to be any good way to escape the filename so that it builds.
I've tried putting a \ in front of the spaces. I've tried replacing them…
freiheit
- 14,334
- 1
- 46
- 69
3
votes
1 answer
How to make my RPM abort install based on outcome of %pre scriptlet
I am creating an RPM package that installs some tools on a system. I want to check some machine state before installing my RPM package. My initial instinct is to just run some commands from within the %pre scriptlet, and "exit 1" if the outcome…
Ishpeck
- 204
- 1
- 6
3
votes
1 answer
RPM Dist Tag not behaving as documented
According to the Fedora documentation the %{?dist} tag when building an RPM on CentOS 7 I should get .el7. but currently I get .el7.centos.
The line from my .spec:
Release: 1%{?_buildid}%{?dist}
I cannot find any documentation talking about this…
kemra102
- 211
- 4
- 12
3
votes
2 answers
RPM package naming for alternative configurations
I currently install PHP from source in several different configurations around my environment, each providing the minimum feature set required for its particular deployment: one deployment requires UNIX socket support via '--enable-sockets', for…
Jeff Albert
- 1,967
- 9
- 14
2
votes
1 answer
What's the correct way to force RPM erase & Install instead of upgrade?
I have an RPM whose software recently had its database schema completely redesigned. The current version (We'll call it B.0) is incompatible with older versions of the database schema.
Fortunately it's still in beta, and since it's not officially…
InfernalRapture
- 121
- 5
2
votes
2 answers
rpm spec file build requires packageX or packageY
Is there a way in the rpm spec file to specify as build requirement packageX or packageY.
Current nodejs 4.1 requires g++>=4.8 or clang++>=3.4 to be able to build the package.
This is only a requirement to build the rpm not a requirement of the…
paulsm25
- 61
- 5
2
votes
1 answer
rpm spec file buildrequires with more than one criteria
Is it possible to specify in a rpm spec file that to be able to build you need a version of a package greater than and at the same time lower than something?
For example I would like to specify python >= 2.7 and < 3.0.
Can it be done with…
paulsm25
- 61
- 5
2
votes
1 answer
Warning messages while building Apache server
I am building Apache server 2.4.6 from source and am not sure about a few warning messages I received during the rpm build process. The build completes OK and everything seems fine..BTW, this is on CentOS 5.5...
During the make install process in…
GoinOff
- 141
- 7
1
vote
1 answer
rpm runtime error due to faulty spec file
I have a spec file in which based on the SLES version, i need to change the 'Requires: ' tag as below
#if suse is greated than SLES 11 sp4
%if %0{?suse_version} > 1140
Requires: genisoimage
%else
Requires: mkisofs
%endif
I am building this rpm…
DTdev
- 113
- 4
1
vote
1 answer
Yum update complains about dependency (architecture mismatch)
I created a meta RPM package (say metapkg) that pulls all the dependencies I need on my system (CentOS 7).
This package specifies the exact versions of its dependencies (without the architecture though).
Example : Requires: perl =…
mgraff
- 31
- 3
1
vote
1 answer
How do I get a basic spec file to work with rpmbuild?
I installed rpmlint and rpmdevtools. I used rpmdevtools to create a template of a .spec file. I modified the spec file so it will install cfengine. I ran rpmlint on the spec file, and I saw no warnings or errors. I then tried to run the…
Propulsion
- 148
- 2
- 9
1
vote
1 answer
How to update crontab for a non-root user on Solaris non-interactively?
I would like to update crontab entries for a non-root user for an application which gets installed as OpenPKG RPM package.
Currently I have this in the %post section of my .spec file:
#
# Set up the 'app' user's crontab.
# Marker lines are used to…
hfs
- 755
- 9
- 10