* [gentoo-pms] License for code snippets included in PMS @ 2011-02-20 0:15 Ulrich Mueller 2011-02-24 7:49 ` Ulrich Mueller 0 siblings, 1 reply; 8+ messages in thread From: Ulrich Mueller @ 2011-02-20 0:15 UTC (permalink / raw To: gentoo-pms The PMS document is relased under the CCPL-Attribution-ShareAlike-3.0 license. This may raise some issues for package managers that want to use some of the included code snippets. Portage and paludis are licensed under GPL-2, and pkgcore seems to be heading towards BSD. Currently, most of the code snippets are short (under 10 lines) and are probably not copyrightable. But this might change in future. Could we put all code snippets under some unrestrictive license please? Like CC0-1.0-Universal? Ulrich ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-pms] License for code snippets included in PMS 2011-02-20 0:15 [gentoo-pms] License for code snippets included in PMS Ulrich Mueller @ 2011-02-24 7:49 ` Ulrich Mueller 2011-03-13 10:30 ` Petteri Räty 0 siblings, 1 reply; 8+ messages in thread From: Ulrich Mueller @ 2011-02-24 7:49 UTC (permalink / raw To: gentoo-pms >>>>> On Sun, 20 Feb 2011, I wrote: > Could we put all code snippets under some unrestrictive license > please? Like CC0-1.0-Universal? "Qui tacet consentire videtur." Patch is included below, please review. Ulrich diff --git a/credits.tex b/credits.tex index 459fc1b..931d0b4 100644 --- a/credits.tex +++ b/credits.tex @@ -19,6 +19,9 @@ inclusion. This document is released under the Creative Commons Attribution-Share Alike 3.0 Licence. The full text of this licence can be found at \url{http://creativecommons.org/licenses/by-sa/3.0/}. +All code snippets included with this document are dedicated to the public domain by Creative +Commons CC0 1.0 Universal, see \url{http://creativecommons.org/publicdomain/zero/1.0/legalcode}. + \section*{Reporting Issues} Issues (inaccuracies, wording problems, omissions etc.)\ in this document should be reported via ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [gentoo-pms] License for code snippets included in PMS 2011-02-24 7:49 ` Ulrich Mueller @ 2011-03-13 10:30 ` Petteri Räty 2011-03-13 14:10 ` Ulrich Mueller 0 siblings, 1 reply; 8+ messages in thread From: Petteri Räty @ 2011-03-13 10:30 UTC (permalink / raw To: gentoo-pms [-- Attachment #1: Type: text/plain, Size: 458 bytes --] On 02/24/2011 09:49 AM, Ulrich Mueller wrote: >>>>>> On Sun, 20 Feb 2011, I wrote: > >> Could we put all code snippets under some unrestrictive license >> please? Like CC0-1.0-Universal? > > "Qui tacet consentire videtur." > > Patch is included below, please review. > > Ulrich > To be on the safe side I think we should get permission from everyone who has worked on the code snippets before applying this patch. Regards, Petteri [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 900 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-pms] License for code snippets included in PMS 2011-03-13 10:30 ` Petteri Räty @ 2011-03-13 14:10 ` Ulrich Mueller 2011-03-13 16:40 ` Brian Harring 2011-03-13 16:58 ` Ciaran McCreesh 0 siblings, 2 replies; 8+ messages in thread From: Ulrich Mueller @ 2011-03-13 14:10 UTC (permalink / raw To: Petteri Räty; +Cc: gentoo-pms >>>>> On Sun, 13 Mar 2011, Petteri Räty wrote: >>> Could we put all code snippets under some unrestrictive license >>> please? Like CC0-1.0-Universal? > To be on the safe side I think we should get permission from > everyone who has worked on the code snippets before applying this > patch. Here's the complete list from git history: ebuild-functions.tex default src_unpack (5 lines): Stephen Bennett, Fernando J. Pereda default src_configure (5 lines): Ciaran McCreesh default src_compile for EAPI 0 (8 lines): Stephen Bennett, Ciaran McCreesh, Fernando J. Pereda default src_compile for EAPI 1 (8 lines): Stephen Bennett, Ciaran McCreesh, Fernando J. Pereda default src_compile for EAPI 2 (5 lines): Ciaran McCreesh default src_install for EAPI 4 (16 lines): Ciaran McCreesh pkg-mgr-commands.tex einstall command (7 lines): Stephen Bennett, Ulrich Müller eclasses.tex EXPORT_FUNCTIONS example (8 lines): Stephen Bennett, Ciaran McCreesh env-saving.listing (21 lines): Ciaran McCreesh Some of the code is of course taken from elsewhere, like ebuild.sh (some of the default phase functions) or skel.ebuild (einstall). And probably anything below 10 nonempty lines is not copyrightable anyway (at least that's the rule the FSF applies). As far as my changes are concerned, I release them under CC0-1.0-Universal. Ulrich ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-pms] License for code snippets included in PMS 2011-03-13 14:10 ` Ulrich Mueller @ 2011-03-13 16:40 ` Brian Harring 2011-03-13 17:14 ` David Leverton 2011-03-13 16:58 ` Ciaran McCreesh 1 sibling, 1 reply; 8+ messages in thread From: Brian Harring @ 2011-03-13 16:40 UTC (permalink / raw To: Ulrich Mueller; +Cc: Petteri Räty, gentoo-pms [-- Attachment #1.1: Type: text/plain, Size: 822 bytes --] On Sun, Mar 13, 2011 at 03:10:55PM +0100, Ulrich Mueller wrote: > >>>>> On Sun, 13 Mar 2011, Petteri Räty wrote: > > >>> Could we put all code snippets under some unrestrictive license > >>> please? Like CC0-1.0-Universal? > > > To be on the safe side I think we should get permission from > > everyone who has worked on the code snippets before applying this > > patch. > > Here's the complete list from git history: > env-saving.listing (21 lines): > Ciaran McCreesh This section wasn't accurate, as such I threw it out- attached is a brain dump of exactly what characteristics can be relied on for env saving, and should be reasonably complete. Could stand to have some comments added though. As for license, CC0-1.0-universal/public domain/whatever floats your boat. ~harring [-- Attachment #1.2: 0001-correct-env-saving.listing-to-be-accurate-complete.patch --] [-- Type: text/plain, Size: 3805 bytes --] From a02ba65376e463818aa3d7abc2f845bd5ca745ff Mon Sep 17 00:00:00 2001 From: Brian Harring <ferringb@gmail.com> Date: Sun, 13 Mar 2011 09:09:43 -0700 Subject: [PATCH] correct env-saving.listing to be accurate/complete Version that was in place wasn't particularly accurate nor complete. As such, and to cover copyright/licensing concerns, a from-scratch version was written covering array behaviours, functions, unset behaviour, and exports. Signed-off-by: Brian Harring <ferringb@gmail.com> --- env-saving.listing | 84 +++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 64 insertions(+), 20 deletions(-) diff --git a/env-saving.listing b/env-saving.listing index 1650aa7..4391553 100644 --- a/env-saving.listing +++ b/env-saving.listing @@ -1,27 +1,71 @@ -GLOBAL_VARIABLE="a" - -src_compile() -{ - GLOBAL_VARIABLE="b" - DEFAULT_VARIABLE="c" - export EXPORTED_VARIABLE="d" - local LOCAL_VARIABLE="e" +GLOBAL_SCOPE_VARIABLE="initial" +VAR_TO_WIPE=initial +declare -a ARRAY_VARIABLE=( a b ) + +my_function() { + echo "exists" +} + +src_compile() { + [[ ${GLOBAL_SCOPE_VARIABLE} == initial ]] || \ + die "GLOBAL_SCOPE_VARIABLE must be preserved" + + export GLOBAL_SCOPE_VARIABLE=set_twice + + [[ ${VAR_TO_WIPE} == initial ]] || \ + die "VAR_TO_WIPE must be preserved" + + # now we wipe the var, to ensure that the env saving doesn't preserve it. + unset VAR_TO_WIPE + + local LOCAL_SCOPE_VARIABLE=unseen + + DEFAULT_SCOPE_VARIABLE=set + + { [[ ${#ARRAY_VARIABLE[@]} == 2 ]] && \ + [[ ${ARRAY_VARIABLE[0]} == a ]] && \ + [[ ${ARRAY_VARIABLE[1]} == b ]]; \ + } || \ + die "ARRAY_VARIABLE contents must be preserved exactly, and accessible" + ARRAY_VARIABLE[2]=c + + [[ $(my_function 2> /dev/null) == exists ]] || \ + die "'my_function' must be preserved" } -src_install(){ - [[ ${GLOBAL_VARIABLE} == "a" ]] \ - || [[ ${GLOBAL_VARIABLE} == "b" ]] \ - || die "broken env saving for globals" - [[ ${DEFAULT_VARIABLE} == "c" ]] \ - || die "broken env saving for default" +src_install() { + [[ ${GLOBAL_SCOPE_VARIABLE} == set_twice ]] || \ + die "GLOBAL_SCOPE_VARIABLE modifications in src_compile must be preserved" + + [[ -n $(declare -xp GLOBAL_SCOPE_VARIABLE 2> /dev/null) ]] || \ + die "GLOBAL_SCOPE_VARIABLE must be exported due to src_compile exporting it" + + [[ ${LOCAL_SCOPE_VARIABLE-unset} == unset ]] || \ + die "a local defined variable should be impossible to propagate" + + [[ ${VAR_TO_WIPE-unset} == unset ]] || \ + die "VAR_TO_WIPE was unset during src_compile; this wiping must be preserved" + + [[ ${DEFAULT_SCOPE_VARIABLE} == set ]] || \ + die "DEFAULT_SCOPE_VARIABLE must be preserved" + + [[ -n $(declare -xp DEFAULT_SCOPE_VARIABLE 2> /dev/null) ]] || \ + die "DEFAULT_SCOPE_VARIABLE wasn't exported; environment saving must be preserved that fact." + + [[ ${ARRAY_VARIABLE-unset} != unset ]] || \ + die "ARRAY_VARIABLE must be preserved" - [[ ${EXPORTED_VARIABLE} == "d" ]] \ - || die "broken env saving for exported" + [[ -n $(declare -ap ARRAY_VARIABLE 2> /dev/null) ]] || \ + die "ARRAY_VARIABLE created during src_compile, must have it's array type preserved" - [[ $(printenv EXPORTED_VARIABLE ) == "d" ]] \ - || die "broken env saving for exported" + { [[ ${#ARRAY_VARIABLE[@]} == 3 ]] && \ + [[ ${ARRAY_VARIABLE[0]} == a ]] && \ + [[ ${ARRAY_VARIABLE[1]} == b ]]; \ + [[ ${ARRAY_VARIABLE[2]} == c ]]; \ + } || \ + die "ARRAY_VARIABLE contents must be preserved exactly" - [[ -z ${LOCAL_VARIABLE} ]] \ - || die "broken env saving for locals" + [[ $(my_function 2> /dev/null) == exists ]] || \ + die "'my_function' must be preserved" } -- 1.7.4 [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [gentoo-pms] License for code snippets included in PMS 2011-03-13 16:40 ` Brian Harring @ 2011-03-13 17:14 ` David Leverton 0 siblings, 0 replies; 8+ messages in thread From: David Leverton @ 2011-03-13 17:14 UTC (permalink / raw To: gentoo-pms On 13 March 2011 16:40, Brian Harring <ferringb@gmail.com> wrote: > This section wasn't accurate, as such I threw it out- attached is a > brain dump of exactly what characteristics can be relied on for > env saving, and should be reasonably complete. > > Could stand to have some comments added though. As discussed on IRC, the use of "declare" here is problematic, because inside a function it acts like "local", even if said function is part of the PM that sources the ebuild. This would put a pretty nasty constraint on the PM implementation, and wouldn't work in eclasses anyway because of the "inherit" function. Arrays can still be used simply by not using "declare" and just assigning them, which doesn't have the implicit local attached, so all that's needed is to change "declare -a ARRAY_VARIABLE=( a b )" in the patch to simply "ARRAY_VARIABLE=( a b )". (See also http://bugs.gentoo.org/show_bug.cgi?id=309369, in which this caused problems with loading environment.bz2 files.) As an aside, bash 4.2 has "declare -g" to override the implicit local, but it'll be a while before we can start using that in ebuilds. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-pms] License for code snippets included in PMS 2011-03-13 14:10 ` Ulrich Mueller 2011-03-13 16:40 ` Brian Harring @ 2011-03-13 16:58 ` Ciaran McCreesh 2011-03-14 22:23 ` Ulrich Mueller 1 sibling, 1 reply; 8+ messages in thread From: Ciaran McCreesh @ 2011-03-13 16:58 UTC (permalink / raw To: gentoo-pms [-- Attachment #1: Type: text/plain, Size: 624 bytes --] On Sun, 13 Mar 2011 15:10:55 +0100 Ulrich Mueller <ulm@gentoo.org> wrote: > Here's the complete list from git history: > Ciaran McCreesh For anything I wrote from scratch, I'm fine with any licence that allows package manager authors to relicence it under whatever it is they use themselves. Although, because of > And probably anything below 10 nonempty lines is not copyrightable > anyway (at least that's the rule the FSF applies). I remain unconvinced that any of this is relevant, and by sticking an explicit licence on the code we're probably just making things worse... -- Ciaran McCreesh [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-pms] License for code snippets included in PMS 2011-03-13 16:58 ` Ciaran McCreesh @ 2011-03-14 22:23 ` Ulrich Mueller 0 siblings, 0 replies; 8+ messages in thread From: Ulrich Mueller @ 2011-03-14 22:23 UTC (permalink / raw To: Ciaran McCreesh; +Cc: gentoo-pms >>>>> On Sun, 13 Mar 2011, Ciaran McCreesh wrote: > For anything I wrote from scratch, I'm fine with any licence that > allows package manager authors to relicence it under whatever it is > they use themselves. Thanks. > I remain unconvinced that any of this is relevant, and by sticking > an explicit licence on the code we're probably just making things > worse... Well, CC0-1.0-Universal isn't really a license, it's rather a copyright waiver. Comparable to WTFPL-2, but with a wording that may be more appropriate in some situations. ;) Ulrich ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-03-14 22:23 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-02-20 0:15 [gentoo-pms] License for code snippets included in PMS Ulrich Mueller 2011-02-24 7:49 ` Ulrich Mueller 2011-03-13 10:30 ` Petteri Räty 2011-03-13 14:10 ` Ulrich Mueller 2011-03-13 16:40 ` Brian Harring 2011-03-13 17:14 ` David Leverton 2011-03-13 16:58 ` Ciaran McCreesh 2011-03-14 22:23 ` Ulrich Mueller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox