debian/0000755000000000000000000000000012263535132007170 5ustar debian/rules0000755000000000000000000000003612146621523010247 0ustar #!/usr/bin/make -f %: dh $@ debian/patches/0000755000000000000000000000000012263534472010625 5ustar debian/patches/series0000644000000000000000000000011712263533373012040 0ustar fix-pod-errors.patch fix-server-connection-error.patch test-random-ports.patch debian/patches/fix-pod-errors.patch0000644000000000000000000000064612146621523014526 0ustar Description: fix POD errors remove extraneous =cut Origin: vendor Bug: https://rt.cpan.org/Ticket/Display.html?id=85192 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=85192 Author: Jonathan Yu Reviewed-by: gregor herrmann Last-Update: 2013-05-11 --- a/lib/Gearman/Client.pm +++ b/lib/Gearman/Client.pm @@ -419,5 +419,3 @@ Jonathan Steinert (hachi@cpan.org) =cut - -=cut debian/patches/test-random-ports.patch0000644000000000000000000000312412263534472015250 0ustar Description: use random ports when starting test gearman server The defailt port of 9050 may be already taken, e.g. by tor, leading to test hangs. Author: Damyan Ivanov Bug-Debian: http://bugs.debian.org/723940 Bug: https://rt.cpan.org/Ticket/Display.html?id=91973 --- a/t/TestGearman.pm +++ b/t/TestGearman.pm @@ -9,8 +9,40 @@ use POSIX qw( :sys_wait_h ); our $Bin; use FindBin qw( $Bin ); -# TODO: use a variation of t/lib/GearTestLib::free_port to find 3 free ports -use constant PORT => 9050; +our $_PORT; +# find a sequence of three free ports and return the first +sub PORT() { + #use Carp; + if ($_PORT) { + #Carp::cluck "# returning cached port $_PORT"; + return $_PORT; + } + + my $port = shift; + my $type = shift || "tcp"; + my $sock; + SEQ: + while (1) { + for my $offset ( 0..2 ) { + $sock = IO::Socket::INET->new( + LocalAddr => '127.0.0.1', + LocalPort => $port + $offset, + Proto => $type, + ReuseAddr => 1 + ); + + unless ($sock) { + $port = int(rand(20000)) + 30000; + next SEQ; + } + + undef($sock); + } + + #Carp::cluck "# PORT = $port"; + return $_PORT = $port; + } +} our $NUM_SERVERS = 1; @@ -33,6 +65,8 @@ sub start_server { $ready = 1; }; + #use Carp; + #Carp::cluck "# Starting test server on port $port"; my $pid = start_child([ $server, '-p' => $port, '-n' => $$ ]); $Children{$pid} = 'S'; while (!$ready) { debian/patches/fix-server-connection-error.patch0000644000000000000000000000273612146621523017226 0ustar Description: fix issue with Worker.pm patch to fix Worker connection issue (#611355) Origin: vendor Bug-Debian: http://bugs.debian.org/611355 Bug: https://rt.cpan.org/Ticket/Display.html?id=85191 Forwarded: https://rt.cpan.org/Ticket/Display.html?id=85191 Author: Richard Wallman Reviewed-by: gregor herrmann Last-Update: 2013-05-11 --- a/lib/Gearman/Worker.pm +++ b/lib/Gearman/Worker.pm @@ -263,6 +263,10 @@ # ( js => last_update_time, ... ) my %last_update_time; + my $on_connect = sub { + return Gearman::Util::send_req($_[0], \$presleep_req); + }; + while (1) { # "Jobby" job servers are the set of server which we will contact # on this pass through the loop, because we need to clear and use @@ -278,7 +282,7 @@ for (my $i = 0; $i < $js_count; $i++) { my $js_index = ($i + $js_offset) % $js_count; my $js = $jobby_js[$js_index]; - my $jss = $self->_get_js_sock($js) + my $jss = $self->_get_js_sock($js, on_connect => $on_connect) or next; # TODO: add an optional sleep in here for the test suite @@ -380,10 +384,6 @@ my @jss; - my $on_connect = sub { - return Gearman::Util::send_req($_[0], \$presleep_req); - }; - foreach my $js (@{$self->{job_servers}}) { my $jss = $self->_get_js_sock($js, on_connect => $on_connect) or next; debian/copyright0000644000000000000000000000221312263534644011130 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Gearman Upstream-Contact: Alan Kasindorf Source: https://metacpan.org/release/Gearman Files: * Copyright: 2006-2007, Six Apart, Ltd. License: Artistic or GPL-1+ Files: debian/* Copyright: 2007, Pascal Hakim 2010, Jonathan Yu 2011, Richard Wallman 2013, gregor herrmann License: Artistic or GPL-1+ 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 systems, the complete text of the Artistic License can be found in `/usr/share/common-licenses/Artistic'. License: GPL-1+ 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 1, or (at your option) any later version. . On Debian systems, the complete text of version 1 of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-1'. debian/watch0000644000000000000000000000015412263534660010226 0ustar version=3 https://metacpan.org/release/Gearman .*/Gearman-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$ debian/source/0000755000000000000000000000000012146621523010470 5ustar debian/source/format0000644000000000000000000000001412146621523011676 0ustar 3.0 (quilt) debian/control0000644000000000000000000000244612263535071010603 0ustar Source: libgearman-client-perl Maintainer: Debian Perl Group Uploaders: Jonathan Yu Section: perl Priority: optional Build-Depends: debhelper (>= 8) Build-Depends-Indep: perl, libstring-crc32-perl, gearman-server, netbase Build-Conflicts: gearman-server (<< 1.11) Standards-Version: 3.9.5 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-perl/packages/libgearman-client-perl.git Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libgearman-client-perl.git Homepage: https://metacpan.org/release/Gearman Package: libgearman-client-perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, libstring-crc32-perl Breaks: gearman-server (<< 1.11) Description: client for the Gearman distributed job system Gearman is a system to farm out work to other machines, dispatching function calls to machines that are better suited to do work, to do work in parallel, to load balance lots of function calls, or to call functions between languages. . This package contains a client class for the Gearman distributed job system, providing a framework for sending jobs to one or more Gearman servers. For more information, see . debian/compat0000644000000000000000000000000212146621523010366 0ustar 8 debian/changelog0000644000000000000000000000361312263535132011045 0ustar libgearman-client-perl (1.11-3) unstable; urgency=medium * Team upload * add a patch usiing random ports for the test servers Closes: #723940 -- test fail when port 9050 is in use * drop trailing slash from metacpan URLs * declare conformance with Policy 3.9.5 (no changes needed) -- Damyan Ivanov Thu, 09 Jan 2014 17:03:46 +0200 libgearman-client-perl (1.11-2) unstable; urgency=low * Team upload. [ Richard Wallman ] * Fixed issue with Workers never connecting to servers (Closes: #611355) [ Ansgar Burchardt ] * debian/control: Convert Vcs-* fields to Git. [ Salvatore Bonaccorso ] * Change search.cpan.org based URIs to metacpan.org based URIs [ gregor herrmann ] * Add gearman-server, netbase as build dependencies to enable tests. * Switch to "3.0 (quilt)" source format. * Remove quilt framework. * debian/copyright: switch formatting to Copyright-Format 1.0. * Bump debhelper compatibility level to 8. * Set Standards-Version to 3.9.4 (no changes). -- gregor herrmann Sat, 11 May 2013 16:58:43 +0200 libgearman-client-perl (1.11-1) unstable; urgency=low * Take over package (Closes: #549364) * New upstream release * Standards-Version 3.8.4 (no changes) * Use new short debhelper 7 rules format * No longer install README and HACKING * Update watch file to match upstream * Standards-Version 3.8.3 (drop perl version dep) * Add myself to Uploaders and Copyright * Slight rewrite of the control description * Refresh copyright information to DEP5 format * Add patch to fix POD errors * Breaks gearman-server (<< 1.11), Build-Conflicts with it (there is no Build-Breaks) -- Jonathan Yu Tue, 02 Feb 2010 14:09:43 -0500 libgearman-client-perl (1.09-1) unstable; urgency=low * Initial release (Closes: #429354) -- Pascal Hakim Thu, 23 Aug 2007 23:14:50 +1000