Questions tagged [rpm-spec]
This tag is for RPM spec files, the source file for building RPM packages using rpmbuild.
57
questions
0
votes
1
answer
57
views
automatically activate service after RPM was installed
OS - Red Hat Enterprise Linux 8
I've created a .spec file to build and package my application. My rpm also includes my_app.service file for systemd to start it. However, by default one has to enable ...
1
vote
1
answer
17
views
Modifying compiler options when building RPMS that use cmake
I'm building a package on Rocky 8 that works fine on Fedora 35. When I tried to compile it on Rocky 8 using rpmbuild -ba, I got the error: relocation xxxxx can not be used when making a shared object; ...
1
vote
1
answer
56
views
rpmbuild fails | Missing dependencies (However missing dependencies are installed)
I'm attempting to build RPM's & Repo's for various agent's we use at my company. This particular package has a private library and I'm unable to figure out what the problem is.
The package seems ...
1
vote
2
answers
27
views
RPM macro and quotes
I would like to include a file in a package with a directory which is dependendat on the system.
I define the directory with
%define completions_dir "%( pkg-config --variable=completionsdir bash-...
1
vote
1
answer
63
views
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 ...
2
votes
2
answers
123
views
Make OS-dependent Requires section in an RPM spec file
Situation
I have an RPM that uses semanage (SELinux policy management tool) and restorecon (SELinux context configuration tool) in the post-installation and pre-uninstallation stages.
Unfortunately, ...
2
votes
0
answers
62
views
build rpm for python2 if python3 is not installed
I want to package a python application which can run on both python2 and python3 for we have still old systems running python2.
the default should be python3 but in case of python3 is not installed. I ...
0
votes
0
answers
110
views
shebang changed to /usr/libexec/platform-python when building python rpm packages
I am trying to build a RPM from a python application on RHEL8.2 machine.
the shebang on the scripts are set correctly to #!/usr/bin/python3
however for some reason the shebang gets changed to #!/usr/...
0
votes
1
answer
64
views
Linux RPMBUILD SPEC, how to Install to custom location /usr/local/file1 not always /usr dirctory
I'm having problem for RPM to be installed to /usr/local/file1, it always installs to /usr/local/file1/usr. I even used ./configure --prefix /usr/local/file1 and it still installed to /usr/local/...
0
votes
0
answers
45
views
SPEC File How to Remove All Dependencies postun
I'm using the maven rpm plugin to build a WinCC OA application. The following are my require statements:
<requires>
<requiresPre>minizip</requiresPre>
<require>WkRt-Lin&...
2
votes
1
answer
1k
views
How do you set an environment variable for the current session in an rpm?
I am producing an rpm for Sia in ClearOS7 (based on Centos7) and have hit a brick wall. I am trying to set SIA_DATA_DIR=/var/lib/siad-data for the session where I am installing the rpm. It is needed ...
0
votes
1
answer
48
views
how to run a script in postun section in spec file
I have a spec file with some content. There is also a script:
%postun
if [ '$1' == 0 ]; then
do some things
fi
I want that a script in %postun section has been executed after package removed. ...
0
votes
1
answer
349
views
Restart service after RPM transaction
I have an RPM package which updates a config file and so entails a restart of that service (rsyslog). My supported platforms include a pre-systemd version (centos6) and systemd versions (centos7+). My ...
0
votes
1
answer
67
views
Same RPM for multiples CentOS major versions
I've created a little bash script and build it into a RPM package.
This little bash script works very well on CentOS 5, CentOS 6 and CentOS 7 (and probably on CentOS 8, not checked)
My question is: Do ...
1
vote
1
answer
261
views
Fedora 33 RPM package provides its own libraries won't install says "nothing provides"
This should be watching ice melt simple, but it is not. I'm on Fedora 33 and creating an RPM for the Diamond text editor. I've got the Debian stuff all done and works great. Diamond uses the ...
2
votes
1
answer
342
views
Build RPM subpackages without a base package
According to a RPM documentation/guide (http://ftp.rpm.org/max-rpm/ch-rpm-subpack.html) one can use subpackages to build multiple RPM packages with a single SPEC file. In the mentioned link the ...
0
votes
2
answers
305
views
Is it possible to determine which build flags were used on a pre-built RPM package?
I have been using the Quagga dynamic routing daemon on a CentOS 6 VM. I'd like to use a feature that is only accessible if the RPM was built with the --multipath=X flag. The RPM I'm using was already ...
0
votes
1
answer
31
views
How do I get around a transaction check error in an RPM that needs to overwrite a configuration file?
I'm packing something and the upstream provider clobbers a configuration file.
Transaction check error:
file /etc/acme-engine/acme-engine-fpm.conf from install of acme-1-74.1.el7.noarch conflicts ...
1
vote
1
answer
405
views
%dir doesn't seem to work in spec file
It's my understanding of %dir that if I have
%files
%dir /foo/bar
That I now do not have to list each file individually of /foo/bar. However when I build my RPM in OBS I'm getting,
error: Installed (...
1
vote
1
answer
849
views
How can I reliably modify build configs and add compiler flags in C/C++ RPM files?
I need to change the build configuration of a large number of rpm files for testing purposes. I'm only speaking of C/C++ code here. I'm not necessarily looking to do automation, but I could use a hand ...
0
votes
1
answer
188
views
How are Sources mapped to commands in a RPM specfile? [closed]
In an RPM specfile, sometimes I will see:
Source0: /some/path/or/url/file.tar.xz
Source1: /another/path/or/url/file2.tar.gz
Source2: /some/path/library.so
Source4: /other/path/icon.ico
...
Sometimes ...
0
votes
1
answer
447
views
How does pkg-config work in RPM specfiles?
In some RPM specfiles, I see lines like:
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(libnotify)
BuildRequires: pkgconfig(libssl)
...
I am not very familiar with pkgconfig but I understand ...
0
votes
1
answer
61
views
How to compile from source and repackage into binaries for distribution?
currently I have compiled and installed the GDAL3.0.4 library from source which also require me to compile and install Proj6.0.0. That is working fine.
So my next part is, i need to package the ...
2
votes
2
answers
665
views
What are some effective ways to build & run an SRPM without installing it?
I am on Fedora 31 and I do software development. I need to work with code in many source RPM packages for relatively short periods of time. For this reason, I'd like to simply build the package, but ...
0
votes
1
answer
106
views
Is there a way to bump the non-right most part of the version in RPM?
With rpmdev-bumpspec I can do
-r, --rightmost
bump trailing .<DIGIT> component if found, append .1 if not; no-op if -s is specified
-s STRING, --string=STRING
bump trailing ....
0
votes
1
answer
46
views
Is there a way to specify a dependency where anyone of a group can satisfy the demand?
Let's say I'm packaging an RPM which requires one of the following,
Foo
Bar
Baz
Does RPM support the functionality to put that into a spec file?
1
vote
1
answer
250
views
RPM Spec file %setup macro when you don't know the root name?
How do I use the %setup macro if I don't know the root name of the archive. For example, in my case I have archive.tar.gz that extracts to
myproject-<githsha>/
Each time I run that I may get a ...
0
votes
1
answer
770
views
cron job setup using rpm is not working
I've below cron file
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
LOG_DIR=/var/log/myapp-services-cron
MYAPP_SERVICES_DIR=/opt/myorg/apps/myapp-services
* * ...
1
vote
2
answers
63
views
Rpmlint "use-tmp-in-%postun" error
rpmlint output:
E: use-tmp-in-%postun
Spec file:
%postun
rm -r /var/aci /tmp/aci_tmp 2> /dev/null
Also, I cant remove package
How I can remove directory in /tmp after or before uninstalling ...
1
vote
1
answer
142
views
Empty directories are left over after uninstallation of package on higher version of RPM on LINUX
RPM version 4.8.0:
[root@sdl34815 x8664]# rpm -ivh tmfi1700-17.00.00.00.rpm
Preparing... ########################################### [100%]
1:tmfi1700 ###############################...
2
votes
1
answer
1k
views
How can you specify ./configure args with rpmbuild?
I'm trying to build an rpm with nginx, and the nginx rtmp module.
I got my nginx source tar.gz, and my rtmp tar.gz, and placed them in the SOURCES dir.
I then made this spec file:
Name: nginx
...
1
vote
0
answers
184
views
How does YUM decide which package is the best install candidate for a dependency when there are several options?
I have a package that I need to be compatible with openjdk 11 and oracle java 11. I'm trying to create a metapackage that can depend on openjdk java 11 or oracle java 11:
My openjdk metapackage spec ...
1
vote
0
answers
81
views
Why is my rpmbuild %{dist} .fc30.fc30 instead of just .fc30?
I have a .spec file:
Name: somefile
Version: 1.0.0
Release: 1%{?dist}
...
Which produces an RPM:
somefile-1.0.0-1.fc30.fc30.noarch.rpm
Why is %{dist} applying .fc30 twice? ...
0
votes
1
answer
745
views
Centos 7 RPM Packaging - Create a desktop shortcut during installation
I am developing a cross-platform UI with .Net Core and am packaging it using RPM Package Manager. I have created the RPM file to be locally installed. The %install section of my spec file looks like ...
0
votes
0
answers
143
views
How to create RPM for generic Perl module
I have a generic Perl module that will run on any release of Perl 5. I need to create an RPM for it that will install it into the vendor_perl subdirectory.
I don't want to create different RPMs for ...
1
vote
2
answers
378
views
Yum is not respecting `Requires` maximum version. How can I debug and check what yum thinks the dependency version is?
I manage an RPM package and there are versions numbered like:
my-package-1.1.1-1, my-package-1.1.2-1, my-package-1.1.3-1, my-package-1.2.0-0.alpha01.1.
I'm now trying to get another package to ...
1
vote
1
answer
49
views
RPM creation solve depencies
I have created a rpm on Centos 7 it needs rh-python36 and centos-release-scl-rh is required to be installed in advance, so the current sequence is :
sudo yum install -y centos-release-scl-rh
sudo yum ...
1
vote
0
answers
426
views
Building custom RPM with boolean BuildsRequires and Requires
I'm trying to use boolean logic for my dependencies (https://rpm.org/user_doc/boolean_dependencies.html) in a custom spec file, but I'm running into trouble.
.spec snippet
BuildRequires: libxml2-...
2
votes
2
answers
940
views
How to acquire SPEC files from SRPM?
is it possible to specifically download only SPEC files (which are used in srpm files for rpm building) ?
Or more precisely, is there any server that would store only SRPM files available for ...
3
votes
1
answer
4k
views
How do I set a RPM package to require Java 8 or higher, whose dependencies can be satisfied by Java 11
I'm trying to package an RPM that requires any Java version above Java 8.
The RPM works fine if there's no Java installed, or if JRE/JDK for 8 is installed.
HOWEVER if I install OpenJDK 11, when I ...
0
votes
1
answer
269
views
RPM spec file: How to link Requires version to BuildRequires version used at build time?
Suppose I have this in my spec file:
BuildRequires: foo-devel
Where I don't care which version of foo is used.
And in
%package bar
Summary:
Group:
Requires: foo = %{foo_devel_version}
%...
1
vote
1
answer
1k
views
CentOS 7 - problem encountered with the set up of spec file during creation of RPM package
I'm aiming to translate a Debian package to an RPM package to install it on a CentOS Linux 7 (Red Hat).
I used alien to accomplish it: alien --to-rpm --scripts --keep-version --generate debian_pkg.deb....
5
votes
1
answer
2k
views
Where I can find original CentOS RPM Spec files?
Recently CentOS upgraded from 7.5 to 7.6 and now one of the packages upgraded to a newer version I'm not ready to use yet. I'm planning instead to build and support an older version of this package.
...
3
votes
0
answers
1k
views
How to build an RPM package for python app that works in Fedora 28 and 29, which have different default Python3 version?
What I Want To Do
I'm trying to build an RPM package of my app that could be installed in different Fedora distros, which have different default Python 3 versions (i.e. Fedora 28 has python3.6, and ...
0
votes
1
answer
543
views
Custom options during RPM install with rpmbuild
I would like to use custom options during RPM install. I use rpmbuild to craft the RPM so I have the SPEC file.
Can I define my own option that I can use in the SPEC file (e.g. rpm -i --r_password=...
1
vote
0
answers
555
views
how to build compiled rpm of gcc 8.2
I am trying to make an rpm of gcc 8.2 for centos 7.
Honestly I am trying my best to understand how to use rpmbuild and .spec file, but it's too hard for me to understand.
I tried packaging my hello ...
2
votes
1
answer
435
views
Cannot build RPM packages from SRPM using mock
I've successfully built the SRPM and after that step I'm trying to build the RPM from the SRPM. Following is the directory from where I am building the RPM. THe Source RPM are in the following ...
1
vote
0
answers
802
views
Package shell script as RPM
I would like to package a shell script to be installed via an RPM. This is my code repo, and this is my build at COPR.
SPEC file
For reference here's my SPEC file:
Name: {{{ git_name }}}
...
1
vote
2
answers
1k
views
rpm mock - complex rpm building
Lets say I want to make an RPM which delivers an Apache Webserver with its own OpenSSL:
/mydir/apache_postfix1
/mydir/openssl_postfix1
Since Apache mod_ssl requires a real OpenSSL installation I ...
2
votes
1
answer
8k
views
How do you use rpmbuild to make an rpm package when there are file not found or permission errors?
I am trying to create an RPM file for the wget utility. Both of my attempts (with sudo and without sudo) to use the rpmbuild comman fail to create an .rpm file.
I run a "sudo rpmbuild" command to ...