Bug 27146 - /etc/profile.d/debuginfod.csh breaks csh startup
Summary: /etc/profile.d/debuginfod.csh breaks csh startup
Status: RESOLVED FIXED
Alias: None
Product: elfutils
Classification: Unclassified
Component: debuginfod (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-04 06:57 UTC by Martin Liska
Modified: 2021-01-04 12:01 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liska 2021-01-04 06:57:13 UTC
As reported here:
https://bugzilla.suse.com/show_bug.cgi?id=1180306

```
It introduces the file "/etc/profile.d/debuginfod.csh" which produces an error during shell initialization, so that startup scripts are not properly run.

Workaround: chmod +t /etc/profile.d/debuginfod.csh

This makes sure that the file is not used in csh startup.

Current content of file:
 ----

setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS "
 ----

Suggested alternative content for file:
 ----

if ( $?DEBUGINFOD_URLS ) then
    setenv DEBUGINFOD_URLS "$DEBUGINFOD_URLS "
endif
 ----

This change avoids evaluating an undefined variable.
```
Comment 1 Mark Wielaard 2021-01-04 08:00:41 UTC
Has this been resolved by:

commit 911ac29b9eed3c66bba60eda6af8e5de62607e5c
Author: Dmitry V. Levin <ldv@altlinux.org>
Date:   Wed Nov 4 08:00:00 2020 +0000

    config: do not define DEBUGINFOD_URLS environment variable unnecessarily
    
    Before this change, when elfutils was configured without
    --enable-debuginfod-urls, the installed profile.d/debuginfod.sh and
    profile.d/debuginfod.csh scripts used to define the DEBUGINFOD_URLS
    environment variable as an non-empty string containing spaces, making
    all libdebuginfod users do extra work.
    
    Change these scripts to avoid defining the DEBUGINFOD_URLS environment
    variable unless configured using --enable-debuginfod-urls.
    
    Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Comment 2 Martin Liska 2021-01-04 12:01:49 UTC
All right, thank you for the pointer.