rpms/net-tools/devel net-tools-1.60-hostname-short.patch, NONE, 1.1 net-tools-1.60-hostname_man.patch, 1.2, 1.3 net-tools-1.60-man-RHEL-bugs.patch, 1.1, 1.2 net-tools.spec, 1.102, 1.103
Jiří Popelka
jpopelka at fedoraproject.org
Thu Oct 29 11:26:54 UTC 2009
- Previous message (by thread): rpms/usbmuxd/devel .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 usbmuxd.spec, 1.2, 1.3
- Next message (by thread): rpms/qemu/devel qemu-properly-save-kvm-system-time-registers.patch, NONE, 1.1 qemu.spec, 1.144, 1.145
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jpopelka
Update of /cvs/pkgs/rpms/net-tools/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20734
Modified Files:
net-tools-1.60-hostname_man.patch
net-tools-1.60-man-RHEL-bugs.patch net-tools.spec
Added Files:
net-tools-1.60-hostname-short.patch
Log Message:
* Thu Oct 29 2009 Jiri Popelka <jpopelka at redhat.com> - 1.60-97
- Make "hostname -s" display host name cut at the first dot (no
matter if the host name resolves or not) (bug #531702)
net-tools-1.60-hostname-short.patch:
hostname.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- NEW FILE net-tools-1.60-hostname-short.patch ---
diff -up net-tools-1.60/hostname.c.hostname-short net-tools-1.60/hostname.c
--- net-tools-1.60/hostname.c.hostname-short 2009-09-30 17:44:21.000000000 +0200
+++ net-tools-1.60/hostname.c 2009-09-08 11:55:03.000000000 +0200
@@ -176,11 +176,6 @@ static void showhname(char *hname, int c
case 'f':
printf("%s\n", hp->h_name);
break;
- case 's':
- if (p != NULL)
- *p = '\0';
- printf("%s\n", hp->h_name);
- break;
default:
;
}
@@ -270,6 +265,7 @@ int main(int argc, char **argv)
char myname[MAXHOSTNAMELEN + 1] =
{0};
char *file = NULL;
+ char *p;
static const struct option long_options[] =
{
@@ -370,7 +366,13 @@ int main(int argc, char **argv)
if (!type)
printf("%s\n", myname);
else
- showhname(myname, type);
+ if (type == 's') {
+ if (p = strchr(myname, '.'))
+ *p = '\0';
+ printf("%s\n", myname);
+ }
+ else
+ showhname(myname, type);
break;
case 3:
if (file) {
net-tools-1.60-hostname_man.patch:
hostname.1 | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
Index: net-tools-1.60-hostname_man.patch
===================================================================
RCS file: /cvs/pkgs/rpms/net-tools/devel/net-tools-1.60-hostname_man.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- net-tools-1.60-hostname_man.patch 2 Jan 2006 10:00:42 -0000 1.2
+++ net-tools-1.60-hostname_man.patch 29 Oct 2009 11:26:54 -0000 1.3
@@ -1,14 +1,14 @@
--- net-tools-1.60/man/en_US/hostname.1.gethostbyname 2005-10-14 11:33:41.000000000 +0200
+++ net-tools-1.60/man/en_US/hostname.1 2005-10-15 11:46:14.646697600 +0200
-@@ -99,6 +99,32 @@
+@@ -99,6 +99,33 @@
complete FQDN of the system is returned with
.BR "hostname \-\-fqdn" .
+.LP
+The function
+.BR gethostname(2)
-+is used to get the hostname. Only when the
-+.BR "hostname \-s"
++is used to get the hostname. When the
++.BR "hostname \-a, \-d, \-f or \-i"
+is called will
+.BR gethostbyname(3)
+be called. The difference in
@@ -25,7 +25,8 @@
+.IR /etc/sysconfig/network
+or
+.IR /etc/hosts
-+. To add another dimension to this,
++
++To add another dimension to this,
+the
+.B hostname
+is also set when the network interface is brought up.
net-tools-1.60-man-RHEL-bugs.patch:
arp.8 | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
Index: net-tools-1.60-man-RHEL-bugs.patch
===================================================================
RCS file: /cvs/pkgs/rpms/net-tools/devel/net-tools-1.60-man-RHEL-bugs.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- net-tools-1.60-man-RHEL-bugs.patch 30 Sep 2009 13:23:57 -0000 1.1
+++ net-tools-1.60-man-RHEL-bugs.patch 29 Oct 2009 11:26:54 -0000 1.2
@@ -16,38 +16,3 @@ diff -up net-tools-1.60/man/de_DE/arp.8.
.br
.B ANMERKUNG:
Ab der Kernelversion 2.2.0 ist es nicht mehr m\(:oglich ARP-Eintr\(:age f\(:ur
-diff -up net-tools-1.60/man/en_US/hostname.1.man-RHEL-bugs net-tools-1.60/man/en_US/hostname.1
---- net-tools-1.60/man/en_US/hostname.1.man-RHEL-bugs 2009-09-09 15:52:27.000000000 +0200
-+++ net-tools-1.60/man/en_US/hostname.1 2009-09-09 15:52:27.000000000 +0200
-@@ -100,11 +100,11 @@ complete FQDN of the system is returned
- .LP
- The function
- .BR gethostname(2)
--is used to get the hostname. Only when the
--.BR "hostname \-s"
--is called will
--.BR gethostbyname(3)
--be called. The difference in
-+is used to get the hostname.
-+When \fBhostname\fR
-+is called with \fB-s\fR, \fB-a\fR, \fB-i\fR, \fB-f\fR or \fB-d\fR
-+the \fBgethostbyname(3)\fR will be called.
-+The difference in
- .BR gethostname(2)
- and
- .BR gethostbyname(3)
-@@ -117,11 +117,9 @@ and
- to decide whether to read information in
- .IR /etc/sysconfig/network
- or
--.IR /etc/hosts
--. To add another dimension to this,
--the
--.B hostname
--is also set when the network interface is brought up.
-+.IR /etc/hosts .
-+If \fBgethostbyname(3)\fR cannot resolve host name,
-+\fIUnknown host\fR warning is returned.
-
- .SS "SET NAME"
- When called with one argument or with the
Index: net-tools.spec
===================================================================
RCS file: /cvs/pkgs/rpms/net-tools/devel/net-tools.spec,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -p -r1.102 -r1.103
--- net-tools.spec 30 Sep 2009 13:23:57 -0000 1.102
+++ net-tools.spec 29 Oct 2009 11:26:54 -0000 1.103
@@ -1,7 +1,7 @@
Summary: Basic networking tools
Name: net-tools
Version: 1.60
-Release: 96%{?dist}
+Release: 97%{?dist}
License: GPL+
Group: System Environment/Base
URL: http://net-tools.berlios.de/
@@ -97,7 +97,6 @@ Patch76: net-tools-1.60-ib-warning.patch
# notes in man pages, saying that these tools are obsolete
Patch77: net-tools-1.60-man-obsolete.patch
-# Bug 319981 hostname -s gives hostname: Unknown host when the FQDN does not resolve
# Bug 322901 Sens negating error in man page translation (arp)
Patch78: net-tools-1.60-man-RHEL-bugs.patch
@@ -112,6 +111,9 @@ Patch80: net-tools-1.60-makefile-berlios
# slattach: use fchown() rather than chown() to avoid race between creation and permission changing
Patch81: net-tools-1.60-slattach-fchown.patch
+# Bug 531702: make "hostname -s" display host name cut at the first dot (no matter if the host name resolves or not)
+Patch82: net-tools-1.60-hostname-short.patch
+
BuildRequires: gettext, libselinux
BuildRequires: libselinux-devel
@@ -196,6 +198,7 @@ Most of them are obsolete. For replaceme
%patch79 -p1 -b .masqinfo-raw-ip
%patch80 -p1 -b .makefile-berlios
%patch81 -p1 -b .slattach-fchown
+%patch82 -p1 -b .hostname-short
cp %SOURCE1 ./config.h
cp %SOURCE2 ./config.make
@@ -283,6 +286,9 @@ rm -rf %{buildroot}
%config(noreplace) %{_sysconfdir}/ethers
%changelog
+* Thu Oct 29 2009 Jiri Popelka <jpopelka at redhat.com> - 1.60-97
+- Make "hostname -s" display host name cut at the first dot (no
+ matter if the host name resolves or not) (bug #531702)
* Tue Sep 30 2009 Jiri Popelka <jpopelka at redhat.com> - 1.60-96
- netplug moved to separate package
- Previous message (by thread): rpms/usbmuxd/devel .cvsignore, 1.2, 1.3 sources, 1.2, 1.3 usbmuxd.spec, 1.2, 1.3
- Next message (by thread): rpms/qemu/devel qemu-properly-save-kvm-system-time-registers.patch, NONE, 1.1 qemu.spec, 1.144, 1.145
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list