debian/0000755000000000000000000000000011563331171007167 5ustar debian/patches/0000755000000000000000000000000011563327214010621 5ustar debian/patches/README0000644000000000000000000000021111347270217011473 0ustar 0xxx: Grabbed from upstream development. 1xxx: Possibly relevant for upstream adoption. 2xxx: Only relevant for official Debian release. debian/patches/1002_fix_use_default_smsc.patch0000644000000000000000000000054011563234202016470 0ustar Description: Fix use default_smsc Author: Jonas Smedegaard Last-Update: 2011-05-13 --- a/lib/NetSDS/Kannel.pm +++ b/lib/NetSDS/Kannel.pm @@ -319,6 +319,8 @@ # Set SMSC id if ( $params{smsc} ) { $send{smsc} = $params{smsc}; + } else { + $send{smsc} = $self->default_smsc; } # Set DLR fetching mask (see kannel documentation) debian/patches/1001_silence_warning.patch0000644000000000000000000000064411366016362015456 0ustar Description: silence warning checking undefined dlr_msg Author: Jonas Smedegaard Last-Update: 2010-04-28 --- a/lib/NetSDS/Kannel.pm +++ b/lib/NetSDS/Kannel.pm @@ -630,7 +630,7 @@ $ret{dlr_msg} = $cgi->param('dlrmsg'); # Process return code if not success - if ( $ret{dlr_msg} =~ /^NACK\/(\d+)\// ) { + if ( $ret{dlr_msg} and $ret{dlr_msg} =~ /^NACK\/(\d+)\// ) { $self->{reject_code} = $1; } debian/patches/series0000644000000000000000000000012611563243633012037 0ustar 1001_silence_warning.patch 1002_fix_use_default_smsc.patch 1003_fix_use_dlr_url.patch debian/patches/1003_fix_use_dlr_url.patch0000644000000000000000000000426411563327214015500 0ustar Description: Fix set dlr-url in send() and preserve dlr_id as fallback. Multiple flaws was discovered in the send() DLR handling. . dlr_url parameter was ignored, unconditionally using default dlr-url. . msgid was set to dlr_url, and not (separately) configurable. . Additionally, the documented parameter dlr-url was ignored and instead dlr_id was expected. dlr_id was the valid parameter until Kannel 1.1.6 where it was replaced with dlr_url. . This patch fixes above: * uses msgid parameter or avoids msgid in generated dlr_url. * uses dlr_url parameter or dlr_id parameter or default dlr_url. Author: Jonas Smedegaard Last-Update: 2011-05-13 --- a/lib/NetSDS/Kannel.pm +++ b/lib/NetSDS/Kannel.pm @@ -226,11 +226,16 @@ Example: + use NetSDS::Kannel; + use NetSDS::Util::Misc; + + my $kannel = NetSDS::Kannel->new(...); $kannel->send_sms( from => '1234', to => '380672206770', text => 'Wake up!!!', smsc => 'nokia_modem', + msgid => make_uuid, ); =cut @@ -324,8 +329,14 @@ } # Set DLR fetching mask (see kannel documentation) - if ( $params{dlr_id} ) { - $send{'dlr-url'} = $self->make_dlr_url( msgid => $params{dlr_id} ); + # Fallback to dlr_id (undocumented and obsolete since Kannel 1.1.6) + if ( $params{dlr_id} and not $params{dlr_url} ) { + $params{dlr_url} = $params{dlr_id}; + } + if ( $params{dlr_url} or $params{dlr_id} ) { + if ( $params{dlr_url} ) { + $send{'dlr-url'} = $self->make_dlr_url( dlr_url => $params{dlr_url}, msgid => $params{msgid} ); + } # Set DLR fetching mask (see kannel documentation) if ( $params{dlr_mask} ) { @@ -659,13 +670,16 @@ my ( $self, %params ) = @_; # Set reference to MT message Id for identification - my $msgid = $params{msgid}; + my $msgid; + if ( $params{msgid} ) { + $msgid = '&msgid=' . $params{msgid}; + } # Set DLR base URL from object property or method parameter my $dlr_url = $self->{dlr_url}; if ( $params{dlr_url} ) { $dlr_url = $params{dlr_url}; } - $dlr_url .= "?type=dlr&msgid=$msgid&smsid=%I&from=%p&to=%P&time=%t&unixtime=%T&dlr=%d&dlrmsg=%A"; + $dlr_url .= "?type=dlr$msgid&smsid=%I&from=%p&to=%P&time=%t&unixtime=%T&dlr=%d&dlrmsg=%A"; return conv_str_uri($dlr_url); debian/control0000644000000000000000000000235011563325701010574 0ustar Source: libnetsds-kannel-perl Section: perl Priority: optional Build-Depends: devscripts (>= 2.10.7~), perl, perl-modules (>= 5.10.0) | libmodule-build-perl (>= 0.2808), cdbs (>= 0.4.78~), debhelper (>= 6), dh-buildinfo, libnetsds-perl, libnetsds-util-perl, libwww-perl, libxml-libxml-perl, libtest-pod-perl, libtest-pod-coverage-perl Maintainer: Debian Perl Group Uploaders: Jonas Smedegaard Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/git/pkg-perl/packages/libnetsds-kannel-perl.git Vcs-Browser: http://git.debian.org/?p=pkg-perl/packages/libnetsds-kannel-perl.git Homepage: http://search.cpan.org/dist/NetSDS-Kannel/ Package: libnetsds-kannel-perl Architecture: all Depends: ${perl:Depends}, ${misc:Depends}, ${cdbs:Depends} Description: Service Delivery Suite framework - Kannel SMS gateway API NetSDS::Kannel module provides API to Kannel SMS gateway. . To decrease innecessary problems we use a lot of predefined parameters while sending and receiving messages via Kannel HTTP API. It's not so flexible as direct HTTP processing but less expensive in development time ;-) . This modules uses LWP to send messages and CGI.pm to process messages from Kannel. debian/source/0000755000000000000000000000000011563234317010473 5ustar debian/source/format0000644000000000000000000000001411276536300011677 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000000236711563331171011051 0ustar libnetsds-kannel-perl (1.300-5) unstable; urgency=low * Improve patch 1003 to fix support for msgid parameter. -- Jonas Smedegaard Sat, 14 May 2011 00:21:14 +0200 libnetsds-kannel-perl (1.300-4) unstable; urgency=low * Add patch 1003 to fix set dlr-url in send() and preserve dlr_id as fallback. -- Jonas Smedegaard Fri, 13 May 2011 20:38:39 +0200 libnetsds-kannel-perl (1.300-3) unstable; urgency=low * Add patch 1002 to fix use default_smsc. * Ease building with git-buildpackage: + Git-ignore quilt .pc dir. + Add dpkg-source local-options config. * Update copyright file: + Bump format to draft 174 of DEP-5. + Rewrap license fields at 72 chars, and shorten comments. * Bump policy compliance to standards-version 3.9.2. * Shorten Vcs-Browser paragraph in control file. -- Jonas Smedegaard Fri, 13 May 2011 16:05:28 +0200 libnetsds-kannel-perl (1.300-2) unstable; urgency=low * Add patch 1001: silence warning checking undefined dlr_msg. -- Jonas Smedegaard Wed, 28 Apr 2010 13:32:31 +0200 libnetsds-kannel-perl (1.300-1) unstable; urgency=low * Initial release. Closes: bug#579484. -- Jonas Smedegaard Wed, 28 Apr 2010 08:11:38 +0200 debian/compat0000644000000000000000000000000211245512513010363 0ustar 6 debian/watch0000644000000000000000000000024511365662254010232 0ustar # Run the "uscan" command to check for upstream updates and more. version=3 http://search.cpan.org/dist/NetSDS-Kannel/ .*/NetSDS-Kannel-(\d[\d.]+)\.tar\.gz debian debian/copyright_hints0000644000000000000000000000150111563247403012330 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174 Upstream-Name: FIXME Upstream-Contact: FIXME Source: FIXME Disclaimer: Autogenerated by CDBS Files: Build.PL MANIFEST META.yml Makefile.PL debian/compat debian/control debian/control.in debian/gbp.conf debian/patches/1001_silence_warning.patch debian/patches/1002_fix_use_default_smsc.patch debian/patches/1003_fix_use_dlr_url.patch debian/patches/README debian/patches/series debian/source/format debian/source/local-options debian/watch t/01_load.t t/02_pod.t t/03_pod_coverage.t Copyright: *No copyright* License: UNKNOWN FIXME Files: README lib/NetSDS/Feature/Kannel.pm lib/NetSDS/Kannel.pm Copyright: 2008-2009, Net Style Ltd License: GPL-2+ FIXME Files: debian/rules Copyright: 2010, Jonas Smedegaard License: GPL FIXME debian/copyright0000644000000000000000000000210611563234730011124 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174 Upstream-Name: NetSDS::Kannel Upstream-Contact: Michael Bochkaryov Source: http://search.cpan.org/dist/NetSDS-Kannel/ Copyright: 2008-2009, Net Style Ltd License: GPL-2+ Files: debian/* Copyright: 2010, Jonas Smedegaard License: 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; either version 2, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Comment: On Debian systems the GNU General Public License (GPL) version 2 is located in '/usr/share/common-licenses/GPL'. . You should have received a copy of the GNU General Public License along with this program. If not, see . debian/gbp.conf0000644000000000000000000000014611245500163010603 0ustar # Configuration file for git-buildpackage and friends [DEFAULT] pristine-tar = True sign-tags = True debian/rules0000755000000000000000000000307611365664603010266 0ustar #!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- # Copyright 2010, Jonas Smedegaard # Description: Main Debian packaging script for NetSDS::Kannel # # 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, or (at # your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . include /usr/share/cdbs/1/rules/upstream-tarball.mk include /usr/share/cdbs/1/rules/utils.mk include /usr/share/cdbs/1/class/perl-build.mk include /usr/share/cdbs/1/rules/debhelper.mk DEB_UPSTREAM_PACKAGE = NetSDS-Kannel #DEB_UPSTREAM_URL = http://www.cpan.org/modules/by-module/NetSDS DEB_UPSTREAM_URL = http://search.cpan.org/CPAN/authors/id/R/RA/RATTLER DEB_UPSTREAM_TARBALL_MD5 = 71428ec66538cb4384d47d9a29b12230 # supress regression tests, currently too broken DEB_PERL_CHECK_TARGET = # Needed both by upstream build process and at runtime common-depends = libnetsds-perl, libnetsds-util-perl, libwww-perl, libxml-libxml-perl CDBS_BUILD_DEPENDS += , $(common-depends) CDBS_DEPENDS = $(common-depends) # Needed by upstream tests CDBS_BUILD_DEPENDS += , libtest-pod-perl, libtest-pod-coverage-perl debian/control.in0000644000000000000000000000174311563235053011206 0ustar Source: libnetsds-kannel-perl Section: perl Priority: optional Build-Depends: @cdbs@ Maintainer: Debian Perl Group Uploaders: Jonas Smedegaard Standards-Version: 3.9.2 Vcs-Git: git://git.debian.org/git/pkg-perl/packages/libnetsds-kannel-perl.git Vcs-Browser: http://git.debian.org/?p=pkg-perl/packages/libnetsds-kannel-perl.git Homepage: http://search.cpan.org/dist/NetSDS-Kannel/ Package: libnetsds-kannel-perl Architecture: all Depends: ${perl:Depends}, ${misc:Depends}, ${cdbs:Depends} Description: Service Delivery Suite framework - Kannel SMS gateway API NetSDS::Kannel module provides API to Kannel SMS gateway. . To decrease innecessary problems we use a lot of predefined parameters while sending and receiving messages via Kannel HTTP API. It's not so flexible as direct HTTP processing but less expensive in development time ;-) . This modules uses LWP to send messages and CGI.pm to process messages from Kannel.