[packages/rusers] - rebuild with procps 4, rel 32
baggins
baggins at pld-linux.org
Sun Oct 8 14:36:02 CEST 2023
commit c193b38139b2958894967e83c62ca5b3a8b45016
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Oct 8 13:45:39 2023 +0200
- rebuild with procps 4, rel 32
netkit-rusers-includes.patch | 2 +-
nostrip.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
procps.patch | 38 ++++++++++++++++++++++++++++++++++++++
rusers.spec | 19 ++++++++++++-------
4 files changed, 95 insertions(+), 8 deletions(-)
---
diff --git a/rusers.spec b/rusers.spec
index e79c361..ad3cd38 100644
--- a/rusers.spec
+++ b/rusers.spec
@@ -7,7 +7,7 @@ Summary(pt_BR.UTF-8): Mostra a informação de login para máquinas remotas
Summary(tr.UTF-8): Ağ üzerindeki makinalardaki kullanıcıları sorgular
Name: rusers
Version: 0.17
-Release: 31
+Release: 32
License: BSD
Group: Networking
Source0: ftp://ftp.linux.org.uk/pub/linux/Networking/netkit/netkit-%{name}-%{version}.tar.gz
@@ -20,6 +20,9 @@ Patch0: netkit-%{name}-numusers.patch
Patch1: rstatd-jbj.patch
Patch2: netkit-%{name}-droppriv-later.patch
Patch3: netkit-%{name}-includes.patch
+Patch4: procps.patch
+Patch5: nostrip.patch
+BuildRequires: libtirpc-devel
BuildRequires: procps-devel >= 1:3.2.5-3
BuildRequires: rpmbuild(macros) >= 1.268
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -121,18 +124,20 @@ Statystyki te zwykle są czytane komendą rup(1).
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
%build
-./configure
+CFLAGS="%{rpmcflags} -DGNU_LIBC -D_GNU_SOURCE -D_NO_UT_TIME -I/usr/include/tirpc" \
+LDFLAGS="%{rpmldflags}" \
+./configure \
+ --with-c-compiler=%{__cc}
%{__make} \
- CC="%{__cc}" \
- CFLAGS="%{rpmcflags} -DGNU_LIBC -D_GNU_SOURCE -D_NO_UT_TIME"
+ LIBS="-ltirpc"
%{__make} -C rpc.rstatd \
- CC="%{__cc}" \
- CFLAGS="%{rpmcflags}" \
- LIBS="-lprocps"
+ LIBS="-lproc2 -ltirpc"
%install
rm -rf $RPM_BUILD_ROOT
diff --git a/netkit-rusers-includes.patch b/netkit-rusers-includes.patch
index a7a2174..aa1ee31 100644
--- a/netkit-rusers-includes.patch
+++ b/netkit-rusers-includes.patch
@@ -1,7 +1,7 @@
--- netkit-rusers-0.17/rup/err.c.includes Sun Apr 6 00:13:31 1997
+++ netkit-rusers-0.17/rup/err.c Wed Jul 25 15:08:27 2001
@@ -6,6 +6,7 @@
- "$Id$";
+ "$Id: err.c,v 1.1 1997/04/05 22:13:31 dholland Exp $";
#include <stdio.h>
+#include <stdlib.h>
diff --git a/nostrip.patch b/nostrip.patch
new file mode 100644
index 0000000..ed251e6
--- /dev/null
+++ b/nostrip.patch
@@ -0,0 +1,44 @@
+--- netkit-rusers-0.17/rpc.rstatd/GNUmakefile~ 1999-03-14 20:21:52.000000000 +0100
++++ netkit-rusers-0.17/rpc.rstatd/GNUmakefile 2023-10-08 13:32:51.525481394 +0200
+@@ -20,7 +20,7 @@
+ $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
+
+ install: rstatd
+- install -s -m$(DAEMONMODE) rstatd $(INSTALLROOT)$(SBINDIR)/rpc.rstatd
++ install -m$(DAEMONMODE) rstatd $(INSTALLROOT)$(SBINDIR)/rpc.rstatd
+ install -m$(MANMODE) rpc.rstatd.8 $(INSTALLROOT)$(MANDIR)/man8
+ ln -sf rpc.rstatd.8 $(INSTALLROOT)$(MANDIR)/man8/rstatd.8
+
+--- netkit-rusers-0.17/rpc.rusersd/Makefile~ 1999-12-12 19:05:03.000000000 +0100
++++ netkit-rusers-0.17/rpc.rusersd/Makefile 2023-10-08 13:33:25.689895097 +0200
+@@ -22,7 +22,7 @@
+ $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
+
+ install: rusersd
+- install -s -m$(DAEMONMODE) rusersd $(INSTALLROOT)$(SBINDIR)/rpc.rusersd
++ install -m$(DAEMONMODE) rusersd $(INSTALLROOT)$(SBINDIR)/rpc.rusersd
+ install -m$(MANMODE) rpc.rusersd.8 $(INSTALLROOT)$(MANDIR)/man8
+ ln -sf rpc.rusersd.8 $(INSTALLROOT)$(MANDIR)/man8/rusersd.8
+
+--- netkit-rusers-0.17/rup/Makefile~ 1999-12-12 19:05:04.000000000 +0100
++++ netkit-rusers-0.17/rup/Makefile 2023-10-08 13:33:43.393794200 +0200
+@@ -22,7 +22,7 @@
+ rup.o: ../version.h
+
+ install: rup
+- install -s -m$(BINMODE) rup $(INSTALLROOT)$(BINDIR)
++ install -m$(BINMODE) rup $(INSTALLROOT)$(BINDIR)
+ install -m$(MANMODE) rup.1 $(INSTALLROOT)$(MANDIR)/man1
+
+ clean:
+--- netkit-rusers-0.17/rusers/Makefile~ 1999-12-12 19:05:04.000000000 +0100
++++ netkit-rusers-0.17/rusers/Makefile 2023-10-08 13:33:59.874324201 +0200
+@@ -20,7 +20,7 @@
+ $(CC) $(LDFLAGS) $^ $(LIBS) -o $@
+
+ install: rusers
+- install -s -m$(BINMODE) rusers $(INSTALLROOT)$(BINDIR)
++ install -m$(BINMODE) rusers $(INSTALLROOT)$(BINDIR)
+ install -m$(MANMODE) rusers.1 $(INSTALLROOT)$(MANDIR)/man1
+
+ clean:
diff --git a/procps.patch b/procps.patch
new file mode 100644
index 0000000..f4f633f
--- /dev/null
+++ b/procps.patch
@@ -0,0 +1,38 @@
+--- netkit-rusers-0.17/rpc.rstatd/rstat_proc.c.orig 2023-10-08 13:19:33.000000000 +0200
++++ netkit-rusers-0.17/rpc.rstatd/rstat_proc.c 2023-10-08 13:27:11.069502253 +0200
+@@ -59,6 +59,8 @@
+ #include <assert.h>
+ #include <ctype.h>
+
++#include <libproc2/misc.h>
++
+ #define CP_USER 0
+ #define CP_NICE 1
+ #define CP_SYS 2
+@@ -552,9 +554,6 @@
+ #define _DELTA(_x, _i) ( (_x)[(_i)] )
+ #endif
+
+-extern int uptime(double *, double *);
+-extern void loadavg(double *, double *, double *);
+-
+ static void
+ convert_stats(void)
+ {
+@@ -565,14 +564,14 @@
+ hz = sysconf(_SC_CLK_TCK);
+ gettimeofday(&tm, (struct timezone *) 0);
+
+- i = uptime(&up, NULL);
++ i = procps_uptime(&up, NULL);
+ btm.tv_sec = tm.tv_sec - i;
+ btm.tv_usec = 0;
+ up -= i;
+ if (up > 0)
+ btm.tv_usec = 1000000 * up;
+
+- loadavg(&avrun[0], &avrun[1], &avrun[2]);
++ procps_loadavg(&avrun[0], &avrun[1], &avrun[2]);
+ getstat(cpu_use+tog,cpu_nic+tog,cpu_sys+tog,cpu_idl+tog,
+ pgpgin+tog,pgpgout+tog,pswpin+tog,pswpout+tog,
+ inter+tog,ticks+tog,ctxt+tog, disk+tog);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rusers.git/commitdiff/c193b38139b2958894967e83c62ca5b3a8b45016
More information about the pld-cvs-commit
mailing list