[packages/rwho] Rediff

arekm arekm at pld-linux.org
Tue Mar 3 00:29:10 CET 2026


commit 2d32046e555a2b8ac6359df81d6f3b57c9a4a5c7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Mar 3 00:29:00 2026 +0100

    Rediff

 rwho-debian-0.17-8.diff | 101 +++++++++++++++++++++++++-----------------------
 rwho-fixbcast.patch     |  11 +++---
 rwho.spec               |   2 +-
 3 files changed, 60 insertions(+), 54 deletions(-)
---
diff --git a/rwho.spec b/rwho.spec
index aecc6c2..9731b02 100644
--- a/rwho.spec
+++ b/rwho.spec
@@ -78,7 +78,7 @@ hem de sunucu yazılımını içermektedir.
 %patch -P5 -p1
 
 %build
-CFLAGS="%{rpmcflags} -w"
+CFLAGS="%{rpmcppflags} %{rpmcflags} -w"
 LDFLAGS="%{rpmldflags}"
 export CFLAGS LDFLAGS
 ./configure \
diff --git a/rwho-debian-0.17-8.diff b/rwho-debian-0.17-8.diff
index 823bf53..9bded58 100644
--- a/rwho-debian-0.17-8.diff
+++ b/rwho-debian-0.17-8.diff
@@ -1,17 +1,7 @@
---- netkit-rwho-0.17.orig/rwho/Makefile
-+++ netkit-rwho-0.17/rwho/Makefile
-@@ -3,8 +3,6 @@
- include ../MCONFIG
- include ../MRULES
- 
--CFLAGS += -I../include
--
- rwho: rwho.o
- 	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
- 
---- netkit-rwho-0.17.orig/ruptime/ruptime.c
-+++ netkit-rwho-0.17/ruptime/ruptime.c
-@@ -212,7 +212,7 @@
+diff -urNp -x '*.orig' netkit-rwho-0.17.org/ruptime/ruptime.c netkit-rwho-0.17/ruptime/ruptime.c
+--- netkit-rwho-0.17.org/ruptime/ruptime.c	1999-12-12 16:33:39.000000000 +0100
++++ netkit-rwho-0.17/ruptime/ruptime.c	2026-03-03 00:27:33.623569011 +0100
+@@ -212,7 +212,7 @@ interval(time_t tval, const char *updown
  	static char resbuf[32];
  	int days, hours, minutes;
  
@@ -20,7 +10,7 @@
  		(void)snprintf(resbuf, sizeof(resbuf), "%s     ??:??", updown);
  		return(resbuf);
  	}
-@@ -220,10 +220,10 @@
+@@ -220,10 +220,10 @@ interval(time_t tval, const char *updown
  	hours = minutes / 60; minutes %= 60;
  	days = hours / 24; hours %= 24;
  	if (days)
@@ -33,9 +23,22 @@
  		    updown, hours, minutes);
  	return(resbuf);
  }
---- netkit-rwho-0.17.orig/rwhod/Makefile
-+++ netkit-rwho-0.17/rwhod/Makefile
-@@ -3,8 +3,11 @@
+diff -urNp -x '*.orig' netkit-rwho-0.17.org/rwho/Makefile netkit-rwho-0.17/rwho/Makefile
+--- netkit-rwho-0.17.org/rwho/Makefile	1999-12-12 19:05:05.000000000 +0100
++++ netkit-rwho-0.17/rwho/Makefile	2026-03-03 00:27:33.623474771 +0100
+@@ -3,8 +3,6 @@ all: rwho
+ include ../MCONFIG
+ include ../MRULES
+ 
+-CFLAGS += -I../include
+-
+ rwho: rwho.o
+ 	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
+ 
+diff -urNp -x '*.orig' netkit-rwho-0.17.org/rwhod/Makefile netkit-rwho-0.17/rwhod/Makefile
+--- netkit-rwho-0.17.org/rwhod/Makefile	1999-08-01 08:00:13.000000000 +0200
++++ netkit-rwho-0.17/rwhod/Makefile	2026-03-03 00:27:33.623642652 +0100
+@@ -3,8 +3,11 @@ all: rwhod
  include ../MCONFIG
  include ../MRULES
  
