Questions tagged [rpm-spec]

The rpm spec file contains the information required by RPM to build a package.

The spec file is at the heart of RPM's packaging building process. Similar in concept to a , it contains information required by RPM to build the package, as well as instructions telling RPM how to build it. The spec file also dictates exactly what files are a part of the package, and where they should be installed.

(From the max-rpm book)

This tag is closely related to and . You should research those tags to see if a similar question exists.

578 questions
2
votes
2 answers

RPM "skip"s owned file during uninstall

I have created an RPM for a piece of software my team is building. The installation works great, but I'm adding in logic to make the software uninstall and restore the system to a working state. As part of the install, I have to place a…
shawmanz32na
  • 1,260
  • 3
  • 15
  • 19
2
votes
1 answer

RPM Dependency on File Existance

Is there a way to make my custom RPM dependent on a single file which is not installed by a RPM. For example, a file /usr/local/test is installed by a tar file. I want to make my RPM dependent on the existence of /usr/local/test. Thanks!
user3748237
  • 93
  • 1
  • 1
  • 4
2
votes
2 answers

rpm spec file - How to specify multiple package archtypes in the requires

What I have in spec Requires: lftp zsh boost db4 db4-devel What I need in spec Requires: lftp zsh boost db4 db4-devel db4-cxx.i686 db4-devel.i686 But the x.i686 doesn't work. When I try to install the package with yum, it just says Error: Package:…
Nunes
  • 113
  • 1
  • 1
  • 7
2
votes
2 answers

Rpm Downgrade script in spec file

I Create some file in %post script of rpm as follow --spec file version 1.1 -- %post echo %{version} `date` > /var/info Above script is not present old rpm (i.e version <= 1.0). /var/info file is created when new (version 1.1) rpm is installed I…
2
votes
1 answer

Create log file when installing rpm

What the best way to create a log file in an rpm spec file? The service I'm creating runs under an unprivileged user so cannot create files in /var/log/.
Noodles
  • 900
  • 4
  • 14
  • 30
2
votes
2 answers

configurable location of .rpmmacros file

How to pass the location of .rpmmacros file in rpmbuild command ? by default it try to look for it in home dir. I tried -rcfiles /location/to/.rpmmacros but it gave me error: missing ':' (found 0x2f) at /usr/local/.rpmmacros:1 content of…
Bhuvan
  • 4,028
  • 6
  • 42
  • 84
2
votes
1 answer

Give RPM macro an argument with spaces

Example RPM macro: %define hello() \ printf 'hello, %{1}.\\n'; I would like to be able to give it macros with spaces in it, as in: %{hello "Dak Tyson"} -> printf 'hello, Dak Tyson.\n' However, it keeps doing this: %{hello "Dak…
djhaskin987
  • 9,741
  • 4
  • 50
  • 86
2
votes
1 answer

How to use timestamp in spec rpm?

Can I use current timestamp ( or day, or else uniq param ) as release in spec rpm file ? For example, something like this: Release: 100%{?dist}.test.%{timestamp}
Bdfy
  • 23,141
  • 55
  • 131
  • 179
2
votes
2 answers

Is there a safe way to modify another package's entry in the RPM database?

I've run into the problem described in this question, where an old package was Obsoleted, and its %preun script is run with $1 = 0, resulting in undesirable behavior. I know this could be worked around by using -e + -i, as suggested in that answer,…
DNS
  • 37,249
  • 18
  • 95
  • 132
2
votes
1 answer

RPM Spec file for Upgrading

My product is already installed and i want to upgrade it. Now my upgrade contains only one file where as the actual product contain a directory structure with more number of file. Now when i am using rpm -Uvh abc.x86_64.rpm it is removing all the…
Srini
  • 21
  • 2
  • 5
2
votes
1 answer

How to abort the installation of an rpm package if some conditions are not met in specfile?

There are some more things that the Requires tag does not satisfy. So i wrote a script to verify these things but where do I place them ? And if not found then i want to quit installation prompting user to do the steps before attempting to install…
Basit Anwer
  • 6,742
  • 7
  • 45
  • 88
2
votes
3 answers

install RPM from an rpm

i am trying to install multiple RPM from one RPM install.i have make the spec file into that in %post section i install the another rpm using command. %post rm -f /var/lib/rpm/__db.0* rpm --rebuilddb rpm -ivh xyz.rpm But when the main RPM is…
meet patel
  • 181
  • 1
  • 2
  • 17
2
votes
2 answers

RPM packaging a tarball with a proprietary installer

I'm currently trying to create an RPM from a tarball that uses a proprietary binary installer to dump a bunch of files in the filesystem. This installer does not let me dictate where the files go (so I can't just dump them into a build folder). What…
2
votes
2 answers

RPM-Build -How to print error message at rpm install at client

my requirement is that i want to print some message on screen if rpm install fails in any case at client machine.or display message on screen like rpm install fail due to any of the generated reasons.like other standard rpm gives. and i am not…
meet patel
  • 181
  • 1
  • 2
  • 17
2
votes
3 answers

Keep files generated by RPM after rerunning rpm -e

Is it possible to keep RPM content in the filesystem after the uninstallation ? Basically, I don't want to erase the files generated by the RPM when someone runs rpm -e, but still remove the package from the list of installed RPMs. I want to…
Daddou
  • 379
  • 1
  • 4
  • 13