tech-pkg archive

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

Re: Licence handling: next steps (with attachment)



On Mon, Mar 30, 2009 at 08:53:59AM -0400, Greg Troxel wrote:
> > 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.

Ok.

> That sounds good, but I think we need, in order
> 
>   DEFAULT_ACCEPTABLE_LICENSES working
>   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

That sounds fine with me.

> > +# 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.

True.
I can't think of a package where we would need this.

> >  .if !defined(LICENSE)
> >  # XXX Revisit date.
> > -.  if defined(AFTER_2007Q3)
> > +.  if defined(AFTER_2009Q3)
> >  LICENSE?=          unknown
> >  PKG_FAIL_REASON+=  "[license.mk] 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 license.mk to make this effective.

That's just a bogus variable; I only slightly touched that part of
license.mk, but I'll add a comment:
# XXX Revisit date.  Variable AFTER_2009Q3 is just for humans to read.

> > -.  if !defined(_ACCEPTABLE)
> > +.  if empty(_ACCEPTABLE:M[Yy][Ee][Ss])
> > +.    if defined(MAKECONF)
> > +_MAKECONF?=        ${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.

It's just needed for the message below. Where do you think we should
put it?

> >  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}:" \
> >      "    ACCEPTABLE_LICENSES+=${LICENSE}"
> >  .  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.

So basically:
s/ACCEPTABLE_LICENSES/PKGSRC_LICENSES/g
s/ACCEPTABLE/LICENSE_CHECKED/g

Fine with me, but that will introduce a flag day for pkgsrc, since
nowadays users have to define ACCEPTABLE_LICENSES.
So perhaps something like:
.if defined(ACCEPTABLE_LICENSES)
WARNINGS+=      "[license.mk] ACCEPTABLE_LICENSES is deprected, please set 
PKGSRC_LICENSES instead."
.endif
is needed, which we remove after 2009Q4 or so.
 Thomas


Home | Main Index | Thread Index | Old Index