Bug#787760: Add the file download method

2015-06-04 Thread Thaddeus H. Black
Package: debmirror
Version: 1:2.17
Severity: normal
Tags: patch

Debmirror can download via ftp://, http://, https:// or rsync://, but
not via file://.  That is, a command like this does not work:

debmirror --dist=stable --arch=amd64 --method=file\
 --root=$SOURCE_DIRECTORY --no-check-gpg $TARGET_DIRECTORY

Why do you care that this does not work?  Answer: testing.  It can be
more convenient for users, and maybe even more convenient for
developers, to test debmirror's behavior on localhost than over
the network.

Besides, most or all programs that support multiple network protocols
should probably support a file:// method, for approximately the same
reason your network should support a localhost and your system should
support a /dev/null.  Even if the file:// method is not often used, it
should remain available as a null method, so to speak.  (I believe that
pbuilder has recently added a file:// method, for instance.)

Please find attached a suggested patch to implement the change.  I have
successfully tested the patched binary by using it download jessie 8.0
stable, with source and binary-amd64, about 100 GiB, from one hard-drive
partition of my laptop to another.

Observe that though rsync is incidentally used in the normal debmirror
manner, no rsync *daemon* is required to use the file:// method as the
patch implements it.

The severity is normal rather than wishlist because applying this patch
may make it easier to fix some of debmirror's other, outstanding bugs of
normal severity.

At the time this bug is reported, debmirror has been orphaned (#768532)
six months.  Since no one else has maintained this package for the past
six months, since I have now spent the time to learn a little about how
debmirror internally works, and since I have used debmirror for years
and prefer its bugs to be fixed, I had probably better adopt the
package.  I will file ITA after this report.

diff -turN debmirror-2.17/debmirror debmirror-2.17.1/debmirror
--- debmirror-2.17/debmirror	2014-07-02 20:54:08.0 +
+++ debmirror-2.17.1/debmirror	2015-06-03 22:41:55.517583458 +
@@ -103,7 +103,8 @@
 =item B<--method>=I
 
 Specify the method to download files. Currently, supported methods are
-B, B, B, and B.
+B, B, B, and B. The B method is
+experimentally supported.
 
 =item B<--passive>
 
@@ -766,7 +767,7 @@
 }
 
 # Backwards compatibility: remote root dir no longer needs prefix
-$remoteroot =~ s%^[:/]%%;
+$remoteroot =~ s%^[:/]%% unless downloads_via_file();
 
 # Post-process arrays. Allow commas to separate values the user entered.
 # If the user entered nothing, provide defaults.
@@ -802,7 +803,7 @@
 # Display configuration.
 $|=1 if $debug;
 if ($passwd eq "anonymous@") {
-  if ($download_method eq "http") {
+  if (downloads_via_http()) {
 say("Mirroring to $mirrordir from $download_method://$host/$remoteroot/");
   } else {
 say("Mirroring to $mirrordir from $download_method://$user\@$host/$remoteroot/");
@@ -823,7 +824,7 @@
 say("Passive mode on.") if $passive;
 say("Proxy: $proxy") if $proxy;
 say("Download at most $max_batch files.") if ($max_batch > 0);
-say("Download at most $rsync_batch files per rsync call.") if ($download_method eq "rsync");
+say("Download at most $rsync_batch files per rsync call.") if (downloads_via_rsync());
 if ($pre_cleanup) {
   say("Will clean up before mirroring.");
 } elsif ($post_cleanup) {
@@ -878,7 +879,7 @@
 sub init_connection {
   $_ = $download_method;
 
-  /^http$/ && do {
+  downloads_via_http() && do {
 $ua = LWP::UserAgent->new(keep_alive => 1);
 $ua->timeout($timeout);
 $ua->proxy('http', $ENV{http_proxy}) if $ENV{http_proxy};
@@ -887,7 +888,7 @@
 return;
   };
   
-  /^https$/ && do {
+  downloads_via_https() && do {
 $ua = LWP::UserAgent->new(keep_alive => 1, ssl_opts => {
 verify_hostname => ! $disable_ssl_verification });
 $ua->timeout($timeout);
@@ -898,7 +899,7 @@
   };
 
 
-  /^ftp$/ && do {
+  downloads_via_ftp() && do {
 if ($proxy || $ENV{ftp_proxy}) {
   $ua = LWP::UserAgent->new;
   $ua->timeout($timeout);
@@ -915,7 +916,15 @@
 return;
   };
 
-  /^rsync$/ && do {
+  downloads_via_file() && do {
+$ua = LWP::UserAgent->new;
+$ua->timeout($timeout);
+$ua->show_progress($progress);
+$host='localhost';
+return;
+  };
+  
+  downloads_via_rsync() && do {
 return;
   };
 
@@ -926,13 +935,18 @@
 # determine remote root for rsync transfers
 my $rsyncremote;
 if (length $remoteroot) {
-$rsyncremote = "$host\:\:$remoteroot/";
-if ($user ne 'anonymous') {
-$rsyncremote = "$user\@$rsyncremote";
+if (downloads_via_file()) {
+$rsyncremote = "$remoteroot/";
+}
+else {
+$rsyncremote = "$host\:\:$remoteroot/";
+if ($user ne 'anonymous') {
+$rsyncremote = "$user\@$rsyncremote";
+}
 }
 }
 else {
-if ($download_method

Processing of sawzall_1.0-2_source.changes

2015-06-04 Thread Debian FTP Masters
sawzall_1.0-2_source.changes uploaded successfully to localhost
along with the files:
  sawzall_1.0-2.dsc
  sawzall_1.0-2.debian.tar.xz

Greetings,

Your Debian queue daemon (running on host franck.debian.org)


-- 
To UNSUBSCRIBE, email to debian-qa-packages-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1z0aoh-0007dc...@franck.debian.org



sawzall_1.0-2_source.changes ACCEPTED into experimental

2015-06-04 Thread Debian FTP Masters


Accepted:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Format: 1.8
Date: Thu, 04 Jun 2015 16:51:46 +0200
Source: sawzall
Binary: szl libszl0 libszl0-dev libszl0-dbg
Architecture: source
Version: 1.0-2
Distribution: experimental
Urgency: medium
Maintainer: Debian QA Group 
Changed-By: Andreas Beckmann 
Description:
 libszl0- sawzall language C++ library
 libszl0-dbg - sawzall language C++ library (debugging symbols)
 libszl0-dev - sawzall language C++ library (development headers)
 szl- compiler and runtime for the Sawzall language
Closes: 663575
Changes:
 sawzall (1.0-2) experimental; urgency=medium
 .
   * QA upload.
   * Set Maintainer to Debian QA Group.  (See #729383)
   * Add fix_erroneous_contructor patch from upstream changeset #38 to resolve
 FTBFS, thanks to Daniel T Chen.  (Closes: #663575)
   * Add r39.patch, from upstream changeset 39 to fix building on 32-bit env.
   * Add missing-includes.patch to fix another FTBFS.
   * New watch file, thanks to bartm.
   * Switch to debhelper compat level 9 and use dh_autoreconf.
   * Sanitize override rules, ignore test failures for now.
   * Convert to multiarch.
   * Update to Standards-Version: 3.9.6.
   * Add Vcs-* URLs.
Checksums-Sha1:
 e987457fb2c8cc4ddca24742c60fb34711bcc7c5 2052 sawzall_1.0-2.dsc
 62b3718680604ccc0515b5c28fe7564bede7896b 4688 sawzall_1.0-2.debian.tar.xz
Checksums-Sha256:
 01d25daf89bf26e3a27c6eb9fb17c630892faf45e8957770db8f9fb28d96408a 2052 
sawzall_1.0-2.dsc
 fec83f1e371c712e92b39ebc0a01273dbbdb51118a3079fbc4e9c5a4cfff89d3 4688 
sawzall_1.0-2.debian.tar.xz
Files:
 263459bd5668a4f6fdf72f8ad76def49 2052 devel optional sawzall_1.0-2.dsc
 68e6d0a8e82bce34d31ccab380dabee7 4688 devel optional 
sawzall_1.0-2.debian.tar.xz

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCAAGBQJVcJ84AAoJEF+zP5NZ6e0I0aYQAKm0z2Tebbp1wab3HzTRt94G
APpRdY7ZSGzZecA4SAJoUX8q2r9GLcIi2h3q1+ar/0IRL33koRu41FrdTV/2WfO4
4Ge+33zkZw0I/9u99dUQn1EV64ZHimXLTtiwekHmfbujk6wXWYBK2IxYRXsdeD56
/+7HLEgQSp+xa2vcRzjJrP1sI90RFO/PsejYtQC4SqfK2QS9WBhm1SaZzyqBTwLc
Vu13DAfAd1r+u8Qb2csW3gklzUgE+peybQl4YWzQ1FYoYikjc/J1LXKrjE4z+4CG
4MkI0aP1CMW4ut81WhT2nzowkFSd8JtPMKffRW7fU1gHzQeCcim6q3AWBwjyAh4X
IJS5McEfJWK+vdbYAD2aKFIz5hnWq1mcaRIKQRKHoPLJTsnxBlMp0QTcUDRIggMr
UmJqeMXLp260xSEZ3e+W9arcrsndSeFytY6GsbAonJ0j/q3J4WciwATQ0g6cHl2s
BwvOmBve0c4vH842nDQtcV0MYY03T+TE0ThuofMMEGbHpRCXTahOjqTeMieWrBDt
m2tmBEvtjE/MXdWUoq+kMQzRa/AuCjg595vqJqhGwwRH0ajyAj+s7nMtUsykkQxT
ZrUXDi/maIlDoCRsA1YNyMFw7giCrta2jJdQFY6mQ4AsNAw2mOVVilA5Q7580lg0
pCfP59O4qVbiz6o0M1OL
=3uqT
-END PGP SIGNATURE-


Thank you for your contribution to Debian.


-- 
To UNSUBSCRIBE, email to debian-qa-packages-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1z0au5-000844...@franck.debian.org