[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.18-17-g4a9d69c

by Werner Koch cvs at cvs.gnupg.org
Tue Jan 31 19:07:04 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, STABLE-BRANCH-2-0 has been updated
       via  4a9d69ca87d4e21b015b7ceab6b2b6ba3809ec22 (commit)
       via  92844f475ba7989772c407fbced3229379053cf4 (commit)
      from  a4b3a420a16a5d3b900ce6c7c06e00a83fee4953 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4a9d69ca87d4e21b015b7ceab6b2b6ba3809ec22
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Jan 31 18:08:24 2012 +0100

    Update copyright year.

diff --git a/Makefile.am b/Makefile.am
index a0a9aa1..447976e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
-# Makefile.am - main makefile for NewPG/GnuPG
-#     	Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+# Makefile.am - Top level makefile for GnuPG
+#     	Copyright (C) 2001, 2004, 2012 Free Software Foundation, Inc.
 #
 # This file is part of GnuPG.
 #
diff --git a/README b/README
index 5ba647c..e7289c9 100644
--- a/README
+++ b/README
@@ -2,8 +2,9 @@
                       =========================
                              Version 2.0
 
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-     2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+             2005, 2006, 2007, 2008, 2009, 2010, 2011,
+             2012 Free Software Foundation, Inc.
 
 
 INTRODUCTION
@@ -35,7 +36,7 @@ GnuPG 2.0 depends on the following packages:
   libgcrypt        (ftp://ftp.gnupg.org/gcrypt/libgcrypt/)
   libksba          (ftp://ftp.gnupg.org/gcrypt/libksba/)
   libassuan >= 2.0 (ftp://ftp.gnupg.org/gcrypt/libassuan/)
-  
+
 You also need the Pinentry package for most function of GnuPG; however
 it is not a build requirement.  Pinentry is available at
 ftp://ftp.gnupg.org/gcrypt/pinentry/ .
@@ -105,7 +106,7 @@ and use them if possible.  You may also find GnuPG mirrored on some of
 the regular GNU mirrors.
 
 We have some mailing lists dedicated to GnuPG:
-   
+
    gnupg-announce at gnupg.org   For important announcements like new
                               versions and such stuff.  This is a
                               moderated list and has very low traffic.
diff --git a/configure.ac b/configure.ac
index 758d00c..289e0f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,7 @@
 # configure.ac - for GnuPG 2.0
 # Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-#               2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+#               2006, 2007, 2008, 2010, 2011,
+#               2012 Free Software Foundation, Inc.
 #
 # This file is part of GnuPG.
 #
diff --git a/jnlib/argparse.c b/jnlib/argparse.c
index dac6878..c9b5384 100644
--- a/jnlib/argparse.c
+++ b/jnlib/argparse.c
@@ -153,8 +153,8 @@ static void show_version(void);
 static void
 initialize( ARGPARSE_ARGS *arg, const char *filename, unsigned *lineno )
 {
-  if( !(arg->flags & (1<<15)) ) 
-    { 
+  if( !(arg->flags & (1<<15)) )
+    {
       /* Initialize this instance. */
       arg->internal.idx = 0;
       arg->internal.last = NULL;
@@ -167,13 +167,13 @@ initialize( ARGPARSE_ARGS *arg, const char *filename, unsigned *lineno )
       if ( *arg->argc < 0 )
         jnlib_log_bug ("invalid argument for arg_parsee\n");
     }
-  
-  
+
+
   if (arg->err)
     {
       /* Last option was erroneous.  */
       const char *s;
-      
+
       if (filename)
         {
           if ( arg->r_opt == ARGPARSE_UNEXPECTED_ARG )
@@ -194,10 +194,10 @@ initialize( ARGPARSE_ARGS *arg, const char *filename, unsigned *lineno )
             s = _("invalid option");
           jnlib_log_error ("%s:%u: %s\n", filename, *lineno, s);
 	}
-      else 
+      else
         {
           s = arg->internal.last? arg->internal.last:"[??]";
-            
+
           if ( arg->r_opt == ARGPARSE_MISSING_ARG )
             jnlib_log_error (_("missing argument for option \"%.50s\"\n"), s);
           else if ( arg->r_opt == ARGPARSE_UNEXPECTED_ARG )
@@ -271,10 +271,10 @@ optfile_parse (FILE *fp, const char *filename, unsigned *lineno,
   char *buffer = NULL;
   size_t buflen = 0;
   int in_alias=0;
-  
+
   if (!fp) /* Divert to to arg_parse() in this case.  */
     return arg_parse (arg, opts);
-  
+
   initialize (arg, filename, lineno);
 
   /* Find the next keyword.  */
@@ -302,9 +302,9 @@ optfile_parse (FILE *fp, const char *filename, unsigned *lineno,
                 arg->r_opt = ((opts[idx].flags & ARGPARSE_OPT_COMMAND)
                               ? ARGPARSE_INVALID_COMMAND
                               : ARGPARSE_INVALID_OPTION);
-              else if (!(opts[idx].flags & 7)) 
+              else if (!(opts[idx].flags & 7))
                 arg->r_type = 0; /* Does not take an arg. */
-              else if ((opts[idx].flags & 8) )  
+              else if ((opts[idx].flags & 8) )
                 arg->r_type = 0; /* Arg is optional.  */
               else
                 arg->r_opt = ARGPARSE_MISSING_ARG;
@@ -312,13 +312,13 @@ optfile_parse (FILE *fp, const char *filename, unsigned *lineno,
               break;
 	    }
           else if (state == 3)
-            {	
+            {
               /* No argument found.  */
               if (in_alias)
                 arg->r_opt = ARGPARSE_MISSING_ARG;
-              else if (!(opts[idx].flags & 7)) 
+              else if (!(opts[idx].flags & 7))
                 arg->r_type = 0; /* Does not take an arg. */
-              else if ((opts[idx].flags & 8))  
+              else if ((opts[idx].flags & 8))
                 arg->r_type = 0; /* No optional argument. */
               else
                 arg->r_opt = ARGPARSE_MISSING_ARG;
@@ -328,14 +328,14 @@ optfile_parse (FILE *fp, const char *filename, unsigned *lineno,
           else if (state == 4)
             {
               /* Has an argument. */
-              if (in_alias) 
+              if (in_alias)
                 {
                   if (!buffer)
                     arg->r_opt = ARGPARSE_UNEXPECTED_ARG;
-                  else 
+                  else
                     {
                       char *p;
-                      
+
                       buffer[i] = 0;
                       p = strpbrk (buffer, " \t");
                       if (p)
@@ -369,13 +369,13 @@ optfile_parse (FILE *fp, const char *filename, unsigned *lineno,
 		    }
                   else
                     buffer[i] = 0;
-                  
+
                   if (buffer)
                     {
                       trim_spaces (buffer);
                       p = buffer;
                       if (*p == '"')
-                        { 
+                        {
                           /* Remove quotes. */
                           p++;
                           if (*p && p[strlen(p)-1] == '\"' )
@@ -422,7 +422,7 @@ optfile_parse (FILE *fp, const char *filename, unsigned *lineno,
                   in_alias = 1;
                   state = 3;
                 }
-              else 
+              else
                 {
                   arg->r_opt = ((opts[idx].flags & ARGPARSE_OPT_COMMAND)
                                 ? ARGPARSE_INVALID_COMMAND
@@ -444,13 +444,13 @@ optfile_parse (FILE *fp, const char *filename, unsigned *lineno,
             }
         }
       else if (state == 4)
-        { 
+        {
           /* Collect the argument. */
           if (buffer)
             {
               if (i < buflen-1)
                 buffer[i++] = c;
-              else 
+              else
                 {
                   char *tmp;
                   size_t tmplen = buflen + 50;
@@ -472,7 +472,7 @@ optfile_parse (FILE *fp, const char *filename, unsigned *lineno,
             }
           else if (i < DIM(keyword)-1)
             keyword[i++] = c;
-          else 
+          else
             {
               size_t tmplen = DIM(keyword) + 50;
               buffer = jnlib_malloc (tmplen);
@@ -494,13 +494,13 @@ optfile_parse (FILE *fp, const char *filename, unsigned *lineno,
           arg->r_opt = ARGPARSE_KEYWORD_TOO_LONG;
           state = -1; /* Skip rest of line and leave.  */
         }
-      else 
+      else
         {
           keyword[i++] = c;
           state = 2;
         }
     }
-  
+
   return arg->r_opt;
 }
 
@@ -562,7 +562,7 @@ arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts)
   char **argv;
   char *s, *s2;
   int i;
-  
+
   initialize( arg, NULL, NULL );
   argc = *arg->argc;
   argv = *arg->argv;
@@ -573,10 +573,10 @@ arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts)
       /* Skip the first argument.  */
       argc--; argv++; idx++;
     }
-  
+
  next_one:
-  if (!argc) 
-    { 
+  if (!argc)
+    {
       /* No more args.  */
       arg->r_opt = 0;
       goto leave; /* Ready. */
@@ -585,14 +585,14 @@ arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts)
   s = *argv;
   arg->internal.last = s;
 
-  if (arg->internal.stopped && (arg->flags & ARGPARSE_FLAG_ALL)) 
+  if (arg->internal.stopped && (arg->flags & ARGPARSE_FLAG_ALL))
     {
       arg->r_opt = ARGPARSE_IS_ARG;  /* Not an option but an argument.  */
       arg->r_type = 2;
       arg->r.ret_str = s;
       argc--; argv++; idx++; /* set to next one */
     }
-  else if( arg->internal.stopped ) 
+  else if( arg->internal.stopped )
     {
       arg->r_opt = 0;
       goto leave; /* Ready.  */
@@ -601,10 +601,10 @@ arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts)
     {
       /* Long option.  */
       char *argpos;
-      
+
       arg->internal.inarg = 0;
       if (!s[2] && !(arg->flags & ARGPARSE_FLAG_NOSTOP))
-        { 
+        {
           /* Stop option processing.  */
           arg->internal.stopped = 1;
           argc--; argv++; idx++;
@@ -643,7 +643,7 @@ arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts)
           fputs ("--dump-options\n--help\n--version\n--warranty\n", stdout);
           exit (0);
 	}
-      
+
       if ( i == -2 )
         arg->r_opt = ARGPARSE_AMBIGUOUS_OPTION;
       else if ( i == -1 )
@@ -673,40 +673,40 @@ arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts)
             {
               arg->r_opt = ARGPARSE_MISSING_ARG;
 	    }
-          else if ( !argpos && *s2 == '-' 
-                    && (opts[i].flags & ARGPARSE_OPT_OPTIONAL) ) 
+          else if ( !argpos && *s2 == '-'
+                    && (opts[i].flags & ARGPARSE_OPT_OPTIONAL) )
             {
               /* The argument is optional and the next seems to be an
                  option.  We do not check this possible option but
                  assume no argument */
               arg->r_type = ARGPARSE_TYPE_NONE;
 	    }
-          else 
+          else
             {
               set_opt_arg (arg, opts[i].flags, s2);
-              if ( !argpos ) 
+              if ( !argpos )
                 {
                   argc--; argv++; idx++; /* Skip one.  */
 		}
 	    }
 	}
       else
-        { 
+        {
           /* Does not take an argument. */
           if ( argpos )
-            arg->r_type = ARGPARSE_UNEXPECTED_ARG; 
+            arg->r_type = ARGPARSE_UNEXPECTED_ARG;
           else
             arg->r_type = 0;
 	}
       argc--; argv++; idx++; /* Set to next one.  */
     }
-    else if ( (*s == '-' && s[1]) || arg->internal.inarg ) 
+    else if ( (*s == '-' && s[1]) || arg->internal.inarg )
       {
         /* Short option.  */
 	int dash_kludge = 0;
 
 	i = 0;
-	if ( !arg->internal.inarg ) 
+	if ( !arg->internal.inarg )
           {
 	    arg->internal.inarg++;
 	    if ( (arg->flags & ARGPARSE_FLAG_ONEDASH) )
@@ -727,7 +727,7 @@ arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts)
               if ( opts[i].short_opt == *s )
                 break;
           }
-        
+
 	if ( !opts[i].short_opt && ( *s == 'h' || *s == '?' ) )
           show_help (opts, arg->flags);
 
@@ -837,13 +837,13 @@ long_opt_strlen( ARGPARSE_OPTS *o )
 {
   size_t n = strlen (o->long_opt);
 
-  if ( o->description && *o->description == '|' ) 
+  if ( o->description && *o->description == '|' )
     {
       const char *s;
 #ifdef JNLIB_NEED_UTF8CONV
       int is_utf8 = is_native_utf8 ();
 #endif
-        
+
       s=o->description+1;
       if ( *s != '=' )
         n++;
@@ -875,7 +875,7 @@ static void
 show_help (ARGPARSE_OPTS *opts, unsigned int flags)
 {
   const char *s;
-  
+
   show_version ();
   putchar ('\n');
   s = strusage(41);
@@ -904,8 +904,8 @@ show_help (ARGPARSE_OPTS *opts, unsigned int flags)
           if ( s && *s== '@' && !s[1] ) /* Hide this line.  */
             continue;
           if ( s && *s == '@' )  /* Unindented comment only line.  */
-            { 
-              for (s++; *s; s++ ) 
+            {
+              for (s++; *s; s++ )
                 {
                   if ( *s == '\n' )
                     {
@@ -923,9 +923,9 @@ show_help (ARGPARSE_OPTS *opts, unsigned int flags)
           if ( opts[i].short_opt < 256 )
             {
               printf (" -%c", opts[i].short_opt);
-              if ( !opts[i].long_opt ) 
+              if ( !opts[i].long_opt )
                 {
-                  if (s && *s == '|' ) 
+                  if (s && *s == '|' )
                     {
                       putchar (' '); j++;
                       for (s++ ; *s && *s != '|'; s++, j++ )
@@ -937,11 +937,11 @@ show_help (ARGPARSE_OPTS *opts, unsigned int flags)
 	    }
           else
             fputs("   ", stdout);
-          if ( opts[i].long_opt ) 
+          if ( opts[i].long_opt )
             {
               j += printf ("%c --%s", opts[i].short_opt < 256?',':' ',
                            opts[i].long_opt );
-              if (s && *s == '|' ) 
+              if (s && *s == '|' )
                 {
                   if ( *++s != '=' )
                     {
@@ -970,7 +970,7 @@ show_help (ARGPARSE_OPTS *opts, unsigned int flags)
                 {
                   if ( *s == '\n' )
                     {
-                      if ( s[1] ) 
+                      if ( s[1] )
                         {
                           putchar ('\n');
                           for (j=0; j < indent; j++ )
@@ -987,10 +987,10 @@ show_help (ARGPARSE_OPTS *opts, unsigned int flags)
 	    puts ("\n(A single dash may be used instead of the double ones)");
     }
   if ( (s=strusage(19)) )
-    { 
+    {
       /* bug reports to ... */
       char *s2;
-      
+
       putchar('\n');
       s2 = strstr (s, "@EMAIL@");
       if (s2)
@@ -1066,7 +1066,7 @@ usage (int level)
         putc ('\n', stderr);
       exit (2);
     }
-  else if (level == 2) 
+  else if (level == 2)
     {
       puts (strusage(41));
       exit (0);
@@ -1096,10 +1096,10 @@ const char *
 strusage( int level )
 {
   const char *p = strusage_handler? strusage_handler(level) : NULL;
-  
+
   if ( p )
     return p;
-  
+
   switch ( level )
     {
     case 10: p = ("License GPLv3+: GNU GPL version 3 or later "
@@ -1107,7 +1107,7 @@ strusage( int level )
       break;
     case 11: p = "foo"; break;
     case 13: p = "0.0"; break;
-    case 14: p = "Copyright (C) 2011 Free Software Foundation, Inc."; break;
+    case 14: p = "Copyright (C) 2012 Free Software Foundation, Inc."; break;
     case 15: p =
 "This is free software: you are free to change and redistribute it.\n"
 "There is NO WARRANTY, to the extent permitted by law.\n";
@@ -1127,7 +1127,7 @@ strusage( int level )
     case 40: /* short and long usage */
     case 41: p = ""; break;
     }
-  
+
   return p;
 }
 
@@ -1178,7 +1178,7 @@ main(int argc, char **argv)
 	  case 'c': opt.crf = pargs.r_type? pargs.r.ret_str:"a.crf"; break;
 	  case 'm': opt.myopt = pargs.r_type? pargs.r.ret_int : 1; break;
 	  case 500: opt.a_long_one++;  break;
-	  default : pargs.err = ARGPARSE_PRINT_WARNING; break; 
+	  default : pargs.err = ARGPARSE_PRINT_WARNING; break;
 	}
     }
     for(i=0; i < argc; i++ )
diff --git a/tools/watchgnupg.c b/tools/watchgnupg.c
index 145a76b..aae1120 100644
--- a/tools/watchgnupg.c
+++ b/tools/watchgnupg.c
@@ -40,7 +40,7 @@
 #define MYVERSION_LINE PGM " (GnuPG) " VERSION
 #define BUGREPORT_LINE "\nReport bugs to <bug-gnupg at gnu.org>.\n"
 #else
-#define MYVERSION_LINE PGM 
+#define MYVERSION_LINE PGM
 #define BUGREPORT_LINE ""
 #endif
 #if !defined(SUN_LEN) || !defined(PF_LOCAL) || !defined(AF_LOCAL)
@@ -109,7 +109,7 @@ xrealloc (void *old, size_t n)
     die ("out of core");
   return p;
 }
-    
+
 
 struct client_s {
   struct client_s *next;
@@ -117,7 +117,7 @@ struct client_s {
   size_t size;  /* Allocated size of buffer. */
   size_t len;   /* Current length of buffer. */
   unsigned char *buffer; /* Buffer to with data already read. */
-  
+
 };
 typedef struct client_s *client_t;
 
@@ -128,7 +128,7 @@ print_fd_and_time (int fd)
 {
   struct tm *tp;
   time_t atime = time (NULL);
-  
+
   tp = localtime (&atime);
   printf ("%3d - %04d-%02d-%02d %02d:%02d:%02d ",
           fd,
@@ -150,7 +150,7 @@ print_line (client_t c, const char *line)
       if (c->buffer && c->len)
         {
           print_fd_and_time (c->fd);
-          fwrite (c->buffer, c->len, 1, stdout); 
+          fwrite (c->buffer, c->len, 1, stdout);
           putc ('\n', stdout);
           c->len = 0;
         }
@@ -162,10 +162,10 @@ print_line (client_t c, const char *line)
       print_fd_and_time (c->fd);
       if (c->buffer && c->len)
         {
-          fwrite (c->buffer, c->len, 1, stdout); 
+          fwrite (c->buffer, c->len, 1, stdout);
           c->len = 0;
         }
-      fwrite (line, s - line + 1, 1, stdout); 
+      fwrite (line, s - line + 1, 1, stdout);
       line = s + 1;
     }
   n = strlen (line);
@@ -188,12 +188,12 @@ static void
 print_version (int with_help)
 {
   fputs (MYVERSION_LINE "\n"
-         "Copyright (C) 2004 Free Software Foundation, Inc.\n"
+         "Copyright (C) 2012 Free Software Foundation, Inc.\n"
          "This program comes with ABSOLUTELY NO WARRANTY.\n"
          "This is free software, and you are welcome to redistribute it\n"
          "under certain conditions. See the file COPYING for details.\n",
          stdout);
-        
+
   if (with_help)
     fputs ("\n"
           "Usage: " PGM " [OPTIONS] SOCKETNAME\n"
@@ -204,11 +204,11 @@ print_version (int with_help)
           "  --version   print version of the program and exit\n"
           "  --help      display this help and exit\n"
           BUGREPORT_LINE, stdout );
-  
+
   exit (0);
 }
 
-int 
+int
 main (int argc, char **argv)
 {
   int last_argc = -1;
@@ -219,7 +219,7 @@ main (int argc, char **argv)
   int server;
   int flags;
   client_t client_list = NULL;
- 
+
   if (argc)
     {
       argc--; argv++;
@@ -246,8 +246,8 @@ main (int argc, char **argv)
           force = 1;
           argc--; argv++;
         }
-    }          
- 
+    }
+
   if (argc != 1)
     {
       fprintf (stderr, "usage: " PGM " socketname\n");
@@ -272,7 +272,7 @@ main (int argc, char **argv)
     die ("fcntl (F_GETFL) failed: %s\n", strerror (errno));
   if ( fcntl (server, F_SETFL, (flags | O_NONBLOCK)) == -1)
     die ("fcntl (F_SETFL) failed: %s\n", strerror (errno));
-  
+
 
   memset (&srvr_addr, 0, sizeof srvr_addr);
   srvr_addr.sun_family = AF_LOCAL;
@@ -280,10 +280,10 @@ main (int argc, char **argv)
   srvr_addr.sun_path[sizeof (srvr_addr.sun_path) - 1] = 0;
   addrlen = SUN_LEN (&srvr_addr);
 
-  
+
  again:
   if (bind (server, (struct sockaddr *) &srvr_addr, addrlen))
-    { 
+    {
       if (errno == EADDRINUSE && force)
         {
           force = 0;
@@ -320,7 +320,7 @@ main (int argc, char **argv)
         continue;  /* Ignore any errors. */
 
       if (FD_ISSET (server, &rfds)) /* New connection. */
-        { 
+        {
           struct sockaddr_un clnt_addr;
           int fd;
 
@@ -335,7 +335,7 @@ main (int argc, char **argv)
               close (fd);
               printf ("[connection request denied: too many connections]\n");
             }
-          else 
+          else
             {
               for (client = client_list; client && client->fd != -1;
                    client = client->next)
@@ -355,7 +355,7 @@ main (int argc, char **argv)
           {
             char line[256];
             int n;
-            
+
             n = read (client->fd, line, sizeof line - 1);
             if (n < 0)
               {
@@ -366,7 +366,7 @@ main (int argc, char **argv)
                 close (client->fd);
                 client->fd = -1;
               }
-            else if (!n) 
+            else if (!n)
               {
                 print_line (client, NULL); /* flush */
                 close (client->fd);

commit 92844f475ba7989772c407fbced3229379053cf4
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Jan 31 18:01:17 2012 +0100

    Require an installed gitlog_to_changelog for make dist.
    
    * scripts/gitlog-to-changelog: Remove.
    * Makefile.am (GITLOG_TO_CHANGELOG): New.
    (gen-ChangeLog): Use it.  Add set -e.

diff --git a/Makefile.am b/Makefile.am
index 8a54655..a0a9aa1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,6 +22,8 @@ ACLOCAL_AMFLAGS = -I m4 -I gl/m4
 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
 DISTCHECK_CONFIGURE_FLAGS = --enable-symcryptrun --enable-mailto --enable-gpgtar
 
+GITLOG_TO_CHANGELOG=gitlog-to-changelog
+
 EXTRA_DIST = scripts/config.rpath autogen.sh README.SVN              \
 	     ChangeLog-2011 po/ChangeLog-2011 scripts/ChangeLog-2011
 
@@ -86,9 +88,10 @@ dist-hook: gen-ChangeLog
 gen_start_date = 2011-12-01T06:00:00
 .PHONY: gen-ChangeLog
 gen-ChangeLog:
+	set -e;								\
 	if test -d $(top_srcdir)/.git; then				\
 	  (cd $(top_srcdir) &&                      			\
-	    ./scripts/gitlog-to-changelog				\
+	    $(GITLOG_TO_CHANGELOG) --append-dot --tear-off		\
 	    --amend=scripts/git-log-fix	 				\
 	    --since=$(gen_start_date) ) > $(distdir)/cl-t;		\
           cat $(top_srcdir)/scripts/git-log-footer >> $(distdir)/cl-t;  \
@@ -99,5 +102,3 @@ gen-ChangeLog:
 
 stowinstall:
 	$(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg
-
-
diff --git a/scripts/gitlog-to-changelog b/scripts/gitlog-to-changelog
deleted file mode 100755
index 056b9b7..0000000
--- a/scripts/gitlog-to-changelog
+++ /dev/null
@@ -1,351 +0,0 @@
-eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
-  & eval 'exec perl -wS "$0" $argv:q'
-    if 0;
-# Convert git log output to ChangeLog format.
-
-my $VERSION = '2012-01-20 10:14'; # UTC
-# The definition above must lie within the first 8 lines in order
-# for the Emacs time-stamp write hook (at end) to update it.
-# If you change this file with Emacs, please let the write hook
-# do its job.  Otherwise, update this string manually.
-
-# Copyright (C) 2008-2011 Free Software Foundation, Inc.
-
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Written by Jim Meyering
-
-use strict;
-use warnings;
-use Getopt::Long;
-use POSIX qw(strftime);
-
-(my $ME = $0) =~ s|.*/||;
-
-# use File::Coda; # http://meyering.net/code/Coda/
-END {
-  defined fileno STDOUT or return;
-  close STDOUT and return;
-  warn "$ME: failed to close standard output: $!\n";
-  $? ||= 1;
-}
-
-sub usage ($)
-{
-  my ($exit_code) = @_;
-  my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
-  if ($exit_code != 0)
-    {
-      print $STREAM "Try `$ME --help' for more information.\n";
-    }
-  else
-    {
-      print $STREAM <<EOF;
-Usage: $ME [OPTIONS] [ARGS]
-
-Convert git log output to ChangeLog format.  If present, any ARGS
-are passed to "git log".  To avoid ARGS being parsed as options to
-$ME, they may be preceded by '--'.
-
-OPTIONS:
-
-   --amend=FILE FILE maps from an SHA1 to perl code (i.e., s/old/new/) that
-                  makes a change to SHA1's commit log text or metadata.
-   --append-dot append a dot to the first line of each commit message if
-                  there is no other punctuation or blank at the end.
-   --since=DATE convert only the logs since DATE;
-                  the default is to convert all log entries.
-   --format=FMT set format string for commit subject and body;
-                  see 'man git-log' for the list of format metacharacters;
-                  the default is '%s%n%b%n'
-
-   --help       display this help and exit
-   --version    output version information and exit
-
-EXAMPLE:
-
-  $ME --since=2008-01-01 > ChangeLog
-  $ME -- -n 5 foo > last-5-commits-to-branch-foo
-
-In a FILE specified via --amend, comment lines (starting with "#") are ignored.
-FILE must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1 (alone on
-a line) referring to a commit in the current project, and CODE refers to one
-or more consecutive lines of Perl code.  Pairs must be separated by one or
-more blank line.
-
-Here is sample input for use with --amend=FILE, from coreutils:
-
-3a169f4c5d9159283548178668d2fae6fced3030
-# fix typo in title:
-s/all tile types/all file types/
-
-1379ed974f1fa39b12e2ffab18b3f7a607082202
-# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself.
-# Change the author to be Paul.  Note the escaped "@":
-s,Jim .*>,Paul Eggert <eggert\@cs.ucla.edu>,
-
-EOF
-    }
-  exit $exit_code;
-}
-
-# If the string $S is a well-behaved file name, simply return it.
-# If it contains white space, quotes, etc., quote it, and return the new string.
-sub shell_quote($)
-{
-  my ($s) = @_;
-  if ($s =~ m![^\w+/.,-]!)
-    {
-      # Convert each single quote to '\''
-      $s =~ s/\'/\'\\\'\'/g;
-      # Then single quote the string.
-      $s = "'$s'";
-    }
-  return $s;
-}
-
-sub quoted_cmd(@)
-{
-  return join (' ', map {shell_quote $_} @_);
-}
-
-# Parse file F.
-# Comment lines (starting with "#") are ignored.
-# F must consist of <SHA,CODE+> pairs where SHA is a 40-byte SHA1
-# (alone on a line) referring to a commit in the current project, and
-# CODE refers to one or more consecutive lines of Perl code.
-# Pairs must be separated by one or more blank line.
-sub parse_amend_file($)
-{
-  my ($f) = @_;
-
-  open F, '<', $f
-    or die "$ME: $f: failed to open for reading: $!\n";
-
-  my $fail;
-  my $h = {};
-  my $in_code = 0;
-  my $sha;
-  while (defined (my $line = <F>))
-    {
-      $line =~ /^\#/
-        and next;
-      chomp $line;
-      $line eq ''
-        and $in_code = 0, next;
-
-      if (!$in_code)
-        {
-          $line =~ /^([0-9a-fA-F]{40})$/
-            or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"),
-              $fail = 1, next;
-          $sha = lc $1;
-          $in_code = 1;
-          exists $h->{$sha}
-            and (warn "$ME: $f:$.: duplicate SHA1\n"),
-              $fail = 1, next;
-        }
-      else
-        {
-          $h->{$sha} ||= '';
-          $h->{$sha} .= "$line\n";
-        }
-    }
-  close F;
-
-  $fail
-    and exit 1;
-
-  return $h;
-}
-
-{
-  my $since_date;
-  my $format_string = '%s%n%b%n';
-  my $amend_file;
-  my $append_dot = 0;
-  GetOptions
-    (
-     help => sub { usage 0 },
-     version => sub { print "$ME version $VERSION\n"; exit },
-     'since=s' => \$since_date,
-     'format=s' => \$format_string,
-     'amend=s' => \$amend_file,
-     'append-dot' => \$append_dot,
-    ) or usage 1;
-
-
-  defined $since_date
-    and unshift @ARGV, "--since=$since_date";
-
-  # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/)
-  # that makes a correction in the log or attribution of that commit.
-  my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {};
-
-  my @cmd = (qw (git log --log-size),
-             '--pretty=format:%H:%ct  %an  <%ae>%n%n'.$format_string, @ARGV);
-  open PIPE, '-|', @cmd
-    or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n"
-            . "(Is your Git too old?  Version 1.5.1 or later is required.)\n");
-
-  my $prev_date_line = '';
-  my @prev_coauthors = ();
-
-  while (1)
-    {
-      defined (my $in = <PIPE>)
-        or last;
-      $in =~ /^log size (\d+)$/
-        or die "$ME:$.: Invalid line (expected log size):\n$in";
-      my $log_nbytes = $1;
-
-      my $log;
-      my $n_read = read PIPE, $log, $log_nbytes;
-      $n_read == $log_nbytes
-        or die "$ME:$.: unexpected EOF\n";
-
-      # Skip log entries with the default merge commit message.
-      $log =~ /^.*\n\nMerge branch '.*\n\s*/
-        and goto SKIPCOMMIT;
-
-      # Extract leading hash.
-      my ($sha, $rest) = split ':', $log, 2;
-      defined $sha
-        or die "$ME:$.: malformed log entry\n";
-      $sha =~ /^[0-9a-fA-F]{40}$/
-        or die "$ME:$.: invalid SHA1: $sha\n";
-
-      # If this commit's log requires any transformation, do it now.
-      my $code = $amend_code->{$sha};
-      if (defined $code)
-        {
-          eval 'use Safe';
-          my $s = new Safe;
-          # Put the unpreprocessed entry into "$_".
-          $_ = $rest;
-
-          # Let $code operate on it, safely.
-          my $r = $s->reval("$code")
-            or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n";
-
-          # Note that we've used this entry.
-          delete $amend_code->{$sha};
-
-          # Update $rest upon success.
-          $rest = $_;
-        }
-
-      my @line = split "\n", $rest;
-      my $author_line = shift @line;
-      defined $author_line
-        or die "$ME:$.: unexpected EOF\n";
-      $author_line =~ /^(\d+)  (.*>)$/
-        or die "$ME:$.: Invalid line "
-          . "(expected date/author/email):\n$author_line\n";
-
-      my $date_line = sprintf "%s  $2\n", strftime ("%F", localtime ($1));
-
-      # Format 'Co-authored-by: A U Thor <email at example.com>' lines in
-      # standard multi-author ChangeLog format.
-      my @coauthors = grep /^Co-authored-by:.*$/, @line;
-      for (@coauthors)
-        {
-          s/^Co-authored-by:\s*/\t    /;
-          s/\s*</  </;
-
-          /<.*?@.*\..*>/
-            or warn "$ME: warning: missing email address for "
-              . substr ($_, 5) . "\n";
-        }
-
-      # If this header would be the same as the previous date/name/email/
-      # coauthors header, then arrange not to print it.
-      if ($date_line ne $prev_date_line or "@coauthors" ne "@prev_coauthors")
-        {
-          $prev_date_line eq ''
-            or print "\n";
-          print $date_line;
-          @coauthors
-            and print join ("\n", @coauthors), "\n";
-        }
-      $prev_date_line = $date_line;
-      @prev_coauthors = @coauthors;
-
-      # Omit "Co-authored-by..." and "Signed-off-by..." lines.
-      @line = grep !/^Signed-off-by: .*>$/, @line;
-      @line = grep !/^Co-authored-by: /, @line;
-
-      # Remove leading and trailing blank lines.
-      if (@line)
-        {
-          while ($line[0] =~ /^\s*$/) { shift @line; }
-          while ($line[$#line] =~ /^\s*$/) { pop @line; }
-        }
-
-      # If there were any lines
-      if (@line == 0)
-        {
-          warn "$ME: warning: empty commit message:\n  $date_line\n";
-        }
-      else
-        {
-          if ($append_dot)
-            {
-              # If the first line of the message has enough room, then
-              if (length $line[0] < 72)
-                {
-                  # append a dot if there is no other punctuation or blank
-                  # at the end.
-                  $line[0] =~ /[[:punct:]\s]$/
-                    or $line[0] .= '.';
-                }
-            }
-
-          # Prefix each non-empty line with a TAB.
-          @line = map { length $_ ? "\t$_" : '' } @line;
-
-          print "\n", join ("\n", @line), "\n";
-        }
-
-    SKIPCOMMIT:
-      defined ($in = <PIPE>)
-        or last;
-      $in ne "\n"
-        and die "$ME:$.: unexpected line:\n$in";
-    }
-
-  close PIPE
-    or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n";
-  # FIXME-someday: include $PROCESS_STATUS in the diagnostic
-
-  # Complain about any unused entry in the --amend=F specified file.
-  my $fail = 0;
-  foreach my $sha (keys %$amend_code)
-    {
-      warn "$ME:$amend_file: unused entry: $sha\n";
-      $fail = 1;
-    }
-
-  exit $fail;
-}
-
-# Local Variables:
-# mode: perl
-# indent-tabs-mode: nil
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "my $VERSION = '"
-# time-stamp-format: "%:y-%02m-%02d %02H:%02M"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "'; # UTC"
-# End:

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                 |   11 +-
 README                      |    9 +-
 configure.ac                |    3 +-
 jnlib/argparse.c            |  122 ++++++++--------
 scripts/gitlog-to-changelog |  351 -------------------------------------------
 tools/watchgnupg.c          |   42 +++---
 6 files changed, 95 insertions(+), 443 deletions(-)
 delete mode 100755 scripts/gitlog-to-changelog


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list