Re: [PATCH 0/2] XDG basedir bin dirs
Hi, I agree with Lennart it is not a good choice to just throw env vars onto everything. But I disagree that "best way to get this in quickly..." is something we should use as argument. About the patch: "at an appropriate place" does not add anything useful, remove it or suggest something concrete. 2018-05-02 Josh Triplett wrote: > This isn't a "maybe someone might use this someday", > this is "people specifically asked for this and intend to use it". Please cite. I would be interested who the people are and what they want to do with it. I don't have any objection to configuring this via an $XDG_PREFIX > instead, defaulting to ~/.local, and then saying the binary directory is > $XDG_PREFIX/bin. I would not make this configurable, unless there is a good use case for it. The search path (PATH) is the relevant place. Having multiple places to configure the same path only brings inconsistencies. If you want such a prefix nevertheless, XDG_LOCAL might be a better name. Imho the name XDG_PREFIX is too generic. >> However, I really don't see the benefit of adding individual >> configurability for each of the home dirs, because you should already >> have that anyway though the prefix dir you use when configuring your >> package... > This would provide a standardized way to *configure* that prefix, > because not all the world's a ./configure --prefix. XDG_LOCAL or XDG_BIN_DIRS would not help here at all. If the software does not support --prefix it won't support XDG_LOCAL or XDG_BIN_DIRS. PATH does help here. The argument for XDG_LOCAL or XDG_BIN_DIRS would be that these env vars could be used to drop binaries to. But, as I understand it, it is not the responsibility of XDG to provide build/install configuration. best regards, -- Markus Raab http://www.complang.tuwien.ac.at/raab/ TU Wien markus.r...@complang.tuwien.ac.at Compilers and Languages Phone: (+431) 58801/185185 Argentinierstr. 8, 1040 Wien, Austria DVR 0005886 ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg
Re: [PATCH 0/2] XDG basedir bin dirs
On Wed, 02 May 2018 at 13:02:51 -0700, Josh Triplett wrote: > On Wed, May 02, 2018 at 09:52:44PM +0200, Lennart Poettering wrote: > > However, I really don't see the benefit of adding individual > > configurability for each of the home dirs, because you should already > > have that anyway though the prefix dir you use when configuring your > > package... > > This would provide a standardized way to *configure* that prefix, > because not all the world's a ./configure --prefix. The motivating use > case for this, for instance, was Rust's Cargo package manager, which > would like to have a sensible default for where `cargo install` should > install binaries. Does `cargo install` have an equivalent of Autoconf --prefix, CMake CMAKE_INSTALL_PREFIX and Meson --prefix? If not, it should, and it can without freedesktop.org needing to standardize anything. Other build systems like Autoconf, CMake and Meson don't default to installing in a per-user location. Should cargo really be different? I don't think the developers of Autoconf, CMake and Meson are going to change their default prefix from /usr/local to some sort of XDG_PREFIX any time soon... smcv ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg
Re: [PATCH 0/2] XDG basedir bin dirs
On Wed, May 02, 2018 at 09:42:44PM +0200, Lennart Poettering wrote: > On Mi, 02.05.18 21:13, Lennart Poettering (mz...@0pointer.de) wrote: > > > So yeah, Allison also suggested that having a single "XDG_PREFIX" env > > var would have been the much better option, rather than have > > individual ones. Now, that ship sailed pretty much, but that's not > > reason enough to go for XDG_BIN_HOME really. I mean, "~/.local/" is > > hardcoded as fallback prefix into the spec, so we should just accept > > that here too, and admit that making this individually configurable > > wasn't the best of ideas. I mean, making the searhc paths dynamically > > configurable using an env var by all means made sense, but the "home" > > dirs? i am not convinced... > > > > But dunno, I am not feeling too strongly about this, but it appeared > > to me that just not doing an env var here was the best way to get this > > in quickly... > > So here's a strong reason for not having XDG_BIN_HOME: because $PATH > is not designed to refer to other env vars, it expects literal > paths. After all, for XDG_DATA_DIRS (and similar for the other search > path env vars) the basedir spec says that you need to search in both > XDG_DATA_DIRS and XDG_DATA_HOME, i.e. both variables are independent > of each other. But this is not how $PATH works: the variable is > implemented and respected all over the place, but what isn't listed in > it doesn't matter, hence we can define XDG_BIN_HOME as much as we > want, nobody would care, it would never be consulted. Tools that install binaries can and should consult it, and I'd like to see those tools not hardcoding ~/.local/bin. If someone sets $XDG_BIN_HOME, it'll be their responsibility to put the target directory in $PATH. A distribution could, by default, add ~/.local/bin to $PATH in /etc/skel/.bashrc, and if someone wants to set $XDG_BIN_HOME they can edit their own ~/.bashrc to do so. And for that matter, if the distribution itself wants to set $XDG_BIN_HOME they'll also set $PATH accordingly. - Josh Triplett ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg
Re: [PATCH 0/2] XDG basedir bin dirs
On Wed, May 02, 2018 at 09:52:44PM +0200, Lennart Poettering wrote: > Well, it's fine if people use different install prefixes. The question > though is if the xdg basedir spec really needs to care too much about > that. I mean, what matters really is that the XDG basedir spec defines > *search* paths env vars where we previously had none. The *home* paths > otoh are a different story, for them the extra configurability is > entirely unnecessary as I see it, as your app can drop stuff wherever > you want as long as there's a way to register that in the various > search paths. And when you place the stuff at arbitrary places, then > you probably should configure that through a prefix, not through the > individual home dirs of each individual concept... I don't have any objection to configuring this via an $XDG_PREFIX instead, defaulting to ~/.local, and then saying the binary directory is $XDG_PREFIX/bin. > However, I really don't see the benefit of adding individual > configurability for each of the home dirs, because you should already > have that anyway though the prefix dir you use when configuring your > package... This would provide a standardized way to *configure* that prefix, because not all the world's a ./configure --prefix. The motivating use case for this, for instance, was Rust's Cargo package manager, which would like to have a sensible default for where `cargo install` should install binaries. ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg
Re: [PATCH 0/2] XDG basedir bin dirs
On Mi, 02.05.18 21:13, Lennart Poettering (mz...@0pointer.de) wrote: > So yeah, Allison also suggested that having a single "XDG_PREFIX" env > var would have been the much better option, rather than have > individual ones. Now, that ship sailed pretty much, but that's not > reason enough to go for XDG_BIN_HOME really. I mean, "~/.local/" is > hardcoded as fallback prefix into the spec, so we should just accept > that here too, and admit that making this individually configurable > wasn't the best of ideas. I mean, making the searhc paths dynamically > configurable using an env var by all means made sense, but the "home" > dirs? i am not convinced... > > But dunno, I am not feeling too strongly about this, but it appeared > to me that just not doing an env var here was the best way to get this > in quickly... So here's a strong reason for not having XDG_BIN_HOME: because $PATH is not designed to refer to other env vars, it expects literal paths. After all, for XDG_DATA_DIRS (and similar for the other search path env vars) the basedir spec says that you need to search in both XDG_DATA_DIRS and XDG_DATA_HOME, i.e. both variables are independent of each other. But this is not how $PATH works: the variable is implemented and respected all over the place, but what isn't listed in it doesn't matter, hence we can define XDG_BIN_HOME as much as we want, nobody would care, it would never be consulted. Something similar applies to ~/.local/lib64/ and friends btw, if people want that. For shared libraries too there's already a search path variable defined, in LD_LIBRARY_PATH, and that too doesn't care about XDG_LIB_HOME. Hence defining XDG_LIB_HOME doesn't make much sense either... Hence let's no introduce env vars that can't be supported anyway please. Lennart -- Lennart Poettering, Red Hat ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg
Re: [PATCH 0/2] XDG basedir bin dirs
On Wed, May 02, 2018 at 09:13:40PM +0200, Lennart Poettering wrote: > On Mi, 02.05.18 11:30, Josh Triplett (j...@joshtriplett.org) wrote: > > > On Wed, May 02, 2018 at 07:53:47PM +0200, Lennart Poettering wrote: > > > On Di, 29.08.17 18:42, Johannes Löthberg (johan...@kyriasis.com) wrote: > > > > > > heya, > > > > > > > I've had some old patches around for the XDG basedir spec, and figured > > > > I > > > > might as well finally send them in and see what people think. > > > > > > > > The first one just reformats some text and fixes some inconsistent > > > > indentation, so should be pretty uncontroversial. > > > > > > > > The second patch adds XDG_BIN_HOME and XDG_BIN_DIRS to the basedir > > > > spec, > > > > standardizing ~/.local/bin as the default user-specific bin directory. > > > > > > Sorry for dropping the ball on this one. > > > > > > The whole discussion just came up on fedora devel again, so I figured > > > I really should merge this now. I hence pinged Allison about this, one > > > of the original spec authors, and she suggested we should not define > > > any new env vars but simply document the dir as ~/.local/bin. > > > > While I don't think we need the full complexity of $XDG_BIN_DIRS, having > > $XDG_BIN_HOME to override seems useful, for the same reason as the rest > > of the $XDG_* variables. (With the full benefit of hindsight, I'd have > > suggested having a single $XDG_HOME that defaults to ~/.local, serving as > > the root for > > everything except $XDG_CONFIG_HOME, so that people could choose to point > > it somewhere other than ~/.local without having to set a pile of > > individual variables, but I don't think we can do anything > > about that now. So given the current state, I think we should have an > > $XDG_BIN_HOME analogous to the other $XDG_* variables to allow people to > > point this elsewhere if they want. If they do, they'll have to take care > > of getting it into $PATH and similar, but tools that install binaries > > can use the desired directory as the target for installation.) > > So yeah, Allison also suggested that having a single "XDG_PREFIX" env > var would have been the much better option, rather than have > individual ones. Now, that ship sailed pretty much, but that's not > reason enough to go for XDG_BIN_HOME really. I mean, "~/.local/" is > hardcoded as fallback prefix into the spec, so we should just accept > that here too, and admit that making this individually configurable > wasn't the best of ideas. I mean, making the searhc paths dynamically > configurable using an env var by all means made sense, but the "home" > dirs? i am not convinced... > > But dunno, I am not feeling too strongly about this, but it appeared > to me that just not doing an env var here was the best way to get this > in quickly... In the issue that originally motivated this, multiple people specifically requested the ability to customize the target directory, because their platform doesn't use ~/.local and wants to put that somewhere else. This isn't a "maybe someone might use this someday", this is "people specifically asked for this and intend to use it". ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg
Re: [PATCH 0/2] XDG basedir bin dirs
On Wed, 02 May 2018 at 11:30:04 -0700, Josh Triplett wrote: > With the full benefit of hindsight, I'd have > suggested having a single $XDG_HOME that defaults to ~/.local, serving as the > root for > everything except $XDG_CONFIG_HOME, so that people could choose to point > it somewhere other than ~/.local without having to set a pile of > individual variables As you noted, XDG_CONFIG_HOME doesn't/shouldn't go in ~/.local, and XDG_CACHE_HOME doesn't/shouldn't go in ~/.local either, so actually that pile of individual variables is just XDG_DATA_HOME and the proposed XDG_BIN_HOME, and possibly XDG_LIB_HOME if someone really wants it in future. What is this variable for? Is it for applications that write out data, or is it just as a default for build systems that want to install "packages" into the home directory? I suspect only the latter, so maybe XDG_PREFIX or XDG_LOCAL_INSTALL or something would make more sense? (With the caveat that if you set XDG_DATA_HOME and XDG_PREFIX in contradictory ways, finding just-installed .desktop, .service etc. files won't work as intended - but the same is true of PATH and your proposed XDG_BIN_HOME, or LD_LIBRARY_PATH and a hypothetical XDG_LIB_HOME, already.) smcv ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg
Re: [PATCH 0/2] XDG basedir bin dirs
On Mi, 02.05.18 11:30, Josh Triplett (j...@joshtriplett.org) wrote: > On Wed, May 02, 2018 at 07:53:47PM +0200, Lennart Poettering wrote: > > On Di, 29.08.17 18:42, Johannes Löthberg (johan...@kyriasis.com) wrote: > > > > heya, > > > > > I've had some old patches around for the XDG basedir spec, and figured I > > > might as well finally send them in and see what people think. > > > > > > The first one just reformats some text and fixes some inconsistent > > > indentation, so should be pretty uncontroversial. > > > > > > The second patch adds XDG_BIN_HOME and XDG_BIN_DIRS to the basedir spec, > > > standardizing ~/.local/bin as the default user-specific bin directory. > > > > Sorry for dropping the ball on this one. > > > > The whole discussion just came up on fedora devel again, so I figured > > I really should merge this now. I hence pinged Allison about this, one > > of the original spec authors, and she suggested we should not define > > any new env vars but simply document the dir as ~/.local/bin. > > While I don't think we need the full complexity of $XDG_BIN_DIRS, having > $XDG_BIN_HOME to override seems useful, for the same reason as the rest > of the $XDG_* variables. (With the full benefit of hindsight, I'd have > suggested having a single $XDG_HOME that defaults to ~/.local, serving as the > root for > everything except $XDG_CONFIG_HOME, so that people could choose to point > it somewhere other than ~/.local without having to set a pile of > individual variables, but I don't think we can do anything > about that now. So given the current state, I think we should have an > $XDG_BIN_HOME analogous to the other $XDG_* variables to allow people to > point this elsewhere if they want. If they do, they'll have to take care > of getting it into $PATH and similar, but tools that install binaries > can use the desired directory as the target for installation.) So yeah, Allison also suggested that having a single "XDG_PREFIX" env var would have been the much better option, rather than have individual ones. Now, that ship sailed pretty much, but that's not reason enough to go for XDG_BIN_HOME really. I mean, "~/.local/" is hardcoded as fallback prefix into the spec, so we should just accept that here too, and admit that making this individually configurable wasn't the best of ideas. I mean, making the searhc paths dynamically configurable using an env var by all means made sense, but the "home" dirs? i am not convinced... But dunno, I am not feeling too strongly about this, but it appeared to me that just not doing an env var here was the best way to get this in quickly... Lennart -- Lennart Poettering, Red Hat ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg
Re: [PATCH 0/2] XDG basedir bin dirs
On Wed, May 02, 2018 at 07:53:47PM +0200, Lennart Poettering wrote: > On Di, 29.08.17 18:42, Johannes Löthberg (johan...@kyriasis.com) wrote: > > heya, > > > I've had some old patches around for the XDG basedir spec, and figured I > > might as well finally send them in and see what people think. > > > > The first one just reformats some text and fixes some inconsistent > > indentation, so should be pretty uncontroversial. > > > > The second patch adds XDG_BIN_HOME and XDG_BIN_DIRS to the basedir spec, > > standardizing ~/.local/bin as the default user-specific bin directory. > > Sorry for dropping the ball on this one. > > The whole discussion just came up on fedora devel again, so I figured > I really should merge this now. I hence pinged Allison about this, one > of the original spec authors, and she suggested we should not define > any new env vars but simply document the dir as ~/.local/bin. While I don't think we need the full complexity of $XDG_BIN_DIRS, having $XDG_BIN_HOME to override seems useful, for the same reason as the rest of the $XDG_* variables. (With the full benefit of hindsight, I'd have suggested having a single $XDG_HOME that defaults to ~/.local, serving as the root for everything except $XDG_CONFIG_HOME, so that people could choose to point it somewhere other than ~/.local without having to set a pile of individual variables, but I don't think we can do anything about that now. So given the current state, I think we should have an $XDG_BIN_HOME analogous to the other $XDG_* variables to allow people to point this elsewhere if they want. If they do, they'll have to take care of getting it into $PATH and similar, but tools that install binaries can use the desired directory as the target for installation.) - Josh Triplett ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg
Re: [PATCH 0/2] XDG basedir bin dirs
On Di, 29.08.17 18:42, Johannes Löthberg (johan...@kyriasis.com) wrote: heya, > I've had some old patches around for the XDG basedir spec, and figured I > might as well finally send them in and see what people think. > > The first one just reformats some text and fixes some inconsistent > indentation, so should be pretty uncontroversial. > > The second patch adds XDG_BIN_HOME and XDG_BIN_DIRS to the basedir spec, > standardizing ~/.local/bin as the default user-specific bin directory. Sorry for dropping the ball on this one. The whole discussion just came up on fedora devel again, so I figured I really should merge this now. I hence pinged Allison about this, one of the original spec authors, and she suggested we should not define any new env vars but simply document the dir as ~/.local/bin. That made sense to me, and I have taken the liberty to change your patches accordingly now, and dropped all references to any new env var, I hope that's OK. I have however added a reference to UNIX $PATH, and added that distros really should add ~/.local/bin to that path. I have then posted the updated patch set here: https://bugzilla.freedesktop.org/show_bug.cgi?id=106360 PTAL! Maybe we'll get some more feedback if this is tracked in bugzilla too. If not, I'll merge this like this in a day or two, but maybe Allison beats me to it. Anyway, sorry again for all the delays, let's get this settled, finally! Lennart -- Lennart Poettering, Red Hat ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg
Re: [PATCH 0/2] XDG basedir bin dirs
On Tuesday, August 29, 2017 12:42:01 PM Johannes Löthberg wrote: > The second patch adds XDG_BIN_HOME and XDG_BIN_DIRS to the basedir spec, > standardizing ~/.local/bin as the default user-specific bin directory. I didn't look at the patches (sorry), but I'll comment anyway--as long as it is just standardizing ~/.local/bin as the *default* user-specific bin directory, I have no objection. But, I move all user specific configuration and similar files completely out of ~/ to a (non-standard named) top level directory, e.g., //local/bin. And, in general, I keep those directories visible, not hidden. ___ xdg mailing list xdg@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/xdg