shytikov / pragmasevka

Pragmata Pro doppelgänger made of Iosevka SS08
SIL Open Font License 1.1
174 stars 9 forks source link

Can't build locally on a Linux box #3

Closed davidsierradz closed 1 year ago

davidsierradz commented 1 year ago

Hi! I'm trying to build the font locally, but I'm getting the following errors on a Linux box:

[ACTION] Create TTF 'dist/pragmasevka/ttf-unhinted/pragmasevka-semibold.ttf'
[ACTION] Create TTF 'dist/pragmasevka/ttf-unhinted/pragmasevka-semibolditalic.ttf'
[ACTION] Create TTF 'dist/pragmasevka/ttf-unhinted/pragmasevka-bold.ttf'
[ACTION] Create TTF 'dist/pragmasevka/ttf-unhinted/pragmasevka-bolditalic.ttf'
[ACTION] Create TTF 'dist/pragmasevka/ttf-unhinted/pragmasevka-black.ttf'
[ACTION] Create TTF 'dist/pragmasevka/ttf-unhinted/pragmasevka-blackitalic.ttf'
[ACTION] Create TTF 'dist/pragmasevka/ttf-unhinted/pragmasevka-regular.ttf'
[ACTION] Create TTF 'dist/pragmasevka/ttf-unhinted/pragmasevka-italic.ttf'
[ACTION] Hint TTF 'dist/pragmasevka/ttf/pragmasevka-italic.ttf' <- 'dist/pragmasevka/ttf-unhinted/pragmasevka-italic.ttf'
[ACTION] Hint TTF 'dist/pragmasevka/ttf/pragmasevka-bold.ttf' <- 'dist/pragmasevka/ttf-unhinted/pragmasevka-bold.ttf'
[ACTION] Hint TTF 'dist/pragmasevka/ttf/pragmasevka-regular.ttf' <- 'dist/pragmasevka/ttf-unhinted/pragmasevka-regular.ttf'
[ACTION] Hint TTF 'dist/pragmasevka/ttf/pragmasevka-black.ttf' <- 'dist/pragmasevka/ttf-unhinted/pragmasevka-black.ttf'
[ACTION] Hint TTF 'dist/pragmasevka/ttf/pragmasevka-semibold.ttf' <- 'dist/pragmasevka/ttf-unhinted/pragmasevka-semibold.ttf'
[ACTION] Hint TTF 'dist/pragmasevka/ttf/pragmasevka-blackitalic.ttf' <- 'dist/pragmasevka/ttf-unhinted/pragmasevka-blackitalic.ttf'
[ACTION] Hint TTF 'dist/pragmasevka/ttf/pragmasevka-semibolditalic.ttf' <- 'dist/pragmasevka/ttf-unhinted/pragmasevka-semibolditalic.ttf'
[ACTION] Hint TTF 'dist/pragmasevka/ttf/pragmasevka-bolditalic.ttf' <- 'dist/pragmasevka/ttf-unhinted/pragmasevka-bolditalic.ttf'
docker run --rm \
        -v /home/neuromante/code/general/pragmasevka:/scripter \
        fontforge/scripter \
        python /scripter/punctuation.py ./dist/ttf/pragmasevka
Internal Error: Your version of iconv does not support the "Mac Roman" encoding.
If this causes problems, reconfigure --without-iconv.
The following table(s) in the font have been ignored by FontForge
  Ignoring 'DSIG' digital signature table
The following table(s) in the font have been ignored by FontForge
  Ignoring 'DSIG' digital signature table
The following table(s) in the font have been ignored by FontForge
  Ignoring 'DSIG' digital signature table
The following table(s) in the font have been ignored by FontForge
  Ignoring 'DSIG' digital signature table
The following table(s) in the font have been ignored by FontForge
  Ignoring 'DSIG' digital signature table
The following table(s) in the font have been ignored by FontForge
  Ignoring 'DSIG' digital signature table
The following table(s) in the font have been ignored by FontForge
  Ignoring 'DSIG' digital signature table
The following table(s) in the font have been ignored by FontForge
  Ignoring 'DSIG' digital signature table
rm -rf /home/neuromante/code/general/pragmasevka/dist/ttf/*semibold*.ttf
rm: cannot remove '/home/neuromante/code/general/pragmasevka/dist/ttf/pragmasevka-semibolditalic.ttf': Permission denied
rm: cannot remove '/home/neuromante/code/general/pragmasevka/dist/ttf/pragmasevka-semibold.ttf': Permission denied
make[1]: *** [Makefile:23: ttf] Error 1
make[1]: Leaving directory '/home/neuromante/code/general/pragmasevka'
make: *** [Makefile:16: font] Error 2

Thanks! Nice font!

shytikov commented 1 year ago

Hej @davidsierradz!

I have simplified the build step and this issue should not happen again, please check v1.6.2

Please comment if that didn't help.

davidsierradz commented 1 year ago

Hi, thanks for checking this out! Unfortunately the files keep being created as root (on the host) so the rm commands don't work.

According to permissions - Docker mount volumes as root - Stack Overflow, because the Docker daemon is running as root on my machine, all filesystem interactions are done with root as well. Are you running a root-less docker setup (or podman)?

He recommends using named volumes instead of mount points, to abstract all filesystem behavior (permissions, OS-level differences, etc.)

I got the following working https://github.com/davidsierradz/pragmasevka/tree/named-volumes, with some additional commands because:

[feature] Allow mounting sub-directories of named volumes · Issue #32582 · moby/moby

How to copy files into a named volume without an attached container? · Issue #25245 · moby/moby

I think maybe this is too much complexity for not a lot of improvement. At the end, I can simple make a sudo make font and sudo chowm ... without much problem. It was fun learning more about Docker nonetheless

shytikov commented 1 year ago

@davidsierradz oh wow!

Would you mind if I copy that? Or maybe I may ask you to create a PR?

davidsierradz commented 1 year ago

Yeah! Feel free to copy/improve the code.

shytikov commented 1 year ago

@davidsierradz I have tried your approach and I hope it works now as it should!

davidsierradz commented 1 year ago

Thanks, it does!