From root@gits.dyndns.org  Fri Dec 29 19:14:22 2000
Return-Path: <root@gits.dyndns.org>
Received: from balzac.cybercable.fr (balzac.cybercable.fr [212.198.0.198])
	by hub.freebsd.org (Postfix) with SMTP id 9193137B400
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 29 Dec 2000 19:14:21 -0800 (PST)
Received: (qmail 39239069 invoked from network); 30 Dec 2000 03:14:18 -0000
Received: from s011.dhcp212-229.cybercable.fr (HELO gits.dyndns.org) ([212.198.229.11]) (envelope-sender <root@gits.dyndns.org>)
          by balzac.cybercable.fr (qmail-ldap-1.03) with SMTP
          for <alex@hoeba.org>; 30 Dec 2000 03:14:18 -0000
Received: (from root@localhost)
	by gits.dyndns.org (8.11.1/8.11.1) id eBU3EEk62440;
	Sat, 30 Dec 2000 04:14:14 +0100 (CET)
	(envelope-from root)
Message-Id: <200012300314.eBU3EEk62440@gits.dyndns.org>
Date: Sat, 30 Dec 2000 04:14:14 +0100 (CET)
From: Cyrille Lefevre <clefevre@citeweb.net>
Sender: root@gits.dyndns.org
Reply-To: clefevre@citeweb.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: kbyanc@posi.net
Subject: Updated port - misc/upclient - 4.2.1.19
X-Send-Pr-Version: 3.2

>Number:         23948
>Category:       ports
>Synopsis:       Updated port - misc/upclient - 4.2.1.19
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 29 19:20:01 PST 2000
>Closed-Date:    Thu Jan 4 19:37:19 PST 2001
>Last-Modified:  Thu Jan 04 19:38:26 PST 2001
>Originator:     Cyrille Lefevre
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
ACME
>Environment:

FreeBSD gits 4.2-STABLE FreeBSD 4.2-STABLE #2: Wed Dec  6 17:17:38 CET 2000     root@gits:/disk2/4.x-stable/src/sys/compile/CUSTOM  i386

>Description:

	Major Uptime Client version number that just follows the
	Uptimes Protocol version number.

	upclient is installed set-gid kmem to allow it to read
	kernel infos to compute the idle time.

	Makefile
		mostly rewritten.

	pkg-comment
		Servers deleted.

	pkg-descr
		http://uptimes.atomicvoid.net/?p=what

	pkg-message
		updated.

	pkg-plist
		mostly rewritten.
		install upclient.conf.sample.
		doesn't overvrite existing upclient.conf.

	files/patch-aa (Makefile)
		CONFIGFILE patch changed.
		-lkvm added.

	files/patch-ab (upclient.conf)
		pidfile path changed.

	files/patch-options.[ch]
		handle SendIdleTime option.

	files/patch-stats-bsd.c
		mostly rewritten.
		idle time added (oh! don't remember from where ?
		vmstat, w, top, etc. really don't know... I made
		that some month ago in upclient 4.12).

	files/patch-upchk
		upclient and pidfile paths changed.

	files/upclient.sh
		startup script based on the apache one.
		doesn't start upclient if upclient.conf doesn't exist,
		is out of date (old version) or isn't configured.

>How-To-Repeat:

	n/a

>Fix:

diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/Makefile upclient/Makefile
--- upclient.old/Makefile	Tue Apr 18 07:14:45 2000
+++ upclient/Makefile	Sat Dec 30 03:03:02 2000
@@ -6,18 +6,27 @@
 #
 
 PORTNAME=	upclient
-PORTVERSION=	3.04
+PORTVERSION=	4.2.1.19
 CATEGORIES=	misc
-MASTER_SITES=	http://uptime.hexon.cx/download/
+MASTER_SITES=	ftp://ftp.uptimes.net/pub/uptimes/ \
+		http://www.uptimes.net/download/ \
+		http://uptimes.atomicvoid.net/
 
-MAINTAINER=	kbyanc@posi.net
-
-BROKEN=		Client is outdated and new client cannot be reasonably ported
+MAINTAINER=	clefevre@citeweb.net
 
 ALL_TARGET=	bsd
