tech-pkg archive

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

Re: Licence handling: next steps (with attachment)

Thomas Klausner <> writes:

> Example:
>       LICENSE=license1|license2 license3 license4
> means that you have to accept
>       (license1 OR license2) AND license3 AND license4
> to build this package.

That seems ok.

> The diff also adds a warning when building a package that doesn't have
> LICENSE set.

I think this is slightly premature; belongs after we uncomment all the
LICENSE= lines for open/free licenses, and after pkglint has been
warning about lack of license for a while.

> The second step is adding/enabling LICENSE variables in the pkgsrc
> Makefiles.
> NOTE: Much care should be taken in this step -- rather leave it out if
> you're not sure.

Before that we need DEFAULT_ACCEPTABLE_LICENSES, but I see that's in and your diff switches to this.

> At some point in the future (perhaps after 2009Q3), setting the
> LICENSE will not be optional for packages.

That sounds good, but I think we need, in order

  pkglint to warn if LICENSE is not set
  (slight pause for a month or so)
  build warning if LICENSE is not set
  (slight pause for a month or so)
  build failure if PKG_DEVELOPER is set

> What is currently completely missing is handling of licenses when
> installing binary packages, I hope someone else will provide this
> part.

Indeed.  At least LICENSE is in build-info.  So this means we have to
implement the LICENSES= language in pkg_add, which could be via running
make.  Or we could implement the language in a pkg library and use that
From make instead of having it coded in make.

> +# The format of the LICENSE variable is:
> +#
> +# LICENSE=license1|license2 license3 license4
> +#
> +# which is interpreted as:
> +# (license1 OR license2) AND license3 AND license4
> +#
>  # XXX: Some of this content arguably belongs in the pkgsrc guide
>  # instead.

So () and nesting are not allowed; if true say that.

>  .if !defined(LICENSE)
>  # XXX Revisit date.
> -.  if defined(AFTER_2007Q3)
> +.  if defined(AFTER_2009Q3)
>  LICENSE?=            unknown
>  PKG_FAIL_REASON+=    "[] Every package must define a LICENSE."
>  .  else

Is AFTER_2009Q3 just a variable that isn't set, but for humans to
understand?  If so, a comment would be nice to explain that.  If this is
keyed off something that will be defined, I think it's better to leave
things so we'll edit to make this effective.

> -.  if !defined(_ACCEPTABLE)
> +.  if empty(_ACCEPTABLE:M[Yy][Ee][Ss])
> +.    if defined(MAKECONF)
> +.    elif ${OPSYS} == "NetBSD" && ${MAKE} != "${PREFIX}/bin/bmake"
> +_MAKECONF?=  /etc/mk.conf
> +.    else
> +_MAKECONF?=  ${PREFIX}/etc/mk.conf
> +.    endif

It would seem finding MAKECONF should be hoisted out.

>  PKG_FAIL_REASON+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \
>        "    To view the license, enter \"${MAKE} show-license\"." \
> -      "    To indicate acceptance, add this line to your mk.conf:" \
> +      "    To indicate acceptance, add this line to ${_MAKECONF}:" \
>  .  endif
>  .endif

I really would like to change all the language surrounding
ACCEPTABLE_LICENSES to be more mechanical and less sounding like pkgsrc
is helping to form contracts.  The essence would be to chagne
ACCEPTABLE_LICENSES to PKGSRC_LICENSES, and no longer say 'the user has
accepted' but instead 'the user has instructed pkgsrc to build software
with this set of licenses'.  (The user may in fact be an employee and
have not accepted anything, and generally this is messy.)

  ${PKGNAME} has a license ${LICENSE} not in PKGSRC_LICENSES.
  To view it, enter \"${MAKE} show-license\"." \
  To instruct pkgsrc to build software with ${LICENSE},
  add this line to ${MAKECONF}:

Then, we replace _ACCEPTABLE with _LICENSE_CHECKED.

Attachment: pgpNT7uKaZlWE.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index