[PATCH core-updates 00/19] Add license files missing from font packages

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Simon South
Owner
unassigned
Submitted by
Simon South
Severity
normal
S
S
Simon South wrote on 3 Feb 2023 13:38
(address . guix-patches@gnu.org)
cover.1675425307.git.simon@simonsouth.net
This patch series adds license files missing from 29 font packages[0] that use
font-build-system. It also modifies font-build-system to expose the
#:license-file-regexp argument it inherits and provide a custom, more specific
default value for it, both of which should help future font-package authors
ensure license files are installed correctly.

For testing, note you may need to first apply the patches attached to issues
61039, 61119 and 61120[1] to avoid unrelated build failures. In preparing
this current set of patches I considered a license file "missing" if it is the
only relevant file in the source package, is referred to by another license
file or qualifies the license in some way (for instance, a README file
specifying an exception to the GPL).

In cases where I've changed a package source's fetch method (such as from
"url-fetch/zipbomb" to "url-fetch") this was done to ensure the correct
working directory is selected when the install-license-files build phase runs,
and is related to the unpack phase's magical behaviour of choosing an
arbitrary subdirectory to enter before it completes[2].

I've tested these changes on x86-64 and AArch64 and everything seems fine.

--
Simon South
simon@simonsouth.net

[0] font-anonymous-pro, font-anonymous-pro-minus, font-artifika,
font-bitstream-vera, font-canada1500, font-catamaran, font-charter,
font-comic-neue, font-cormorant, font-culmus, font-dosis, font-dseg,
font-fira-go, font-fira-mono, font-fira-sans,
font-fontna-yasashisa-antique, font-gfs-ambrosia, font-go,
font-ipa-mj-mincho, font-lato, font-libertinus, font-linuxlibertine,
font-lohit, font-montserrat, font-sil-andika, font-sil-charis,
font-sil-gentium, font-wqy-microhei and font-wqy-zenhei.




Simon South (19):
build-system/font: Add #:license-file-regexp argument.
build-system/font: Customize %license-file-regexp.
gnu: font-canada1500: Install license file.
gnu: font-lato: Install license file.
gnu: font-linuxlibertine: Install all license files.
gnu: font-wqy-zenhei: Install all license files.
gnu: font-wqy-microhei: Install all license files.
gnu: font-fira-sans: Install license file.
gnu: font-fira-go: Install license file.
gnu: font-comic-neue: Install license file.
gnu: font-space-grotesk: Remove obsolete phase.
gnu: font-go: Install license files.
gnu: font-dosis: Remove extraneous files; install license file.
gnu: font-culmus: Install all license files.
gnu: font-dseg: Simplify "install" phase.
gnu: font-dseg: Install license file.
gnu: font-jetbrains-mono: Remove obsolete phase.
gnu: font-fontna-yasashisa-antique: Install license file.
gnu: font-charter: Install license file.

gnu/packages/fonts.scm | 83 ++++++++++++++++++--------------
guix/build-system/font.scm | 2 +
guix/build/font-build-system.scm | 6 +++
3 files changed, 55 insertions(+), 36 deletions(-)


base-commit: 70b7d19ecf35ec27b169ea1ccc772d4a9ff7df93
prerequisite-patch-id: 418e6f2f834e0f77d4da64e48bf654d610fbfe80
prerequisite-patch-id: 7c9321685c0c33cb9d1438797d2cb2bb540276c4
prerequisite-patch-id: 2920d2816c4bcf6e7774b35efd49990aef2d76c9
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:42
[PATCH core-updates 01/19] build-system/font: Add #:license-file-regexp argument.
(address . 61253@debbugs.gnu.org)
045f4cd33542a6540a70cc1218b4f5bfab10b492.1675425307.git.simon@simonsouth.net
* guix/build-system/font.scm (font-build): Add #:license-file-regexp argument
and honour it.
* guix/build/font-build-system.scm (%license-file-regexp): New variable,
duplicated from (gnu build gnu-build-system).
---
guix/build-system/font.scm | 2 ++
guix/build/font-build-system.scm | 5 +++++
2 files changed, 7 insertions(+)

Toggle diff (45 lines)
diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm
index c43fb9a542..45933b138f 100644
--- a/guix/build-system/font.scm
+++ b/guix/build-system/font.scm
@@ -77,6 +77,7 @@ (define* (font-build name inputs
(tests? #t)
(test-target "test")
(configure-flags ''())
+ (license-file-regexp '%license-file-regexp)
(phases '%standard-phases)
(outputs '("out"))
(search-paths '())
@@ -98,6 +99,7 @@ (define builder
#:system #$system
#:test-target #$test-target
#:tests? #$tests?
+ #:license-file-regexp #$license-file-regexp
#:phases #$(if (pair? phases)
(sexp->gexp phases)
phases)
diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm
index e4784bc17d..8418ada1d2 100644
--- a/guix/build/font-build-system.scm
+++ b/guix/build/font-build-system.scm
@@ -23,6 +23,7 @@ (define-module (guix build font-build-system)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (%standard-phases
+ %license-file-regexp
font-build))
;; Commentary:
@@ -56,6 +57,10 @@ (define* (install #:key outputs #:allow-other-keys)
(for-each (cut install-file <> (string-append fonts "/web"))
(find-files source "\\.(woff|woff2)$"))))
+(define %license-file-regexp
+ ;; Regexp matching license files.
+ "^(COPYING.*|LICEN[CS]E.*|[Ll]icen[cs]e.*|Copy[Rr]ight(\\.(txt|md))?)$")
+
(define %standard-phases
(modify-phases gnu:%standard-phases
(replace 'unpack unpack)
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:42
[PATCH core-updates 02/19] build-system/font: Customize %license-file-regexp.
(address . 61253@debbugs.gnu.org)
f202561eee29a17ad24551d95c2fdc295151534e.1675425307.git.simon@simonsouth.net
* guix/build/font-build-system.scm (%license-file-regexp): Customize to
include names of license files commonly found in font packages.
---
guix/build/font-build-system.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm
index 8418ada1d2..0b1542394a 100644
--- a/guix/build/font-build-system.scm
+++ b/guix/build/font-build-system.scm
@@ -58,8 +58,9 @@ (define* (install #:key outputs #:allow-other-keys)
(find-files source "\\.(woff|woff2)$"))))
(define %license-file-regexp
- ;; Regexp matching license files.
- "^(COPYING.*|LICEN[CS]E.*|[Ll]icen[cs]e.*|Copy[Rr]ight(\\.(txt|md))?)$")
+ ;; Regexp matching license files commonly found in font packages.
+ "^((COPY(ING|RIGHT)|LICEN[CS]E).*\
+|(([Cc]opy[Rr]ight|[Ll]icen[cs]es?|IPA_.*|OFL(-?1\\.?1)?)(\\.(txt|md)?))$)")
(define %standard-phases
(modify-phases gnu:%standard-phases
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 03/19] gnu: font-canada1500: Install license file.
(address . 61253@debbugs.gnu.org)
17aad2680121f30317a87b139fb8ade756a7de8c.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-canada1500)[source]: Use url-fetch/zipbomb.
[arguments]: Add with #:license-file-regexp.
---
gnu/packages/fonts.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 6d1fc14f37..452e0a0126 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -220,12 +220,14 @@ (define-public font-canada1500
(name "font-canada1500")
(version "1.101")
(source (origin
- (method url-fetch)
+ (method url-fetch/zipbomb)
(uri "https://typodermicfonts.com/wp-content/uploads/2017/06/canada1500.zip")
(sha256
(base32
"0cdcb89ab6q7b6jd898bnvrd1sifbd2xr42qgji98h8d5cq4b6fp"))))
(build-system font-build-system)
+ (arguments
+ '(#:license-file-regexp "^license.pdf$"))
(home-page "https://typodermicfonts.com/canada1500/")
(synopsis "Canadian typeface that supports English, French and Aboriginal languages")
(description "Canada1500 is a display typeface originally created for the
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 04/19] gnu: font-lato: Install license file.
(address . 61253@debbugs.gnu.org)
bccf47b54d771c3b1bf971b2f4ce78f31c8fac2a.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-lato)[source]: Use url-fetch.
---
gnu/packages/fonts.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 452e0a0126..5e6e25db43 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -274,7 +274,7 @@ (define-public font-lato
(name "font-lato")
(version "2.015") ; also update description
(source (origin
- (method url-fetch/zipbomb)
+ (method url-fetch)
(uri (string-append "https://www.latofonts.com/download/Lato2OFL.zip"))
(sha256
(base32
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 05/19] gnu: font-linuxlibertine: Install all license files.
(address . 61253@debbugs.gnu.org)
eac4660db0438d0fca1ae0997f830de7d280ead1.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-linuxlibertine)[arguments]
<#:license-file-regexp>: Add.
---
gnu/packages/fonts.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 5e6e25db43..44038fc0eb 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -425,7 +425,8 @@ (define-public font-linuxlibertine
"0x7cz6hvhpil1rh03rax9zsfzm54bh7r4bbrq8rz673gl9h47v0v"))))
(build-system font-build-system)
(arguments
- `(#:phases
+ `(#:license-file-regexp "^(GPL|LICENCE|OFL-1\\.1)\\.txt$"
+ #:phases
(modify-phases %standard-phases
(add-before 'install 'build
(lambda _
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 12/19] gnu: font-go: Install license files.
(address . 61253@debbugs.gnu.org)
9bfd9fc244ba3ad5e7b413aa58aa23d04714a52c.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-go)[arguments]<#:license-file-regexp>: Add.
<#:phases>: Add "enter-license-directory" phase.
---
gnu/packages/fonts.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 29c26fa6b3..0d373c7393 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1787,12 +1787,16 @@ (define-public font-go
"1aq6mnjayks55gd9ahavk6jfydlq5lm4xm0xk4pd5sqa74p5p74d"))))
(build-system font-build-system)
(arguments
- `(#:phases
+ `(#:license-file-regexp "^(LICENSE|PATENTS)$"
+ #:phases
(modify-phases %standard-phases
(add-before 'install 'chdir
(lambda _
(chdir "font/gofont/ttfs")
- #t)))))
+ #t))
+ (add-before 'install-license-files 'enter-license-directory
+ (lambda _
+ (chdir "../../.."))))))
(home-page "https://blog.golang.org/go-fonts")
(synopsis "The Go font family")
(description
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 08/19] gnu: font-fira-sans: Install license file.
(address . 61253@debbugs.gnu.org)
4acc7f7bc10388be5b3c3a158a2a741d09865a70.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-fira-sans)[arguments]<#:phases>: Add
"enter-license-directory" phase.
---
gnu/packages/fonts.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 4700bbcb43..f5d26c7b19 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1301,7 +1301,10 @@ (define variant
(match (find-files "." (format #f "^Fira_~a_[0-9]" variant)
#:directories? #t)
((dir)
- (chdir dir))))))))
+ (chdir dir)))))
+ (add-before 'install-license-files 'enter-license-directory
+ (lambda _
+ (chdir "../OFL_Licence"))))))
;; While the repository has moved,
;; this specimen still works well as the home-page:
(home-page "https://mozilla.github.io/Fira/")
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 19/19] gnu: font-charter: Install license file.
(address . 61253@debbugs.gnu.org)
3866ecc4c83bffa98d90a6df3baa1ad53f048a5e.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-charter)[arguments]<#:license-file-regexp>:
Add.
---
gnu/packages/fonts.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index b4c6729c2c..e877b277ea 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -2722,7 +2722,8 @@ (define-public font-charter
(outputs '("out" "woff2"))
(build-system font-build-system)
(arguments
- `(#:phases
+ `(#:license-file-regexp "^Charter license.txt$"
+ #:phases
(modify-phases %standard-phases
(add-after 'install 'install-woff2
(lambda* (#:key outputs #:allow-other-keys)
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 14/19] gnu: font-culmus: Install all license files.
(address . 61253@debbugs.gnu.org)
7b27686fe1328ac2d659d00adca82f7a70903ee9.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-culmus)[arguments]<#:license-file-regexp>: Add.
---
gnu/packages/fonts.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 83f658743c..3e9bd193fc 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1921,7 +1921,8 @@ (define-public font-culmus
"02akysgsqhi15cck54xcacm16q5raf4l7shgb8fnj7xr3c1pbfyp"))))
(build-system font-build-system)
(arguments
- `(#:phases
+ `(#:license-file-regexp "^GNU-GPL|LICENSE"
+ #:phases
(modify-phases %standard-phases
(add-before 'install 'build
(lambda _
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 07/19] gnu: font-wqy-microhei: Install all license files.
(address . 61253@debbugs.gnu.org)
54ff170a60ad0b1680457fadb645dc08508bcb01.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-wqy-microhei)[arguments]: Add with
#:license-file-regexp.
---
gnu/packages/fonts.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index bdc673edfd..4700bbcb43 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -681,6 +681,8 @@ (define-public font-wqy-microhei
(base32
"0gi1yxqph8xx869ichpzzxvx6y50wda5hi77lrpacdma4f0aq0i8"))))
(build-system font-build-system)
+ (arguments
+ '(#:license-file-regexp "^(LICENSE.*|README)\\.txt$"))
(home-page "http://wenq.org/wqy2/")
(synopsis "CJK font")
(description
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 10/19] gnu: font-comic-neue: Install license file.
(address . 61253@debbugs.gnu.org)
878b9f51357dd0862d1de3b71acbc736d093248c.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-comic-neue)[arguments]<#:phases>: Add
"enter-license-directory" phase.
---
gnu/packages/fonts.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 469a80e599..ecbce39e68 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1524,7 +1524,10 @@ (define-public font-comic-neue
</prefer>
</alias>
</fontconfig>\n"))))
- #t)))))
+ #t))
+ (add-before 'install-license-files 'enter-license-directory
+ (lambda _
+ (chdir (string-append "comic-neue-" ,version)))))))
(home-page "http://www.comicneue.com/")
(synopsis "Font that fixes the shortcomings of Comic Sans")
(description
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 06/19] gnu: font-wqy-zenhei: Install all license files.
(address . 61253@debbugs.gnu.org)
4a9cebd4c0fb292a41298dc59f9480dfdea0ec07.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-wqy-zenhei)[arguments]: Add with
#:license-file-regexp.
---
gnu/packages/fonts.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 44038fc0eb..bdc673edfd 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -652,6 +652,8 @@ (define-public font-wqy-zenhei
(base32
"1mkmxq8g2hjcglb3zajfqj20r4r88l78ymsp2xyl5yav8w3f7dz4"))))
(build-system font-build-system)
+ (arguments
+ '(#:license-file-regexp "^(COPYING|README)$"))
(home-page "http://wenq.org/wqy2/")
(synopsis "CJK font")
(description
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 09/19] gnu: font-fira-go: Install license file.
(address . 61253@debbugs.gnu.org)
e8ab5c7cfbc33e9622d35aa44c56d5a19f0712f2.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-fira-go)[arguments]: Add with
"enter-license-directory" phase.
---
gnu/packages/fonts.scm | 7 +++++++
1 file changed, 7 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index f5d26c7b19..469a80e599 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1344,6 +1344,13 @@ (define-public font-fira-go
(base32
"10rcfg1fijv00yxv5n9l3lm0axhafa1irkg42zpmasd70flgg655"))))
(build-system font-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install-license-files 'enter-license-directory
+ (lambda _
+ (chdir "OFL_Licence"))))))
(home-page "https://github.com/bBoxType/FiraGO")
(synopsis "Multilingual extension of the Fira Sans font family")
(description "FiraGO is a multilingual extension of the Fira Sans font
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 17/19] gnu: font-jetbrains-mono: Remove obsolete phase.
(address . 61253@debbugs.gnu.org)
676344aaa71ca413fea6b3b3bf9df5214876de13.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-jetbrains-mono)[arguments]<#:phases>: Remove
obsolete "install-license-files" phase.
---
gnu/packages/fonts.scm | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index d15ac08def..f2c602e70f 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -2248,13 +2248,7 @@ (define-public font-jetbrains-mono
;; Find the license file outside of the default subdirectory.
(lambda _
(chdir "..")
- #t))
- (replace 'install-license-files
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (doc (string-append out "/share/doc/" ,name "-" ,version)))
- (install-file "OFL.txt" doc)
- #t))))))
+ #t)))))
(home-page "https://www.jetbrains.com/lp/mono/")
(synopsis "Mono typeface for developers")
(description
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 15/19] gnu: font-dseg: Simplify "install" phase.
(address . 61253@debbugs.gnu.org)
037c0b4bd82e3590131d4f344fb75161719ea694.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-dseg)[source]: Use url-fetch.
[arguments]<#:phases>: Remove "with-directory-excursion" from "install" phase.
---
gnu/packages/fonts.scm | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 3e9bd193fc..335ce9885f 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -2176,7 +2176,7 @@ (define-public font-dseg
(version "0.46")
(source
(origin
- (method url-fetch/zipbomb)
+ (method url-fetch)
(uri
(string-append "https://github.com/keshikan/DSEG/"
"releases/download/v" version
@@ -2194,13 +2194,9 @@ (define-public font-dseg
(let* ((out (assoc-ref outputs "out"))
(font-dir (string-append out "/share/fonts"))
(truetype-dir (string-append font-dir "/truetype")))
- (with-directory-excursion
- (string-append "fonts-DSEG_v"
- (apply string-append (string-split ,version
- #\.)))
- (for-each (lambda (f) (install-file f truetype-dir))
- (find-files "." "\\.ttf$"))
- #t)))))))
+ (for-each (lambda (f) (install-file f truetype-dir))
+ (find-files "." "\\.ttf$"))
+ #t))))))
(home-page "https://www.keshikan.net/fonts-e.html")
(synopsis "DSEG: 7-segment and 14-segment fonts")
(description
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 11/19] gnu: font-space-grotesk: Remove obsolete phase.
(address . 61253@debbugs.gnu.org)
3190e26dfcea033de0b359b226f6822390d7c108.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-space-grotesk)[arguments]: Remove along with
obsolete "install-license-files" phase.
---
gnu/packages/fonts.scm | 9 ---------
1 file changed, 9 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index ecbce39e68..29c26fa6b3 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1757,15 +1757,6 @@ (define-public font-space-grotesk
(base32 "1aiivn0rl7ydiyqvsr0fa2hx82h3br3x48w3100fcly23n0fdcby"))))
(build-system font-build-system)
;; TODO: Package fontmake and gftools and build from source.
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'install-license-files
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (doc (string-append out "/share/doc/" ,name "-" ,version)))
- (install-file "OFL.txt" doc)
- #t))))))
(home-page "https://floriankarsten.github.io/space-grotesk/")
(synopsis "Proportional variant of the fixed-width Space Mono family")
(description
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 18/19] gnu: font-fontna-yasashisa-antique: Install license file.
(address . 61253@debbugs.gnu.org)
d8bd81d444beafebc85d747b82585adb0d771204.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-fontna-yasashisa-antique)[arguments]<#:phases>:
Add "enter-license-directory" phase.
---
gnu/packages/fonts.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index f2c602e70f..b4c6729c2c 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -2487,7 +2487,10 @@ (define-public font-fontna-yasashisa-antique
;; which makes rename-file fail. Instead, use shell globbing to
;; select and rename the directory.
(invoke "sh" "-c" "mv TrueType* TrueType")
- #t)))))
+ #t))
+ (add-before 'install-license-files 'enter-license-directory
+ (lambda _
+ (chdir "IPAexfont00201"))))))
(native-inputs
`(("bash" ,bash-minimal)
("coreutils" ,coreutils)))
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 13/19] gnu: font-dosis: Remove extraneous files; install license file.
(address . 61253@debbugs.gnu.org)
1a86f1535f50f82eff678fda8d677295d0cfadd9.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-dosis)[source]: Use url-fetch.
---
gnu/packages/fonts.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 0d373c7393..83f658743c 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -1887,7 +1887,7 @@ (define-public font-dosis
(version "1.7")
(source
(origin
- (method url-fetch/zipbomb)
+ (method url-fetch)
(uri (string-append "https://web.archive.org/web/20180228233737/"
"https://www.impallari.com/media/releases/dosis-"
"v" version ".zip"))
--
2.39.1
S
S
Simon South wrote on 3 Feb 2023 13:43
[PATCH core-updates 16/19] gnu: font-dseg: Install license file.
(address . 61253@debbugs.gnu.org)
0e5b5baed731bd20a8eb1a4ea8a1fc7964d898c1.1675425307.git.simon@simonsouth.net
* gnu/packages/fonts.scm (font-dseg)[arguments]<#:license-file-regexp>: Add.
---
gnu/packages/fonts.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 335ce9885f..d15ac08def 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -2187,7 +2187,8 @@ (define-public font-dseg
(base32 "13133kpa1ndsji9yq5ppkds5yq2y094qvrv2f83ah74p40sz9hm6"))))
(build-system font-build-system)
(arguments
- `(#:phases
+ `(#:license-file-regexp "^DSEG-LICENSE.txt$"
+ #:phases
(modify-phases %standard-phases
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
--
2.39.1
M
M
Maxim Cournoyer wrote on 22 Jan 05:37 +0100
Re: [bug#61253] [PATCH core-updates 00/19] Add license files missing from font packages
(name . Simon South)(address . simon@simonsouth.net)(address . 61253-done@debbugs.gnu.org)
87zfwy3rvj.fsf@gmail.com
Hi Simon,

Simon South <simon@simonsouth.net> writes:

Toggle quote (21 lines)
> This patch series adds license files missing from 29 font packages[0] that use
> font-build-system. It also modifies font-build-system to expose the
> #:license-file-regexp argument it inherits and provide a custom, more specific
> default value for it, both of which should help future font-package authors
> ensure license files are installed correctly.
>
> For testing, note you may need to first apply the patches attached to issues
> 61039, 61119 and 61120[1] to avoid unrelated build failures. In preparing
> this current set of patches I considered a license file "missing" if it is the
> only relevant file in the source package, is referred to by another license
> file or qualifies the license in some way (for instance, a README file
> specifying an exception to the GPL).
>
> In cases where I've changed a package source's fetch method (such as from
> "url-fetch/zipbomb" to "url-fetch") this was done to ensure the correct
> working directory is selected when the install-license-files build phase runs,
> and is related to the unpack phase's magical behaviour of choosing an
> arbitrary subdirectory to enter before it completes[2].
>
> I've tested these changes on x86-64 and AArch64 and everything seems fine.

Thanks for this comprehensive series! I've installed it to
core-updates.

--
Thanks,
Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 61253@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 61253
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch