New answers tagged rpmbuild
1
vote
Accepted
How do you put conditionals in an RPM spec file for %install and %file macros?
Spec has its own syntax for conditionals, you need to use something like this:
%if %{test} == "true"
%attr(0644, user1,user1) /home/user1/file1.txt
%endif
You can read more about spec ...
4
votes
Accepted
Why can't I see print statements in my RPM spec file?
The %pre and %post scriptlets are run at install time, not at build time. You will not see these statements echo'ed out during the rpmbuild, you will see them when you install the package with rpm -i.
2
votes
Accepted
How do you modify the RPM spec file to require perl libraries on centos 7?
Instead of adding a dependency on perl-libs, a better practice is using Perl dependency generators. This can be achieved by simply including the following:
BuildRequires: perl-generators
Not only it ...
Top 50 recent answers are included
Related Tags
rpmbuild × 123rpm × 81
centos × 32
rpm-spec × 31
rhel × 16
linux × 14
fedora × 14
packaging × 12
yum × 9
compiling × 5
package-management × 4
dependencies × 3
debian × 2
kernel × 2
python × 2
perl × 2
tar × 2
kernel-modules × 2
opensuse × 2
make × 2
scientific-linux × 2
rpmlint × 2
security × 1
cron × 1
gnome × 1