From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id CFF503858C55 for ; Fri, 22 Mar 2024 10:13:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CFF503858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CFF503858C55 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711102389; cv=none; b=Dv2McKJfjOeK1gBeZJs+4dVG3Tu5apwpYRYz4lz0OFD2VjtPIxIqgWu7NDxKZDK7nK9pBMEIqxy8UWSO57xunsWINdE8uEt0sZYPjYZMn4WXCJygUZiV2T7OCFK0f1/uNLSpuXYg6t7A/GqgpAPi+M6ua/Ewgooq5zoAsmoQLkM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711102389; c=relaxed/simple; bh=NFYY0BARxRC5FM7j10PcVh8CnUobMl03X7fE89248XY=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=taylKMMcrYbuaNJ95tcG3dpOAq+xXT8fMmRkjjhi6qFMBO1LfRj/5EihHKjptuE9jLUOSMNm3ffxi+QySeYy5Cmp9O6+4Sj1BPer+GLZy2gBeH1XN4IjaP1xbKePEpaXgT0tAJ9zxuuA4A0pELfAfvI2Gsx3HWxUqvqKz+WNK48= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2d41d1bedc9so35738331fa.3 for ; Fri, 22 Mar 2024 03:13:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711102384; x=1711707184; darn=sourceware.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:to:from:date:from:to:cc:subject:date:message-id :reply-to; bh=ic2AbKTPpt/TeEl954ZZNiNK1fAa8NywNLPZnfVDX18=; b=fYluTIViN7/hcb7GA0wF6Qvq5tmn6t0HUhHhcSFzR4VpGrQTKmCTvBtitq12HJCEAV 8qspThjUO6FixCYLIHot4gsZfnzEIzc8MUQxNXyaC/DFRx6uHPPS7G9UaY9gO4BDYMg3 Ysa9uCWYbuoedSAVkRwOymi/D5NrqnJ76K+d+P8DnCfn/0K/7oazB7D2OiOr9RKiEvYz lamSC9ZngfXEi9zNN7HuO9kEwfj4afLuBpFd739y04UUkw0zD2/a1V+X7UR0/PrmaKMQ cMGJzEZl243t4845sNLA0dlcOMCeS2CEaXnTqIrbEhXYjWV+C/J91yPAKxURxBEJQoSP Kqxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711102384; x=1711707184; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ic2AbKTPpt/TeEl954ZZNiNK1fAa8NywNLPZnfVDX18=; b=mX4Wq/ms3Dtf4SbxW1Gv0QDVVL1whzEOLT0MX0kLbq92yt+N2ZkuKM0zHSqvMMqA76 RHHSNYmaril4BllNjCOpny2UwQeSwAmpxLLRsvW9iEGs+DSs48HKYqmFy7M7CWLlbPxS wyXFvUldPUGZl9+exKA32LwlxNPIb+pD90autnnObr+RBhgKmFlKCg5Yuh1/CKJMJCAc drHBZJI5ZoxbFCSzQX6bB5VxGPhssVXl8EPTdRQU6iHYspCkFGboEiInMfLd4iHDi3Sl deLYh0lgetgdMYFVe+j2WIQ/2FmUZk4U3oXHUShTSMeRfP0T129CghrIGrCJIOlEXud9 bkRw== X-Gm-Message-State: AOJu0YxhFv8R5vXZKTMOlhEjLOVjqd+IhszvYoFMqbPIC6pl9eiZxnDz sP2cXbVv4CbWq92XvrJ6biEEoBkVsheH10SQ9ZApjSFQhADSPA2TEc47B+Pu X-Google-Smtp-Source: AGHT+IEksisfJRsa7xOcXE4B+2Tf/nDmMP7juW/WfGff7P1w0uav3JgGbGLzuXH7a1UV/9DgDwJv6Q== X-Received: by 2002:a19:f608:0:b0:515:8dd3:e94d with SMTP id x8-20020a19f608000000b005158dd3e94dmr1557886lfe.68.1711102383908; Fri, 22 Mar 2024 03:13:03 -0700 (PDT) Received: from gmail.com (h88-129-108-208.cust.bredband2.com. [88.129.108.208]) by smtp.gmail.com with ESMTPSA id b28-20020ac247fc000000b005131434454bsm288670lfp.228.2024.03.22.03.13.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 03:13:03 -0700 (PDT) Date: Fri, 22 Mar 2024 11:13:01 +0100 From: Frederik =?utf-8?B?4oCcRnJlc2/igJ0gUy4=?= Olesen To: elfutils-devel@sourceware.org Subject: Re: [PATCH] config: Add profile script for fish shell Message-ID: References: <20240321202536.GP8319@gnu.wildebeest.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wh6vnihsy4g3uhfq" Content-Disposition: inline In-Reply-To: <20240321202536.GP8319@gnu.wildebeest.org> User-Agent: NeoMutt/20240201 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --wh6vnihsy4g3uhfq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 21, 2024 at 09:25:36PM +0100, Mark Wielaard wrote: > Hi, Hi! Thanks for the review! Comments below and revision coming up :) > On Thu, Mar 21, 2024 at 04:04:11PM +0100, Frederik =E2=80=9CFreso=E2=80= =9D S. Olesen wrote: > > diff --git a/config/ChangeLog b/config/ChangeLog > > index ce1f74f6..7d88c071 100644 > > --- a/config/ChangeLog > > +++ b/config/ChangeLog > > @@ -1,3 +1,8 @@ > > +2024-03-21 Frederik =E2=80=9CFreso=E2=80=9D S. Olesen > > + > > + * profile.fish.in: Set $DEBUGINFOD_URLS in fish shells. > > + * Makefile.am: Include profile.fish in install and uninstall targets. >=20 > Since we have been putting the ChangeLog entry into the commit message > it doesn't need to also go into the actual Changelog file. Yeah, I wasn=E2=80=99t sure since it seemed like some recent(ish) commits s= till put in ChangeLog entries, but CONTRIBUTORS said not to=E2=80=A6 so I opted = to just include this and it would be easy to either exclude when applying the patch or remove in a revision. I=E2=80=99ll do the latter. :) > > > > + $(INSTALL_DATA) profile.fish -D $(DESTDIR)$(datadir)/fish/vendor_conf= =2Ed/debuginfod.fish > > > > + rm -f $(DESTDIR)$(datadir)/fish/vendor_conf.d/debuginfod.fish >=20 > Right, with --prefix=3D/usr that expands to > /usr/share/fish/vendor_conf.d which seems to match the default install > location you pointed out above. Good. Yeah, I had to look up the directory variables to figure out where to put it, to not just go for the =E2=80=9Clazy=E2=80=9D way of placing it in /etc: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html > > diff --git a/config/profile.fish.in b/config/profile.fish.in > > new file mode 100644 > > index 00000000..34b1ab85 > > --- /dev/null > > +++ b/config/profile.fish.in > > @@ -0,0 +1,14 @@ > > +# $HOME/.profile* or similar files may first set $DEBUGINFOD_URLS. > > +# If $DEBUGINFOD_URLS is not set there, we set it from system *.url fi= les. > > +# $HOME/.*rc or similar files may then amend $DEBUGINFOD_URLS. > > +# See also [man debuginfod-client-config] for other environment variab= les > > +# such as $DEBUGINFOD_MAXSIZE, $DEBUGINFOD_MAXTIME, $DEBUGINFOD_PROGRE= SS. > > + > > +if not set --query DEBUGINFOD_URLS > > + # Use local variables so we don't need to manually unset them > > + set --local prefix=3D"@prefix@" > > + set --local DEBUGINFOD_URLS (cat /dev/null "@sysconfdir@/debuginfo= d"/*.urls 2>/dev/null | string replace '\n' ' ') > > + if test -n "$DEBUGINFOD_URLS" > > + set --global --export DEBUGINFOD_URLS "$DEBUGINFOD_URLS" > > + end > > +end >=20 > I don't know fish, but this looks OK. I=E2=80=99ve been running this locally (but under $XDG_CONFIG_HOME) since yesterday and it works well for me, with elfutils.urls and archlinux.urls under /etc. That said, I just spotted a mistake in my code, which I have missed because that line is removed in my locally running version: Fish=E2=80=99s `set` doesn=E2=80=99t use `=3D` for assignment, so the `$pre= fix` assignment needs a tiny fix too. > Note that to turn this profile.fish.in into profile.fish you need to > mark it as a config file in configure.ac: Ah! I=E2=80=99ve been having some SIGILL problems with `git grep`[1] so I m= issed looking for other places where the other profile.*sh=E2=80=99s were mention= ed. [1] Incidentally, the attempt at debugging this issue is how I realised that $DEBUGINFOD_URLS was _not_ automatically populated in fish=E2=80=A6 wh= ich led me down the rabbit hole ending in this patch. =F0=9F=98=85 > Could you sent a new patch with those two changes? Yes, coming right up! --=20 Solidarity, Frederik =E2=80=9CFreso=E2=80=9D S. Olesen --wh6vnihsy4g3uhfq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEMbF5aElipmvBBWzLJ2KOr13BQD4FAmX9Wa0ACgkQJ2KOr13B QD7Jwg//YX12ShjI1b9EAmfn1CdCJogrjxTJ75TBWGUXaySGFycWX5k2ez894vJq lcClg8LwVyJpItDxnBSKWHJfZ1UVqXW2OaP6Dg3sr5rHmrYbVKbzosQYYlvWiUDT Rvif4Gk8QG+21Ce52JSY3DkDYUVKBV30NBADZVSxqPEZazL2oEDutq+GA4Ze3Vl/ IqdKXzxCqwkeRJ0VkBCC2TmWUgtImKcvYZiaPR7EM21vUQ51hnWh/Hglib8qdNYb 68Hqa8hWS6Kx1qqvxuGpGBQY5VQYTLScAKD0/D4xqgfnzp+U7sKtvoFvAQXd5tAY afjN9H1JdVi8Ag8FB38s6VRQ+PPK3pY/TkdfpLMuVYWPmYiOgUvoAjWbYizyzvyK gqQHBSILDHYnaaO18nx/ddIZ5m12HWGMQ4/89Q++2zI7RVZ4PUiQjt7ESk6c+Eh6 iN6jHIQROOIdQtPuFFRN4g02ZUZMLxW/bgaQKwOeOxFf0jYf2UQtTZU3fyUXwdpD rly5MRwo09EEgfzAgvEwMBe8CT7pPV4i7kdm7Y6CVjWlape2wpUSGu6frpt/QofI HXOg5lHmuIf5a2+/4LN0RcTylutuJip8dQg/cQ52Xk4aS8XDkK4gkpTP+MJPdHkt DMtq7PQoDtLLjyzMk4Ztg/m/LbEzbcbaE6O1W5lmtveYOaTqXio= =Ys0u -----END PGP SIGNATURE----- --wh6vnihsy4g3uhfq--