From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id b5DZJOgmYV/EVwAA0tVLHw (envelope-from ) for ; Tue, 15 Sep 2020 20:41:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KBKxHugmYV9QDgAAB5/wlQ (envelope-from ) for ; Tue, 15 Sep 2020 20:41:12 +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 065E594053C for ; Tue, 15 Sep 2020 20:41:12 +0000 (UTC) Received: from localhost ([::1]:44636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIHlG-0004L6-Jr for larch@yhetil.org; Tue, 15 Sep 2020 16:41:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIHl8-0004Kt-HK for bug-guix@gnu.org; Tue, 15 Sep 2020 16:41:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49116) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIHl8-00055t-7b for bug-guix@gnu.org; Tue, 15 Sep 2020 16:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kIHl8-0002nR-5D for bug-guix@gnu.org; Tue, 15 Sep 2020 16:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#43232: [PATCH] gnu: jack-2: Update to 1.9.14. Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 15 Sep 2020 20:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43232 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Efraim Flashner , Mike Rosset Received: via spool by 43232-submit@debbugs.gnu.org id=B43232.160020245210725 (code B ref 43232); Tue, 15 Sep 2020 20:41:02 +0000 Received: (at 43232) by debbugs.gnu.org; 15 Sep 2020 20:40:52 +0000 Received: from localhost ([127.0.0.1]:60662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIHkx-0002mv-O9 for submit@debbugs.gnu.org; Tue, 15 Sep 2020 16:40:51 -0400 Received: from world.peace.net ([64.112.178.59]:42022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIHku-0002mf-Sh for 43232@debbugs.gnu.org; Tue, 15 Sep 2020 16:40:50 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIHko-00004v-7d; Tue, 15 Sep 2020 16:40:42 -0400 From: Mark H Weaver In-Reply-To: <20200915062139.GF17272@E5400> References: <87363v7e7j.fsf@disroot.org> <20200915042525.4186311-1-mike.rosset@gmail.com> <20200915062139.GF17272@E5400> Date: Tue, 15 Sep 2020 16:39:25 -0400 Message-ID: <87ft7ibwpz.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain 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: 43232@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=none; dmarc=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.01 X-TUID: DtcmCTAH86iq Efraim Flashner writes: > On Mon, Sep 14, 2020 at 09:25:25PM -0700, Mike Rosset wrote: >> * gnu/packages/audio.scm (jack-2): Update to 1.9.14. >> [arguments]: new 'declare-for-int phase after unpack that declares 'i in the >> for initialize statement. Add -lstdc++ to LDFLAGS 'set-linkflags phase >> ensures -lstdc++ is at the tail. [...] >> @@ -2047,8 +2047,18 @@ synchronous execution of all clients, and low latency operation.") >> "--alsa") >> #:phases >> (modify-phases %standard-phases >> + (add-after 'unpack 'declare-for-int >> + (lambda _ >> + ;; Declare the for loop i incrementer. >> + (substitute* "dbus/sigsegv.c" >> + (("for\\(i = 0") "for(int i = 0")) >> + #t)) > > Any chance of an upstream bug number or something for this? It seems > like the type of thing that might be put into a snippet. I agree that somehow this fix should be in the 'origin', so that this fix will be in the output of "guix build --source". However, I'd go further and suggest that it should be a patch instead of a call to 'substitute*'. Although patches are larger and a bit more work to create, they are far more robust. When this bug is eventually fixed upstream, a patch to fix it will begin raising an error, alerting us that it's time to remove it. In contrast, a call to 'substitute*' will silently start doing nothing, and may easily be forgotten. To make matters worse, a future version of jack-2 might add another 'for' loop in that file, matching the same pattern but where it is important that 'i' _not_ be initialized to 0. This 'substitute*' call, likely vestigial by that time but long since forgotten, could start silently introducing a new bug. What do you think? Thanks, Mark