All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] xfs: convert to SPDX license tags
Date: Thu, 31 May 2018 09:39:50 -0700	[thread overview]
Message-ID: <20180531163950.GA837@magnolia> (raw)
In-Reply-To: <20180531044145.GL10363@dastard>

On Thu, May 31, 2018 at 02:41:45PM +1000, Dave Chinner wrote:
> 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).

Hmm... if nobody objects to spdx conversion I think I'll apply this on
fs/xfs/ at the tail end of xfs-4.18-merge.  Dave's patch I think doesn't
quite capture all the files added to -merge, but it's not hard to rerun
it now that we have the awk script.

Also, I think I'd like to record the awk script and other details in the
commit message.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> 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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-05-31 16:39 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
2018-05-31 16:39   ` Darrick J. Wong [this message]
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=20180531163950.GA837@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=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.