diff options
author | Nils Gillmann <ng0@n0.is> | 2018-06-13 08:05:15 +0000 |
---|---|---|
committer | Nils Gillmann <ng0@n0.is> | 2018-06-13 08:05:15 +0000 |
commit | 5c7f4f919d2569f49e4223d77000452dd2ec4e97 (patch) | |
tree | 8cec76a5dda6b034d1e5b85eee76a43fafd8a4a5 /contrib | |
parent | 1f7a2dd68d1e6260fad4af042878c0a07d39bc12 (diff) | |
parent | 8503c6fa26449228fa691c1dedfe3ca1a8d0b9ba (diff) |
Merge branch 'master' of gnunet.org:gnunet
Signed-off-by: Nils Gillmann <ng0@n0.is>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/Makefile.am | 3 | ||||
-rwxr-xr-x | contrib/scripts/afferify | 110 | ||||
-rw-r--r-- | contrib/scripts/documentation/gnunet-doc.scm | 16 | ||||
-rwxr-xr-x | contrib/scripts/gnunet-chk.py.in | 16 | ||||
-rw-r--r-- | contrib/scripts/gnunet_janitor.py.in | 18 | ||||
-rw-r--r-- | contrib/scripts/gnunet_pyexpect.py.in | 18 | ||||
-rw-r--r-- | contrib/scripts/terminate.py.in | 18 | ||||
-rw-r--r-- | contrib/test_gnunet_prefix.c | 26 | ||||
-rw-r--r-- | contrib/timeout_watchdog.c | 18 | ||||
-rw-r--r-- | contrib/timeout_watchdog_w32.c | 18 |
10 files changed, 177 insertions, 84 deletions
diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 81528a90e7..a3cc081b72 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -63,9 +63,8 @@ EXTRA_DIST = \ scripts/gnunet-chk.py.in \ scripts/removetrailingwhitespace.py.in \ scripts/pydiffer.py.in \ - scripts/gnunet-gns-import.sh \ packages/nix/default.nix \ - packages/nix/gnunet-dex.nix \ + packages/nix/gnunet-dev.nix \ 3rdparty/Windows/openvpn-tap32/tapw32/tap0901.sys \ 3rdparty/Windows/openvpn-tap32/tapw32/tap0901.cat \ 3rdparty/Windows/openvpn-tap32/tapw32/OemWin2k.inf \ diff --git a/contrib/scripts/afferify b/contrib/scripts/afferify new file mode 100755 index 0000000000..2fa607e1a6 --- /dev/null +++ b/contrib/scripts/afferify @@ -0,0 +1,110 @@ +#!/usr/bin/perl +# Catch all in-source GPL2/3 license declarations and convert +# them to AGPL. +# +# You expected this to be using diff & patch? Well, the source +# files have all sorts of different commenting and indentation +# styles, not speaking of typos and failed uses of search and +# replace, that an attempt in using the patch(1) tool would fail +# miserably. This script instead is based on my rgrep from 1998. +# Keeping it here as it may be useful to other projects under- +# going the same pains. It is forbidden to use this script to +# convert AGPL code back to less strict licensing. Haha, just +# kidding. +# +# -symlynX + +use File::Find; +$|=1; +# Recurse into current or given directories +find(\&wanted, $#ARGV >= 0 ? @ARGV : '.'); +print STDERR "\n"; +exit; + + +sub wanted { + my $name = $File::Find::name; + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime) + = lstat; + return $File::Find::prune = 1 if /^(CVS|\.git|\.svn)$/; + # Nicer if you 'make distclean' first + return if /\.(o|pdf)$/i; + return if -d _ or -l _; + return if /afferify/; # Don't apply this to itself ;) + # No.. i didn't do it.. just being careful ;) ;) +# return unless -T _; # We don't have binaries in the repo, do we? + + # We need the default variable '$_' for more important duties. + my $f = $_; + + if (sysopen(I, $f, O_RDONLY)) { + $_ = &slurp(*I); + close I; + # Debugging: What's inside the file we just read? +# print STDERR '> ', $_; + +if (0) { +# This code did the initial conversion. We ifdef it out. + + # Good idea to have the text start with "GNUnet" rather than "This program" + 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# ) { + # Whoever had the idea of reformatting the GPL license text... + print STDERR "\nTrying wide style on $name\t"; + + # Most important thing to know in order to be able + # to read perl code: if regexps appear without any + # context, it means they are applied to the default + # variable being '$_'. + 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#; + 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; + 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#; + return unless s#WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR#WITHOUT ANY WARRANTY; without even the implied warranty of#; + 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; + 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; + } else { + # If this string is not in the file, leave it alone. + 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#; + print STDERR "\nTrying regular style on $name\t"; + + # Patterns are designed to also match some typos and substitutions. + 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#; + 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,#; + return unless s#option\) any later version\.#or (at your option) any later version.#; + return unless s#General Public Lice\w+ for more details\.#Affero General Public License for more details.#; + 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; + } + print STDERR "OK"; + +} else { +# This is the code in actual & current use: + + return unless m#GNUnet is free software: you can redistribute it and/or modify it#; + print STDERR "\nTrying $name\t"; + # There was a mistake in the replacement text! + 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#; + # Don't apply this one twice! +# 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/>.#; + print STDERR "FIXED"; +} + + # We directly overwrite the original file in the + # assumption that we're in a healthy revertible git. + open(O, '>', $f) or die "Cannot overwrite $f"; + # Imagine, I could have left out $_ here... ;) + print O $_; + close O; + } else { + die "Cannot access $name"; + } +} + +# Reads a file from a stream into a variable all at once: +sub slurp { + # Perl sure gets clunky here + local(*IN) = @_; + local($save) = $/; + undef $/; + local($data) = <IN>; + $/ = $save; + return $data; +} diff --git a/contrib/scripts/documentation/gnunet-doc.scm b/contrib/scripts/documentation/gnunet-doc.scm index d8c16fdb35..4ae23b298d 100644 --- a/contrib/scripts/documentation/gnunet-doc.scm +++ b/contrib/scripts/documentation/gnunet-doc.scm @@ -1,20 +1,18 @@ ;;; This file is part of GNUnet. ;;; Copyright (C) 2016, 2017 GNUnet e.V. ;;; -;;; GNUnet 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. +;;; GNUnet is free software: you can redistribute it and/or modify it +;;; under the terms of the GNU Affero General Public License as published +;;; by the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. ;;; ;;; GNUnet 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. +;;; Affero General Public License for more details. ;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNUnet; see the file COPYING. If not, write to the -;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;;; Boston, MA 02110-1301, USA. +;;; You should have received a copy of the GNU Affero General Public License +;;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;;; (use-modules diff --git a/contrib/scripts/gnunet-chk.py.in b/contrib/scripts/gnunet-chk.py.in index c976b2143d..cabaef6c40 100755 --- a/contrib/scripts/gnunet-chk.py.in +++ b/contrib/scripts/gnunet-chk.py.in @@ -2,20 +2,18 @@ # This file is part of GNUnet. # (C) 2013, 2018 Christian Grothoff (and other contributing authors) # -# GNUnet 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. +# GNUnet is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # # GNUnet 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. +# Affero General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with GNUnet; see the file COPYING. If not, write to the -# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. # # File: gnunet-chk.py # 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 91d2a43778..cbe96a8ebe 100644 --- a/contrib/scripts/gnunet_janitor.py.in +++ b/contrib/scripts/gnunet_janitor.py.in @@ -2,20 +2,18 @@ # This file is part of GNUnet. # (C) 2011, 2018 Christian Grothoff (and other contributing authors) # -# GNUnet 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 2, or (at your -# option) any later version. +# GNUnet is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # # GNUnet 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 GNUnet; see the file COPYING. If not, write to the -# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. # # Finds any gnunet processes still running in the system and kills them # diff --git a/contrib/scripts/gnunet_pyexpect.py.in b/contrib/scripts/gnunet_pyexpect.py.in index 23f01603f5..f155db5be6 100644 --- a/contrib/scripts/gnunet_pyexpect.py.in +++ b/contrib/scripts/gnunet_pyexpect.py.in @@ -2,20 +2,18 @@ # This file is part of GNUnet. # (C) 2010, 2018 Christian Grothoff (and other contributing authors) # -# GNUnet 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 2, or (at your -# option) any later version. +# GNUnet is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # # GNUnet 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 GNUnet; see the file COPYING. If not, write to the -# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. # # Testcase for gnunet-peerinfo from __future__ import print_function diff --git a/contrib/scripts/terminate.py.in b/contrib/scripts/terminate.py.in index c6acfdba8b..30f5dc97f1 100644 --- a/contrib/scripts/terminate.py.in +++ b/contrib/scripts/terminate.py.in @@ -2,20 +2,18 @@ # This file is part of GNUnet. # (C) 2011, 2018 Christian Grothoff (and other contributing authors) # -# GNUnet 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 2, or (at your -# option) any later version. +# GNUnet is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. # # GNUnet 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 GNUnet; see the file COPYING. If not, write to the -# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. # # Utility module that implements safe process termination for W32. # For other platforms it's equivalent to Popen.kill () diff --git a/contrib/test_gnunet_prefix.c b/contrib/test_gnunet_prefix.c index 0e5325d5f8..4614ee9e2c 100644 --- a/contrib/test_gnunet_prefix.c +++ b/contrib/test_gnunet_prefix.c @@ -1,21 +1,19 @@ /* - This file is part of GNUnet + This file is part of GNUnet Copyright (C) 2011, 2014 GNUnet e.V. - GNUnet 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. + GNUnet is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - GNUnet 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 GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. + GNUnet 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 + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** diff --git a/contrib/timeout_watchdog.c b/contrib/timeout_watchdog.c index fc61a7cc77..70e840d555 100644 --- a/contrib/timeout_watchdog.c +++ b/contrib/timeout_watchdog.c @@ -2,20 +2,18 @@ This file is part of GNUnet Copyright (C) 2010 GNUnet e.V. - GNUnet 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. + GNUnet is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. GNUnet 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 GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** diff --git a/contrib/timeout_watchdog_w32.c b/contrib/timeout_watchdog_w32.c index fa7cd81fd9..901eb62075 100644 --- a/contrib/timeout_watchdog_w32.c +++ b/contrib/timeout_watchdog_w32.c @@ -2,20 +2,18 @@ This file is part of GNUnet Copyright (C) 2010 GNUnet e.V. - GNUnet 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. + GNUnet is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. GNUnet 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 GNUnet; see the file COPYING. If not, write to the - Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. + Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ /** |