Your message dated Mon, 13 Oct 2014 23:07:37 +0000
with message-id <[email protected]>
and subject line Bug#764356: fixed in wmmemload 0.1.7-1
has caused the Debian Bug report #764356,
regarding wmmemload: FTBFS on hurd-i386
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
764356: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764356
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: wmmemload
Version: 0.1.6+20141004-1
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
Hello,
The latest version of wmmemload currently FTBFS on GNU/Hurd due to that
this OS is not yet supported. The latest working version is 0.1.6-8.
That version worked by only adding gnu* (and k*bsd*) in configure.ac.
However, the memory usage is reported as zero for kFreeBSD so probalby
nobody tested that application.
The latest changes 0.1.6+2014100 in made the Hurd code show a zero
memory usage too. Instead of patching the mem_linux.c file, I chose to
add a new file mem_gnu.c, not having the conditional code of linux
versions, and modify configure.ac correspondingly. (A mem_kfreebsd.c
file can easily be created too, solving the FTBFS for that OS)
Thanks!
--- a/configure.ac 2014-10-04 16:14:09.000000000 +0200
+++ b/configure.ac 2014-10-07 14:20:04.000000000 +0200
@@ -110,6 +110,11 @@
solaris*)
OS=solaris
;;
+gnu*)
+ OS=gnu
+ ignore_buffers=yes
+ ignore_cached=yes
+ ;;
*)
echo ""
echo "Sorry, ${host_os} is not supported yet"
--- /dev/null 2013-05-17 15:30:59.000000000 +0200
+++ b/src/mem_gnu.c 2014-10-07 13:57:40.000000000 +0200
@@ -0,0 +1,143 @@
+/*
+ * mem_gnu.c - module to get memory/swap usages, for GNU/Hurd
+ *
+ * Copyright(C) 2014 Svante Signell <[email protected]>
+ * Copyright(C) 2001,2002 Seiichi SATO <[email protected]>
+ * Copyright(C) 2001 John McCutchan <[email protected]>
+ *
+ * licensed under the GPL
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#if defined(HAVE_STRING_H)
+#include <string.h>
+#elif defined(HAVE_STRINGS_H)
+#include <strings.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <sys/utsname.h>
+#include "mem.h"
+
+#ifdef DEBUG
+# define INLINE_STATIC static
+#else
+# define INLINE_STATIC inline static
+#endif
+
+/* initialize function */
+void mem_init(void)
+{
+ struct utsname un;
+ int version, patchlevel;
+
+ /* get kernel version */
+ if (uname(&un) == -1)
+ perror ("uname()");
+ sscanf (un.release, "%d.%d", &version, &patchlevel);
+}
+
+
+INLINE_STATIC char * skip_line (const char *p)
+{
+ while (*p != '\n') p++;
+ return (char *) ++p;
+}
+
+INLINE_STATIC char * skip_token (const char *p)
+{
+ while (isspace(*p)) p++;
+ while (*p && !isspace(*p)) p++;
+ return (char *)p;
+}
+
+INLINE_STATIC char * skip_multiple_token (const char *p, int count)
+{
+ int i;
+ for (i = 0; i < count; i++) p = skip_token (p);
+ return (char *)p;
+}
+
+/* return mem/swap usage in percent 0 to 100 */
+void mem_getusage(int *per_mem, int *per_swap, const struct mem_options *opts)
+{
+ char buffer[BUFSIZ], *p;
+ int fd, len, i;
+ u_int64_t mtotal, mused, mfree, mbuffer, mcached;
+ u_int64_t stotal, sused, sfree, scached = 0;
+
+ /* read /proc/meminfo */
+ fd = open("/proc/meminfo", O_RDONLY);
+ if (fd < 0) {
+ perror("can't open /proc/meminfo");
+ exit(1);
+ }
+ len = read(fd, buffer, BUFSIZ - 1);
+ if (len < 0) {
+ perror("can't read /proc/meminfo");
+ exit(1);
+ }
+ close(fd);
+
+ buffer[len] = '\0';
+ p = buffer;
+
+ p = skip_token(p);
+ /* examine each line of file */
+ mtotal = strtoul(p, &p, 0); p = skip_multiple_token(p, 2);
+ mfree = strtoul(p, &p, 0); p = skip_multiple_token(p, 2);
+ mbuffer = strtoul(p, &p, 0); p = skip_multiple_token(p, 2);
+ mcached = strtoul(p, &p, 0); p = skip_multiple_token(p, 2);
+ scached = strtoul(p, &p, 0);
+
+ /* skip N lines and examine info about swap */
+ while (isprint(p[0])) {
+ p = skip_line(p);
+ if (strncmp(p, "SwapTotal", 9) == 0) break;
+ }
+
+ p = skip_token(p);
+ stotal = strtoul(p, &p, 0); p = skip_multiple_token(p, 2);
+ sfree = strtoul(p, &p, 0);
+
+ /* calculate memory usage in percent */
+ mused = mtotal - mfree;
+ if (opts->ignore_buffers)
+ mused -= mbuffer;
+ if (opts->ignore_cached)
+ mused -= mcached;
+ *per_mem = 100 * (double) mused / (double) mtotal;
+
+ /* calculate swap usage in percent */
+ sused = stotal - sfree;
+ if(opts->ignore_cached)
+ sused -= scached;
+ if (!stotal) {
+ *per_swap = 0;
+ } else {
+ *per_swap = 100 * (double) sused / (double) stotal;
+ }
+
+#if DEBUG
+ printf("-----------------------\n");
+ printf("MemTotal: %12ld\n", (unsigned long)mtotal);
+ printf("MemFree: %12ld\n", (unsigned long)mfree);
+ printf("Buffers: %12ld\n", (unsigned long)mbuffer);
+ printf("Cached: %12ld\n", (unsigned long)mcached);
+ printf("SwapTotal: %12ld\n", (unsigned long)stotal);
+ printf("SwapFree: %12ld\n", (unsigned long)sfree);
+ printf("SwapCached:%12ld\n", (unsigned long)scached);
+ printf("-----------------------\n\n");
+#endif
+
+}
--- End Message ---
--- Begin Message ---
Source: wmmemload
Source-Version: 0.1.7-1
We believe that the bug you reported is fixed in the latest version of
wmmemload, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Doug Torrance <[email protected]> (supplier of updated wmmemload
package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Mon, 13 Oct 2014 14:49:11 -0500
Source: wmmemload
Binary: wmmemload
Architecture: source amd64
Version: 0.1.7-1
Distribution: unstable
Urgency: medium
Maintainer: Doug Torrance <[email protected]>
Changed-By: Doug Torrance <[email protected]>
Description:
wmmemload - WindowMaker dockapp to monitor memory and swap usage
Closes: 749216 764356
Changes:
wmmemload (0.1.7-1) unstable; urgency=medium
.
* New upstream release.
- Add support for newer Linux kernels (Closes: #749216).
- Add support for the Hurd and GNU/kFreeBSD (Closes: #764356).
* debian/docs
- New file.
* debian/patches
- (sysctl_swap.patch) Use sysctl to get swap usage information for
GNU/kFreeBSD.
* debian/rules
- Add --no-symlink option to uscan in get-orig-source target.
Checksums-Sha1:
3958f2f004ae4808e2957a64f03b66515dc31e87 1880 wmmemload_0.1.7-1.dsc
336d91f12766ffda961554d1c853f5e0c6732898 23027 wmmemload_0.1.7.orig.tar.gz
ac60bd11fe92f29f1ed79c1f13bac5c904a0d624 4460 wmmemload_0.1.7-1.debian.tar.xz
f7a653779965133c26a96366412687c79206b339 16736 wmmemload_0.1.7-1_amd64.deb
Checksums-Sha256:
2eeac18bccb1693282cdfe9d30ea01d0a2795d0aa6305c47c02c46333a563b75 1880
wmmemload_0.1.7-1.dsc
a695e267e57667a7741b2def649afa4189d414852afe647c48b00e298651581a 23027
wmmemload_0.1.7.orig.tar.gz
9890381dd938e5f84d1507cbecaf99dbd05e72bb9e3a474c8bdd98b2e15e2731 4460
wmmemload_0.1.7-1.debian.tar.xz
7382b452ff59afb4ea8508d245df72488638f7a85f0f7f56f71345a95901b005 16736
wmmemload_0.1.7-1_amd64.deb
Files:
cf16ea80b31f6e7577ca18fe3f7f5892 1880 x11 optional wmmemload_0.1.7-1.dsc
bd40efbb1a36d273792011760a9dc537 23027 x11 optional wmmemload_0.1.7.orig.tar.gz
85db8c7aad703c33ec2ce697a990ae76 4460 x11 optional
wmmemload_0.1.7-1.debian.tar.xz
dbadb1556fde44a0a0cf5a7151f50c1f 16736 x11 optional wmmemload_0.1.7-1_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJUPFiHAAoJEHQmOzf1tfkTB+EQALha3eBaY9DsUfeyYpugg2Xu
xsDIDtKCac+SFbVy07fdKsSj66rRVZWQXnWTEtQxShIG0iw94KpEMzQHNip+RQqj
UKgdukaKysnZ6KW86iCWn8xC0Z79lhBbGiiu1g/148R5uCj/K3qBidhT6Ee4XzOu
l4WkdnmxHnXJkwitO1rktm1se+7dEpQ3i0ep3i1EFskdvmdZS5mEuPQ9Jje5hNyQ
HiqHm/DcQhufp3Lz3OKAxID8T2OT8kGGDy/n3Q/RdJOFp/bbfaL10xLQuiJEZF3I
ibyp+AQ/qVr9PIytgikaDU5M+7BLsDjTrFfmo0CbIFTLkrbSrX0suFGaYQT88Ksp
/vcIPt9IsBanPe65AQIAJ3X/shi02+t4xNw3DvMYuXmaT/tLlMkD2tsqQ5OBwvA/
3ezATHs4m6Y3J7L7tb3WC+kkfO6ywgz9Ar2v3hDGfBDUNW5YxyohZmFe+5+Ob4bJ
Tal1iJb1Bx/DOOQngiso8fW5uQZNAIg1rklCJW2D3x7xZe3+lsCqHZJZRZwXya0D
pi6AxCHOLJgVHfXRR4OZNnIuoOZpRBjXV59ajDaFgg0yV9FKSGfADK8g0rexM7Ff
ucgwn8tiUd7xtu5SuK+tGXfq647yaCiXz5a03HJhVGC5ayLRy1BSVMqw/e1XTC/O
r2FBH2HT1/Hvm4ey14bo
=/tG5
-----END PGP SIGNATURE-----
--- End Message ---