NetBSD Problem Report #17323
Received: (qmail 24167 invoked by uid 605); 19 Jun 2002 12:02:05 -0000
Message-Id: <200206191202.g5JC21319879@bandsept.script.jussieu.fr>
Date: Wed, 19 Jun 2002 14:02:01 +0200 (CEST)
From: Stoned Elipot <seb@script.jussieu.fr>
Sender: gnats-bugs-owner@netbsd.org
Reply-To: seb@script.jussieu.fr
To: gnats-bugs@gnats.netbsd.org
Subject: pkg_add uses hardcoded '/usr/bin/ftp' command
X-Send-Pr-Version: 3.95
>Number: 17323
>Category: bin
>Synopsis: pkg_add uses hardcoded '/usr/bin/ftp' command
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: agc
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Jun 19 12:03:00 +0000 2002
>Closed-Date: Fri Jun 21 14:50:40 +0000 2002
>Last-Modified: Fri Jun 21 14:50:40 +0000 2002
>Originator: Stoned Elipot
>Release: -current sources used under Solaris 8
>Organization:
SCRIPT, Paris VII University, France
>Environment:
System: SunOS voyager 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-60
>Description:
pkg_add (usr.sbin/pkg_install/lib/ftpio.c in fact) uses hardcoded '/usr/bin/ftp'
for binary packages retrieval but it expects it to be lukemftp.
>How-To-Repeat:
Install zoularis and try to do pkg_add SOMEURLTOABINARYPKG...
>Fix:
The following patches add FTP_CMD and FTP_FULLPATHNAME support in the spirit
of the pre-existing TAR_CMD and TAR_FULLPATHNAME.
Under Solaris those are set from Makefile.inc to 'ftp' and
'${ZOULARISBASE}/bin/${FTP_CMD}'. Default values are set in lib/lib.h.
While here LOCALBASE in Makefile.inc is set to '/usr/pkg' which is now
the default for Solaris (see pkgsrc/mk/defs.SunOS.mk).
Index: Makefile.inc
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/Makefile.inc,v
retrieving revision 1.17
diff -u -r1.17 Makefile.inc
--- Makefile.inc 2002/06/10 09:14:26 1.17
+++ Makefile.inc 2002/06/19 10:19:35
@@ -22,11 +22,14 @@
CHGRP?= /usr/bin/chgrp
WARNS=2
.elif ${OPSYS} == "SunOS"
-LOCALBASE?= /usr/local
+LOCALBASE?= /usr/pkg
TAR_CMD?= tar
+FTP_CMD?= ftp
ZOULARISBASE?= ${LOCALBASE}/bsd
TAR_FULLPATHNAME?= ${ZOULARISBASE}/bin/${TAR_CMD}
+FTP_FULLPATHNAME?= ${ZOULARISBASE}/bin/${FTP_CMD}
CPPFLAGS+=-DTAR_CMD='"${TAR_CMD}"' -DTAR_FULLPATHNAME='"${TAR_FULLPATHNAME}"'
+CPPFLAGS+=-DFTP_CMD='"${FTP_CMD}"' -DFTP_FULLPATHNAME='"${FTP_FULLPATHNAME}"'
BINDIR=${ZOULARISBASE}/bin
CHMOD?= /usr/bin/chmod
CHOWN?= /usr/bin/chown
cvs server: Diffing add
cvs server: Diffing admin
cvs server: Diffing create
cvs server: Diffing delete
cvs server: Diffing info
cvs server: Diffing lib
Index: lib/ftpio.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/lib/ftpio.c,v
retrieving revision 1.37
diff -u -r1.37 ftpio.c
--- ftpio.c 2002/06/10 09:14:28 1.37
+++ ftpio.c 2002/06/19 10:19:36
@@ -297,7 +297,7 @@
if (Verbose)
fprintf(stderr, "[1mftp -detv %s[0m\n", base);
- rc1 = execl("/usr/bin/ftp", "ftp", "-detv", base, NULL);
+ rc1 = execl(FTP_FULLPATHNAME, FTP_CMD, "-detv", base, NULL);
warn("setupCoproc: execl() failed");
exit(1);
break;
Index: lib/lib.h
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/lib/lib.h,v
retrieving revision 1.41
diff -u -r1.41 lib.h
--- lib.h 2002/06/10 09:14:28 1.41
+++ lib.h 2002/06/19 10:19:37
@@ -66,6 +66,16 @@
#define TAR_FULLPATHNAME "/usr/bin/tar"
#endif
+/* Define ftp as a string, in case the ftp client is called something else */
+#ifndef FTP_CMD
+#define FTP_CMD "ftp"
+#endif
+
+/* Full path name of FTP_CMD */
+#ifndef FTP_FULLPATHNAME
+#define FTP_FULLPATHNAME "/usr/bin/ftp"
+#endif
+
/* Where we put logging information by default, else ${PKG_DBDIR} if set */
#ifndef DEF_LOG_DIR
#define DEF_LOG_DIR "/var/db/pkg"
>Release-Note:
>Audit-Trail:
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
To: Stoned Elipot <seb@script.jussieu.fr>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: bin/17323: pkg_add uses hardcoded '/usr/bin/ftp' command
Date: Wed, 19 Jun 2002 17:41:31 +0200 (MEST)
On Wed, 19 Jun 2002, Stoned Elipot wrote:
> >Synopsis: pkg_add uses hardcoded '/usr/bin/ftp' command
Looks fine, please commit.
While there, can you sync the netbsd-1-5 branch with the latest pkg_*
tools (requesting pullups for everything) please?
- Hubert
--
Want to get a clue on IPv6 but don't know where to start? Try this:
* Basics -> http://www.onlamp.com/pub/a/onlamp/2001/05/24/ipv6_tutorial.html
* Setup -> http://www.onlamp.com/pub/a/onlamp/2001/06/01/ipv6_tutorial.html
Of course with your #1 IPv6 ready operating system -> http://www.NetBSD.org/
State-Changed-From-To: open->closed
State-Changed-By: agc
State-Changed-When: Fri Jun 21 07:49:55 PDT 2002
State-Changed-Why:
agc applied the fixes in the PR. Thanks for providing them.
Responsible-Changed-From-To: bin-bug-people->agc
Responsible-Changed-By: agc
Responsible-Changed-When: Fri Jun 21 07:49:55 PDT 2002
Responsible-Changed-Why:
agc took responsibility for this one
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.