Bug#493839: pmake: diff for NMU version 1.111-1.1

2009-10-25 Thread Thorsten Glaser
Guillem Jover dixit:

 Hm. I need the one of the system the produced binary will
 eventually run on. (All this build/host/target is rather
 confusing and badly documented.) Which one is that?

That's *_HOST_*. And it seems to me to be properly documented in
dpkg-architecture(1), and in '4.9 of the debian policy. They also
have the same meaning as the GNU target names.

I may have confused it with emulation terminology then, where
host is the other one. My apologies. Please find below a fixed
diff.

diff -u pmake-1.111/mk/sys.mk pmake-1.111/mk/sys.mk
--- pmake-1.111/mk/sys.mk
+++ pmake-1.111/mk/sys.mk
@@ -1,7 +1,7 @@
 #  $NetBSD: sys.mk,v 1.54 1999/03/10 14:06:14 mycroft Exp $
 #  @(#)sys.mk  8.2 (Berkeley) 3/21/94
 
-unix?= We run NetBSD.
+unix?= We run Debian GNU.
 
 .SUFFIXES: .out .a .ln .o .s .S .c .cc .C .F .f .r .y .l .cl .p .h .sh .m4
 
diff -u pmake-1.111/main.c pmake-1.111/main.c
--- pmake-1.111/main.c
+++ pmake-1.111/main.c
@@ -636,6 +636,17 @@
char found_path[MAXPATHLEN + 1];/* for searching for sys.mk */
struct timeval rightnow;/* to initialize random seed */
 
+#ifdef MAXPATHLEN_UNDEFINED
+   if (sysconf(_PC_PATH_MAX)  MAXPATHLEN) {
+   fprintf(stderr, This operating system runs with 
+   sysconf(_PC_PATH_MAX)  MAXPATHLEN\n(%ld  %ld). 
+   Please change the guesstimated value at the bottom\n
+   of 'make.h' and recompile, or reduce the actual 
+   value.\n, sysconf(_PC_PATH_MAX), (long)MAXPATHLEN);
+   return (255);
+   }
+#endif
+
/*
 * Set the seed to produce a different random sequences
 * on each program execution.
diff -u pmake-1.111/debian/changelog pmake-1.111/debian/changelog
--- pmake-1.111/debian/changelog
+++ pmake-1.111/debian/changelog
@@ -1,3 +1,20 @@
+pmake (1.111-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Port to hurd-i386 (Closes: #547459)
+- make.h: define MAXPATHLEN if not defined (XXX kludge)
+- main.c: check sysconf(_PC_PATH_MAX) and bail out if larger than
+  the defined kludge value; inform the user appropriately
+I’m doing it this way because this codebase is ancient, and to
+really fix this issue is not worth the effort. No activity in
+more than four years speaks for itself.
+  * mk/sys.mk: We do not run NetBSD® but Debian. (Closes: #493839)
+  * debian/rules: Replace 「dpkg --print-gnu-build-architecture」 with
+「dpkg-architecture -qDEB_HOST_ARCH_CPU」 to unbreak build.
+  * debian/rules: Use -Wno-unused to clean up build messages.
+
+ -- Thorsten Glaser t...@mirbsd.de  Sun, 25 Oct 2009 09:37:20 +
+
 pmake (1.111-1) unstable; urgency=low
 
   * New upstream snapshot.
diff -u pmake-1.111/debian/rules pmake-1.111/debian/rules
--- pmake-1.111/debian/rules
+++ pmake-1.111/debian/rules
@@ -2,12 +2,12 @@
 
 #export DH_VERBOSE=1
 
-ARCH=$(shell dpkg --print-gnu-build-architecture)
+ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 CFLAGS=-O2  -g -Wall -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= \
-I. -DMACHINE=\\\debian\\\ -DMACHINE_ARCH=\\\${ARCH}\\\ \
-DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME \
-DHAVE_VSNPRINTF \
-   -D_GNU_SOURCE
+   -D_GNU_SOURCE -Wno-unused
 
 build: build-stamp
 build-stamp:
only in patch2:
unchanged:
--- pmake-1.111.orig/make.h
+++ pmake-1.111/make.h
@@ -476,4 +476,10 @@
 #define MAX(a, b) ((a  b) ? a : b)
 #endif
 
+/* maybe Debian GNU/HURD */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096/* some sensible value */
+#define MAXPATHLEN_UNDEFINED   /* triggers check in main.c */
+#endif
+
 #endif /* _MAKE_H_ */


