rpms/perl-RPM2/devel perl-RPM2-0.66-remove-rpmdb-redhat-dependency.patch, NONE, 1.1 perl-RPM2-0.66-skip-root-tests.patch, NONE, 1.1 perl-RPM2-elf.patch, NONE, 1.1 perl-RPM2.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Robin Norwood (rnorwood) fedora-extras-commits at redhat.com
Thu Apr 5 14:47:38 UTC 2007


Author: rnorwood

Update of /cvs/extras/rpms/perl-RPM2/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28584/devel

Modified Files:
	.cvsignore sources 
Added Files:
	perl-RPM2-0.66-remove-rpmdb-redhat-dependency.patch 
	perl-RPM2-0.66-skip-root-tests.patch perl-RPM2-elf.patch 
	perl-RPM2.spec 
Log Message:
Import perl-RPM2


perl-RPM2-0.66-remove-rpmdb-redhat-dependency.patch:

--- NEW FILE perl-RPM2-0.66-remove-rpmdb-redhat-dependency.patch ---
--- RPM2-0.66/test.pl.remove_rpmdb_fedora_dependency	2004-04-14 08:43:58.000000000 -0400
+++ RPM2-0.66/test.pl	2006-03-16 15:57:13.000000000 -0500
@@ -13,6 +13,7 @@
 use strict;
 BEGIN { plan tests => 63 };
 use RPM2;
+use POSIX;
 ok(1); # If we made it this far, we're ok.
 
 #########################
@@ -106,9 +107,10 @@
 ok(($pkg <=> $pkg2) == 0);
 ok(!($pkg < $pkg2));
 ok(!($pkg > $pkg2));
-
+my $other_rpm_dir = getcwd() . '/rpmdb';
 # another rpm, handily provided by the rpmdb-redhat package
-my $other_rpm_dir = "/usr/lib/rpmdb/i386-redhat-linux/redhat";
+# ... is no longer shipped. Create a new one:
+system( "rm -rf rpmdb; mkdir rpmdb; /usr/bin/rpmdb --dbpath $other_rpm_dir --initdb" );
 if (-d $other_rpm_dir) {
   my $db2 = RPM2->open_rpm_db(-path => $other_rpm_dir);
   ok(defined $db2);
@@ -118,7 +120,6 @@
   print "Install the rpmdb-redhat package to test two simultaneous open databases\n";
   ok(1);
 }
-
 ok(RPM2->expand_macro("%%foo") eq "%foo");
 RPM2->add_macro("rpm2_test_macro", "testval $$");
 ok(RPM2->expand_macro("%rpm2_test_macro") eq "testval $$");

perl-RPM2-0.66-skip-root-tests.patch:

--- NEW FILE perl-RPM2-0.66-skip-root-tests.patch ---
--- RPM2-0.66/test.pl.skip-root-tests	2006-03-16 16:01:32.000000000 -0500
+++ RPM2-0.66/test.pl	2006-03-16 16:15:41.000000000 -0500
@@ -153,11 +153,8 @@
 my @rpms = $t->elements();
 ok($rpms[0] eq  $pkg->as_nvre());
 ok(scalar(@rpms) == 1);
-# Install package
-ok($t->run());
+skip( ( $< == 0 ) ? undef : ': must be root to create RPM transaction.',  ( $< == 0 ) ? $t->run() : undef );
 $t = undef;
-
-#
 # See if we can find the rpm in the database now...
 $db = RPM2->open_rpm_db();
 ok(defined $db);
@@ -167,7 +164,7 @@
 while (my $pkg = $i->next) {
   push @pkg, $pkg;
 }
-ok(scalar(@pkg) == 1);
+skip( ( $< == 0 ) ? undef : ': package not added as not root.',  ( $< == 0 ) ? scalar(@pkg) == 1 : undef );
 $i  = undef;
 $db = undef;
 
@@ -176,9 +173,9 @@
 $t = RPM2->create_transaction();
 ok(ref($t) eq 'RPM2::Transaction');
 # We need to find the package we installed, and try to erase it
-ok($t->add_erase($pkg[0]));
+skip( ( $< == 0 ) ? undef : ': package not erased as not root.', ( $< == 0 ) ? $t->add_erase($pkg[0]) : undef );
 # Check element count
-ok($t->element_count() == 1);
+skip( ( $< == 0 ) ? undef : ': no transaction as not root.', ( $< == 0 ) ? ($t->element_count() == 1) : undef );
 # Test depedency checks
 ok($t->check());
 # Order the transaction...see if we get our one transaction.
@@ -187,7 +184,7 @@
 ok($rpms[0] eq  $pkg->as_nvre());
 ok(scalar(@rpms) == 1);
 # Install package
-ok($t->run());
+skip( ( $< == 0 ) ? undef : ': cannot run RPM transaction as not root.', ( $< == 0 ) ? $t->run() : undef );
 # Test closing the database
 ok($t->close_db());
 

perl-RPM2-elf.patch:

--- NEW FILE perl-RPM2-elf.patch ---
--- RPM2-0.44/Makefile.PL.elf	2002-08-26 13:16:29.000000000 -0400
+++ RPM2-0.44/Makefile.PL	2002-08-26 13:16:45.000000000 -0400
@@ -16,6 +16,8 @@
   }
 }
 
+$libs .= " -lelf";
+
 my @defines;
 # detect which rpm is running.  ugly but necessary... for now.
 if (-e '/usr/include/rpm/rpmts.h') {


--- NEW FILE perl-RPM2.spec ---
Name:		perl-RPM2
Version:	0.67
Release:	1%{?dist}
Summary:	Perl bindings for the RPM Package Manager API
License:	GPL or Artistic
Group:		Development/Libraries
URL:		http://search.cpan.org/dist/RPM2/
Source0:	http://search.cpan.org/CPAN/authors/id/C/CH/CHIPT/RPM2-%{version}.tar.gz
Patch0:		perl-RPM2-elf.patch
Patch1:		perl-RPM2-0.66-remove-rpmdb-redhat-dependency.patch
Patch2:		perl-RPM2-0.66-skip-root-tests.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	rpm-devel elfutils-libelf-devel bzip2-devel
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
The RPM2 module provides an object-oriented interface to querying both the
installed RPM database as well as files on the filesystem, providing Perl
bindings for the RPM Package Manager API.

%prep
%setup -q -n RPM2-%{version} 
%patch0 -p1 -b .elf
%patch1 -p1 -b .remove-rpmdb-redhat-dependency
%patch2 -p1 -b .skip-root-tests

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%{__make} %{?_smp_mflags}

%check
%{__make} test

%clean
%{__rm} -rf %{buildroot}

%install
%{__rm} -rf %{buildroot}
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
/usr/bin/find %{buildroot} -type f -name '*.bs' -a -size 0 -exec %{__rm} -f {} ';'
/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} 2>/dev/null ';'
%{__chmod} -R u+w %{buildroot}/*

%files
%defattr(-,root,root,-)
%doc Changes README
%{perl_vendorarch}/RPM2.pm
%{perl_vendorarch}/auto/RPM2/
%{_mandir}/man3/RPM2.3pm*

%changelog
* Wed Jan  3 2007 Paul Howarth <paul at city-fan.org> 0.67-1
- update to 0.67, which clarifies license
- dispense with redundant (for Fedora) reqs and buildreqs
- don't use autogenerated file lists, which can miss directory ownership
  (fixes #73921)

* Wed Mar 08 2006 Jason Vas Dias <jvdias at redhat.com> - 0.66-12
- fix bug 152535: correct Provides: file list
- make .spec file conform to fedora-rpmdevtools/spectemplate-perl.spec

* Fri Feb 03 2006 Jason Vas Dias <jvdias at redhat.com> - 0.66-11.1
- rebuild for new perl-5.8.8, gcc, glibc, rpm

* Thu Nov 10 2005 Tomas Mraz <tmraz at redhat.com> 0.66-11
- rebuilt against new openssl
- fixed filelist for compressed man page

* Wed Mar 30 2005 Warren Togami <wtogami at redhat.com>
- remove brp-compress

* Tue Mar 22 2005 Joe Orton <jorton at redhat.com> 0.66-9
- rebuild

* Sun Feb 13 2005 Florian La Roche <laroche at redhat.com>
- rebuild

* Tue Jun 15 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Tue Mar 02 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Tue Jan 13 2004 Dan Walsh <dwalsh at redhat.com> 0.45-6
- rebuilt to pick up new rpm

* Wed Jun 04 2003 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Wed Jan 22 2003 Tim Powers <timp at redhat.com>
- rebuilt

* Thu Nov 07 2002 Elliot Lee <sopwith at redhat.com> 0.45-2
- Rebuild

* Wed Sep  4 2002 Chip Turner <cturner at redhat.com>
- fix segfaults and destructor issues related to typing overlap in
  perl XS mappings

* Mon Aug 26 2002 Chip Turner <cturner at redhat.com>
- add -lelf temporarily

* Wed Aug 07 2002 cturner at redhat.com
- Specfile autogenerated



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/perl-RPM2/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	3 Apr 2007 12:20:29 -0000	1.1
+++ .cvsignore	5 Apr 2007 14:47:08 -0000	1.2
@@ -0,0 +1 @@
+RPM2-0.67.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/perl-RPM2/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	3 Apr 2007 12:20:29 -0000	1.1
+++ sources	5 Apr 2007 14:47:08 -0000	1.2
@@ -0,0 +1 @@
+f9888629116a9b1a5cc39d2e16d44afd  RPM2-0.67.tar.gz




More information about the scm-commits mailing list