Remove plugin license check
This removes the license check introduce with commit 90b16b4092. After discussion and criticism received on the mailing list I now think this license requirement is too permissive on one hand about GPL compatibility and on the other it can be a significant inconvenience for users who do not wish to distribute the modified work, and so in its current form the change did not advance the project's goals or GPL compliance.
This commit is contained in:
parent
c001d55cc4
commit
869728143d
@ -9,7 +9,7 @@ Plugins have three distinct binary types:
|
||||
* wiretap: These plugins can implement various extensions to libwiretap
|
||||
* epan: These plugins implement extensions to libwireshark
|
||||
|
||||
Whithin each type we can differentiate by the features and APIs used. There
|
||||
Within each type we can differentiate by the features and APIs used. There
|
||||
are the following functional types:
|
||||
|
||||
* codec: is its own class of functionality, described above
|
||||
@ -178,7 +178,6 @@ You must include the plugin API header:
|
||||
First declare a struct with the plugin metadata fields:
|
||||
|
||||
static struct ws_module module = {
|
||||
.license = WS_PLUGIN_IS_GPLv2_OR_LATER,
|
||||
.flags = WS_PLUGIN_DESC_DISSECTOR,
|
||||
.version = "X.Y.Z",
|
||||
.spdx_id = "GPL-2.0-or-later",
|
||||
@ -187,23 +186,19 @@ static struct ws_module module = {
|
||||
.register_cb = &plugin_register,
|
||||
};
|
||||
|
||||
You must declare if the plugin license is GPLv2 or later, or compatible
|
||||
with the GPLv2. Only GPLv2 compatible plugins can be used with Wireshark.
|
||||
See [gpl-compat] for details on GPL license compatibility.
|
||||
|
||||
Flags currently is only used to categorize a plugin according to its
|
||||
The flags field is currently only used to categorize a plugin according to its
|
||||
functionality, for display purposes. A plugin can implement more than one
|
||||
functionality type within each binary type, although this is rare in practice.
|
||||
|
||||
Version is a string and conventionally uses the format major.minor.micro,
|
||||
althout this isn't enforced.
|
||||
although this isn't enforced.
|
||||
|
||||
spdx_is is the SPDX license ID.
|
||||
The spdx_id field is the SPDX license ID for your plugin.
|
||||
|
||||
Home URL should be a string where users can obtain the source for the plugin
|
||||
and more detailed information about the plugin.
|
||||
Home URL should be a string where users can obtain the source code
|
||||
and other detailed information about the plugin.
|
||||
|
||||
The blurb is a short description of that the plugin does.
|
||||
The blurb is a short description of what the plugin does.
|
||||
|
||||
The plugin registration callback implementation is specific for each plugin
|
||||
type (see the various plugins bundled with Wireshark for examples).
|
||||
@ -225,8 +220,6 @@ macro (but they all have the same arguments). The macro takes a pointer to
|
||||
the struct ws_module as the first argument. The second argument is
|
||||
currently unused and should be zero.
|
||||
|
||||
[gpl-compat]https://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean
|
||||
|
||||
6 How to plugin related interface options
|
||||
|
||||
To demonstrate the functionality of the plugin interface options, a
|
||||
|
@ -52,7 +52,6 @@ plugin_register(void)
|
||||
}
|
||||
|
||||
static struct ws_module module = {
|
||||
.license = WS_PLUGIN_IS_GPLv2_OR_LATER,
|
||||
.flags = WS_PLUGIN_DESC_DISSECTOR,
|
||||
.version = VERSION,
|
||||
.spdx_id = "GPL-2.0-or-later",
|
||||
|
@ -349,7 +349,6 @@ plugin_register(void)
|
||||
}
|
||||
|
||||
static struct ws_module module = {
|
||||
.license = WS_PLUGIN_IS_GPLv2_OR_LATER,
|
||||
.flags = WS_PLUGIN_DESC_DFILTER,
|
||||
.version = PLUGIN_VERSION,
|
||||
.spdx_id = WS_PLUGIN_SPDX_GPLv2,
|
||||
|
@ -193,7 +193,6 @@ PLUGIN_REGISTER = {
|
||||
|
||||
reg_code += """
|
||||
static struct ws_module module = {
|
||||
.license = WS_PLUGIN_IS_GPLv2_OR_LATER,
|
||||
.flags = %s,
|
||||
.version = PLUGIN_VERSION,
|
||||
.spdx_id = WS_PLUGIN_SPDX_GPLv2,
|
||||
|
@ -110,8 +110,7 @@ compare_plugins(gconstpointer a, gconstpointer b)
|
||||
|
||||
static bool
|
||||
pass_plugin_compatibility(const char *name, plugin_type_e type,
|
||||
int abi_version,
|
||||
struct ws_module *module)
|
||||
int abi_version)
|
||||
{
|
||||
if (abi_version != plugins_abi_version(type)) {
|
||||
report_failure("The plugin '%s' has incompatible ABI, have version %d, expected %d",
|
||||
@ -119,13 +118,6 @@ pass_plugin_compatibility(const char *name, plugin_type_e type,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (module->license != WS_PLUGIN_IS_GPLv2_OR_LATER &&
|
||||
module->license != WS_PLUGIN_IS_GPLv2_COMPATIBLE) {
|
||||
report_failure("The plugin '%s' is not GPLv2 compatible (invalid license 0x%x, with SPDX ID \"%s\")",
|
||||
name, module->license, module->spdx_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -210,7 +202,7 @@ DIAG_ON_PEDANTIC
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!pass_plugin_compatibility(name, type, abi_version, module)) {
|
||||
if (!pass_plugin_compatibility(name, type, abi_version)) {
|
||||
g_module_close(handle);
|
||||
g_free(plugin_file);
|
||||
continue;
|
||||
|
@ -23,16 +23,6 @@ typedef enum {
|
||||
WS_PLUGIN_CODEC
|
||||
} plugin_type_e;
|
||||
|
||||
typedef enum {
|
||||
/* Plug-in license is GPLv2-or-later */
|
||||
WS_PLUGIN_IS_GPLv2_OR_LATER = 0x2222, /* Ok */
|
||||
/* Plug-in license is compatible with the GPL version 2, according to the FSF. */
|
||||
/* https://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean */
|
||||
WS_PLUGIN_IS_GPLv2_COMPATIBLE = 0x2002, /* Ok */
|
||||
/* Plug-in license is none of the above */
|
||||
WS_PLUGIN_IS_GPLv2_INCOMPATIBLE = 0, /* Not allowed, will refuse to load.*/
|
||||
} plugin_license_e;
|
||||
|
||||
#define WS_PLUGIN_SPDX_GPLv2 "GPL-2.0-or-later"
|
||||
#define WS_PLUGIN_GITLAB_URL "https://gitlab.com/wireshark/wireshark"
|
||||
|
||||
@ -48,7 +38,6 @@ typedef void plugins_t;
|
||||
typedef void (*module_register_func)(void);
|
||||
|
||||
struct ws_module {
|
||||
plugin_license_e license;
|
||||
uint32_t flags;
|
||||
const char *version;
|
||||
const char *spdx_id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user