[git] gnupg-doc - branch, master, updated. a6c75a5026f29ae7908ea22a812b12169862c4af

by Werner Koch cvs at cvs.gnupg.org
Wed Nov 6 13:15:55 CET 2013


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 GnuPG website and other docs".

The branch, master has been updated
       via  a6c75a5026f29ae7908ea22a812b12169862c4af (commit)
      from  9fbaec2f4feb3ff746c7f9b981f0bab7a8048506 (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 a6c75a5026f29ae7908ea22a812b12169862c4af
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Nov 6 13:14:23 2013 +0100

    Finish migration to the the gnupg-doc repository.
    
    The website branch of the gnupg repository has been moved to its own
    repository so that it will be easier to maintain.  This repository
    shall also be used to track other documentation pertaining to GnuPG.

diff --git a/README b/README
index 48213aa..2dcc906 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for the website branch.                           -*- org -*-
+README for the gnupg-doc repository                         -*- org -*-
 
 This is a separated branch for the gnupg.org website.
 
@@ -8,15 +8,17 @@ HTML files.
 
 ** Directory structure
 
-   - web/ :: Source files for the web.  This also include imagages
-             etc.
+   - web/      :: Source files for the web.  This also include images
+                  etc.
    - web/share :: Logos, CSS, macros and elisp for building.
-   - tools/ :: Tools used to build the web site.
-   - stage/ :: staging directory for the site.
+   - misc      :: Otehr websites etc.
+   - build-aux :: Build helpe rscripts
+   - tools/    :: Tools used to build the web site.
+   - stage/    :: staging directory for the site.
 
 ** Aliases
 
-www.gnupg.org uses boa to serve the pages, here are the aliases we
+www.gnupg.org uses Boa to serve the pages, here are the aliases we
 use:
 
 #+BEGIN_EXAMPLE
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..8c8de99
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Run this to generate all the initial makefiles, etc.
+#
+# Copyright (C) 2003 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
+# modifications, as long as this notice is preserved.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+#
+# Check the git setup.
+#
+if [ -d .git ]; then
+  if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
+    cat <<EOF >&2
+*** Activating trailing whitespace git pre-commit hook. ***
+    For more information see this thread:
+      http://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084html
+    To deactivate this pre-commit hook again move .git/hooks/pre-commit
+    and .git/hooks/pre-commit.sample out of the way.
+EOF
+      cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit
+      chmod +x  .git/hooks/pre-commit
+  fi
+  if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then
+    cat <<EOF >&2
+*** Activating commit log message check hook. ***
+EOF
+      cp -av build-aux/git-hooks/commit-msg .git/hooks/commit-msg
+      chmod +x  .git/hooks/commit-msg
+  fi
+fi
diff --git a/build-aux/git-hooks/commit-msg b/build-aux/git-hooks/commit-msg
new file mode 100755
index 0000000..5a697c7
--- /dev/null
+++ b/build-aux/git-hooks/commit-msg
@@ -0,0 +1,127 @@
+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';
+
+  # 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';
+    }
+
+  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:
diff --git a/web/share/setup.inc b/web/share/setup.inc
index ab4fb72..19e3b79 100644
--- a/web/share/setup.inc
+++ b/web/share/setup.inc
@@ -3,4 +3,4 @@
 # Include the version macros.
 # FIXME: Figure out a way to use SETUPFILE based on the directory of
 #        the currently SETUPFILE loaded file.
-#+SETUPFILE: "/home/wk/s/gnupg-web/web/swdb.mac"
+#+SETUPFILE: "/home/wk/s/gnupg-doc/web/swdb.mac"

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

Summary of changes:
 README                         |   14 +++--
 autogen.sh                     |   36 ++++++++++++
 build-aux/git-hooks/commit-msg |  127 ++++++++++++++++++++++++++++++++++++++++
 web/share/setup.inc            |    2 +-
 4 files changed, 172 insertions(+), 7 deletions(-)
 create mode 100755 autogen.sh
 create mode 100755 build-aux/git-hooks/commit-msg


hooks/post-receive
-- 
The GnuPG website and other docs
http://git.gnupg.org




More information about the Gnupg-commits mailing list