All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: convert to SPDX license tags
Date: Thu, 31 May 2018 14:41:45 +1000	[thread overview]
Message-ID: <20180531044145.GL10363@dastard> (raw)
In-Reply-To: <20180531042621.11786-1-david@fromorbit.com>

On Thu, May 31, 2018 at 02:26:21PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Remove the verbose license text from XFS files and replace them
> with SPDX tags. This does not change the license of any of the code,
> merely refers to the common, up-to-date license files in LICENSES/
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---

This was mostly scripted. The awk script below did the majority
of the work, but I manually modified fs/xfs/Makefile (different
comment format) and fs/xfs/libxfs/xfs_fs.h (LGPL 2.1 license,
not GPL 2.0).

Awk script:

$ cat hdr.awk
BEGIN {
	print "// SPDX-License-Identifier: GPL-2.0"
	hdr = 1.0;
}

/^ \* This program is free software/ {
	hdr = 2.0;
	next
}

/^ \*\// {
	print $0
	hdr = 0.0
	next
}

/^ \* / {
	if (hdr > 1.0)
		next
	print $0
	next
}

/^ \*/ {
	if (hdr > 0.0)
		next
	print $0
	next
}

// {
	print $0
}

END { }
$


Script was run like so:

for f in `git grep -l "GNU General" fs/xfs/` ; do \
	echo $f ; \
	cat $f | awk -f hdr.awk > $f.new; \
	mv -f $f.new $f; \
done

And then I fixed up the remaining files.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2018-05-31  5:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31  4:26 [PATCH] xfs: convert to SPDX license tags Dave Chinner
2018-05-31  4:41 ` Dave Chinner [this message]
2018-05-31 16:39   ` Darrick J. Wong
2018-05-31 16:37 ` Christoph Hellwig
2018-05-31 23:44 ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180531044145.GL10363@dastard \
    --to=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.