--- libarchive-ar-perl-1.13b.orig/debian/control +++ libarchive-ar-perl-1.13b/debian/control @@ -0,0 +1,28 @@ +Source: libarchive-ar-perl +Section: perl +Priority: optional +Build-Depends: debhelper (>= 5), quilt (>= 0.40) +Build-Depends-Indep: perl (>= 5.8.0-7), libtest-mockobject-perl +Maintainer: Debian Perl Group +Uploaders: Florian Ragwitz , + gregor herrmann +Standards-Version: 3.8.0 +Homepage: http://search.cpan.org/dist/Archive-Ar/ +Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libarchive-ar-perl/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libarchive-ar-perl/ + +Package: libarchive-ar-perl +Architecture: all +Depends: ${perl:Depends} +Description: perl interface for manipulating ar archives + Archive::Ar is a pure-perl way to handle standard ar archives. + . + This is useful if you have those types of old archives on the system, but it + is also useful because .deb packages for the Debian GNU/Linux distribution are + ar archives. This is one building block in a future chain of modules to build, + manipulate, extract, and test Debian modules with no platform or architecture + dependence. + . + You may notice that the API to Archive::Ar is similar to Archive::Tar, and + this was done intentionally to keep similarity between the Archive::* + modules. --- libarchive-ar-perl-1.13b.orig/debian/copyright +++ libarchive-ar-perl-1.13b/debian/copyright @@ -0,0 +1,14 @@ +This package was debianized by Florian Ragwitz on +Mon, 31 Oct 2005 21:04:09 +0100. + +It was downloaded from http://search.cpan.org/dist/Archive-Ar/ + +Copyright Holder: Copyright 2003 Jay Bonci + +This program is free software, you can redistribute it and/or modify it under +the same terms as Perl itself. + +Perl is distributed under your choice of the GNU General Public License or +the Artistic License. On Debian GNU/Linux systems, the complete text of the +GNU General Public License can be found in `/usr/share/common-licenses/GPL' +and the Artistic Licence in `/usr/share/common-licenses/Artistic'. --- libarchive-ar-perl-1.13b.orig/debian/watch +++ libarchive-ar-perl-1.13b/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://search.cpan.org/dist/Archive-Ar/ .+/Archive-Ar-v?(\d[\d_.-]+[a-z])\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ --- libarchive-ar-perl-1.13b.orig/debian/compat +++ libarchive-ar-perl-1.13b/debian/compat @@ -0,0 +1 @@ +5 --- libarchive-ar-perl-1.13b.orig/debian/README.source +++ libarchive-ar-perl-1.13b/debian/README.source @@ -0,0 +1,4 @@ +This package uses quilt to manage patches. + +/usr/share/doc/quilt/README.source has more informations about quilt and +Debian packages. --- libarchive-ar-perl-1.13b.orig/debian/changelog +++ libarchive-ar-perl-1.13b/debian/changelog @@ -0,0 +1,37 @@ +libarchive-ar-perl (1.13b-2) unstable; urgency=low + + * Take over for the Debian Perl Group with maintainer's permission + (http://lists.debian.org/debian-perl/2008/06/msg00039.html) + * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser + field (source stanza); Homepage field (source stanza). Changed: + Maintainer set to Debian Perl Group (was: Florian Ragwitz + ); Florian Ragwitz moved to + Uploaders. + * Add debian/watch. + * Add patches pad-2-byte-{read,write}.patch to respect the 2-byte alignment + requirement of the Ar file format (closes: #419101); add quilt framework; + thanks to Magnus Holmgren for the bug report and the patch. + * Add /me to Uploaders. + * Set debhelper compatibility level to 5. + * Set Standards-Version to 3.8.0; add debian/README.source to document quilt + usage. + * debian/copyright: use author-independent upstream URL. + * Refresh debian/rules, no functional changes. + + -- gregor herrmann Mon, 16 Jun 2008 19:01:16 +0200 + +libarchive-ar-perl (1.13b-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Conditionally remove /usr/lib/perl5 (closes: #467658) + * Correct typo (debian -> Debian) in debian/control + + -- Stephen Gran Sat, 05 Apr 2008 12:35:47 +0100 + +libarchive-ar-perl (1.13b-1) unstable; urgency=low + + * Initial Release (Closes: #320253). + + -- Florian Ragwitz Mon, 31 Oct 2005 21:01:34 +0100 + --- libarchive-ar-perl-1.13b.orig/debian/rules +++ libarchive-ar-perl-1.13b/debian/rules @@ -0,0 +1,62 @@ +#!/usr/bin/make -f +# This debian/rules file is provided as a template for normal perl +# packages. It was created by Marc Brockschmidt for +# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may +# be used freely wherever it is useful. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# If set to a true value then MakeMaker's prompt function will +# always return the default without waiting for user input. +export PERL_MM_USE_DEFAULT=1 + +include /usr/share/quilt/quilt.make + +PERL ?= /usr/bin/perl +PACKAGE = $(shell dh_listpackages) +TMP = $(CURDIR)/debian/$(PACKAGE) + +build: build-stamp +build-stamp: $(QUILT_STAMPFN) + dh_testdir + $(PERL) Makefile.PL INSTALLDIRS=vendor + $(MAKE) + $(MAKE) test + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + dh_clean build-stamp install-stamp + [ ! -f Makefile ] || $(MAKE) realclean + +install: install-stamp +install-stamp: build-stamp + dh_testdir + dh_testroot + dh_clean -k + $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr + [ ! -d $(TMP)/usr/lib/perl5 ] || \ + rmdir --ignore-fail-on-non-empty --parents --verbose \ + $(TMP)/usr/lib/perl5 + touch $@ + +binary-arch: +# We have nothing to do here for an architecture-independent package + +binary-indep: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installchangelogs CHANGES + dh_perl + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- libarchive-ar-perl-1.13b.orig/debian/patches/pad-2-byte-read.patch +++ libarchive-ar-perl-1.13b/debian/patches/pad-2-byte-read.patch @@ -0,0 +1,23 @@ +Author: Magnus Holmgren +Description: respect 2-byte alignment when reading +Bug: #419101 + +--- libarchive-ar-perl.orig/lib/Archive/Ar.pm ++++ libarchive-ar-perl/lib/Archive/Ar.pm +@@ -319,7 +319,7 @@ + while($scratchdata =~ /\S/) + { + +- if($scratchdata =~ s/^(.{58})`\n//m) ++ if($scratchdata =~ s/^(.{58})`\n//s) + { + my @fields = unpack("A16A12A6A6A8A10", $1); + +@@ -333,6 +333,7 @@ + @$headers{qw/name date uid gid mode size/} = @fields; + + $headers->{data} = substr($scratchdata, 0, $headers->{size}, ""); ++ substr($scratchdata, 0, $headers->{size} % 2, ""); + + $this->_addFile($headers); + }else{ --- libarchive-ar-perl-1.13b.orig/debian/patches/series +++ libarchive-ar-perl-1.13b/debian/patches/series @@ -0,0 +1,2 @@ +pad-2-byte-read.patch +pad-2-byte-write.patch --- libarchive-ar-perl-1.13b.orig/debian/patches/pad-2-byte-write.patch +++ libarchive-ar-perl-1.13b/debian/patches/pad-2-byte-write.patch @@ -0,0 +1,48 @@ +Author: DDICK +Description: pad the file contents to an even number when writing +Bugs: #419101 and http://rt.cpan.org/Public/Bug/Display.html?id=18383 +(Patch taken from CPAN) + +--- libarchive-ar-perl.orig/lib/Archive/Ar.pm ++++ libarchive-ar-perl/lib/Archive/Ar.pm +@@ -252,10 +252,14 @@ + + $content->{uid} ||= ""; + $content->{gid} ||= ""; +- + $outstr.= pack("A16A12A6A6A8A10", @$content{qw/name date uid gid mode size/}); + $outstr.= ARFMAG; + $outstr.= $content->{data}; ++ unless (((length($content->{data})) % 2) == 0) { ++ # Padding to make up an even number of bytes ++ # as described in http://en.wikipedia.org/wiki/Ar_(file_format) ++ $outstr.= "\n"; ++ } + } + + return $outstr unless $filename; +--- /dev/null ++++ libarchive-ar-perl/t/30write.t +@@ -0,0 +1,22 @@ ++#!/usr/bin/perl -w ++ ++use Test::More (tests => 2); ++use strict; ++ ++BEGIN { ++ chdir 't' if -d 't'; ++ use lib '../blib/lib', 'lib/', '..'; ++} ++ ++use Archive::Ar(); ++ ++my ($padding_archive) = new Archive::Ar(); ++$padding_archive->add_data("test.txt", "here\n"); ++my ($archive_results) = $padding_archive->write(); ++ok(length($archive_results) == 74, "Archive::Ar pads un-even number of bytes successfully\n"); ++$padding_archive = new Archive::Ar(); ++$padding_archive->add_data("test.txt", "here1\n"); ++$archive_results = $padding_archive->write(); ++ok(length($archive_results) == 74, "Archive::Ar pads even number of bytes successfully\n"); ++ ++unlink 'test.txt' if -f 'test.txt';