Add Ubuntu quantal
[ZOOM-Perl-moved-to-github.git] / modules / README
index 76ec336..cb78731 100644 (file)
@@ -7,7 +7,105 @@ distribution.  At present, this includes:
 
 --
 
-The source RPMs were downloaded from:
-http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/perl-XML-LibXML-XPathContext-0.07-1.src.rpm
-http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/perl-MARC-Record-2.0.2-1mdv2010.1.src.rpm
-http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/perl-HTML-TagCloud-0.34-4.fc14.src.rpm
+The base source RPMs were downloaded from:
+ftp://ftp.pbone.net/mirror/olea.org/paquetes-rpm/perl-XML-LibXML-XPathContext-0.07-1.src.rpm
+ftp://ftp.sunet.se/pub/Linux/distributions/Mandriva/devel/cooker/SRPMS/contrib/release/perl-MARC-Record-2.0.2-1mdv2010.1.src.rpm
+ftp://mirror.switch.ch/pool/2/mirror/fedora/linux/development/rawhide/source/SRPMS/perl-HTML-TagCloud-0.34-4.fc14.src.rpm
+and are saved in the "orig" subdirectory.
+
+But they all needed tweaking for CentOS as shown in the log below:
+
+--
+
+$ sudo rpmbuild --rebuild perl-MARC-Record-2.0.2-1mdv2010.1.src.rpm 
+Installing perl-MARC-Record-2.0.2-1mdv2010.1.src.rpm
+warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID 26752624
+warning: user mandrake does not exist - using root
+warning: group mandrake does not exist - using root
+warning: user mandrake does not exist - using root
+warning: group mandrake does not exist - using root
+error: line 8: Tag takes single token only: Release:   %mkrel 1
+
+$ sudo rpmbuild --rebuild perl-XML-LibXML-XPathContext-0.07-1.src.rpm 
+Installing perl-XML-LibXML-XPathContext-0.07-1.src.rpm
+warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID 41d6b379
+warning: user olea does not exist - using root
+warning: group olea does not exist - using root
+warning: user olea does not exist - using root
+warning: group olea does not exist - using root
+error: No compatible architectures found for build
+
+$ sudo rpmbuild --rebuild perl-HTML-TagCloud-0.34-4.fc14.src.rpm 
+Installing perl-HTML-TagCloud-0.34-4.fc14.src.rpm
+warning: user mockbuild does not exist - using root
+warning: group mockbuild does not exist - using root
+error: unpacking of archive failed on file /usr/src/redhat/SOURCES/HTML-TagCloud-0.34.tar.gz;4c3c5fa4: cpio: MD5 sum mismatch
+error: perl-HTML-TagCloud-0.34-4.fc14.src.rpm cannot be installed
+
+--
+
+I couldn't find a source RPM for XML::LibXML::Simple, but I did find a
+"nosrc" RPM containing a .spec file, and the actual source is easy to
+get from CPAN, so I downloaded these from:
+http://dist.momonga-linux.org/pub/momonga/6/Everything/SRPMS/perl-XML-LibXML-Simple-0.13-3m.mo6.nosrc.rpm
+http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/XML-LibXML-Simple-0.13.tar.gz
+extracted the .spec file from the nosrc.rpm, edited it, and built the
+module using:
+       sudo rpmbuild -ba perl-XML-LibXML-Simple.spec
+--
+
+It's pretty pathetic that you need a different source RPM for each Red
+Hat variant, but that seems to be the way of things.  So for each
+modules, I unpacked it to get hold of the .spec file that needs
+editing, and the source tarball that it builds, as follows:
+       rpm2cpio perl-MARC-Record-2.0.2-1mdv2010.1.src.rpm | cpio -i
+And modified the extracted .spec file as necessary.  The modified
+.spec files are part of this git archive.
+
+The final binary packages, build for centos5, are in the "centos5"
+directory.  The build command is:
+       sudo rpmbuild -ba perl-MARC-Record.spec
+
+--
+
+How to build for CentOS 6:
+
+* Copy or link the tarballs into ~/rpmbuild/SOURCES
+       $ cp *.tar.gz ~/rpmbuild/SOURCES
+* Install prerequisites:
+       $ sudo yum install perl-File-Slurp perl-Test-Pod perl-Test-Pod-Coverage
+* Build the packages:
+       $ rpmbuild -ba perl-XML-LibXML-Simple.spec
+       $ rpmbuild -ba perl-HTML-TagCloud.spec
+       $ rpmbuild -ba perl-MARC-Record.spec
+       $ rpmbuild -ba XML-LibXML-XPathContext.spec # but see below
+* Install the packages:
+       $ cd /home/mike/rpmbuild/RPMS/x86_64
+       $ sudo rpm -Uhv perl-XML-LibXML-XPathContext-0.07-1.x86_64.rpm
+       $ cd ../noarch
+       $ sudo rpm -Uhv perl-XML-LibXML-Simple-0.13-3m.el6.noarch.rpm
+       $ sudo rpm -Uhv perl-MARC-Record-2.0.2-1.indexdata.noarch.rpm
+       $ sudo rpm -Uhv perl-HTML-TagCloud-0.34-4.el6.noarch.rpm
+* Build and install ZOOM-Perl itself
+       $ cd ~/proj/ZOOM-Perl
+       $ ~/proj/git-tools/id-deb-build/mkdist.sh
+       $ rpmbuild -ba zoom-perl.spec
+       $ sudo rpm -Uhv ~/rpmbuild/RPMS/x86_64/libnet-z3950-zoom-perl-1.27-1.indexdata.x86_64.rpm
+
+The "make test" part of the XML-LibXML-XPathContext build failed as
+logged below. I can't tell if this is serious, so for now I just
+commented out the part of the .spec file that runs the tests. This
+results in an apparently successful build that will need further
+testing.
+
++ /usr/bin/make test
+PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
+t/00-xpathcontext.t .. 1/54 ERROR: Usage: XML::LibXML::XPathContext::_find(pxpath_context, pxpath, to_bool) at /home/mike/rpmbuild/BUILD/XML-LibXML-XPathContext-0.07/blib/lib/XML/LibXML/XPathContext.pm line 60.
+t/00-xpathcontext.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
+Failed 49/54 subtests 
+t/01-variables.t ..... 1/35 ERROR: Usage: XML::LibXML::XPathContext::_find(pxpath_context, pxpath, to_bool) at /home/mike/rpmbuild/BUILD/XML-LibXML-XPathContext-0.07/blib/lib/XML/LibXML/XPathContext.pm line 60.
+t/01-variables.t ..... Dubious, test returned 255 (wstat 65280, 0xff00)
+Failed 22/35 subtests 
+t/02-functions.t ..... 1/32 ERROR: Usage: XML::LibXML::XPathContext::_find(pxpath_context, pxpath, to_bool) at /home/mike/rpmbuild/BUILD/XML-LibXML-XPathContext-0.07/blib/lib/XML/LibXML/XPathContext.pm line 60.
+t/02-functions.t ..... Dubious, test returned 255 (wstat 65280, 0xff00)
+Failed 31/32 subtests