[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#534342: marked as done (wmbubble: FTBFS on Debian GNU/Hurd)



Your message dated Tue, 14 May 2013 18:38:00 +0000
with message-id <E1UcK6q-0002Oq-4B@franck.debian.org>
and subject line Bug#534342: fixed in wmbubble 1.46-4
has caused the Debian Bug report #534342,
regarding wmbubble: FTBFS on Debian GNU/Hurd
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 owner@bugs.debian.org
immediately.)


-- 
534342: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534342
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: wmbubble
Version: 1.46-2
Severity: normal

Hi,

wmbubble currently fails to build on Debian GNU/Hurd. The attached dpatch patch resolves this (though could probably use some clean-up, I basically copied sys_linux.c to sys_gnu.c).

Thank you,

Barry deFreese


#! /bin/sh /usr/share/dpatch/dpatch-run
## 11-hurd-build.dpatch by  <root@gnubber>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
diff -urNad wmbubble-1.46~/Makefile wmbubble-1.46/Makefile
--- wmbubble-1.46~/Makefile	2009-06-23 11:14:54.000000000 -0400
+++ wmbubble-1.46/Makefile	2009-06-23 11:16:03.000000000 -0400
@@ -69,6 +69,13 @@
     INSTALL = -m 755
 endif
 
+# special things for GNU
+ifeq ($(OS), GNU)
+    OBJS += sys_gnu.o
+    LIBS = `pkg-config gtk+-2.0 --libs | sed "s/-lgtk//g"`
+    INSTALL = -m 755
+endif
+
 CFLAGS += -DNAME=\"$(BINARY)\"
 
 all: $(BINARY)
diff -urNad wmbubble-1.46~/sys_gnu.c wmbubble-1.46/sys_gnu.c
--- wmbubble-1.46~/sys_gnu.c	1969-12-31 19:00:00.000000000 -0500
+++ wmbubble-1.46/sys_gnu.c	2009-06-23 11:15:21.000000000 -0400
@@ -0,0 +1,205 @@
+/*  BubbleMon dockapp 1.2 - Linux specific code
+ *  Copyright 2000, 2001 timecop@japan.co.jp
+ *  
+ *  This program 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.
+ *
+ *  This program 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 this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/utsname.h>
+#include "include/bubblemon.h"
+#include "include/sys_include.h"
+
+extern BubbleMonData bm;
+
+#define LINUX_2_4 1
+#define LINUX_2_6 2
+
+static unsigned char ver;
+
+int init_stuff()
+{
+    struct utsname u;
+
+    ver = 0;
+    
+    if (uname(&u) == -1) {
+	puts("Error getting kernel version: uname returned -1");
+	return 1;
+    }
+
+    if (strncmp(u.release, "2.4", 3) == 0) {
+	ver = LINUX_2_4;
+    } else if ((strncmp(u.release, "2.5", 3) == 0) ||
+	    (strncmp(u.release, "2.6", 3) == 0)) {
+	ver = LINUX_2_6;
+    }
+
+    if (!ver) {
+	/* Default to Linux 2.4 format. */
+	ver = LINUX_2_4;
+    }
+
+    return 0;
+}
+
+/* returns current CPU load in percent, 0 to 100 */
+int system_cpu(void)
+{
+    unsigned int cpuload;
+    u_int64_t load, total, oload, ototal;
+    u_int64_t ab, ac, ad, ae;
+    int i;
+    FILE *stat;
+
+    stat = fopen("/proc/stat", "r");
+    fscanf(stat, "%*s %Ld %Ld %Ld %Ld", &ab, &ac, &ad, &ae);
+    fclose(stat);
+
+    /* Find out the CPU load */
+    /* user + sys = load
+     * total = total */
+    load = ab + ac + ad;	/* cpu.user + cpu.sys; */
+    total = ab + ac + ad + ae;	/* cpu.total; */
+
+    /* "i" is an index into a load history */
+    i = bm.loadIndex;
+    oload = bm.load[i];
+    ototal = bm.total[i];
+
+    bm.load[i] = load;
+    bm.total[i] = total;
+    bm.loadIndex = (i + 1) % bm.samples;
+
+    /*
+       Because the load returned from libgtop is a value accumulated
+       over time, and not the current load, the current load percentage
+       is calculated as the extra amount of work that has been performed
+       since the last sample. yah, right, what the fuck does that mean?
+     */
+    if (ototal == 0)		/* ototal == 0 means that this is the first time
+				   we get here */
+	cpuload = 0;
+    else if ((total - ototal) <= 0)
+	cpuload = 100;
+    else
+	cpuload = (100 * (load - oload)) / (total - ototal);
+
+    return cpuload;
+}
+
+int system_memory(void)
+{
+    u_int64_t my_mem_used, my_mem_max;
+    u_int64_t my_swap_used, my_swap_max;
+    char *p;
+
+    static int mem_delay = 0;
+    FILE *mem;
+    static u_int64_t aa, ab, ac, ad;
+    static u_int64_t ae, af, ag, ah;
+
+    /* put this in permanent storage instead of stack */
+    static char shit[2048];
+
+    /* we might as well get both swap and memory at the same time.
+     * sure beats opening the same file twice */
+    if (mem_delay-- <= 0) {
+	if (ver == LINUX_2_6) {
+	    mem = fopen("/proc/meminfo", "r");
+	    memset(shit, 0, sizeof(shit));
+	    fread(shit, 2048, 1, mem);
+	    p = strstr(shit, "MemTotal");
+	    if (p) {
+		sscanf(p, "MemTotal:%Ld", &aa);
+		my_mem_max = aa << 10;
+
+		p = strstr(p, "Active");
+		if (p) {
+		    sscanf(p, "Active:%Ld", &ab);
+		    my_mem_used = ab << 10;
+
+		    p = strstr(p, "SwapTotal");
+		    if (p) {
+			sscanf(p, "SwapTotal:%Ld", &ac);
+			my_swap_max = ac << 10;
+
+			p = strstr(p, "SwapFree");
+			if (p) {
+			    sscanf(p, "SwapFree:%Ld", &ad);
+			    my_swap_used = my_swap_max - (ad << 10);
+
+			    bm.mem_used = my_mem_used;
+			    bm.mem_max = my_mem_max;
+			    bm.swap_used = my_swap_used;
+			    bm.swap_max = my_swap_max;
+			}
+		    }
+		}
+	    }
+	    fclose(mem);
+	    mem_delay = 25;
+	} else if (ver == LINUX_2_4) {
+	    mem = fopen("/proc/meminfo", "r");
+	    fgets(shit, 2048, mem);
+	
+	    fscanf(mem, "%*s %Ld %Ld %Ld %Ld %Ld %Ld", &aa, &ab, &ac,
+		&ad, &ae, &af);
+	    fscanf(mem, "%*s %Ld %Ld", &ag, &ah);
+	    fclose(mem);
+	    mem_delay = 25;
+
+	    /* calculate it */
+	    my_mem_max = aa;	/* memory.total; */
+	    my_swap_max = ag;	/* swap.total; */
+
+	    my_mem_used = ah + ab - af - ae;	/* swap.used + memory.used - memory.cached - memory.buffer; */
+
+	    if (my_mem_used > my_mem_max) {
+		my_swap_used = my_mem_used - my_mem_max;
+		my_mem_used = my_mem_max;
+	    } else {
+		my_swap_used = 0;
+	    }
+
+	    bm.mem_used = my_mem_used;
+	    bm.mem_max = my_mem_max;
+	    bm.swap_used = my_swap_used;
+	    bm.swap_max = my_swap_max;
+	}
+
+	/* memory info changed - update things */
+	return 1;
+    }
+    /* nothing new */
+    return 0;
+}
+
+#ifdef ENABLE_MEMSCREEN
+void system_loadavg(void)
+{
+    FILE *avg;
+    static int avg_delay;
+    if (avg_delay-- <= 0) {
+	avg = fopen("/proc/loadavg", "r");
+	fscanf(avg, "%d.%d %d.%d %d.%d", &bm.loadavg[0].i, &bm.loadavg[0].f,
+		&bm.loadavg[1].i, &bm.loadavg[1].f,
+		&bm.loadavg[2].i, &bm.loadavg[2].f);
+	fclose(avg);
+	avg_delay = ROLLVALUE;
+    }
+}
+#endif				/* ENABLE_MEMSCREEN */

--- End Message ---
--- Begin Message ---
Source: wmbubble
Source-Version: 1.46-4

We believe that the bug you reported is fixed in the latest version of
wmbubble, 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 534342@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Barry deFreese <bdefreese@debian.org> (supplier of updated wmbubble 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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 14 May 2013 08:51:52 -0400
Source: wmbubble
Binary: wmbubble
Architecture: source i386
Version: 1.46-4
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Barry deFreese <bdefreese@debian.org>
Description: 
 wmbubble   - system-load meter for Window Maker that features a duck
Closes: 534342 602122 602137
Changes: 
 wmbubble (1.46-4) unstable; urgency=low
 .
   * QA upload.
   * Make app a child window. (Closes: #602122, #602137).
     - Thanks to Tommaso Parisi for the patch.
   * Add patch to fix FTBFS on GNU/Hurd. (Closes: #534342).
   * Add hardening flags.
   * Add watch file.
   * Bump standards version to 3.9.4.
Checksums-Sha1: 
 7adfdf46a8312b6b31e09baf5be5a6ca7c693a01 1068 wmbubble_1.46-4.dsc
 e4c5854498e4fe057e8697573b3e8f7628d8afe5 11926 wmbubble_1.46-4.debian.tar.gz
 a138465527ab9783aa531b1a3ddd803274aadbce 28500 wmbubble_1.46-4_i386.deb
Checksums-Sha256: 
 d4c4b6901240a17b61b33e0667dc5b009cf397ae8f3e8665d0cd13216d0190ba 1068 wmbubble_1.46-4.dsc
 e00ac9f8a04c7ae563984c4f9304c1e75be2f1a3e445dd86639a5f8a4bf5a3b8 11926 wmbubble_1.46-4.debian.tar.gz
 27c7c6c6d0aefbbfb73018b5986e69edd919387b8743a3291b71b4ec46294828 28500 wmbubble_1.46-4_i386.deb
Files: 
 6f12e9be2127cbf01ffca99681149252 1068 x11 optional wmbubble_1.46-4.dsc
 647ee3d51c124da3f2fa32ec7f9b1fbc 11926 x11 optional wmbubble_1.46-4.debian.tar.gz
 ae13bb16f89960c4360b00c2d93adda1 28500 x11 optional wmbubble_1.46-4_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlGSSSUACgkQ5ItltUs5T37n8wCfZjShR0cWwBbYTccrgHdKT2vU
rBMAmwQA1kCZ/Rop77A53YgF3kD0nXK7
=P+bC
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: