Update patches, drop 02_hurd_stub_backend.patch, fixed upstream.

This commit is contained in:
Michael Biebl
2015-10-07 22:08:18 +00:00
parent b8a6ab75eb
commit 36d0a923a3
4 changed files with 22 additions and 196 deletions

1
debian/changelog vendored
View File

@@ -2,6 +2,7 @@ libgtop2 (2.32.0-1) UNRELEASED; urgency=medium
* New upstream release.
* Update symbols file and bump shlibs version to 2.32.0.
* Update patches, drop 02_hurd_stub_backend.patch, fixed upstream.
-- Michael Biebl <biebl@debian.org> Wed, 07 Oct 2015 23:41:43 +0200

View File

@@ -1,178 +0,0 @@
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=602662
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557446
Author: Samuel Thibault <sthibault@debian.org>
Fix the stub backend to build again, making libgtop build on the Hurd.
diff -urN --exclude='*.o' --exclude='*.lo' --exclude='*.in' libgtop2-2.28.0.sav/sysdeps/stub/Makefile.am libgtop2-2.28.0/sysdeps/stub/Makefile.am
--- libgtop2-2.28.0.sav/sysdeps/stub/Makefile.am 2009-04-18 23:29:49.000000000 +0000
+++ libgtop2-2.28.0/sysdeps/stub/Makefile.am 2009-11-22 01:07:39.000000000 +0000
@@ -8,7 +8,8 @@
sem_limits.c proclist.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c prockernel.c \
procsegment.c procargs.c procmap.c netload.c \
- ppp.c netlist.c procopenfiles.c
+ ppp.c netlist.c procopenfiles.c procwd.c \
+ procaffinity.c sysinfo.c
libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
diff -urN --exclude='*.o' --exclude='*.lo' --exclude='*.in' libgtop2-2.28.0.sav/sysdeps/stub/glibtop_server.h libgtop2-2.28.0/sysdeps/stub/glibtop_server.h
--- libgtop2-2.28.0.sav/sysdeps/stub/glibtop_server.h 2009-04-18 23:29:49.000000000 +0000
+++ libgtop2-2.28.0/sysdeps/stub/glibtop_server.h 2009-11-22 01:02:16.000000000 +0000
@@ -45,6 +45,8 @@
#define GLIBTOP_SUID_NETLOAD 0
#define GLIBTOP_SUID_NETLIST 0
#define GLIBTOP_SUID_PPP 0
+#define GLIBTOP_SUID_PROC_WD 0
+#define GLIBTOP_SUID_PROC_AFFINITY 0
G_END_DECLS
diff -urN --exclude='*.o' --exclude='*.lo' --exclude='*.in' libgtop2-2.28.0.sav/sysdeps/stub/procaffinity.c libgtop2-2.28.0/sysdeps/stub/procaffinity.c
--- libgtop2-2.28.0.sav/sysdeps/stub/procaffinity.c 1970-01-01 00:00:00.000000000 +0000
+++ libgtop2-2.28.0/sysdeps/stub/procaffinity.c 2009-11-22 01:06:58.000000000 +0000
@@ -0,0 +1,44 @@
+/*
+
+ This file is part of LibGTop 2.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/procaffinity.h>
+#include <glibtop/error.h>
+
+#include <sys/param.h>
+
+void
+_glibtop_init_proc_affinity_s(glibtop *server)
+{
+ server->sysdeps.proc_affinity =
+ (1 << GLIBTOP_PROC_AFFINITY_NUMBER) |
+ (1 << GLIBTOP_PROC_AFFINITY_ALL);
+
+}
+
+
+guint16 *
+glibtop_get_proc_affinity_s(glibtop *server, glibtop_proc_affinity *buf, pid_t pid)
+{
+ memset(buf, 0, sizeof *buf);
+
+ return NULL;
+}
+
diff -urN --exclude='*.o' --exclude='*.lo' --exclude='*.in' libgtop2-2.28.0.sav/sysdeps/stub/proclist.c libgtop2-2.28.0/sysdeps/stub/proclist.c
--- libgtop2-2.28.0.sav/sysdeps/stub/proclist.c 2009-04-18 23:29:49.000000000 +0000
+++ libgtop2-2.28.0/sysdeps/stub/proclist.c 2009-11-22 01:30:53.000000000 +0000
@@ -42,7 +42,7 @@
* On success, it returnes a pointer to a list of buf->number elements
* each buf->size big. The total size is stored in buf->total. */
-unsigned *
+pid_t *
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
gint64 which, gint64 arg)
{
diff -urN --exclude='*.o' --exclude='*.lo' --exclude='*.in' libgtop2-2.28.0.sav/sysdeps/stub/procwd.c libgtop2-2.28.0/sysdeps/stub/procwd.c
--- libgtop2-2.28.0.sav/sysdeps/stub/procwd.c 1970-01-01 00:00:00.000000000 +0000
+++ libgtop2-2.28.0/sysdeps/stub/procwd.c 2009-11-22 01:46:06.000000000 +0000
@@ -0,0 +1,48 @@
+/*
+ This file is part of LibGTop 2.0.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/procwd.h>
+#include <glibtop/error.h>
+
+#include <unistd.h>
+#include <dirent.h>
+#include <sys/types.h>
+
+static const unsigned long _glibtop_sysdeps_proc_wd = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_proc_wd_s (glibtop *server)
+{
+ server->sysdeps.proc_wd = _glibtop_sysdeps_proc_wd;
+}
+
+/* Provides detailed information about a process. */
+
+char **
+glibtop_get_proc_wd_s (glibtop *server, glibtop_proc_wd *buf,
+ pid_t pid)
+{
+ glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_WD, 0);
+
+ memset (buf, 0, sizeof (glibtop_proc_wd));
+ return NULL;
+}
diff -urN --exclude='*.o' --exclude='*.lo' --exclude='*.in' libgtop2-2.28.0.sav/sysdeps/stub/sysinfo.c libgtop2-2.28.0/sysdeps/stub/sysinfo.c
--- libgtop2-2.28.0.sav/sysdeps/stub/sysinfo.c 1970-01-01 00:00:00.000000000 +0000
+++ libgtop2-2.28.0/sysdeps/stub/sysinfo.c 2009-11-22 02:08:44.000000000 +0000
@@ -0,0 +1,31 @@
+/*
+ This file is part of LibGTop 2.0.
+
+ LibGTop is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ LibGTop is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LibGTop; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+
+#include <config.h>
+#include <glibtop/cpu.h>
+#include <glibtop/sysinfo.h>
+
+static glibtop_sysinfo sysinfo = { };
+const glibtop_sysinfo *
+glibtop_get_sysinfo_s (glibtop *server)
+{
+ glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
+
+ return &sysinfo;
+}

View File

@@ -7,20 +7,27 @@ being launched directly. Therefore, it should go in $(libexecdir) instead.
The patch also adds some missing $(DESTDIR) references in the installation
hooks.
Index: libgtop2/libgtop-sysdeps.m4
Index: libgtop-2.32.0/libgtop-sysdeps.m4
===================================================================
--- libgtop2.orig/libgtop-sysdeps.m4 2011-09-06 14:12:33.925874923 +0200
+++ libgtop2/libgtop-sysdeps.m4 2011-09-06 14:12:37.175874943 +0200
@@ -73,7 +73,7 @@
--- libgtop-2.32.0.orig/libgtop-sysdeps.m4 2015-10-07 23:46:35.738589058 +0200
+++ libgtop-2.32.0/libgtop-sysdeps.m4 2015-10-07 23:51:51.006990769 +0200
@@ -40,38 +40,38 @@
netbsd*|bsdi*)
libgtop_sysdeps_dir=bsd
libgtop_use_machine_h=yes
libgtop_need_server=yes
- libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2755 $(bindir)/libgtop_server2'
+ libgtop_postinstall='chgrp kmem $(DESTDIR)$(libexecdir)/libgtop_server2 && chmod 2755 $(DESTDIR)$(libexecdir)/libgtop_server2'
;;
openbsd*)
libgtop_sysdeps_dir=openbsd
@@ -87,27 +87,27 @@
libgtop_need_server=yes
libgtop_sysdeps_private_mountlist=yes
libgtop_sysdeps_private_fsusage=yes
- libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2555 $(bindir)/libgtop_server2'
+ libgtop_postinstall='chgrp kmem $(DESTDIR)$(libexecdir)/libgtop_server2 && chmod 2755 $(DESTDIR)$(libexecdir)/libgtop_server2'
;;
freebsd*|kfreebsd*)
libgtop_sysdeps_dir=freebsd
libgtop_need_server=yes
libgtop_sysdeps_private_mountlist=yes
libgtop_sysdeps_private_fsusage=yes
@@ -29,14 +36,12 @@ Index: libgtop2/libgtop-sysdeps.m4
;;
solaris*)
libgtop_sysdeps_dir=solaris
libgtop_use_machine_h=yes
libgtop_need_server=yes
- libgtop_postinstall='chgrp sys $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server'
+ libgtop_postinstall='chgrp sys $(DESTDIR)$(libexecdir)/libgtop_server && chmod 2755 $(DESTDIR)$(libexecdir)/libgtop_server'
;;
aix*)
libgtop_sysdeps_dir=aix
libgtop_use_machine_h=yes
libgtop_need_server=yes
libgtop_have_sysinfo=yes
- libgtop_postinstall='chgrp system $(bindir)/libgtop_server && chmod g+s $(bindir)/libgtop_server2'
@@ -44,7 +49,6 @@ Index: libgtop2/libgtop-sysdeps.m4
;;
darwin*)
libgtop_sysdeps_dir=darwin
libgtop_use_machine_h=yes
libgtop_need_server=yes
libgtop_have_sysinfo=yes
- libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod g+s $(bindir)/libgtop_server2'
@@ -52,11 +56,11 @@ Index: libgtop2/libgtop-sysdeps.m4
;;
cygwin*)
libgtop_sysdeps_dir=cygwin
Index: libgtop2/src/daemon/Makefile.am
Index: libgtop-2.32.0/src/daemon/Makefile.am
===================================================================
--- libgtop2.orig/src/daemon/Makefile.am 2011-06-01 17:40:47.000000000 +0200
+++ libgtop2/src/daemon/Makefile.am 2011-09-06 14:12:37.175874943 +0200
@@ -28,7 +28,7 @@
--- libgtop-2.32.0.orig/src/daemon/Makefile.am 2015-10-07 23:46:35.738589058 +0200
+++ libgtop-2.32.0/src/daemon/Makefile.am 2015-10-07 23:46:35.734589003 +0200
@@ -26,7 +26,7 @@
suid_common =
endif
@@ -65,11 +69,11 @@ Index: libgtop2/src/daemon/Makefile.am
EXTRA_PROGRAMS = libgtop_server2
Index: libgtop2/configure.in
Index: libgtop-2.32.0/configure.ac
===================================================================
--- libgtop2.orig/configure.in 2011-08-30 13:25:29.000000000 +0200
+++ libgtop2/configure.in 2011-09-06 14:12:37.175874943 +0200
@@ -290,8 +290,8 @@
--- libgtop-2.32.0.orig/configure.ac 2015-10-07 23:46:35.738589058 +0200
+++ libgtop-2.32.0/configure.ac 2015-10-07 23:46:35.734589003 +0200
@@ -285,8 +285,8 @@
libgtop_save_exec_prefix="$exec_prefix"
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix

View File

@@ -1,3 +1,2 @@
02_hurd_stub_backend.patch
03_kfreebsd_installdirs.patch
04_kfreebsd_version.patch