Thanks,
//mirabilos
-- 
16:47⎜«mika:#grml» .oO(mira ist einfach gut)  23:22⎜«mikap:#grml»
mirabilos: und dein bootloader ist geil :)23:29⎜«mikap:#grml» und ich
finds saugeil dass ich ein bsd zum booten mit grml hab, das muss ich dann
gleich mal auf usb-stick installieren   -- Michael Prokop über MirOS bsd4grml



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#493839: pmake: diff for NMU version 1.111-1.1

2009-10-24 Thread Thorsten Glaser
tags 493839 + patch
tags 547459 + patch
thanks

Dear Sam,

I have prepared a patch to a four-year untouched package which would
probably not have built cleanly these days anyway. The main new feature
is support for hurd-i386 (although this is done as a kludge; I’d do it
properly if we were to re-base onto a current version of nbmake, or even
(I know quite a lot of NetBSD® developers) push that upstream), but I’ve
also fixed a few other problems and another bug during that.

My intention is to ask a DD (as I’m only a DM myself) for an NMU if there
is no reply within “a while” (I’m leaving this unspecified but have CC’d
the hurd port maintainers to this), because e.g. makefs cannot be built on
hurd-i386 currently only for the lack of pmake.

I’ve verified it builds on a sid (i386) schroot, as well as some unknown
hurd-i386 version on gnubber.bddebian.org (luckily it’s up right now),
but not whether makefs can indeed be built with it, because I cannot in-
stall packages on gnubber.

diff -u pmake-1.111/mk/sys.mk pmake-1.111/mk/sys.mk
--- pmake-1.111/mk/sys.mk
+++ pmake-1.111/mk/sys.mk
@@ -1,7 +1,7 @@
 #  $NetBSD: sys.mk,v 1.54 1999/03/10 14:06:14 mycroft Exp $
 #  @(#)sys.mk  8.2 (Berkeley) 3/21/94
 
-unix?= We run NetBSD.
+unix?= We run Debian GNU.
 
 .SUFFIXES: .out .a .ln .o .s .S .c .cc .C .F .f .r .y .l .cl .p .h .sh .m4
 
diff -u pmake-1.111/main.c pmake-1.111/main.c
--- pmake-1.111/main.c
+++ pmake-1.111/main.c
@@ -636,6 +636,17 @@
char found_path[MAXPATHLEN + 1];/* for searching for sys.mk */
struct timeval rightnow;/* to initialize random seed */
 
