--- libipc-sharedcache-perl-1.3.orig/debian/control +++ libipc-sharedcache-perl-1.3/debian/control @@ -0,0 +1,21 @@ +Source: libipc-sharedcache-perl +Maintainer: Debian Perl Group +Uploaders: Jay Bonci , + Martín Ferrari , + gregor herrmann +Section: perl +Priority: optional +Build-Depends: debhelper (>= 7), quilt +Build-Depends-Indep: perl (>= 5.6.0-16), libipc-sharelite-perl (>= 0.06) +Standards-Version: 3.8.1 +Homepage: http://search.cpan.org/dist/IPC-SharedCache/ +Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libipc-sharedcache-perl/ +Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libipc-sharedcache-perl/ + +Package: libipc-sharedcache-perl +Architecture: all +Depends: ${misc:Depends}, libipc-sharelite-perl, ${perl:Depends} +Description: module to manage a cache in SysV IPC shared memory + IPC::SharedCache attempts to make shared memory easy to use for one specific + application - a shared memory cache, provides a shared memory cache accessed + as a tied hash. --- libipc-sharedcache-perl-1.3.orig/debian/copyright +++ libipc-sharedcache-perl-1.3/debian/copyright @@ -0,0 +1,30 @@ +Format-Specification: + http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 +Upstream-Maintainer: Sam Tregar, sam@tregar.com +Upstream-Source: http://search.cpan.org/dist/IPC-SharedCache/ +Upstream-Name: IPC-SharedCache + +Files: * +Copyright: 2000, Sam Tregar, sam@tregar.com +License: GPL-2+ + +Files: debian/* +Copyright: 2002, 2003, Piotr Roszatycki + 2002-2004, Jay Bonci + 2008-2009, gregor herrmann + 2008, Martín Ferrari +License: GPL-2+ | Artistic + +License: GPL-2+ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991, or (at your + option) any later version. + On Debian GNU/Linux systems, the complete text of version 2 of the GNU + General Public License can be found in `/usr/share/common-licenses/GPL-2' + +License: Artistic + This program is free software; you can redistribute it and/or modify + it under the terms of the Artistic License, which comes with Perl. + On Debian GNU/Linux systems, the complete text of the Artistic License + can be found in `/usr/share/common-licenses/Artistic' --- libipc-sharedcache-perl-1.3.orig/debian/watch +++ libipc-sharedcache-perl-1.3/debian/watch @@ -0,0 +1,3 @@ +version=3 +http://search.cpan.org/dist/IPC-SharedCache/ \ + .*/IPC-SharedCache-v?(\d.*)\.tar\.gz --- libipc-sharedcache-perl-1.3.orig/debian/compat +++ libipc-sharedcache-perl-1.3/debian/compat @@ -0,0 +1 @@ +7 --- libipc-sharedcache-perl-1.3.orig/debian/libipc-sharedcache-perl.docs +++ libipc-sharedcache-perl-1.3/debian/libipc-sharedcache-perl.docs @@ -0,0 +1 @@ +README --- libipc-sharedcache-perl-1.3.orig/debian/README.source +++ libipc-sharedcache-perl-1.3/debian/README.source @@ -0,0 +1,5 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +See /usr/share/doc/quilt/README.source for a detailed explanation. --- libipc-sharedcache-perl-1.3.orig/debian/changelog +++ libipc-sharedcache-perl-1.3/debian/changelog @@ -0,0 +1,85 @@ +libipc-sharedcache-perl (1.3-8) unstable; urgency=low + + * Add patch newer-ipc-sharelite.patch by Niko Tyni to make + libipc-sharedcache-perl compatible with newer versions of IPC::ShareLite + (closes: #525711); add quilt framework and debian/README.source. + * debian/control: + - switch Vcs-Browser field to ViewSVN + - add ${misc:Depends} to Depends: field + - add /me to Uploaders + - make the short description a noun phrase + - set Standards-Version to 3.8.1 (no further changes) + * debian/copyright: update formatting. + * Set debhelper compatibility level to 7; adapt + debian/{control,compat,rules}. + + -- gregor herrmann Mon, 27 Apr 2009 16:11:21 +0200 + +libipc-sharedcache-perl (1.3-7) unstable; urgency=low + + [ gregor herrmann ] + * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser + field (source stanza); Homepage field (source stanza). + * Set Maintainer to Debian Perl Group. + * Use dist-based URL in debian/watch. + * debian/rules: delete /usr/lib/perl5 only if it exists. + + [ Martín Ferrari ] + * debian/control: Added myself to Uploaders, increased DH version to 5, + added version on libipc-sharelite-perl dependency, bumped + Standards-Version with no changes, improved Description. Separated + debhelper from Build-Depends-Indep. + * debian/watch: support v\d.+ versions. + * debian/rules: new from templates. + * debian/copyright: new format, added packaging CP info (including strange + conflicting dates from previous maintainers). + + -- Martín Ferrari Thu, 03 Jul 2008 05:35:03 -0300 + +libipc-sharedcache-perl (1.3-6) unstable; urgency=low + + * Adds correct debian/watch so uscan will actually work + + -- Jay Bonci Sun, 12 Sep 2004 03:54:03 -0400 + +libipc-sharedcache-perl (1.3-5) unstable; urgency=low + + * Updated maintainer address + * Updated to policy version 3.6.1.0 + * Changed download address from CPAN to be a non-versioned URL + * Updated to use my standard rules template + * Added a compat file + * Included upstream README in the packaging + + -- Jay Bonci Wed, 1 Oct 2003 11:28:53 -0400 + +libipc-sharedcache-perl (1.3-4) unstable; urgency=low + + * Updated to debian-policy verison 3.5.10 + * New Maintainer - Closes: bug#151251 + * Package adoption. Merged internals from yada to debhelper + * Updated to use debhelper version 4 + * New section: perl + * Changed priority from extra to optional + * Clarified copyright + + -- Jay Bonci Sun, 21 Jul 2002 14:00:02 -0400 + +libipc-sharedcache-perl (1.3-3) unstable; urgency=low + + * Handled DEB_BUILD_OPTIONS=noopt + + -- Piotr Roszatycki Mon, 20 Jan 2003 13:54:29 +0100 + +libipc-sharedcache-perl (1.3-2) unstable; urgency=low + + * New standards. + + -- Piotr Roszatycki Fri, 3 Jan 2003 11:45:57 +0100 + +libipc-sharedcache-perl (1.3-1) unstable; urgency=low + + * Initial Debian version. + + -- Piotr Roszatycki Mon, 13 May 2002 14:35:42 +0200 + --- libipc-sharedcache-perl-1.3.orig/debian/rules +++ libipc-sharedcache-perl-1.3/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f + +include /usr/share/quilt/quilt.make + +build: build-stamp +build-stamp: $(QUILT_STAMPFN) + dh build + touch $@ + +clean: unpatch + dh $@ + +install: install-stamp +install-stamp: build-stamp + dh install + touch $@ + +binary-arch: + +binary-indep: install + dh $@ + +binary: binary-arch binary-indep + +.PHONY: binary binary-arch binary-indep install clean build --- libipc-sharedcache-perl-1.3.orig/debian/patches/series +++ libipc-sharedcache-perl-1.3/debian/patches/series @@ -0,0 +1 @@ +newer-ipc-sharelite.patch --- libipc-sharedcache-perl-1.3.orig/debian/patches/newer-ipc-sharelite.patch +++ libipc-sharedcache-perl-1.3/debian/patches/newer-ipc-sharelite.patch @@ -0,0 +1,158 @@ +From 3bccbfe57c350b8db2a3f9d0812f6fa5548c7f2e Mon Sep 17 00:00:00 2001 +From: Niko Tyni +Date: Sun, 26 Apr 2009 23:07:03 +0300 +Subject: [PATCH] Wrap IPC::ShareLite->new() calls inside eval{} blocks. + +As of IPC::ShareLite 0.14, its constructor croaks on error where it used +to return an empty value. This breaks the IPC::SharedCache test suite. + +http://bugs.debian.org/525711 +http://rt.cpan.org/Public/Bug/Display.html?id=45450 +--- + SharedCache.pm | 36 +++++++++++++++++++++++++++--------- + 1 files changed, 27 insertions(+), 9 deletions(-) + +diff --git a/SharedCache.pm b/SharedCache.pm +index 30bca21..51eabcf 100644 +--- a/SharedCache.pm ++++ b/SharedCache.pm +@@ -580,11 +580,13 @@ sub STORE { + my $share; + if (exists $root_record->{'map'}{$key}) { + # we've got a key, get the share and cache it +- $share = IPC::ShareLite->new('-key' => $root_record->{'map'}{$key}, ++ $share = eval { ++ IPC::ShareLite->new('-key' => $root_record->{'map'}{$key}, + '-mode' => $options->{ipc_mode}, + '-size' => $options->{ipc_segment_size}, + '-create' => 0, + '-destroy' => 0); ++ }; + confess("IPC::SharedCache: Unable to get shared cache block $root_record->{'map'}{$key} : $!") unless defined $share; + + $root_record->{'size'} -= $root_record->{'length_map'}{$key}; +@@ -596,13 +598,15 @@ sub STORE { + for ( my $end = $obj_ipc_key + 10000 ; + $obj_ipc_key != $end ; + $obj_ipc_key++ ) { +- $share = IPC::ShareLite->new('-key' => $obj_ipc_key, ++ $share = eval { ++ IPC::ShareLite->new('-key' => $obj_ipc_key, + '-mode' => $options->{ipc_mode}, + '-size' => $options->{ipc_segment_size}, + '-create' => 1, + '-exclusive' => 1, + '-destroy' => 0, + ); ++ }; + last if defined $share; + } + croak("IPC::SharedCache : searched through 10,000 consecutive locations for a free shared memory segment, giving up : $!") +@@ -625,11 +629,13 @@ sub STORE { + my $delete_key = shift @{$root_record->{'queue'}}; + # delete the segment for this object + { +- my $share = IPC::ShareLite->new('-key' => $root_record->{map}{$delete_key}, ++ my $share = eval { ++ IPC::ShareLite->new('-key' => $root_record->{map}{$delete_key}, + '-mode' => $options->{ipc_mode}, + '-size' => $options->{ipc_segment_size}, + '-create' => 0, + '-destroy' => 1); ++ }; + confess("IPC::SharedCache: Unable to get shared cache block $root_record->{'map'}{$key} : $!") unless defined $share; + # share is now deleted since destroy == 1 and $share goes out of scope + } +@@ -684,11 +690,13 @@ sub DELETE { + + # delete the segment for this object + { +- my $share = IPC::ShareLite->new('-key' => $obj_ipc_key, ++ my $share = eval { ++ IPC::ShareLite->new('-key' => $obj_ipc_key, + '-mode' => $options->{ipc_mode}, + '-size' => $options->{ipc_segment_size}, + '-create' => 0, + '-destroy' => 1); ++ }; + confess("IPC::SharedCache: Unable to get shared cache block $root_record->{'map'}{$key} : $!") unless defined $share; + # share is now deleted since destroy == 1 and $share goes out of scope + } +@@ -830,11 +838,13 @@ sub walk { + require "Data/Dumper.pm"; + + # make sure the cache actually exists here +- my $test = IPC::ShareLite->new('-key' => $key, ++ my $test = eval { ++ IPC::ShareLite->new('-key' => $key, + '-mode' => 0666, + '-size' => $segment_size, + '-create' => 0, + '-destroy' => 0); ++ }; + die "Unable to find a cache at key $key : $!" unless defined $test; + + my %self; +@@ -911,10 +921,12 @@ sub remove { + + # delete the root segment + { +- my $share = IPC::ShareLite->new('-key' => $key, ++ my $share = eval { ++ IPC::ShareLite->new('-key' => $key, + '-size' => $segment_size, + '-create' => 0, + '-destroy' => 1); ++ }; + confess("IPC::SharedCache: Unable to get shared cache block $key : $!") unless defined $share; + # share is now deleted since destroy == 1 and $share goes out of scope + } +@@ -938,11 +950,13 @@ sub _init_root { + return if defined $root; + + # try to get a handle on an existing root for this key +- $root = IPC::ShareLite->new('-key' => $ipc_key, ++ $root = eval { ++ IPC::ShareLite->new('-key' => $ipc_key, + '-mode' => $options->{ipc_mode}, + '-size' => $options->{ipc_segment_size}, + '-create' => 0, + '-destroy' => 0); ++ }; + if (defined $root) { + $ROOT_SHARE_CACHE{$ipc_key} = $root; + return; +@@ -961,12 +975,14 @@ sub _init_root { + # if $options->{debug}; + + # try to create it if that didn't work (and do initialization) +- $root = IPC::ShareLite->new('-key' => $options->{ipc_key}, ++ $root = eval { ++ IPC::ShareLite->new('-key' => $options->{ipc_key}, + '-mode' => $options->{ipc_mode}, + '-size' => $options->{ipc_segment_size}, + '-create' => 1, + '-exclusive' => 1, + '-destroy' => 0); ++ }; + confess("IPC::SharedCache object initialization : Unable to initialize root ipc shared memory segment : $!") + unless defined($root); + +@@ -1032,11 +1048,13 @@ sub _get_share_object { + my $options = $self->{options}; + + # we've got a key, get the share and cache it +- my $share = IPC::ShareLite->new('-key' => $obj_ipc_key, ++ my $share = eval { ++ IPC::ShareLite->new('-key' => $obj_ipc_key, + '-mode' => $options->{ipc_mode}, + '-size' => $options->{ipc_segment_size}, + '-create' => 0, + '-destroy' => 0); ++ }; + confess("IPC::SharedCache: Unable to get shared cache block $obj_ipc_key : $!") unless defined $share; + + # get the cache block +-- +1.6.2.4 +