Message ID | 20220918204335.1734-1-kreyren@rixotstudio.cz |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D8FBA27BBEA; Sun, 18 Sep 2022 21:45:41 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 61C7D27BBE9 for <patchwork@mira.cbaines.net>; Sun, 18 Sep 2022 21:45:41 +0100 (BST) Received: from localhost ([::1]:56430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1oa1Aa-0000iA-Fj for patchwork@mira.cbaines.net; Sun, 18 Sep 2022 16:45:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oa1A0-0000fK-EF for guix-patches@gnu.org; Sun, 18 Sep 2022 16:45:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oa19y-0007Pe-Kr for guix-patches@gnu.org; Sun, 18 Sep 2022 16:45:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oa19y-0003Vx-5E for guix-patches@gnu.org; Sun, 18 Sep 2022 16:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57809] [PATCH] gnome-boxes: Patch 'qemu-img' path References: <20220914181624.13204-1-kreyren@rixotstudio.cz> In-Reply-To: <20220914181624.13204-1-kreyren@rixotstudio.cz> Resent-From: Jacob Hrbek <kreyren@rixotstudio.cz> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 18 Sep 2022 20:45:02 +0000 Resent-Message-ID: <handler.57809.B57809.166353384813433@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57809 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57809@debbugs.gnu.org Cc: Jacob Hrbek <kreyren@rixotstudio.cz> Received: via spool by 57809-submit@debbugs.gnu.org id=B57809.166353384813433 (code B ref 57809); Sun, 18 Sep 2022 20:45:02 +0000 Received: (at 57809) by debbugs.gnu.org; 18 Sep 2022 20:44:08 +0000 Received: from localhost ([127.0.0.1]:51387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1oa196-0003Ub-5Y for submit@debbugs.gnu.org; Sun, 18 Sep 2022 16:44:08 -0400 Received: from mail-4018.proton.ch ([185.70.40.18]:39551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <kreyren@rixotstudio.cz>) id 1oa18z-0003Tu-Jg for 57809@debbugs.gnu.org; Sun, 18 Sep 2022 16:44:07 -0400 Date: Sun, 18 Sep 2022 20:43:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rixotstudio.cz; s=protonmail; t=1663533834; x=1663793034; bh=c9V1TQMmWRwL2+kgizZiXUd4gDyUkn03dRmq1PBxdFM=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID; b=TVlwouNxV3dOskNmC0NDHM7DoBz0smtgU1UsR6+sDf2Nqwt5SBOhyILKzGBDBLe2a /PIa92qp538bCy8cJWtgDa6wdwNPsocFqJ6NdzgH4wvnZw0GHzj3HIJiQ13RhnyQuU YdDzIxeqxaCq6L8qGCgYb74XXgtXChCvm6epalIkuK78+DtnlCeVKkMfxIQwaevFsT vUubMWenSwP6RSdcw2JIbmAMUQEMRHGq3XieLTH0BKW5zpB/Isf3w4kL4T6L53gN8/ 3CwGutmzPkw4ay2UQXRjsHz/WJ8BWVxyZScr7T2Bt9BykswfuNX33kBSJ8yk0yN82K +Nhgo3Eaj+Kjw== From: Jacob Hrbek <kreyren@rixotstudio.cz> Message-ID: <20220918204335.1734-1-kreyren@rixotstudio.cz> Feedback-ID: 30491181:user:proton MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha256; boundary="------61d16da9108425707aa2e766cbf3bf586d42f83257d924607a4735c0d26a3569"; charset=utf-8 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#57809] gnome-boxes: Patch 'qemu-img' path
|
|
Commit Message
Jacob Hrbek
Sept. 18, 2022, 8:43 p.m. UTC
--- gnu/packages/gnome.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) gettext-minimal @@ -12141,6 +12147,7 @@ (define-public gnome-boxes itstool pkg-config python + qemu-minimal ;for qemu-img vala)) (inputs (list glib-networking ;for TLS support -- 2.37.1
Comments
isn't that going to break if the user invokes `guix cg -D` though? On Ne, zář 18 2022 at 20:43:43 +0000, Jacob Hrbek <kreyren@rixotstudio.cz> wrote: > --- > gnu/packages/gnome.scm | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm > index d6d22f8eb1..89f5999920 100644 > --- a/gnu/packages/gnome.scm > +++ b/gnu/packages/gnome.scm > @@ -12111,6 +12111,7 @@ (define-public polari > (home-page "<https://wiki.gnome.org/Apps/Polari>") > (license license:gpl2+))) > > +;; NOTE(Krey): src/util-app.vala might need patched paths > (define-public gnome-boxes > (package > (name "gnome-boxes") > @@ -12133,7 +12134,12 @@ (define-public gnome-boxes > #:phases #~(modify-phases %standard-phases > (add-after 'unpack > 'disable-gtk-update-icon-cache > (lambda _ > - (setenv "DESTDIR" "/")))))) > + (setenv "DESTDIR" "/"))) > + (add-before 'configure > 'substitute-qemu-dependencies > + (lambda _ > + (substitute* "src/installed-media.vala" > + (("qemu-img") > + (search-input-file %build-inputs > "/bin/qemu-img")))))))) > (native-inputs > (list desktop-file-utils ;for update-desktop-database > gettext-minimal > @@ -12141,6 +12147,7 @@ (define-public gnome-boxes > itstool > pkg-config > python > + qemu-minimal ;for qemu-img > vala)) > (inputs > (list glib-networking ;for TLS support > -- > 2.37.1 >
On 18-09-2022 23:05, Jacob Hrbek wrote: > isn't that going to break if the user invokes `guix cg -D` though? No, "guix gc" only deletes things that aren't (indirectly) referred to by a root (being a garbage collector), and by adding that substitution, the compiled gnome-boxes refers to qemu(-minimal). (Unless the reference is obfuscated, but Vala has a C-like compilation model, so I wouldn't expect that.) > + (substitute* "src/installed-media.vala" > + (("qemu-img") > + (search-input-file %build-inputs "/bin/qemu-img")))))))) I find (search-input-file inputs "/bin/qemu-img") clearer -- 'inputs' / 'native-inputs' is sufficiently complicated on its own, no need to bring %build-inputs and friends in the equation when it can be avoided. > +;; NOTE(Krey): src/util-app.vala might need patched paths (1) the convention is TODO or FIXME, not NOTE (2) who discovered the potential problem, does not need to be mentioned -- there is still "git blame" (which can be used for other things than blaming) and "git log" if it turns out to be somehow useful information after all (e.g. for attribution). Greetings, Maxime.
On Ne, zář 18 2022 at 23:14:12 +0200, Maxime Devos <maximedevos@telenet.be> wrote: > I find (search-input-file inputs "/bin/qemu-img") clearer -- 'inputs' > / > 'native-inputs' is sufficiently complicated on its own, no need to > bring > %build-inputs and friends in the equation when it can be avoided. That ain't working for me: <https://i.imgur.com/Co4Xsjl.png> unbound-variable #f "Unbound variable: ~S" (native-inputs) #f > (1) the convention is TODO or FIXME, not NOTE It's not: - TODO as in "To Do something" or "for something to be done" - FIXME as in "Low priority thing or quality assurance something that needs to be fixed" More like handing over note to the next guy about possible issue in the future and leaving the signature here so that they can just go on chat and ask instead of wasting ~3 min on average searching git blame/log which gets exponentially more unsustainable to track At least that's how it works where i work O_o .. personally i find it better way than the generic TODO/FIXME
On 18-09-2022 23:32, Jacob Hrbek wrote: > On Ne, zář 18 2022 at 23:14:12 +0200, Maxime Devos > <maximedevos@telenet.be> wrote: >> I find (search-input-file inputs "/bin/qemu-img") clearer -- 'inputs' >> / 'native-inputs' is sufficiently complicated on its own, no need to >> bring %build-inputs and friends in the equation when it can be avoided. > > That ain't working for me: https://i.imgur.com/Co4Xsjl.png > <https://i.imgur.com/Co4Xsjl.png> Quoting the relevant code would be sufficient, no need for image links. Besides, text is more accessible than images of text, text would reach a wider audience. > unbound-variable #f "Unbound variable: ~S" (native-inputs) #f (1) 'qemu-minimal' is in the wrong place, it needs to be in 'inputs', not 'native-inputs', otherwise it is compiled for the wrong architecture. (In both the phase and the inputs/native-inputs field) (2) 'native-inputs' (or 'inputs'), is unbound. For information on how to use search-input-file, inputs and phases, see the manual, in particular (guix)Build Utilities (index entry: search-input-file) and its example. >> (1) the convention is TODO or FIXME, not NOTE It's not: - TODO as in "To Do something" or "for something to be done" > - FIXME as in "Low priority thing or quality assurance something that > needs to be fixed" A missing hardcoded file name can easily be a (usually low-priority) bug, so FIXME applies, it's also something to investigate and solve (if appropriate), so TODO applies. > More like handing over note to the next guy about possible issue in the > future and leaving the signature here so that they can just go on chat The required information is already in the "TODO: [stuff about file names]", they do not need to go 'on chat', and if they do anyway, hardcoding file names is a relatively well-known solution, so I don't expect a contact person to be needed. If that's not sufficient, you can insert an (impersonal) link to the Guix issue <https://issues.guix.gnu.org/issue/57809>, which has all the relevant information (which is available even when you aren't available for chatting, and also when your IRC nick is unknown or if you're gone). Also, there are no gender restrictions in Guix. Greetings, Maxime.
>> (2) 'native-inputs' (or 'inputs'), is unbound. For information on how >> to use search-input-file, inputs and phases, see the manual, in particular (guix)Build Utilities (index entry: search-input-file) >> and >> its example. I've been searching through that thing endlessly for almost 5 hours >_> it doesn't help much for that.. I can grep the code to look for usage though which is what I did here ^-^ >> If that's not sufficient, you can insert an (impersonal) link to the >> Guix issue meh, imho takes too much time especially when it's from a newbie like me who needs guidance which adds bunch of useless info to the issue. >> which has all the >> relevant information (which is available even when you aren't available >> for chatting, and also when your IRC nick is unknown or if you're gone). The idea is that people are using chat/client that has chat history and sends notifications so that people can respond quickly or when they are available worst case sending an email.. -- Jacob "Kreyren" Hrbek ------- Original Message ------- On Sunday, September 18th, 2022 at 11:50 PM, Maxime Devos <maximedevos@telenet.be> wrote: > > > On 18-09-2022 23:32, Jacob Hrbek wrote: > > > On Ne, zář 18 2022 at 23:14:12 +0200, Maxime Devos > > maximedevos@telenet.be wrote: > > > > > I find (search-input-file inputs "/bin/qemu-img") clearer -- 'inputs' > > > / 'native-inputs' is sufficiently complicated on its own, no need to > > > bring %build-inputs and friends in the equation when it can be avoided. > > > > That ain't working for me: https://i.imgur.com/Co4Xsjl.png > > https://i.imgur.com/Co4Xsjl.png > > > Quoting the relevant code would be sufficient, no need for image links. > Besides, text is more accessible than images of text, text would reach > a wider audience. > > > unbound-variable #f "Unbound variable: ~S" (native-inputs) #f > > > (1) 'qemu-minimal' is in the wrong place, it needs to be in 'inputs', > not 'native-inputs', otherwise it is compiled for the wrong > architecture. (In both the phase and the inputs/native-inputs field) > (2) 'native-inputs' (or 'inputs'), is unbound. For information on how > to use search-input-file, inputs and phases, see the manual, in > particular (guix)Build Utilities (index entry: search-input-file) and > its example. > > > > (1) the convention is TODO or FIXME, not NOTE It's not: - TODO as in "To Do something" or "for something to be done" > > > - FIXME as in "Low priority thing or quality assurance something that > > > needs to be fixed" > > > A missing hardcoded file name can easily be a (usually low-priority) > bug, so FIXME applies, it's also something to investigate and solve (if > appropriate), so TODO applies. > > > More like handing over note to the next guy about possible issue in the > > future and leaving the signature here so that they can just go on chat > > > The required information is already in the "TODO: [stuff about file > names]", they do not need to go 'on chat', and if they do anyway, > hardcoding file names is a relatively well-known solution, so I don't > expect a contact person to be needed. > > If that's not sufficient, you can insert an (impersonal) link to the > Guix issue https://issues.guix.gnu.org/issue/57809, which has all the > > relevant information (which is available even when you aren't available > for chatting, and also when your IRC nick is unknown or if you're gone). > > Also, there are no gender restrictions in Guix. > > Greetings, > Maxime.
On 19-09-2022 06:28, Jacob Hrbek wrote: >>> (2) 'native-inputs' (or 'inputs'), is unbound. For information on how > >>> to use search-input-file, inputs and phases, see the manual, in particular (guix)Build Utilities (index entry: search-input-file) >> and > >>> its example. > > I've been searching through that thing endlessly for almost 5 hours >_> it doesn't help much for that.. I can grep the code to look for usage though which is what I did here ^-^ Here are some proposed methods for finding it, which can be adapted for other searches as well. * "info guix" followed by 's' 'search-input-file' (free-form text search, good for finding examples) * "info guix" followed by 'i' 'search-input-file' (index entry, works well for procedure names) * "info guix" > "Programming Interface" > "Build Utilities", followed by some scrolling, then find 'search-input-file' there. (using the TOC) The first two options only take a few seconds. The latter can be quick or long, depending on whether your guess on where it's located is good or bad. And a fourth option, since you seem to like grepping: * git grep -F search-input-file doc/ (in a git checkout of Guix) Greetings, Maxime.
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index d6d22f8eb1..89f5999920 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -12111,6 +12111,7 @@ (define-public polari (home-page "https://wiki.gnome.org/Apps/Polari") (license license:gpl2+))) +;; NOTE(Krey): src/util-app.vala might need patched paths (define-public gnome-boxes (package (name "gnome-boxes") @@ -12133,7 +12134,12 @@ (define-public gnome-boxes #:phases #~(modify-phases %standard-phases (add-after 'unpack 'disable-gtk-update-icon-cache (lambda _ - (setenv "DESTDIR" "/")))))) + (setenv "DESTDIR" "/"))) + (add-before 'configure 'substitute-qemu-dependencies + (lambda _ + (substitute* "src/installed-media.vala" + (("qemu-img") + (search-input-file %build-inputs "/bin/qemu-img")))))))) (native-inputs (list desktop-file-utils ;for update-desktop-database