@@ -49,11 +52,12 @@
  
  rwhod: $(OBJS)
  	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
---- netkit-rwho-0.17.orig/rwhod/rwhod.8
-+++ netkit-rwho-0.17/rwhod/rwhod.8
+diff -urNp -x '*.orig' netkit-rwho-0.17.org/rwhod/rwhod.8 netkit-rwho-0.17/rwhod/rwhod.8
+--- netkit-rwho-0.17.org/rwhod/rwhod.8	2000-07-31 01:57:06.000000000 +0200
++++ netkit-rwho-0.17/rwhod/rwhod.8	2026-03-03 00:27:33.623726071 +0100
 @@ -32,7 +32,10 @@
  .\"     from: @(#)rwhod.8	6.5 (Berkeley) 3/16/91
- .\"	$Id$
+ .\"	$Id: rwhod.8,v 1.16 2000/07/30 23:57:06 dholland Exp $
  .\"
 -.Dd May 13, 1997
 +.\" Modified by Philippe Troin <phil at fifi.org>: added interface
@@ -73,7 +77,7 @@
  .Op Fl u Ar user
  .Sh DESCRIPTION
  .Nm Rwhod
-@@ -67,22 +71,6 @@
+@@ -67,22 +71,6 @@ The server transmits and receives messag
  in the ``rwho'' service specification; see 
  .Xr services 5 . 
  .Pp
@@ -96,7 +100,7 @@
  The messages sent and received, are of the form:
  .Bd -literal -offset indent
  struct	outmp {
-@@ -145,16 +133,78 @@
+@@ -145,16 +133,78 @@ Status messages are generated approximat
  .Nm Rwhod
  recomputes the system boot time every 30 minutes because on
  some (non-Linux) systems it is not a totally reliable process.
@@ -177,8 +181,9 @@
 +.Pp
 +Philippe Troin <phil at fifi.org> implemented forwarding and interface
 +selection flags.
---- netkit-rwho-0.17.orig/rwhod/rwhod.c
-+++ netkit-rwho-0.17/rwhod/rwhod.c
+diff -urNp -x '*.orig' netkit-rwho-0.17.org/rwhod/rwhod.c netkit-rwho-0.17/rwhod/rwhod.c
+--- netkit-rwho-0.17.org/rwhod/rwhod.c	2000-07-23 05:19:48.000000000 +0200
++++ netkit-rwho-0.17/rwhod/rwhod.c	2026-03-03 00:27:33.623864941 +0100
 @@ -29,6 +29,10 @@
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
@@ -190,7 +195,7 @@
   */
  
  char copyright[] =
-@@ -47,6 +51,7 @@
+@@ -47,6 +51,7 @@ char rcsid[] =
  #include <signal.h>
  #include <sys/ioctl.h>
  #include <sys/file.h>
@@ -198,7 +203,7 @@
  
  #include <net/if.h>
  #include <netinet/in.h>
-@@ -69,11 +74,13 @@
+@@ -69,11 +74,13 @@ char rcsid[] =
  #include <arpa/inet.h>
  #include <pwd.h>
  #include <grp.h>
@@ -214,7 +219,7 @@
  #define ENDIAN	LITTLE_ENDIAN
  
  /*
-@@ -95,7 +102,16 @@
+@@ -95,7 +102,16 @@ struct	nlist nl[] = {
  static void	broadcaster(void);
  static int	configure(int s);
  static int	verify(const char *name);
@@ -231,7 +236,7 @@
  
  /*
   * We communicate with each neighbor in
-@@ -103,21 +119,30 @@
+@@ -103,21 +119,30 @@ static int	getloadavg(double ptr[3], int
   * started up.  Neighbors are currently
   * directly connected via a hardware interface.
   */
@@ -267,7 +272,7 @@
  
  #define WHDRSIZE	(((caddr_t) &((struct whod *) 0)->wd_we) \
  			- ((caddr_t) 0))
