* Switch to quilt for patch management.

* 02_hurd_stub_backend.patch: re-add an implementation of the stub 
  backend, for the Hurd. Closes: #557446.
* 03_kfreebsd_installdirs.patch: patch to install binaries in 
  libexecdir so that we can version the installation directory. Also 
  use DESTDIR in the installation hooks.
* Rename 90_autoconf.patch to 90_autotools.patch, re-run all the 
  autotools on top of that.
* Pass a versioned libexecdir to the configure arguments.
* Install the server binary on kfreebsd.
* Exclude it from dh_fixperms.
This commit is contained in:
Josselin Mouette
2009-11-22 17:16:25 +00:00
parent 00cfea0843
commit 01f63fdbb2
9 changed files with 18351 additions and 4281 deletions

16
debian/changelog vendored
View File

@@ -1,3 +1,19 @@
libgtop2 (2.28.0-3) unstable; urgency=low
* Switch to quilt for patch management.
* 02_hurd_stub_backend.patch: re-add an implementation of the stub
backend, for the Hurd. Closes: #557446.
* 03_kfreebsd_installdirs.patch: patch to install binaries in
libexecdir so that we can version the installation directory. Also
use DESTDIR in the installation hooks.
* Rename 90_autoconf.patch to 90_autotools.patch, re-run all the
autotools on top of that.
* Pass a versioned libexecdir to the configure arguments.
* Install the server binary on kfreebsd.
* Exclude it from dh_fixperms.
-- Josselin Mouette <joss@debian.org> Sun, 22 Nov 2009 18:16:17 +0100
libgtop2 (2.28.0-2) unstable; urgency=low
* debian/patches/01_kfreebsd_kvm_libs.patch:

1
debian/control vendored
View File

@@ -10,6 +10,7 @@ Build-Depends: debhelper (>= 5),
libglib2.0-dev (>= 2.6.0),
gnome-pkg-tools (>= 0.10),
cdbs,
quilt,
texinfo,
dpkg-dev (>= 1.13.19),
intltool (>= 0.35.0),

1
debian/control.in vendored
View File

@@ -10,6 +10,7 @@ Build-Depends: debhelper (>= 5),
libglib2.0-dev (>= 2.6.0),
gnome-pkg-tools (>= 0.10),
cdbs,
quilt,
texinfo,
dpkg-dev (>= 1.13.19),
intltool (>= 0.35.0),

View File

@@ -0,0 +1,172 @@
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

@@ -0,0 +1,73 @@
Index: libgtop-2.28.0/libgtop-sysdeps.m4
===================================================================
--- libgtop-2.28.0.orig/libgtop-sysdeps.m4 2009-11-22 17:31:01.861694527 +0100
+++ libgtop-2.28.0/libgtop-sysdeps.m4 2009-11-22 17:33:11.877189288 +0100
@@ -73,7 +73,7 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
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'
;;
freebsd*|kfreebsd*)
libgtop_sysdeps_dir=freebsd
@@ -81,27 +81,27 @@ AC_DEFUN([GNOME_LIBGTOP_SYSDEPS],[
libgtop_need_server=yes
libgtop_sysdeps_private_mountlist=yes
libgtop_sysdeps_private_fsusage=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'
;;
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'
+ libgtop_postinstall='chgrp system $(DESTDIR)$(libexecdir)/libgtop_server && chmod g+s $(DESTDIR)$(libexecdir)/libgtop_server2'
;;
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'
+ libgtop_postinstall='chgrp kmem $(DESTDIR)$(libexecdir)/libgtop_server2 && chmod g+s $(DESTDIR)$(libexecdir)/libgtop_server2'
;;
cygwin*)
libgtop_sysdeps_dir=cygwin
Index: libgtop-2.28.0/src/daemon/Makefile.am
===================================================================
--- libgtop-2.28.0.orig/src/daemon/Makefile.am 2009-11-22 17:29:07.097688961 +0100
+++ libgtop-2.28.0/src/daemon/Makefile.am 2009-11-22 17:29:46.589689603 +0100
@@ -28,7 +28,7 @@ suid_sysdeps =
suid_common =
endif
-bin_PROGRAMS = libgtop_daemon2 @server_programs@
+libexec_PROGRAMS = libgtop_daemon2 @server_programs@
EXTRA_PROGRAMS = libgtop_server2
Index: libgtop-2.28.0/configure.in
===================================================================
--- libgtop-2.28.0.orig/configure.in 2009-11-22 17:36:21.481188616 +0100
+++ libgtop-2.28.0/configure.in 2009-11-22 17:36:35.733188858 +0100
@@ -287,8 +287,8 @@ libgtop_save_prefix="$prefix"
libgtop_save_exec_prefix="$exec_prefix"
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
-LIBGTOP_BINDIR=`eval echo "${bindir}"`
-LIBGTOP_SERVER=`eval echo "${bindir}/libgtop_server2"`
+LIBGTOP_BINDIR=`eval echo "${libexecdir}"`
+LIBGTOP_SERVER=`eval echo "${libexecdir}/libgtop_server2"`
prefix="$libgtop_save_prefix"
exec_prefix="$libgtop_save_exec_prefix"

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,9 @@
--- ltmain.sh.old 2007-10-09 07:38:25.000000000 +0200
+++ ltmain.sh 2007-10-09 07:39:25.000000000 +0200
@@ -1794,6 +1794,11 @@
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
Index: libgtop-2.28.0/ltmain.sh
===================================================================
--- libgtop-2.28.0.orig/ltmain.sh 2009-09-21 09:54:29.000000000 +0200
+++ libgtop-2.28.0/ltmain.sh 2009-11-22 17:17:07.677688108 +0100
@@ -4716,6 +4716,11 @@ func_mode_link ()
arg=$func_stripname_result
;;
+ -Wl,--as-needed)
@@ -10,9 +12,9 @@
+ ;;
+
-Wl,*)
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
arg=
@@ -2137,6 +2142,15 @@
func_stripname '-Wl,' '' "$arg"
args=$func_stripname_result
@@ -5070,6 +5075,15 @@ func_mode_link ()
lib=
found=no
case $deplib in

5
debian/patches/series vendored Normal file
View File

@@ -0,0 +1,5 @@
01_kfreebsd_kvm_libs.patch
02_hurd_stub_backend.patch
03_kfreebsd_installdirs.patch
90_autotools.patch
99_ltmain_as-needed.patch

18
debian/rules vendored
View File

@@ -1,7 +1,7 @@
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/simple-patchsys.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/gnome.mk
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
@@ -9,5 +9,19 @@ include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
GNOME_MODULE := libgtop
SHARED_PKG := libgtop2-7
LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed
DEB_DH_MAKESHLIBS_ARGS_ALL += -V 'libgtop2-7 (>= 2.23.2)'
DEB_DH_MAKESHLIBS_ARGS_ALL += -V '$(SHARED_PKG) (>= 2.23.2)'
DEB_CONFIGURE_EXTRA_FLAGS += --libexecdir=/usr/lib/$(SHARED_PKG)
DEB_FIXPERMS_EXCLUDE += libgtop_server2
ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
install/$(SHARED_PKG)::
# The server is only necessary on kFreeBSD
dh_install --autodest -p$(SHARED_PKG) \
--ignore=debian/$(SHARED_PKG).install \
debian/tmp/usr/lib/*/libgtop_server2
endif