Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 904981

Summary: sys-apps/less should obey the XDG directory specification
Product: Gentoo Linux Reporter: Jeff Gazso <jeff.gazso>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jeff Gazso 2023-04-24 20:34:11 UTC
It looks like sys-apps/less puts lesshst and looks for lesskey in the root of the current user's home directory. Appending something the following to /etc/env.d/70less at install time could address this easily enough:

LESSHISTFILE=$XDG_CACHE_HOME/lesshst
LESSKEY=$XDG_CONFIG_HOME/less/lesskey
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-24 20:38:37 UTC
Is this backwards compatible?

i.e. If we start setting this, is it going to break for users who have it in their homedir? I suspect it will?
Comment 2 Jeff Gazso 2023-04-24 21:03:44 UTC
Hmm... you might be right. I consider less' history to be disposable but suddenly moving the lesskey (custom key bindings file) might tick some people off. Let me test this a bit.