From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +ELQMDeVOV/gNgAA0tVLHw (envelope-from ) for ; Sun, 16 Aug 2020 20:21:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id SGmaLDeVOV/GDQAA1q6Kng (envelope-from ) for ; Sun, 16 Aug 2020 20:21:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 51D5A9402A0 for ; Sun, 16 Aug 2020 20:21:11 +0000 (UTC) Received: from localhost ([::1]:47644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7P9Q-0004Td-T7 for larch@yhetil.org; Sun, 16 Aug 2020 16:21:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7P9K-0004TO-Gg for bug-guix@gnu.org; Sun, 16 Aug 2020 16:21:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47075) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k7P9K-0001rW-7I for bug-guix@gnu.org; Sun, 16 Aug 2020 16:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k7P9K-0005JG-3N for bug-guix@gnu.org; Sun, 16 Aug 2020 16:21:02 -0400 Subject: bug#41174: [PATCH] gnu: webkitgtk: Add patch to share all fonts. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Sun, 16 Aug 2020 20:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 41174 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Leo Prikler Mail-Followup-To: 41174@debbugs.gnu.org, maxim.cournoyer@gmail.com, leo.prikler@student.tugraz.at Received: via spool by 41174-done@debbugs.gnu.org id=D41174.159760920820320 (code D ref 41174); Sun, 16 Aug 2020 20:21:01 +0000 Received: (at 41174-done) by debbugs.gnu.org; 16 Aug 2020 20:20:08 +0000 Received: from localhost ([127.0.0.1]:58619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7P8P-0005Ha-Ed for submit@debbugs.gnu.org; Sun, 16 Aug 2020 16:20:08 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:43445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7P8K-0005Gw-PY for 41174-done@debbugs.gnu.org; Sun, 16 Aug 2020 16:20:04 -0400 Received: by mail-qk1-f195.google.com with SMTP id 2so13223169qkf.10 for <41174-done@debbugs.gnu.org>; Sun, 16 Aug 2020 13:20:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Fn8+uw5NnsEtZQIvzShU3e1r+PVCkQPyyG5O1HzvIds=; b=jNhqizHcaeG3YrFv9ez8Jq1+KyzVXw29mIEPVio9O65izvQKrmpOET4uG96ECwzt8j /Xgft8MpQ64OqlO0xKlvsLS3r/jlZ1+15MA4GJ03/vYQ7U/KQ8FKX7rI3g6mvMZAgPz2 VWLudHv+7FgcmJnC7YIEWm8rScY3oH74EMtQTORpEa4nZM7WI4kSRndTzdpFzRlkDmPp 2f7PlqRCGIrKFDsu93ui5hkkm5pPAamzJxPiiV9mRUKzRJ8DwoDIRK/p2G30Uw8Xn9v9 2ZWYPXYJwLHYY9SIqxpIQAuCnUDgw+arxdzrfq8/XTuJVG3ojuykmp5XuliHgbX3VaZZ B0aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Fn8+uw5NnsEtZQIvzShU3e1r+PVCkQPyyG5O1HzvIds=; b=Hh8zBrxNZA6paxotf1qEl1kiuuZMq4X9RS65IxSD5v0aMTKaR7pci/4Jfn/G4cv/ry da9/DvUW3CGctznOc3zYvCXVxPppnvClxgYGFExtqfgGVMWgjWPZKxH8z3/z6WU6lEU4 dTXWXJQkKYB+gHHejXBkcQx7nkcGkcKG0NuLK6DrvPIa4pWJIK2UcCHNL4BjIn19DZT3 Vo6TC2HSREw4QNKC+syFA7KHYxpbF5nW127125ggHkdtjasPuJiERTQ+UMSqh57fkPTL cN2MVMnAkFs6dYRfYJVgRMuzXeuYr1oY4Rx3mQaExm08Av3Ti6+mCP5+f2zBPo1fyJn3 Cr6w== X-Gm-Message-State: AOAM533eSU7VBFgzbn2qWZ47SujJSXn2GFIN/aNs9mlkK/7RDVD4Eash v3lxMgrne/GhF/Dv7EPgv/D2QBObUL0= X-Google-Smtp-Source: ABdhPJwzwZ88ZBilIId9rEsncPnMDz/FB3LqkTL8LZgnSGV0L8ShYJIAzWbR2qh6QcpurClV7DTtwg== X-Received: by 2002:a05:620a:230:: with SMTP id u16mr9916552qkm.387.1597609194818; Sun, 16 Aug 2020 13:19:54 -0700 (PDT) Received: from hurd (dsl-205-236-230-61.b2b2c.ca. [205.236.230.61]) by smtp.gmail.com with ESMTPSA id i7sm16964130qtb.27.2020.08.16.13.19.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Aug 2020 13:19:54 -0700 (PDT) From: Maxim Cournoyer References: <20200526181345.32726-1-leo.prikler@student.tugraz.at> Date: Sun, 16 Aug 2020 16:19:53 -0400 In-Reply-To: <20200526181345.32726-1-leo.prikler@student.tugraz.at> (Leo Prikler's message of "Tue, 26 May 2020 20:13:46 +0200") Message-ID: <87a6yuxs0m.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 41174-done@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=jNhqizHc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 1.09 X-TUID: Q9o65KrpsjAA --=-=-= Content-Type: text/plain Hi Leo, Leo Prikler writes: > * gnu/packages/patches/webkitgtk-bind-all-fonts.patch: New file. > * gnu/packages/webkit.scm (webkitgtk)[source]: Use it here. > * gnu/local.mk: Add it here. I've expounded a bit the commit message, > --- > gnu/local.mk | 1 + > .../patches/webkitgtk-bind-all-fonts.patch | 37 +++++++++++++++++++ > gnu/packages/webkit.scm | 3 +- > 3 files changed, 40 insertions(+), 1 deletion(-) > create mode 100644 gnu/packages/patches/webkitgtk-bind-all-fonts.patch > > diff --git a/gnu/local.mk b/gnu/local.mk > index d34e7e6ae5..7a694e551a 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -1580,6 +1580,7 @@ dist_patch_DATA = \ > %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ > %D%/packages/patches/weasyprint-library-paths.patch \ > %D%/packages/patches/webkitgtk-share-store.patch \ > + %D%/packages/patches/webkitgtk-bind-all-fonts.patch \ > %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch \ > %D%/packages/patches/wicd-bitrate-none-fix.patch \ > %D%/packages/patches/wicd-get-selected-profile-fix.patch \ > diff --git a/gnu/packages/patches/webkitgtk-bind-all-fonts.patch b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch > new file mode 100644 > index 0000000000..fec0b812f1 > --- /dev/null > +++ b/gnu/packages/patches/webkitgtk-bind-all-fonts.patch > @@ -0,0 +1,37 @@ > +Add fonts from all XDG_DATA_DIRS, not just XDG_DATA_HOME. > + > +See . > +Author: Leo Prikler > +Index: webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp > +=================================================================== > +--- webkitgtk-2.28.2.orig/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp > ++++ webkitgtk-2.28.2/Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp > +@@ -385,8 +385,8 @@ static void bindFonts(Vector& a > + { > + const char* configDir = g_get_user_config_dir(); > + const char* homeDir = g_get_home_dir(); > +- const char* dataDir = g_get_user_data_dir(); > + const char* cacheDir = g_get_user_cache_dir(); > ++ const char* const * dataDirs = g_get_system_data_dirs(); > + > + // Configs can include custom dirs but then we have to parse them... > + GUniquePtr fontConfig(g_build_filename(configDir, "fontconfig", nullptr)); > +@@ -394,15 +394,17 @@ static void bindFonts(Vector& a > + GUniquePtr fontCache(g_build_filename(cacheDir, "fontconfig", nullptr)); > + GUniquePtr fontHomeConfig(g_build_filename(homeDir, ".fonts.conf", nullptr)); > + GUniquePtr fontHomeConfigDir(g_build_filename(configDir, ".fonts.conf.d", nullptr)); > +- GUniquePtr fontData(g_build_filename(dataDir, "fonts", nullptr)); > + GUniquePtr fontHomeData(g_build_filename(homeDir, ".fonts", nullptr)); > + bindIfExists(args, fontConfig.get()); > + bindIfExists(args, fontConfigHome.get()); > + bindIfExists(args, fontCache.get(), BindFlags::ReadWrite); > + bindIfExists(args, fontHomeConfig.get()); > + bindIfExists(args, fontHomeConfigDir.get()); > +- bindIfExists(args, fontData.get()); removed the above deleted lines from your patch, so as to continue honoring XDG_DATA_HOME, > + bindIfExists(args, fontHomeData.get()); > ++ for (auto dataDir = dataDirs; dataDir != nullptr && *dataDir != nullptr; dataDir++) { > ++ GUniquePtr fontDataDir(g_build_filename(*dataDir, "fonts", nullptr)); > ++ bindIfExists(args, fontDataDir.get()); > ++ } > + bindIfExists(args, "/var/cache/fontconfig"); // Used by Debian. > + } > diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm > index 90be7d2625..a5c2b3fee2 100644 > --- a/gnu/packages/webkit.scm > +++ b/gnu/packages/webkit.scm > @@ -129,7 +129,8 @@ engine that uses Wayland for graphics output.") > (sha256 > (base32 > "1g9hik3bprki5s9d7y5288q5irwckbzajr6rnlvjrlnqrwjkblmr")) > - (patches (search-patches "webkitgtk-share-store.patch")))) > + (patches (search-patches "webkitgtk-share-store.patch" > + "webkitgtk-bind-all-fonts.patch")))) > (build-system cmake-build-system) > (outputs '("out" "doc")) > (arguments And validated it worked well with a './pre-inst-env guix system vm epiphany-ratpoison.scm' generated VM (it exhibited the problem after all, when used in a VM). For completeness sake, the test VM operating system is attached. It's not necessary to include bubblewrap to trigger the font problem. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=epiphany-ratpoison.scm ;;; Try reproducing the font problem in Epiphany. ;;; Run VM with: /gnu/store/w0m677q3d94rpvyaas74qahdvs8zfrcq-run-vm.sh (use-modules (gnu) (gnu system nss)) (use-service-modules desktop ssh) (use-package-modules bootloaders certs ratpoison suckless wm xorg) (define %extra-packages (map specification->package '("font-adobe-source-han-sans" "epiphany" ; "bubblewrap" "strace" "fontconfig" "zile"))) (operating-system (host-name "antelope") (timezone "Europe/Paris") (locale "en_US.utf8") ;; Use the UEFI variant of GRUB with the EFI System ;; Partition mounted on /boot/efi. (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (target "/boot/efi"))) ;; Assume the target root file system is labelled "my-root", ;; and the EFI System Partition has UUID 1234-ABCD. (file-systems (append (list (file-system (device (file-system-label "my-root")) (mount-point "/") (type "ext4")) (file-system (device (uuid "1234-ABCD" 'fat)) (mount-point "/boot/efi") (type "vfat"))) %base-file-systems)) (users (cons (user-account (name "alice") (comment "Bob's sister") (group "users") (supplementary-groups '("wheel" "netdev" "audio" "video"))) %base-user-accounts)) ;; Add a bunch of window managers; we can choose one at ;; the log-in screen with F1. (packages (append (list ratpoison ;; terminal emulator xterm ;; for HTTPS access nss-certs) %extra-packages %base-packages)) ;; Use the "desktop" services, which include the X11 ;; log-in service, networking with NetworkManager, and more. (services (cons* (service openssh-service-type (openssh-configuration (x11-forwarding? #t) (permit-root-login 'without-password))) %desktop-services)) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss)) --=-=-= Content-Type: text/plain The fix is now merged in master as of commit bc549a276c. Thanks for investigating and fixing the issue! Closing, Maxim --=-=-=--