-@@ -126,24 +151,48 @@
+@@ -126,24 +151,48 @@ static void huphandler(int);
  static void termhandler(int);
  static void sendpacket(struct whod *);
  static void getboottime(struct whod *);
@@ -319,7 +324,7 @@
  	    switch (opt) {
  	      case 'b':
  		  use_broadcast = 1;
-@@ -155,31 +204,60 @@
+@@ -155,31 +204,60 @@ main(int argc, char *argv[])
  		  use_broadcast = 1;
  		  use_pointopoint = 1;
  		  break;
@@ -390,7 +395,7 @@
  #ifndef DEBUG
  	daemon(1, 0);
  #endif
-@@ -189,53 +267,20 @@
+@@ -189,53 +267,20 @@ main(int argc, char *argv[])
  		exit(1);
  	}
  	(void) signal(SIGHUP, huphandler);
@@ -446,7 +451,7 @@
  		if (setgroups(1, &pw->pw_gid) < 0
  		 || setgid(pw->pw_gid) < 0
  		 || setuid(pw->pw_uid) < 0) {
-@@ -244,10 +289,28 @@
+@@ -244,10 +289,28 @@ main(int argc, char *argv[])
  		}
  	}
  
@@ -475,7 +480,7 @@
  
  		memset(&wd, 0, sizeof(wd));
  		cc = recvfrom(sk, (char *)&wd, sizeof(struct whod), 0,
-@@ -257,6 +320,8 @@
+@@ -257,6 +320,8 @@ main(int argc, char *argv[])
  				syslog(LOG_WARNING, "recv: %m");
  			continue;
  		}
@@ -484,7 +489,7 @@
  		if (from.sin_port != sp->s_port) {
  			syslog(LOG_WARNING, "%d: bad from port",
  				ntohs(from.sin_port));
-@@ -266,14 +331,24 @@
+@@ -266,14 +331,24 @@ main(int argc, char *argv[])
  			continue;
  		if (wd.wd_type != WHODTYPE_STATUS)
  			continue;
@@ -511,7 +516,7 @@
  			continue;
  		}
  		snprintf(path, sizeof(path), "whod.%s", wd.wd_hostname);
-@@ -306,7 +381,7 @@
+@@ -306,7 +381,7 @@ main(int argc, char *argv[])
  		}
  #endif
  		wd.wd_recvtime = time(NULL);
@@ -520,7 +525,7 @@
  		if (fstat(whod, &st) < 0 || st.st_size > cc)
  			ftruncate(whod, cc);
  		(void) close(whod);
-@@ -345,9 +420,6 @@
+@@ -345,9 +420,6 @@ broadcaster()
  	size_t		mynamelen;
  	struct whod	mywd;
  
@@ -530,7 +535,7 @@
  	/*
  	 * Establish host name as returned by system.
  	 */
-@@ -357,7 +429,7 @@
+@@ -357,7 +429,7 @@ broadcaster()
  	}
  	if ((cp = index(myname, '.')) != NULL)
  		*cp = '\0';
@@ -539,7 +544,7 @@
  	if (mynamelen > sizeof(mywd.wd_hostname)) 
  		mynamelen = sizeof(mywd.wd_hostname);
  	strncpy(mywd.wd_hostname, myname, mynamelen);
-@@ -448,7 +520,9 @@
+@@ -448,7 +520,9 @@ sendpacket(struct whod *wd)
  	}
  	we = wd->wd_we;
  	for (i = 0; i < nutmps; i++) {
@@ -550,7 +555,7 @@
  			we->we_idle = htonl(now - stb.st_atime);
  		we++;
  	}
-@@ -460,10 +534,10 @@
+@@ -460,10 +534,10 @@ sendpacket(struct whod *wd)
  	wd->wd_vers = WHODVERSION;
  	wd->wd_type = WHODTYPE_STATUS;
  	for (np = neighbors; np != NULL; np = np->n_next) {
@@ -564,7 +569,7 @@
  	}
  
  	if (nutmps && chdir(_PATH_RWHODIR)) {
-@@ -472,6 +546,7 @@
+@@ -472,6 +546,7 @@ sendpacket(struct whod *wd)
  	}
  }
  
