Re: [PATCH] xfs: convert to SPDX license tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> > 
> > 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@xxxxxxxxxx>
> > ---
> 
> 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@xxxxxxxxxx>

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



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux