Bug#290719: #290719: FTBFS on kfreebsd-gnu

2005-10-11 Thread Robert Millan

Ok, here is it.  Made it the least intrusive I could.  Tested it on GNU/Linux,
and put it in dpatch format as you requested.

-- 
Robert Millan
diff -Nur procps-3.2.5.old/debian/patches/00list 
procps-3.2.5/debian/patches/00list
--- procps-3.2.5.old/debian/patches/00list  2005-10-10 11:32:40.0 
+0200
+++ procps-3.2.5/debian/patches/00list  2005-10-10 18:16:44.0 +0200
@@ -5,3 +5,4 @@
 30_pgrep_start_time
 30_readproc_c
 30_tload_no_optargs
+40_gnu-kbsd.dpatch
diff -Nur procps-3.2.5.old/debian/patches/40_gnu-kbsd.dpatch 
procps-3.2.5/debian/patches/40_gnu-kbsd.dpatch
--- procps-3.2.5.old/debian/patches/40_gnu-kbsd.dpatch  1970-01-01 
01:00:00.0 +0100
+++ procps-3.2.5/debian/patches/40_gnu-kbsd.dpatch  2005-10-10 
18:17:00.0 +0200
@@ -0,0 +1,89 @@
+#! /bin/sh -e
+## 40_gnu-kbsd.dpatch by Robert Millan
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: GNU/kFreeBSD support.
+
+[ -f debian/patches/00patch-opts ]  . debian/patches/00patch-opts
+patch_opts=${patch_opts:--f --no-backup-if-mismatch}
+
+if [ $# -ne 1 ]; then
+echo 2 `basename $0`: script expects -patch|-unpatch as argument
+exit 1
+fi
+case $1 in
+   -patch) patch $patch_opts -p1  $0;;
+   -unpatch) patch $patch_opts -p1 -R  $0;;
+*)
+echo 2 `basename $0`: script expects -patch|-unpatch as 
argum
+ent
+exit 1;;
+esac
+
+exit 0
[EMAIL PROTECTED]@
+diff -ur procps-3.2.5.old/proc/sig.c procps-3.2.5/proc/sig.c
+--- procps-3.2.5.old/proc/sig.c2003-03-19 01:52:39.0 +0100
 procps-3.2.5/proc/sig.c2005-10-10 18:13:46.0 +0200
+@@ -50,6 +50,10 @@
+ #  define SIGPWR 29
+ #endif
+ 
++#ifndef SIGPOLL
++#define SIGPOLL SIGIO
++#endif
++
+ typedef struct mapstruct {
+   const char *name;
+   int num;
+diff -ur procps-3.2.5.old/proc/version.c procps-3.2.5/proc/version.c
+--- procps-3.2.5.old/proc/version.c2003-01-29 02:11:43.0 +0100
 procps-3.2.5/proc/version.c2005-10-10 18:13:46.0 +0200
+@@ -35,6 +35,9 @@
+ 
+ static void init_Linux_version(void) __attribute__((constructor));
+ static void init_Linux_version(void) {
++#ifndef __linux__
++int x = 2, y = 0, z = 0;
++#else
+ static struct utsname uts;
+ int x = 0, y = 0, z = 0;  /* cleared in case sscanf()  3 */
+ 
+@@ -45,5 +48,6 @@
+   Non-standard uts for running kernel:\n
+   release %s=%d.%d.%d gives version code %d\n,
+   uts.release, x, y, z, LINUX_VERSION(x,y,z));
++#endif
+ linux_version_code = LINUX_VERSION(x, y, z);
+ }
+diff -ur procps-3.2.5.old/ps/common.h procps-3.2.5/ps/common.h
+--- procps-3.2.5.old/ps/common.h   2004-10-09 05:55:50.0 +0200
 procps-3.2.5/ps/common.h   2005-10-10 18:13:53.0 +0200
+@@ -14,7 +14,13 @@
+ 
+ #include ../proc/procps.h
+ #include ../proc/readproc.h
+-#include asm/page.h  /* looks safe for glibc, we need PAGE_SIZE */
++
++/* looks safe for glibc, we need PAGE_SIZE */
++#if defined(__linux__)
++# include asm/page.h
++#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++# include machine/param.h
++#endif
+ 
+ #if 0
+ #define trace(args...) printf(## args)
+diff -ur procps-3.2.5.old/top.c procps-3.2.5/top.c
+--- procps-3.2.5.old/top.c 2005-01-26 06:15:18.0 +0100
 procps-3.2.5/top.c 2005-10-10 18:13:46.0 +0200
