bug-gnulib
[Top][All Lists]
Advanced

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

version-etc vs. GPLv3


From: Eric Blake
Subject: version-etc vs. GPLv3
Date: Mon, 09 Jul 2007 21:46:08 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070604 Thunderbird/2.0.0.4 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have two ideas of how to improve version-etc to work with either GPL
version, and want some feedback before I start spending time on the wrong
implementation.  Both ideas have what I perceive as a benefit that
programs using the version-etc module will automatically report GPLv3+
instead of GPLv2+ without change, while programs desiring to remain GPLv2+
can do so with a small change.

Idea 1: Add something like the following to version-etc.h:
enum vers_license {VERS_GPL2, VERS_GPL2_PLUS, VERS_GPL3, VERS_GPL3_PLUS};
typedef enum vers_license vers_license
void version_license_etc_va (FILE*, vers_license, const char
*command_name, const char *package, const char *version, va_list authors);
void version_license_etc (FILE*, vers_license, const char *, const char *,
const char *, ...);

Then make the existing version_etc_va and version_etc simply wrap
version_license_etc_va (stream, VERS_GPL3_PLUS, command_name, package,
vesion, authors).

Update the .c file to do a switch on vers_license, with a translated
string and URL for each supported license.

There are a couple of drawbacks - only a pre-compiled list of license
lines are supported, and it is not possible to mention some other
arbitrary license.  Additionally, it makes the translator deal with
strings that are not used by the program.


Idea 2: Enhance the version-etc-fsf module to also provide extern const
char version_etc_license[], with the GPLv3+ string ready to translate,
alongside its current version_etc_copyright.  Then in version_etc_va,
instead of hard-coding the license string, instead refer to the global
variable.

This has the benefit that it becomes easy to supply any non-GPLv3+
license, by using --avoid=version-etc-fsf and supplying the two globals
version_etc_license and version_etc_copyright; it also minimizes
translator effort by providing only one license string.  However, it has
the drawback that it will cause link errors for existing programs that do
not use version-etc-fsf, and takes a bit more work for a package not
willing to report GPLv3+ yet.

I'm leaning toward idea 2, but want some feedback before I submit a patch.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGkwEA84KuGfSFAYARAoS/AJ9c9a0ZFD47ta2IxvrrRN2cjVdXNgCeNnUN
Ys7HQ860KJYAbViWM0x/fDY=
=aAg8
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]