lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1521135307.22221.42.camel@perches.com>
Date:   Thu, 15 Mar 2018 10:35:07 -0700
From:   Joe Perches <joe@...ches.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Marc Zyngier <marc.zyngier@....com>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Philippe Ombredanne <pombredanne@...b.com>
Subject: Re: [patch 0/4] genirq: Clean up license information

On Thu, 2018-03-15 at 18:23 +0100, Greg Kroah-Hartman wrote:
> On Thu, Mar 15, 2018 at 08:00:18AM -0700, Joe Perches wrote:
> > On Wed, 2018-03-14 at 22:15 +0100, Thomas Gleixner wrote:
> > > The following patch series cleans up the licensing information in the
> > > generic irq subsystem.
> > > 
> > >   * Replace boiler plate language and sloppy references with SPDX
> > > 
> > >   * Add missing SPDX identifiers to files with no license reference
> > > 
> > >   * Use the proper tag format
> > > 
> > > While at it clean up the top of file comments by removing pointless
> > > references to the filename itself and condense the information where
> > > appropriate.
> > 
> > Hello.
> > 
> > What do you think of the proposal to convert all the tags
> > to the "-or-later" and "-only" variants that the
> > https://spdx.org/licenses/ uses today?
> 
> Ick ick ick ick.  Let's stick with what we have today, if we do decide
> to do this type of foolishness,

Why would it be foolish to have the kernel
match the spdx license text?

> we can do it all in one simple script to
> email to Linus to run on his tree.

I sent that script Feb 8.

Here it is again:
---
#!/bin/bash

license_script=$(mktemp -t convert-SPDX-licenses.XXXXXXXXX.pl)
cat <<'EOF' >> $license_script

our $balanced_parens = qr/(\((?:[^\(\)]++|(?-1))*\))/;

sub deparenthesize {
	my ($string) = @_;

	return "" if (!defined($string));

	while ($string =~ /^\s*\(.*\)\s*$/) {
		$string =~ s@^\s*\(\s*@@;
		$string =~ s@\s*\)\s*$@@;
	}

	return $string;
}

for my $filename (@ARGV) {
	my $FILE;

	if ($filename eq '-') {
		open($FILE, '<&STDIN');
	} else {
		open($FILE, '<', "$filename") ||
			die "$P: $filename: open failed - $!\n";
	}
	undef $/;
	my $file = <$FILE>;
	close $FILE;

	my $spdx = "SPDX-License-Identifier:";

	$file =~ s/\b$spdx[ \t]*((?:\([ \t]*)*)GPL(\d\.\d)/$spdx \1GPL-\2/g;
	$file =~ s/\b$spdx[ \t]*((?:\([ \t]*)*)(L?GPL-\d\.\d)\+/$spdx \1\2-or-later/g;
	$file =~ s/\b$spdx[ \t]*((?:\([ \t]*)*)(L?GPL-\d\.\d)(?!-or-later|-only)/$spdx \1\2-only/g;

	while ($file =~ s/\b$spdx[ \t]($balanced_parens)(?![ \t]*AND|[ \t]*OR)/$spdx . ' ' . deparenthesize($1)/ex) {
		;
	}

	if ($filename eq '-') {
		open($FILE, '>&STDOUT');
	} else {
		open($FILE, '>', "$filename") ||
			die "$P: $filename: open failed - $!\n";
	}
	print $FILE $file;
	close $FILE;
}
EOF

git grep --name-only "$spdx" | \
    grep -vP "^(?:LICENSES/|Documentation/process/license-rules\.rst)" | \
    xargs perl $license_script

rm -f $license_script

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