You are not logged in.
Hello! I'm reviewing the PKGBUILD of https://aur.archlinux.org/pkgbase/nerd- … o-extended package for updating it, but I get error in the build function. It is not clear why it is failing, and when I build in clean chroot environment, I note that in srcdir it creates "font-patcher-3.0.2" as symlink instead of as executable. I'm trying to update the PKGBUILD as the following:
# Maintainer: valentino
pkgname=nerd-fonts-noto-sans-mono-extended
pkgver=3.0.2
pkgrel=1
pkgdesc="Noto Sans Mono including Condensed variants. Sourced directly from Google, patched with the Nerd Fonts Patcher"
arch=('any')
url='https://www.google.com/get/noto/'
license=('custom')
makedepends=('git' 'python' 'fontforge' 'subversion' 'parallel' 'python-argparse')
conflicts=('nerd-fonts-noto' 'nerd-fonts-noto-sans-mono')
provides=('nerd-fonts-noto-sans-mono-extended')
source=("svn+https://github.com/googlefonts/noto-fonts/trunk/hinted/ttf/NotoSansMono"
"font-patcher-$pkgver::https://github.com/ryanoasis/nerd-fonts/releases/download/v$pkgver/FontPatcher.zip" "svn+https://github.com/ryanoasis/nerd-fonts/tags/v$pkgver/src/glyphs")
sha256sums=('SKIP'
'22dba386e206cc436071b0d2a166fc91ebc86cf72e3dfe233d346831cffb8873'
'SKIP')
build() {
_patcher="font-patcher-$pkgver-glyphdir"
# patch fonts
mkdir -p "$srcdir/patched"
printf "%b" "\e[1;33m==> WARNING: \e[0mNow patching all fonts. This will take very long...\n"
# patch fonts quiet with complete single-width glyphs
parallel -j$(nproc) python "$srcdir/$_patcher" --glyphdir "$srcdir/glyphs/" -q -c -s {} -out "$srcdir/patched" &> /dev/null ::: "$srcdir/NotoSansMono"/*.ttf
}
package() {
# install fonts
install -d "$pkgdir/usr/share/fonts/NotoSansMono"
install -m644 "patched"/*.ttf "$pkgdir/usr/share/fonts/NotoSansMono/"
}
With respect to the current PKGBUILD, I just removed the patch file (because I think it is useless on the new version) and bumped the version to the latest one (3.0.2). I also tried to define "_patcher=font-patcher-$pkgver".
Maybe, since in clean chroot font-patcher is extracted as broken symlink (despite the real zip contains an executable), could it be the issue?
Last edited by D3vil0p3r (2023-06-11 13:18:41)
Offline
... but I get error in the build function.
You might want to say what this error is.
when I build in clean chroot environment, I note that in srcdir it creates "font-patcher-3.0.2" as symlink instead of as executable
Why would it be an executable? It should be a symlink to the source for that entry in the source array. Apparently this gets extracted to a python script called font-patcher not font-patcher-3.0.2 which I gather is the source of at least one of your errors: you're trying to execute a zip file rather than the extracted content. Also note your checksum is wrong.
This is working (so far):
# Maintainer: valentino
pkgname=nerd-fonts-noto-sans-mono-extended
pkgver=3.0.2
pkgrel=1
pkgdesc="Noto Sans Mono including Condensed variants. Sourced directly from Google, patched with the Nerd Fonts Patcher"
arch=('any')
url='https://www.google.com/get/noto/'
license=('custom')
makedepends=('git' 'python' 'fontforge' 'subversion' 'parallel' 'python-argparse')
conflicts=('nerd-fonts-noto' 'nerd-fonts-noto-sans-mono')
provides=('nerd-fonts-noto-sans-mono-extended')
source=("svn+https://github.com/googlefonts/noto-fonts/trunk/hinted/ttf/NotoSansMono"
"font-patcher-$pkgver::https://github.com/ryanoasis/nerd-fonts/releases/download/v$pkgver/FontPatcher.zip" "svn+https://github.com/ryanoasis/nerd-fonts/tags/v$pkgver/src/glyphs")
sha256sums=('SKIP'
'fbabf4cee0d7129dfcc369050a159ff626998d2b75140136c6136e18fb205989'
'SKIP')
build() {
# patch fonts
mkdir -p "$srcdir/patched"
printf "%b" "\e[1;33m==> WARNING: \e[0mNow patching all fonts. This will take very long...\n"
# patch fonts quiet with complete single-width glyphs
parallel -j$(nproc) python font-patcher --glyphdir "$srcdir/glyphs/" -q -c -s {} -out "$srcdir/patched" &> /dev/null ::: "$srcdir/NotoSansMono"/*.ttf
}
package() {
# install fonts
install -d "$pkgdir/usr/share/fonts/NotoSansMono"
install -m644 "patched"/*.ttf "$pkgdir/usr/share/fonts/NotoSansMono/"
}
Last edited by Trilby (2023-06-11 13:04:45)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thank you @Trilby . I tried your proposal, it works. Thank you very much.
Last edited by D3vil0p3r (2023-06-11 13:18:13)
Offline
I didn't notice it in my first edit, but directing all output to /dev/null is a horrible idea. That's why there's no information about what's going wrong. Remove that.
Also I'm not too familiar with parallel - according to it's man page it has a variety of ways of handling output (e.g., stderr) so be sure to handle that appropriately and if it is directed to a file, check that file for error information.
(or perhaps better yet, just completely get rid of parallel - for now - until you identify the problem).
EDIT: eh, nevermind - apparently when you said it failed, it worked But still, redirecting all output is a bad idea - remove that.
Last edited by Trilby (2023-06-11 13:22:30)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Ok. I will remove it.
Offline