aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Makefile.am3
-rwxr-xr-xcontrib/scripts/afferify110
-rw-r--r--contrib/scripts/documentation/gnunet-doc.scm16
-rwxr-xr-xcontrib/scripts/gnunet-chk.py.in16
-rw-r--r--contrib/scripts/gnunet_janitor.py.in18
-rw-r--r--contrib/scripts/gnunet_pyexpect.py.in18
-rw-r--r--contrib/scripts/terminate.py.in18
-rw-r--r--contrib/test_gnunet_prefix.c26
-rw-r--r--contrib/timeout_watchdog.c18
-rw-r--r--contrib/timeout_watchdog_w32.c18
10 files changed, 177 insertions, 84 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 81528a90e..a3cc081b7 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -63,9 +63,8 @@ EXTRA_DIST = \
63 scripts/gnunet-chk.py.in \ 63 scripts/gnunet-chk.py.in \
64 scripts/removetrailingwhitespace.py.in \ 64 scripts/removetrailingwhitespace.py.in \
65 scripts/pydiffer.py.in \ 65 scripts/pydiffer.py.in \
66 scripts/gnunet-gns-import.sh \
67 packages/nix/default.nix \ 66 packages/nix/default.nix \
68 packages/nix/gnunet-dex.nix \ 67 packages/nix/gnunet-dev.nix \
69 3rdparty/Windows/openvpn-tap32/tapw32/tap0901.sys \ 68 3rdparty/Windows/openvpn-tap32/tapw32/tap0901.sys \
70 3rdparty/Windows/openvpn-tap32/tapw32/tap0901.cat \ 69 3rdparty/Windows/openvpn-tap32/tapw32/tap0901.cat \
71 3rdparty/Windows/openvpn-tap32/tapw32/OemWin2k.inf \ 70 3rdparty/Windows/openvpn-tap32/tapw32/OemWin2k.inf \
diff --git a/contrib/scripts/afferify b/contrib/scripts/afferify
new file mode 100755
index 000000000..2fa607e1a
--- /dev/null
+++ b/contrib/scripts/afferify
@@ -0,0 +1,110 @@
1#!/usr/bin/perl
2# Catch all in-source GPL2/3 license declarations and convert
3# them to AGPL.
4#
5# You expected this to be using diff & patch? Well, the source
6# files have all sorts of different commenting and indentation
7# styles, not speaking of typos and failed uses of search and
8# replace, that an attempt in using the patch(1) tool would fail
9# miserably. This script instead is based on my rgrep from 1998.
10# Keeping it here as it may be useful to other projects under-
11# going the same pains. It is forbidden to use this script to
12# convert AGPL code back to less strict licensing. Haha, just
13# kidding.
14#
15# -symlynX
16
17use File::Find;
18$|=1;
19# Recurse into current or given directories
20find(\&wanted, $#ARGV >= 0 ? @ARGV : '.');
21print STDERR "\n";
22exit;
23
24
25sub wanted {
26 my $name = $File::Find::name;
27 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime)
28 = lstat;
29 return $File::Find::prune = 1 if /^(CVS|\.git|\.svn)$/;
30 # Nicer if you 'make distclean' first
31 return if /\.(o|pdf)$/i;
32 return if -d _ or -l _;
33 return if /afferify/; # Don't apply this to itself ;)
34 # No.. i didn't do it.. just being careful ;) ;)
35# return unless -T _; # We don't have binaries in the repo, do we?
36
37 # We need the default variable '$_' for more important duties.
38 my $f = $_;
39
40 if (sysopen(I, $f, O_RDONLY)) {
41 $_ = &slurp(*I);
42 close I;
43 # Debugging: What's inside the file we just read?
44# print STDERR '> ', $_;
45
46if (0) {
47# This code did the initial conversion. We ifdef it out.
48
49 # Good idea to have the text start with "GNUnet" rather than "This program"
50 if ( s#GNUnet is free software; you can redistribute it and/or modify it under the#GNUnet is free software: you can redistribute it and/or modify it# ) {
51 # Whoever had the idea of reformatting the GPL license text...
52 print STDERR "\nTrying wide style on $name\t";
53
54 # Most important thing to know in order to be able
55 # to read perl code: if regexps appear without any
56 # context, it means they are applied to the default
57 # variable being '$_'.
58 return unless s#terms of the GNU General Public License as published by the Free Software#under the terms of the GNU Affero General Public License as published#;
59 return unless s#^(\W*\s+)Foundation; either version \d, or \(at your option\) any later version\.#\1by the Free Software Foundation, either version 3 of the License,\n\1or (at your option) any later version.#m;
60 return unless s#GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY#GNUnet is distributed in the hope that it will be useful, but#;
61 return unless s#WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR#WITHOUT ANY WARRANTY; without even the implied warranty of#;
62 return unless s#^(\W*\s+)A PARTICULAR PURPOSE. See the GNU General Public License for more details.#\1MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n\1Affero General Public License for more details.#m;
63 return unless s#^\W*\n\W*\s+You should have received a copy of the GNU General Public License along with\n\W*\s+GNUnet. see the file COPYING\. If not, .* see\s*\W*\s+<http://www.gnu.org/licenses/>\n##m;
64 } else {
65 # If this string is not in the file, leave it alone.
66 return unless s#GNUnet is free software; you can redistribute it and/or modify#GNUnet is free software: you can redistribute it and/or modify it#;
67 print STDERR "\nTrying regular style on $name\t";
68
69 # Patterns are designed to also match some typos and substitutions.
70 return unless s#it under the terms of the GNU General Public Lice\w+ as published#under the terms of the GNU Affero General Public License as published#;
71 return unless s#by the Free Software Foundation; either version \d, or \(at your#by the Free Software Foundation, either version 3 of the License,#;
72 return unless s#option\) any later version\.#or (at your option) any later version.#;
73 return unless s#General Public Lice\w+ for more details\.#Affero General Public License for more details.#;
74 return unless s#^\W*\n\W*\s+You should have received a copy of the GNU General Public Lice\w+\n\W*\s+along with GNUnet. see the file COPYING\. If not, write to the\n\W*\s+Free Software Foundation, Inc\., (51 Franklin Street, Fifth Floor|59 Tem ?ple Place - Suite 330),\n\W*\s+Boston, MA 0211\d-130\d, USA\.\n##m;
75 }
76 print STDERR "OK";
77
78} else {
79# This is the code in actual & current use:
80
81 return unless m#GNUnet is free software: you can redistribute it and/or modify it#;
82 print STDERR "\nTrying $name\t";
83 # There was a mistake in the replacement text!
84 return unless s#under the terms of the GNU General Public License as published#under the terms of the GNU Affero General Public License as published#;
85 # Don't apply this one twice!
86# return unless s#(\n\W*)(\s+)(Affero General Public License for more details\.)#\1\2\3\1\1\2You should have received a copy of the GNU Affero General Public License\1\2along with this program. If not, see <http://www.gnu.org/licenses/>.#;
87 print STDERR "FIXED";
88}
89
90 # We directly overwrite the original file in the
91 # assumption that we're in a healthy revertible git.
92 open(O, '>', $f) or die "Cannot overwrite $f";
93 # Imagine, I could have left out $_ here... ;)
94 print O $_;
95 close O;
96 } else {
97 die "Cannot access $name";
98 }
99}
100
101# Reads a file from a stream into a variable all at once:
102sub slurp {
103 # Perl sure gets clunky here
104 local(*IN) = @_;
105 local($save) = $/;
106 undef $/;
107 local($data) = <IN>;
108 $/ = $save;
109 return $data;
110}
diff --git a/contrib/scripts/documentation/gnunet-doc.scm b/contrib/scripts/documentation/gnunet-doc.scm
index d8c16fdb3..4ae23b298 100644
--- a/contrib/scripts/documentation/gnunet-doc.scm
+++ b/contrib/scripts/documentation/gnunet-doc.scm
@@ -1,20 +1,18 @@
1;;; This file is part of GNUnet. 1;;; This file is part of GNUnet.
2;;; Copyright (C) 2016, 2017 GNUnet e.V. 2;;; Copyright (C) 2016, 2017 GNUnet e.V.
3;;; 3;;;
4;;; GNUnet is free software; you can redistribute it and/or modify 4;;; GNUnet is free software: you can redistribute it and/or modify it
5;;; it under the terms of the GNU General Public License as published 5;;; under the terms of the GNU Affero General Public License as published
6;;; by the Free Software Foundation; either version 3, or (at your 6;;; by the Free Software Foundation, either version 3 of the License, or
7;;; option) any later version. 7;;; (at your option) any later version.
8;;; 8;;;
9;;; GNUnet is distributed in the hope that it will be useful, but 9;;; GNUnet is distributed in the hope that it will be useful, but
10;;; WITHOUT ANY WARRANTY; without even the implied warranty of 10;;; WITHOUT ANY WARRANTY; without even the implied warranty of
11;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12;;; General Public License for more details. 12;;; Affero General Public License for more details.
13;;; 13;;;
14;;; You should have received a copy of the GNU General Public License 14;;; You should have received a copy of the GNU Affero General Public License
15;;; along with GNUnet; see the file COPYING. If not, write to the 15;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
16;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17;;; Boston, MA 02110-1301, USA.
18;;; 16;;;
19 17
20(use-modules 18(use-modules
diff --git a/contrib/scripts/gnunet-chk.py.in b/contrib/scripts/gnunet-chk.py.in
index c976b2143..cabaef6c4 100755
--- a/contrib/scripts/gnunet-chk.py.in
+++ b/contrib/scripts/gnunet-chk.py.in
@@ -2,20 +2,18 @@
2# This file is part of GNUnet. 2# This file is part of GNUnet.
3# (C) 2013, 2018 Christian Grothoff (and other contributing authors) 3# (C) 2013, 2018 Christian Grothoff (and other contributing authors)
4# 4#
5# GNUnet is free software; you can redistribute it and/or modify 5# GNUnet is free software: you can redistribute it and/or modify it
6# it under the terms of the GNU General Public License as published 6# under the terms of the GNU Affero General Public License as published
7# by the Free Software Foundation; either version 3, or (at your 7# by the Free Software Foundation, either version 3 of the License, or
8# option) any later version. 8# (at your option) any later version.
9# 9#
10# GNUnet is distributed in the hope that it will be useful, but 10# GNUnet is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of 11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details. 13# Affero General Public License for more details.
14# 14#
15# You should have received a copy of the GNU General Public License 15# You should have received a copy of the GNU Affero General Public License
16# along with GNUnet; see the file COPYING. If not, write to the 16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18# Boston, MA 02110-1301, USA.
19# 17#
20# File: gnunet-chk.py 18# File: gnunet-chk.py
21# Brief: Computes GNUNET style Content Hash Key for a given file 19# Brief: Computes GNUNET style Content Hash Key for a given file
diff --git a/contrib/scripts/gnunet_janitor.py.in b/contrib/scripts/gnunet_janitor.py.in
index 91d2a4377..cbe96a8eb 100644
--- a/contrib/scripts/gnunet_janitor.py.in
+++ b/contrib/scripts/gnunet_janitor.py.in
@@ -2,20 +2,18 @@
2# This file is part of GNUnet. 2# This file is part of GNUnet.
3# (C) 2011, 2018 Christian Grothoff (and other contributing authors) 3# (C) 2011, 2018 Christian Grothoff (and other contributing authors)
4# 4#
5# GNUnet is free software; you can redistribute it and/or modify 5# GNUnet is free software: you can redistribute it and/or modify it
6# it under the terms of the GNU General Public License as published 6# under the terms of the GNU Affero General Public License as published
7# by the Free Software Foundation; either version 2, or (at your 7# by the Free Software Foundation, either version 3 of the License, or
8# option) any later version. 8# (at your option) any later version.
9# 9#
10# GNUnet is distributed in the hope that it will be useful, but 10# GNUnet is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of 11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details. 13# Affero General Public License for more details.
14# 14#
15# You should have received a copy of the GNU General Public License 15# You should have received a copy of the GNU Affero General Public License
16# along with GNUnet; see the file COPYING. If not, write to the 16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18# Boston, MA 02110-1301, USA.
19# 17#
20# Finds any gnunet processes still running in the system and kills them 18# Finds any gnunet processes still running in the system and kills them
21# 19#
diff --git a/contrib/scripts/gnunet_pyexpect.py.in b/contrib/scripts/gnunet_pyexpect.py.in
index 23f01603f..f155db5be 100644
--- a/contrib/scripts/gnunet_pyexpect.py.in
+++ b/contrib/scripts/gnunet_pyexpect.py.in
@@ -2,20 +2,18 @@
2# This file is part of GNUnet. 2# This file is part of GNUnet.
3# (C) 2010, 2018 Christian Grothoff (and other contributing authors) 3# (C) 2010, 2018 Christian Grothoff (and other contributing authors)
4# 4#
5# GNUnet is free software; you can redistribute it and/or modify 5# GNUnet is free software: you can redistribute it and/or modify it
6# it under the terms of the GNU General Public License as published 6# under the terms of the GNU Affero General Public License as published
7# by the Free Software Foundation; either version 2, or (at your 7# by the Free Software Foundation, either version 3 of the License, or
8# option) any later version. 8# (at your option) any later version.
9# 9#
10# GNUnet is distributed in the hope that it will be useful, but 10# GNUnet is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of 11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details. 13# Affero General Public License for more details.
14# 14#
15# You should have received a copy of the GNU General Public License 15# You should have received a copy of the GNU Affero General Public License
16# along with GNUnet; see the file COPYING. If not, write to the 16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18# Boston, MA 02110-1301, USA.
19# 17#
20# Testcase for gnunet-peerinfo 18# Testcase for gnunet-peerinfo
21from __future__ import print_function 19from __future__ import print_function
diff --git a/contrib/scripts/terminate.py.in b/contrib/scripts/terminate.py.in
index c6acfdba8..30f5dc97f 100644
--- a/contrib/scripts/terminate.py.in
+++ b/contrib/scripts/terminate.py.in
@@ -2,20 +2,18 @@
2# This file is part of GNUnet. 2# This file is part of GNUnet.
3# (C) 2011, 2018 Christian Grothoff (and other contributing authors) 3# (C) 2011, 2018 Christian Grothoff (and other contributing authors)
4# 4#
5# GNUnet is free software; you can redistribute it and/or modify 5# GNUnet is free software: you can redistribute it and/or modify it
6# it under the terms of the GNU General Public License as published 6# under the terms of the GNU Affero General Public License as published
7# by the Free Software Foundation; either version 2, or (at your 7# by the Free Software Foundation, either version 3 of the License, or
8# option) any later version. 8# (at your option) any later version.
9# 9#
10# GNUnet is distributed in the hope that it will be useful, but 10# GNUnet is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of 11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13# General Public License for more details. 13# Affero General Public License for more details.
14# 14#
15# You should have received a copy of the GNU General Public License 15# You should have received a copy of the GNU Affero General Public License
16# along with GNUnet; see the file COPYING. If not, write to the 16# along with this program. If not, see <http://www.gnu.org/licenses/>.
17# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18# Boston, MA 02110-1301, USA.
19# 17#
20# Utility module that implements safe process termination for W32. 18# Utility module that implements safe process termination for W32.
21# For other platforms it's equivalent to Popen.kill () 19# For other platforms it's equivalent to Popen.kill ()
diff --git a/contrib/test_gnunet_prefix.c b/contrib/test_gnunet_prefix.c
index 0e5325d5f..4614ee9e2 100644
--- a/contrib/test_gnunet_prefix.c
+++ b/contrib/test_gnunet_prefix.c
@@ -1,21 +1,19 @@
1/* 1/*
2 This file is part of GNUnet 2 This file is part of GNUnet
3 Copyright (C) 2011, 2014 GNUnet e.V. 3 Copyright (C) 2011, 2014 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License, or
8 option) any later version. 8 (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19 */ 17 */
20 18
21/** 19/**
diff --git a/contrib/timeout_watchdog.c b/contrib/timeout_watchdog.c
index fc61a7cc7..70e840d55 100644
--- a/contrib/timeout_watchdog.c
+++ b/contrib/timeout_watchdog.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet 2 This file is part of GNUnet
3 Copyright (C) 2010 GNUnet e.V. 3 Copyright (C) 2010 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License, or
8 option) any later version. 8 (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/contrib/timeout_watchdog_w32.c b/contrib/timeout_watchdog_w32.c
index fa7cd81fd..901eb6207 100644
--- a/contrib/timeout_watchdog_w32.c
+++ b/contrib/timeout_watchdog_w32.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet 2 This file is part of GNUnet
3 Copyright (C) 2010 GNUnet e.V. 3 Copyright (C) 2010 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License, or
8 option) any later version. 8 (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**