packaging perl modules, ownership of top level module directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Let's say you want to package a perl module like Compress::Zlib as an
RPM.  You have your spec file set up (yes, I know about Mezzanine and
cpanflute2) and your %files section looks like this:


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

%{SITE_PERL}/%{PERL_FULL_VERSION}/%{ARCHDIR}/auto/Compress/Zlib
%{SITE_PERL}/%{PERL_FULL_VERSION}/%{ARCHDIR}/Compress/Zlib.pm

%{PERL_MAN_ROOT}/man3/Compress::Zlib.3*




Assume that OWNER, GROUP, SITE_PERL, PERL_FULL_VERSION, ARCHDIR, and
PERL_MAN_ROOT are all defined to reasonable values previously in the spec
file.

The thing to note is that this RPM doesn't claim ownership of the
auto/Compress directory or the Compress directory -- only the Zlib directories
(and contents) underneath them.  This is what I intended.  We've used
this type of thing for years with an ancient version of RPM (2.5.6), and
more recently on Red Hat AS 3 and AS 4 with the version of RPM that's included
with them.

I've been experimenting with rpm 4.4.5 and now 4.4.6 on my Solaris
workstation, and I discovered that this type of construct no longer works,
because RPM wants something to provide the "Compress" directories, and nothing
currently is, so it's giving the "Failed dependencies" error when I try
and install the RPM that I build from this spec file.

So what's the right thing to do here?  "Lie" in the %files section of
Compress::Zlib (and any other Compress::* modules that might be installed)
and claim that the module owns the Compress directory? The logical outcome
of that is that nearly every perl module RPM that's part of a particular perl
"namespace" (like HTML::, Digest::, XML::, etc.) is going to need to claim
that it owns the top directories for that namespace.  In some cases
(Digest::Base) there's a clear candidate for ownership of the top directory,
but in many there's not.

How others are handling this situation?  Have every RPM claim it owns
the top of the namespace it's in and down?

Thanks,


Tim
--
Tim Mooney                              mooney@xxxxxxxxxxxxxxxxxxxxxxxxx
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux