[PATCH core-updates 0/2] font-build-system: Install web fonts

  • Done
  • quality assurance status badge
Details
3 participants
  • Arun Isaac
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Arun Isaac
Severity
normal
A
A
Arun Isaac wrote on 20 Mar 2022 12:00
(address . guix-patches@gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
20220320110043.18099-1-arunisaac@systemreboot.net
Hi,

Currently, we don't install the woff and woff2 web fonts in our font build
system. The first patch fixes that. The second patches removes the return of
#t from phases.

Regards,
Arun

Arun Isaac (2):
build: font-build-system: Install web fonts.
build: font-build-system: Do not return #t from phases.

guix/build/font-build-system.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

--
2.34.0
A
A
Arun Isaac wrote on 20 Mar 2022 12:02
[PATCH core-updates 1/2] build: font-build-system: Install web fonts.
(address . 54471@debbugs.gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
20220320110243.18197-1-arunisaac@systemreboot.net
* guix/build/font-build-system.scm (install): Install woff and woff2 web font
files.
---
guix/build/font-build-system.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (22 lines)
diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm
index 6726595fe1..9bd9524a7d 100644
--- a/guix/build/font-build-system.scm
+++ b/guix/build/font-build-system.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2022 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
;;;
;;; This file is part of GNU Guix.
@@ -54,6 +54,8 @@ (define* (install #:key outputs #:allow-other-keys)
(find-files source "\\.(ttf|ttc)$"))
(for-each (cut install-file <> (string-append fonts "/opentype"))
(find-files source "\\.(otf|otc)$"))
+ (for-each (cut install-file <> (string-append fonts "/web"))
+ (find-files source "\\.(woff|woff2)$"))
#t))
(define %standard-phases
--
2.34.0
A
A
Arun Isaac wrote on 20 Mar 2022 12:02
[PATCH core-updates 2/2] build: font-build-system: Do not return #t from phases.
(address . 54471@debbugs.gnu.org)(name . Arun Isaac)(address . arunisaac@systemreboot.net)
20220320110243.18197-2-arunisaac@systemreboot.net
* guix/build/font-build-system.scm (unpack, install): Do not return #t from
phases.
---
guix/build/font-build-system.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

Toggle diff (26 lines)
diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm
index 9bd9524a7d..e4784bc17d 100644
--- a/guix/build/font-build-system.scm
+++ b/guix/build/font-build-system.scm
@@ -41,8 +41,7 @@ (define* (unpack #:key source #:allow-other-keys)
(begin
(mkdir "source")
(chdir "source")
- (copy-file source (strip-store-file-name source))
- #t)
+ (copy-file source (strip-store-file-name source)))
(gnu:unpack #:source source)))
(define* (install #:key outputs #:allow-other-keys)
@@ -55,8 +54,7 @@ (define* (install #:key outputs #:allow-other-keys)
(for-each (cut install-file <> (string-append fonts "/opentype"))
(find-files source "\\.(otf|otc)$"))
(for-each (cut install-file <> (string-append fonts "/web"))
- (find-files source "\\.(woff|woff2)$"))
- #t))
+ (find-files source "\\.(woff|woff2)$"))))
(define %standard-phases
(modify-phases gnu:%standard-phases
--
2.34.0
M
M
Maxime Devos wrote on 20 Mar 2022 12:27
Re: [bug#54471] [PATCH core-updates 0/2] font-build-system: Install web fonts
b3233aba35e714a265b957cf729edf49f595e0fe.camel@telenet.be
Arun Isaac schreef op zo 20-03-2022 om 16:30 [+0530]:
Toggle quote (4 lines)
> Currently, we don't install the woff and woff2 web fonts in our font build
> system. The first patch fixes that. The second patches removes the return of
> #t from phases.

font-build-system currently puts "tar", "gzip", "bzip2", "unzip" (*),
and "xz" in 'host-inputs' (the build system equivalent of 'inputs')
instead of 'build-inputs' (the build system equivalent of 'native-
inputs'), which is wrong when cross-compiling.

For font-build-system, this does not truly matter, since #:target is
ignored for font-build-system. However, to avoid accidentally teaching
people to accidentally mess up the inputs/native-inputs difference and
instead give the right example, WDYT of moving "tar" and friends to
'build-inputs'?

It's technically a separate thing from your patches, but I think it
would be nice to bundle multiple core-updates changes together (in
separate patches, but in a same ‘push’).

(*) The location of 'source' does not matter since sources are
(currently) assumed to be architecture-independent in Guix.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYjcPvxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sqyAPwJA2JjThzsF/Uq2eDOBLjGczwC
ZXoI0sq5qe+ANRJjygEAqQDqIgj7vY7KSwf++KiIQD3XtdJo3QjYek5HYF4jmAE=
=BVQx
-----END PGP SIGNATURE-----


A
A
Arun Isaac wrote on 21 Mar 2022 13:17
871qyvsdoa.fsf@systemreboot.net
Hi Maxime,

Sure, sounds good! Patches follow in subsequent emails.

Regards,
Arun
A
A
Arun Isaac wrote on 21 Mar 2022 13:17
[PATCH core-updates v2 2/3] build: font-build-system: Do not return #t from phases.
20220321121722.12575-2-arunisaac@systemreboot.net
* guix/build/font-build-system.scm (unpack, install): Do not return #t from
phases.
---
guix/build/font-build-system.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

Toggle diff (26 lines)
diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm
index 9bd9524a7d..e4784bc17d 100644
--- a/guix/build/font-build-system.scm
+++ b/guix/build/font-build-system.scm
@@ -41,8 +41,7 @@ (define* (unpack #:key source #:allow-other-keys)
(begin
(mkdir "source")
(chdir "source")
- (copy-file source (strip-store-file-name source))
- #t)
+ (copy-file source (strip-store-file-name source)))
(gnu:unpack #:source source)))
(define* (install #:key outputs #:allow-other-keys)
@@ -55,8 +54,7 @@ (define* (install #:key outputs #:allow-other-keys)
(for-each (cut install-file <> (string-append fonts "/opentype"))
(find-files source "\\.(otf|otc)$"))
(for-each (cut install-file <> (string-append fonts "/web"))
- (find-files source "\\.(woff|woff2)$"))
- #t))
+ (find-files source "\\.(woff|woff2)$"))))
(define %standard-phases
(modify-phases gnu:%standard-phases
--
2.34.0
A
A
Arun Isaac wrote on 21 Mar 2022 13:17
[PATCH core-updates v2 1/3] build: font-build-system: Install web fonts.
20220321121722.12575-1-arunisaac@systemreboot.net
* guix/build/font-build-system.scm (install): Install woff and woff2 web font
files.
---
guix/build/font-build-system.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (22 lines)
diff --git a/guix/build/font-build-system.scm b/guix/build/font-build-system.scm
index 6726595fe1..9bd9524a7d 100644
--- a/guix/build/font-build-system.scm
+++ b/guix/build/font-build-system.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2022 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
;;;
;;; This file is part of GNU Guix.
@@ -54,6 +54,8 @@ (define* (install #:key outputs #:allow-other-keys)
(find-files source "\\.(ttf|ttc)$"))
(for-each (cut install-file <> (string-append fonts "/opentype"))
(find-files source "\\.(otf|otc)$"))
+ (for-each (cut install-file <> (string-append fonts "/web"))
+ (find-files source "\\.(woff|woff2)$"))
#t))
(define %standard-phases
--
2.34.0
A
A
Arun Isaac wrote on 21 Mar 2022 13:17
[PATCH core-updates v2 3/3] build-system: font: Move unpack utilities to build-inputs.
20220321121722.12575-3-arunisaac@systemreboot.net
* guix/build-system/font.scm (lower): Move tar, gzip, bzip2, unzip and xz from
host-inputs to build-inputs.
---
guix/build-system/font.scm | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

Toggle diff (48 lines)
diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm
index 74dc80b5db..c43fb9a542 100644
--- a/guix/build-system/font.scm
+++ b/guix/build-system/font.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2022 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -54,20 +54,20 @@ (define private-keywords
(bag
(name name)
(system system)
- (host-inputs `(,@(if source
- `(("source" ,source))
- '())
- ,@inputs
- ,(list "tar" (module-ref (resolve-interface '(gnu packages base)) 'tar))
- ,@(let ((compression (resolve-interface '(gnu packages compression))))
- (map (match-lambda
- ((name package)
- (list name (module-ref compression package))))
- `(("gzip" gzip)
- ("bzip2" bzip2)
- ("unzip" unzip)
- ("xz" xz))))))
- (build-inputs native-inputs)
+ (host-inputs inputs)
+ (build-inputs `(,@(if source
+ `(("source" ,source))
+ '())
+ ,@native-inputs
+ ,(list "tar" (module-ref (resolve-interface '(gnu packages base)) 'tar))
+ ,@(let ((compression (resolve-interface '(gnu packages compression))))
+ (map (match-lambda
+ ((name package)
+ (list name (module-ref compression package))))
+ `(("gzip" gzip)
+ ("bzip2" bzip2)
+ ("unzip" unzip)
+ ("xz" xz))))))
(outputs outputs)
(build font-build)
(arguments (strip-keyword-arguments private-keywords arguments))))
--
2.34.0
A
A
Arun Isaac wrote on 9 Apr 2022 17:56
87lewetfn0.fsf@systemreboot.net
Hi Maxime,

May I push the v2 patchset to core-updates? Is it satisfactory?

Thanks!
Arun
M
M
Maxime Devos wrote on 9 Apr 2022 18:03
e0916709e4af054973eb64c20206a3521ca87a77.camel@telenet.be
Arun Isaac schreef op za 09-04-2022 om 21:26 [+0530]:
Toggle quote (4 lines)
> Hi Maxime,
>
> May I push the v2 patchset to core-updates? Is it satisfactory?

AFAICT, yes, and other people have had some time to chime in.

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlGuZBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gAsAP4gQTSsKsdtR0ZxmHePuqYIiL3d
9z27yx5qCcZoOJTtvAEA6KP9lzUB1yUbRB69km1+qnT9pVLqeILDgkkEhK6kwwE=
=0T+I
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 9 Apr 2022 18:04
8c5608245dce5f7fa3ff956b61123454bb46214e.camel@telenet.be
Arun Isaac schreef op za 09-04-2022 om 21:26 [+0530]:
Toggle quote (2 lines)
> May I push the v2 patchset to core-updates? Is it satisfactory?

(addition to previous e-mail)

though there seems to be a preference to batching multiple core-updates
changes together, to reduce build farm activity.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlGuoRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gkEAP9BJ+nS1/wZhLie6KR+F5qNT7Ex
QXC2fbzehcfWPj6ZPAD/f0JvjAv8PNquYS3ZZP0k2QX5JEQYlcqUXHKqda4DIwQ=
=RZHP
-----END PGP SIGNATURE-----


A
A
Arun Isaac wrote on 9 Apr 2022 18:54
87ilritcxl.fsf@systemreboot.net
Toggle quote (3 lines)
> though there seems to be a preference to batching multiple core-updates
> changes together, to reduce build farm activity.

Ah, ok. So, I'll wait until a core-updates batch starts up again.

Thanks!
L
L
Ludovic Courtès wrote on 15 May 2022 20:06
Re: bug#54471: [PATCH core-updates 0/2] font-build-system: Install web fonts
(name . Arun Isaac)(address . arunisaac@systemreboot.net)
87bkvyeklj.fsf_-_@gnu.org
Hi Arun,

I think it can go to ‘core-updates’, yes.

Actually, how many package rebuilds does it trigger? Does that affect,
say:

./pre-inst-env guix build libreoffice -n

?

If not, you might as well push it to ‘master’. Otherwise, it might be
that ‘staging’ would be a good fit. You “just” need to estimate the
amount of rebuild.

Thanks,
Ludo’.
A
A
Arun Isaac wrote on 16 May 2022 11:44
(name . Ludovic Courtès)(address . ludo@gnu.org)
87czgd6cct.fsf@systemreboot.net
Hi Ludo,

I've pushed these patches to core-updates.

Toggle quote (7 lines)
> Actually, how many package rebuilds does it trigger? Does that affect,
> say:
>
> ./pre-inst-env guix build libreoffice -n
>
> ?

font-dejavu is rebuilt by these changes, and a rebuild of font-dejavu
triggers a rebuild of the world (15596 packages!). So, definitely not
the master branch!

Regards,
Arun
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 54471
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