From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by sourceware.org (Postfix) with ESMTPS id 296893858D1E for ; Fri, 22 Mar 2024 17:21:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 296893858D1E 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 296893858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711128079; cv=none; b=uDWZr2sBOO2ZWD/J1JAUmx8R1l+hR7vg+BjAAbAqwz2nDTjRLpNDldRGITrS8NQtKc2ryozAbITeBjqslIKendCS/qNze8Prw6DThAygeoieg+jh6JZx0hDPl1hQqNtLMOId4uYp4nS4H3bGLf2zBonvgfE1fm077wlwSKvqP/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711128079; c=relaxed/simple; bh=M6kszd+4l9OGaNfppMeH9sspUTx1/oP1ax8YftIl4XI=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=riJyuQaMeb52FmWTVsF0ukCjxBEXVeIofg6gAFAVgGVanlulYuRNkIZgK1e7U9NB7iVsNq7llyzKEU9Rfcx2LPgoAoCIWEEjA7h2zNwCYIiw8EwVeo6mo+ViwSlhEGZVX/RTQxMNU5et3Z+Y0K9Hi1fPEGjXJpcKgiSAwt7QzWU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-512f3e75391so1829445e87.2 for ; Fri, 22 Mar 2024 10:21:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711128067; x=1711732867; 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=6n6pawXaOyPS55QVMNvbZeWXI07/eFQzJoMx/zWeg9c=; b=DOdt/dqpTNgbYrWSQj07//1VcLlnFcwOoOPFzJR1AzlBefFO1CIQVbFupr7MtR1+Af 269EkcOjPQt+tOLyJWgk9w7umcoZs1KHhJrmOTcSu0xzlgb+tUOyCtGqGQr0d+GfBP8F tz0EeX0+m7I5/k72CI/7J7sIbPv+CjPwuV+l0F5putTqM5WhnjoD2VnDuHcxPk7L+p9W dBASnchMbiF/pogfLX1g24E7S7/tZn2HyxSbuKEjN5tgbrKe/9J36WysNe9MRKqJLo2B 7kHW38qJWYmV2104dN8inC0mLPMPGZw0AtXTPl+9j7AuCqec4er6etOtNc5fv8+vyOtL mO2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711128067; x=1711732867; 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=6n6pawXaOyPS55QVMNvbZeWXI07/eFQzJoMx/zWeg9c=; b=iXr+ZJ+wVSrXh0k6krUKTl5q2Noy16QvAH496YbmLSJwbmq/NOqdtYi9zqLL04n7dd 1LGFJkeee4z10QvqFrYDvksRZfQcZO/vOn8au6rKMfLT+/MpPDZK9e7UDNj6DqiJ9Vqw 0FMlZmESvjThb+DCgAW7muIkZGvnSDbosFmd3adj8IBe3UJ6wXzWcFZeKdV41JqYZ0gL Mhj+PlIoA3fO1cKDGpR8pmgkljuVr9bgpnoQf171u3fI7bC5AGmAeUlc6rRFnCAFTFHQ Tag+mTGEFa7mMg0DNZ0BaeCZ8i2DREAvblxAje1QVGT5qhpyZ96afKn06r71c+qCAz97 iDkA== X-Gm-Message-State: AOJu0Yza/rKVv+3ndR7jRjZseQEW2NFV7fqYITUJRn5SRvsZBdadfkv5 WCBPIS+J3MBq0ZZK0Szq5e1UcQ75VnJI6lLfprbl/qpyzRj6mZbCHBzT0+HT X-Google-Smtp-Source: AGHT+IEWntRaN19MknoEBeCW53HKhrC2ulh+LuwDRn7KEbVndxry6VJWGwOoomYUaltEpRytuF2izA== X-Received: by 2002:a05:6512:4845:b0:514:b4ca:f478 with SMTP id ep5-20020a056512484500b00514b4caf478mr54443lfb.39.1711128067233; Fri, 22 Mar 2024 10:21:07 -0700 (PDT) Received: from gmail.com (h88-129-108-208.cust.bredband2.com. [88.129.108.208]) by smtp.gmail.com with ESMTPSA id t26-20020ac2549a000000b005159717dd9fsm410061lfk.305.2024.03.22.10.21.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 10:21:06 -0700 (PDT) Date: Fri, 22 Mar 2024 18:21:04 +0100 From: Frederik =?utf-8?B?4oCcRnJlc2/igJ0gUy4=?= Olesen To: elfutils-devel@sourceware.org Subject: [PATCH v2] config: Add profile script for fish shell Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rkeh32fu4be7npco" Content-Disposition: inline In-Reply-To: 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,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: --rkeh32fu4be7npco Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Add support for setting $DEBUGINFOD_URLS automatically in the fish shell similar to the profile scripts for POSIX and csh shells. Makefile is set to install this into fish=E2=80=99s $XDG_DATA_DIRS vendor directory instead of under /etc: https://fishshell.com/docs/current/language.html#configuration-files * config/profile.fish.in: Set $DEBUGINFOD_URLS in fish shells. * configure.ac, config/Makefile.am: Include profile.fish in install and uninstall targets. Signed-off-by: Frederik =E2=80=9CFreso=E2=80=9D S. Olesen --- config/Makefile.am | 5 ++++- config/profile.fish.in | 14 ++++++++++++++ configure.ac | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 config/profile.fish.in diff --git a/config/Makefile.am b/config/Makefile.am index 0d3ba164..ae14e625 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -30,7 +30,8 @@ ## EXTRA_DIST =3D elfutils.spec.in known-dwarf.awk 10-default-yama-scope.conf= \ libelf.pc.in libdw.pc.in libdebuginfod.pc.in \ - debuginfod.service debuginfod.sysconfig profile.sh.in profile.csh.in + debuginfod.service debuginfod.sysconfig \ + profile.sh.in profile.csh.in profile.fish.in =20 pkgconfigdir =3D $(libdir)/pkgconfig pkgconfig_DATA =3D libelf.pc libdw.pc @@ -40,6 +41,7 @@ pkgconfig_DATA +=3D libdebuginfod.pc install-data-local: $(INSTALL_DATA) profile.sh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfo= d.sh $(INSTALL_DATA) profile.csh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginf= od.csh + $(INSTALL_DATA) profile.fish -D $(DESTDIR)$(datadir)/fish/vendor_conf.d/d= ebuginfod.fish mkdir -p $(DESTDIR)$(sysconfdir)/debuginfod if [ -n "@DEBUGINFOD_URLS@" ]; then \ echo "@DEBUGINFOD_URLS@" > $(DESTDIR)$(sysconfdir)/debuginfod/elfutils.u= rls; \ @@ -48,6 +50,7 @@ install-data-local: uninstall-local: rm -f $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh rm -f $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh + rm -f $(DESTDIR)$(datadir)/fish/vendor_conf.d/debuginfod.fish rm -f $(DESTDIR)$(sysconfdir)/debuginfod/elfutils.urls -rmdir $(DESTDIR)$(sysconfdir)/debuginfod endif diff --git a/config/profile.fish.in b/config/profile.fish.in new file mode 100644 index 00000000..00e9ca59 --- /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 files. +# $HOME/.*rc or similar files may then amend $DEBUGINFOD_URLS. +# See also [man debuginfod-client-config] for other environment variables +# such as $DEBUGINFOD_MAXSIZE, $DEBUGINFOD_MAXTIME, $DEBUGINFOD_PROGRESS. + +if not set --query DEBUGINFOD_URLS + # Use local variables so we don't need to manually unset them + set --local prefix "@prefix@" + set --local DEBUGINFOD_URLS (cat /dev/null "@sysconfdir@/debuginfod"/*= =2Eurls 2>/dev/null | string replace '\n' ' ') + if test -n "$DEBUGINFOD_URLS" + set --global --export DEBUGINFOD_URLS "$DEBUGINFOD_URLS" + end +end diff --git a/configure.ac b/configure.ac index 098d1306..a279bb52 100644 --- a/configure.ac +++ b/configure.ac @@ -881,7 +881,7 @@ AC_ARG_ENABLE(debuginfod-urls, fi], [default_debuginfod_urls=3D""]) AC_SUBST(DEBUGINFOD_URLS, $default_debuginfod_urls) =20 -AC_CONFIG_FILES([config/profile.sh config/profile.csh]) +AC_CONFIG_FILES([config/profile.sh config/profile.csh config/profile.fish]) =20 AC_OUTPUT =20 --=20 2.44.0 --rkeh32fu4be7npco Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEMbF5aElipmvBBWzLJ2KOr13BQD4FAmX9vgAACgkQJ2KOr13B QD5P3g/+NG3iroFWxZVnhmPCTNXegRUXLgxNt7hKTb3jY2eTzcT9Btv+g3wi3zhT D9iD1jkseAHXsSEtnWtsu0oZlPIPDIMLBHuRWzJiZ9XeGGnG2DQ6U1PeWqnphZjy CAw+lxsJviPK74dacv8B6kSKJNg6A0wWVkElK0BXaM/AnofDmWakWAi++WCVzEDy CtSov/NsyWb5ZmlvlQF3OB3Oki2SFKxZ3iKqmiYjVNLhV3pX/eCszQQJYYylt189 WzWe0uxNfEq10Yywa8LUA7FueIZ3xPrkNwyoUyLzg6Fn2zUdLolkXa0K59YQc7Na OEVKh8E64roI5CYRJgHQSiGKq7stZ0FVzJXOqT8eUjnANxsAiJU+h4Bod+UnFBso 9mj7DM/+KyeBO3xyHbcjE03KabNpb26zkfPELrUe1C1isk0I9qr6pCM3nkl29obY nd1OsmqpVqFnuhlNpmqdqBQGs8E11W5EL4vwBg2CMpB/lOcYLbefqMgrpvmEKKRE iqZASwWDG9opaLr8hTXjckcfBZLJlcQgsXUUlTGbCWC2/ZVAgU+JdBAXbJItpdrk SJWs36pGTVVXWlqi5hXjpIaIPYuhmLl5y03spdYxeLC1tbCC06XmY8ioNKsdyi1C OpYh1JRzP1aLEDgdXl75kQO1At0ok4BhDfglTq4iRyO+hUxWWBc= =W7Rt -----END PGP SIGNATURE----- --rkeh32fu4be7npco--