Bug 21449

Summary: [PATCH] Sysinstall, installing via HTTP proxy: Fix locating the release directory; fix server name resolving
Product: Base System Reporter: Philipp Mergenthaler <p>
Component: binAssignee: jkh
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Philipp Mergenthaler 2000-09-21 14:50:03 UTC
1) Installing via HTTP proxy ( mediaSetHTTP() ) relies on mediaSetFTP().
   It's broken right now because the method of looking up the correct
   directory on the FTP server was changed in version 1.39 of ftp.c.
   This has to be changed in http.c, too.  I only look for one path
   (pub/FreeBSD/releases/MACHINE), though.

2) The issue that the FTP server's name should be resolved by the proxy:
   The current fix unsets VAR_NAMESERVER before calling mediaSetFTP().
   But in a normal install, the network hasn't been set up at this
   time.  Therefore, mediaSetFTP() will call tcpDeviceSelect() which
   sets VAR_NAMESERVER. Therefore the unwanted lookup takes place.

Fix: 0) In media.c and sysinstall.h, change VAR_HTTP_PATH to VAR_HTTP_PROXY
   (it holds the proxy's name and port).  VAR_HTTP_PATH is now analogous
   to VAR_FTP_PATH.
1) In http.c, correct setting the path.  Check if it's actually found on
   the FTP server.
2) In media.c, introduce a variable to explicitly signal that the server's
   name shouldn't be resolved.

How-To-Repeat: 
1) Try to install via an HTTP proxy.
2) Select "HTTP proxy" as installation medium.  _Don't_ skip over the
   network setup, do it (again).  Note the "Looking up host" message.
Comment 1 Philipp Mergenthaler 2000-09-22 11:03:24 UTC
After the patch in bin/21449, apply this one to change the magic
release name "none" to "any", analogically to
http://www.freebsd.org/cgi/cvsweb.cgi/src/release/sysinstall/ftp.c#rev1.41



--- http.c	Fri Sep 22 11:45:56 2000
+++ http.c.new	Fri Sep 22 11:45:32 2000
@@ -50,3 +50,3 @@
     }
-    /* If the release is specified as "__RELEASE" or "any", then just
+    /* If the release is specified as "__RELEASE" or "none", then just
      * assume that the path the user gave is ok.
@@ -57,3 +57,3 @@
     */
-    if (strcmp(rel, "__RELEASE") && strcmp(rel, "any"))  {
+    if (strcmp(rel, "__RELEASE") && strcmp(rel, "none"))  {
     	sprintf(req, "%s/pub/FreeBSD/releases/"MACHINE"/%s",
Comment 2 un1i 2000-09-22 17:59:31 UTC
Oops, the last patch is reversed. Sorry.
Comment 3 Johan Karlsson freebsd_committer freebsd_triage 2000-09-24 20:59:33 UTC
Responsible Changed
From-To: freebsd-bugs->murray

Over to sysinstall maintainer.
Comment 4 jkh freebsd_committer freebsd_triage 2000-09-25 21:18:37 UTC
State Changed
From-To: open->closed

Applied to -current and -stable and closed, thanks! 


Comment 5 jkh freebsd_committer freebsd_triage 2000-09-25 21:18:37 UTC
Responsible Changed
From-To: murray->jkh

I fixed it. :)