0003-Add-CC0-license.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From c9be46c903d4aabc88fe4d9394d7a8e024868c32 Mon Sep 17 00:00:00 2001
  2. From: Ax333l <main@axelen.xyz>
  3. Date: Thu, 17 Aug 2023 00:00:00 +0000
  4. Subject: [PATCH 03/22] Add CC0 license
  5. Signed-off-by: Nicholas Johnson <nick@nicholasjohnson.ch>
  6. ---
  7. grub-core/kern/dl.c | 3 ++-
  8. util/grub-module-verifierXX.c | 3 ++-
  9. 2 files changed, 4 insertions(+), 2 deletions(-)
  10. diff --git a/grub-core/kern/dl.c b/grub-core/kern/dl.c
  11. index 0bf40caa6..4011e2d15 100644
  12. --- a/grub-core/kern/dl.c
  13. +++ b/grub-core/kern/dl.c
  14. @@ -470,7 +470,8 @@ grub_dl_check_license (grub_dl_t mod, Elf_Ehdr *e)
  15. if (grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3") == 0
  16. || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv3+") == 0
  17. - || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0)
  18. + || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=GPLv2+") == 0
  19. + || grub_strcmp ((char *) e + s->sh_offset, "LICENSE=CC0") == 0)
  20. return GRUB_ERR_NONE;
  21. return grub_error (GRUB_ERR_BAD_MODULE,
  22. diff --git a/util/grub-module-verifierXX.c b/util/grub-module-verifierXX.c
  23. index a42c20bd1..7157a30aa 100644
  24. --- a/util/grub-module-verifierXX.c
  25. +++ b/util/grub-module-verifierXX.c
  26. @@ -236,7 +236,8 @@ check_license (const char * const filename,
  27. Elf_Shdr *s = find_section (arch, e, ".module_license", module_size);
  28. if (s && (strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv3") == 0
  29. || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv3+") == 0
  30. - || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv2+") == 0))
  31. + || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=GPLv2+") == 0
  32. + || strcmp ((char *) e + grub_target_to_host(s->sh_offset), "LICENSE=CC0") == 0))
  33. return;
  34. grub_util_error ("%s: incompatible license", filename);
  35. }
  36. --
  37. 2.39.2