From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91989 invoked by alias); 4 Feb 2020 15:39:33 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 91939 invoked by uid 48); 4 Feb 2020 15:39:29 -0000 From: "tromey at sourceware dot org" To: elfutils-devel@sourceware.org Subject: [Bug debuginfod/25502] New: debuginfod client should default to XDG cache Date: Tue, 04 Feb 2020 15:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: debuginfod X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2020-q1/txt/msg00061.txt https://sourceware.org/bugzilla/show_bug.cgi?id=3D25502 Bug ID: 25502 Summary: debuginfod client should default to XDG cache Product: elfutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: debuginfod Assignee: unassigned at sourceware dot org Reporter: tromey at sourceware dot org CC: elfutils-devel at sourceware dot org Target Milestone: --- The debuginfod client defaults its cache to: static const char *cache_default_name =3D ".debuginfod_client_cache"; static const char *cache_path_envvar =3D DEBUGINFOD_CACHE_PATH_ENV_VAR; [...] if (getenv(cache_path_envvar)) strcpy(cache_path, getenv(cache_path_envvar)); else { if (getenv("HOME")) sprintf(cache_path, "%s/%s", getenv("HOME"), cache_default_name); else sprintf(cache_path, "/%s", cache_default_name); } That is, $HOME/.debuginfod_client_cache in the usual setup. I think it would be better if this followed the XDG base directory spec instead.=20 https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html In this case, this text applies: $XDG_CACHE_HOME defines the base directory relative to which user specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not= set or empty, a default equal to $HOME/.cache should be used.=20 I would suggest a subdirectory of this, like .../debuginfod_client --=20 You are receiving this mail because: You are on the CC list for the bug.