[Pkg-wmaker-commits] [wmmemload] 96/103: debian/patches: Remove directory; patch added upstream.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 03:11:49 UTC 2015


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

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

commit b3861ce04f4e8566a404d550b62ef136b042a24b
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Tue Apr 7 07:31:20 2015 -0500

    debian/patches: Remove directory; patch added upstream.
---
 debian/patches/series            |  1 -
 debian/patches/sysctl_swap.patch | 98 ----------------------------------------
 2 files changed, 99 deletions(-)

diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index d1ac254..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-sysctl_swap.patch
diff --git a/debian/patches/sysctl_swap.patch b/debian/patches/sysctl_swap.patch
deleted file mode 100644
index 7da8599..0000000
--- a/debian/patches/sysctl_swap.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Description: Use sysctl for swap usage information in GNU/kFreeBSD.
- Use sysctl instead of kvm_getswapinfo() to read the swap usage information in
- GNU/kFreeBSD.  This removes the need for a Build-Depends on libkvm-dev and
- having a setgid binary.
-Author: Doug Torrance <dtorrance at monmouthcollege.edu>
-Last-Update: 2014-10-14
-
---- a/src/mem_freebsd.c
-+++ b/src/mem_freebsd.c
-@@ -11,38 +11,18 @@
- #endif
- 
- #include <stdio.h>
--#include <unistd.h>
- #include <stdlib.h>
- #include <string.h>
- #include "mem.h"
- 
--#include <kvm.h>
--#include <fcntl.h>
-+#include <vm/vm_param.h>
- #include <sys/errno.h>
- #include <sys/sysctl.h>
- #include <time.h>
- 
--static kvm_t *kvm_data;
--
- /* initialize function */
- void mem_init(void)
- {
--	kvm_data = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open");
--
--	if (kvm_data == NULL) {
--		fprintf(stderr, "can't open kernel virtual memory");
--		exit(1);
--	}
--
--	/* drop setgid & setuid (the latter should not be there really) */
--	seteuid(getuid());
--	setegid(getgid());
--
--	if (geteuid() != getuid() || getegid() != getgid()) {
--		fprintf(stderr, "unable to drop privileges");
--		exit(1);
--	}
--
- 	return;
- }
- 
-@@ -101,17 +81,30 @@
- 	if (swap_firsttime ||
- 	    (((new_swappgsin > swappgsin) || (new_swappgsout > swappgsout))
- 	     && cur_time > last_time_swap + 1)) {
--
--		struct kvm_swap swap;
--		int n;
-+		int mib[2], n;
-+		size_t mibsize, size;
-+		struct xswdev xsw;
-+
-+		mibsize = sizeof(mib) / sizeof(mib[0]);
-+		if (sysctlnametomib("vm.swap_info", mib, &mibsize) == -1) {
-+			fprintf(stderr, "sysctlnametomib() failed: %s\n", strerror(errno));
-+			exit(1);
-+		}
- 
- 		swapmax = 0;
- 		swapused = 0;
- 
--		n = kvm_getswapinfo(kvm_data, &swap, 1, 0);
--		if (n >= 0 && swap.ksw_total != 0) {
--			swapmax = swap.ksw_total;
--			swapused = swap.ksw_used;
-+		for (n = 0; ; n++) {
-+			mib[mibsize] = n;
-+			size = sizeof(xsw);
-+			if (sysctl(mib, mibsize + 1, &xsw, &size, NULL, 0) == -1) {
-+				if (errno == ENOENT)
-+					break;
-+				fprintf(stderr, "sysctl() failed: %s\n", strerror(errno));
-+				exit(1);
-+			}
-+			swapmax += xsw.xsw_nblks;
-+			swapused += xsw.xsw_used;
- 		}
- 
- 		swap_firsttime = 0;
---- a/configure.ac
-+++ b/configure.ac
-@@ -101,8 +101,6 @@
-   OS=freebsd
-   ignore_wired=yes
-   ignore_cached=yes
--  LIBS="$LIBS -lkvm"
--  SETGID_FLAGS="-g kmem -m 2755 -o root"
-   ;;
- openbsd*)
-   OS=openbsd

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



More information about the Pkg-wmaker-commits mailing list