* [gentoo-pms] [PATCH] Specify restrictions upon license names.
@ 2016-06-09 21:59 99% Ulrich Mueller
0 siblings, 0 replies; 1+ results
From: Ulrich Mueller @ 2016-06-09 21:59 UTC (permalink / raw
To: gentoo-pms
Currently there are no restrictions on license names, but obviously
they cannot be arbitrary. (For example, they cannot end with a
question mark because that would collide with use-conditionals.)
The patch below restricts their names to the standard
[A-Za-z0-9_][A-Za-z0-9+_.-]* set of characters.
This agrees with usage in the tree. I could find only one single
instance of a license with a deviating filename [1], which however was
removed more than 10 years ago.
Ulrich
[1] https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/licenses/D%26R?hideattic=0&revision=1.1&view=markup
From 4a48d5b25f4e9b687427d47932cc4692adad10ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@gentoo.org>
Date: Thu, 9 Jun 2016 21:46:01 +0200
Subject: [PATCH] Specify restrictions upon license names.
---
ebuild-vars.tex | 3 ++-
names.tex | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ebuild-vars.tex b/ebuild-vars.tex
index 1577e26..5f53c33 100644
--- a/ebuild-vars.tex
+++ b/ebuild-vars.tex
@@ -51,7 +51,8 @@ Ebuilds may define any of the following variables:
\t{https://}, \t{ftp://} and \t{mirror://} (see section~\ref{sec:thirdpartymirrors} for mirror
behaviour). Fetch restricted packages may include URL parts consisting of just a filename.
See section~\ref{sec:dependencies} for full syntax.
-\item[LICENSE] The package's license. Each text token must correspond to a tree ``licenses/'' entry
+\item[LICENSE] The package's license. Each text token must be a valid license name, as per
+ section~\ref{sec:license-names}, and must correspond to a tree ``licenses/'' entry
(see section~\ref{sec:licenses-dir}). See section~\ref{sec:dependencies} for full syntax.
\label{ebuild-var-LICENSE}
\item[KEYWORDS] A whitespace separated list of keywords for the ebuild. Each token must be a valid
diff --git a/names.tex b/names.tex
index f5cc9bf..d26fed6 100644
--- a/names.tex
+++ b/names.tex
@@ -37,6 +37,11 @@ described in section~\ref{sec:use-iuse-handling}.
A repository name may contain any of the characters [\t{A-Za-z0-9\_-}]. It must not begin with a
hyphen. In addition, every repository name must also be a valid package name.
+\subsection{License Names}
+\label{sec:license-names}
+A license name may contain any of the characters [\t{A-Za-z0-9+\_.-}]. It must not begin with a
+hyphen, a dot or a plus sign.
+
\subsection{Keyword Names}
\label{sec:keyword-names}
A keyword name may contain any of the characters [\t{A-Za-z0-9\_-}]. It must not begin with a
--
2.8.4
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-06-09 21:59 99% [gentoo-pms] [PATCH] Specify restrictions upon license names Ulrich Mueller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox