Subject: install/10942: can't install via ftp server
To: None <gnats-bugs@gnats.netbsd.org>
From: None <carvalho@employees.org>
List: netbsd-bugs
Date: 09/03/2000 19:11:13
>Number:         10942
>Category:       install
>Synopsis:       Cannot successfully specify remote directory for ftp install
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 03 19:12:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Charles Carvalho <carvalho@employees.org>
>Release:        NetBSD-1.5_ALPHA2
>Organization:
>Environment:

System: NetBSD carvalho-classic 1.5_ALPHA2 NetBSD 1.5_ALPHA2 (GENERIC) #4: Wed Aug 30 04:29:24 BST 2000 root@dora.int.purplei.com:/files/transient/netbsd/src/sys/arch/sparc/compile/GENERIC sparc


>Description:
When choosing to install from a ftp server, the user is required
to enter the name of a directory containing one or more sets to be
installed.  The question is repeated until the specified directory
is determined to contain at least one of the target sets; this test
is done by obtaining a listing of the target directory via ftp's
"ls" command and matching each line against a set of valid set
names.  However, the behavior of ftp has changed between 1.4.2 and
1.5_ALPHA2; the "ls" command used to send a NLST command and now
sends a LIST command.  The response to a LIST command includes
additional information that prevents the set names from being
matched (possibly as a result of the fix for pr#8937), so it is
not possible to proceed past this question.

>How-To-Repeat:
Install from the miniroot provided in the sparc 1.5_ALPHA2 snapshot;
when asked for the install method, choose "ftp" and attempt to
specify a valid source directory.  "?" will provide a full listing
of the directory (ls -l) showing that the sets exist in the specified
directory, but the request for a remote directory will be repeated;
the only way out is to abort the install with ^C.

>Fix:
/install.sub in the miniroot needs to issue a "nlist" command
instead of a "ls" command to get only the names of the files in
the target directory; with the following change, I was able to
successfully install via ftp.  (In 1.4.2, "dir" and "ls" were
distinct commands, and "nlist" was an alias for "ls"; in 1.5_ALPHA2,
"ls" is documented as an alias for "dir", but "nlist" is documented
as an alias for "ls", which is no longer true)

carvalho-home-ss20# diff -cw /export/sparc/orig/install.sub /export/sparc/root/install.sub
*** /export/sparc/orig/install.sub      Wed Aug 30 04:39:37 2000
--- /export/sparc/root/install.sub      Sun Sep  3 18:28:51 2000
***************
*** 705,711 ****
                # Make a copy of this script that lists the directory
                # contents, and use that to determine the files to get.
                cat /tmp/ftp-script.sh  >  /tmp/ftp-dir.sh
!               echo "ls"               >> /tmp/ftp-dir.sh
                echo "quit"             >> /tmp/ftp-dir.sh
                echo "__end_commands"   >> /tmp/ftp-dir.sh

--- 705,711 ----
                # Make a copy of this script that lists the directory
                # contents, and use that to determine the files to get.
                cat /tmp/ftp-script.sh  >  /tmp/ftp-dir.sh
!               echo "nlist"            >> /tmp/ftp-dir.sh
                echo "quit"             >> /tmp/ftp-dir.sh
                echo "__end_commands"   >> /tmp/ftp-dir.sh

carvalho-home-ss20#

>Release-Note:
>Audit-Trail:
>Unformatted: