pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/libgpg-error Avoid changing FS as it triggers...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2960ed545904
branches:  trunk
changeset: 505054:2960ed545904
user:      kim <kim%pkgsrc.org@localhost>
date:      Thu Dec 29 16:09:42 2005 +0000

description:
Avoid changing FS as it triggers an odd bug on some awk versions, with
incorrect field calculation for the second field if the first field is
numeric and there are only 2 fields total in the input record (line).

The buggy awk was in 2.99.* and early 3.99.*, and identifies itself as
awk version 20030729.  However, not all awk's with this version number
exhibit the problem (so it could be related to a library used by awk).

Recent 3.99.* builds don't have this problem, and the awk versio on
them is also much more recent.

diffstat:

 security/libgpg-error/distinfo         |   7 ++-
 security/libgpg-error/patches/patch-ae |  25 ++++++++++++
 security/libgpg-error/patches/patch-af |  25 ++++++++++++
 security/libgpg-error/patches/patch-ag |  25 ++++++++++++
 security/libgpg-error/patches/patch-ah |  25 ++++++++++++
 security/libgpg-error/patches/patch-ai |  70 ++++++++++++++++++++++++++++++++++
 6 files changed, 176 insertions(+), 1 deletions(-)

diffs (208 lines):

diff -r e12ad3506df2 -r 2960ed545904 security/libgpg-error/distinfo
--- a/security/libgpg-error/distinfo    Thu Dec 29 15:51:26 2005 +0000
+++ b/security/libgpg-error/distinfo    Thu Dec 29 16:09:42 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2005/02/24 13:10:07 agc Exp $
+$NetBSD: distinfo,v 1.5 2005/12/29 16:09:42 kim Exp $
 
 SHA1 (libgpg-error-1.0.tar.gz) = 1c91787f208c30a91678ebb2f173308f8fab3d36
 RMD160 (libgpg-error-1.0.tar.gz) = 382eda8abd94eaad9964350f20135305de2adad9
@@ -7,3 +7,8 @@
 SHA1 (patch-ab) = 43ccbcfc284735255111438a015837bc69dac938
 SHA1 (patch-ac) = add7f9971bd3a087db518d5e1ce12a14f2d84d6a
 SHA1 (patch-ad) = ddb86ddf354cc9228eec28154d41f1fa62f474f3
+SHA1 (patch-ae) = 0865909ebfc7594bb5854e9ef6f7da3718d034bf
+SHA1 (patch-af) = 47b27ae134a98d933697ef6de40348ab685eb9fd
+SHA1 (patch-ag) = 5cc03cb3745d366d348a0a2e495a112728b11a37
+SHA1 (patch-ah) = 4e648d5f42bd0253e0e6259fcbcca14c2de22491
+SHA1 (patch-ai) = 9db7b50cc98c5a4956a390cb721c51ef5f3e3a4f
diff -r e12ad3506df2 -r 2960ed545904 security/libgpg-error/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libgpg-error/patches/patch-ae    Thu Dec 29 16:09:42 2005 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-ae,v 1.1 2005/12/29 16:09:42 kim Exp $
+
+Setting FS in some versions of awk makes it null.  The default FS of
+"whitespace" works fine, so no need to redefine it.
+
+--- src/mkerrcodes1.awk.orig   2004-03-08 18:44:05.000000000 +0200
++++ src/mkerrcodes1.awk        2005-12-24 15:34:33.000000000 +0200
+@@ -55,7 +55,7 @@
+ # as is trailing whitespace.
+ 
+ BEGIN {
+-  FS="[\t]+";
++  #FS="[\t]+";
+   header = 1;
+   if (errnoidx == 0)
+     errnoidx = 2;
+@@ -67,7 +67,7 @@
+ /^#/ { next; }
+ 
+ header {
+-  if ($1 ~ /^[0-9]/)
++  if ($0 ~ /^[0-9]/)
+     {
+       print "#include <errno.h>";
+       print "";
diff -r e12ad3506df2 -r 2960ed545904 security/libgpg-error/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libgpg-error/patches/patch-af    Thu Dec 29 16:09:42 2005 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-af,v 1.1 2005/12/29 16:09:42 kim Exp $
+
+Setting FS in some versions of awk makes it null.  The default FS of
+"whitespace" works fine, so no need to redefine it.
+
+--- src/mkerrcodes.awk.orig    2004-04-22 16:30:12.000000000 +0300
++++ src/mkerrcodes.awk 2005-12-24 15:36:22.000000000 +0200
+@@ -54,7 +54,7 @@
+ # as is trailing whitespace.
+ 
+ BEGIN {
+-  FS="[ \t]+GPG_ERR_";
++  #FS="[ \t]+GPG_ERR_";
+   print "/* Output of mkerrcodes.awk.  DO NOT EDIT.  */";
+   print "";
+   header = 1;
+@@ -85,7 +85,7 @@
+   if (/^$/)
+     next;
+ 
+-    print "  { " $1 ", \"GPG_ERR_" $2 "\" },";
++    print "  { " $1 ", \"" $2 "\" },";
+ }
+ 
+ END {
diff -r e12ad3506df2 -r 2960ed545904 security/libgpg-error/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libgpg-error/patches/patch-ag    Thu Dec 29 16:09:42 2005 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-ag,v 1.1 2005/12/29 16:09:42 kim Exp $
+
+Setting FS in some versions of awk makes it null.  The default FS of
+"whitespace" works fine, so no need to redefine it.
+
+--- src/mkerrnos.awk.orig      2004-03-08 18:44:05.000000000 +0200
++++ src/mkerrnos.awk   2005-12-24 15:40:07.000000000 +0200
+@@ -56,7 +56,7 @@
+ # as is trailing whitespace.
+ 
+ BEGIN {
+-  FS="[\t]+";
++  #FS="[\t]+";
+   header = 1;
+   if (errnoidx == 0)
+     errnoidx = 2;
+@@ -68,7 +68,7 @@
+ /^#/ { next; }
+ 
+ header {
+-  if ($1 ~ /^[0-9]/)
++  if ($0 ~ /^[0-9]/)
+     {
+       print "#include <errno.h>";
+       print "";
diff -r e12ad3506df2 -r 2960ed545904 security/libgpg-error/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libgpg-error/patches/patch-ah    Thu Dec 29 16:09:42 2005 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-ah,v 1.1 2005/12/29 16:09:42 kim Exp $
+
+Setting FS in some versions of awk makes it null.  The default FS of
+"whitespace" works fine, so no need to redefine it.
+
+--- src/mkstrtable.awk.orig    2004-03-08 18:44:05.000000000 +0200
++++ src/mkstrtable.awk 2005-12-24 16:56:12.000000000 +0200
+@@ -81,7 +81,7 @@
+ # variable and macro name.
+ 
+ BEGIN {
+-  FS = "[\t]+";
++  #FS = "[\t]+";
+ # cpos holds the current position in the message string.
+   cpos = 0;
+ # msg holds the number of messages.
+@@ -97,7 +97,7 @@
+ /^#/ { next; }
+ 
+ header {
+-  if ($1 ~ /^[0123456789]+$/)
++  if ($0 ~ /^[0-9]+/)
+     {
+       print "/* The purpose of this complex string table is to produce";
+       print "   optimal code with a minimum of relocations.  */";
diff -r e12ad3506df2 -r 2960ed545904 security/libgpg-error/patches/patch-ai
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libgpg-error/patches/patch-ai    Thu Dec 29 16:09:42 2005 +0000
@@ -0,0 +1,70 @@
+$NetBSD: patch-ai,v 1.1 2005/12/29 16:09:42 kim Exp $
+
+Setting FS in some versions of awk makes it null.  Make this script
+work with the default FS of "whitespace" instead.
+
+--- src/mkheader.awk.orig      2004-03-08 18:44:05.000000000 +0200
++++ src/mkheader.awk   2005-12-24 16:51:38.000000000 +0200
+@@ -51,7 +51,7 @@
+ # at the full path of the files in @srcdir@.
+ 
+ BEGIN {
+-  FS = "[\t]+";
++  #FS = "[\t]+";
+ # sources_nr holds the number of error sources.
+   sources_nr = 0;
+ # codes_nr holds the number of error codes.
+@@ -74,7 +74,7 @@
+ }
+ 
+ sources_header {
+-  if ($1 ~ /^[0123456789]+$/)
++  if ($0 ~ /^[0-9]+/)
+     {
+       sources_header = 0;
+       sources_body = 1;
+@@ -88,7 +88,7 @@
+   if (/^$/)
+     next;
+ 
+-  if ($1 == "")
++  if ($0 !~ /^[0-9]+/)
+     {
+       sources_body = 0;
+       between_sources_and_codes = 1;
+@@ -103,7 +103,7 @@
+ }
+ 
+ between_sources_and_codes {
+-  if ($1 ~ /^[0123456789]+$/)
++  if ($0 ~ /^[0-9]+/)
+     {
+       between_sources_and_codes = 0;
+       codes_body = 1;
+@@ -117,7 +117,7 @@
+   if (/^$/)
+     next;
+ 
+-  if ($1 == "")
++  if ($0 !~ /^[0-9]+/)
+     {
+       codes_body = 0;
+       between_codes_and_errnos = 1;
+@@ -132,7 +132,7 @@
+ }
+ 
+ between_codes_and_errnos {
+-  if ($1 ~ /^[0-9]/)
++  if ($0 ~ /^[0-9]+/)
+     {
+       between_codes_and_errnos = 0;
+       errnos_body = 1;
+@@ -146,7 +146,7 @@
+   if (/^$/)
+     next;
+ 
+-  if ($1 !~ /^[0-9]/)
++  if ($0 !~ /^[0-9]+/)
+     {
+ # Note that this assumes that gpg-error.h.in doesn't start with a digit.
+       errnos_body = 0;



Home | Main Index | Thread Index | Old Index