blue-build / modules

BlueBuild standard modules used for building your Atomic Images
Apache License 2.0
22 stars 26 forks source link

Google Fonts still not working #183

Closed m0ngr31 closed 3 months ago

m0ngr31 commented 3 months ago

After the update to fix the Google Font URL change, I'm still having issues with downloading fonts:

#39 [stage-5 10/15] RUN   --mount=type=tmpfs,target=/var   --mount=type=bind,from=stage-config,src=/config,dst=/tmp/config,rw   --mount=type=bind,from=stage-modules,src=/modules,dst=/tmp/modules,rw   --mount=type=bind,from=ghcr.io/blue-build/cli:exports,src=/exports.sh,dst=/tmp/exports.sh   --mount=type=cache,dst=/var/cache/rpm-ostree,id=rpm-ostree-cache-cabos-39,sharing=locked   echo "========== Start Fonts module =========="   && chmod +x /tmp/modules/fonts/fonts.sh   && source /tmp/exports.sh   && /tmp/modules/fonts/fonts.sh '{"type":"fonts","fonts":{"google-fonts":["Fira Code","Open Sans","JetBrains Mono","Roboto"]}}'   && echo "========== End Fonts module =========="   && ostree container commit
#39 0.293 ========== Start Fonts module ==========
#39 0.307 Installation of google-fonts started
#39 0.664 Downloading static/FiraCode-Light.ttf from https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_GNsFVfxN87gsj0.ttf
#39 0.669   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#39 0.669                                  Dload  Upload   Total   Spent    Left  Speed
#39 0.669 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  2  184k    2  5503    0     0  12315      0  0:00:15 --:--:--  0:00:15 12310
100  184k  100  184k    0     0   389k      0 --:--:-- --:--:-- --:--:--  388k
#39 1.185 Downloading static/FiraCode-Regular.ttf from https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVfxN87gsj0.ttf
#39 1.190   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#39 1.190                                  Dload  Upload   Total   Spent    Left  Speed
#39 1.191 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  184k  100  184k    0     0  1169k      0 --:--:-- --:--:-- --:--:-- 1172k
#39 1.390 Downloading static/FiraCode-Medium.ttf from https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_A9sFVfxN87gsj0.ttf
#39 1.395   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#39 1.395                                  Dload  Upload   Total   Spent    Left  Speed
#39 1.395 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  184k  100  184k    0     0   599k      0 --:--:-- --:--:-- --:--:--  601k
#39 1.746 Downloading static/FiraCode-SemiBold.ttf from https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_ONrFVfxN87gsj0.ttf
#39 1.751   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#39 1.751                                  Dload  Upload   Total   Spent    Left  Speed
#39 1.751 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  2  184k    2  5503    0     0  17941      0  0:00:10 --:--:--  0:00:10 17925
100  184k  100  184k    0     0   553k      0 --:--:-- --:--:-- --:--:--  552k
#39 2.128 Downloading static/FiraCode-Bold.ttf from https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_NprFVfxN87gsj0.ttf
#39 2.133   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#39 2.134                                  Dload  Upload   Total   Spent    Left  Speed
#39 2.134 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  184k  100  184k    0     0  1222k      0 --:--:-- --:--:-- --:--:-- 1231k
#39 2.328 Downloading FiraCode-VariableFont_wght.ttf from https://fonts.gstatic.com/s/firacode/v22/uU9NCBsR6Z2vfE9aq3bR2t6CilKOdQ.ttf
#39 2.333   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#39 2.333                                  Dload  Upload   Total   Spent    Left  Speed
#39 2.333 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  253k  100  253k    0     0   548k      0 --:--:-- --:--:-- --:--:--  549k
#39 3.111 jq: error (at <stdin>:2): Cannot iterate over null (null)
#39 3.404 jq: error (at <stdin>:2): Cannot iterate over null (null)
#39 3.708 jq: error (at <stdin>:2): Cannot iterate over null (null)
#39 4.037 jq: error (at <stdin>:2): Cannot iterate over null (null)
#39 5.338 ========== End Fonts module ==========
xynydev commented 3 months ago

Yeah, that's not a problem with GFonts downloads, there's some parsing error with jq instead. I'll see what I can do to mitigate this later today.

m0ngr31 commented 3 months ago

I think I figured out the issue. I was able to get the script to work properly locally by trimming whitespace: #184

xynydev commented 3 months ago

Thanks! Merged! Let us know if there are any other issues.