[csw-maintainers] License / copyright files in packages

Maciej (Matchek) Blizinski maciej at opencsw.org
Tue Nov 9 11:04:38 CET 2010


No dia 5 de Novembro de 2010 17:53, Philip Brown <phil at bolthole.com> escreveu:
> On 11/5/10, Maciej (Matchek) Blizinski <maciej at opencsw.org> wrote:
>>
>>> However, some time in the not-too-distant-past it was agreed that it
>>> was acceptible for the "i copyright" file to only reference the full
>>> copyright file, as delivered in the package.
>>
>> Does the reference have a defined syntax?  Checkpkg could de-refer it
>> and check if the referred license file is present in the package.
>>
>
> None have been defined that I recall.
> Which is in some ways appropriate, because SOMETIMES, for very short
> licenses, it is just fine to contain the license itself in "i
> copyright", with no separate license file.
>
> But it's pretty trivial to just "grep /opt/csw/share/doc copyright", after all.

You mean, in pkgmp?  If we don't have a naming standard, we can't grep
like this without having lots of false positives.

When you start analyzing the copyright file, you could do something like this:

if copyright_file_exists:
  if is_reference:
    if cannot_derefer:
      return an error tag
else:
  return an error tag

The problem is in determining whether it's a reference or not.  If
there is no format, you cannot parse the file and answer the question
"is it a reference or not?", and in effect, you cannot check whether
the package actually contains a copyright or not.  The "i copyright"
file could contain a reference to a file that isn't included in the
package, and you would be unable to detect that.

Phil, would you like to suggest a syntax for copyright file references?


More information about the maintainers mailing list