Bug#438385: NMU awardeco #438385: fails on 64-bit platforms

2008-01-17 Thread Uwe Hermann
On Thu, Jan 17, 2008 at 08:50:29AM +0100, Giacomo Catenazzi wrote:
 Now I upload (still to DELAYED) the new version,
 diff attached.

Thanks!

 
 lintian give two warning (on your and on this NMU)
 - policy version

That's non-critical, I'll update it in the next upload.


 - empty /usr/bin
 I see you install the binary on /bin and not
 on /usr/bin. Is really what you want?

Oops, no. That's a bug indeed. I'll fix it in the next upload.


 Do you know why pool
 http://ftp.debian.org/debian/pool/main/a/awardeco/
 contains only i386 and amd64 ?
 But the package should be already build and installed on all archs:
 http://people.debian.org/~igloo/status.php?packages=awardeco

Hm, no idea. It does build fine everywhere though, see
http://buildd.debian.org/pkg.cgi?pkg=awardeco


Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org



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



Bug#438385: NMU awardeco #438385: fails on 64-bit platforms

2008-01-16 Thread Giacomo Catenazzi
Hello,

I'm ready for a NMU, attached I put the diff.
Now I'll upload the package in delayed.

the patch contain:
- fix on 64-bit architecture: use C99 fixed-bit integer
- fix of undeclared function: a potential bug, which can
  give problem on some architectures.
  Considering the package pourpose, maybe Architecture: any
  is to wide.
- fix a return of local stack variables

PS: only the first is a rc bug (#438385),
but the second adn the third are potential rc or important bugs.

ciao
cate
diff -u awardeco-0.2/debian/changelog awardeco-0.2/debian/changelog
--- awardeco-0.2/debian/changelog
+++ awardeco-0.2/debian/changelog
@@ -1,3 +1,11 @@
+awardeco (0.2-2.1) unstable; urgency=low
+
+  * Non-Maintainer Upload at BSP in Zurich: fix rc bug
+  * Use the C99 bit length integer, to be safe on various archs
+  * fix also headers inclusion (memcpy: string.h, exit: stdlib.h
+
+ -- Giacomo Catenazzi [EMAIL PROTECTED]  Sat, 12 Jan 2008 20:07:12 +0100
+
 awardeco (0.2-2) unstable; urgency=low
 
   * Fix FTBFS on GNU/kFreeBSD (Closes: #414235).
only in patch2:
unchanged:
--- awardeco-0.2.orig/debian/patches/30_fixeduint.patch
+++ awardeco-0.2/debian/patches/30_fixeduint.patch
@@ -0,0 +1,17 @@
+diff -Nur awardeco-0.2/src/awardeco.h awardeco-0.2.new/src/awardeco.h
+--- awardeco-0.2/src/awardeco.h	2006-08-05 11:38:03.0 +0200
 awardeco-0.2.new/src/awardeco.h	2008-01-16 08:12:10.0 +0100
+@@ -10,10 +10,11 @@
+ #define AWARDECO_H 1
+ 
+ #include	stdio.h
++#include	stdint.h
+ 
+ typedef unsigned char	byte;
+-typedef unsigned short	word;
+-typedef unsigned long	dword;
++typedef uint16_t	word;
++typedef uint32_t	dword;
+ 
+ #define	Xtract 		0x10
+ #define	List   		0x11
only in patch2:
unchanged:
--- awardeco-0.2.orig/debian/patches/40_fixheader.patch
+++ awardeco-0.2/debian/patches/40_fixheader.patch
@@ -0,0 +1,12 @@
+diff -Nur awardeco-0.2/src/awardfnc.c awardeco-0.2.new/src/awardfnc.c
+--- awardeco-0.2/src/awardfnc.c	2006-08-05 11:38:03.0 +0200
 awardeco-0.2.new/src/awardfnc.c	2008-01-16 08:25:31.0 +0100
+@@ -10,6 +10,8 @@
+ #define AWARDFUNC_H 1
+ 
+ #include	stdio.h
++#include	string.h
++#include	stdlib.h
+ 
+ typedef unsigned char	byte;
+ typedef unsigned short	word;
only in patch2:
unchanged:
--- awardeco-0.2.orig/debian/patches/40_fixwarnings.patch
+++ awardeco-0.2/debian/patches/40_fixwarnings.patch
@@ -0,0 +1,21 @@
+diff -Nur awardeco-0.2/src/awardfnc.c awardeco-0.2.new/src/awardfnc.c
+--- awardeco-0.2/src/awardfnc.c	2008-01-16 08:28:09.0 +0100
 awardeco-0.2.new/src/awardfnc.c	2008-01-16 08:30:41.0 +0100
+@@ -153,7 +153,7 @@
+ 
+ byte *GetFullDate(byte *mon, byte *day, byte *year)
+ 	{
+-		byte *Months[]={,
++		static byte const*const Months[]={,
+ January,
+ February,
+ March,
+@@ -166,7 +166,7 @@
+ October,
+ November,
+ December};
+-		byte Buf[20];
++		static byte Buf[20];  // Warning: we return this buffer, so place it in heap not on stack!
+ 		sprintf(Buf,%2.2s,year);
+ 
+ 		if((atoi(Buf)=0)  (atoi(Buf)70)) sprintf(Buf,%.2s %s %s%.2s,day,Months[atoi(mon)],20,year);


Bug#438385: NMU awardeco #438385: fails on 64-bit platforms

2008-01-16 Thread Uwe Hermann
Hi,

On Wed, Jan 16, 2008 at 08:51:48AM +0100, Giacomo Catenazzi wrote:
 I'm ready for a NMU, attached I put the diff.
 Now I'll upload the package in delayed.

Thanks, feel free to upload, but please see comments below.


   Considering the package pourpose, maybe Architecture: any
   is to wide.

Nope, don't think so. The package is supposed to work everywhere.


 diff -u awardeco-0.2/debian/changelog awardeco-0.2/debian/changelog
 --- awardeco-0.2/debian/changelog
 +++ awardeco-0.2/debian/changelog
 @@ -1,3 +1,11 @@
 +awardeco (0.2-2.1) unstable; urgency=low
 +
 +  * Non-Maintainer Upload at BSP in Zurich: fix rc bug
 +  * Use the C99 bit length integer, to be safe on various archs

Please add (Closes: #438385) here. Also, please end all changelog
lines with a full stop and start sentences with capital letters for
consistency.


 --- awardeco-0.2.orig/debian/patches/30_fixeduint.patch
 +++ awardeco-0.2/debian/patches/30_fixeduint.patch
 @@ -0,0 +1,17 @@
 +diff -Nur awardeco-0.2/src/awardeco.h awardeco-0.2.new/src/awardeco.h
 +--- awardeco-0.2/src/awardeco.h  2006-08-05 11:38:03.0 +0200
  awardeco-0.2.new/src/awardeco.h  2008-01-16 08:12:10.0 +0100
 +@@ -10,10 +10,11 @@
 + #define AWARDECO_H 1
 + 
 + #includestdio.h
 ++#includestdint.h
 + 
 + typedef unsigned char   byte;

Maybe make this uint8_t then, too, for consistency? Yes, it's more
cosmetical, but still.


Cheers, Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org



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



Bug#438385: NMU awardeco #438385: fails on 64-bit platforms

2008-01-16 Thread Giacomo A. Catenazzi

diff -u awardeco-0.2/debian/changelog awardeco-0.2/debian/changelog
--- awardeco-0.2/debian/changelog
+++ awardeco-0.2/debian/changelog
@@ -1,3 +1,11 @@
+awardeco (0.2-2.1) unstable; urgency=low
+
+  * Non-Maintainer Upload at BSP in Zurich: fix rc bug
+  * Use the C99 bit length integer, to be safe on various archs


Please add (Closes: #438385) here. Also, please end all changelog
lines with a full stop and start sentences with capital letters for
consistency.


oops. Ok. the first was a cut-copy error trying cdbs-edit-patch
(nice tools!). Never realized about cosmetic consistency, I'll fix
also that.


--- awardeco-0.2.orig/debian/patches/30_fixeduint.patch
+++ awardeco-0.2/debian/patches/30_fixeduint.patch
@@ -0,0 +1,17 @@
+diff -Nur awardeco-0.2/src/awardeco.h awardeco-0.2.new/src/awardeco.h
+--- awardeco-0.2/src/awardeco.h2006-08-05 11:38:03.0 +0200
 awardeco-0.2.new/src/awardeco.h2008-01-16 08:12:10.0 +0100
+@@ -10,10 +10,11 @@
+ #define AWARDECO_H 1
+ 
+ #include	stdio.h

++#include  stdint.h
+ 
+ typedef unsigned char	byte;


Maybe make this uint8_t then, too, for consistency? Yes, it's more
cosmetical, but still.


yes. This change doesn't harm:  in C, char is a byte and in POSIX,
char is 8 bit. So I take a smaller NMU.  But reading the code it
seems ok to do this conversion.

I've some other minor stylistic C correction, i.e. 0x;
is wrong, it should have a u postfix. (and ul if we care
about real C, but anyway POSIX int is 32-bit or more.),
but for this I think I (or you) should contact upstream author.

ciao
cate



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



Bug#438385: NMU awardeco #438385: fails on 64-bit platforms

2008-01-16 Thread Giacomo Catenazzi
Hello,

Now I upload (still to DELAYED) the new version,
diff attached.

I have fixed the problems you pointed in last mail,
and I noticed I forgot one part of the uintXX_t
patch.

BTW:
lintian give two warning (on your and on this NMU)
- policy version
- empty /usr/bin
I see you install the binary on /bin and not
on /usr/bin. Is really what you want?

Do you know why pool
http://ftp.debian.org/debian/pool/main/a/awardeco/
contains only i386 and amd64 ?
But the package should be already build and installed on all archs:
http://people.debian.org/~igloo/status.php?packages=awardeco

ciao
cate
diff -u awardeco-0.2/debian/changelog awardeco-0.2/debian/changelog
--- awardeco-0.2/debian/changelog
+++ awardeco-0.2/debian/changelog
@@ -1,3 +1,12 @@
+awardeco (0.2-2.1) unstable; urgency=low
+
+  * Non-Maintainer Upload at BSP in Zurich: fix rc bug.
+  * Use the C99 bit length integer, to be safe on various
+architectures (Closes: #438385).
+  * Fix also headers inclusion (memcpy: string.h, exit: stdlib.h).
+
+ -- Giacomo Catenazzi [EMAIL PROTECTED]  Thu, 17 Jan 2008 08:17:08 +0100
+
 awardeco (0.2-2) unstable; urgency=low
 
   * Fix FTBFS on GNU/kFreeBSD (Closes: #414235).
only in patch2:
unchanged:
--- awardeco-0.2.orig/debian/patches/30_fixeduint.patch
+++ awardeco-0.2/debian/patches/30_fixeduint.patch
@@ -0,0 +1,36 @@
+diff -Nur awardeco-0.2/src/awardeco.h awardeco-0.2.new/src/awardeco.h
+--- awardeco-0.2/src/awardeco.h	2006-08-05 11:38:03.0 +0200
 awardeco-0.2.new/src/awardeco.h	2008-01-17 08:25:23.0 +0100
+@@ -10,10 +10,11 @@
+ #define AWARDECO_H 1
+ 
+ #include	stdio.h
++#include	stdint.h
+ 
+-typedef unsigned char	byte;
+-typedef unsigned short	word;
+-typedef unsigned long	dword;
++typedef uint8_t		byte;
++typedef uint16_t	word;
++typedef uint32_t	dword;
+ 
+ #define	Xtract 		0x10
+ #define	List   		0x11
+diff -Nur awardeco-0.2/src/awardfnc.c awardeco-0.2.new/src/awardfnc.c
+--- awardeco-0.2/src/awardfnc.c	2006-08-05 11:38:03.0 +0200
 awardeco-0.2.new/src/awardfnc.c	2008-01-17 08:26:24.0 +0100
+@@ -10,10 +10,11 @@
+ #define AWARDFUNC_H 1
+ 
+ #include	stdio.h
++#include	stdint.h
+ 
+-typedef unsigned char	byte;
+-typedef unsigned short	word;
+-typedef unsigned long	dword;
++typedef uint8_t		byte;
++typedef uint16_t	word;
++typedef uint32_t	dword;
+ 
+ #define	Xtract 		0x10
+ #define	List   		0x11
only in patch2:
unchanged:
--- awardeco-0.2.orig/debian/patches/40_fixheader.patch
+++ awardeco-0.2/debian/patches/40_fixheader.patch
@@ -0,0 +1,12 @@
+diff -Nur awardeco-0.2/src/awardfnc.c awardeco-0.2.new/src/awardfnc.c
+--- awardeco-0.2/src/awardfnc.c	2008-01-17 08:26:37.0 +0100
 awardeco-0.2.new/src/awardfnc.c	2008-01-17 08:27:05.0 +0100
+@@ -11,6 +11,8 @@
+ 
+ #include	stdio.h
+ #include	stdint.h
++#include	string.h
++#include	stdlib.h
+ 
+ typedef uint8_t		byte;
+ typedef uint16_t	word;
only in patch2:
unchanged:
--- awardeco-0.2.orig/debian/patches/40_fixwarnings.patch
+++ awardeco-0.2/debian/patches/40_fixwarnings.patch
@@ -0,0 +1,21 @@
+diff -Nur awardeco-0.2/src/awardfnc.c awardeco-0.2.new/src/awardfnc.c
+--- awardeco-0.2/src/awardfnc.c	2008-01-16 08:28:09.0 +0100
 awardeco-0.2.new/src/awardfnc.c	2008-01-16 08:30:41.0 +0100
+@@ -153,7 +153,7 @@
+ 
+ byte *GetFullDate(byte *mon, byte *day, byte *year)
+ 	{
+-		byte *Months[]={,
++		static byte const*const Months[]={,
+ January,
+ February,
+ March,
+@@ -166,7 +166,7 @@
+ October,
+ November,
+ December};
+-		byte Buf[20];
++		static byte Buf[20];  // Warning: we return this buffer, so place it in heap not on stack!
+ 		sprintf(Buf,%2.2s,year);
+ 
+ 		if((atoi(Buf)=0)  (atoi(Buf)70)) sprintf(Buf,%.2s %s %s%.2s,day,Months[atoi(mon)],20,year);