Commit af6946f5 authored by gregor herrmann's avatar gregor herrmann

* Set Standards-Version to 3.8.1 (no changes).

* 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/copyright: update formatting.
* Set debhelper compatibility level to 7; adapt
  debian/{control,compat,rules}.
* Add /me to Uploaders.
* debian/control: make the short description a noun phrase.
parent 97ff4049
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.
......@@ -3,6 +3,15 @@ libipc-sharedcache-perl (1.3-8) UNRELEASED; urgency=low
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
(source stanza).
* debian/control: Added: ${misc:Depends} to Depends: field.
* Set Standards-Version to 3.8.1 (no changes).
* 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/copyright: update formatting.
* Set debhelper compatibility level to 7; adapt
debian/{control,compat,rules}.
* Add /me to Uploaders.
* debian/control: make the short description a noun phrase.
-- gregor herrmann <gregoa@debian.org> Sun, 16 Nov 2008 20:44:04 +0100
......
Source: libipc-sharedcache-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Uploaders: Jay Bonci <jaybonci@debian.org>, Martín Ferrari <tincho@debian.org>
Uploaders: Jay Bonci <jaybonci@debian.org>,
Martín Ferrari<tincho@debian.org>,
gregor herrmann <gregoa@debian.org>
Section: perl
Priority: optional
Build-Depends: debhelper (>> 5.0.0)
Build-Depends: debhelper (>= 7), quilt
Build-Depends-Indep: perl (>= 5.6.0-16), libipc-sharelite-perl (>= 0.06)
Standards-Version: 3.8.0
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/
......@@ -13,7 +15,7 @@ Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libipc-sharedcache-per
Package: libipc-sharedcache-perl
Architecture: all
Depends: ${misc:Depends}, libipc-sharelite-perl, ${perl:Depends}
Description: manage a cache in SysV IPC shared memory
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.
Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat
Upstream-Author: Sam Tregar <sam@tregar.com>
Packaged-By: Jay Bonci <jay@bonci.com>
Packaged-Date: Sun, 21 Jul 2002 13:32:43 -0400
Original-Source-Location: http://search.cpan.org/dist/IPC-SharedCache
Original-Source-Command: uscan --force-download
Original-Source-Depends: devscripts
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)
Copyright: 2000, Sam Tregar, sam@tregar.com
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; either version 2 of the License, or (at your option) any later
version.
Files: debian/*
Copyright: © 2008 Debian Perl Group <debian-perl@lists.debian.org>
© 2002-2004 Jay Bonci <jay@bonci.com>
© 2002-2003 Piotr Roszatycki <dexter@debian.org>
License: other
It is assumed that all previous Debian maintainers used a license compatible
with upstream's.
Copyright: 2002, 2003, Piotr Roszatycki <dexter@debian.org>
2002-2004, Jay Bonci <jaybonci@debian.org>
2008-2009, gregor herrmann <gregoa@debian.org>
2008, Martín Ferrari <tincho@debian.org>
License: GPL-2+ | Artistic
On Debian GNU/Linux systems, the complete text of the
GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'.
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'
From 3bccbfe57c350b8db2a3f9d0812f6fa5548c7f2e Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
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
newer-ipc-sharelite.patch
#!/usr/bin/make -f
#export DH_VERBOSE=1
export PERL_MM_USE_DEFAULT=1
PERL ?= /usr/bin/perl
PACKAGE = $(shell dh_listpackages)
TMP = $(CURDIR)/debian/$(PACKAGE)
include /usr/share/quilt/quilt.make
build: build-stamp
build-stamp:
dh_testdir
$(PERL) Makefile.PL INSTALLDIRS=vendor
$(MAKE)
$(MAKE) test
build-stamp: $(QUILT_STAMPFN)
dh build
touch $@
clean:
dh_testdir
dh_testroot
dh_clean build-stamp install-stamp
[ ! -f Makefile ] || $(MAKE) realclean
clean: unpatch
dh $@
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
dh install
touch $@
binary-arch:
# We have nothing to do here for an architecture-independent package
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs README
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
binary-indep: install
dh $@
binary: binary-arch binary-indep
.PHONY: binary binary-arch binary-indep install clean build
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment