[libnet-socks-perl] 01/17: Imported Debian patch 0.03-13
gregor herrmann
gregoa at debian.org
Fri Sep 8 20:53:17 UTC 2017
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libnet-socks-perl.
commit 07363e70f73d4b3e734be0c6e138509f1f6cdafb
Author: Sebastien Delafond <seb at debian.org>
Date: Tue Apr 17 15:18:25 2012 +0200
Imported Debian patch 0.03-13
---
debian/changelog | 90 +++++++++++++++++++++++++++++++++++++
debian/compat | 1 +
debian/control | 17 +++++++
debian/copyright | 29 ++++++++++++
debian/docs | 2 +
debian/examples | 1 +
debian/patches/10_example.patch | 96 ++++++++++++++++++++++++++++++++++++++++
debian/patches/20_SOCKS-pm.patch | 20 +++++++++
debian/patches/30_dns.patch | 40 +++++++++++++++++
debian/patches/series | 3 ++
debian/rules | 87 ++++++++++++++++++++++++++++++++++++
debian/source/format | 1 +
debian/watch | 4 ++
13 files changed, 391 insertions(+)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..4801ca2
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,90 @@
+libnet-socks-perl (0.03-13) unstable; urgency=low
+
+ * Many thanks to Jari Aalto <jari.aalto at cante.net> for *all* the changes
+ in this upload:
+ - remove deprecated dpatch and upgrade to packaging format "3.0 quilt"
+ - update to Standards-Version to 3.9.3 and debhelper to 9
+ - add build-arch and build-indep targets; use dh_prep in rules file
+
+ -- Sebastien Delafond <seb at debian.org> Tue, 17 Apr 2012 15:18:25 +0200
+
+libnet-socks-perl (0.03-12) unstable; urgency=low
+
+ * Lintian cleanups.
+ * Added debian/watch file.
+
+ -- Sebastien Delafond <seb at debian.org> Wed, 21 Oct 2009 14:31:16 +0200
+
+libnet-socks-perl (0.03-11) unstable; urgency=low
+
+ * Unconditionally remove usr/lib during the install phase
+ (Closes: #479919).
+
+ -- Sebastien Delafond <seb at debian.org> Wed, 07 May 2008 07:33:29 -0700
+
+libnet-socks-perl (0.03-10) unstable; urgency=low
+
+ * Lintian cleanups.
+
+ -- Sebastien Delafond <seb at debian.org> Tue, 06 May 2008 22:22:01 -0700
+
+libnet-socks-perl (0.03-9) unstable; urgency=low
+
+ * Don't return 1 if Makefile does not exist (Closes: #470346).
+
+ -- Sebastien Delafond <seb at debian.org> Mon, 10 Mar 2008 12:17:10 -0700
+
+libnet-socks-perl (0.03-8) unstable; urgency=low
+
+ * Don't try to blindly remove /usr/lib/perl5 (Closes: #467992).
+ * Lintian cleanups.
+
+ -- Sebastien Delafond <seb at debian.org> Tue, 26 Feb 2008 21:45:19 -0800
+
+libnet-socks-perl (0.03-7) unstable; urgency=low
+
+ * This should actually be a Build-Dep (Closes: #403087).
+
+ -- Sebastien Delafond <seb at debian.org> Thu, 14 Dec 2006 11:04:26 -0800
+
+libnet-socks-perl (0.03-6) unstable; urgency=low
+
+ * Added missing dependency on libnet-dns-perl ("use Net::DNS;").
+
+ -- Sebastien Delafond <seb at debian.org> Tue, 28 Nov 2006 00:15:30 -0800
+
+libnet-socks-perl (0.03-5) unstable; urgency=low
+
+ * Added patch by Christian Schwarz to resolve hostnames
+ (Closes: #400599).
+
+ -- Sebastien Delafond <seb at debian.org> Mon, 27 Nov 2006 12:33:19 -0800
+
+libnet-socks-perl (0.03-4) unstable; urgency=low
+
+ * Upgraded standards version to 3.7.2.
+ * Moved debhelper and dpatch from Build-Depends-Indep to
+ Build-Depends.
+
+ -- Sebastien Delafond <seb at debian.org> Thu, 15 Jun 2006 16:25:48 -0700
+
+libnet-socks-perl (0.03-3) unstable; urgency=low
+
+ * Upgraded standards version to 3.6.2.2.
+ * Changed maintainer to <seb at debian.org>.
+
+ -- Sebastien Delafond <seb at debian.org> Mon, 06 Feb 2006 17:09:56 -0800
+
+libnet-socks-perl (0.03-2) unstable; urgency=low
+ * Removed some part of the example.
+ * Patched SOCKS.pm to avoid unecessary and bug-creating IP conversion
+ * Fixed the "build-depends-without-arch-dep" lintian warning.
+
+ -- Sebastien Delafond <sdelafond at gmx.net> Sun, 24 Oct 2004 16:10:03 -0700
+
+libnet-socks-perl (0.03-1) unstable; urgency=low
+
+ * Initial Release (Closes: #272272).
+ * Patched upstream example so it takes command-line args.
+
+ -- Sebastien Delafond <sdelafond at gmx.net> Sat, 18 Sep 2004 15:35:28 -0700
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b1d84fc
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,17 @@
+Source: libnet-socks-perl
+Section: perl
+Priority: optional
+Build-Depends-Indep: perl, libnet-dns-perl
+Build-Depends: debhelper (>= 9)
+Maintainer: Sebastien Delafond <seb at debian.org>
+Standards-Version: 3.9.3
+Homepage: http://search.cpan.org/~clintdw/
+
+Package: libnet-socks-perl
+Architecture: all
+Depends: ${misc:Depends}, ${perl:Depends}, libnet-dns-perl
+Enhances: elza (>= 1.4.3-6)
+Description: Perl module providing an API to communicate with SOCKS servers
+ This is a SOCKS client module that can communicate with SOCKS v4 and
+ v5 servers. It currently allows you to make outgoing and incoming
+ TCP connections.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..ca291fd
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,29 @@
+This is the debian package for the Net::SOCKS module.
+It was created by Sebastien Delafond <sdelafond at gmx.net> using dh-make-perl.
+
+The upstream author is:
+
+Clinton Wong <clintdw at netcom.com>.
+
+The module is available from:
+
+http://search.cpan.org/~clintdw/SOCKS/
+
+The only change for the Debian package was the addition of the debian/
+files.
+
+Copyright:
+
+ Copyright (c) 1997-1998 Clinton Wong. All rights reserved.
+
+ All Rights Reserved.
+
+ This module is free software. It may be used, redistributed and/or
+ modified under the same terms as Perl.
+
+ Perl may be redistributed and/or modified it under the terms of
+ either 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-2' and
+ the Artistic Licence in `/usr/share/common-licenses/Artistic'.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..724e084
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+README
+TODO
diff --git a/debian/examples b/debian/examples
new file mode 100644
index 0000000..33a9488
--- /dev/null
+++ b/debian/examples
@@ -0,0 +1 @@
+example
diff --git a/debian/patches/10_example.patch b/debian/patches/10_example.patch
new file mode 100755
index 0000000..c37b57d
--- /dev/null
+++ b/debian/patches/10_example.patch
@@ -0,0 +1,96 @@
+From: Sebastien Delafond <sdelafond at gmx.net>
+Subject: Change shebang to /usr/bin/perl
+ Ask for command-line parameters
+ Remove the "accept"part of the listening test
+
+--- SOCKS-0.03.orig/example 1998-05-19 04:49:07.000000000 -0700
++++ SOCKS-0.03/example 2004-09-20 11:29:27.000000000 -0700
+@@ -1,19 +1,32 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl -w
+
+ use strict;
+
+ use Net::SOCKS;
+
+-print "Attempting to connect to 192.168.1.3 at port 79 using the socks\n";
+-print "server at 192.168.1.3 port 1080\n";
++sub usage {
++ print "Usage:\n";
++ print "\texample <socks_addr> <socks_port> <target_addr> <target_port>\n";
++ print "to connect to <target_addr>:<target_port> through SOCKS5 at <socks_addr>:<socks_port>\n";
++}
++
++if ($#ARGV != 3) {
++ &usage();
++ exit(1);
++}
++
++my ($socks_addr, $socks_port, $target_addr, $target_port) = @ARGV;
++
++print "Attempting to connect to $target_addr at port $target_port using the socks\n";
++print "server at $socks_addr port $socks_port\n";
+
+-my $sock = new Net::SOCKS(socks_addr => '192.168.1.3',
+- socks_port => 1080,
++my $sock = new Net::SOCKS(socks_addr => $socks_addr,
++ socks_port => $socks_port,
+ #user_id => 'the_user',
+ #user_password => 'the_password',
+ #force_nonanonymous => 1,
+ protocol_version => 5);
+-my $f= $sock->connect(peer_addr => '192.168.1.3', peer_port => 79);
++my $f= $sock->connect(peer_addr => $target_addr, peer_port => $target_port);
+ print "connect status: ",
+ Net::SOCKS::status_message($sock->param('status_num')), "\n";
+
+@@ -23,29 +36,38 @@
+ $sock->close();
+ }
+
+-print "Attempting to listen() using the server at 192.168.1.3 port 1080\n";
++print "Attempting to listen() using the server at $socks_addr port $socks_port\n";
+
+-$sock = new Net::SOCKS(socks_addr => '192.168.1.3',
+- socks_port => 1080,
++$sock = new Net::SOCKS(socks_addr => $socks_addr,
++ socks_port => $socks_port,
+ #user_id => 'the_user',
+ #user_password => 'the_password',
+ #force_nonanonymous => 1,
+ protocol_version => 5);
+
+-my ($ip, $ip_dot_dec, $port) = $sock->bind(peer_addr => "192.168.1.3",
+- peer_port => 9999);
++# We expect a connection from $target_addr:9999
++# This is just for the sake of testing that the SOCKS proxy lets us
++# listen: we of course won't initiate a connection from
++# $target_addr:9999 (and in the majoirty of cases, we simply *can not*,
++# since $target_addr is likely to be remote)
++# --Seb
++my ($ip, $ip_dot_dec, $port) = $sock->bind(peer_addr => $target_addr,
++ peer_port => 9999);
+ print "bind status: ",
+ Net::SOCKS::status_message($sock->param('status_num')), "\n";
+
+ if ($sock->param('status_num') == SOCKS_OKAY) {
+ print "Listening at the IP of ", $ip_dot_dec, " at port ", $port, "\n";
+- $f= $sock->accept();
+-}
+-print "accept status: ",
+- Net::SOCKS::status_message($sock->param('status_num')), "\n";
+
+-if ($sock->param('status_num') == SOCKS_OKAY) {
+- while (<$f>) { print }
++# Following is commented out, according to comment above.
++# $f= $sock->accept();
++#}
++#print "accept status: ",
++# Net::SOCKS::status_message($sock->param('status_num')), "\n";
++#
++#if ($sock->param('status_num') == SOCKS_OKAY) {
++# while (<$f>) { print }
++#}
+ }
+ $sock->close();
+
diff --git a/debian/patches/20_SOCKS-pm.patch b/debian/patches/20_SOCKS-pm.patch
new file mode 100644
index 0000000..cbc3fc4
--- /dev/null
+++ b/debian/patches/20_SOCKS-pm.patch
@@ -0,0 +1,20 @@
+From: Sebastien Delafond <sdelafond at gmx.net>
+Subject: Added a test to get rid of a warning message
+
+--- SOCKS-0.03.orig/lib/Net/SOCKS.pm 2004-10-24 16:14:19.000000000 -0700
++++ SOCKS-0.03/lib/Net/SOCKS.pm 1998-05-19 05:22:47.000000000 -0700
+@@ -231,7 +231,13 @@
+ ${*self}{listen_addr} = ${*self}{socks_addr};
+ }
+
+- my $dotted_dec = inet_ntoa( pack ("N", ${*self}{listen_addr} ) );
++ my $dotted_dec;
++ if (${*self}{listen_addr} =~ m/(\d+\.){3}\d+/) {
++ $dotted_dec = ${*self}{listen_addr};
++ } else {
++ $dotted_dec = inet_ntoa( pack ("N", ${*self}{listen_addr} ) );
++ }
++
+ if (${*self}{status_num}==SOCKS_OKAY) {
+ return (${*self}{listen_addr}, $dotted_dec, ${*self}{listen_port})
+ }
diff --git a/debian/patches/30_dns.patch b/debian/patches/30_dns.patch
new file mode 100755
index 0000000..01e7b3c
--- /dev/null
+++ b/debian/patches/30_dns.patch
@@ -0,0 +1,40 @@
+From: Christian Schwarz <chris at schwarz-online.com>
+Subject: Resolve name to numeric IP
+
+diff -urNad libnet-socks-perl-0.03~/lib/Net/SOCKS.pm libnet-socks-perl-0.03/lib/Net/SOCKS.pm
+--- libnet-socks-perl-0.03~/lib/Net/SOCKS.pm 2006-11-28 00:48:44.000000000 -0800
++++ libnet-socks-perl-0.03/lib/Net/SOCKS.pm 2006-11-28 00:48:51.000000000 -0800
+@@ -8,6 +8,7 @@
+ use vars qw($VERSION @ISA @EXPORT);
+ use IO::Socket;
+ use Carp;
++use Net::DNS;
+
+ require Exporter;
+ require AutoLoader;
+@@ -350,9 +351,22 @@
+ $rc=$self->_connect();
+
+ if ($rc==SOCKS_OKAY) {
+-
+-#fixme - check to make sure peer_addr is dotted decimal or do name
+-# resolution on it first
++ # resolve name
++ unless (${*self}{peer_addr} =~ /^\d+\.\d+\.\d+\.\d+$/o) {
++ #die "peer_addr not an IP adress: ${*self}{peer_addr}\n";
++ #print STDERR "debug: peer_addr not an IP adress: ${*self}{peer_addr} -- resolving...\n";
++ my $res = Net::DNS::Resolver->new;
++ my $query = $res->search(${*self}{peer_addr});
++ my $ip;
++ if ($query) {
++ foreach my $rr ($query->answer) {
++ next unless $rr->type eq "A";
++ $ip = $rr->address;
++ }
++ }
++ $ip or die "cannot resolve name ${*self}{peer_addr}";
++ ${*self}{peer_addr} = $ip;
++ }
+
+ # send the request
+ print { ${*self}{fh} } pack ('CCn', 4, $req_num, ${*self}{peer_port}) .
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..837c8e0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+10_example.patch
+20_SOCKS-pm.patch
+30_dns.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..4fc7927
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,87 @@
+#!/usr/bin/make -f
+# This debian/rules file is provided as a template for normal perl
+# packages. It was created by Marc Brockschmidt <marc at dch-faq.de> 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
+
+
+PACKAGE=$(shell dh_listpackages)
+
+ifndef PERL
+PERL = /usr/bin/perl
+endif
+
+TMP =$(CURDIR)/debian/$(PACKAGE)
+
+
+build-arch: build
+build-indep: build
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+
+ # Add commands to compile the package here
+ $(PERL) Makefile.PL INSTALLDIRS=vendor
+ $(MAKE)
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+
+ # Add commands to clean up after the build process here
+ rm -f build-stamp install-stamp
+ if [ -f Makefile ] ; then $(MAKE) distclean ; fi
+ dh_clean
+
+install: install-stamp
+install-stamp: build-stamp
+ dh_testdir
+ dh_testroot
+ dh_prep
+
+ $(MAKE) test
+ $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
+
+ # As this is a architecture independent package, we are not supposed to install
+ # stuff to /usr/lib. MakeMaker creates the dirs, we delete them from the deb:
+ rm -fr $(TMP)/usr/lib
+
+ rm -fr $(CURDIR)/blib
+ touch install-stamp
+
+binary-arch:
+# We have nothing to do by default.
+
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+# dh_installcron
+# dh_installmenu
+ dh_installexamples
+ dh_installdocs
+ dh_installchangelogs Changes
+ dh_perl
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+source diff:
+ @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..a2dce35
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=3
+
+http://search.cpan.org/~clintdw/SOCKS-0.03 \
+ .*SOCKS-(.*)\.tar.gz.*
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-socks-perl.git
More information about the Pkg-perl-cvs-commits
mailing list