@@ -572,7 +577,7 @@
  /*
   * Taken from:
   *
-@@ -518,6 +593,7 @@
+@@ -518,6 +593,7 @@ int getloadavg(double ptr[3], int n)
  	fclose(fp);
  	return 0;
  }
@@ -580,7 +585,7 @@
  
  
  void
-@@ -566,7 +642,7 @@
+@@ -566,7 +642,7 @@ loop:
  		exit(1);
  	}
  	(void) lseek(kmemf, (long)nl[NL_BOOTTIME].n_value, L_SET);
@@ -589,7 +594,7 @@
  	    sizeof (wd->wd_boottime));
  	wd->wd_boottime = htonl(wd->wd_boottime);
  #endif
-@@ -584,10 +660,11 @@
+@@ -584,10 +660,11 @@ configure(int s)
  	struct ifreq ifreq, *ifr;
  	struct sockaddr_in *sn;
  	register struct neighbor *np;
@@ -602,7 +607,7 @@
  		syslog(LOG_ERR, "ioctl (get interface configuration)");
  		return (0);
  	}
-@@ -600,7 +677,11 @@
+@@ -600,7 +677,11 @@ configure(int s)
  #endif
  	cplim = buf + ifc.ifc_len; /*skip over if's with big ifr_addr's */
  	for (cp = buf; cp < cplim;
@@ -614,7 +619,7 @@
  		ifr = (struct ifreq *)cp;
  		for (np = neighbors; np != NULL; np = np->n_next)
  			if (np->n_name &&
-@@ -614,63 +695,170 @@
+@@ -614,63 +695,170 @@ configure(int s)
  			continue;
  		np->n_name = malloc(strlen(ifr->ifr_name) + 1);
  		if (np->n_name == NULL) {
@@ -803,7 +808,7 @@
  	return (1);
  }
  
-@@ -692,7 +880,7 @@
+@@ -692,7 +880,7 @@ sendto(s, buf, cc, flags, to, tolen)
  {
  	register struct whod *w = (struct whod *)buf;
  	register struct whoent *we;
@@ -812,7 +817,7 @@
  	char *interval();
  
  	printf("sendto %x.%d\n", ntohl(sn->sin_addr.s_addr), ntohs(sn->sin_port));
-@@ -746,3 +934,63 @@
+@@ -746,3 +934,63 @@ interval(time, updown)
  	return (resbuf);
  }
  #endif
diff --git a/rwho-fixbcast.patch b/rwho-fixbcast.patch
index 0010d4b..5a59a6f 100644
--- a/rwho-fixbcast.patch
+++ b/rwho-fixbcast.patch
@@ -1,6 +1,7 @@
---- netkit-rwho-0.17-pre20000412/rwhod/rwhod.c.fixbcast	Fri Feb  2 17:03:03 2001
-+++ netkit-rwho-0.17-pre20000412/rwhod/rwhod.c	Fri Feb  2 17:03:38 2001
-@@ -533,6 +533,11 @@
+diff -urNp -x '*.orig' netkit-rwho-0.17.org/rwhod/rwhod.c netkit-rwho-0.17/rwhod/rwhod.c
+--- netkit-rwho-0.17.org/rwhod/rwhod.c	2026-03-03 00:27:48.876429431 +0100
++++ netkit-rwho-0.17/rwhod/rwhod.c	2026-03-03 00:27:48.942709372 +0100
+@@ -699,6 +699,11 @@ configure(int s)
  			continue;
  		}
  		strcpy(np->n_name, ifr->ifr_name);
@@ -10,5 +11,5 @@
 +		  continue;
 +		}
  		np->n_addrlen = sizeof (ifr->ifr_addr);
- 		np->n_addr = malloc(np->n_addrlen);
- 		if (np->n_addr == NULL) {
+ 
+ 		np->n_dstaddr = malloc(np->n_addrlen);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rwho.git/commitdiff/2d32046e555a2b8ac6359df81d6f3b57c9a4a5c7



More information about the pld-cvs-commit mailing list