+#ifdef MAXPATHLEN_UNDEFINED
+   if (sysconf(_PC_PATH_MAX)  MAXPATHLEN) {
+   fprintf(stderr, This operating system runs with 
+   sysconf(_PC_PATH_MAX)  MAXPATHLEN\n(%ld  %ld). 
+   Please change the guesstimated value at the bottom\n
+   of 'make.h' and recompile, or reduce the actual 
+   value.\n, sysconf(_PC_PATH_MAX), (long)MAXPATHLEN);
+   return (255);
+   }
+#endif
+
/*
 * Set the seed to produce a different random sequences
 * on each program execution.
diff -u pmake-1.111/debian/changelog pmake-1.111/debian/changelog
--- pmake-1.111/debian/changelog
+++ pmake-1.111/debian/changelog
@@ -1,3 +1,20 @@
+pmake (1.111-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Port to hurd-i386 (Closes: #547459)
+- make.h: define MAXPATHLEN if not defined (XXX kludge)
+- main.c: check sysconf(_PC_PATH_MAX) and bail out if larger than
+  the defined kludge value; inform the user appropriately
+I’m doing it this way because this codebase is ancient, and to
+really fix this issue is not worth the effort. No activity in
+more than four years speaks for itself.
+  * mk/sys.mk: We do not run NetBSD® but Debian. (Closes: #493839)
+  * debian/rules: Replace 「dpkg --print-gnu-build-architecture」 with
+「dpkg-architecture -qDEB_BUILD_ARCH_CPU」 to unbreak build.
+  * debian/rules: Use -Wno-unused to clean up build messages.
+
+ -- Thorsten Glaser t...@mirbsd.de  Sat, 24 Oct 2009 21:01:40 +
+
 pmake (1.111-1) unstable; urgency=low
 
   * New upstream snapshot.
diff -u pmake-1.111/debian/rules pmake-1.111/debian/rules
--- pmake-1.111/debian/rules
+++ pmake-1.111/debian/rules
@@ -2,12 +2,12 @@
 
 #export DH_VERBOSE=1
 
-ARCH=$(shell dpkg --print-gnu-build-architecture)
+ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
 CFLAGS=-O2  -g -Wall -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= \
-I. -DMACHINE=\\\debian\\\ -DMACHINE_ARCH=\\\${ARCH}\\\ \
-DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME \
-DHAVE_VSNPRINTF \
-   -D_GNU_SOURCE
+   -D_GNU_SOURCE -Wno-unused
 
 build: build-stamp
 build-stamp:
only in patch2:
unchanged:
--- pmake-1.111.orig/make.h
+++ pmake-1.111/make.h
@@ -476,4 +476,10 @@
 #define MAX(a, b) ((a  b) ? a : b)
 #endif
 
+/* maybe Debian GNU/HURD */
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096/* some sensible value */
+#define MAXPATHLEN_UNDEFINED   /* triggers check in main.c */
+#endif
+
 #endif /* _MAKE_H_ */



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#493839: pmake: diff for NMU version 1.111-1.1

2009-10-24 Thread Guillem Jover
Hi!

On Sat, 2009-10-24 at 21:17:06 +, Thorsten Glaser wrote:
 diff -u pmake-1.111/debian/rules pmake-1.111/debian/rules
 --- pmake-1.111/debian/rules
 +++ pmake-1.111/debian/rules
 @@ -2,12 +2,12 @@
  
  #export DH_VERBOSE=1
  
 -ARCH=$(shell dpkg --print-gnu-build-architecture)
 +ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)

Here, even w/o having looked at the rules file, I think you mean
DEB_HOST_ARCH_CPU, the *_BUILD_* variables are most of the time the
wrong ones, mostly relevant only when cross-building.

regards,
guillem



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#493839: pmake: diff for NMU version 1.111-1.1

2009-10-24 Thread Thorsten Glaser
Guillem Jover dixit:

Here, even w/o having looked at the rules file, I think you mean
DEB_HOST_ARCH_CPU, the *_BUILD_* variables are most of the time the
wrong ones, mostly relevant only when cross-building.

Hm. I need the one of the system the produced binary will
eventually run on. (All this build/host/target is rather
confusing and badly documented.) Which one is that?

//mirabilos
-- 
15:39⎜«mika:#grml» mira|AO: mit XFree86® wär’ das nicht passiert - muhaha
15:48⎜thkoehler:#grml also warum machen die xorg Jungs eigentlich alles
kaputt? :)15:49⎜novoid:#grml thkoehler: weil sie als Kinder nie den
gebauten Turm selber umschmeissen durften?  -- ~/.Xmodmap wonders…



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#493839: pmake: diff for NMU version 1.111-1.1

2009-10-24 Thread Guillem Jover
On Sat, 2009-10-24 at 23:03:05 +, Thorsten Glaser wrote:
 Guillem Jover dixit:
  Here, even w/o having looked at the rules file, I think you mean
  DEB_HOST_ARCH_CPU, the *_BUILD_* variables are most of the time the
  wrong ones, mostly relevant only when cross-building.
 
 Hm. I need the one of the system the produced binary will
 eventually run on. (All this build/host/target is rather
 confusing and badly documented.) Which one is that?

That's *_HOST_*. And it seems to me to be properly documented in
dpkg-architecture(1), and in §4.9 of the debian policy. They also
have the same meaning as the GNU target names.

regards,
guillem



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org