-INSTALL_TARGET=	bsd install CP=$(CP)
+BUILD_WRKSRC=	${WRKSRC}/src
+
+post-patch:
+	@${PERL} -pi.fbsd -e 's.!!PREFIX!!.${PREFIX}.g' ${WRKSRC}/scripts/upchk
+
+do-install:
+	@${INSTALL_SCRIPT} ${FILESDIR}/upclient.sh ${PREFIX}/etc/rc.d/upclient.sh
+	@${INSTALL_DATA} -m 600 ${WRKSRC}/upclient.conf ${PREFIX}/etc/upclient.conf.sample
+	@${INSTALL_SCRIPT} ${WRKSRC}/scripts/upchk ${PREFIX}/sbin/upchk
+	@${INSTALL_PROGRAM} -g kmem -m 2555 ${WRKSRC}/src/upclient ${PREFIX}/sbin/upclient
 
 post-install:
-	${CAT} ${PKGMESSAGE} | ${SED} 's:/usr/local:${PREFIX}:g'
+	@${CAT} ${PKGMESSAGE} | ${SED} 's:/usr/local:${PREFIX}:g'
 
 .include <bsd.port.mk>
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/distinfo upclient/distinfo
--- upclient.old/distinfo	Sat Aug 28 21:27:20 1999
+++ upclient/distinfo	Fri Dec 29 23:58:45 2000
@@ -1 +1 @@
-MD5 (upclient-3.04.tar.gz) = 5a67b17ef0ddbd44fa668c81d8de0547
+MD5 (upclient-4.2.1.19.tar.gz) = c832a7885de2a20e2427bddfacd09d37
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/files/patch-aa upclient/files/patch-aa
--- upclient.old/files/patch-aa	Sat Aug 28 21:27:20 1999
+++ upclient/files/patch-aa	Sat Dec 30 03:10:14 2000
@@ -1,30 +1,29 @@
---- Makefile.orig	Sat Apr 10 02:47:19 1999
-+++ Makefile	Fri Aug 20 14:51:05 1999
-@@ -1,7 +1,7 @@
- # Uptime Client Makefile
- 
+--- src/Makefile.orig	Mon Dec 18 14:44:48 2000
++++ src/Makefile	Sat Dec 30 02:44:49 2000
+@@ -8,7 +8,7 @@
+ ####
  # Location of config file (for example /etc/upclient.conf)
+ #
 -CONFIGFILE = upclient.conf
 +CONFIGFILE = $(PREFIX)/etc/upclient.conf
  
  
- ################
-@@ -29,10 +29,8 @@
- 		upclient
+ ####
+@@ -41,7 +41,7 @@
  
  bsd:
--	$(MAKE) CC=gcc \
+ 	$(MAKE) CC=gcc \
 -		LDFLAGS= \
--		OBJECTS= \
--		CFLAGS='-DPLAT_xxxBSD -DCONFIGFILE=\"$(CONFIGFILE)\"' \
-+	$(MAKE) OBJECTS= \
-+		CFLAGS='$(CFLAGS) -DPLAT_xxxBSD -DCONFIGFILE=\"$(CONFIGFILE)\"' \
++		LDFLAGS="-lkvm" \
+ 		OBJECTS='stats-bsd.c $(STDOPTS)' \
+ 		CFLAGS='-DPLATFORM_BSD -DCONFIGFILE=\"$(CONFIGFILE)\"' \
  		upclient
+@@ -88,7 +88,7 @@
+ 		CFLAGS='-DPLATFORM_WINNT -DCONFIGFILE=\"$(CONFIGFILE)\"' \
+ 		upclient
+ 
+-upclient: upclient.h
++upclient: upclient.h $(OBJECTS)
+ 	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) upclient.c -o $(BINNAME)
  
