tech-pkg archive

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

Re: Handling licenses

Roland Illig <> writes:

> Hi,
> Quoting
>> The pkgsrc system, as a policy choice, does not label packages
>> which have licenses that are Free or Open Source.
> This seems to contradict the current pkglint behavior, which says that
> “Every package must define its LICENSE”. Since the text from the pkgsrc
> guide is 9 years old, is it still up-to-date?

As others said, this is old and wrong.

> Also, the pkgsrc guide does not give helpful instructions on determining
> which license a package has. Do we have some tool that I can feed a
> given COPYING file into, and it tells me which of the predefined
> licenses it is? Recognizing the GNU GPL is easy, since it says so, but
> choosing between the various BSD licenses requires reading the whole
> text, as far as I know.

I append a hacky script that uses wdiff, on the notion that in finding
out if a given license text is close enough to an established one to
call it the same, it is most useful to look at files with low diff

Licenses often have formatting differences that don't change the words
(and hence are the same license), and also frequently have substitution
of licensor names.   So this is messy business and I don't think it can
really be automated beyond the following, which prunes the list of
licenses to look at manually substantially.


# To be run from someplace, perhaps even /usr/pkgsrc/licenses.
# Argument $1 is the license to be checked for being duplicative.

set -e

if [ x"$1" = x ]; then
    echo "usage: find-license license-file"
    exit 1

LICENSE=$1; shift

ALL=$(cd /usr/pkgsrc/licenses && ls | egrep -v CVS)

mkdir -p $DIR
cd $DIR

for l in $ALL; do
    wdiff -3 /usr/pkgsrc/licenses/$l ../$LICENSE > $l || true

ls -lS

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index