OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 19-Dec-2006 09:00:32
Branch: HEAD Handle: 2006121908003100
Modified files:
openpkg-src/msntp msntp.patch msntp.spec
Log:
apply name resolving patch from Debian and fix PID file and STATE file
handling
Summary:
Revision Changes Path
1.2 +43 -3 openpkg-src/msntp/msntp.patch
1.25 +13 -5 openpkg-src/msntp/msntp.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/msntp/msntp.patch
============================================================================
$ cvs diff -u -r1.1 -r1.2 msntp.patch
--- openpkg-src/msntp/msntp.patch 28 Aug 2003 16:13:24 -0000 1.1
+++ openpkg-src/msntp/msntp.patch 19 Dec 2006 08:00:31 -0000 1.2
@@ -1,6 +1,46 @@
-diff -Naur msntp-1.6.orig/unix.c msntp-1.6/unix.c
---- msntp-1.6.orig/unix.c 2003-08-28 17:48:15.000000000 +0200
-+++ msntp-1.6/unix.c 2003-08-28 17:49:46.000000000 +0200
+Index: internet.c
+--- internet.c.orig 2000-09-30 19:42:51 +0200
++++ internet.c 2006-12-19 08:51:18 +0100
+@@ -80,22 +80,19 @@
+ if (! isdigit(hostname[0])) {
+ errno = 0;
+ host = gethostbyname(hostname);
++ if (host == NULL) fatal(1,"unable to locate IP
address/number",NULL);
++ if (host->h_length != sizeof(struct in_addr))
++ fatal(0,"the address does not seem to be an Internet
one",NULL);
++ *address = *((struct in_addr **)host->h_addr_list)[0];
+ } else {
+- if ((ipaddr = inet_addr(hostname)) == (unsigned long)-1)
++ if(!inet_aton(hostname, address))
+ fatal(0,"invalid IP number %s",hostname);
+- network_to_address(address,ipaddr);
+ errno = 0;
+- host = gethostbyaddr((void *)address,sizeof(struct in_addr),
+- AF_INET);
+ }
+
+ /* Now clear the timer and check the result. */
+
+ clear_alarm();
+- if (host == NULL) fatal(1,"unable to locate IP
address/number",NULL);
+- if (host->h_length != sizeof(struct in_addr))
+- fatal(0,"the address does not seem to be an Internet one",NULL);
+- *address = *((struct in_addr **)host->h_addr_list)[0];
+ if (memcmp(address,nowhere,sizeof(struct in_addr)) == 0 ||
+ memcmp(address,anywhere,sizeof(struct in_addr)) == 0 ||
+ memcmp(address,everywhere,sizeof(struct in_addr)) == 0)
+@@ -103,7 +100,7 @@
+ if (verbose)
+ fprintf(stderr,
+ "%s: using NTP server %s (%s)\n",
+- argv0,host->h_name,inet_ntoa(*address));
++ argv0,hostname,inet_ntoa(*address));
+ }
+
+ /* Find out the port number (usually from /etc/services), and leave it in
+Index: unix.c
+--- unix.c.orig 2000-10-26 11:57:10 +0200
++++ unix.c 2006-12-19 08:51:18 +0100
@@ -81,5 +81,7 @@
/* Log a message, crudely. This is used in only one place, but could
be used more widely. */
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/msntp/msntp.spec
============================================================================
$ cvs diff -u -r1.24 -r1.25 msntp.spec
--- openpkg-src/msntp/msntp.spec 11 Nov 2006 13:20:12 -0000 1.24
+++ openpkg-src/msntp/msntp.spec 19 Dec 2006 08:00:31 -0000 1.25
@@ -33,7 +33,7 @@
Group: Network
License: OSS-style
Version: 1.6
-Release: 20061111
+Release: 20061219
# package options
%option with_fsl yes
@@ -58,11 +58,11 @@
%description
MSNTP is a small client and server for the Simple Network Time
- Protocol (SNTP, RFC2030).
+ Protocol (SNTP, RFC 2030).
%track
prog msntp = {
- comment = "rse: website seems to have been disappeared"
+ comment = "rse: website has been disappeared"
version = %{version}
url = http://www.hpcf.cam.ac.uk/export/
regex = msntp-(__VER__)\.tar\.gz
@@ -70,9 +70,16 @@
%prep
%setup -q
- %patch -p1
+ %patch -p0
%build
+ # configure program
+ %{l_shtool} subst \
+ -e 's;/etc/msntp\.pid;%{l_prefix}/var/msntp/msntp.pid;g' \
+ -e 's;/etc/msntp\.state;%{l_prefix}/var/msntp/msntp.state;g' \
+ header.h
+
+ # build program
CC="%{l_cc}"
CFLAGS="%{l_cflags -O}"
LDFLAGS="%{l_fsl_ldflags}"
@@ -87,6 +94,7 @@
LIBS="$LIBS"
%install
+ # create installation hierarchy
rm -rf $RPM_BUILD_ROOT
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/bin \
@@ -140,6 +148,6 @@
# before erase, stop service and remove log files
[ $1 -eq 0 ] || exit 0
%{l_rc} msntp stop 2>/dev/null
- rm -f $RPM_INSTALL_PREFIX/var/msntp/*.log* >/dev/null 2>&1 || true
+ rm -f $RPM_INSTALL_PREFIX/var/msntp/* >/dev/null 2>&1 || true
exit 0
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]