+@@ -1869,6 +1869,9 @@
+   std_err(failed tty get);
+newtty = Savedtty;
+newtty.c_lflag = ~(ICANON | ECHO);
++#ifndef TAB3
++#define TAB3 XTABS
++#endif
+newtty.c_oflag = ~(TAB3);
+newtty.c_cc[VMIN] = 1;
+newtty.c_cc[VTIME] = 0;
diff -Nur procps-3.2.5.old/debian/procps.sh procps-3.2.5/debian/procps.sh
--- procps-3.2.5.old/debian/procps.sh   2005-10-10 11:32:39.0 +0200
+++ procps-3.2.5/debian/procps.sh   2005-10-10 18:17:28.0 +0200
@@ -8,7 +8,8 @@
 [ -r /etc/default/rcS ] || exit 0
 . /etc/default/rcS
 
-[ -x /sbin/sysctl ] || exit 0
+PATH=/sbin:$PATH
+which sysctl  /dev/null || exit 0
 
 
 case $1 in
@@ -26,7 +27,7 @@
n=
redir=
fi
-   eval /sbin/sysctl $n -q -p $redir
+   eval sysctl $n -q -p $redir
if [ $VERBOSE = yes ]
then
echo ... done.
diff -Nur procps-3.2.5.old/debian/rules procps-3.2.5/debian/rules
--- procps-3.2.5.old/debian/rules   2005-10-10 11:32:39.0 +0200
+++ procps-3.2.5/debian/rules   2005-10-10 18:17:28.0 +0200
@@ -10,6 +10,8 @@
 
 PACKAGE=procps
 
+DEB_HOST_GNU_SYSTEM?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)
+
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
 endif
@@ -58,6 +60,15 @@
(cp proc/*.h $(CURDIR)/debian/procps/usr/include/proc)
cp static/libproc.a $(CURDIR)/debian/libproc-dev/usr/lib
 
+ifneq ($(DEB_HOST_GNU_SYSTEM), linux-gnu)
+   rm -f \
+   

Bug#290719: #290719: FTBFS on kfreebsd-gnu

2005-10-11 Thread Robert Millan
On Mon, Oct 10, 2005 at 10:49:59AM +1000, [EMAIL PROTECTED] wrote:
   2) Someone, somewhere will need to assist me in any kbsd-related bugs.

Ah, wrt to kbsd-related bugs in the future, you don't really need to worry
about it.  I mean, every maintainer should try to avoid obvious Linux-isms
(which doesn't happen yet), but other than this, if a bug appears we're
always going to provide a patch or at least help with it.

In case you want to actively check that procps supports GNU/kFreeBSD, you're
welcome to try it using io.debian.net (DD-accessible machine), or ask the
porting team for assistance.

-- 
Robert Millan


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#290719: #290719: FTBFS on kfreebsd-gnu

2005-10-10 Thread Robert Millan
On Mon, Oct 10, 2005 at 10:49:59AM +1000, [EMAIL PROTECTED] wrote:
 On Sun, Oct 09, 2005 at 06:40:48PM +0200, Robert Millan wrote:
  If I send you a clean patch with the rest of needed changes, would you 
  consider
  appliing them to the debian package?  We need to get this package fully 
  ported
  in order to have a completely clean base system that can be made official 
  into
  Debian.
 OK, I'll give it a look. I have two main criteria:
   1) It must not break procps for Linux
   2) Someone, somewhere will need to assist me in any kbsd-related bugs.

Sounds fine.  I'll prepare something.

 I'm using dpatch now so either send a dpatch or a patch and I'll mangle
 it into a dpatch.

Ok.

Thank you,

-- 
Robert Millan


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#290719: #290719: FTBFS on kfreebsd-gnu

2005-10-09 Thread csmall
On Sun, Oct 09, 2005 at 06:40:48PM +0200, Robert Millan wrote:
 If I send you a clean patch with the rest of needed changes, would you 
 consider
 appliing them to the debian package?  We need to get this package fully ported
 in order to have a completely clean base system that can be made official into
 Debian.
OK, I'll give it a look. I have two main criteria:
  1) It must not break procps for Linux
  2) Someone, somewhere will need to assist me in any kbsd-related bugs.

1) would result in the patch being reversed.
2) would result in the bug being closed.

I'm using dpatch now so either send a dpatch or a patch and I'll mangle
it into a dpatch.

 - Craig
-- 
Craig Small  GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.enc.com.au/   MIEE Debian developer
csmall at : enc.com.au  ieee.org   debian.org


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]