[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about automatic generation of GPLv3 COPYING file
From: |
Ralf Wildenhues |
Subject: |
Re: Question about automatic generation of GPLv3 COPYING file |
Date: |
Sat, 22 Nov 2008 11:57:12 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
<http://lists.gnu.org/archive/html/bug-automake/2008-09/msg00007.html>
Hello, and apologies for the long delay.
I am installing this patch to the git master and branch-1-10 version of
Automake. It adds an unconditional note to the output of
automake --add-missing
that GPLv3 is being installed, and recommends the user to put the file
in VCS. All of this happens only if the package uses 'gnu' strictness.
You can avoid it by setting 'foreign' strictness. You can further avoid
the note by simply having a COPYING file. This is not a warning and not
an error (not even with -Werr), since the action not erroneous: the
action is well-documented in the Automake manual, and use of the GPLv3
COPYING file is the normal (and recommended) thing to do for packages
that desire 'gnu' strictness. Packages that do not desire this can set
a different strictness in the input files or keep a COPYING file around.
I considered letting automake ask the user for feedback. This however
is not appropriate IMVHO: automake is often used non-interactively.
We would be breaking many currently working setups.
For more information, please see the relevant sections in the manual.
<http://www.gnu.org/software/automake/manual/html_node/Strictness.html>
<http://www.gnu.org/software/automake/manual/html_node/Gnits.html>
<http://www.gnu.org/software/automake/manual/html_node/Options.html>
<http://www.gnu.org/software/automake/manual/html_node/Invoking-Automake.html>
Please note that the patch amends the sections 'Gnits' and 'Invoking
Automake' to be clearer about this issue.
I intend to do a point release 1.10.2 with this change very soon,
hopefully this weekend.
I've added Brian to THANKS.
Cheers,
Ralf
When installing COPYING, recommend adding the file to VCS.
* automake.in (require_file_internal): If installing `COPYING',
mention that we install the GPLv3 file and recommend adding the
file to version control.
* doc/automake.texi (Invoking Automake): Point to `Gnits' node
for `--add-missing'.
(Gnits): Clarify semantics: that for strictness gnu or higher,
INSTALL is installed, and that COPYING is installed as GPLv3
if no COPYING file exists.
* tests/license2.test: New test.
* tests/Makefile.am: Update.
* NEWS, THANKS: Update.
Report by Brian Cameron.
Signed-off-by: Ralf Wildenhues <address@hidden>
diff --git a/NEWS b/NEWS
index f258983..9da3a93 100644
--- a/NEWS
+++ b/NEWS
@@ -60,8 +60,9 @@ New in 1.10a:
- Automake is licensed under GPLv3+. `automake --add-missing' will
by default install the GPLv3 file as COPYING if it is missing.
- Note that Automake will never overwrite an existing COPYING file,
- even when the `--force-missing' option is used.
+ It will also warn that the license file should be added to source
+ control. Note that Automake will never overwrite an existing COPYING
+ file, even when the `--force-missing' option is used.
- The manual is now distributed under the terms of the GNU FDL 1.3.
diff --git a/automake.in b/automake.in
index cdb7dd5..691bad3 100755
--- a/automake.in
+++ b/automake.in
@@ -7591,6 +7591,7 @@ sub require_file_internal ($$$@)
}
my $trailer = '';
+ my $trailer2 = '';
my $suppress = 0;
# Only install missing files according to our desired
@@ -7606,6 +7607,17 @@ sub require_file_internal ($$$@)
# can, copy if we must. Note: delete the file
# first, in case it is a dangling symlink.
$message = "installing `$fullfile'";
+
+ # The license file should not be volatile.
+ if ($file eq "COPYING")
+ {
+ $message .= " using GNU General Public License v3
file";
+ $trailer2 = "\n Consider adding the COPYING file"
+ . " to the version control system"
+ . "\n for your code, to avoid questions"
+ . " about which license your project uses.";
+ }
+
# Windows Perl will hang if we try to delete a
# file that doesn't exist.
unlink ($fullfile) if -f $fullfile;
@@ -7658,7 +7670,7 @@ sub require_file_internal ($$$@)
next
if !$suppress && rule $file;
- msg ($suppress ? 'note' : 'error', $where, "$message$trailer");
+ msg ($suppress ? 'note' : 'error', $where,
"$message$trailer$trailer2");
}
}
}
diff --git a/doc/automake.texi b/doc/automake.texi
index a164d03..af1e930 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -2439,6 +2439,9 @@ Therefore, @code{AC_CONFIG_AUX_DIR}'s setting affects
whether a
file is considered missing, and where the missing file is added
(@pxref{Optional}).
+In some strictness modes, additional files are installed, see @ref{Gnits}
+for more information.
+
@item address@hidden
@opindex --libdir
Look for Automake data files in directory @var{dir} instead of in the
@@ -9359,6 +9362,14 @@ The files @file{INSTALL}, @file{NEWS}, @file{README},
@file{AUTHORS},
and @file{ChangeLog}, plus one of @file{COPYING.LIB}, @file{COPYING.LESSER}
or @file{COPYING}, are required at the topmost directory of the package.
+If the @option{--add-missing} option is given, @command{automake} will
+add a generic version of the @file{INSTALL} file as well as the
address@hidden file containing the text of the current version of the
+GNU General Public License existing at the time of this Automake release
+(version 3 as this is written,
@uref{http://www.gnu.org/@/copyleft/@/gpl.html}).
+However, an existing @file{COPYING} file will never be overwritten by
address@hidden
+
@item
The options @option{no-installman} and @option{no-installinfo} are
prohibited.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5237e61..43f3b8d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -375,6 +375,7 @@ libtool9.test \
libtoo10.test \
libtoo11.test \
license.test \
+license2.test \
link_c_cxx.test \
link_dist.test \
link_f90_only.test \
diff --git a/tests/license2.test b/tests/license2.test
new file mode 100755
index 0000000..f16ed00
--- /dev/null
+++ b/tests/license2.test
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2008 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, 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/>.
+
+# Check that installing `COPYING' outputs a warning.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = gnu
+END
+
+: >AUTHORS
+: >NEWS
+: >README
+: >ChangeLog
+: >INSTALL
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'COPYING' stderr
+
+AUTOMAKE_run 0 --add-missing
+grep 'COPYING' stderr
+grep 'GNU General Public License' stderr
+grep 'Consider adding.*version control' stderr
+test -f COPYING
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: Question about automatic generation of GPLv3 COPYING file,
Ralf Wildenhues <=