add script to verify distribution directory agains the LICENSE file.
Some minor changes to the licence file.
This commit is contained in:
parent
8d3421a975
commit
1a993d7c12
17
LICENSE
17
LICENSE
@ -1,4 +1,4 @@
|
||||
$OpenBSD: LICENSE,v 1.1 1998/04/13 03:35:20 marc Exp $
|
||||
$OpenBSD: LICENSE,v 1.2 1998/04/13 05:12:54 marc Exp $
|
||||
|
||||
This file matches the type of license (see below) to each application
|
||||
in the OpenBSD ports tree. Those ports with restrictive licenses will
|
||||
@ -75,8 +75,9 @@ Y benchmarks/bytebench bytebench-3.1.tar.Z NONE
|
||||
Y benchmarks/iozone iozone-2.01.shar.gz COPY
|
||||
Y benchmarks/lmbench lmbench.tar.Z GPL
|
||||
Y benchmarks/tcpblast -none- NONE
|
||||
N benchmarks/xengine xengine/ NOFEE
|
||||
N benchmarks/xengine xengine NOFEE
|
||||
Y chinese/c2t c2t.tar.gz NONE
|
||||
Y chinese/c2t TONEPY.tit NONE
|
||||
N chinese/lunar lunar-2.1.tar.gz NOFEE
|
||||
Y comms/bpl+ bpl+.tar.gz COPY
|
||||
Y comms/hylafax hylafax-v4.0pl1-tar.gz BSD
|
||||
@ -127,7 +128,7 @@ Y graphics/xfig xfig.3.2.tar.gz X
|
||||
Y graphics/xpaint xpaint-2.5.tar.gz BSD
|
||||
Y graphics/xpdf xpdf-0.7.tar.gz COPY
|
||||
Y graphics/xpm xpm-3.4k.tar.gz BSD
|
||||
Y graphics/xv xv-3.10a/ SHARE
|
||||
Y graphics/xv xv-3.10a SHARE
|
||||
Y lang/Gofer gofer230a.tar.gz BSD
|
||||
N lang/STk STk-3.1.tar.gz NOFEE
|
||||
Y lang/expect expect.tar.gz PD
|
||||
@ -142,14 +143,14 @@ Y mail/exim exim-texinfo-1.80.tar.gz COPY
|
||||
N mail/faces faces-1.6.1.tar.Z NOFEE
|
||||
Y mail/fetchmail fetchmail-4.3.8.tar.gz GPL
|
||||
Y mail/metamail mm2.7.tar.Z BSD
|
||||
Y mail/pgpsendmail PGPsendmail-v1.4.tar.gz GPL
|
||||
Y mail/pgpsendmail PGPsendmail-v1.4.5.tar.gz GPL
|
||||
Y mail/pine pine3.96.tar.gz BSD
|
||||
Y mail/popclient popclient-3.0b6.tar.gz COPY
|
||||
N mail/procmail procmail-3.11pre7.tar.gz NOFEE
|
||||
Y mail/xfaces xfaces-3.3.tar.Z BSD
|
||||
Y mail/xfaces xfaces-sounds.tar.gz NONE
|
||||
Y misc/amanda amanda-2.3.0.tar.gz BSD
|
||||
N misc/astrolog astrolog/ NOFEE
|
||||
N misc/astrolog astrolog NOFEE
|
||||
Y misc/buffer buffer-1.17.tar.gz GPL
|
||||
Y misc/cdrecord-current cdrecord-1.6a7.tar.gz GPL
|
||||
Y misc/screen screen-3.7.4.tar.gz GPL
|
||||
@ -169,7 +170,7 @@ Y net/trafshow trafshow-2.0.tgz BSD
|
||||
Y net/ucd-snmp ucd-snmp-3.2.tar.gz BSD
|
||||
Y net/wget wget-1.4.5.tar.gz GPL
|
||||
Y net/ytalk ytalk-v3pl2.tar.gz COPY
|
||||
Y news/aub aub/ COPY
|
||||
Y news/aub aub COPY
|
||||
Y news/leafnode leafnode-1.0.2.src.elf.tgz COPY
|
||||
Y news/newsfetch newsfetch-1.0.tar.gz NONE
|
||||
Y news/plor plor-0.3.1.tar.gz GPL
|
||||
@ -180,8 +181,8 @@ Y print/a2ps a2ps-4.9.9.tar.gz GPL
|
||||
Y print/afm afm-tar.Z COPY
|
||||
Y print/ghostscript5 ghostscript-5.10.tar.gz COPY
|
||||
Y print/ghostscript5 ghostscript-5.10gnu.tar.gz GNU
|
||||
Y print/ghostscript5 ghostscript-fonts-other-5.10.tar.gz
|
||||
Y print/ghostscript5 ghostscript-fonts-std-5.10.tar.gz
|
||||
Y print/ghostscript5 ghostscript-fonts-other-5.10.tar.gz COPY
|
||||
Y print/ghostscript5 ghostscript-fonts-std-5.10.tar.gz COPY
|
||||
Y print/ghostscript5 hp850.zip NONE
|
||||
Y print/ghostview ghostview-1.5.tar.gz GPL
|
||||
Y print/gv gv-3.5.8.tar.gz GPL
|
||||
|
123
license-check
Executable file
123
license-check
Executable file
@ -0,0 +1,123 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# $OpenBSD: license-check,v 1.1 1998/04/13 05:12:55 marc Exp $
|
||||
#
|
||||
# This script verifies that all files in a given directory are
|
||||
# mentioned in the ports LICENSE file as Distribution allowed.
|
||||
# Output is three lists:
|
||||
#
|
||||
# Missing files: files that should be in the directory (if the
|
||||
# intent is to obtain all files that can be
|
||||
# re-distributed) but are not.
|
||||
#
|
||||
# Bad files: files that must NOT be in a distribution
|
||||
# directory. These are listed in the form
|
||||
# of a shell `rm -f xxx' command so they can
|
||||
# be fed to the shell after manual verification.
|
||||
#
|
||||
# Extra files: Files that are in the given directory that are
|
||||
# not mentioned in the ports LICENSE file.
|
||||
#
|
||||
|
||||
# The ports base directory. Note: this may be supplied from the environment
|
||||
# using the standard bsd.port.mkl name of PORTSDIR
|
||||
#
|
||||
LICENCE=${PORTSDIR:-/usr/ports}/LICENSE
|
||||
|
||||
# Our name and a function to spit out the usage. Exit.
|
||||
#
|
||||
prog=`basename $0`
|
||||
usage () {
|
||||
if [ ! -z "$1" ]; then
|
||||
echo "$prog: $1"
|
||||
fi
|
||||
echo "usage: $prog distribution-directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Verify we have one param and that it is the name of a directory.
|
||||
# If not spit out our usage and exit
|
||||
#
|
||||
if [ $# -eq 1 ]; then
|
||||
if [ -d $1 ]; then
|
||||
DIST=$1
|
||||
else
|
||||
usage "$1 is not a directory"
|
||||
fi
|
||||
else
|
||||
usage
|
||||
fi
|
||||
|
||||
# This awk script matches the licence file agains an `ls' of of the given
|
||||
# distribution directory and spits instructions out to stdout.
|
||||
#
|
||||
/bin/ls $DIST |
|
||||
awk -v L=$LICENCE '
|
||||
BEGIN {
|
||||
# Process license file
|
||||
#
|
||||
while ( getline <L ) {
|
||||
if ( NF == 4 ) {
|
||||
if ( $1 == "Y" ) {
|
||||
good_files[ $3 ] = 0
|
||||
} else if ( $1 == "N" ) {
|
||||
bad_files[ $3 ] = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
unk_count = 0
|
||||
}
|
||||
|
||||
$1 in good_files {
|
||||
good_files[ $1 ] = 1
|
||||
next
|
||||
}
|
||||
$1 in bad_files {
|
||||
bad_files[ $1 ] = 1
|
||||
next
|
||||
}
|
||||
{
|
||||
unk_files[ unk_count++ ] = $1
|
||||
}
|
||||
|
||||
END {
|
||||
header = 0
|
||||
for ( f in good_files ) {
|
||||
if ( good_files[ f ] == 0 ) {
|
||||
if ( ! header ) {
|
||||
print "You are missing the following files:"
|
||||
print
|
||||
header = 1
|
||||
}
|
||||
print f
|
||||
}
|
||||
}
|
||||
if ( header ) {
|
||||
print
|
||||
header = 0
|
||||
}
|
||||
for ( f in bad_files ) {
|
||||
if ( bad_files[ f ] == 1 ) {
|
||||
if ( ! header ) {
|
||||
print "You MUST remove the following files:"
|
||||
print
|
||||
header = 1
|
||||
}
|
||||
print "rm -f", f
|
||||
}
|
||||
}
|
||||
if ( header ) {
|
||||
print
|
||||
header = 0
|
||||
}
|
||||
if ( unk_count > 0 ) {
|
||||
print "The following files are extra and should probably be removed:"
|
||||
print
|
||||
for ( i = 0; i < unk_count; i += 1 ) {
|
||||
print "rm -f", unk_files[ i ]
|
||||
}
|
||||
print
|
||||
}
|
||||
}
|
||||
'
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user