From 95606fb3e4768051c61772e19524d69e0b87cc0e Mon Sep 17 00:00:00 2001 From: Brian Read Date: Fri, 14 Jul 2023 14:05:03 +0100 Subject: [PATCH] initial commit of file from CVS for perl-RPM2 on Fri 14 Jul 14:05:03 BST 2023 --- .gitattributes | 1 + .gitignore | 3 ++ Makefile | 19 ++++++++ README.md | 10 ++++- RPM2-1.0.tar.gz | 3 ++ contriborbase | 1 + perl-RPM2-1.0-60_tests.patch | 12 ++++++ perl-RPM2-1.0-switchofffunctions.patch | 44 +++++++++++++++++++ perl-RPM2.spec | 60 ++++++++++++++++++++++++++ 9 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 RPM2-1.0.tar.gz create mode 100644 contriborbase create mode 100644 perl-RPM2-1.0-60_tests.patch create mode 100644 perl-RPM2-1.0-switchofffunctions.patch create mode 100644 perl-RPM2.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f087b42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1534ba5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.rpm +*.log +*spec-20* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2ac9f9a --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +NAME := perl-RPM2 +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index ac2dc5a..7e65d39 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ # perl-RPM2 -3rd Party (Maintained by Koozali) git repo for perl-RPM2 smeserver \ No newline at end of file +3rd Party (Maintained by Koozali) git repo for perl-RPM2 smeserver + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
+ +Perl-RPM2 is a Perl library to help with manipulation of RPM packages. It provides an object-oriented interface for creating, reading, and manipulating RPM packages. It can be used to programmatically build RPM packages from existing files, query existing RPM packages, or create new RPM packages with custom content. diff --git a/RPM2-1.0.tar.gz b/RPM2-1.0.tar.gz new file mode 100644 index 0000000..8e39301 --- /dev/null +++ b/RPM2-1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8baf86d77639c0c02ed9b9de517e05e62f7756e6be4176f2370d16ed6212dfde +size 22342 diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..ef36a67 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +sme10 diff --git a/perl-RPM2-1.0-60_tests.patch b/perl-RPM2-1.0-60_tests.patch new file mode 100644 index 0000000..49701c1 --- /dev/null +++ b/perl-RPM2-1.0-60_tests.patch @@ -0,0 +1,12 @@ +diff -Nur -x '*.orig' -x '*.rej' RPM2-1.0/test.pl mezzanine_patched_RPM2-1.0/test.pl +--- RPM2-1.0/test.pl 2011-04-01 16:16:49.000000000 +0200 ++++ mezzanine_patched_RPM2-1.0/test.pl 2016-03-17 23:20:19.793545248 +0100 +@@ -11,7 +11,7 @@ + + use Test; + use strict; +-BEGIN { plan tests => 62 }; ++BEGIN { plan tests => 60 }; + use RPM2; + use POSIX; + ok(1); # If we made it this far, we're ok. diff --git a/perl-RPM2-1.0-switchofffunctions.patch b/perl-RPM2-1.0-switchofffunctions.patch new file mode 100644 index 0000000..61cda82 --- /dev/null +++ b/perl-RPM2-1.0-switchofffunctions.patch @@ -0,0 +1,44 @@ +diff -Nur -x '*.orig' -x '*.rej' RPM2-1.0/lib/RPM2.xs mezzanine_patched_RPM2-1.0/lib/RPM2.xs +--- RPM2-1.0/lib/RPM2.xs 2011-04-01 16:16:49.000000000 +0200 ++++ mezzanine_patched_RPM2-1.0/lib/RPM2.xs 2016-03-17 23:07:51.715174431 +0100 +@@ -71,9 +71,6 @@ + break; + + case RPMCALLBACK_INST_START: +- rpmcliHashesCurrent = 0; +- if (h == NULL || !(flags & INSTALL_LABEL)) +- break; + break; + + case RPMCALLBACK_TRANS_PROGRESS: +@@ -81,30 +78,18 @@ + break; + + case RPMCALLBACK_TRANS_START: +- rpmcliHashesCurrent = 0; +- rpmcliProgressTotal = 1; +- rpmcliProgressCurrent = 0; + break; + + case RPMCALLBACK_TRANS_STOP: +- rpmcliProgressTotal = rpmcliPackagesTotal; +- rpmcliProgressCurrent = 0; + break; + + case RPMCALLBACK_REPACKAGE_START: +- rpmcliHashesCurrent = 0; +- rpmcliProgressTotal = total; +- rpmcliProgressCurrent = 0; + break; + + case RPMCALLBACK_REPACKAGE_PROGRESS: + break; + + case RPMCALLBACK_REPACKAGE_STOP: +- rpmcliProgressTotal = total; +- rpmcliProgressCurrent = total; +- rpmcliProgressTotal = rpmcliPackagesTotal; +- rpmcliProgressCurrent = 0; + break; + + case RPMCALLBACK_UNINST_PROGRESS: diff --git a/perl-RPM2.spec b/perl-RPM2.spec new file mode 100644 index 0000000..2596d14 --- /dev/null +++ b/perl-RPM2.spec @@ -0,0 +1,60 @@ +Name: perl-RPM2 +Version: 1.0 +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://www.cpan.org/authors/id/L/LK/LKUNDRAK/RPM2-%{version}.tar.gz +Patch0: perl-RPM2-1.0-switchofffunctions.patch +Patch1: perl-RPM2-1.0-60_tests.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: perl(ExtUtils::CBuilder) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Module::Build) +BuildRequires: rpm-devel +Requires: perl(File::Spec) +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. + +%prep +%setup -q -n RPM2-%{version} +%patch0 -p1 +%patch1 -p1 + +%build +%{__perl} Build.PL installdirs=vendor optimize="$RPM_OPT_FLAGS" +./Build + +%install +rm -rf $RPM_BUILD_ROOT + +./Build install destdir=$RPM_BUILD_ROOT create_packlist=0 +find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \; +find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; + +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +./Build test verbose=1 + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc Changes hdlist-test.hdr META.yml README test-rpm-1.0-1.noarch.rpm test-rpm-1.0-1.src.rpm +%{perl_vendorarch}/auto/* +%{perl_vendorarch}/RPM2* +%{_mandir}/man3/* + +%changelog +* Fri Jul 14 2023 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Thu Mar 17 2016 Daniel Berteaud 1.0-1 +- First build using cpanspec [SME: 9330]