Ralf Corsepius <rc040203@xxxxxxxxxx> writes: > Hi, > > Below is before-mentioned patch to perl.spec to split out > CPAN, Test::Simple, Test::Harness, ExtUtils::MakeMaker > from > perl-devel, I'd like to propose to be applied to perl.spec. > > Advantages: > * The split-out allows such modules to be "alternatively supplied" from > separate/independent source packages. > * Improved fine-grained run-time deps. > > Disadvantages: > * The split-out reveals BuildRequire-ment "sloppiness"es in current > perl-dist packages (So far, deps on "core" modules had been frowed > upon). > > > Implementation notes: > > * The perl-<module> packages apply an epoch = 0 and a version > corresponding to their perl-dists, but apply the release number of the > main-perl package. > > * To be able to implement this (Building several packages with different > versions and epochs from one single spec), one can't use %{version} and > %{epoch} because rpmbuild overrides them depending on the context inside > of a spec-file. > One has to resort to hard-code or %define them. I chose to use a %define > for the main package's version. > > * I do not expect this spec to be free of bugs and oversights ;) > > Feedback welcome. > > Ralf > > PS.: The patch below is against CVS and comprises all of Spot's an my > changes so far. Looks pretty good to me at first glace - I'm not totally convinced we want to do this right now though...I'd like to get some more discussion on the list first. We'll probably want to re-enable 'make test' at some point, too. ;-) Since this isn't quite done yet, how about: o I build a perl with all the changes except this one, including a 'Requires: perl-devel' for the main perl package. o We let people chime in on your changes over the weekend. o If people like these changes, we'll get them into rawhide next week. Thanks, -RN > Index: perl.spec > =================================================================== > RCS file: /cvs/dist/devel/perl/perl.spec,v > retrieving revision 1.108 > diff -u -r1.108 perl.spec > --- perl.spec 28 Feb 2007 15:34:50 -0000 1.108 > +++ perl.spec 9 Mar 2007 04:52:42 -0000 > @@ -8,6 +8,8 @@ > %define new_perl_flags LD_PRELOAD=/%{new_arch_lib}/CORE/libperl.so LD_LIBRARY_PATH=%{new_arch_lib}/CORE PERL5LIB=%{new_perl_lib}:%{comp_perl_lib} > %define new_perl %{new_perl_flags} $RPM_BUILD_ROOT/%{_bindir}/perl > > +%define perl_vers 5.8.8 > + > # Use this for SUPER PERL DEBUGGING MODE. > %{?!perl_debugging: %define perl_debugging 0} > %if %{perl_debugging} > @@ -17,13 +19,13 @@ > > Name: perl > Version: 5.8.8 > -Release: 14%{?dist} > +Release: 14%{?dist}.1.6 > Epoch: 4 > Summary: The Perl programming language > Group: Development/Languages > License: Artistic or GPL > Url: http://www.perl.org/ > -Source0: http://www.cpan.org/authors/id/N/NW/NWCLARK/%{name}-%{version}.tar.bz2 > +Source0: http://www.cpan.org/authors/id/N/NW/NWCLARK/%{name}-%{perl_vers}.tar.bz2 > Source11: filter-depends.sh > Source12: perl-5.8.0-libnet.cfg > # Specific to Fedora/RHEL > @@ -107,7 +109,7 @@ > Patch38: perl-5.8.8-bz199736.patch > # XXX: Fixme - Finish patch. > Patch39: perl-5.8.8-bz204679.patch > -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) > +BuildRoot: %{_tmppath}/%{name}-%{perl_vers}-%{release}-root-%(%{__id_u} -n) > BuildRequires: tcsh, dos2unix, man, groff > BuildRequires: gdbm-devel, db4-devel > > @@ -195,21 +197,58 @@ > %package devel > Summary: Header files for use in perl development > Group: Development/Languages > -Requires: perl = %{epoch}:%{version}-%{release} > +Requires: perl = %{epoch}:%{perl_vers}-%{release} > > %description devel > -This package contains header files from core perl components. > -Some packages may need these header files in order to build. > +This package contains header files and development modules. > +Most perl packages will need to install perl-devel to build. > > %package suidperl > Summary: Suidperl, for use with setuid perl scripts > Group: Development/Languages > -Requires: perl = %{epoch}:%{version}-%{release} > +Requires: perl = %{epoch}:%{perl_vers}-%{release} > > %description suidperl > Suidperl is a setuid binary copy of perl that allows for (hopefully) > more secure running of setuid perl scripts. > > +%package CPAN > +Summary: Query, download and build perl modules from CPAN sites > +Group: Development/Languages > +Epoch: 0 > +Version: 1.76_02 > + > +%description CPAN > +Query, download and build perl modules from CPAN sites. > + > +%package ExtUtils-MakeMaker > +Summary: Create a module Makefile > +Group: Development/Languages > +Epoch: 0 > +Version: 6.30 > +Requires: perl-devel > + > +%description ExtUtils-MakeMaker > +Create a module Makefile. > + > +%package Test-Harness > +Summary: Run Perl standard test scripts with statistics > +Group: Development/Languages > +Epoch: 0 > +Version: 2.56 > + > +%description Test-Harness > +Run Perl standard test scripts with statistics. > + > +%package Test-Simple > +Summary: Basic utilities for writing tests > +Group: Development/Languages > +Epoch: 0 > +Version: 0.62 > + > +%description Test-Simple > +Basic utilities for writing tests. > + > %prep > %setup -q > %patch1 -p1 > @@ -291,7 +330,7 @@ > sed -e '/^perl(bytes)$/d' |\ > sed -e '/^perl(utf8)$/d' > EOF > -%define __perl_provides %{_builddir}/%{name}-%{version}/%{name}-prov > +%define __perl_provides %{_builddir}/%{name}-%{perl_vers}/%{name}-prov > chmod +x %{__perl_provides} > > > @@ -303,7 +342,7 @@ > # similar reasons. > > sh Configure -des -Doptimize="$RPM_OPT_FLAGS" \ > - -Dversion=%{version} \ > + -Dversion=%{perl_vers} \ > -Dmyhostname=localhost \ > -Dperladmin=root@localhost \ > -Dcc='%{__cc}' \ > @@ -312,12 +351,12 @@ > -Dprefix=%{_prefix} \ > %ifarch %{multilib_64_archs} > -Dlibpth="/usr/local/lib64 /lib64 /usr/lib64" \ > - -Dprivlib="/usr/lib/perl5/%{version}" \ > - -Dsitelib="/usr/lib/perl5/site_perl/%{version}" \ > - -Dvendorlib="/usr/lib/perl5/vendor_perl/%{version}" \ > - -Darchlib="%{_libdir}/perl5/%{version}/%{perl_archname}" \ > - -Dsitearch="%{_libdir}/perl5/site_perl/%{version}/%{perl_archname}" \ > - -Dvendorarch="%{_libdir}/perl5/vendor_perl/%{version}/%{perl_archname}" \ > + -Dprivlib="/usr/lib/perl5/%{perl_vers}" \ > + -Dsitelib="/usr/lib/perl5/site_perl/%{perl_vers}" \ > + -Dvendorlib="/usr/lib/perl5/vendor_perl/%{perl_vers}" \ > + -Darchlib="%{_libdir}/perl5/%{perl_vers}/%{perl_archname}" \ > + -Dsitearch="%{_libdir}/perl5/site_perl/%{perl_vers}/%{perl_archname}" \ > + -Dvendorarch="%{_libdir}/perl5/vendor_perl/%{perl_vers}/%{perl_archname}" \ > %endif > -Darchname=%{_arch}-%{_os} \ > %ifarch sparc > @@ -356,16 +395,15 @@ > make install DESTDIR=$RPM_BUILD_ROOT > > %ifarch %{multilib_64_archs} > -mkdir -p -m 755 $RPM_BUILD_ROOT/usr/lib/perl5/%{version} > -mkdir -p -m 755 $RPM_BUILD_ROOT/usr/lib/perl5/site_perl/%{version} > -mkdir -p -m 755 $RPM_BUILD_ROOT/usr/lib/perl5/vendor_perl/%{version} > +mkdir -p -m 755 $RPM_BUILD_ROOT/usr/lib/perl5/%{perl_vers} > +mkdir -p -m 755 $RPM_BUILD_ROOT/usr/lib/perl5/site_perl/%{perl_vers} > +mkdir -p -m 755 $RPM_BUILD_ROOT/usr/lib/perl5/vendor_perl/%{perl_vers} > %endif > > %ifarch %{multilib_64_archs} > -mkdir -p -m 755 ${RPM_BUILD_ROOT}/usr/lib64/perl5/vendor_perl/%{version}/%{_arch}-%{_os} > +mkdir -p -m 755 ${RPM_BUILD_ROOT}/usr/lib64/perl5/vendor_perl/%{perl_vers}/%{_arch}-%{_os} > %endif > > - > # > # Compatibility directories > # > @@ -374,7 +412,7 @@ > mkdir -pm 755 $i/%{perl_archname}/CORE > mkdir -pm 755 $i/%{perl_archname}/auto > pushd $i/%{perl_archname}/CORE > - ln -s ../../../%{version}/%{perl_archname}/CORE/libperl.so libperl.so > + ln -s ../../../%{perl_vers}/%{perl_archname}/CORE/libperl.so libperl.so > popd > done > popd > @@ -384,7 +422,7 @@ > for i in asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h sys/socket.h sys/time.h wait.h > do > %{new_perl} $RPM_BUILD_ROOT/%{_bindir}/h2ph -a \ > - -d $RPM_BUILD_ROOT%{_libdir}/perl5/%{version}/%{perl_archname} $i || /bin/true > + -d $RPM_BUILD_ROOT%{_libdir}/perl5/%{perl_vers}/%{perl_archname} $i || /bin/true > done > > > @@ -398,7 +436,7 @@ > mkdir -p $RPM_BUILD_ROOT/$dir > done > > -for i in %{version} %{perlmodcompat} ; do > +for i in %{perl_vers} %{perlmodcompat} ; do > mkdir -pm 755 $RPM_BUILD_ROOT%{_libdir}/perl5/site_perl/$i/%{perl_archname}/auto > mkdir -pm 755 $RPM_BUILD_ROOT%{_libdir}/perl5/vendor_perl/$i/%{perl_archname}/auto > done > @@ -407,8 +445,8 @@ > # > # libnet configuration file > # > -mkdir -p -m 755 $RPM_BUILD_ROOT/%{_libdir}/perl5/%{version}/Net > -install -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT/%{_libdir}/perl5/%{version}/Net/libnet.cfg > +mkdir -p -m 755 $RPM_BUILD_ROOT/%{_libdir}/perl5/%{perl_vers}/Net > +install -p -m 644 %{SOURCE12} $RPM_BUILD_ROOT/%{_libdir}/perl5/%{perl_vers}/Net/libnet.cfg > > # > # Core modules removal > @@ -418,7 +456,7 @@ > find $RPM_BUILD_ROOT -type f -name '*.bs' -a -empty -exec rm -f {} ';' > > # Cleanup binary paths and make cgi files executable > -pushd $RPM_BUILD_ROOT/usr/lib/perl5/%{version}/CGI/eg/ > +pushd $RPM_BUILD_ROOT/usr/lib/perl5/%{perl_vers}/CGI/eg/ > for i in *.cgi make_links.pl RunMeFirst ; do > sed -i 's|/usr/local/bin/perl|/usr/bin/perl|g' $i > chmod +x $i > @@ -426,11 +464,11 @@ > popd > > # miniperl? As an interpreter? How odd. > -sed -i 's|./miniperl|/usr/bin/perl|' $RPM_BUILD_ROOT/usr/lib/perl5/%{version}/ExtUtils/xsubpp > -chmod +x $RPM_BUILD_ROOT/usr/lib/perl5/%{version}/ExtUtils/xsubpp > +sed -i 's|./miniperl|/usr/bin/perl|' $RPM_BUILD_ROOT/usr/lib/perl5/%{perl_vers}/ExtUtils/xsubpp > +chmod +x $RPM_BUILD_ROOT/usr/lib/perl5/%{perl_vers}/ExtUtils/xsubpp > > # Don't need the .packlist > -rm -f $RPM_BUILD_ROOT%{_libdir}/perl5/%{version}/%{perl_archname}/.packlist > +rm -f $RPM_BUILD_ROOT%{_libdir}/perl5/%{perl_vers}/%{perl_archname}/.packlist > > # Fix some manpages to be UTF-8 > pushd $RPM_BUILD_ROOT%{_mandir}/man1/ > @@ -451,7 +489,8 @@ > rm -rf $RPM_BUILD_ROOT > > %check > -make test > +# make test > + > > %files > %defattr(-,root,root,-) > @@ -463,22 +502,162 @@ > %ifarch %{multilib_64_archs} > /usr/lib/perl5/ > %endif > +%exclude %{_bindir}/enc2xs > +%exclude %{_mandir}/man1/enc2xs* > +%exclude %{_bindir}/h2xs > +%exclude %{_mandir}/man1/h2xs* > +%exclude %{_bindir}/libnetcfg > +%exclude %{_mandir}/man1/libnetcfg* > +%exclude %{_bindir}/perlcc > +%exclude %{_mandir}/man1/perlcc* > +%exclude %{_bindir}/perlivp > +%exclude %{_mandir}/man1/perlivp* > %exclude %{_bindir}/suidperl > -%exclude %{_bindir}/sperl%{version} > -%exclude %{_libdir}/perl5/%{version}/%{perl_archname}/CORE/*.h > -%exclude /usr/lib/perl5/%{version}/Encode/*.h > +%exclude %{_bindir}/sperl%{perl_vers} > +%exclude %{_libdir}/perl5/%{perl_vers}/%{perl_archname}/CORE/*.h > +# CPAN > +%exclude %{_bindir}/cpan > +%exclude /usr/lib/perl5/%{perl_vers}/CPAN/ > +%exclude /usr/lib/perl5/%{perl_vers}/CPAN.pm > +%exclude %{_mandir}/man1/cpan.1* > +%exclude %{_mandir}/man3/CPAN* > +# ExtUtils-Embed > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/Embed.pm > +%exclude %{_mandir}/man3/ExtUtils::Embed* > +# ExtUtils-MakeMaker > +%exclude %{_bindir}/instmodsh > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/Command/MM.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/Install.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/Installed.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/Liblist/ > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/Liblist.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/MakeMaker/ > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/MakeMaker.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/MANIFEST.SKIP > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/MM*.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/MY.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/Manifest.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/Mkbootstrap.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/Mksymlists.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/Packlist.pm > +%exclude /usr/lib/perl5/%{perl_vers}/ExtUtils/testlib.pm > +%exclude %{_libdir}/perl5/%{perl_vers}/ExtUtils/NOTES > +%exclude %{_libdir}/perl5/%{perl_vers}/ExtUtils/PATCHING > +%exclude %{_mandir}/man1/instmodsh.1* > +%exclude %{_mandir}/man3/ExtUtils::Command::MM* > +%exclude %{_mandir}/man3/ExtUtils::Install.3* > +%exclude %{_mandir}/man3/ExtUtils::Installed.3* > +%exclude %{_mandir}/man3/ExtUtils::Liblist.3* > +%exclude %{_mandir}/man3/ExtUtils::MM* > +%exclude %{_mandir}/man3/ExtUtils::MY.3* > +%exclude %{_mandir}/man3/ExtUtils::MakeMaker* > +%exclude %{_mandir}/man3/ExtUtils::Manifest.3* > +%exclude %{_mandir}/man3/ExtUtils::Mkbootstrap.3* > +%exclude %{_mandir}/man3/ExtUtils::Mksymlists.3* > +%exclude %{_mandir}/man3/ExtUtils::Packlist.3* > +%exclude %{_mandir}/man3/ExtUtils::testlib.3* > +# Test::Harness > +%exclude %{_bindir}/prove > +%exclude /usr/lib/perl5/%{perl_vers}/Test/Harness* > +%exclude %{_mandir}/man1/prove.1* > +%exclude %{_mandir}/man3/Test::Harness* > +# Test::Simple > +%exclude /usr/lib/perl5/%{perl_vers}/Test/More* > +%exclude /usr/lib/perl5/%{perl_vers}/Test/Builder* > +%exclude /usr/lib/perl5/%{perl_vers}/Test/Simple* > +%exclude /usr/lib/perl5/%{perl_vers}/Test/Tutorial* > +%exclude %{_mandir}/man3/Test::More* > +%exclude %{_mandir}/man3/Test::Builder* > +%exclude %{_mandir}/man3/Test::Simple* > +%exclude %{_mandir}/man3/Test::Tutorial* > > %files devel > %defattr(-,root,root,-) > -%{_libdir}/perl5/%{version}/%{perl_archname}/CORE/*.h > -/usr/lib/perl5/%{version}/Encode/*.h > +%{_bindir}/enc2xs > +%{_mandir}/man1/enc2xs* > +%{_bindir}/h2xs > +%{_mandir}/man1/h2xs* > +%{_bindir}/libnetcfg > +%{_mandir}/man1/libnetcfg* > +%{_bindir}/perlcc > +%{_mandir}/man1/perlcc* > +%{_bindir}/perlivp > +%{_mandir}/man1/perlivp* > +%{_libdir}/perl5/%{perl_vers}/%{perl_archname}/CORE/*.h > +# ExtUtils-Embed > +/usr/lib/perl5/%{perl_vers}/ExtUtils/Embed.pm > +%{_mandir}/man3/ExtUtils::Embed* > + > +%files Test-Harness > +# Test::Harness > +%{_bindir}/prove > +/usr/lib/perl5/%{perl_vers}/Test/Harness* > +%{_mandir}/man1/prove.1* > +%{_mandir}/man3/Test::Harness* > + > +%files CPAN > +#CPAN > +%{_bindir}/cpan > +/usr/lib/perl5/%{perl_vers}/CPAN/ > +/usr/lib/perl5/%{perl_vers}/CPAN.pm > +%{_mandir}/man1/cpan.1* > +%{_mandir}/man3/CPAN* > + > +%files ExtUtils-MakeMaker > +# ExtUtils-MakeMaker > +%{_bindir}/instmodsh > +/usr/lib/perl5/%{perl_vers}/ExtUtils/Command/MM.pm > +/usr/lib/perl5/%{perl_vers}/ExtUtils/Install.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/Installed.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/Liblist/ > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/Liblist.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/MakeMaker/ > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/MakeMaker.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/MANIFEST.SKIP > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/MM*.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/MY.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/Manifest.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/Mkbootstrap.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/Mksymlists.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/Packlist.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/testlib.pm > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/NOTES > +%{_libdir}/perl5/%{perl_vers}/ExtUtils/PATCHING > +%{_mandir}/man1/instmodsh.1* > +%{_mandir}/man3/ExtUtils::Command::MM* > +%{_mandir}/man3/ExtUtils::Install.3* > +%{_mandir}/man3/ExtUtils::Installed.3* > +%{_mandir}/man3/ExtUtils::Liblist.3* > +%{_mandir}/man3/ExtUtils::MM* > +%{_mandir}/man3/ExtUtils::MY.3* > +%{_mandir}/man3/ExtUtils::MakeMaker* > +%{_mandir}/man3/ExtUtils::Manifest.3* > +%{_mandir}/man3/ExtUtils::Mkbootstrap.3* > +%{_mandir}/man3/ExtUtils::Mksymlists.3* > +%{_mandir}/man3/ExtUtils::Packlist.3* > +%{_mandir}/man3/ExtUtils::testlib.3* > + > +%files Test-Simple > +# Test::Simple > +/usr/lib/perl5/%{perl_vers}/Test/More* > +/usr/lib/perl5/%{perl_vers}/Test/Builder* > +/usr/lib/perl5/%{perl_vers}/Test/Simple* > +/usr/lib/perl5/%{perl_vers}/Test/Tutorial* > +%{_mandir}/man3/Test::More* > +%{_mandir}/man3/Test::Builder* > +%{_mandir}/man3/Test::Simple* > +%{_mandir}/man3/Test::Tutorial* > > %files suidperl > %defattr(-,root,root,-) > %{_bindir}/suidperl > -%{_bindir}/sperl%{version} > +%{_bindir}/sperl%{perl_vers} > > %changelog > +* Mon Mar 5 2007 Tom "spot" Callaway <tcallawa@xxxxxxxxxx> - 4:5.8.8-14.1 > +- move ExtUtils::MakeMaker, ExtUtils::Embed, CPAN, Test::Harness into devel > +- also move perlcc, perlivp, h2xs, libnetcfg to devel > + > * Tue Feb 27 2007 Robin Norwood <rnorwood@xxxxxxxxxx> - 4:5.8.8-14 > - Add a description for most of the patches, to reflect Spot's work to > report said patches upstream. -- Robin Norwood Red Hat, Inc. "The Sage does nothing, yet nothing remains undone." -Lao Tzu, Te Tao Ching