+Version 0.186
+
+debuginfod-client: Default $DEBUGINFOD_URLS is computed from drop-in files
+ /etc/debuginfod/*.urls rather than hardcoded into the
+ /etc/profile.d/debuginfod* scripts.
+
Version 0.185
debuginfod-client: Simplify curl handle reuse so downloads which
+2021-10-03 Frank Ch. Eigler <fche@redhat.com>
+
+ PR27783
+ * profile.sh, profile.csh: Rewrite to document and set DEBUGINFOD_URLS
+ from /etc/debuginfod/*.urls files.
+ * Makefile.am: Install the configury-specified .urls file.
+ * elfutils.spec: Package it.
+
2021-09-05 Dmitry V. Levin <ldv@altlinux.org>
* eu.am (STACK_USAGE_NO_ERROR): New variable.
install-data-local:
$(INSTALL_DATA) profile.sh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh
$(INSTALL_DATA) profile.csh -D $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh
+ mkdir -p $(DESTDIR)$(sysconfdir)/debuginfod
+ if [ -n "@DEBUGINFOD_URLS@" ]; then \
+ echo "@DEBUGINFOD_URLS@" > $(DESTDIR)$(sysconfdir)/debuginfod/elfutils.urls; \
+ fi
uninstall-local:
- rm -f $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh
+ rm -f $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.sh
+ rm -f $(DESTDIR)$(sysconfdir)/profile.d/debuginfod.csh
+ rm -f $(DESTDIR)$(sysconfdir)/debuginfod/elfutils.urls
+ -rmdir $(DESTDIR)$(sysconfdir)/debuginfod
endif
if MAINTAINER_MODE
%{_mandir}/man1/debuginfod-find.1*
%{_mandir}/man7/debuginfod*.7*
%config(noreplace) %{_sysconfdir}/profile.d/*
+%config(noreplace) %{_sysconfdir}/debuginfod/*
%files debuginfod-client-devel
%defattr(-,root,root)
-if ("@DEBUGINFOD_URLS@" != "") then
- if ($?DEBUGINFOD_URLS) then
- if ($%DEBUGINFOD_URLS) then
- setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS @DEBUGINFOD_URLS@"
- else
- setenv DEBUGINFOD_URLS "@DEBUGINFOD_URLS@"
- endif
- else
- setenv DEBUGINFOD_URLS "@DEBUGINFOD_URLS@"
- endif
+
+# $HOME/.login* 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 (! $?DEBUGINFOD_URLS) then
+ set prefix="@prefix@"
+ set debuginfod_urls=`sh -c "cat @sysconfdir@/debuginfod/*.urls 2>/dev/null" | tr '\n' ' '`
+ if ( "$debuginfod_urls" != "" ) then
+ setenv DEBUGINFOD_URLS "$debuginfod_urls"
+ endif
+ unset debuginfod_urls
+ unset prefix
endif
-if [ -n "@DEBUGINFOD_URLS@" ]; then
- DEBUGINFOD_URLS="${DEBUGINFOD_URLS-}${DEBUGINFOD_URLS:+ }@DEBUGINFOD_URLS@"
- export DEBUGINFOD_URLS
+
+# $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 [ -z "$DEBUGINFOD_URLS" ]; then
+ prefix="@prefix@"
+ debuginfod_urls=`sh -c "cat @sysconfdir@/debuginfod/*.urls 2>/dev/null" | tr '\n' ' '`
+ if [ -n "$debuginfod_urls" ]; then
+ DEBUGINFOD_URLS="$debuginfod_urls"
+ export DEBUGINFOD_URLS
+ fi
+ unset debuginfod_urls
+ unset prefix
fi