New answers tagged

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 ...
user avatar
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.
user avatar
  • 15.4k
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 ...
user avatar

Top 50 recent answers are included