From 4ddedff3fa107fdf2f229c258bd9dfd6c6223b3b Mon Sep 17 00:00:00 2001 From: hwspeedy Date: Tue, 12 Mar 2024 12:53:07 +0100 Subject: LICENSE relicenses Public Domain binreloc.c+h, md5 as GPL2+, fixes for improved detection and updated check_license.sh --- hardinfo2/binreloc.c | 16 +++++++++---- hardinfo2/hardinfo.c | 5 ++-- includes/binreloc.h | 16 +++++++++---- includes/loongarch64/processor-platform.h | 3 +-- modules/benchmark/md5.c | 29 ++++++++++------------- tools/check_licens.sh | 38 ------------------------------- tools/check_license.sh | 37 ++++++++++++++++++++++++++++++ 7 files changed, 75 insertions(+), 69 deletions(-) delete mode 100755 tools/check_licens.sh create mode 100755 tools/check_license.sh diff --git a/hardinfo2/binreloc.c b/hardinfo2/binreloc.c index f47a3fae..42a7a6df 100644 --- a/hardinfo2/binreloc.c +++ b/hardinfo2/binreloc.c @@ -1,13 +1,19 @@ /* * BinReloc - a library for creating relocatable executables - * Written by: Hongli Lai + * Copyright: hardinfo2 project * http://autopackage.org/ * - * This source code is public domain. You can relicense this code - * under whatever license you want. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License v2.0 or later. * - * See http://autopackage.org/docs/binreloc/ for - * more information and how to use this. + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __BINRELOC_C__ diff --git a/hardinfo2/hardinfo.c b/hardinfo2/hardinfo.c index e2f11cdf..1cf6603a 100644 --- a/hardinfo2/hardinfo.c +++ b/hardinfo2/hardinfo.c @@ -2,9 +2,9 @@ * HardInfo - Displays System Information * Copyright (C) 2003-2009 L. A. F. Pereira * + * * 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, version 2 or later. + * it under the terms of the GNU General Public License v2.0 or later. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,6 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ + #include #include diff --git a/includes/binreloc.h b/includes/binreloc.h index 3bf48bc6..4e7366e8 100644 --- a/includes/binreloc.h +++ b/includes/binreloc.h @@ -1,13 +1,19 @@ /* * BinReloc - a library for creating relocatable executables - * Written by: Hongli Lai + * Copyright by: hardinfo2 project * http://autopackage.org/ * - * This source code is public domain. You can relicense this code - * under whatever license you want. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License v2.0 or later. * - * See http://autopackage.org/docs/binreloc/ for - * more information and how to use this. + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __BINRELOC_H__ diff --git a/includes/loongarch64/processor-platform.h b/includes/loongarch64/processor-platform.h index 006b762a..cc4b7fa6 100644 --- a/includes/loongarch64/processor-platform.h +++ b/includes/loongarch64/processor-platform.h @@ -3,8 +3,7 @@ * Copyright (C) 2003-2006 L. A. F. Pereira * * 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, version 2 or Later. + * it under the terms of the GNU General Public License v2.0 or later. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/modules/benchmark/md5.c b/modules/benchmark/md5.c index f4032ddd..8cb22d93 100644 --- a/modules/benchmark/md5.c +++ b/modules/benchmark/md5.c @@ -2,27 +2,22 @@ * This code implements the MD5 message-digest algorithm. * The algorithm is due to Ron Rivest. This code was * written by Colin Plumb in 1993, no copyright is claimed. - * This code is in the public domain; do with it what you wish. + * Copyright by: hardinfo2 project + + * 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, version 2 or later. * - * Equivalent code is available from RSA Data Security, Inc. - * This code has been tested against that, and is equivalent, - * except that you don't need to include two pages of legalese - * with every copy. + * 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. * - * To compute the message digest of a chunk of bytes, declare an - * MD5Context structure, pass it to MD5Init, call MD5Update as - * needed on buffers full of bytes, and then call MD5Final, which - * will fill a supplied 16-byte array with the digest. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -/* This code was modified in 1997 by Jim Kingdon of Cyclic Software to - not require an integer type which is exactly 32 bits. This work - draws on the changes for the same purpose by Tatu Ylonen - as part of SSH, but since I didn't actually use - that code, there is no copyright issue. I hereby disclaim - copyright in any changes I have made; this code remains in the - public domain. */ - #include /* for memcpy() and memset() */ /* Add prototype support. */ diff --git a/tools/check_licens.sh b/tools/check_licens.sh deleted file mode 100755 index 52825ee7..00000000 --- a/tools/check_licens.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -cd .. -rm -rf build -mkdir build -cd build - -licensecheck -r .. | grep '\.c: \|\.h: ' >licenses_all.txt - -echo "GPL2.0+:" -cat licenses_all.txt| grep 'General Public License v2.0 or later\|GNU Library General Public License v2 or later' -echo "" - -echo "LGPL2.1+:" -cat licenses_all.txt| grep 'GNU Lesser General Public License v2.1 or later' -echo "" - -echo "LGPL2.1:" -cat licenses_all.txt| grep -v 'GNU Lesser General Public License v2.1 or later' | grep 'GNU Lesser General Public License, Version 2.1' -echo "" - -echo "GPL3.0+:" -cat licenses_all.txt| grep 'General Public License v3.0 or later' -echo "" - -echo "No copyright:" -cat licenses_all.txt| grep '*No copyright*' -echo "" - -#remaining licenses -echo "Others:" -echo "includes/loongarch64/processor-platform.h detected wrong - is GPL2+:" -cat licenses_all.txt|grep -v 'General Public License v2.0 or later\|GNU Library General Public License v2 or later' \ - | grep -v 'GNU Lesser General Public License v2.1 or later'| grep -v 'GNU Lesser General Public License, Version 2.1' \ - | grep -v 'General Public License v3.0 or later' \ - | grep -v '*No copyright*' - -echo "" diff --git a/tools/check_license.sh b/tools/check_license.sh new file mode 100755 index 00000000..1a754ce8 --- /dev/null +++ b/tools/check_license.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +cd .. +rm -rf build +mkdir build +cd build + +licensecheck -r .. | grep '\.c: \|\.h: ' >licenses_all.txt + +echo "GPL2.0+:" +cat licenses_all.txt| grep 'General Public License v2.0 or later\|GNU Library General Public License v2 or later' +echo "" + +echo "LGPL2.1+:" +cat licenses_all.txt| grep 'GNU Lesser General Public License v2.1 or later' +echo "" + +echo "LGPL2.1:" +cat licenses_all.txt| grep -v 'GNU Lesser General Public License v2.1 or later' | grep 'GNU Lesser General Public License, Version 2.1' +echo "" + +echo "GPL3.0+:" +cat licenses_all.txt| grep 'General Public License v3.0 or later' +echo "" + +echo "No copyright:" +cat licenses_all.txt| grep '*No copyright*' +echo "" + +#remaining licenses +echo "Others:" +cat licenses_all.txt|grep -v 'General Public License v2.0 or later\|GNU Library General Public License v2 or later' \ + | grep -v 'GNU Lesser General Public License v2.1 or later'| grep -v 'GNU Lesser General Public License, Version 2.1' \ + | grep -v 'General Public License v3.0 or later' \ + | grep -v '*No copyright*' + +echo "" -- cgit v1.2.3