directory conflicts between packages

Tim Mooney Tim.Mooney at ndsu.edu
Fri Mar 24 20:01:56 UTC 2023


In regard to: directory conflicts between packages, Tim Mooney said (at...:

> At least on RHEL 9, though, with rpm 4.16.1.3, that's treated as an error:
>
> 	Error: Transaction test error:
>  file /usr/local/lib64/perl5/5.32/auto/Test from install of 
> perl-Test-Exception-0.43-1.x86_64 conflicts with file from package 
> perl-Test-Pod-1.52-1.x86_64
>  file /usr/local/share/perl5/5.32/Test from install of 
> perl-Test-Exception-0.43-1.x86_64 conflicts with file from package 
> perl-Test-Pod-1.52-1.x86_64

I figured this out, and the error was mine.

It's still fine (AFAICT) for perl modules to share directories when
needed, and for each of them to claim a directory like

 	%{perl_sitelib}/Test

Where the problem happens is if one of the packages specifies different
permissions for that directory.

In my case, our local perl-Test-Pod was specifying an incorrect group on
that directory.  We've historically used

%define OWNER root
%define GROUP local

at the top of our local spec files and then

%defattr(-,%{OWNER},%{GROUP})

in the %files section, along with managing permissions as needed.

The problem is that %{GROUP} became a pre-defined macro based on the
Group: tag with rpm in RHEL 8, and some of our spec files haven't been
updated to change our conflicting %{GROUP} to something else.
perl-Test-Pod was one of them.  Once I fixed that, the problem went away.

Sorry for the noise.

Tim
-- 
Tim Mooney                                             Tim.Mooney at ndsu.edu
Enterprise Computing & Infrastructure /
Division of Information Technology    /                701-231-1076 (Voice)
North Dakota State University, Fargo, ND 58105-5164


More information about the Rpm-list mailing list