Your message dated Mon, 06 Aug 2018 09:34:11 +0000
with message-id <[email protected]>
and subject line Bug#629922: fixed in debmirror 1:2.30
has caused the Debian Bug report #629922,
regarding wget patch for debmirror
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
629922: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629922
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: debmirror
Version: 20060907.1
Severity: normal

I added wget-transport in debmirror. This allows you to use debmirror
networks with unstable connect.

=begin diff

--- debmirror   2006-09-08 17:00:27.000000000 +0400
+++ debmirror.wget      2007-01-06 15:15:08.000000000 +0300
@@ -67,6 +67,7 @@
           [--proxy=http://user:pass\@url:port/] [--help]
           [--rsync-options=options] [--ignore-small-errors]
           [--pdiff=mirror|use|none]
+          [--use-wget] [--wget-options=options]
           mirrordir
 
 For details, see man page.
@@ -137,6 +138,15 @@
 server, you need to put ':' prefix in the root directory
 (i.e. ":debian", which means host::debian).
 
+=item --use-wget
+
+Use wget for http and ftp methods.
+
+=item --wget-options=options
+
+Specify alternative wget options to be used. Default options are
+"-c". See 'man wget' for more information.
+
 =item --proxy=http://user:pass@url:port/
 
 Specifies the http proxy (like Squid) to use for http and hftp method.
@@ -403,6 +413,8 @@
 our $rsync_options="-aIL --partial";
 our $ignore_small_errors=0;
 our $pdiff_mode="use";
+our $use_wget=0;
+our $wget_options="-c";
 my @errlog;
 my $HOME;
 ($HOME = $ENV{'HOME'}) or die "HOME not defined in environment!\n";
@@ -419,6 +431,8 @@
 
 my $help;
 GetOptions('debug'        => \$debug,
+     'use-wget'     => \$use_wget,
+     'wget-options=s'   => \$wget_options,
           'progress|p'   => \$progress,
           'verbose|v'    => \$verbose,
           'source!'      => \$do_source,
@@ -911,7 +925,7 @@
        if (($dirname) = $file =~ m:(.*)/:) {
          make_dir($dirname);
        }
-       http_get($file);
+       if ($use_wget) { wget_get($file); } else { http_get($file); }
        if ($max_batch > 0 && ++$i >= $max_batch) {
          push (@errlog,"Batch limit exceeded, mirror run was partial\n");
          $num_errors++;
@@ -931,7 +945,7 @@
        if (($dirname) = $file =~ m:(.*)/:) {
          make_dir($dirname);
        }
-       ftp_get($file);
+       if ($use_wget) { wget_get($file); } else { ftp_get($file); }
        if ($max_batch > 0 && ++$i >= $max_batch) {
          push (@errlog,"Batch limit exceeded, mirror run was partial\n");
          $num_errors++;
@@ -1160,7 +1174,15 @@
     };
 
     /^http$/ && do {
-      $res=http_get($file);
+      if ($use_wget) 
+      {
+        $res=wget_get($file); 
+      }
+      else
+      {
+        $res=http_get($file);
+      }
+
       $res=$res && check_lists($file);
       if (!$res) {
        say("$file failed md5sum check, removing");
@@ -1169,7 +1191,15 @@
     };
 
     /^ftp$/ && do {
-      $res=ftp_get($file);
+      if ($use_wget) 
+      {
+        $res=wget_get($file); 
+      }
+      else
+      {
+        $res=ftp_get($file);
+      }
+
       $res=$res && check_lists($file);
       if (!$res) {
        say("$file failed md5sum check, removing");
@@ -1259,6 +1289,70 @@
   return $ret;
 }
 
+# WGGET a file via http or ftp
+sub wget_get 
+{
+  local $_;
+  my $file=shift;
+
+  my $proto=$download_method;
+  $proto=~/^hftp$/ and $proto='ftp';
+
+  my $url="$proto://${host}/${remoteroot}/${file}";
+
+  my $wget_cmd="wget $wget_options -O $file $url 2>&1";
+
+  my $percent=0;
+  $percent = sprintf("%3.0f",(($bytes_gotten/$bytes_to_get)*100))
+  unless($bytes_to_get == 0);
+
+  print "$url => " if $debug;
+  print "[$percent%] Getting: $file... " 
+    if ($progress || $verbose);
+
+  print "'$wget_cmd'... " if $verbose;
+
+  
+  if ($dry_run)
+  {
+    print "ok\n" if $progress || $verbose;
+    return 1;
+  }
+
+  -f $file and unlink $file;
+
+  my $hwget;
+  unless (open $hwget, "-|", $wget_cmd) 
+  {
+    warn "failed: $!\n" if $progress || $verbose;
+    push @errlog, "Download of $file failed: $!";
+    $num_errors++;
+    return 0;
+  }
+ 
+  print "\n" if $debug;
+  while (<$hwget>)
+  {
+    s/\s+$//g;
+    print "$_\n" if $debug;
+  }
+  close $hwget;
+  if ($?)
+  {
+    my $emsg="'$wget_cmd' return code: $?";
+    push @errlog, $emsg;
+    $num_errors++;
+    warn "failed: $emsg\n";
+    return 0;
+  }
+  else
+  {
+    print "ok\n" if $progress || $verbose;
+    return 1;
+  }
+}
+
+
 # Get a file via ftp, first displaying its filename if progress is on.
 # I should just be able to subclass Net::Ftp and override the get method,
 # but it's late.

=end diff 


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-2-686
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)

Versions of packages debmirror depends on:
ii  bzip2                         1.0.3-6    high-quality block-sorting file co
ii  libcompress-zlib-perl         1.42-1     Perl module for creation and manip
ii  libdigest-sha1-perl           2.11-1     NIST SHA-1 message digest algorith
ii  liblockfile-simple-perl       0.2.5-7    Simple advisory file locking
ii  libnet-perl                   1:1.19-3   Implementation of Internet protoco
ii  libwww-perl                   5.805-1    WWW client/server library for Perl
ii  perl [libdigest-md5-perl]     5.8.8-6.1  Larry Wall's Practical Extraction 
ii  perl-modules [libnet-perl]    5.8.8-6.1  Core Perl modules
ii  rsync                         2.6.9-2    fast remote file copy program (lik

Versions of packages debmirror recommends:
ii  gnupg                         1.4.5-3    GNU privacy guard - a free PGP rep
ii  patch                         2.5.9-4    Apply a diff file to an original

-- no debconf information


--- End Message ---
--- Begin Message ---
Source: debmirror
Source-Version: 1:2.30

We believe that the bug you reported is fixed in the latest version of
debmirror, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <[email protected]> (supplier of updated debmirror package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 06 Aug 2018 10:07:54 +0100
Source: debmirror
Binary: debmirror
Architecture: source
Version: 1:2.30
Distribution: unstable
Urgency: medium
Maintainer: Colin Watson <[email protected]>
Changed-By: Colin Watson <[email protected]>
Description:
 debmirror  - Debian partial mirror script, with ftp and package pool support
Closes: 629922
Changes:
 debmirror (1:2.30) unstable; urgency=medium
 .
   * Make the error message when mkdir fails more helpful.
   * Restart partial HTTP downloads (closes: #629922).
   * Use /usr/share/dpkg/pkg-info.mk rather than equivalent hand-written
     code.
   * Upgrade to debhelper v9.
Checksums-Sha1:
 7e7e84558ab305565ffe7d4639a7534518b2bafa 1665 debmirror_2.30.dsc
 bbc5a6ee85f1218423ceacaa7cd1163b3914f52b 53668 debmirror_2.30.tar.xz
 e5465d16d000b06d41f8e38afafc0aa446cf18ce 7062 debmirror_2.30_source.buildinfo
Checksums-Sha256:
 6050ef7fc220580f8981befe704903c731e0d8de4191a69b2d91ee091701bd0d 1665 
debmirror_2.30.dsc
 7e164a4265c60c8c28813e50c7dcd60113a3cbe352220e785be8f3b8ae276ee3 53668 
debmirror_2.30.tar.xz
 3876fc7e6011e00fd8c5bfc0fb7d7d8c5ee4c52af120dd92b44b5b35bc87b282 7062 
debmirror_2.30_source.buildinfo
Files:
 c60ea567e4eb0154d6f340154f212c71 1665 net optional debmirror_2.30.dsc
 093d4647c1585b2ff46fa1d0ac0fa1db 53668 net optional debmirror_2.30.tar.xz
 88cd52af8e43a5820291a92b835851b7 7062 net optional 
debmirror_2.30_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAltoEAwACgkQOTWH2X2G
UAs4txAAvJtgldFqZXA+CUzNf1/VXb1VR6L6+36c4+XxAqZekvvwpOhGET0JX21Q
i7SKbN+ExYzLs9A8GhTRXAjxUw61RInX/1I4G1NiCNfxasKxD90mq/ixc/itP0BL
C5KeD0m9dBmywvepNfDplFZ9Sf1YREcRR8Z4uS2Cj+hbY2vHRxIpIFUB3cvAqHuV
H0+mct8e00BS21zT3tGb3bjAqEmSng9O2JVaKEz9Eei09YUxZ/jaCTZ448BTM/AZ
kD+OyA8bIxONUzBsYppmJTS4tqs//v2M7f0XEG/AzQwnEh4KaTlLnSkQbsazWcey
NJDTU0VJioypVaWF/nREz9iK5j6YB0Zk8rvE3v9kegkIdx5Oxr0IqErC6KYVCjA5
ON7TRKoGF/yT00sFIpwm+zLtSk2h+oVSG4riRi+l5+v9xChggAOpuh86eJccj5ov
FhKJxXIwC9c1bAUOhFVyVPR9k0D+6ZBrNb3cNHAX/XyOFFXJmMaeJppMqv22TyRM
lXRcMjkYeni2VNWNBDsRrsoIp7fmirNm1tE368JWcUj38zAiYFyRved0KiUqDaHG
MR6RDuytBFPGP2oovTEbZEIjjQXfpSacLrUmZ/zS5zHmBt4/JzgIG2qr0iAFpD/N
7Uh2YI2BYNRhDKMKph8dGoqWsyQ0L84owpuHQ+l/pI7dkK/x8CM=
=2vcB
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to