Hi,
I'm trying to package the Perl XML-SAX module. I'm using the Perl __find_{requires,provides} redefines etc. in the spec file.
I end up with a package containing (I've left the docs out of this list):
/usr/lib/perl5/vendor_perl/5.8.0/XML/SAX.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/Base.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/DocumentLocator.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/Exception.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/Intro.pod /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/ParserFactory.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/DTDDecls.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/DebugHandler.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/DocType.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/EncodingDetect.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/Exception.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/NoUnicodeExt.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/Productions.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/Reader.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/Reader/NoUnicodeExt.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/Reader/Stream.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/Reader/String.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/Reader/URI.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/Reader/UnicodeExt.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/UnicodeExt.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/PurePerl/XMLDecl.pm /usr/lib/perl5/vendor_perl/5.8.0/XML/SAX/placeholder.pl
The package says to require (I only list the perl(...) entries):
perl(Carp) perl(Encode) perl(Exporter) perl(File::Basename) perl(File::Spec) perl(File::Temp) perl(IO::File) perl(Symbol) perl(XML::NamespaceSupport) perl(XML::SAX) perl(XML::SAX::Base) perl(XML::SAX::DocumentLocator) perl(XML::SAX::Exception) perl(XML::SAX::ParserFactory) perl(XML::SAX::PurePerl::DTDDecls) perl(XML::SAX::PurePerl::DocType) perl(XML::SAX::PurePerl::EncodingDetect) perl(XML::SAX::PurePerl::Productions) perl(XML::SAX::PurePerl::Reader) perl(XML::SAX::PurePerl::Reader::Stream) perl(XML::SAX::PurePerl::Reader::String) perl(XML::SAX::PurePerl::Reader::URI) perl(XML::SAX::PurePerl::XMLDecl) perl(constant) perl(overload) perl(strict) perl(utf8) perl(vars)
But now the problem, it says to provide (I only list perl(...) entries):
perl(XML::SAX) = 0.12 perl(XML::SAX::Base) = 1.04 perl(XML::SAX::Base::NoHandler) perl(XML::SAX::DocumentLocator) perl(XML::SAX::Exception) = 1.01 perl(XML::SAX::ParserFactory) = 1.01 perl(XML::SAX::PurePerl) perl(XML::SAX::PurePerl) = 0.90 perl(XML::SAX::PurePerl::DebugHandler) perl(XML::SAX::PurePerl::Exception) perl(XML::SAX::PurePerl::Productions) perl(XML::SAX::PurePerl::Reader) perl(XML::SAX::PurePerl::Reader::Stream) perl(XML::SAX::PurePerl::Reader::String) perl(XML::SAX::PurePerl::Reader::URI)
So, when I try to install it, it says:
error: Failed dependencies: perl(XML::SAX::PurePerl::DTDDecls) is needed by perl-XML-SAX-0.12-XOS.1beta1 perl(XML::SAX::PurePerl::DocType) is needed by perl-XML-SAX-0.12-XOS.1beta1 perl(XML::SAX::PurePerl::EncodingDetect) is needed by perl-XML-SAX-0.12-XOS.1beta1 perl(XML::SAX::PurePerl::XMLDecl) is needed by perl-XML-SAX-0.12-XOS.1beta1
But thes things *are* included, but not seen by the find_provides script?
Puzzled...
-- -- Jos Vos jos@xos.nl -- X/OS Experts in Open Systems BV | Phone: +31 20 6938364 -- Amsterdam, The Netherlands | Fax: +31 20 6948204
On Thu, 2003-07-31 at 12:22, Jos Vos wrote:
Hi,
I'm trying to package the Perl XML-SAX module. I'm using the Perl __find_{requires,provides} redefines etc. in the spec file.
[snip]
error: Failed dependencies: perl(XML::SAX::PurePerl::DTDDecls) is needed by perl-XML-SAX-0.12-XOS.1beta1 perl(XML::SAX::PurePerl::DocType) is needed by perl-XML-SAX-0.12-XOS.1beta1 perl(XML::SAX::PurePerl::EncodingDetect) is needed by perl-XML-SAX-0.12-XOS.1beta1 perl(XML::SAX::PurePerl::XMLDecl) is needed by perl-XML-SAX-0.12-XOS.1beta1
But thes things *are* included, but not seen by the find_provides script?
If you peek at the affected files, you'll see that they actually are not "included" as far as rpm is concerned. rpm looks at the "package foo" statements when building the list of Provides, and "use/require foo" for Requires.
Those files do not have a package of their own, instead they blend into the XML::SAX::PurePerl package. And perl allows one to use() them using the fully qualified, "fake" package name (based on the dir structure, I believe).
The approach I took (see http://cachalot.mine.nu/9/) was to manually add the following to satisfy the deps (NoUnicodeExt and Unicode just for consistency):
Provides: perl(XML::SAX::PurePerl::DocType) Provides: perl(XML::SAX::PurePerl::DTDDecls) Provides: perl(XML::SAX::PurePerl::EncodingDetect) Provides: perl(XML::SAX::PurePerl::NoUnicodeExt) Provides: perl(XML::SAX::PurePerl::UnicodeExt) Provides: perl(XML::SAX::PurePerl::XMLDecl)
On Thu, Jul 31, 2003 at 06:42:41PM +0300, Ville Skyttä wrote:
If you peek at the affected files, you'll see that they actually are not "included" as far as rpm is concerned. rpm looks at the "package foo" statements when building the list of Provides, and "use/require foo" for Requires.
Ah yes, ok, then I shouldn't blame rpm's scripts.
Those files do not have a package of their own, instead they blend into the XML::SAX::PurePerl package. And perl allows one to use() them using the fully qualified, "fake" package name (based on the dir structure, I believe).
What about packaging XML-SAX-PurePerl? Shouldn't that solve the problem? I have to admit I don't know much about this area, but I needed XML-SAX because it is required by XML-LibXML.
On Thu, Jul 31, 2003 at 11:17:47PM +0200, Jos Vos wrote:
On Thu, Jul 31, 2003 at 06:42:41PM +0300, Ville Skyttä wrote:
If you peek at the affected files, you'll see that they actually are not "included" as far as rpm is concerned. rpm looks at the "package foo" statements when building the list of Provides, and "use/require foo" for Requires.
Ah yes, ok, then I shouldn't blame rpm's scripts.
Actually, the final fix needs to be in rpm helper scripts, there's a couple of regex's that need tweaking or special casing.
Because of the nature of drilling an entire dependency tree, a global approach is needed, case by case is better hacked around with %__find_requires.
73 de Jeff
On Thu, 31 Jul 2003, Jos Vos wrote:
On Thu, Jul 31, 2003 at 06:42:41PM +0300, Ville Skytt� wrote:
If you peek at the affected files, you'll see that they actually are not "included" as far as rpm is concerned. rpm looks at the "package foo" statements when building the list of Provides, and "use/require foo" for Requires.
Ah yes, ok, then I shouldn't blame rpm's scripts.
The find-requires.perl and find-provides.perl are obsoleted. They're just using the normal find-requires and find-provides scripts. It was Matthias who thaught me that ;)
Those files do not have a package of their own, instead they blend into the XML::SAX::PurePerl package. And perl allows one to use() them using the fully qualified, "fake" package name (based on the dir structure, I believe).
What about packaging XML-SAX-PurePerl? Shouldn't that solve the problem? I have to admit I don't know much about this area, but I needed XML-SAX because it is required by XML-LibXML.
I have them packaged without the problems you mention. You can find them (and the SPEC files) at:
http://dag.wieers.com/packages/
All my perl packages share the same logic (there's a small difference between binary and noarch packages though).
Kind regards, -- dag wieers, dag@wieers.com, http://dag.wieers.com/ -- [Any errors in spelling, tact or fact are transmission errors]
On Fri, 2003-08-01 at 00:17, Jos Vos wrote:
Those files do not have a package of their own, instead they blend into the XML::SAX::PurePerl package. And perl allows one to use() them using the fully qualified, "fake" package name (based on the dir structure, I believe).
What about packaging XML-SAX-PurePerl? Shouldn't that solve the problem?
Hm, by XML::SAX::PurePerl "package" I meant the Perl module "namespace", not a RPM or any other package. And the PurePerl modules are already part of the XML-SAX CPAN distribution. Or did I miss something here?
I have to admit I don't know much about this area, but I needed XML-SAX because it is required by XML-LibXML.
Good luck! Tried it too and had to give up because of (IIRC) some libxml2 weirdness/incompatibilities (RHL9); "make test" resulted in segfaults, be sure to run it :)
(libxml2 2.5.4 isn't explicitly listed in http://search.cpan.org/src/PHISH/XML-LibXML-1.54/README but 2.5.5 is "known as broken"...)
On Fri, Aug 01, 2003 at 12:44:36AM +0300, Ville Skyttä wrote:
On Fri, 2003-08-01 at 00:17, Jos Vos wrote:
I have to admit I don't know much about this area, but I needed XML-SAX because it is required by XML-LibXML.
Good luck! Tried it too and had to give up because of (IIRC) some libxml2 weirdness/incompatibilities (RHL9); "make test" resulted in segfaults, be sure to run it :)
(libxml2 2.5.4 isn't explicitly listed in http://search.cpan.org/src/PHISH/XML-LibXML-1.54/README but 2.5.5 is "known as broken"...)
Well if they don't report the problem back to the list or the maintainer there is little chance of improvements! BTW the current libxml2 version is 2.5.8 and I expect to release 2.5.9 for next week ...
Daniel
On Thu, Jul 31, 2003 at 11:17:47PM +0200, Jos Vos wrote:
What about packaging XML-SAX-PurePerl? Shouldn't that solve the problem? I have to admit I don't know much about this area, but I needed XML-SAX because it is required by XML-LibXML.
Really ? Sounds strange to me, maybe it's just to inherit the SAX class interface ...
Daniel