]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: convert to SPDX license tags
authorDave Chinner <dchinner@redhat.com>
Tue, 24 Jul 2018 04:16:32 +0000 (23:16 -0500)
committerEric Sandeen <sandeen@redhat.com>
Tue, 24 Jul 2018 04:16:32 +0000 (23:16 -0500)
commit959ef98176005b1aa69619dd76b1d46cf112dfc4
tree55bdda1f489c42462d215747780366dadd9af924
parentbf297b1fe69a5f3d228f42ffdbbf12a2130a1ba7
xfsprogs: convert to SPDX license tags

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/

This change was mostly scripted. Makefiles and various scripts
and build files were modified by hand. Files missing license
statements were tagged as GPLv2.0, the rest were detected
and modified by the following command:

for f in `git grep -l "GNU General" |grep [ch]$` ; do
        echo $f
        cat $f | awk -f hdr.awk > $f.new
        mv -f $f.new $f
done

And the hdr.awk script that did the modification (including
detecting the difference between GPL-2.0 and GPL-2.0+ licenses)
is as follows:

$ cat hdr.awk
BEGIN {
        hdr = 1.0
        tag = "GPL-2.0"
        str = ""
}

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

/any later version./ {
        tag = "GPL-2.0+"
        next
}

/^ \*\// {
        if (hdr > 0.0) {
                print "// SPDX-License-Identifier: " tag
                print str
                print $0
                str=""
                hdr = 0.0
                next
        }
        print $0
        next
}

/^ \* / {
        if (hdr > 1.0)
                next
        if (hdr > 0.0) {
                if (str != "")
                        str = str "\n"
                str = str $0
                next
        }
        print $0
        next
}

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

// {
        if (hdr > 0.0) {
                if (str != "")
                        str = str "\n"
                str = str $0
                next
        }
        print $0
}

END { }
$

[sandeen: drop libxfs bits inherited from kernel]

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
393 files changed:
LICENSES/GPL-2.0 [new file with mode: 0644]
LICENSES/LGPL-2.1 [new file with mode: 0644]
Makefile
copy/Makefile
copy/xfs_copy.c
copy/xfs_copy.h
db/Makefile
db/addr.c
db/addr.h
db/agf.c
db/agf.h
db/agfl.c
db/agfl.h
db/agi.c
db/agi.h
db/attr.c
db/attr.h
db/attrset.c
db/attrset.h
db/attrshort.c
db/attrshort.h
db/bit.c
db/bit.h
db/block.c
db/block.h
db/bmap.c
db/bmap.h
db/bmroot.c
db/bmroot.h
db/btblock.c
db/btblock.h
db/btdump.c
db/check.c
db/check.h
db/command.c
db/command.h
db/convert.c
db/convert.h
db/crc.c
db/crc.h
db/debug.c
db/debug.h
db/dir2.c
db/dir2.h
db/dir2sf.c
db/dir2sf.h
db/dquot.c
db/dquot.h
db/echo.c
db/echo.h
db/faddr.c
db/faddr.h
db/field.c
db/field.h
db/flist.c
db/flist.h
db/fprint.c
db/fprint.h
db/frag.c
db/frag.h
db/freesp.c
db/freesp.h
db/fsmap.c
db/fsmap.h
db/fuzz.c
db/fuzz.h
db/hash.c
db/hash.h
db/help.c
db/help.h
db/info.c
db/init.c
db/init.h
db/inode.c
db/inode.h
db/input.c
db/input.h
db/io.c
db/io.h
db/logformat.c
db/logformat.h
db/malloc.c
db/malloc.h
db/metadump.c
db/metadump.h
db/output.c
db/output.h
db/print.c
db/print.h
db/quit.c
db/quit.h
db/sb.c
db/sb.h
db/sig.c
db/sig.h
db/strvec.c
db/strvec.h
db/symlink.c
db/symlink.h
db/text.c
db/text.h
db/type.c
db/type.h
db/write.c
db/write.h
db/xfs_admin.sh
db/xfs_metadump.sh
db/xfs_ncheck.sh
debian/Makefile
doc/COPYING [deleted file]
doc/Makefile
estimate/Makefile
estimate/xfs_estimate.c
fsck/Makefile
fsr/Makefile
fsr/xfs_fsr.c
growfs/Makefile
growfs/xfs_growfs.c
include/Makefile
include/atomic.h
include/avl64.h
include/bitops.h
include/builddefs.in
include/buildmacros
include/buildrules
include/cache.h
include/command.h
include/convert.h
include/darwin.h
include/freebsd.h
include/fsgeom.h
include/gnukfreebsd.h
include/handle.h
include/hlist.h
include/input.h
include/install-sh
include/jdm.h
include/kmem.h
include/libfrog.h
include/libxcmd.h
include/libxfs.h
include/libxlog.h
include/linux.h
include/list.h
include/parent.h
include/path.h
include/platform_defs.h.in
include/project.h
include/ptvar.h
include/radix-tree.h
include/workqueue.h
include/xfs.h
include/xfs_arch.h
include/xfs_btree_trace.h
include/xfs_inode.h
include/xfs_log_recover.h
include/xfs_metadump.h
include/xfs_mount.h
include/xfs_multidisk.h
include/xfs_trace.h
include/xfs_trans.h
include/xqm.h
io/Makefile
io/attr.c
io/bmap.c
io/copy_file_range.c
io/cowextsize.c
io/encrypt.c
io/fadvise.c
io/fiemap.c
io/file.c
io/freeze.c
io/fsmap.c
io/fsync.c
io/getrusage.c
io/imap.c
io/init.c
io/init.h
io/inject.c
io/io.h
io/label.c
io/link.c
io/log_writes.c
io/madvise.c
io/mincore.c
io/mmap.c
io/open.c
io/parent.c
io/pread.c
io/prealloc.c
io/pwrite.c
io/readdir.c
io/reflink.c
io/resblks.c
io/scrub.c
io/seek.c
io/sendfile.c
io/shutdown.c
io/stat.c
io/statx.h
io/swapext.c
io/sync.c
io/sync_file_range.c
io/truncate.c
io/utimes.c [changed mode: 0755->0644]
io/xfs_bmap.sh
io/xfs_freeze.sh
io/xfs_mkfile.sh
libfrog/Makefile
libfrog/avl64.c
libfrog/convert.c
libfrog/darwin.c
libfrog/freebsd.c
libfrog/fsgeom.c
libfrog/irix.c
libfrog/linux.c
libfrog/paths.c
libfrog/projects.c
libfrog/ptvar.c
libfrog/radix-tree.c
libfrog/topology.c
libfrog/util.c
libfrog/workqueue.c
libhandle/Makefile
libhandle/handle.c
libhandle/jdm.c
libxcmd/Makefile
libxcmd/command.c
libxcmd/help.c
libxcmd/input.c
libxcmd/quit.c
libxfs/Makefile
libxfs/cache.c
libxfs/crc32.c
libxfs/crc32defs.h
libxfs/defer_item.c
libxfs/gen_crc32table.c
libxfs/init.c
libxfs/init.h
libxfs/kmem.c
libxfs/libxfs_api_defs.h
libxfs/libxfs_io.h
libxfs/libxfs_priv.h
libxfs/logitem.c
libxfs/rdwr.c
libxfs/trans.c
libxfs/util.c
libxfs/xfs_cksum.h
libxlog/Makefile
libxlog/util.c
libxlog/xfs_log_recover.c
logprint/Makefile
logprint/log_copy.c
logprint/log_dump.c
logprint/log_misc.c
logprint/log_print_all.c
logprint/log_print_trans.c
logprint/log_redo.c
logprint/logprint.c
logprint/logprint.h
m4/Makefile
man/Makefile
man/man2/ioctl_xfs_scrub_metadata.2
mdrestore/Makefile
mdrestore/xfs_mdrestore.c
mkfs/Makefile
mkfs/proto.c
mkfs/xfs_mkfs.c
po/Makefile
quota/Makefile
quota/darwin.c
quota/edit.c
quota/free.c
quota/freebsd.c
quota/init.c
quota/init.h
quota/irix.c
quota/linux.c
quota/path.c
quota/project.c
quota/quot.c
quota/quota.c
quota/quota.h
quota/report.c
quota/state.c
quota/util.c
repair/Makefile
repair/README
repair/agheader.c
repair/agheader.h
repair/attr_repair.c
repair/attr_repair.h
repair/avl.c
repair/avl.h
repair/bmap.c
repair/bmap.h
repair/btree.c
repair/btree.h
repair/da_util.c
repair/da_util.h
repair/dino_chunks.c
repair/dinode.c
repair/dinode.h
repair/dir2.c
repair/dir2.h
repair/err_protos.h
repair/globals.c
repair/globals.h
repair/incore.c
repair/incore.h
repair/incore_bmc.c
repair/incore_ext.c
repair/incore_ino.c
repair/init.c
repair/phase1.c
repair/phase2.c
repair/phase3.c
repair/phase4.c
repair/phase5.c
repair/phase6.c
repair/phase7.c
repair/prefetch.c
repair/prefetch.h
repair/progress.c
repair/progress.h
repair/protos.h
repair/rmap.c
repair/rmap.h
repair/rt.c
repair/rt.h
repair/sb.c
repair/scan.c
repair/scan.h
repair/slab.c
repair/slab.h
repair/threads.c
repair/threads.h
repair/versions.c
repair/versions.h
repair/xfs_repair.c
rtcp/Makefile
rtcp/xfs_rtcp.c
scrub/Makefile
scrub/bitmap.c
scrub/bitmap.h
scrub/common.c
scrub/common.h
scrub/counter.c
scrub/counter.h
scrub/disk.c
scrub/disk.h
scrub/filemap.c
scrub/filemap.h
scrub/fscounters.c
scrub/fscounters.h
scrub/inodes.c
scrub/inodes.h
scrub/phase1.c
scrub/phase2.c
scrub/phase3.c
scrub/phase4.c
scrub/phase5.c
scrub/phase6.c
scrub/phase7.c
scrub/progress.c
scrub/progress.h
scrub/read_verify.c
scrub/read_verify.h
scrub/scrub.c
scrub/scrub.h
scrub/spacemap.c
scrub/spacemap.h
scrub/unicrash.c
scrub/unicrash.h
scrub/vfs.c
scrub/vfs.h
scrub/xfs_scrub.c
scrub/xfs_scrub.h
scrub/xfs_scrub_all.in
spaceman/Makefile
spaceman/file.c
spaceman/freesp.c
spaceman/info.c
spaceman/init.c
spaceman/init.h
spaceman/prealloc.c
spaceman/space.h
spaceman/trim.c
spaceman/xfs_info.sh
tools/find-api-violations.sh
tools/libxfs-apply
tools/libxfs-diff
tools/xfsbuflock.py