Subject: Re: ACCEPTABLE_LICENSES+=opera-license
To: Richard Rauch <rauch@eecs.ukans.edu>
From: Jason Beegan <jtb@netbsd.org>
List: tech-pkg
Date: 06/07/2001 02:13:24
> One problem that bothers me about the current system (ignoring issues
> about the terms of the licenses not being explicit when setting
> ACCEPTABLE_LICENSES):
> 
> If package A depends upon B, and both are in the same license class, then
> I unwittingly agree to B's license when I modify my ACCEPTABLE_LICENSES to
> let A build.  (Or is there some way to avoid this, which I haven't
> seen/figured-out?  Some way, that is, without modifying pkg A's
> Makefile..?)
> 
> Basically, accepting two licenses (even identical licenses) is making two
> seperate agreements.  pkgsrc tends to sweep agreements into equivalence
> classes.  This has always bothered me.
> 

How about something like this?

If you want to build package foo, which has LICENSE=no-profit in its
Makefile, just add

     ACCEPTABLE_LICENSES=     foo-license

to /etc/mk.conf.  Or, easier still, just do

   make ACCEPTABLE_LICENSES=foo-license

in pkgsrc/<whatever>/foo.


--- bsd.pkg.mk.orig
+++ bsd.pkg.mk
@@ -1152,7 +1152,7 @@
 .if defined(LICENSE)
 .  ifdef ACCEPTABLE_LICENSES
 .    for _lic in ${ACCEPTABLE_LICENSES}
-.      if ${LICENSE} == "${_lic}"
+.      if (${LICENSE} == "${_lic}") || (${PKGBASE}-license == "${_lic}") || (${PKGBASE}-licence == "${_lic}")
 _ACCEPTABLE=	yes
 .      endif	# LICENSE == _lic
 .    endfor	# _lic
@@ -1160,7 +1160,7 @@
 .  ifndef _ACCEPTABLE
 IGNORE+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \
 	 "    To build this package, add this line to your /etc/mk.conf:" \
-	 "    ACCEPTABLE_LICENSES+=${LICENSE}"
+	 "    ACCEPTABLE_LICENSES+=${PKGBASE}-license"
 .  endif	# _ACCEPTABLE
 .endif	# LICENSE
 

> 
> While I'm rambling on, it would be nice to have the ability to get a list
> of all <pkg>:<license> pairs for all <pkg>s installed on a given system,
> where <license> is a pointer to the full text of the licnese.  If every
> LICENSE= binding were uniquely associated with a specific license, one
> could do it with sufficient post-processing of the pkg_info(8) output...
> 
> 
>   "I probably don't know what I'm talking about." --rauch@eecs.ukans.edu
> 

That would be ideal, but there are far too many licenses (and
variations upon them) to make that possible at this stage.

At the moment, I'm trying to make the ACCEPTABLE_LICENSES setting
useful.

Also, I intend adding LICENSE=unknown to all of the packages where
no license could be found. (Unfortunately that applies to a lot more
packages than I expected).