rpms/hostname/devel hostname-rh.patch, NONE, 1.1 .cvsignore, 1.2, 1.3 hostname.spec, 1.1, 1.2 sources, 1.2, 1.3 hostname-initial.patch, 1.1, NONE
Jiří Popelka
jpopelka at fedoraproject.org
Tue Feb 2 10:47:27 UTC 2010
Author: jpopelka
Update of /cvs/pkgs/rpms/hostname/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31674
Modified Files:
.cvsignore hostname.spec sources
Added Files:
hostname-rh.patch
Removed Files:
hostname-initial.patch
Log Message:
* Tue Feb 02 2010 Jiri Popelka <jpopelka at redhat.com> - 3.03-1
- Upgrade to 3.03
hostname-rh.patch:
Makefile | 24 +++++++++++++-----------
hostname.1 | 38 ++++++++++++++++++++++++++++++++------
2 files changed, 45 insertions(+), 17 deletions(-)
--- NEW FILE hostname-rh.patch ---
diff -up hostname/hostname.1.rh hostname/hostname.1
--- hostname/hostname.1.rh 2010-01-15 13:05:22.000000000 +0100
+++ hostname/hostname.1 2010-02-01 21:52:35.000000000 +0100
@@ -98,6 +98,33 @@ complete FQDN of the system is returned
.B "THE FQDN"
below).
+.LP
+The function
+.BR gethostname(2)
+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
+.BR gethostname(2)
+and
+.BR gethostbyname(3)
+is that
+.BR gethostbyname(3)
+is network aware, so it consults
+.IR /etc/nsswitch.conf
+and
+.IR /etc/host.conf
+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.
+
.SS "SET NAME"
When called with one argument or with the
.B \-\-file
@@ -113,7 +140,7 @@ and
use
.BR setdomainname (2).
Note, that this is effective only until the next reboot.
-Edit /etc/hostname for permanent change.
+After reboot original names from \fI/etc/hosts\fR are used again.
.LP
Note, that only the super-user can change the names.
.LP
@@ -124,10 +151,10 @@ command (see
below).
.LP
The host name is usually set once at system startup in
-.I /etc/init.d/hostname.sh
+.I /etc/rc.d/rc.sysinit
(normally by reading the contents of a file which contains
the host name, e.g.
-.IR /etc/hostname ).
+.IR /etc/sysconfig/network ).
.SS THE FQDN
You can't change the FQDN (as returned by
@@ -227,7 +254,7 @@ Display the short host name. This is the
Print version information on standard output and exit successfully.
.TP
.I "\-v, \-\-verbose"
-Be verbose and tell what's going on.
+Verbose output was removed.
.TP
.I "\-y, \-\-yp, \-\-nis"
Display the NIS domain name. If a parameter is given (or
@@ -246,8 +273,7 @@ option in
.SH FILES
.B /etc/hosts
-.B /etc/hostname
-This file should only contain the hostname and not the full FQDN.
+.B /etc/sysconfig/network
.SH AUTHORS
Peter Tobias, <tobias at et-inf.fho-emden.de>
.br
diff -up hostname/Makefile.rh hostname/Makefile
--- hostname/Makefile.rh 2010-01-15 13:05:16.000000000 +0100
+++ hostname/Makefile 2010-02-01 21:47:25.000000000 +0100
@@ -7,26 +7,28 @@ OBJS=hostname.o
hostname: $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) -lnsl
- ln -fs hostname dnsdomainname
- ln -fs hostname domainname
- ln -fs hostname ypdomainname
- ln -fs hostname nisdomainname
install: hostname
install -d ${BASEDIR}/usr/share/man/man1
- install -o root -g root -m 0644 hostname.1 ${BASEDIR}/usr/share/man/man1
+ install -m 0644 hostname.1 ${BASEDIR}/usr/share/man/man1
ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/dnsdomainname.1
ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/domainname.1
ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/ypdomainname.1
ln -fs hostname.1 ${BASEDIR}/usr/share/man/man1/nisdomainname.1
- install -o root -g root -m 0644 hostname.1.fr ${BASEDIR}/usr/share/man/fr/man1/hostname.1
+ install -d ${BASEDIR}/usr/share/man/fr/man1
+ install -m 0644 hostname.1.fr ${BASEDIR}/usr/share/man/fr/man1/hostname.1
+ ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/dnsdomainname.1
+ ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/domainname.1
+ ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/ypdomainname.1
+ ln -fs hostname.1 ${BASEDIR}/usr/share/man/fr/man1/nisdomainname.1
+
install -d ${BASEDIR}/bin
- install -o root -g root -m 0755 hostname ${BASEDIR}/bin
- ln -f hostname ${BASEDIR}/bin/dnsdomainname
- ln -f hostname ${BASEDIR}/bin/domainname
- ln -f hostname ${BASEDIR}/bin/nisdomainname
- ln -f hostname ${BASEDIR}/bin/ypdomainname
+ install -m 0755 hostname ${BASEDIR}/bin
+ ln -fs hostname ${BASEDIR}/bin/dnsdomainname
+ ln -fs hostname ${BASEDIR}/bin/domainname
+ ln -fs hostname ${BASEDIR}/bin/nisdomainname
+ ln -fs hostname ${BASEDIR}/bin/ypdomainname
clean:
-rm -f $(OBJS) hostname dnsdomainname domainname nisdomainname ypdomainname
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/hostname/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- .cvsignore 8 Dec 2009 08:20:09 -0000 1.2
+++ .cvsignore 2 Feb 2010 10:47:27 -0000 1.3
@@ -1 +1 @@
-hostname_3.01.tar.gz
+hostname_3.03.tar.gz
Index: hostname.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hostname/devel/hostname.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- hostname.spec 8 Dec 2009 08:20:09 -0000 1.1
+++ hostname.spec 2 Feb 2010 10:47:27 -0000 1.2
@@ -1,6 +1,6 @@
Summary: Utility to set/show the host name or domain name
Name: hostname
-Version: 3.01
+Version: 3.03
Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Base
@@ -10,7 +10,7 @@ Source1: hostname.1.pt
Source2: hostname.1.de
# Initial changes
-Patch1: hostname-initial.patch
+Patch1: hostname-rh.patch
#net-tools < 1.60-100 includes hostname
Conflicts: net-tools < 1.60-100
@@ -21,7 +21,7 @@ DNS name, and to display or set its host
%prep
%setup -q -n hostname
-%patch1 -p1 -b .initial
+%patch1 -p1 -b .rh
#man pages conversion
#french
@@ -62,6 +62,8 @@ rm -rf %{buildroot}
%{_mandir}/de/man1/*
%changelog
+* Tue Feb 02 2010 Jiri Popelka <jpopelka at redhat.com> - 3.03-1
+- Upgrade to 3.03
* Tue Nov 10 2009 Jiri Popelka <jpopelka at redhat.com> - 3.01-1
- Initial package. Up to now hostname has been part of net-tools package.
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/hostname/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- sources 8 Dec 2009 08:20:09 -0000 1.2
+++ sources 2 Feb 2010 10:47:27 -0000 1.3
@@ -1 +1 @@
-866c4250583960bf730fb7a8815dbb03 hostname_3.01.tar.gz
+4f7532dfd23d72a4409f305553b27d47 hostname_3.03.tar.gz
--- hostname-initial.patch DELETED ---
More information about the scm-commits
mailing list