[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#491098: marked as done ([Patch] packages/debian-installer-utils/fetch-url-methods/http fix for wget404 for latest busybox wget)

Your message dated Wed, 16 Jul 2008 18:17:04 +0000
with message-id <E1KJBYm-0000tV-7F@ries.debian.org>
and subject line Bug#491098: fixed in debian-installer-utils 1.61
has caused the Debian Bug report #491098,
regarding [Patch] packages/debian-installer-utils/fetch-url-methods/http fix for wget404 for latest busybox wget
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 owner@bugs.debian.org

491098: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491098
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: di-utils
Version: 1.60
Tags: patch

The wget404 code in
packages/debian-installer-utils/fetch-url-methods/http no longer
matches the error messages from busybox wget.

The attached patch fixes this for the busybox wget in the daily builds of d-i.
The attached patch also considers ftp and matches a different error
generated by ftp.

patch made againt debian-installer svn trunk revision 54394

Alex Owen
Index: packages/debian-installer-utils/fetch-url-methods/http
--- packages/debian-installer-utils/fetch-url-methods/http	(revision 54394)
+++ packages/debian-installer-utils/fetch-url-methods/http	(working copy)
@@ -3,16 +3,29 @@
+	if [ "$proto" = "http" ] ; then 
 	wget404() {
 	# see README.wget404 in the debian-installer-utils udeb source for more info about this
 		local RETVAL=$( {
 			echo 1
 			wget "$@" 2>&1 >&3 && echo %OK%
 			echo %EOF%
-			} | ( sed -ne '1{h;d};/server returned error 404/{p;s/.*/4/;h;d};/^%OK%$/{s/.*/0/;h;d};$!p;$x;$w /dev/fd/4' >&2 ) 4>&1
+			} | ( sed -ne '1{h;d};/server returned error: HTTP\/1\.[01] 404 /{p;s/.*/4/;h;d};/^%OK%$/{s/.*/0/;h;d};$!p;$x;$w /dev/fd/4' >&2 ) 4>&1
 		) 3>&1
 		return $RETVAL
+	elif [ "$proto" = "ftp" ] ; then
+	wget404() {
+	# see README.wget404 in the debian-installer-utils udeb source for more info about this
+		local RETVAL=$( {
+			echo 1
+			wget "$@" 2>&1 >&3 && echo %OK%
+			echo %EOF%
+			} | ( sed -ne '1{h;d};/bad response to RETR: 550 /{p;s/.*/4/;h;d};/^%OK%$/{s/.*/0/;h;d};$!p;$x;$w /dev/fd/4' >&2 ) 4>&1
+		) 3>&1
+		return $RETVAL
+	}
+	fi
 	# use the proxy for wgets (should speed things up)
 	if db_get mirror/$proto/proxy; then
Index: packages/debian-installer-utils/README.wget404
--- packages/debian-installer-utils/README.wget404	(revision 54394)
+++ packages/debian-installer-utils/README.wget404	(working copy)
@@ -11,6 +11,20 @@
 output does change, the sed will fail safe by returning 1 (i.e. general
 error) if no specific error is found.
+From etch to lenny busybox wget error output did change.
+For lenny busybox wget 404 output is for example:
+"server returned error: HTTP/1.1 404 Not Found"
+This comprises the static string "server returned error: " 
+followed by the server response which should follow rfc2616 section 6.1.
+Thus the output may say HTTP/1.0 instead of HTTP/1.1 and the string "Not Found"
+may also change. Thus the regular expression:
+  /server returned error: HTTP\/1\.[01] 404 /
+should catch all possible output for lenny.
+For the ftp method the error sring is different. The following regexp should work:
+ /bad response to RETR: 550 /
 Here is a copy of the function being documented (since it's bound to
 get out of sync with the one in the fetch-url-methods/http file, so you
 might as well see the one that's being documented as well ;-)
@@ -20,8 +34,8 @@
                 local RETVAL=$( {
                         echo 1
                         wget "$@" 2>&1 >&3 && echo %OK%
-                        echo %EOF%
-                        } | ( sed -ne '1{h;d};/server returned error 404/{p;s/.*/4/;h;d};/^%OK%$/{s/.*/0/;h;d};$!p;$x;$w /dev/fd/4' >&2 ) 4>&1
+                        echo %EOF% 
+                       } | ( sed -ne '1{h;d};/server returned error: HTTP\/1\.[01] 404 /{p;s/.*/4/;h;d};/^%OK%$/{s/.*/0/;h;d};$!p;$x;$w /dev/fd/4' >&2 ) 4>&1
                 ) 3>&1
                 return $RETVAL
@@ -35,7 +49,7 @@
   1{h;d}  --  take the first line (provided by the echo 1) and put it in sed's hold space
               this will provide a default return value of 1 unless something else happens
-  /server returned error 404/{p;s/.*/4/;h;d}
+  /server returned error: HTTP\/1\.[01] 404 /{p;s/.*/4/;h;d}
           If we see a 404 error, print it, then turn it into a "4" and stuff it in the 
           sed hold space, and finally, delete the "4"
           This is where our return value of 4 comes from
@@ -86,3 +100,4 @@
 STDOUT anyway -- Doh!
 Phil Hands -- 2008-02-29
+Alex Owen  -- 2008-07-16

--- End Message ---
--- Begin Message ---
Source: debian-installer-utils
Source-Version: 1.61

We believe that the bug you reported is fixed in the latest version of
debian-installer-utils, which is due to be installed in the Debian FTP archive:

  to pool/main/d/debian-installer-utils/debian-installer-utils_1.61.dsc
  to pool/main/d/debian-installer-utils/debian-installer-utils_1.61.tar.gz
  to pool/main/d/debian-installer-utils/di-utils-exit-installer_1.61_all.udeb
  to pool/main/d/debian-installer-utils/di-utils-mapdevfs_1.61_amd64.udeb
  to pool/main/d/debian-installer-utils/di-utils-reboot_1.61_all.udeb
  to pool/main/d/debian-installer-utils/di-utils-shell_1.61_all.udeb
  to pool/main/d/debian-installer-utils/di-utils-terminfo_1.61_all.udeb
  to pool/main/d/debian-installer-utils/di-utils_1.61_amd64.udeb

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

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 491098@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Frans Pop <fjp@debian.org> (supplier of updated debian-installer-utils 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 ftpmaster@debian.org)

Hash: SHA1

Format: 1.8
Date: Wed, 16 Jul 2008 20:06:49 +0200
Source: debian-installer-utils
Binary: di-utils-shell di-utils-reboot di-utils-exit-installer di-utils di-utils-mapdevfs di-utils-terminfo
Architecture: source all amd64
Version: 1.61
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Frans Pop <fjp@debian.org>
 di-utils   - Miscellaneous utilities for the debian installer (udeb)
 di-utils-exit-installer - Exit installer (udeb)
 di-utils-mapdevfs - mapdevfs utility for the debian installer (udeb)
 di-utils-reboot - Reboot (udeb)
 di-utils-shell - Execute a shell (udeb)
 di-utils-terminfo - Terminfo entries needed by newt/slang in debian installer (udeb)
Closes: 491098
 debian-installer-utils (1.61) unstable; urgency=low
   * update-dev: remove obsolete fallbacks to udevtrigger and udevsettle.
   * Apply patch from Alex Owen to update wget error checks to current busybox
     wget output and similar checking for FTP. Closes: #491098.
   [ Updated translations ]
   * Portuguese (Brazil) (pt_BR.po) by Felipe Augusto van de Wiel (faw)
 0adc9c25de8b6199f88b6e6cf09773e30a511782 1172 debian-installer-utils_1.61.dsc
 df83663aebf9c9f120d99639c5dcfed4e1190b9d 73477 debian-installer-utils_1.61.tar.gz
 bf5534935a30b239bca365597c7c89cae9532755 17880 di-utils-shell_1.61_all.udeb
 5db681117966848a71296f5aa9e1894687432d28 8100 di-utils-reboot_1.61_all.udeb
 5322d0f5350b38ea9e4fd5ebe9c2f419d9c14cd8 2838 di-utils-exit-installer_1.61_all.udeb
 a51609ea6ec511c7939e47cb8cbfd299680aac6c 2426 di-utils-terminfo_1.61_all.udeb
 9c474a0f5f091da968f9b7a0629f0d9d208a3dd3 11426 di-utils_1.61_amd64.udeb
 4612b11e7615ccfac22f5215ede41966e45a2249 2412 di-utils-mapdevfs_1.61_amd64.udeb
 64b38bb7161bd55a8814495a7aba7d4b17e56f34edb24ff542e4dda8f5e3df81 1172 debian-installer-utils_1.61.dsc
 80ac403436883ac59746771de210d859045f2019bdb84b81d46004b2bcc82807 73477 debian-installer-utils_1.61.tar.gz
 faf88d2c9ecb0eed6a887e37a05c195d5ec970dd88026108cf29491793428979 17880 di-utils-shell_1.61_all.udeb
 68f4277cc6fe8d7c1caa298e7f53c2e65d2e0667ad1d8567c82e999c9a7b707c 8100 di-utils-reboot_1.61_all.udeb
 0befbf30fad4c81fdd8633eef619d73954185edfbbb254254cda437b141ac1ac 2838 di-utils-exit-installer_1.61_all.udeb
 85b5fa9c9eb826c10910dee7b90117cd695ce9a58cb17533855d1837c4081287 2426 di-utils-terminfo_1.61_all.udeb
 a0df2bbd00b70c616c9dd6721a2ca9106d8cf3538833802b54ad31459edd7215 11426 di-utils_1.61_amd64.udeb
 7c0737e2affaa879b111c91612ef919e811a2e8ae221191cfc882da751de357a 2412 di-utils-mapdevfs_1.61_amd64.udeb
 f07005cf636d75e7af0b65b15d1f5c10 1172 debian-installer standard debian-installer-utils_1.61.dsc
 845e4a382c5b5eae9af074423ffbec11 73477 debian-installer standard debian-installer-utils_1.61.tar.gz
 839b418d7d78a6d3da89c27084984595 17880 debian-installer standard di-utils-shell_1.61_all.udeb
 bc3c5e97567349172e9367a5baaf2b38 8100 debian-installer standard di-utils-reboot_1.61_all.udeb
 76fffb4b823fb9d8700df2f5e314bc59 2838 debian-installer extra di-utils-exit-installer_1.61_all.udeb
 16a11a4ff44ef0b10836c2a5c792011f 2426 debian-installer standard di-utils-terminfo_1.61_all.udeb
 05e5d6f0fd36bd5cb5d1687415560172 11426 debian-installer standard di-utils_1.61_amd64.udeb
 56ec05bd47a9a7f5538e242c73190f4c 2412 debian-installer standard di-utils-mapdevfs_1.61_amd64.udeb
Package-Type: udeb

Version: GnuPG v1.4.9 (GNU/Linux)


--- End Message ---

Reply to: