[Pkg-wmaker-commits] [wmcube] 02/67: Imported Debian patch 0.98-5

Doug Torrance dtorrance-guest at moszumanska.debian.org
Tue Aug 25 03:22:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmcube.

commit 24aaf646d54fabbcfc93be5a89edd3970cab6908
Author: Filip Van Raemdonck <mechanix at debian.org>
Date:   Thu Dec 20 19:29:44 2001 +0100

    Imported Debian patch 0.98-5
---
 debian/README.debian           |  16 +++++
 debian/changelog               |  52 +++++++++++++++++
 debian/control                 |  20 +++++++
 debian/copyright               |   6 ++
 debian/dirs                    |   4 ++
 debian/docs                    |   2 +
 debian/menu                    |   3 +
 debian/patches/datapath.dpatch |  32 ++++++++++
 debian/patches/secfix.dpatch   | 130 +++++++++++++++++++++++++++++++++++++++++
 debian/patches/smpfix.dpatch   |  47 +++++++++++++++
 debian/rules                   | 111 +++++++++++++++++++++++++++++++++++
 debian/wmcube.1                |  31 ++++++++++
 12 files changed, 454 insertions(+)

diff --git a/debian/README.debian b/debian/README.debian
new file mode 100644
index 0000000..6b0ff96
--- /dev/null
+++ b/debian/README.debian
@@ -0,0 +1,16 @@
+wmcube for DEBIAN
+-------------------
+
+This is Debian GNU/Linux's prepackaged version of wmcube, a very
+nifty load meter designed with NeXTStep/OpenStep in mind.
+
+ -- Edward C. Lang <edlang at debian.org>  Fri, 14 Apr 2000 17:36:34 +1000
+  
+It is possible to use this with other windowmanagers than just WindowMaker;
+in fact that is what I do.
+Here is my configuration line to use it with Fvwm2 and the FvwmButtons module:
+
+*FvwmButtons(Size 64 64, Swallow(NoHints) wmcube 'Exec exec wmcube -b &')
+
+ -- Filip Van Raemdonck <mechanix at debian.org>  Sun, 27 May 2001 00:35:56 +0200
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..5025b73
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,52 @@
+wmcube (0.98-5) unstable; urgency=high
+
+  * Fix smp support which broke due to the source fixes in previous upload.
+    (Closes: #125902)
+  * Keep urgency at high to try to get this into testing asap, to fix the
+    security issues.
+
+ -- Filip Van Raemdonck <mechanix at debian.org>  Thu, 20 Dec 2001 19:29:44 +0100
+
+wmcube (0.98-4) unstable; urgency=high
+
+  * Apply security fixes from corecode wmcube-gdk advisory
+  * Adopt dpatch system to apply patches to upstream source during the build.
+  * Update Standards-Version:; no changes were necessary.
+
+ -- Filip Van Raemdonck <mechanix at debian.org>  Wed, 19 Dec 2001 10:49:14 +0100
+
+wmcube (0.98-3) unstable; urgency=low
+
+  * Add manpage contributed by Evelyn Mitchell. (Closes: #93479)
+
+ -- Filip Van Raemdonck <mechanix at debian.org>  Sat, 28 Jul 2001 19:34:31 +0200
+
+wmcube (0.98-2) unstable; urgency=low
+
+  * Fix incorrect menu entry. (Closes: #103450)
+
+ -- Filip Van Raemdonck <mechanix at debian.org>  Fri,  6 Jul 2001 17:20:20 +0200
+
+wmcube (0.98-1) unstable; urgency=low
+  
+  * New maintainer. (Closes: #98249)
+  * New upstream version.
+  * Add Build-Depends.
+  * Update Standards-Version.
+  * Remove post{inst,rm}. They are generated by debhelper.
+  * Make wmcube by default look in /usr/share/wmcube for object definitions.
+
+ -- Filip Van Raemdonck <mechanix at debian.org>  Sun, 27 May 2001 01:02:38 +0200
+
+wmcube (0.90-2) unstable; urgency=low
+
+  * NMU to fix ownership
+
+ -- Sean 'Shaleh' Perry <shaleh at debian.org>  Fri,  6 Oct 2000 10:58:45 -0700
+
+wmcube (0.90-1) unstable; urgency=low
+
+  * Initial release
+
+ -- Edward C. Lang <edlang at debian.org>  Fri, 14 Apr 2000 17:36:34 +1000
+
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b28edd9
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,20 @@
+Source: wmcube
+Section: x11
+Priority: optional
+Maintainer: Filip Van Raemdonck <mechanix at debian.org>
+Build-Depends: debhelper, xlibs-dev
+Standards-Version: 3.5.6.0
+
+Package: wmcube
+Architecture: any
+Section: x11
+Priority: optional
+Depends: ${shlibs:Depends}
+Suggests: wmaker
+Description: Spinning 3D object that shows the current CPU load
+ wmcube is a dockapp that displays a realtime rotating 3D object which
+ indicates current CPU load. The higher the load, the faster the object
+ spins. On SMP machines one instance can be run for each processor.
+ .
+ Originally wmcube could spin only a cube, hence the name.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..98bf86e
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,6 @@
+This package was debianized by Edward C. Lang
+<edlang at debian.org> on Fri, 14 Apr 2000 17:40:59 +1000
+
+It was downloaded from http://boombox.campus.luth.se/projects/
+
+wmCube is licensed through the GNU General Public License.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..44fd3e2
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,4 @@
+usr/bin
+usr/lib/menu
+usr/share/man/man1
+usr/share/wmcube
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..ba8894c
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,2 @@
+README
+
diff --git a/debian/menu b/debian/menu
new file mode 100644
index 0000000..b99f81b
--- /dev/null
+++ b/debian/menu
@@ -0,0 +1,3 @@
+?package(wmcube):needs="x11" \
+   section="Apps/System" title="wmcube"\
+   command="/usr/bin/wmcube"
diff --git a/debian/patches/datapath.dpatch b/debian/patches/datapath.dpatch
new file mode 100644
index 0000000..893d38d
--- /dev/null
+++ b/debian/patches/datapath.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+
+# DP: Modified
+
+if [ $# -ne 1 ]; then
+    echo >&2 "$0: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f -p0 < $0;;
+    -unpatch) patch -f -R -p0 < $0;;
+    *)
+        echo >&2 "$0: script expects -patch|-unpatch as argument"
+        exit 1
+esac
+exit 0
+
+--- wmcube/wmcube.c.orig
++++ wmcube/wmcube.c
+@@ -136,11 +136,11 @@
+ 	int		loop = 0;
+ 	XEvent	Event;
+ 
+ 	char	*rotdiv = {"25"};
+ 	char	*rotstep = {"1"};
+-	char	*obj_filename = {""};
++	char	*obj_filename = {"/usr/share/wmcube/"};
+ 	int		rot;
+ 	int 	cube_color = 1;
+ 	int 	c = 0;
+ 	int		invert_speed = 0;
+ 
diff --git a/debian/patches/secfix.dpatch b/debian/patches/secfix.dpatch
new file mode 100644
index 0000000..ef2adc2
--- /dev/null
+++ b/debian/patches/secfix.dpatch
@@ -0,0 +1,130 @@
+#! /bin/sh -e
+
+# DP: Modified
+
+if [ $# -ne 1 ]; then
+    echo >&2 "$0: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f -p0 < $0;;
+    -unpatch) patch -f -R -p0 < $0;;
+    *)
+        echo >&2 "$0: script expects -patch|-unpatch as argument"
+        exit 1
+esac
+exit 0
+
+--- wmcube/wmcube.c.orig
++++ wmcube/wmcube.c
+@@ -344,11 +344,11 @@
+ void startup_seq() 
+ {
+ 	char *tmp = malloc(32);
+ 	int oldzoff = 3600;
+ 
+-	sprintf(tmp,"V%s",WMCUBE_VERSION);
++	snprintf(tmp, 32, "V%s",WMCUBE_VERSION);
+ 	
+ 	RedrawWindow();
+ 	BlitString("WMCUBE",13,22);
+ 	BlitString(tmp,15,31);
+ 	RedrawWindow();
+@@ -562,11 +562,11 @@
+ 	if (num > 999)
+ 	{
+ 		newx -= CHAR_WIDTH;
+ 	}
+ 	
+-	sprintf(buf, "%02i", num);
++	snprintf(buf, 1024, "%02i", num);
+ 	
+ 	BlitString(buf, newx, y);
+ }
+ 
+ void line(int x1, int y1, int x2, int y2, int c)
+@@ -911,19 +911,19 @@
+ 	if ((fp = fopen(filename,"rt")) == NULL) {
+ 		printf("\nERROR: wmCube object-file not found (%s).\n\n",filename);
+ 		exit(0);
+ 	}
+ 
+-	fscanf(fp,"%s",tmp);
++	fscanf(fp,"%63s",tmp);
+ 	
+ 	if (strcmp(tmp,"WMCUBE_COORDINATES") != 0) { 
+ 		printf("\nError in objectfile: it must start with WMCUBE_COORDINATES\n\n");
+ 		fclose(fp);
+ 		exit(0);
+ 	}
+ 
+-	fscanf(fp,"%s",tmp);
++	fscanf(fp,"%63s",tmp);
+ 	counter = atoi(tmp);
+ 
+ 	while ((strcmp(tmp,"WMCUBE_LINES") != 0) && (strcmp(tmp,"WMCUBE_PLANES") != 0)) {		
+ 
+ 	 	matrix = (float **)realloc(matrix,(i+1)*sizeof(float *)); mem_alloc_error(matrix);
+@@ -936,11 +936,11 @@
+ 			printf("\nError in objectfile (WMCUBE_COORDINATES section):\n"
+ 					 "the coordinates must be listed in order 1..n\n\n");
+ 			fclose(fp);
+ 			exit(0);
+ 		}
+-		fscanf(fp,"%s",tmp);
++		fscanf(fp,"%63s",tmp);
+ 
+ 		if (feof(fp)) {
+ 			printf("\nError in objectfile: you must have a section WMCUBE_LINES or WMCUBE_PLANES\n\n");
+ 			fclose(fp);
+ 			exit(0);
+@@ -1038,29 +1038,32 @@
+ 	FILE *fp;
+ 	int i;
+ 	char cpuid[6];
+ 	char check_cpu[6];
+ 
+-	sprintf(check_cpu, "cpu%d", which_cpu);
++	snprintf(check_cpu, 6, "cpu%d", which_cpu);
+ 
+ 	if ((fp = fopen("/proc/stat","rb")) == NULL) {
+ 		perror("/proc/stat required for this system");
+ 		return -1;
+ 	}
+ 
+-	if (which_cpu == -1)
++	if (which_cpu == -1) {
++		fclose (fp);
+ 		return 0;
+-
++	}
++ 
+ 	for (i = -2; i < which_cpu; i++) {
+-                fscanf(fp, "%s", cpuid);
++                fscanf(fp, "%5s %*d %*d %*d %*d", cpuid);
+         }
+ 
+ 	if (strcmp(check_cpu,cpuid) != 0) {
+                 fprintf(stderr, "ERROR: could not read cpu-load on %s. Are you "
+ 		    "sure you have an SMP system?\n",check_cpu);
+                 return -1;
+         }
++	fclose (fp);
+ 	return (0); 
+ }
+ 
+ int calc_cpu_total() {
+ 	int total, used, t=0, i;
+@@ -1073,11 +1073,11 @@
+ 	FILE *fp;
+ 	
+ 	fp = fopen("/proc/stat","rt");
+ 
+ 	for (i = -2; i < which_cpu; i++) {
+-		fscanf(fp,"%s %d %d %d %d",cpuid,&cpu,&nice,&system,&idle);
++		fscanf(fp,"%5s %d %d %d %d",cpuid,&cpu,&nice,&system,&idle);
+ 	}
+ 
+ 	fclose(fp);
+ 
+ 	used = cpu + system + use_nice*nice;
diff --git a/debian/patches/smpfix.dpatch b/debian/patches/smpfix.dpatch
new file mode 100644
index 0000000..0b4843f
--- /dev/null
+++ b/debian/patches/smpfix.dpatch
@@ -0,0 +1,47 @@
+#! /bin/sh -e
+
+# DP: Modified
+
+if [ $# -ne 1 ]; then
+    echo >&2 "$0: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f -p0 < $0;;
+    -unpatch) patch -f -R -p0 < $0;;
+    *)
+        echo >&2 "$0: script expects -patch|-unpatch as argument"
+        exit 1
+esac
+exit 0
+
+--- wmcube/wmcube.c.orig-bak
++++ wmcube/wmcube.c
+@@ -1045,22 +1045,25 @@
+ 	if ((fp = fopen("/proc/stat","rb")) == NULL) {
+ 		perror("/proc/stat required for this system");
+ 		return -1;
+ 	}
+ 
+-	if (which_cpu == -1)
++	if (which_cpu == -1) {
++		fclose (fp);
+ 		return 0;
++	}
+ 
+ 	for (i = -2; i < which_cpu; i++) {
+-                fscanf(fp, "%s", cpuid);
++                fscanf(fp, "%5s %*d %*d %*d %*d", cpuid);
+         }
+ 
+ 	if (strcmp(check_cpu,cpuid) != 0) {
+                 fprintf(stderr, "ERROR: could not read cpu-load on %s. Are you "
+ 		    "sure you have an SMP system?\n",check_cpu);
+                 return -1;
+         }
++	fclose (fp);
+ 	return (0); 
+ }
+ 
+ int calc_cpu_total() {
+ 	int total, used, t=0, i;
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..78c5ab3
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,111 @@
+#!/usr/bin/make -f
+# This is a -*- makefile -*-
+# Modified from the sample debian/rules that uses debhelper.
+# GNU copyright 1998 by Marcelo Magallon.
+# GNU copyright 1997 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+debian_patches = datapath secfix
+
+build: patched-stamp build-stamp
+build-stamp:
+	dh_testdir
+#	perl -pi -e 's/-DX_LOCALE//g;' Makefile
+	$(MAKE) -C wmcube
+	touch build-stamp
+
+clean: reverse-patches
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	-$(MAKE) -C wmcube clean
+#	-rm Makefile
+	dh_clean
+
+# Build architecture-independent files here.
+binary-indep: build
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build
+#	dh_testversion
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	install -s -m 0755 wmcube/wmcube `pwd`/debian/tmp/usr/bin/wmcube
+	install -m 0644 3dObjects/*.wmc `pwd`/debian/tmp/usr/share/wmcube
+	install -m 0644 debian/wmcube.1 debian/tmp/usr/share/man/man1
+	dh_installdocs
+	install -m 0644 3dObjects/README `pwd`/debian/tmp/usr/share/doc/wmcube/README.3dObjects
+	install -m 0644 3dObjects/CONTRIBUTE `pwd`/debian/tmp/usr/share/doc/wmcube
+#	( cd XPM ; tar cf - . ) | \
+#		( cd debian/tmp/usr/doc/wmcdplay/examples ; tar xvf - )
+#	mv debian/tmp/usr/doc/wmcdplay/examples/*.art \
+#	  debian/tmp/usr/share/wmcdplay
+#	dh_installexamples `find XPM -type f`
+	dh_installmenu
+#	dh_undocumented wmcube.1
+	dh_installchangelogs
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+source diff:                                                                  
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary
+
+# ---------------------------------------------------------------------------
+# various rules to unpack addons and (un)apply patches.
+# borrowed from egcs package
+
+patch_dir	= debian/patches
+
+apply-patches: patched-stamp
+reverse-patches:
+	@for stamp in none patched-*; do \
+	  case "$$stamp" in none|patched-stamp|patched-\*) continue; esac; \
+	  patch=`echo $$stamp | sed -e 's/patched-//'`; \
+	  echo "trying to revert patch $$patch ..."; \
+	  if [ -x $(patch_dir)/$$patch.dpatch ]; then true; else \
+	    chmod +x $(patch_dir)/$$patch.dpatch; fi; \
+	  if $(patch_dir)/$$patch.dpatch -unpatch; then \
+	    echo "reverted $$patch patch."; \
+	    rm -f $$stamp; \
+	  else \
+	    echo "error in reverting $$patch patch."; \
+	    exit 1; \
+	  fi; \
+	done
+	@echo "Removing patched-stamp"
+	@rm -f patched-stamp
+
+patched-%: $(patch_dir)/%.dpatch
+	@if [ -x $< ]; then true; else chmod +x $<; fi
+	@if [ -f $@ ]; then \
+	  echo "$* patches already applied."; exit 1; \
+	fi
+	$< -patch
+	@echo "$* patches applied." > $@
+
+patched-stamp: $(foreach p,$(debian_patches),patched-$(p))
+	@echo -e "\nPatches applied:" >> pxxx
+	@for i in none $(debian_patches); do \
+	  if [ -r debian/patches/$$i.dpatch ]; then \
+	    echo -e "\n$$i:" >> pxxx; \
+	    sed -n 's/^# *DP: */  /p' debian/patches/$$i.dpatch >> pxxx; \
+	  fi \
+	done
+	@echo "Writing patched-stamp"
+	@mv -f pxxx patched-stamp
+
+# vi: ts=8 sw=8 ai nowrap
diff --git a/debian/wmcube.1 b/debian/wmcube.1
new file mode 100644
index 0000000..7757ec9
--- /dev/null
+++ b/debian/wmcube.1
@@ -0,0 +1,31 @@
+.\" -*- nroff -*-
+.TH wmcube 1 "28 Jul 2001" Debian "3D object CPU Load display applet"
+
+.SH NAME
+wmcube \- spinning 3d object that shows the current CPU load
+
+.SH SYNOPSIS
+wmcube
+[ \fB-o\fP <filename or directory> ]
+[ \fB-d\fP degrees ]
+[ \fB-r\fP acceleration ]
+[ \fB-c\fP cpu-to-monitor ]
+[ \fB-n\fP ]
+[ \fB-b\fP ]
+[ \fB-i\fP ]
+[ \fB-p\fP ]
+[ \fB-h\fP ]
+
+.SH DESCRIPTION
+.I wmcube
+is a dockapp that displays a realtime rotating 3d-object which indicates
+current CPU load. The higher the load, the faster the object spins.
+
+.SH AUTHOR
+Evelyn Mitchell (efm at tummy.com) wrote this manpage for the Debian prepackaged
+version of wmcube. It was adapted by Filip Van Raemdonck
+(mechanix at digibel.org) for version 0.98 of wmcube.
+
+.SH SEE ALSO
+.BR fvwm (1), wmaker (1)
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmcube.git



More information about the Pkg-wmaker-commits mailing list