[git] GPG-ERROR - branch, master, updated. libgpg-error-1.27-244-g70058cd

by Werner Koch cvs at cvs.gnupg.org
Wed Feb 21 20:56:21 CET 2018


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 "Error codes used by GnuPG et al.".

The branch, master has been updated
       via  70058cd9f944d620764e57c838209afae8a58c78 (commit)
       via  887530733d0486ab68ff351c4855f5450c2d50e6 (commit)
       via  a8cf20c47ee092da2ed6f75f104e27685764abac (commit)
       via  db7ed21adeaadac5aaa32d23e3b30aaa9e1dfa72 (commit)
      from  f9a33a7f7e44a644ff4e31f7e9f1c2c1ec1f8eee (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 70058cd9f944d620764e57c838209afae8a58c78
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Feb 21 18:23:52 2018 +0100

    build: Document how to use git send-email.
    
    * autogen.rc: Add patches_to.
    * autogen.sh: Run git config sendemail.to.
    * doc/HACKING: Describe use of git send-email.
    --
    
    Co-authored-by: Todd Zullinger
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/autogen.rc b/autogen.rc
index a11c62f..4e1918a 100644
--- a/autogen.rc
+++ b/autogen.rc
@@ -1,6 +1,7 @@
 # autogen.sh configuration for libgpg-error                   -*- sh -*-
 
 display_name="Libgpg-error"
+patches_to="gnupg-devel at gnupg.org"
 
 version_parts=2
 
diff --git a/autogen.sh b/autogen.sh
index b238550..4b511bf 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -469,6 +469,7 @@ EOF
       chmod +x  .git/hooks/commit-msg
       if [ x"${display_name}" != x ]; then
          git config format.subjectPrefix "PATCH ${display_name}"
+         git config sendemail.to "${patches_to}"
       fi
   fi
 fi
diff --git a/doc/HACKING b/doc/HACKING
index d379099..33b56d5 100644
--- a/doc/HACKING
+++ b/doc/HACKING
@@ -57,18 +57,24 @@
 
   - if you're working from the git repo, here's a suggested workflow:
 
+    - configure git send-email defaults:
+
+        git config format.subjectPrefix 'PATCH libgpg-error'
+        git config sendemail.to gnupg-devel at gnupg.org
+
+      Note that running ./autogen.sh on a fresh clone will do this for
+      you.
+
     - hack hack hack
 
     - commit your changes; group changes into easily-reviewable commit
       units, feel free to submit several patches at once
 
     - e.g. if you want to submit a single patch on top of master, do:
-      git send-email --to=gnupg-devel at gnupg.org --annotate -1
-      (please put a mention of libgpg-error into the subjects,
-      annotate lets you do that)
+      git send-email --annotate -1
 
     - e.g. if you have two commits on top of master, do:
-      git send-email --to=gnupg-devel at gnupg.org --annotate --cover-letter -2
+      git send-email --annotate --cover-letter -2
       (that prompts you for a summary mail to precede your actual
       patch mails)
 

commit 887530733d0486ab68ff351c4855f5450c2d50e6
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date:   Thu Feb 1 14:24:07 2018 +0100

    doc: clarify patch submission workflow
    
    Signed-off-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/doc/HACKING b/doc/HACKING
index e30b2f8..d379099 100644
--- a/doc/HACKING
+++ b/doc/HACKING
@@ -2,6 +2,11 @@
 #+TITLE: Various hacking notes
 #+STARTUP: showall
 
+* How to contribute
+
+  The following stuff explains some basic procedures you need to
+  follow if you want to contribute code or documentation.
+
 * No more ChangeLog files
 
   Do not modify any of the ChangeLog files in Libgpg-error.  Starting
@@ -23,3 +28,48 @@
   in a "real" ChangeLog file, but keep the maximum line length at 72
   or smaller, so that the generated ChangeLog lines, each with its
   leading TAB, will not exceed 80 columns.
+
+* Commit log keywords
+
+  - GnuPG-bug-id :: Values are comma or space delimited bug numbers
+                    from bug.gnupg.org pertaining to this commit.
+  - Debian-bug-id :: Same as above but from the Debian bug tracker.
+  - CVE-id :: CVE id number pertaining to this commit.
+  - Regression-due-to :: Commit id of the regression fixed by this commit.
+  - Fixes-commit :: Commit id this commit fixes.
+  - Reported-by :: Value is a name or mail address of a bug reporte.
+  - Suggested-by :: Value is a name or mail address of someone how
+                    suggested this change.
+  - Co-authored-by :: Name or mail address of a co-author
+  - Some-comments-by :: Name or mail address of the author of
+                        additional comments (commit log or code).
+  - Proofread-by :: Sometimes used by translation commits.
+  - Signed-off-by :: Name or mail address of the developer
+
+* Sending patches
+
+  - submitting patches, and subsequent discussions around them,
+    happens via the gnupg-devel at gnupg.org public mailing list
+
+  - send your patches to that list, preferably PGP/MIME signed. Make
+    sure to include a mention of 'libgpg-error' in the subject line,
+    the list is used for several different projects
+
+  - if you're working from the git repo, here's a suggested workflow:
+
+    - hack hack hack
+
+    - commit your changes; group changes into easily-reviewable commit
+      units, feel free to submit several patches at once
+
+    - e.g. if you want to submit a single patch on top of master, do:
+      git send-email --to=gnupg-devel at gnupg.org --annotate -1
+      (please put a mention of libgpg-error into the subjects,
+      annotate lets you do that)
+
+    - e.g. if you have two commits on top of master, do:
+      git send-email --to=gnupg-devel at gnupg.org --annotate --cover-letter -2
+      (that prompts you for a summary mail to precede your actual
+      patch mails)
+
+    - use --dry-run to test your setup

commit a8cf20c47ee092da2ed6f75f104e27685764abac
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Feb 21 17:54:30 2018 +0100

    doc: Typo fixes.
    
    --

diff --git a/src/estream.c b/src/estream.c
index dd2b289..dcabd92 100644
--- a/src/estream.c
+++ b/src/estream.c
@@ -1641,7 +1641,7 @@ func_file_create (void **cookie, int *filedes,
  *    allowed to leave out trailing dashes.  If this keyword parameter
  *    is not given the default mode for creating files is "-rw-rw-r--"
  *    (664).  Note that the system still applies the current umask to
- *    the mode when crating a file.  Example:
+ *    the mode when creating a file.  Example:
  *
  *       "wb,mode=-rw-r--"
  *
diff --git a/src/init.c b/src/init.c
index 89475d3..7b3eda3 100644
--- a/src/init.c
+++ b/src/init.c
@@ -228,7 +228,7 @@ _gpgrt_strdup (const char *string)
 }
 
 
-/* Helper for _gpgrt_stdconcat and gpgrt_strconcat.  */
+/* Helper for _gpgrt_strconcat and gpgrt_strconcat.  */
 char *
 _gpgrt_strconcat_core (const char *s1, va_list arg_ptr)
 {

commit db7ed21adeaadac5aaa32d23e3b30aaa9e1dfa72
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Feb 21 17:53:36 2018 +0100

    build: let autogen.sh set a git PATCH prefix
    
    --
    
    Also commit the missing commit-msg hook.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/autogen.rc b/autogen.rc
index b128361..a11c62f 100644
--- a/autogen.rc
+++ b/autogen.rc
@@ -1,5 +1,7 @@
 # autogen.sh configuration for libgpg-error                   -*- sh -*-
 
+display_name="Libgpg-error"
+
 version_parts=2
 
 case "$myhost:$myhostsub" in
diff --git a/autogen.sh b/autogen.sh
index e5ba5bf..b238550 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
 #! /bin/sh
 # autogen.sh
-# Copyright (C) 2003, 2014, 2017 g10 Code GmbH
+# Copyright (C) 2003, 2014, 2017, 2018 g10 Code GmbH
 #
 # This file is free software; as a special exception the author gives
 # unlimited permission to copy and/or distribute it, with or without
@@ -15,7 +15,7 @@
 # configure it for the respective package.  It is maintained as part of
 # GnuPG and source copied by other packages.
 #
-# Version: 2017-01-17
+# Version: 2018-02-21
 
 configure_ac="configure.ac"
 
@@ -467,6 +467,9 @@ EOF
 EOF
       $CP build-aux/git-hooks/commit-msg .git/hooks/commit-msg
       chmod +x  .git/hooks/commit-msg
+      if [ x"${display_name}" != x ]; then
+         git config format.subjectPrefix "PATCH ${display_name}"
+      fi
   fi
 fi
 
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg
new file mode 100755
index 0000000..3ca918b
--- /dev/null
+++ b/build-aux/git-hooks/commit-msg
@@ -0,0 +1,133 @@
+eval '(exit $?0)' && eval 'exec perl -w "$0" ${1+"$@"}'
+  & eval 'exec perl -w "$0" $argv:q'
+    if 0;
+
+# An hook script to check the commit log message.
+# Called by "git commit" with one argument, the name of the file
+# that has the commit message.  The hook should exit with non-zero
+# status after issuing an appropriate message if it wants to stop the
+# commit.  The hook is allowed to edit the commit message file.
+#
+# To enable this hook, copy it to "~/.git/hooks/commit-msg".
+#
+# This script is based on the one from GNU coreutils.
+
+use strict;
+use warnings;
+(my $ME = $0) =~ s|.*/||;
+
+my $editor = $ENV{EDITOR} || 'vi';
+$ENV{PATH} = '/bin:/usr/bin';
+
+# Rewrite the $LOG_FILE (old contents in @$LINE_REF) with an additional
+# commented diagnostic "# $ERR" line at the top.
+sub rewrite($$$)
+{
+  my ($log_file, $err, $line_ref) = @_;
+  local *LOG;
+  open LOG, '>', $log_file
+    or die "$ME: $log_file: failed to open for writing: $!";
+  print LOG "# $err";
+  print LOG @$line_ref;
+  close LOG
+    or die "$ME: $log_file: failed to rewrite: $!\n";
+}
+
+sub re_edit($)
+{
+  my ($log_file) = @_;
+
+  warn "Interrupt (Ctrl-C) to abort...\n";
+
+  system 'sh', '-c', "$editor $log_file";
+  ($? & 127) || ($? >> 8)
+    and die "$ME: $log_file: the editor ($editor) failed, aborting\n";
+}
+
+# Given a $LOG_FILE name and a \@LINE buffer,
+# read the contents of the file into the buffer and analyze it.
+# If the log message passes muster, return the empty string.
+# If not, return a diagnostic.
+sub check_msg($$)
+{
+  my ($log_file, $line_ref) = @_;
+
+  local *LOG;
+  open LOG, '<', $log_file
+    or return "failed to open for reading: $!";
+  @$line_ref = <LOG>;
+  close LOG;
+
+  my @line = @$line_ref;
+  chomp @line;
+
+  # Don't filter out blank or comment lines; git does that already,
+  # and if we were to ignore them here, it could lead to committing
+  # with lines that start with "#" in the log.
+
+  # Filter out leading blank and comment lines.
+  # while (@line && $line[0] =~ /^(?:#.*|[ \t]*)$/) { shift @line; }
+
+  # Filter out blank and comment lines at EOF.
+  # while (@line && $line[$#line] =~ /^(?:#.*|[ \t]*)$/) { pop @line; }
+
+  @line == 0
+    and return 'no log message';
+
+  # The first line should not be too short
+  8 < length $line[0] || return 'summary line too short';
+
+  # The first line should not start with an asterisk or a hash sign.
+  # An asterisk might indicate that a change entry was started right
+  # at the first line.
+  $line[0] =~ /^[*#]/ && return "summary line starts with an * or #";
+
+  # Second line should be blank or not present.
+  2 <= @line && length $line[1]
+    and return 'second line must be empty';
+
+  # See git-commit(1), this is the --cleanup=scissors option. Everything
+  # after and including this line gets ignored.
+  my $marker = '# ------------------------ >8 ------------------------';
+
+  # Limit line length to allow for the ChangeLog's leading TAB.
+  foreach my $line (@line)
+    {
+      72 < length $line && $line =~ /^[^#]/
+        and return 'line longer than 72 characters';
+
+      last if $line eq $marker;
+    }
+
+  return '';
+}
+
+{
+  @ARGV == 1
+    or die;
+
+  my $log_file = $ARGV[0];
+
+  while (1)
+    {
+      my @line;
+      my $err = check_msg $log_file, \@line;
+      $err eq ''
+        and last;
+      $err = "$ME: $err\n";
+      warn $err;
+      exit 1;
+
+      # Insert the diagnostic as a comment on the first line of $log_file.
+      #rewrite $log_file, $err, \@line;
+      #re_edit $log_file;
+      #
+      ## Stop if our parent is killed.
+      #getppid() == 1
+      #  and last;
+    }
+}
+
+# Local Variables:
+# mode: perl
+# End:

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

Summary of changes:
 autogen.rc                     |   3 +
 autogen.sh                     |   8 ++-
 build-aux/git-hooks/commit-msg | 133 +++++++++++++++++++++++++++++++++++++++++
 doc/HACKING                    |  56 +++++++++++++++++
 src/estream.c                  |   2 +-
 src/init.c                     |   2 +-
 6 files changed, 200 insertions(+), 4 deletions(-)
 create mode 100755 build-aux/git-hooks/commit-msg


hooks/post-receive
-- 
Error codes used by GnuPG et al.
http://git.gnupg.org




More information about the Gnupg-commits mailing list