ports/119710: [patch] net/netcat - nc command runs BSD nc instead of nc from the port
Jonathan Liu
Net147 at hotmail.com
Wed Jan 16 10:30:03 UTC 2008
>Number: 119710
>Category: ports
>Synopsis: [patch] net/netcat - nc command runs BSD nc instead of nc from the port
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Wed Jan 16 10:30:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Liu
>Release: 7.0-RC1
>Organization:
>Environment:
FreeBSD freebsd 7.0-RC1 FreeBSD 7.0-RC1 #0: Mon Dec 24 12:18:24 UTC 2007 root at logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
After installing net/netcat port, typing the nc command at a terminal calls the BSD nc instead of nc from the net/netcat port. This is because /usr/bin is included earlier in the PATH environment variable than /usr/local/bin.
I think it would be a good idea if we install nc and nc.1 as follows:
nc -> netcat
nc.1 -> netcat.1
Also the nc manpage would need to be updated accordingly, changing references of "nc" to "netcat".
>How-To-Repeat:
1. Install net/netcat port.
2. Enter nc command at a terminal.
>Fix:
Patch attached with submission follows:
--- net/netcat/Makefile.orig 2005-07-18 23:05:27.000000000 +1000
+++ net/netcat/Makefile 2008-01-16 20:41:41.000000000 +1100
@@ -30,9 +30,9 @@
TELNET "enable TELNET support" on \
GAPING "enable GAPING_SECURITY_HOLE support" on
-PLIST_FILES= bin/nc
+PLIST_FILES= bin/netcat
PORTDOCS= README
-MAN1= nc.1
+MAN1= netcat.1
.include <bsd.port.pre.mk>
@@ -51,8 +51,8 @@
MAKE_ENV= XFLAGS="$(XFLAGS)"
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/nc ${PREFIX}/bin
- ${INSTALL_MAN} ${FILESDIR}/nc.1 ${PREFIX}/man/man1
+ ${INSTALL_PROGRAM} ${WRKSRC}/nc ${PREFIX}/bin/${PORTNAME}
+ ${INSTALL_MAN} ${FILESDIR}/nc.1 ${PREFIX}/man/man1/${MAN1}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
--- net/netcat/files/nc.1.orig 2004-07-06 20:31:01.000000000 +1000
+++ net/netcat/files/nc.1 2008-01-16 20:40:53.000000000 +1100
@@ -1,11 +1,11 @@
-.TH NC 1
+.TH NETCAT 1
.SH NAME
-nc \- TCP/IP swiss army knife
+netcat \- TCP/IP swiss army knife
.SH SYNOPSIS
-.B nc
+.B netcat
.I "[-options] hostname port[s] [ports] ..."
.br
-.B nc
+.B netcat
.I "-l -p port [-options] [hostname] [port]"
.SH "DESCRIPTION"
.B netcat
@@ -15,11 +15,11 @@
other programs and scripts. At the same time, it is a feature-rich
network debugging and exploration tool, since it can create almost any
kind of connection you would need and has several interesting built-in
-capabilities. Netcat, or "nc" as the actual program is named, should
+capabilities. Netcat, or "netcat" as the actual program is named, should
have been supplied long ago as another one of those cryptic but
standard Unix tools.
.P
-In the simplest usage, "nc host port" creates a TCP connection to the
+In the simplest usage, "netcat host port" creates a TCP connection to the
given port on the given target host. Your standard input is then sent
to the host, and anything that comes back across the connection is
sent to your standard output. This continues indefinitely, until the
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list