GNU bug report logs -
#58231
[PATCH 0/2] Checking the 'license' field of packages
Previous Next
Reported by: Ludovic Courtès <ludo <at> gnu.org>
Date: Sat, 1 Oct 2022 16:20:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 10 Oct 2022 11:20:30 +0200
with message-id <87zge42fxd.fsf <at> gnu.org>
and subject line Heads-up: Run “make clean-go && make”
has caused the debbugs.gnu.org bug report #58231,
regarding [PATCH 0/2] Checking the 'license' field of packages
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
58231: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58231
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hello Guix!
We already have ‘guix lint -c license’ but that hasn’t prevented
us from occasionally having invalid licenses committed. This patch
adds add a ‘sanitize’ option to the ‘license’ field of <package> to
detect invalid licenses early on, as zimoun suggested at:
https://lists.gnu.org/archive/html/guix-devel/2022-09/msg00067.html
The funny part of this patch is that the license validation expands
to #t in the majority of cases, meaning that it comes without
run-time overhead (there is macro-expansion overhead, but I didn’t
measure it). Kinda like static type checking, except that we can
only tell when a value is definitely a valid license and cannot
conclude in other cases.
Feedback welcome!
Thanks,
Ludo’.
Ludovic Courtès (2):
licenses: Let 'license?' expand to #t in trivial cases.
packages: Raise an exception for invalid 'license' values.
guix/licenses.scm | 58 +++++++++++++++++++++++++++++++++++++++-------
guix/packages.scm | 40 +++++++++++++++++++++++++++++++-
tests/packages.scm | 7 ++++++
3 files changed, 95 insertions(+), 10 deletions(-)
base-commit: d9b7982ba58fdea0934b60a81f507440a56c82ee
--
2.37.3
[Message part 3 (message/rfc822, inline)]
Hi,
Ludovic Courtès <ludo <at> gnu.org> skribis:
> licenses: Let 'license?' expand to #t in trivial cases.
> packages: Raise an exception for invalid 'license' values.
I pushed these two patches as b6bc4c109b807c646e99ec40360e681122d85b2c
(see <https://issues.guix.gnu.org/58231> for context).
Now we all need to run “make clean-go && make”!
Thank you for your understanding. :-)
Ludo’.
This bug report was last modified 2 years and 242 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.