Compare commits
21 Commits
debian/2.3
...
debian/2.3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7483a0e1c3 | ||
|
|
b9d20f97ec | ||
|
|
500c3e4a1b | ||
|
|
07ea5230b9 | ||
|
|
2187316edc | ||
|
|
97a6e055ae | ||
|
|
30c1b788e2 | ||
|
|
369c4532fa | ||
|
|
8927cb519a | ||
|
|
7ea0f6c596 | ||
|
|
f5c2b2fcda | ||
|
|
a8b9cb1fd7 | ||
|
|
d1c322e4bf | ||
|
|
36d0a923a3 | ||
|
|
b8a6ab75eb | ||
|
|
739cb3f18a | ||
|
|
7249142b44 | ||
|
|
46a1527168 | ||
|
|
2bc4d27b75 | ||
|
|
fed10e2ec4 | ||
|
|
d2a01814c3 |
43
debian/changelog
vendored
43
debian/changelog
vendored
@@ -1,3 +1,46 @@
|
||||
libgtop2 (2.34.2-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
|
||||
-- Emilio Pozuelo Monfort <pochu@debian.org> Mon, 16 Jan 2017 20:09:58 +0100
|
||||
|
||||
libgtop2 (2.34.1-2) unstable; urgency=medium
|
||||
|
||||
* Also use dh gir addon to properly generate dependencies.
|
||||
|
||||
-- Andreas Henriksson <andreas@fatal.se> Wed, 31 Aug 2016 13:41:37 +0200
|
||||
|
||||
libgtop2 (2.34.1-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Update build-dependencies according to configure.ac changes:
|
||||
- drop intltool
|
||||
* Convert from cdbs to dh
|
||||
* Add debian/docs to install AUTHORS NEWS README
|
||||
|
||||
-- Andreas Henriksson <andreas@fatal.se> Wed, 31 Aug 2016 10:20:31 +0200
|
||||
|
||||
libgtop2 (2.34.0-1) unstable; urgency=medium
|
||||
|
||||
* New upstream release.
|
||||
* Bump Standards-Version to 3.9.8.
|
||||
|
||||
-- Michael Biebl <biebl@debian.org> Fri, 15 Apr 2016 00:51:56 +0200
|
||||
|
||||
libgtop2 (2.32.0-1) unstable; 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> Thu, 08 Oct 2015 00:12:49 +0200
|
||||
|
||||
libgtop2 (2.30.0-3) unstable; urgency=medium
|
||||
|
||||
* Upload to unstable.
|
||||
|
||||
-- Michael Biebl <biebl@debian.org> Tue, 16 Jun 2015 00:10:47 +0200
|
||||
|
||||
libgtop2 (2.30.0-2) experimental; urgency=medium
|
||||
|
||||
* Fix build failure on kFreeBSD due to undeclared '__FreeBSD_version',
|
||||
|
||||
8
debian/control
vendored
8
debian/control
vendored
@@ -6,7 +6,7 @@ Source: libgtop2
|
||||
Section: libs
|
||||
Priority: optional
|
||||
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
|
||||
Uploaders: Andreas Henriksson <andreas@fatal.se>, Martin Pitt <mpitt@debian.org>, Michael Biebl <biebl@debian.org>, Sebastian Dröge <slomo@debian.org>
|
||||
Uploaders: Andreas Henriksson <andreas@fatal.se>, Emilio Pozuelo Monfort <pochu@debian.org>, Michael Biebl <biebl@debian.org>
|
||||
Build-Depends: debhelper (>= 9),
|
||||
gettext,
|
||||
pkg-config,
|
||||
@@ -14,9 +14,7 @@ Build-Depends: debhelper (>= 9),
|
||||
libglib2.0-dev (>= 2.6.0),
|
||||
gnome-pkg-tools (>= 0.10),
|
||||
dh-autoreconf,
|
||||
cdbs (>= 0.4.93),
|
||||
texinfo,
|
||||
intltool (>= 0.35.0),
|
||||
libxt-dev,
|
||||
libgeom-dev [kfreebsd-any],
|
||||
libdevstat-dev [kfreebsd-any],
|
||||
@@ -25,9 +23,9 @@ Build-Depends: debhelper (>= 9),
|
||||
gtk-doc-tools (>= 1.4),
|
||||
gobject-introspection (>= 0.6.7),
|
||||
libgirepository1.0-dev (>= 0.10.7-1~)
|
||||
Standards-Version: 3.9.6
|
||||
Standards-Version: 3.9.8
|
||||
Vcs-Svn: svn://anonscm.debian.org/pkg-gnome/desktop/unstable/libgtop2
|
||||
Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/libgtop2
|
||||
Vcs-Browser: https://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/libgtop2
|
||||
|
||||
Package: libgtop-2.0-10
|
||||
Architecture: any
|
||||
|
||||
6
debian/control.in
vendored
6
debian/control.in
vendored
@@ -10,9 +10,7 @@ Build-Depends: debhelper (>= 9),
|
||||
libglib2.0-dev (>= 2.6.0),
|
||||
gnome-pkg-tools (>= 0.10),
|
||||
dh-autoreconf,
|
||||
cdbs (>= 0.4.93),
|
||||
texinfo,
|
||||
intltool (>= 0.35.0),
|
||||
libxt-dev,
|
||||
libgeom-dev [kfreebsd-any],
|
||||
libdevstat-dev [kfreebsd-any],
|
||||
@@ -21,9 +19,9 @@ Build-Depends: debhelper (>= 9),
|
||||
gtk-doc-tools (>= 1.4),
|
||||
gobject-introspection (>= 0.6.7),
|
||||
libgirepository1.0-dev (>= 0.10.7-1~)
|
||||
Standards-Version: 3.9.6
|
||||
Standards-Version: 3.9.8
|
||||
Vcs-Svn: svn://anonscm.debian.org/pkg-gnome/desktop/unstable/libgtop2
|
||||
Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/libgtop2
|
||||
Vcs-Browser: https://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/libgtop2
|
||||
|
||||
Package: libgtop-2.0-10
|
||||
Architecture: any
|
||||
|
||||
2
debian/copyright
vendored
2
debian/copyright
vendored
@@ -3,7 +3,7 @@ then Martin Schulze <joey@debian.org> in October 1998
|
||||
then Ian Lynagh <igloo@debian.org> in November 1998
|
||||
then Noel Koethe <noel@debian.org> in December 2001
|
||||
|
||||
It was downloaded from http://ftp.gnome.org/pub/GNOME/sources/libgtop/
|
||||
It was downloaded from https://download.gnome.org/sources/libgtop/
|
||||
|
||||
Upstream Authors:
|
||||
Martin Baulig (martin@home-of-linux.org)
|
||||
|
||||
4
debian/libgtop2-5.docs → debian/docs
vendored
4
debian/libgtop2-5.docs → debian/docs
vendored
@@ -1,3 +1,3 @@
|
||||
README
|
||||
NEWS
|
||||
AUTHORS
|
||||
NEWS
|
||||
README
|
||||
7
debian/libgtop-2.0-10.symbols
vendored
7
debian/libgtop-2.0-10.symbols
vendored
@@ -58,6 +58,7 @@ libgtop-2.0.so.10 libgtop-2.0-10 #MINVER#
|
||||
glibtop_get_sysdeps@Base 2.22.3
|
||||
glibtop_get_sysdeps_r@Base 2.22.3
|
||||
glibtop_get_sysinfo@Base 2.22.3
|
||||
glibtop_get_type@Base 2.32.0
|
||||
glibtop_get_uptime@Base 2.22.3
|
||||
glibtop_get_uptime_l@Base 2.22.3
|
||||
glibtop_global_server@Base 2.22.3
|
||||
@@ -65,7 +66,13 @@ libgtop-2.0.so.10 libgtop-2.0-10 #MINVER#
|
||||
glibtop_init_r@Base 2.22.3
|
||||
glibtop_internet_addr@Base 2.22.3
|
||||
glibtop_make_connection@Base 2.22.3
|
||||
glibtop_map_entry_get_type@Base 2.32.0
|
||||
glibtop_mountentry_get_type@Base 2.32.0
|
||||
glibtop_mountlist_get_type@Base 2.32.0
|
||||
glibtop_open_files_entry_get_type@Base 2.32.0
|
||||
glibtop_open_l@Base 2.22.3
|
||||
glibtop_proc_map_get_type@Base 2.32.0
|
||||
glibtop_proc_open_files_get_type@Base 2.32.0
|
||||
glibtop_server_features@Base 2.22.3
|
||||
glibtop_set_parameter_l@Base 2.22.3
|
||||
glibtop_sys_siglist@Base 2.22.3
|
||||
|
||||
34
debian/libgtop-config.1
vendored
34
debian/libgtop-config.1
vendored
@@ -1,34 +0,0 @@
|
||||
.TH GTOP l "15 September 1999"
|
||||
.SH NAME
|
||||
\fBlibgtop-config\fP \- libgtop libraries and component information retrieval.
|
||||
.SH SYNTAX
|
||||
.B libgtop-config
|
||||
.RI [ --version ]
|
||||
.RI [ --config ]
|
||||
.RI [ --features-def-file ]
|
||||
.SH DESCRIPTION
|
||||
.B libgtop-config
|
||||
is used to retrieve information from installed libraries in the system.
|
||||
|
||||
This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page.
|
||||
.LP
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-\-version
|
||||
.PD
|
||||
Prints the version of libgtop that you're using.
|
||||
.TP
|
||||
.B \-\-config
|
||||
.PD
|
||||
Prints the location of libgtopConf.sh.
|
||||
.TP
|
||||
.B \-\-version
|
||||
.PD
|
||||
Prints the location of libgtop-features.def.
|
||||
.SH BUGS
|
||||
None known
|
||||
|
||||
.SH AUTHORS
|
||||
Martin Baulig (martin@home-of-linux.org)
|
||||
.TP
|
||||
Josh Sled (jsled@scam.XCF.Berkeley.EDU)
|
||||
4
debian/libgtop-dev.postinst
vendored
4
debian/libgtop-dev.postinst
vendored
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
2
debian/libgtop2-5.install
vendored
2
debian/libgtop2-5.install
vendored
@@ -1,2 +0,0 @@
|
||||
debian/tmp/usr/share/locale/*
|
||||
debian/tmp/usr/lib/*.so.*
|
||||
8
debian/libgtop2-5.postinst
vendored
8
debian/libgtop2-5.postinst
vendored
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
ldconfig
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
8
debian/libgtop2-5.postrm
vendored
8
debian/libgtop2-5.postrm
vendored
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$1" = "remove" ]; then
|
||||
ldconfig
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
2
debian/libgtop2-7.install
vendored
2
debian/libgtop2-7.install
vendored
@@ -1 +1 @@
|
||||
debian/tmp/usr/lib/*.so.*
|
||||
usr/lib/*.so.*
|
||||
|
||||
71
debian/libgtop2-7.symbols
vendored
Normal file
71
debian/libgtop2-7.symbols
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
libgtop-2.0.so.7 libgtop2-7 #MINVER#
|
||||
glibtop_call_l@Base 2.22.3
|
||||
glibtop_close@Base 2.22.3
|
||||
glibtop_close_r@Base 2.22.3
|
||||
glibtop_get_cpu@Base 2.22.3
|
||||
glibtop_get_cpu_l@Base 2.22.3
|
||||
glibtop_get_fsusage@Base 2.22.3
|
||||
glibtop_get_fsusage_l@Base 2.22.3
|
||||
glibtop_get_loadavg@Base 2.22.3
|
||||
glibtop_get_loadavg_l@Base 2.22.3
|
||||
glibtop_get_mem@Base 2.22.3
|
||||
glibtop_get_mem_l@Base 2.22.3
|
||||
glibtop_get_mountlist@Base 2.22.3
|
||||
glibtop_get_mountlist_l@Base 2.22.3
|
||||
glibtop_get_msg_limits@Base 2.22.3
|
||||
glibtop_get_msg_limits_l@Base 2.22.3
|
||||
glibtop_get_netlist@Base 2.22.3
|
||||
glibtop_get_netlist_l@Base 2.22.3
|
||||
glibtop_get_netload@Base 2.22.3
|
||||
glibtop_get_netload_l@Base 2.22.3
|
||||
glibtop_get_parameter_l@Base 2.22.3
|
||||
glibtop_get_ppp@Base 2.22.3
|
||||
glibtop_get_ppp_l@Base 2.22.3
|
||||
glibtop_get_proc_affinity@Base 2.24.0
|
||||
glibtop_get_proc_affinity_l@Base 2.24.0
|
||||
glibtop_get_proc_args@Base 2.22.3
|
||||
glibtop_get_proc_args_l@Base 2.22.3
|
||||
glibtop_get_proc_argv@Base 2.22.3
|
||||
glibtop_get_proc_argv_l@Base 2.22.3
|
||||
glibtop_get_proc_kernel@Base 2.22.3
|
||||
glibtop_get_proc_kernel_l@Base 2.22.3
|
||||
glibtop_get_proc_map@Base 2.22.3
|
||||
glibtop_get_proc_map_l@Base 2.22.3
|
||||
glibtop_get_proc_mem@Base 2.22.3
|
||||
glibtop_get_proc_mem_l@Base 2.22.3
|
||||
glibtop_get_proc_open_files@Base 2.22.3
|
||||
glibtop_get_proc_open_files_l@Base 2.22.3
|
||||
glibtop_get_proc_segment@Base 2.22.3
|
||||
glibtop_get_proc_segment_l@Base 2.22.3
|
||||
glibtop_get_proc_signal@Base 2.22.3
|
||||
glibtop_get_proc_signal_l@Base 2.22.3
|
||||
glibtop_get_proc_state@Base 2.22.3
|
||||
glibtop_get_proc_state_l@Base 2.22.3
|
||||
glibtop_get_proc_time@Base 2.22.3
|
||||
glibtop_get_proc_time_l@Base 2.22.3
|
||||
glibtop_get_proc_uid@Base 2.22.3
|
||||
glibtop_get_proc_uid_l@Base 2.22.3
|
||||
glibtop_get_proc_wd@Base 2.22.3
|
||||
glibtop_get_proc_wd_l@Base 2.22.3
|
||||
glibtop_get_proclist@Base 2.22.3
|
||||
glibtop_get_proclist_l@Base 2.22.3
|
||||
glibtop_get_sem_limits@Base 2.22.3
|
||||
glibtop_get_sem_limits_l@Base 2.22.3
|
||||
glibtop_get_shm_limits@Base 2.22.3
|
||||
glibtop_get_shm_limits_l@Base 2.22.3
|
||||
glibtop_get_swap@Base 2.22.3
|
||||
glibtop_get_swap_l@Base 2.22.3
|
||||
glibtop_get_sysdeps@Base 2.22.3
|
||||
glibtop_get_sysdeps_r@Base 2.22.3
|
||||
glibtop_get_sysinfo@Base 2.22.3
|
||||
glibtop_get_uptime@Base 2.22.3
|
||||
glibtop_get_uptime_l@Base 2.22.3
|
||||
glibtop_global_server@Base 2.22.3
|
||||
glibtop_init@Base 2.22.3
|
||||
glibtop_init_r@Base 2.22.3
|
||||
glibtop_internet_addr@Base 2.22.3
|
||||
glibtop_make_connection@Base 2.22.3
|
||||
glibtop_open_l@Base 2.22.3
|
||||
glibtop_server_features@Base 2.22.3
|
||||
glibtop_set_parameter_l@Base 2.22.3
|
||||
glibtop_sys_siglist@Base 2.22.3
|
||||
1
debian/libgtop2-dev.info
vendored
1
debian/libgtop2-dev.info
vendored
@@ -1 +0,0 @@
|
||||
doc/libgtop2.info
|
||||
178
debian/patches/02_hurd_stub_backend.patch
vendored
178
debian/patches/02_hurd_stub_backend.patch
vendored
@@ -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;
|
||||
+}
|
||||
38
debian/patches/03_kfreebsd_installdirs.patch
vendored
38
debian/patches/03_kfreebsd_installdirs.patch
vendored
@@ -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
|
||||
|
||||
22
debian/patches/06_kfreebsd_sys_pipe.patch
vendored
Normal file
22
debian/patches/06_kfreebsd_sys_pipe.patch
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Description: Don't include sys/pipe.h on kFreeBSD
|
||||
Defining _KERNEL to include sys/pipe.h subsequently breaks sys/conf.h;
|
||||
since sys/pipe.h is not meant to be used in userland, and libgtop2 builds
|
||||
anyway on kFreeBSD without it, don't include it.
|
||||
Author: Steven Chamberlain <steven@pyro.eu.org>
|
||||
Bug-Debian: http://bugs.debian.org/667984
|
||||
|
||||
Index: libgtop2-2.28.4/sysdeps/freebsd/procmap.c
|
||||
===================================================================
|
||||
--- libgtop2-2.28.4.orig/sysdeps/freebsd/procmap.c 2012-04-07 22:49:20.000000000 +0100
|
||||
+++ libgtop2-2.28.4/sysdeps/freebsd/procmap.c 2012-04-07 22:51:00.163079809 +0100
|
||||
@@ -38,10 +38,7 @@
|
||||
#include <sys/vnode.h>
|
||||
#undef _KVM_VNODE
|
||||
|
||||
-#define _KERNEL
|
||||
-#include <sys/pipe.h>
|
||||
#include <sys/conf.h>
|
||||
-#undef _KERNEL
|
||||
#if (__FreeBSD_version >= 800038) || (__FreeBSD_kernel_version >= 800038)
|
||||
#define _WANT_FILE
|
||||
#include <sys/file.h>
|
||||
643
debian/patches/10_kfreebsd.patch
vendored
Normal file
643
debian/patches/10_kfreebsd.patch
vendored
Normal file
@@ -0,0 +1,643 @@
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/procsignal.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/procsignal.c
|
||||
@@ -70,7 +70,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013)
|
||||
+#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500013)) || defined(__FreeBSD_kernel__)
|
||||
|
||||
#define PROC_SIGLIST ki_siglist
|
||||
#define PROC_SIGMASK ki_sigmask
|
||||
@@ -92,7 +92,7 @@
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000)
|
||||
buf->signal [0] = pinfo [0].kp_proc.p_sigctx.ps_siglist.__bits[0];
|
||||
#elif (defined(__NetBSD__) && (NSIG > 32)) || \
|
||||
- (defined(__FreeBSD__) && (__FreeBSD_version >= 400011))
|
||||
+ (defined(__FreeBSD__) && (__FreeBSD_version >= 400011) || defined(__FreeBSD_kernel__))
|
||||
buf->signal [0] = pinfo [0].PROC_SIGLIST.__bits[0];
|
||||
#else
|
||||
buf->signal [0] = pinfo [0].kp_proc.p_siglist;
|
||||
@@ -104,7 +104,7 @@
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000)
|
||||
buf->blocked [0] = pinfo [0].kp_proc.p_sigctx.ps_sigmask.__bits[0];
|
||||
#elif (defined(__NetBSD__) && (NSIG > 32)) || \
|
||||
- (defined(__FreeBSD__) && (__FreeBSD_version >= 400011))
|
||||
+ (defined(__FreeBSD__) && (__FreeBSD_version >= 400011) || defined(__FreeBSD_kernel__))
|
||||
buf->blocked [0] = pinfo [0].PROC_SIGMASK.__bits[0];
|
||||
#else
|
||||
buf->blocked [0] = pinfo [0].kp_proc.p_sigmask;
|
||||
@@ -116,7 +116,7 @@
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000)
|
||||
buf->sigignore [0] = pinfo [0].kp_proc.p_sigctx.ps_sigignore.__bits[0];
|
||||
#elif (defined(__NetBSD__) && (NSIG > 32)) || \
|
||||
- (defined(__FreeBSD__) && (__FreeBSD_version >= 400011))
|
||||
+ (defined(__FreeBSD__) && (__FreeBSD_version >= 400011) || defined(__FreeBSD_kernel__))
|
||||
buf->sigignore [0] = pinfo [0].PROC_SIGIGNORE.__bits[0];
|
||||
#else
|
||||
buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore;
|
||||
@@ -128,7 +128,7 @@
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000)
|
||||
buf->sigcatch [0] = pinfo [0].kp_proc.p_sigctx.ps_sigcatch.__bits[0];
|
||||
#elif (defined(__NetBSD__) && (NSIG > 32)) || \
|
||||
- (defined(__FreeBSD__) && (__FreeBSD_version >= 400011))
|
||||
+ (defined(__FreeBSD__) && (__FreeBSD_version >= 400011) || defined(__FreeBSD_kernel__))
|
||||
buf->sigcatch [0] = pinfo [0].PROC_SIGCATCH.__bits[0];
|
||||
#else
|
||||
buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch;
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/mem.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/mem.c
|
||||
@@ -43,7 +43,7 @@
|
||||
(1L << GLIBTOP_MEM_FREE) +
|
||||
(1L << GLIBTOP_MEM_SHARED) +
|
||||
(1L << GLIBTOP_MEM_BUFFER) +
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
(1L << GLIBTOP_MEM_CACHED) +
|
||||
#endif
|
||||
(1L << GLIBTOP_MEM_USER) + (1L << GLIBTOP_MEM_LOCKED);
|
||||
@@ -66,7 +66,7 @@
|
||||
#else
|
||||
#if defined(__bsdi__)
|
||||
{ "_bufcachemem" },
|
||||
-#elif defined(__FreeBSD__)
|
||||
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
{ "_bufspace" },
|
||||
#else
|
||||
{ "_bufpages" },
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
/* convert memory stats to Kbytes */
|
||||
|
||||
-#if defined(__FreeBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
v_total_count = vmm.v_page_count;
|
||||
#else
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) || defined(__OpenBSD__)
|
||||
@@ -198,7 +198,7 @@
|
||||
buf->used = (guint64) pagetok (v_used_count) << LOG1024;
|
||||
buf->free = (guint64) pagetok (v_free_count) << LOG1024;
|
||||
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
buf->cached = (guint64) pagetok (vmm.v_cache_count) << LOG1024;
|
||||
#endif
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
buf->shared = (guint64) pagetok (vmt.t_rmshr) << LOG1024;
|
||||
|
||||
-#if __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
buf->buffer = (guint64) bufspace;
|
||||
#else
|
||||
buf->buffer = (guint64) pagetok (bufspace) << LOG1024;
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/procstate.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/procstate.c
|
||||
@@ -73,7 +73,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013)
|
||||
+#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500013)) || defined(__FreeBSD_kernel__)
|
||||
#define PROC_COMM ki_comm
|
||||
#define PROC_SVUID ki_svuid
|
||||
#define PROC_SVGID ki_svgid
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/fsusage.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/fsusage.c
|
||||
@@ -46,9 +46,9 @@
|
||||
if (result == -1) {
|
||||
return;
|
||||
}
|
||||
-
|
||||
+#if !defined(__FreeBSD_kernel__)
|
||||
buf->read = sfs.f_syncreads + sfs.f_asyncreads;
|
||||
buf->write = sfs.f_syncwrites + sfs.f_asyncwrites;
|
||||
-
|
||||
+#endif
|
||||
buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
|
||||
}
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/swap.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/swap.c
|
||||
@@ -33,13 +33,13 @@
|
||||
(1L << GLIBTOP_SWAP_FREE) + (1L << GLIBTOP_SWAP_PAGEIN) +
|
||||
(1L << GLIBTOP_SWAP_PAGEOUT);
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__bsdi__)
|
||||
+#if defined(__FreeBSD__) || defined(__bsdi__) || defined(__FreeBSD_kernel__)
|
||||
|
||||
#include <sys/conf.h>
|
||||
#ifdef __bsdi__
|
||||
#include <vm/swap_pager.h>
|
||||
#else
|
||||
-#if __FreeBSD_version < 400005
|
||||
+#if (__FreeBSD_version < 400005) && !defined(__FreeBSD_kernel__)
|
||||
#include <sys/rlist.h>
|
||||
#endif
|
||||
#endif
|
||||
@@ -94,7 +94,7 @@
|
||||
void
|
||||
glibtop_init_swap_p (glibtop *server)
|
||||
{
|
||||
-#if defined(__FreeBSD__) || defined(__bsdi__)
|
||||
+#if defined(__FreeBSD__) || defined(__bsdi__) || defined(__FreeBSD_kernel__)
|
||||
#if __FreeBSD__ < 4 || defined(__bsdi__)
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (swap)");
|
||||
@@ -130,9 +130,9 @@
|
||||
void
|
||||
glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
|
||||
{
|
||||
-#if defined(__FreeBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
|
||||
-# if __FreeBSD__ < 4
|
||||
+# if (__FreeBSD__ < 4) && !defined(__FreeBSD_kernel__)
|
||||
char *header;
|
||||
int hlen, nswdev, dmmax;
|
||||
int div, nfree, npfree;
|
||||
@@ -194,7 +194,7 @@
|
||||
buf->pagein = 0;
|
||||
buf->pageout = 0;
|
||||
} else {
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
buf->pagein = vmm.v_swappgsin - swappgsin;
|
||||
buf->pageout = vmm.v_swappgsout - swappgsout;
|
||||
#else
|
||||
@@ -208,7 +208,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
swappgsin = vmm.v_swappgsin;
|
||||
swappgsout = vmm.v_swappgsout;
|
||||
#else
|
||||
@@ -221,9 +221,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#if defined(__FreeBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
|
||||
-#if __FreeBSD__ < 4
|
||||
+#if (__FreeBSD__ < 4) && !defined(__FreeBSD_kernel__)
|
||||
|
||||
/* Size of largest swap device. */
|
||||
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/procmap.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/procmap.c
|
||||
@@ -41,18 +41,18 @@
|
||||
#else
|
||||
#include <vm/vm_object.h>
|
||||
#include <vm/vm_map.h>
|
||||
-#if (__FreeBSD_version >= 400011)
|
||||
+#if (__FreeBSD_version >= 400011) || defined(__FreeBSD_kernel__)
|
||||
#include <vm/vm.h>
|
||||
#else
|
||||
#include <vm/vm_prot.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#define _KVM_VNODE
|
||||
#endif
|
||||
#include <sys/vnode.h>
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#undef _KVM_VNODE
|
||||
#endif
|
||||
#include <sys/mount.h>
|
||||
@@ -109,9 +109,9 @@
|
||||
struct vm_object object;
|
||||
#endif
|
||||
glibtop_map_entry *maps;
|
||||
-#if defined __FreeBSD__
|
||||
+#if (defined __FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
struct vnode vnode;
|
||||
-#if __FreeBSD_version < 500039
|
||||
+#if (__FreeBSD_version < 500039) && !defined(__FreeBSD_kernel__)
|
||||
struct inode inode;
|
||||
#endif
|
||||
#endif
|
||||
@@ -137,7 +137,7 @@
|
||||
/* Now we get the memory maps. */
|
||||
|
||||
if (kvm_read (server->machine.kd,
|
||||
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013)
|
||||
+#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500013)) || defined(__FreeBSD_kernel__)
|
||||
(unsigned long) pinfo [0].ki_vmspace,
|
||||
#else
|
||||
(unsigned long) pinfo [0].kp_proc.p_vmspace,
|
||||
@@ -179,8 +179,8 @@
|
||||
update = 1;
|
||||
}
|
||||
|
||||
-#ifdef __FreeBSD__
|
||||
-#if __FreeBSD__ >= 4
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
+#if (__FreeBSD__ >= 4) || defined(__FreeBSD_kernel__)
|
||||
if (entry.eflags & (MAP_ENTRY_IS_SUB_MAP))
|
||||
continue;
|
||||
#else
|
||||
@@ -256,7 +256,7 @@
|
||||
#endif
|
||||
|
||||
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
/* If the object is of type vnode, add its size */
|
||||
|
||||
if (object.type != OBJT_VNODE)
|
||||
@@ -270,10 +270,10 @@
|
||||
&vnode, sizeof (vnode)) != sizeof (vnode))
|
||||
glibtop_error_io_r (server, "kvm_read (vnode)");
|
||||
|
||||
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500039)
|
||||
+#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500039)) || defined(__FreeBSD_kernel__)
|
||||
switch (vnode.v_type) {
|
||||
case VREG:
|
||||
-#if __FreeBSD_version < 600006
|
||||
+#if (__FreeBSD_version < 600006) && !defined(__FreeBSD_kernel__)
|
||||
maps [i-1].inode = vnode.v_cachedid;
|
||||
maps [i-1].device = vnode.v_cachedfs;
|
||||
#endif
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/procmem.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/procmem.c
|
||||
@@ -73,7 +73,7 @@
|
||||
static const unsigned long _glibtop_sysdeps_proc_mem_share =
|
||||
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
|
||||
(1L << GLIBTOP_PROC_MEM_SHARE);
|
||||
-#elif defined(__FreeBSD__)
|
||||
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
(1L << GLIBTOP_PROC_MEM_SHARE);
|
||||
#else
|
||||
0;
|
||||
@@ -126,7 +126,7 @@
|
||||
#else
|
||||
struct vm_object object;
|
||||
#endif
|
||||
-#if !defined(__FreeBSD__) || (__FreeBSD_version < 500013)
|
||||
+#if (!defined(__FreeBSD__) || (__FreeBSD_version < 500013)) && !defined(__FreeBSD_kernel__)
|
||||
struct plimit plimit;
|
||||
#endif
|
||||
int count;
|
||||
@@ -147,7 +147,7 @@
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013)
|
||||
+#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500013)) || defined(__FreeBSD_kernel__)
|
||||
|
||||
#define PROC_VMSPACE ki_vmspace
|
||||
|
||||
@@ -214,8 +214,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
-#ifdef __FreeBSD__
|
||||
-#if __FreeBSD__ >= 4
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
+#if (__FreeBSD__ >= 4) || defined(__FreeBSD_kernel__)
|
||||
if (entry.eflags & (MAP_ENTRY_IS_SUB_MAP))
|
||||
continue;
|
||||
#else
|
||||
@@ -282,7 +282,7 @@
|
||||
#endif /* __NetBSD_Version__ >= 105250000 */
|
||||
#endif
|
||||
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
if (object.type != OBJT_VNODE)
|
||||
continue;
|
||||
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/prockernel.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/prockernel.c
|
||||
@@ -36,7 +36,7 @@
|
||||
#include <sys/user.h>
|
||||
#endif
|
||||
#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__)) && \
|
||||
- !defined(__NetBSD__)
|
||||
+ !defined(__NetBSD__)
|
||||
#include <machine/pcb.h>
|
||||
#endif
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
pid_t pid)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
-#ifndef __FreeBSD__
|
||||
+#if !(defined(__FreeBSD__) || defined(__FreeBSD_kernel__))
|
||||
struct user *u_addr = (struct user *)USRSTACK;
|
||||
struct pstats pstats;
|
||||
struct pcb pcb;
|
||||
@@ -119,7 +119,7 @@
|
||||
if ((pinfo == NULL) || (count != 1))
|
||||
glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
|
||||
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013)
|
||||
+#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500013)) || defined(__FreeBSD_kernel__)
|
||||
|
||||
#define PROC_WCHAN ki_wchan
|
||||
#define PROC_WMESG ki_wmesg
|
||||
@@ -147,7 +147,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifndef __FreeBSD__
|
||||
+#if !(defined(__FreeBSD__) || defined(__FreeBSD_kernel__))
|
||||
|
||||
/* Taken from `saveuser ()' in `/usr/src/bin/ps/ps.c'. */
|
||||
|
||||
@@ -203,9 +203,9 @@
|
||||
(unsigned long) &u_addr->u_pcb,
|
||||
(char *) &pcb, sizeof (pcb)) == sizeof (pcb))
|
||||
{
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#ifndef __alpha__
|
||||
-#if (__FreeBSD_version >= 300003)
|
||||
+#if (__FreeBSD_version >= 300003) || defined(__FreeBSD_kernel__)
|
||||
buf->kstk_esp = (guint64) pcb.pcb_esp;
|
||||
buf->kstk_eip = (guint64) pcb.pcb_eip;
|
||||
#else
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/procuid.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/procuid.c
|
||||
@@ -77,7 +77,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013)
|
||||
+#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500013)) || defined(__FreeBSD_kernel__)
|
||||
|
||||
#define PROC_RUID ki_ruid
|
||||
#define PROC_SVUID ki_svuid
|
||||
@@ -87,12 +87,8 @@
|
||||
#define PROC_PGID ki_pgid
|
||||
#define PROC_TPGID ki_tpgid
|
||||
#define PROC_NICE ki_nice
|
||||
-#if __FreeBSD_version >= 500013
|
||||
#define PROC_PRIORITY ki_pri.pri_user
|
||||
#else
|
||||
-#define PROC_PRIORITY ki_priority
|
||||
-#endif
|
||||
-#else
|
||||
|
||||
#define PROC_RUID kp_eproc.e_pcred.p_ruid
|
||||
#define PROC_SVUID kp_eproc.e_pcred.p_svuid
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/proclist.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/proclist.c
|
||||
@@ -86,7 +86,7 @@
|
||||
pids = g_realloc (pids, count * sizeof (unsigned));
|
||||
/* Copy the pids over to this chain */
|
||||
for (i=j=0; i < count; i++) {
|
||||
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013)
|
||||
+#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500013)) || defined(__FreeBSD_kernel__)
|
||||
#define PROC_STAT ki_stat
|
||||
#define PROC_RUID ki_ruid
|
||||
#define PROC_PID ki_pid
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/sysdeps/freebsd/proctime.c
|
||||
+++ libgtop2-2.14.4/sysdeps/freebsd/proctime.c
|
||||
@@ -58,9 +58,8 @@
|
||||
* system, and interrupt time usage.
|
||||
*/
|
||||
|
||||
-#ifndef __FreeBSD__
|
||||
+#if !(defined(__FreeBSD__) || defined(__FreeBSD_kernel__))
|
||||
|
||||
-#ifndef __FreeBSD__
|
||||
static void
|
||||
calcru(p, up, sp, ip)
|
||||
struct proc *p;
|
||||
@@ -109,8 +108,6 @@
|
||||
ip->tv_usec = it % 1000000;
|
||||
}
|
||||
}
|
||||
-#endif
|
||||
-
|
||||
#endif /* !__FreeBSD__ */
|
||||
|
||||
/* Provides detailed information about a process. */
|
||||
@@ -145,7 +142,7 @@
|
||||
if ((pinfo == NULL) || (count != 1))
|
||||
glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
|
||||
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013)
|
||||
+#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500013)) || defined(__FreeBSD_kernel__)
|
||||
buf->rtime = pinfo [0].ki_runtime;
|
||||
#elif (defined __FreeBSD__) && (__FreeBSD_version <= 500013)
|
||||
buf->rtime = pinfo [0].kp_proc.p_runtime;
|
||||
@@ -182,8 +179,8 @@
|
||||
|
||||
buf->flags |= _glibtop_sysdeps_proc_time_user;
|
||||
#else
|
||||
-#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013)
|
||||
-#if __FreeBSD_version >= 500016
|
||||
+#if (defined(__FreeBSD__) && (__FreeBSD_version >= 500013)) || defined(__FreeBSD_kernel__)
|
||||
+#if (__FreeBSD_version >= 500016) || defined(__FreeBSD_kernel__)
|
||||
if ((pinfo [0].ki_flag & PS_INMEM)) {
|
||||
#else
|
||||
if ((pinfo [0].ki_flag & P_INMEM)) {
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/libgtop-sysdeps.m4
|
||||
+++ libgtop2-2.14.4/libgtop-sysdeps.m4
|
||||
@@ -64,7 +64,7 @@
|
||||
libgtop_have_sysinfo=yes
|
||||
libgtop_need_server=no
|
||||
;;
|
||||
- freebsd*|netbsd*|openbsd*|bsdi*)
|
||||
+ freebsd*|netbsd*|openbsd*|bsdi*|kfreebsd*)
|
||||
libgtop_sysdeps_dir=freebsd
|
||||
libgtop_use_machine_h=yes
|
||||
libgtop_need_server=yes
|
||||
@@ -122,7 +122,13 @@
|
||||
|
||||
case "$host_os" in
|
||||
*bsd*)
|
||||
- AC_CHECK_LIB(kvm, kvm_open, KVM_LIBS=-lkvm, KVM_LIBS=)
|
||||
+ case "$host_os" in
|
||||
+ *kfreebsd*)
|
||||
+ AC_CHECK_LIB(kvm, kvm_open, KVM_LIBS="-lkvm -lfreebsd -lbsd", KVM_LIBS=, -lfreebsd -lbsd);;
|
||||
+ *)
|
||||
+ AC_CHECK_LIB(kvm, kvm_open, KVM_LIBS=-lkvm, KVM_LIBS=);;
|
||||
+ esac
|
||||
+
|
||||
AC_SUBST(KVM_LIBS)
|
||||
|
||||
AC_CHECK_HEADERS(net/if_var.h)
|
||||
@@ -141,7 +147,7 @@
|
||||
#include <net/netisr.h>
|
||||
#include <net/route.h>
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__FreeBSD_kernel__)
|
||||
#include <net/if_sppp.h>
|
||||
#else
|
||||
#include <i4b/sppp/if_sppp.h>
|
||||
@@ -167,7 +173,7 @@
|
||||
#include <net/netisr.h>
|
||||
#include <net/route.h>
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__FreeBSD_kernel__)
|
||||
#include <net/if_sppp.h>
|
||||
#else
|
||||
#include <i4b/sppp/if_sppp.h>
|
||||
only in patch2:
|
||||
unchanged:
|
||||
--- libgtop2-2.14.4.orig/configure
|
||||
+++ libgtop2-2.14.4/configure
|
||||
@@ -21504,7 +21504,7 @@
|
||||
libgtop_have_sysinfo=yes
|
||||
libgtop_need_server=no
|
||||
;;
|
||||
- freebsd*|netbsd*|openbsd*|bsdi*)
|
||||
+ freebsd*|netbsd*|openbsd*|bsdi*|kfreebsd*)
|
||||
libgtop_sysdeps_dir=freebsd
|
||||
libgtop_use_machine_h=yes
|
||||
libgtop_need_server=yes
|
||||
@@ -21563,7 +21563,93 @@
|
||||
|
||||
case "$host_os" in
|
||||
*bsd*)
|
||||
- { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
|
||||
+ case "$host_os" in
|
||||
+ *kfreebsd*)
|
||||
+ { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
|
||||
+echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
|
||||
+if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
|
||||
+ echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
+else
|
||||
+ ac_check_lib_save_LIBS=$LIBS
|
||||
+LIBS="-lkvm -lfreebsd -lbsd $LIBS"
|
||||
+cat >conftest.$ac_ext <<_ACEOF
|
||||
+/* confdefs.h. */
|
||||
+_ACEOF
|
||||
+cat confdefs.h >>conftest.$ac_ext
|
||||
+cat >>conftest.$ac_ext <<_ACEOF
|
||||
+/* end confdefs.h. */
|
||||
+
|
||||
+/* Override any GCC internal prototype to avoid an error.
|
||||
+ Use char because int might match the return type of a GCC
|
||||
+ builtin and then its argument prototype would still apply. */
|
||||
+#ifdef __cplusplus
|
||||
+extern "C"
|
||||
+#endif
|
||||
+char kvm_open ();
|
||||
+int
|
||||
+main ()
|
||||
+{
|
||||
+return kvm_open ();
|
||||
+ ;
|
||||
+ return 0;
|
||||
+}
|
||||
+_ACEOF
|
||||
+rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
+if { (ac_try="$ac_link"
|
||||
+case "(($ac_try" in
|
||||
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
+ *) ac_try_echo=$ac_try;;
|
||||
+esac
|
||||
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
+ (eval "$ac_link") 2>conftest.er1
|
||||
+ ac_status=$?
|
||||
+ grep -v '^ *+' conftest.er1 >conftest.err
|
||||
+ rm -f conftest.er1
|
||||
+ cat conftest.err >&5
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); } &&
|
||||
+ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
+ { (case "(($ac_try" in
|
||||
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
+ *) ac_try_echo=$ac_try;;
|
||||
+esac
|
||||
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
+ (eval "$ac_try") 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; } &&
|
||||
+ { ac_try='test -s conftest$ac_exeext'
|
||||
+ { (case "(($ac_try" in
|
||||
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
+ *) ac_try_echo=$ac_try;;
|
||||
+esac
|
||||
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
+ (eval "$ac_try") 2>&5
|
||||
+ ac_status=$?
|
||||
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
+ (exit $ac_status); }; }; then
|
||||
+ ac_cv_lib_kvm_kvm_open=yes
|
||||
+else
|
||||
+ echo "$as_me: failed program was:" >&5
|
||||
+sed 's/^/| /' conftest.$ac_ext >&5
|
||||
+
|
||||
+ ac_cv_lib_kvm_kvm_open=no
|
||||
+fi
|
||||
+
|
||||
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
+ conftest$ac_exeext conftest.$ac_ext
|
||||
+LIBS=$ac_check_lib_save_LIBS
|
||||
+fi
|
||||
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
|
||||
+echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
|
||||
+if test $ac_cv_lib_kvm_kvm_open = yes; then
|
||||
+ KVM_LIBS="-lkvm -lfreebsd -lbsd"
|
||||
+else
|
||||
+ KVM_LIBS=
|
||||
+fi
|
||||
+;;
|
||||
+ *)
|
||||
+ { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
|
||||
echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
@@ -21645,6 +21731,8 @@
|
||||
else
|
||||
KVM_LIBS=
|
||||
fi
|
||||
+;;
|
||||
+ esac
|
||||
|
||||
|
||||
|
||||
@@ -21839,7 +21927,7 @@
|
||||
#include <net/netisr.h>
|
||||
#include <net/route.h>
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__FreeBSD_kernel__)
|
||||
#include <net/if_sppp.h>
|
||||
#else
|
||||
#include <i4b/sppp/if_sppp.h>
|
||||
@@ -21928,7 +22016,7 @@
|
||||
#include <net/netisr.h>
|
||||
#include <net/route.h>
|
||||
|
||||
-#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__FreeBSD_kernel__)
|
||||
#include <net/if_sppp.h>
|
||||
#else
|
||||
#include <i4b/sppp/if_sppp.h>
|
||||
108
debian/patches/20_glibtop_get_proc_map-stack-overflow.patch
vendored
Normal file
108
debian/patches/20_glibtop_get_proc_map-stack-overflow.patch
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
Index: sysdeps/linux/procmap.c
|
||||
===================================================================
|
||||
--- sysdeps/linux/procmap.c (révision 2545)
|
||||
+++ sysdeps/linux/procmap.c (révision 2546)
|
||||
@@ -38,7 +38,7 @@
|
||||
#define SMAPS_FILE "/proc/%u/smaps"
|
||||
|
||||
|
||||
-#define PROC_MAPS_FORMAT "%16llx-%16llx %4c %16llx %02hx:%02hx %llu%*[ ]%[^\n]\n"
|
||||
+#define PROC_MAPS_FORMAT "%16llx-%16llx %4c %16llx %02hx:%02hx %llu%*[ ]%n"
|
||||
|
||||
|
||||
static const unsigned long _glibtop_sysdeps_proc_map =
|
||||
@@ -132,6 +132,8 @@
|
||||
FILE *maps;
|
||||
const char *filename;
|
||||
gboolean has_smaps;
|
||||
+ char *line = NULL;
|
||||
+ size_t line_size = 0;
|
||||
|
||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0);
|
||||
|
||||
@@ -152,33 +154,29 @@
|
||||
|
||||
while(TRUE)
|
||||
{
|
||||
- char line[1024];
|
||||
-
|
||||
unsigned long perm = 0;
|
||||
- int rv;
|
||||
guint len;
|
||||
+ int line_end;
|
||||
|
||||
unsigned short dev_major, dev_minor;
|
||||
guint64 start, end, offset, inode;
|
||||
char flags[4];
|
||||
- char filename [GLIBTOP_MAP_FILENAME_LEN+1];
|
||||
+ char *filename;
|
||||
|
||||
glibtop_map_entry *entry;
|
||||
|
||||
- if (!fgets(line, sizeof line, maps))
|
||||
+ if (getline(&line, &line_size, maps) == -1)
|
||||
break;
|
||||
|
||||
/* 8 arguments */
|
||||
- rv = sscanf(line, PROC_MAPS_FORMAT,
|
||||
- &start, &end, flags, &offset,
|
||||
- &dev_major, &dev_minor, &inode, filename);
|
||||
+ if (sscanf(line, PROC_MAPS_FORMAT,
|
||||
+ &start, &end, flags, &offset,
|
||||
+ &dev_major, &dev_minor, &inode, &line_end) != 7)
|
||||
+ break;
|
||||
|
||||
- if(rv == EOF || rv < 7)
|
||||
- break;
|
||||
+ filename = line + line_end;
|
||||
+ g_strstrip(filename);
|
||||
|
||||
- if(rv == 7) /* no filename */
|
||||
- filename[0] = '\0';
|
||||
-
|
||||
/* Compute access permissions. */
|
||||
|
||||
if (flags [0] == 'r')
|
||||
@@ -217,6 +215,7 @@
|
||||
|
||||
}
|
||||
|
||||
+ free(line);
|
||||
fclose (maps);
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_map;
|
||||
Index: sysdeps/linux/procopenfiles.c
|
||||
===================================================================
|
||||
--- sysdeps/linux/procopenfiles.c (révision 2545)
|
||||
+++ sysdeps/linux/procopenfiles.c (révision 2546)
|
||||
@@ -58,7 +58,8 @@
|
||||
parse_file(const char *filename, LineParser parser, GHashTable *dict)
|
||||
{
|
||||
FILE *f;
|
||||
- char line[1024];
|
||||
+ char *line = NULL;
|
||||
+ size_t size = 0;
|
||||
|
||||
f = fopen(filename, "r");
|
||||
|
||||
@@ -67,15 +68,16 @@
|
||||
return;
|
||||
}
|
||||
|
||||
+
|
||||
/* skip the first line */
|
||||
- if(!fgets(line, sizeof line, f)) goto eof;
|
||||
+ if (getline(&line, &size, f) == -1)
|
||||
+ goto eof;
|
||||
|
||||
- while(fgets(line, sizeof line, f))
|
||||
- {
|
||||
+ while (getline(&line, &size, f) != -1)
|
||||
parser(dict, line);
|
||||
- }
|
||||
|
||||
eof:
|
||||
+ free(line);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
30
debian/patches/99_ltmain_as-needed.patch
vendored
30
debian/patches/99_ltmain_as-needed.patch
vendored
@@ -1,30 +0,0 @@
|
||||
--- 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/^ //"`
|
||||
;;
|
||||
|
||||
+ -Wl,--as-needed)
|
||||
+ deplibs="$deplibs $arg"
|
||||
+ continue
|
||||
+ ;;
|
||||
+
|
||||
-Wl,*)
|
||||
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
|
||||
arg=
|
||||
@@ -2137,6 +2142,15 @@
|
||||
lib=
|
||||
found=no
|
||||
case $deplib in
|
||||
+ -Wl,--as-needed)
|
||||
+ if test "$linkmode,$pass" = "prog,link"; then
|
||||
+ compile_deplibs="$deplib $compile_deplibs"
|
||||
+ finalize_deplibs="$deplib $finalize_deplibs"
|
||||
+ else
|
||||
+ deplibs="$deplib $deplibs"
|
||||
+ fi
|
||||
+ continue
|
||||
+ ;;
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
|
||||
if test "$linkmode,$pass" = "prog,link"; then
|
||||
compile_deplibs="$deplib $compile_deplibs"
|
||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@@ -1,3 +1,2 @@
|
||||
02_hurd_stub_backend.patch
|
||||
03_kfreebsd_installdirs.patch
|
||||
04_kfreebsd_version.patch
|
||||
|
||||
26
debian/rules
vendored
26
debian/rules
vendored
@@ -1,11 +1,6 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
include /usr/share/cdbs/1/rules/debhelper.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
|
||||
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
|
||||
include /usr/share/cdbs/1/rules/autoreconf.mk
|
||||
|
||||
GNOME_MODULE := libgtop
|
||||
|
||||
@@ -17,19 +12,28 @@ ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
|
||||
CPPFLAGS += $(shell pkg-config --cflags libbsd-overlay)
|
||||
endif
|
||||
|
||||
DEB_DH_AUTORECONF_ARGS = --as-needed
|
||||
%:
|
||||
dh $@ --with gnome,gir,autoreconf
|
||||
|
||||
DEB_DH_MAKESHLIBS_ARGS_ALL += -V '$(SHARED_PKG) (>= 2.24.0)'
|
||||
override_dh_autoreconf:
|
||||
dh_autoreconf --as-needed
|
||||
|
||||
DEB_CONFIGURE_EXTRA_FLAGS += --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
|
||||
--libexecdir=\$${libdir}/$(SHARED_PKG)
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
|
||||
--libexecdir=\$${libdir}/$(SHARED_PKG)
|
||||
|
||||
DEB_FIXPERMS_EXCLUDE += libgtop_server2
|
||||
override_dh_makeshlibs:
|
||||
dh_makeshlibs -V '$(SHARED_PKG) (>= 2.32.0)'
|
||||
|
||||
override_dh_fixperms:
|
||||
dh_fixperms -X libgtop_server2
|
||||
|
||||
override_dh_install:
|
||||
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/$(DEB_HOST_MULTIARCH)/$(SHARED_PKG)/libgtop_server2
|
||||
endif
|
||||
dh_install
|
||||
|
||||
6
debian/watch
vendored
6
debian/watch
vendored
@@ -1,3 +1,3 @@
|
||||
version=3
|
||||
http://ftp.gnome.org/pub/GNOME/sources/libgtop/([\d\.]+[02468])/ \
|
||||
libgtop-(.*)\.tar\.xz
|
||||
version=4
|
||||
https://download.gnome.org/sources/libgtop/([\d\.]+[02468])/ \
|
||||
libgtop@ANY_VERSION@\.tar\.xz
|
||||
|
||||
Reference in New Issue
Block a user