- solaris:
-@@ -88,3 +86,5 @@
- install:	prepared-for-install
- 	strip $(BINNAME)
- 	chmod 755 $(BINNAME)
-+	$(INSTALL) $(BINNAME) $(PREFIX)/bin
-+	$(CP) upclient.conf $(PREFIX)/etc
+ clean:
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/files/patch-ab upclient/files/patch-ab
--- upclient.old/files/patch-ab	Sat Aug 28 21:27:20 1999
+++ upclient/files/patch-ab	Sat Dec 30 00:51:43 2000
@@ -1,9 +1,11 @@
---- upclient.conf.orig	Fri Aug 20 11:22:32 1999
-+++ upclient.conf	Fri Aug 20 11:25:12 1999
-@@ -3,5 +3,5 @@
- HostID <HostID>
- Login <Loginname>
- Pass <Password>
--Interval 60
-+Interval 550
- UptimeServer uptime.hexon.cx
+--- upclient.conf.orig	Mon Dec 18 14:19:35 2000
++++ upclient.conf	Sat Dec 30 00:37:19 2000
+@@ -4,7 +4,7 @@
+ # upclient.conf
+ #
+ 
+-PidFile = /home/alex/.upclient.pid	# Location of pid file
++PidFile = /var/run/upclient.pid		# Location of pid file
+ 
+ AuthKey = <your_authkey>		# Your Authorization key
+ Interval = 120				# Transmit interval
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/files/patch-options.c upclient/files/patch-options.c
--- upclient.old/files/patch-options.c	Thu Jan  1 01:00:00 1970
+++ upclient/files/patch-options.c	Sat Dec 30 03:11:03 2000
@@ -0,0 +1,26 @@
+--- src/options.c.orig	Mon Dec 18 02:20:24 2000
++++ src/options.c	Sat Dec 30 02:48:01 2000
+@@ -23,11 +23,7 @@
+ int  cfg_proxyport				= 8080;
+ char cfg_proxyuser[PROXYUSER_MAXLEN+1]		= "";
+ char cfg_proxypass[PROXYPASS_MAXLEN+1]		= "";
+-#if defined(PLATFORM_BSD)
+-int  cfg_sendidle	= 0;
+-#else
+ int  cfg_sendidle	= 1;
+-#endif
+ #if defined(PLATFORM_UNIXWARE)
+ int  cfg_sendload	= 0;
+ #else
+@@ -99,11 +95,7 @@
+   else if(strcmp(key, "PidFile") == 0)
+     strcpy(cfg_pidfile, value);
+   else if(strcmp(key, "SendIdleTime") == 0)
+-#if defined(PLATFORM_BSD)
+-    ;
+-#else
+     cfg_sendidle = atol(value);
+-#endif
+   else if(strcmp(key, "SendLoadAvg") == 0)
+ #if defined(PLATFORM_UNIXWARE)
+     ;
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/files/patch-options.h upclient/files/patch-options.h
--- upclient.old/files/patch-options.h	Thu Jan  1 01:00:00 1970
+++ upclient/files/patch-options.h	Sat Dec 30 03:11:12 2000
@@ -0,0 +1,26 @@
+--- src/options.h.orig	Mon Dec 18 01:22:43 2000
++++ src/options.h	Sat Dec 30 02:49:11 2000
+@@ -33,19 +33,11 @@
+ extern int  cfg_proxyport;
+ extern char cfg_proxyuser[PROXYUSER_MAXLEN+1];
+ extern char cfg_proxypass[PROXYPASS_MAXLEN+1];
+-#if defined(PLATFORM_BSD)
+ extern int  cfg_sendidle;
+-#else
+-extern int  cfg_sendidle;
+-#endif
+-#if defined(PLATFORM_UNIXWARE)
+-extern cfg_sendload;
+-#else
+-extern cfg_sendload;
+-#endif
+-extern cfg_sendos;
+-extern cfg_sendoslevel;
+-extern cfg_sendcpu;
++extern int  cfg_sendload;
++extern int  cfg_sendos;
++extern int  cfg_sendoslevel;
++extern int  cfg_sendcpu;
+ 
+ /* External global variables: set to reflect config options */
+ extern int have_proxyserver;
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/files/patch-stats-bsd.c upclient/files/patch-stats-bsd.c
--- upclient.old/files/patch-stats-bsd.c	Thu Jan  1 01:00:00 1970
+++ upclient/files/patch-stats-bsd.c	Sat Dec 30 03:26:33 2000
@@ -0,0 +1,188 @@
+--- src/stats-bsd.c.orig	Mon Dec 18 14:32:19 2000
++++ src/stats-bsd.c	Sat Dec 30 03:26:15 2000
+@@ -12,57 +12,153 @@
+ /* System includes */
+ #include <stdio.h>
+ #include <errno.h>
++#include <fcntl.h>
++#include <limits.h>
++#include <kvm.h>
+ #include <syslog.h>
+ #include <sys/time.h>
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
++#include <sys/dkstat.h>
++#include <devstat.h>
+ #include <sys/utsname.h>
+ 
+ /**
+  * @desc	Get statistics
+  */
+ void getstats(unsigned long *puptime, double *pload, int *pidle, char *os, char *oslevel, char *cpu) {
+-  struct utsname uts;
+-  struct timeval boottime;
+-  time_t now;
+   size_t size;
+-  double loadavgs[2];
+-  int mib[2];
++  int mib [2];
++
++  {				/* ========== uptime ========== */
++    static struct timeval boottime;
++    static int initialized = 0;
++
++    if (!initialized) {
++      initialized = 1;
++
++      mib [0] = CTL_KERN;
++      mib [1] = KERN_BOOTTIME;
++
++      size = sizeof (boottime);
+ 
+-  /* Get uptime */
+-  time(&now);
+-  mib[0] = CTL_KERN;
+-  mib[1] = KERN_BOOTTIME;
+-  size = sizeof(boottime);
+-  if(sysctl(mib, 2, &boottime, &size, NULL, 0) != -1 && (boottime.tv_sec != 0)) {
+-    *puptime = now - boottime.tv_sec;
+-    *puptime /= 60;
+-  }
+-
+-  if(cfg_sendload) {
+-    /* Get load average */
+-    getloadavg(loadavgs, 3);
+-    /* Use the 3rd element (15 minute load average) */
+-    *pload = loadavgs[2];
++      if (sysctl (mib, 2, &boottime, &size, NULL, 0) == -1)
++	err (1, "sysctl: kern.boottime");
+   }
+ 
+-  if(cfg_sendos) {
+-    /* Get os info */
+-    uname(&uts);
++    if (boottime.tv_sec) {
++      time_t now;
++
++      time (&now);
++
++      *puptime = (now - boottime.tv_sec) / 60;
++    }
++  }
++
++  if (cfg_sendidle) {		/* ========== idle_time ========== */
++    static kvm_t *kp;
++    static struct nlist namelist [] = {
++#define X_CP_TIME       0
++      { "_cp_time" },
++      { NULL },
++    };
++    static int initialized = 0;
++
++    if (!initialized) {
++      char errbuf [_POSIX2_LINE_MAX];
++      initialized = 1;
++
++      setgid (getgid ());
++
++      kp = kvm_openfiles (NULL, NULL, NULL, O_RDONLY, errbuf);
++
++      if (!kp)
++	warn ("kvm_openfiles: %s", errbuf);
++      else if (kvm_nlist (kp, namelist) == -1)
++	warn ("kvm_nlist: %s", kvm_geterr (kp));
++  }
++
++    if (kp) {
++      long ctime [CPUSTATES];
++      static long stime [CPUSTATES];
++      static int first_time = 1;
++
++      if (first_time) {
++	first_time = 0;
++
++	if (kvm_read (kp, namelist [X_CP_TIME].n_value,
++		      stime, sizeof (stime)) == -1)
++	  warn ("kvm_read: %s", kvm_geterr (kp));
++	else
++	  sleep (1);		/* to avoid the initial 0 idle value */
+   }
+ 
+-  if(cfg_sendcpu) {
+-    /* Get CPU info */
+-    mib[0] = CTL_HW;
+-    mib[1] = HW_MODEL;
+-    size = CPU_SIZE;
+-    sysctl(mib, 2, cpu, &size, NULL, 0);
++      if (kvm_read(kp, namelist [X_CP_TIME].n_value,
++		   ctime, sizeof (ctime)) == -1)
++	warn ("kvm_read: %s", kvm_geterr (kp));
++      else {
++	int state;
++	double time = 0.;
++
++	for (state = 0; state < CPUSTATES; state++)
++	  time += ctime [state] - stime [state];
++
++	if (time == 0.)
++	  time = 1.;
++
++	*pidle = (ctime [CP_IDLE] - stime [CP_IDLE]) * 100. / time;
++
++	for (state = 0; state < CPUSTATES; state++)
++	  stime [state] = ctime [state];
++      }
++    } else
++      cfg_sendidle = 0;
++  }
++
++  if (cfg_sendload) {		/* ========== loadavg ========== */
++    double loadavgs [3] = { 0. };
++
++    getloadavg (loadavgs, 3);
++
++    *pload = loadavgs [2];
++  }
++
++  if (cfg_sendcpu) {		/* ========== cpu ========== */
++    static char buf [CPU_SIZE] = "";
++    static int initialized = 0;
++
++    if (!initialized) {
++      initialized = 1;
++
++      mib [0] = CTL_HW;
++      mib [1] = HW_MODEL;
++
++      size = sizeof (buf);
++
++      if (sysctl (mib, 2, buf, &size, NULL, 0) == -1)
++	warn ("sysctl: hw.model");
++    }
++
++    strncpy (cpu, buf, CPU_SIZE);
++    cpu [CPU_SIZE - 1] = 0;
+   }
+ 
+   if(cfg_sendos) {
+-    strncpy(os, uts.sysname, OS_SIZE - 1);
+-    if(cfg_sendoslevel) {
+-      strncpy(oslevel, uts.release, OSLEVEL_SIZE - 1);
++    static struct utsname uts;
++    static int initialized = 0;
++
++    if (!initialized) {
++      initialized = 1;
++
++      uname(&uts);
++    }
++
++    strncpy (os, uts.sysname, OS_SIZE - 1);
++    os [OS_SIZE - 1] = 0;
++
++    if (cfg_sendoslevel) {
++      strncpy (oslevel, uts.release, OSLEVEL_SIZE - 1);
++      oslevel [OSLEVEL_SIZE - 1] = 0;
+     }
+   }
+ }
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/files/patch-upchk upclient/files/patch-upchk
--- upclient.old/files/patch-upchk	Thu Jan  1 01:00:00 1970
+++ upclient/files/patch-upchk	Sat Dec 30 00:51:17 2000
@@ -0,0 +1,16 @@
+--- scripts/upchk.orig	Wed Nov 29 01:19:14 2000
++++ scripts/upchk	Sat Dec 30 00:19:54 2000
+@@ -24,11 +24,11 @@
+ #
+ 
+ # change this to the full path AND name of your upclient executable:
+-upclient="/home/mydir/upclient"
++upclient="!!PREFIX!!/sbin/upclient"
+ 
+ # change this to the name of your upclient's pidfile (as defined in
+ # config.h of the upclient distribution)
+-pidfile="/home/mydir/upclient.pid"
++pidfile="/var/run/upclient.pid"
+ 
+ ########## you probably don't need to change anything below here ##########
+ 
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/files/upclient.sh upclient/files/upclient.sh
--- upclient.old/files/upclient.sh	Thu Jan  1 01:00:00 1970
+++ upclient/files/upclient.sh	Sat Dec 30 01:28:00 2000
@@ -0,0 +1,35 @@
#!/bin/sh

if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
    echo "$0: Cannot determine the PREFIX" >&2
    exit 1
fi

if [ -f  ${PREFIX}/etc/upclient.conf ]; then
	if grep -qs '^[ 	]*AuthKey[ 	]*=' ${PREFIX}/etc/upclient.conf; then
		if grep -qs '^[ 	]*AuthKey[ 	]*=[ 	]*<your_authkey>' ${PREFIX}/etc/upclient.conf; then
			echo "upclient: AuthKey not configured in ${PREFIX}/etc/upclient.conf -- aborted." >&2
			exit 1
		fi
	else
		echo "upclient: ${PREFIX}/etc/upclient.conf is out of date -- aborted." >&2
		exit 1
	fi
else
	echo "upclient: ${PREFIX}/etc/upclient.conf doesn't exist -- aborted." >&2
	exit 1
fi

case "$1" in
start)
	[ -x ${PREFIX}/sbin/upclient ] && ${PREFIX}/sbin/upclient > /dev/null && echo -n ' upclient'
	;;
stop)
	[ -r /var/run/upclient.pid ] && kill `cat /var/run/upclient.pid` > /dev/null && echo -n ' upclient'
	;;
*)
	echo "Usage: `basename $0` {start|stop}" >&2
	;;
esac

exit 0
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/pkg-comment upclient/pkg-comment
--- upclient.old/pkg-comment	Sat Aug 28 21:27:20 1999
+++ upclient/pkg-comment	Sat Dec 30 03:19:19 2000
@@ -1 +1 @@
-The Server Uptimes project client
+The Uptimes project client
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/pkg-descr upclient/pkg-descr
--- upclient.old/pkg-descr	Sun Jan 23 03:23:55 2000
+++ upclient/pkg-descr	Sat Dec 30 01:13:03 2000
@@ -1,8 +1,5 @@
-This is the client program for the Server Uptimes project.
-For more information on the Server Uptimes project visit their web site at:
+Uptime Client is a little program that keeps track of your uptime and
+sends it to a server where you can compare it to many other hosts and
+browse through various statistical information. 
 
 WWW: http://www.uptimes.net/
-(old URL is http://uptime.hexon.cx/)
-
-  -Kelly
-   kbyanc@posi.net
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/pkg-message upclient/pkg-message
--- upclient.old/pkg-message	Sat Aug 28 21:27:20 1999
+++ upclient/pkg-message	Sat Dec 30 01:15:13 2000
@@ -1,18 +1,24 @@
 Before running the client for the first time, be sure to:
+
  1. visit the Server Uptimes project web site and register yourself
-        (WWW: http://uptime.hexon.cx/register.html),
+	(WWW: http://www.uptimes.net/bottom.html?show=createaccount).
+
+ 2. validate your registration
+	(WWW: http://www.uptimes.net/bottom.html?show=validate).
 
- 2. log in (WWW: http://uptime.hexon.cx/login)
+ 2. log in (WWW: http://www.uptimes.net/bottom.html?show=login).
 
- 3. Add your host (WWW: http://uptime.hexon.cx/login/cgi-bin/addhost.cgi)
+ 3. Add your host (WWW: http://www.uptimes.net/bottom.html?show=addhost).
 
 Note that in order to send your uptime information to the uptime server,
 you hosts need more-or-less full-time Internet access.
 
-You will also need to edit /usr/local/etc/upclient.conf:
-HostID is the ID you've received when you added your host
-Login and pass are your login and password
-Interval is the amount of time between each update.
-Don't set this higher than 10 minutes, or else your host
-won't appear in the list.
+You will also have to edit /usr/local/etc/upclient.conf:
+
+  - AuthKey is the ID you've received when you added your host
+	(WWW: http://www.uptimes.net/bottom.html?show=hosts).
+
+  - Interval is the amount of time between each update.
 
+    Don't set this higher than 10 minutes, or else your host
+    won't appear in the list.
diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.old/pkg-plist upclient/pkg-plist
--- upclient.old/pkg-plist	Sat Aug 28 21:27:20 1999
+++ upclient/pkg-plist	Sat Dec 30 01:32:41 2000
@@ -1,2 +1,6 @@
-bin/upclient
-etc/upclient.conf
+etc/rc.d/upclient.sh
+etc/upclient.conf.sample
+@exec [ -f %B/upclient.conf ] || cp %B/%f %B/upclient.conf
+@unexec if cmp -s %B/%f %B/upclient.conf; then rm -f %B/upclient.conf; fi
+sbin/upchk
+sbin/upclient

>Release-Note:
>Audit-Trail:

From: Cyrille Lefevre <root@gits.dyndns.org>
To: freebsd-gnats-submit@FreeBSD.org
Cc: kbyanc@posi.net, alex@hoeba.org
Subject: Re: ports/23948: Updated port - misc/upclient - 4.2.1.19
Date: Sat, 30 Dec 2000 06:36:34 +0100 (CET)

 well, I've just been contected by the current maintainer of upclient
 (alex@hoeba.org) which told me that the current version is 4.2.1.21.
 it isn't available at ftp://ftp.uptimes.net/pub/uptimes/, but is at
 http://uptimes.atomicvoid.net/files/. so, I've updated (again) the
 patch I've just submitted w/ this one which complement the first one :
 
 diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.new/Makefile upclient.new2/Makefile
 --- upclient.new/Makefile	Sat Dec 30 06:35:10 2000
 +++ upclient.new2/Makefile	Sat Dec 30 05:57:28 2000
 @@ -6,11 +6,11 @@
  #
  
  PORTNAME=	upclient
 -PORTVERSION=	4.2.1.19
 +PORTVERSION=	4.2.1.21
  CATEGORIES=	misc
  MASTER_SITES=	ftp://ftp.uptimes.net/pub/uptimes/ \
  		http://www.uptimes.net/download/ \
 -		http://uptimes.atomicvoid.net/
 +		http://uptimes.atomicvoid.net/files/
  
  MAINTAINER=	clefevre@citeweb.net
  
 diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.new/distinfo upclient.new2/distinfo
 --- upclient.new/distinfo	Sat Dec 30 06:20:11 2000
 +++ upclient.new2/distinfo	Sat Dec 30 05:57:53 2000
 @@ -1 +1 @@
 -MD5 (upclient-4.2.1.19.tar.gz) = c832a7885de2a20e2427bddfacd09d37
 +MD5 (upclient-4.2.1.21.tar.gz) = 5b6ceecabb36921bbcf7dd6eebdb73c2
 diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.new/files/patch-ab upclient.new2/files/patch-ab
 --- upclient.new/files/patch-ab	Sat Dec 30 06:16:40 2000
 +++ upclient.new2/files/patch-ab	Sat Dec 30 06:12:05 2000
 @@ -1,6 +1,6 @@
 ---- upclient.conf.orig	Mon Dec 18 14:19:35 2000
 -+++ upclient.conf	Sat Dec 30 00:37:19 2000
 -@@ -4,7 +4,7 @@
 +--- upclient.conf.orig	Wed Dec 27 00:48:16 2000
 ++++ upclient.conf	Sat Dec 30 06:11:27 2000
 +@@ -4,11 +4,11 @@
   # upclient.conf
   #
   
 @@ -8,4 +8,9 @@
  +PidFile = /var/run/upclient.pid		# Location of pid file
   
   AuthKey = <your_authkey>		# Your Authorization key
 - Interval	= 120			# Transmit interval
 + 
 +-Interval	= 120			# Transmit interval
 ++Interval	= 550			# Transmit interval
 + UptimeServer	= data.uptimes.net	# Uptimes Project's data server
 + 
 + SendIdleTime	= 1			# Send your idle time
 diff -bBurN -x CVS -x work -x *~ -x *.orig -x *.rej -I $Id.*$ -I $FreeBSD.*$ upclient.new/files/patch-options.c upclient.new2/files/patch-options.c
 --- upclient.new/files/patch-options.c	Sat Dec 30 06:18:07 2000
 +++ upclient.new2/files/patch-options.c	Sat Dec 30 06:11:00 2000
 @@ -1,5 +1,5 @@
 ---- src/options.c.orig	Mon Dec 18 02:20:24 2000
 -+++ src/options.c	Sat Dec 30 02:48:01 2000
 +--- src/options.c.orig	Wed Dec 27 00:41:53 2000
 ++++ src/options.c	Sat Dec 30 06:09:57 2000
  @@ -23,11 +23,7 @@
   int  cfg_proxyport				= 8080;
   char cfg_proxyuser[PROXYUSER_MAXLEN+1]		= "";
 @@ -12,15 +12,15 @@
   #if defined(PLATFORM_UNIXWARE)
   int  cfg_sendload	= 0;
   #else
 -+@@ -99,11 +95,7 @@
 -+   else if(strcmp(key, "PidFile") == 0)
 -+     strcpy(cfg_pidfile, value);
 -+   else if(strcmp(key, "SendIdleTime") == 0)
 -+-#if defined(PLATFORM_BSD)
 -+-    ;
 -+-#else
 -+     cfg_sendidle = atol(value);
 -+-#endif
 -+   else if(strcmp(key, "SendLoadAvg") == 0)
 -+ #if defined(PLATFORM_UNIXWARE)
 -+     ;
 +@@ -124,11 +120,7 @@
 +     strcpy(cfg_pidfile, value);
 +   }
 +   else if(strcmp(key, "SendIdleTime") == 0) {
 +-#if defined(PLATFORM_BSD)
 +-    ;
 +-#else
 +     cfg_sendidle = atol(value);
 +-#endif
 +   }
 +   else if(strcmp(key, "SendLoadAvg") == 0) {
 + #if defined(PLATFORM_UNIXWARE)
 
 Cyrille.
 --
 home: mailto:clefevre@citeweb.net work: mailto:Cyrille.Lefevre@edf.fr
 
State-Changed-From-To: open->closed 
State-Changed-By: jeh 
State-Changed-When: Thu Jan 4 19:37:19 PST 2001 
State-Changed-Why:  
Commited.  Thanks. 

I could not get the patch in the "feedback" to apply cleanly so 
it is still at 4.2.1.19 and NOT 4.2.1.21 

http://www.freebsd.org/cgi/query-pr.cgi?pr=23948 
>Unformatted:
