* [PR PATCH] xbps-src: allow loading xbp-src.conf from XDG compliant dirs
@ 2020-05-08 14:12 Johnnynator
2020-05-08 14:14 ` [PR PATCH] [Updated] " Johnnynator
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Johnnynator @ 2020-05-08 14:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 353 bytes --]
There is a new pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages xdg
https://github.com/void-linux/void-packages/pull/21746
xbps-src: allow loading xbp-src.conf from XDG compliant dirs
None
A patch file from https://github.com/void-linux/void-packages/pull/21746.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-21746.patch --]
[-- Type: text/x-diff, Size: 956 bytes --]
From f98dd80fd75c4d26c2b7a2fde695a1934c4d6dc1 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Fri, 8 May 2020 16:09:48 +0200
Subject: [PATCH] xbps-src: allow loading xbp-src.conf from XDG compliant dirs
---
xbps-src | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xbps-src b/xbps-src
index 68765b6c248..20319101128 100755
--- a/xbps-src
+++ b/xbps-src
@@ -428,6 +428,10 @@ else
elif [ -s $XBPS_DISTDIR/etc/conf ]; then
# ... otherwise read generic user configuration...
readonly XBPS_CONFIG_FILE=$XBPS_DISTDIR/etc/conf
+ elif [ -s $XDG_CONFIG_HOME/xbps-src.conf ]; then
+ readonly XBPS_CONFIG_FILE=$XDG_CONFIG_HOME/xbps-src.conf
+ elif [ -s $HOME/.config/xbps-src.conf ]; then
+ readonly XBPS_CONFIG_FILE=$HOME/.config/xbps-src.conf
elif [ -s $HOME/.xbps-src.conf ]; then
# ... fallback to ~/.xbps-src.conf otherwise.
readonly XBPS_CONFIG_FILE=$HOME/.xbps-src.conf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] xbps-src: allow loading xbp-src.conf from XDG compliant dirs
2020-05-08 14:12 [PR PATCH] xbps-src: allow loading xbp-src.conf from XDG compliant dirs Johnnynator
@ 2020-05-08 14:14 ` Johnnynator
2020-05-08 16:33 ` Chocimier
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2020-05-08 14:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages xdg
https://github.com/void-linux/void-packages/pull/21746
xbps-src: allow loading xbp-src.conf from XDG compliant dirs
None
A patch file from https://github.com/void-linux/void-packages/pull/21746.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-21746.patch --]
[-- Type: text/x-diff, Size: 1754 bytes --]
From e4c7789d85a16104a8397a99046b9dbcee2db6e7 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Fri, 8 May 2020 16:09:48 +0200
Subject: [PATCH] xbps-src: allow loading xbp-src.conf from XDG compliant dirs
---
README.md | 2 +-
xbps-src | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 752fb3d4fdc..3dffd2b4511 100644
--- a/README.md
+++ b/README.md
@@ -165,7 +165,7 @@ If you don't want to waste your time building everything from scratch probably i
The `etc/defaults.conf` file contains the possible settings that can be overridden
through the `etc/conf` configuration file for the `xbps-src` utility; if that file
-does not exist, will try to read configuration settings from `~/.xbps-src.conf`.
+does not exist, will try to read configuration settings from `$XDG_CONFIG_HOME/xbps-src.conf`, `~/.config/xbps-src.conf`, `~/.xbps-src.conf`.
If you want to customize default `CFLAGS`, `CXXFLAGS` and `LDFLAGS`, don't override
those defined in `etc/defaults.conf`, set them on `etc/conf` instead i.e:
diff --git a/xbps-src b/xbps-src
index 68765b6c248..20319101128 100755
--- a/xbps-src
+++ b/xbps-src
@@ -428,6 +428,10 @@ else
elif [ -s $XBPS_DISTDIR/etc/conf ]; then
# ... otherwise read generic user configuration...
readonly XBPS_CONFIG_FILE=$XBPS_DISTDIR/etc/conf
+ elif [ -s $XDG_CONFIG_HOME/xbps-src.conf ]; then
+ readonly XBPS_CONFIG_FILE=$XDG_CONFIG_HOME/xbps-src.conf
+ elif [ -s $HOME/.config/xbps-src.conf ]; then
+ readonly XBPS_CONFIG_FILE=$HOME/.config/xbps-src.conf
elif [ -s $HOME/.xbps-src.conf ]; then
# ... fallback to ~/.xbps-src.conf otherwise.
readonly XBPS_CONFIG_FILE=$HOME/.xbps-src.conf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xbps-src: allow loading xbp-src.conf from XDG compliant dirs
2020-05-08 14:12 [PR PATCH] xbps-src: allow loading xbp-src.conf from XDG compliant dirs Johnnynator
2020-05-08 14:14 ` [PR PATCH] [Updated] " Johnnynator
@ 2020-05-08 16:33 ` Chocimier
2020-05-08 16:46 ` [PR PATCH] [Updated] " Johnnynator
2020-05-08 22:16 ` [PR PATCH] [Merged]: " Johnnynator
3 siblings, 0 replies; 5+ messages in thread
From: Chocimier @ 2020-05-08 16:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 360 bytes --]
New comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/21746#issuecomment-625900383
Comment:
Nice.
Per [spec](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables) it should be rather `${XDG_CONFIG_HOME:-$HOME/.config}/xbps-src.conf` to not read .config when `XDG_` is set.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] xbps-src: allow loading xbp-src.conf from XDG compliant dirs
2020-05-08 14:12 [PR PATCH] xbps-src: allow loading xbp-src.conf from XDG compliant dirs Johnnynator
2020-05-08 14:14 ` [PR PATCH] [Updated] " Johnnynator
2020-05-08 16:33 ` Chocimier
@ 2020-05-08 16:46 ` Johnnynator
2020-05-08 22:16 ` [PR PATCH] [Merged]: " Johnnynator
3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2020-05-08 16:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 358 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages xdg
https://github.com/void-linux/void-packages/pull/21746
xbps-src: allow loading xbp-src.conf from XDG compliant dirs
None
A patch file from https://github.com/void-linux/void-packages/pull/21746.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-21746.patch --]
[-- Type: text/x-diff, Size: 1671 bytes --]
From ef637a9553838a3203387dc3340c5eb16ab5a6a4 Mon Sep 17 00:00:00 2001
From: John <me@johnnynator.dev>
Date: Fri, 8 May 2020 16:09:48 +0200
Subject: [PATCH] xbps-src: allow loading xbp-src.conf from XDG compliant dirs
---
README.md | 2 +-
xbps-src | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 752fb3d4fdc..3dffd2b4511 100644
--- a/README.md
+++ b/README.md
@@ -165,7 +165,7 @@ If you don't want to waste your time building everything from scratch probably i
The `etc/defaults.conf` file contains the possible settings that can be overridden
through the `etc/conf` configuration file for the `xbps-src` utility; if that file
-does not exist, will try to read configuration settings from `~/.xbps-src.conf`.
+does not exist, will try to read configuration settings from `$XDG_CONFIG_HOME/xbps-src.conf`, `~/.config/xbps-src.conf`, `~/.xbps-src.conf`.
If you want to customize default `CFLAGS`, `CXXFLAGS` and `LDFLAGS`, don't override
those defined in `etc/defaults.conf`, set them on `etc/conf` instead i.e:
diff --git a/xbps-src b/xbps-src
index 68765b6c248..888bc3c474a 100755
--- a/xbps-src
+++ b/xbps-src
@@ -428,6 +428,8 @@ else
elif [ -s $XBPS_DISTDIR/etc/conf ]; then
# ... otherwise read generic user configuration...
readonly XBPS_CONFIG_FILE=$XBPS_DISTDIR/etc/conf
+ elif [ -s ${XDG_CONFIG_HOME:-$HOME/.config}/xbps-src.conf ]; then
+ readonly XBPS_CONFIG_FILE=${XDG_CONFIG_HOME:-$HOME/.config}/xbps-src.conf
elif [ -s $HOME/.xbps-src.conf ]; then
# ... fallback to ~/.xbps-src.conf otherwise.
readonly XBPS_CONFIG_FILE=$HOME/.xbps-src.conf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Merged]: xbps-src: allow loading xbp-src.conf from XDG compliant dirs
2020-05-08 14:12 [PR PATCH] xbps-src: allow loading xbp-src.conf from XDG compliant dirs Johnnynator
` (2 preceding siblings ...)
2020-05-08 16:46 ` [PR PATCH] [Updated] " Johnnynator
@ 2020-05-08 22:16 ` Johnnynator
3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2020-05-08 22:16 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 198 bytes --]
There's a merged pull request on the void-packages repository
xbps-src: allow loading xbp-src.conf from XDG compliant dirs
https://github.com/void-linux/void-packages/pull/21746
Description:
None
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-08 22:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 14:12 [PR PATCH] xbps-src: allow loading xbp-src.conf from XDG compliant dirs Johnnynator
2020-05-08 14:14 ` [PR PATCH] [Updated] " Johnnynator
2020-05-08 16:33 ` Chocimier
2020-05-08 16:46 ` [PR PATCH] [Updated] " Johnnynator
2020-05-08 22:16 ` [PR PATCH] [Merged]: " Johnnynator
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).