Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement XDG Base Directory Specification support #63

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

unrealapex
Copy link
Contributor

@unrealapex unrealapex commented Sep 17, 2024

TODO

  • handle non standard XDG_CONFIG_HOME
    • read XDG environment variables and use fall backs if they are not set.
  • update documentation
  • change history.txt path?
    • help users migrate to new path at XDG_STATE_HOME/yash
  • rename PR name
  • rebase version history
  • update tests

Closes #19

@unrealapex unrealapex marked this pull request as draft September 17, 2024 05:56
@unrealapex unrealapex changed the title Make config respect XDG specification Make Yash respect XDG Base Directory Specification Sep 19, 2024
@unrealapex unrealapex marked this pull request as ready for review September 19, 2024 21:02
variable.h Outdated Show resolved Hide resolved
Copy link
Owner

@magicant magicant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for your extensive efforts, including updates to the initialization scripts and documentation. To make sure that the code works as expected for all users, could you address my comments below?

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
variable.h Outdated Show resolved Hide resolved
share/initialization/common Outdated Show resolved Hide resolved
doc/faq.txt Outdated Show resolved Hide resolved
@unrealapex unrealapex force-pushed the xdg-compliance branch 3 times, most recently from ac33b94 to b3d10b3 Compare September 23, 2024 23:56
share/initialization/common Outdated Show resolved Hide resolved
share/initialization/default Show resolved Hide resolved
share/initialization/common Outdated Show resolved Hide resolved
share/initialization/default Outdated Show resolved Hide resolved
share/initialization/default Show resolved Hide resolved
yash.c Outdated Show resolved Hide resolved
yash.c Outdated Show resolved Hide resolved
doc/invoke.txt Outdated Show resolved Hide resolved
yash.c Outdated Show resolved Hide resolved
yash.c Outdated Show resolved Hide resolved
@unrealapex unrealapex changed the title Make Yash respect XDG Base Directory Specification Implement XDG Base Directory Specification support Sep 28, 2024
@unrealapex
Copy link
Contributor Author

unrealapex commented Sep 28, 2024

It appears there is some unintended errors in the tests resulting from local configuration. Would you please be able to look into why the tests are behaving like this and also update them to work with the new configuration file locations? I have "Allow edits by maintainers" enabled so you should be able to push commits to my fork.

summary.log
Linux sakura 6.10.11-gentoo-dist #1 SMP PREEMPT_DYNAMIC Wed Sep 18 18:49:44 -00 2024 x86_64 Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz GenuineIntel GNU/Linux
Sat Sep 28 01:29:52 PDT 2024
=============

%%% START: error-y.tst:20: syntax error spares interactive shell
% standard output diff:
--- - 2024-09-28 01:29:36.530267851 -0700
+++ 20.out 2024-09-28 01:29:36.523359617 -0700
@@ -1 +1 @@
-0
+1

% standard error (expecting non-empty output):
.: file initialization/common' was not found in $YASH_LOADPATH aaron@:tmp.2670 $ syntax error: encountered fi' without a matching if' and/or then'
aaron@:tmp.2670 $ aaron@:tmp.2670 $
%%% FAILED: error-y.tst:20: syntax error spares interactive shell

%%% START: errretur-y.tst:341: errexit: expansion error in for word
% exit status: expected=non-zero actual=1

% standard output diff:
--- - 2024-09-28 01:29:38.669499178 -0700
+++ 341.out 2024-09-28 01:29:38.660026343 -0700
@@ -1 +0,0 @@
-reached

%%% FAILED: errretur-y.tst:341: errexit: expansion error in for word

%%% START: errretur-y.tst:392: errexit: expansion error in case word
% exit status: expected=non-zero actual=1

% standard output diff:
--- - 2024-09-28 01:29:38.697969111 -0700
+++ 392.out 2024-09-28 01:29:38.690026343 -0700
@@ -1 +0,0 @@
-reached

%%% FAILED: errretur-y.tst:392: errexit: expansion error in case word

%%% START: errretur-y.tst:407: errexit: expansion error in case pattern
% exit status: expected=non-zero actual=1

% standard output diff:
--- - 2024-09-28 01:29:38.713630537 -0700
+++ 407.out 2024-09-28 01:29:38.703359676 -0700
@@ -1 +0,0 @@
-reached

%%% FAILED: errretur-y.tst:407: errexit: expansion error in case pattern

%%% START: job-y.tst:10: interactive shell reports job status before prompt
% standard error diff:
--- - 2024-09-28 01:29:44.123000673 -0700
+++ 10.err 2024-09-28 01:29:44.113359829 -0700
@@ -1,3 +1,4 @@
-$
+.: file `initialization/common' was not found in $YASH_LOADPATH
+aaron@:tmp.8782 $
[1] + Done sleep 0
-$ done
+aaron@:tmp.8782 $ done

%%% FAILED: job-y.tst:10: interactive shell reports job status before prompt

%%% START: prompt-y.tst:115: YASH_PSx precedes PSx (non-POSIX)
% standard error diff:
--- - 2024-09-28 01:29:45.595644771 -0700
+++ 115.err 2024-09-28 01:29:45.590026537 -0700
@@ -1,2 +1,3 @@
-$
+.: file `initialization/common' was not found in $YASH_LOADPATH
+aaron@:tmp.10701 $
YES1YES2

%%% FAILED: prompt-y.tst:115: YASH_PSx precedes PSx (non-POSIX)

%%% START: prompt-y.tst:124: expansion and substitution in PS1
% standard error diff:
--- - 2024-09-28 01:29:45.602193682 -0700
+++ 124.err 2024-09-28 01:29:45.596693203 -0700
@@ -1,3 +1,4 @@
-$
-?
-! !! $
+.: file `initialization/common' was not found in $YASH_LOADPATH
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $

%%% FAILED: prompt-y.tst:124: expansion and substitution in PS1

%%% START: prompt-y.tst:136: backslash notations in PS1
% standard error diff:
--- - 2024-09-28 01:29:45.610453704 -0700
+++ 136.err 2024-09-28 01:29:45.603359870 -0700
@@ -1,3 +1,3 @@
-$
-� �

\ $
+.: file `initialization/common' was not found in $YASH_LOADPATH
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $

%%% FAILED: prompt-y.tst:136: backslash notations in PS1

%%% START: prompt-y.tst:147: backslash notations in PS2
% standard error diff:
--- - 2024-09-28 01:29:45.617938148 -0700
+++ 147.err 2024-09-28 01:29:45.610026537 -0700
@@ -1,3 +1,4 @@
-$
-$ � �
+.: file `initialization/common' was not found in $YASH_LOADPATH
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $ � �

\ >

%%% FAILED: prompt-y.tst:147: backslash notations in PS2

%%% START: prompt-y.tst:157: \j in PS1: shows job count
% standard error diff:
--- - 2024-09-28 01:29:45.624469760 -0700
+++ 157.err 2024-09-28 01:29:45.616693204 -0700
@@ -1,6 +1,7 @@
-$
-0$
-1$
-2$
-1$
-0$
+.: file `initialization/common' was not found in $YASH_LOADPATH
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $

%%% FAILED: prompt-y.tst:157: \j in PS1: shows job count

%%% START: prompt-y.tst:178: \j in PS1 and -b option
% standard error diff:
--- - 2024-09-28 01:29:45.636133249 -0700
+++ 178.err 2024-09-28 01:29:45.630026538 -0700
@@ -1,6 +1,7 @@
-$
-0$[1] + Running exec 1>fifo
+.: file `initialization/common' was not found in $YASH_LOADPATH
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $ [1] + Running exec 1>fifo

-1$[1] + Done exec 1>fifo
-0$
-0$
+aaron@:tmp.10701 $ [1] + Done exec 1>fifo
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $

%%% FAILED: prompt-y.tst:178: \j in PS1 and -b option

%%% START: prompt-y.tst:193: prompt command
% standard error diff:
--- - 2024-09-28 01:29:45.643558789 -0700
+++ 193.err 2024-09-28 01:29:45.636693205 -0700
@@ -1,3 +1,4 @@
-$
-1$ > 0
-123$ 1
+.: file `initialization/common' was not found in $YASH_LOADPATH
+aaron@:tmp.10701 $
+1aaron@:tmp.10701 $ > 0
+123aaron@:tmp.10701 $ 1

%%% FAILED: prompt-y.tst:193: prompt command

%%% START: prompt-y.tst:204: value of $COMMAND in post-prompt command
% standard output diff:

% standard error diff:
--- - 2024-09-28 01:29:45.652682011 -0700
+++ 204.err 2024-09-28 01:29:45.643359871 -0700
@@ -1,2 +1,3 @@
-$ $ [echo foo]
+.: file `initialization/common' was not found in $YASH_LOADPATH
+aaron@:tmp.10701 $ aaron@:tmp.10701 $ [echo foo]

[bar; exit]

%%% FAILED: prompt-y.tst:204: value of $COMMAND in post-prompt command

%%% START: prompt-y.tst:232: $ in PS1 and PS2 (non-root)
% standard error diff:
--- - 2024-09-28 01:29:45.674448341 -0700
+++ 232.err 2024-09-28 01:29:45.666693205 -0700
@@ -1,2 +1,3 @@
-$
-$ $$
+.: file `initialization/common' was not found in $YASH_LOADPATH
+aaron@:tmp.10701 $
+aaron@:tmp.10701 $ $$

%%% FAILED: prompt-y.tst:232: $ in PS1 and PS2 (non-root)

%%% SKIPPED: prompt-y.tst:249: $ in PS1 and PS2 (root)

%%% SKIPPED: prompt-y.tst:269: default prompt strings (root)

%%% START: startup-y.tst:78: startup: -cl, short option, with profile
% standard output diff:
--- - 2024-09-28 01:29:48.214438576 -0700
+++ 78.out 2024-09-28 01:29:47.873359934 -0700
@@ -1,2 +0,0 @@
-profile
-cl

% standard error diff:
--- - 2024-09-28 01:29:48.215571080 -0700
+++ 78.err 2024-09-28 01:29:48.206693276 -0700
@@ -0,0 +1,37 @@
+

+xauth: (stdin):1: bad display name "sakura:1" in "add" command
+
+
+X.Org X Server 1.21.1.13
+X Protocol Version 11, Revision 0
+Current Operating System: Linux sakura 6.10.11-gentoo-dist #1 SMP PREEMPT_DYNAMIC Wed Sep 18 18:49:44 -00 2024 x86_64
+Kernel command line: BOOT_IMAGE=/vmlinuz-6.10.11-gentoo-dist root=UUID=49614b6a-ead7-4e86-beac-9e3018042b78 ro
+
+Current version of pixman: 0.43.4

  • Before reporting problems, check http://wiki.x.org
  • to make sure that you have the latest version.
    +Markers: (--) probed, (**) from config file, (==) default setting,
  • (++) from command line, (!!) notice, (II) informational,
  • (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    +(==) Log file: "/home/aaron/projects/yash/tests/tmp.13882/home62/.local/share/xorg/Xorg.1.log", Time: Sat Sep 28 01:29:48 2024
    +(==) Using system config directory "/usr/share/X11/xorg.conf.d"
    +(EE)
    +Fatal server error:
    +(EE) xf86OpenConsole: Switching VT failed
    +(EE)
    +(EE)
    +Please consult the The X.Org Foundation support
  • at http://wiki.x.org
  • for help.
    +(EE) Please also check the log file at "/home/aaron/projects/yash/tests/tmp.13882/home62/.local/share/xorg/Xorg.1.log" for additional information.
    +(EE)
    +(EE) Server terminated with error (1). Closing log file.
    +xinit: giving up
    +xinit: unable to connect to X server: Connection refused
    +xinit: server error
    +xauth: (argv):1: bad display name "sakura:1" in "remove" command
    +Couldn't get a file descriptor referring to the console.

%%% FAILED: startup-y.tst:78: startup: -cl, short option, with profile

%%% START: startup-y.tst:84: startup: -cl, long option, with profile
% standard output diff:
--- - 2024-09-28 01:29:48.344473948 -0700
+++ 84.out 2024-09-28 01:29:48.213359944 -0700
@@ -1,2 +0,0 @@
-profile
-cl

% standard error diff:
--- - 2024-09-28 01:29:48.345644503 -0700
+++ 84.err 2024-09-28 01:29:48.336693281 -0700
@@ -0,0 +1,37 @@
+

+xauth: (stdin):1: bad display name "sakura:1" in "add" command
+
+
+X.Org X Server 1.21.1.13
+X Protocol Version 11, Revision 0
+Current Operating System: Linux sakura 6.10.11-gentoo-dist #1 SMP PREEMPT_DYNAMIC Wed Sep 18 18:49:44 -00 2024 x86_64
+Kernel command line: BOOT_IMAGE=/vmlinuz-6.10.11-gentoo-dist root=UUID=49614b6a-ead7-4e86-beac-9e3018042b78 ro
+
+Current version of pixman: 0.43.4

  • Before reporting problems, check http://wiki.x.org
  • to make sure that you have the latest version.
    +Markers: (--) probed, (**) from config file, (==) default setting,
  • (++) from command line, (!!) notice, (II) informational,
  • (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    +(==) Log file: "/home/aaron/projects/yash/tests/tmp.13882/home62/.local/share/xorg/Xorg.1.log", Time: Sat Sep 28 01:29:48 2024
    +(==) Using system config directory "/usr/share/X11/xorg.conf.d"
    +(EE)
    +Fatal server error:
    +(EE) xf86OpenConsole: Switching VT failed
    +(EE)
    +(EE)
    +Please consult the The X.Org Foundation support
  • at http://wiki.x.org
  • for help.
    +(EE) Please also check the log file at "/home/aaron/projects/yash/tests/tmp.13882/home62/.local/share/xorg/Xorg.1.log" for additional information.
    +(EE)
    +(EE) Server terminated with error (1). Closing log file.
    +xinit: giving up
    +xinit: unable to connect to X server: Connection refused
    +xinit: server error
    +xauth: (argv):1: bad display name "sakura:1" in "remove" command
    +Couldn't get a file descriptor referring to the console.

%%% FAILED: startup-y.tst:84: startup: -cl, long option, with profile

%%% START: startup-y.tst:90: startup: -ci +m, short option, with rcfile
% standard output diff:
--- - 2024-09-28 01:29:48.351179924 -0700
+++ 90.out 2024-09-28 01:29:48.343359947 -0700
@@ -1,2 +1 @@
-yashrc
ci

% standard error diff:
--- - 2024-09-28 01:29:48.352347243 -0700
+++ 90.err 2024-09-28 01:29:48.343359947 -0700
@@ -0,0 +1 @@
+.: file `initialization/common' was not found in $YASH_LOADPATH

%%% FAILED: startup-y.tst:90: startup: -ci +m, short option, with rcfile

%%% START: startup-y.tst:96: startup: -ci +m, long option, with rcfile
% standard output diff:
--- - 2024-09-28 01:29:48.358954935 -0700
+++ 96.out 2024-09-28 01:29:48.353359948 -0700
@@ -1,2 +1 @@
-yashrc
ci

% standard error diff:
--- - 2024-09-28 01:29:48.361298703 -0700
+++ 96.err 2024-09-28 01:29:48.353359948 -0700
@@ -0,0 +1 @@
+.: file `initialization/common' was not found in $YASH_LOADPATH

%%% FAILED: startup-y.tst:96: startup: -ci +m, long option, with rcfile

%%% START: startup-y.tst:103: startup: -cil +m, short option, with profile/rcfile
% standard output diff:
--- - 2024-09-28 01:29:48.481208059 -0700
+++ 103.out 2024-09-28 01:29:48.360026615 -0700
@@ -1,3 +0,0 @@
-profile
-yashrc
-cil

% standard error diff:
--- - 2024-09-28 01:29:48.486772736 -0700
+++ 103.err 2024-09-28 01:29:48.470026618 -0700
@@ -0,0 +1,37 @@
+

+xauth: (stdin):1: bad display name "sakura:1" in "add" command
+
+
+X.Org X Server 1.21.1.13
+X Protocol Version 11, Revision 0
+Current Operating System: Linux sakura 6.10.11-gentoo-dist #1 SMP PREEMPT_DYNAMIC Wed Sep 18 18:49:44 -00 2024 x86_64
+Kernel command line: BOOT_IMAGE=/vmlinuz-6.10.11-gentoo-dist root=UUID=49614b6a-ead7-4e86-beac-9e3018042b78 ro
+
+Current version of pixman: 0.43.4

  • Before reporting problems, check http://wiki.x.org
  • to make sure that you have the latest version.
    +Markers: (--) probed, (**) from config file, (==) default setting,
  • (++) from command line, (!!) notice, (II) informational,
  • (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    +(==) Log file: "/home/aaron/projects/yash/tests/tmp.13882/home62/.local/share/xorg/Xorg.1.log", Time: Sat Sep 28 01:29:48 2024
    +(==) Using system config directory "/usr/share/X11/xorg.conf.d"
    +(EE)
    +Fatal server error:
    +(EE) xf86OpenConsole: Switching VT failed
    +(EE)
    +(EE)
    +Please consult the The X.Org Foundation support
  • at http://wiki.x.org
  • for help.
    +(EE) Please also check the log file at "/home/aaron/projects/yash/tests/tmp.13882/home62/.local/share/xorg/Xorg.1.log" for additional information.
    +(EE)
    +(EE) Server terminated with error (1). Closing log file.
    +xinit: giving up
    +xinit: unable to connect to X server: Connection refused
    +xinit: server error
    +xauth: (argv):1: bad display name "sakura:1" in "remove" command
    +Couldn't get a file descriptor referring to the console.

%%% FAILED: startup-y.tst:103: startup: -cil +m, short option, with profile/rcfile

%%% START: startup-y.tst:110: startup: -cil +m, long option, with profile/rcfile
% standard output diff:
--- - 2024-09-28 01:29:48.643328034 -0700
+++ 110.out 2024-09-28 01:29:48.490026617 -0700
@@ -1,3 +0,0 @@
-profile
-yashrc
-cil

% standard error diff:
--- - 2024-09-28 01:29:48.644437595 -0700
+++ 110.err 2024-09-28 01:29:48.636693289 -0700
@@ -0,0 +1,37 @@
+

+xauth: (stdin):1: bad display name "sakura:1" in "add" command
+
+
+X.Org X Server 1.21.1.13
+X Protocol Version 11, Revision 0
+Current Operating System: Linux sakura 6.10.11-gentoo-dist #1 SMP PREEMPT_DYNAMIC Wed Sep 18 18:49:44 -00 2024 x86_64
+Kernel command line: BOOT_IMAGE=/vmlinuz-6.10.11-gentoo-dist root=UUID=49614b6a-ead7-4e86-beac-9e3018042b78 ro
+
+Current version of pixman: 0.43.4

  • Before reporting problems, check http://wiki.x.org
  • to make sure that you have the latest version.
    +Markers: (--) probed, (**) from config file, (==) default setting,
  • (++) from command line, (!!) notice, (II) informational,
  • (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    +(==) Log file: "/home/aaron/projects/yash/tests/tmp.13882/home62/.local/share/xorg/Xorg.1.log", Time: Sat Sep 28 01:29:48 2024
    +(==) Using system config directory "/usr/share/X11/xorg.conf.d"
    +(EE)
    +Fatal server error:
    +(EE) xf86OpenConsole: Switching VT failed
    +(EE)
    +(EE)
    +Please consult the The X.Org Foundation support
  • at http://wiki.x.org
  • for help.
    +(EE) Please also check the log file at "/home/aaron/projects/yash/tests/tmp.13882/home62/.local/share/xorg/Xorg.1.log" for additional information.
    +(EE)
    +(EE) Server terminated with error (1). Closing log file.
    +xinit: giving up
    +xinit: unable to connect to X server: Connection refused
    +xinit: server error
    +xauth: (argv):1: bad display name "sakura:1" in "remove" command
    +Couldn't get a file descriptor referring to the console.

%%% FAILED: startup-y.tst:110: startup: -cil +m, long option, with profile/rcfile

%%% START: startup-y.tst:118: startup: -cil +m --noprofile
% standard output diff:
--- - 2024-09-28 01:29:48.649757439 -0700
+++ 118.out 2024-09-28 01:29:48.643359955 -0700
@@ -1,2 +1 @@
-yashrc
cil

% standard error diff:
--- - 2024-09-28 01:29:48.650814855 -0700
+++ 118.err 2024-09-28 01:29:48.643359955 -0700
@@ -0,0 +1 @@
+.: file `initialization/common' was not found in $YASH_LOADPATH

%%% FAILED: startup-y.tst:118: startup: -cil +m --noprofile

%%% START: startup-y.tst:124: startup: -cil +m --norcfile
% standard output diff:
--- - 2024-09-28 01:29:48.791375171 -0700
+++ 124.out 2024-09-28 01:29:48.646693289 -0700
@@ -1,2 +0,0 @@
-profile
-cil

% standard error diff:
--- - 2024-09-28 01:29:48.792481213 -0700
+++ 124.err 2024-09-28 01:29:48.783359959 -0700
@@ -0,0 +1,37 @@
+

+xauth: (stdin):1: bad display name "sakura:1" in "add" command
+
+
+X.Org X Server 1.21.1.13
+X Protocol Version 11, Revision 0
+Current Operating System: Linux sakura 6.10.11-gentoo-dist #1 SMP PREEMPT_DYNAMIC Wed Sep 18 18:49:44 -00 2024 x86_64
+Kernel command line: BOOT_IMAGE=/vmlinuz-6.10.11-gentoo-dist root=UUID=49614b6a-ead7-4e86-beac-9e3018042b78 ro
+
+Current version of pixman: 0.43.4

  • Before reporting problems, check http://wiki.x.org
  • to make sure that you have the latest version.
    +Markers: (--) probed, (**) from config file, (==) default setting,
  • (++) from command line, (!!) notice, (II) informational,
  • (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    +(==) Log file: "/home/aaron/projects/yash/tests/tmp.13882/home62/.local/share/xorg/Xorg.1.log", Time: Sat Sep 28 01:29:48 2024
    +(==) Using system config directory "/usr/share/X11/xorg.conf.d"
    +(EE)
    +Fatal server error:
    +(EE) xf86OpenConsole: Switching VT failed
    +(EE)
    +(EE)
    +Please consult the The X.Org Foundation support
  • at http://wiki.x.org
  • for help.
    +(EE) Please also check the log file at "/home/aaron/projects/yash/tests/tmp.13882/home62/.local/share/xorg/Xorg.1.log" for additional information.
    +(EE)
    +(EE) Server terminated with error (1). Closing log file.
    +xinit: giving up
    +xinit: unable to connect to X server: Connection refused
    +xinit: server error
    +xauth: (argv):1: bad display name "sakura:1" in "remove" command
    +Couldn't get a file descriptor referring to the console.

%%% FAILED: startup-y.tst:124: startup: -cil +m --norcfile

%%% START: startup-y.tst:132: startup: -cl with unset HOME
% standard output diff:
--- - 2024-09-28 01:29:48.883251675 -0700
+++ 132.out 2024-09-28 01:29:48.790026626 -0700
@@ -1 +0,0 @@
-cl

% standard error diff:
--- - 2024-09-28 01:29:48.884487052 -0700
+++ 132.err 2024-09-28 01:29:48.876693296 -0700
@@ -0,0 +1,21 @@
+

+xauth: (stdin):1: bad display name "sakura:1" in "add" command
+
+(EE)
+Fatal server error:
+(EE) Cannot open log file "/.local/share/xorg/Xorg.1.log"
+(EE)
+(EE)
+Please consult the The X.Org Foundation support

  • at http://wiki.x.org
  • for help.
    +(EE)
    +xinit: giving up
    +xinit: unable to connect to X server: Connection refused
    +xinit: server error
    +xauth: (argv):1: bad display name "sakura:1" in "remove" command
    +Couldn't get a file descriptor referring to the console.

%%% FAILED: startup-y.tst:132: startup: -cl with unset HOME

%%% START: startup-y.tst:137: startup: -ci +m with unset HOME
% standard output diff:

% standard error diff:
--- - 2024-09-28 01:29:48.891662763 -0700
+++ 137.err 2024-09-28 01:29:48.883359963 -0700
@@ -0,0 +1 @@
+.: file `initialization/common' was not found in $YASH_LOADPATH

%%% FAILED: startup-y.tst:137: startup: -ci +m with unset HOME

%%% START: startup-y.tst:145: startup: -cl with non-existing HOME
% standard output diff:
--- - 2024-09-28 01:29:49.002016302 -0700
+++ 145.out 2024-09-28 01:29:48.890026630 -0700
@@ -1 +0,0 @@
-cl

% standard error diff:
--- - 2024-09-28 01:29:49.003058822 -0700
+++ 145.err 2024-09-28 01:29:48.996693299 -0700
@@ -0,0 +1,37 @@
+

+xauth: (stdin):1: bad display name "sakura:1" in "add" command
+
+
+X.Org X Server 1.21.1.13
+X Protocol Version 11, Revision 0
+Current Operating System: Linux sakura 6.10.11-gentoo-dist #1 SMP PREEMPT_DYNAMIC Wed Sep 18 18:49:44 -00 2024 x86_64
+Kernel command line: BOOT_IMAGE=/vmlinuz-6.10.11-gentoo-dist root=UUID=49614b6a-ead7-4e86-beac-9e3018042b78 ro
+
+Current version of pixman: 0.43.4

  • Before reporting problems, check http://wiki.x.org
  • to make sure that you have the latest version.
    +Markers: (--) probed, (**) from config file, (==) default setting,
  • (++) from command line, (!!) notice, (II) informational,
  • (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    +(==) Log file: "/home/aaron/projects/yash/tests/tmp.13882/no_such_directory/.local/share/xorg/Xorg.1.log", Time: Sat Sep 28 01:29:48 2024
    +(==) Using system config directory "/usr/share/X11/xorg.conf.d"
    +(EE)
    +Fatal server error:
    +(EE) xf86OpenConsole: Switching VT failed
    +(EE)
    +(EE)
    +Please consult the The X.Org Foundation support
  • at http://wiki.x.org
  • for help.
    +(EE) Please also check the log file at "/home/aaron/projects/yash/tests/tmp.13882/no_such_directory/.local/share/xorg/Xorg.1.log" for additional information.
    +(EE)
    +(EE) Server terminated with error (1). Closing log file.
    +xinit: giving up
    +xinit: unable to connect to X server: Connection refused
    +xinit: server error
    +xauth: (argv):1: bad display name "sakura:1" in "remove" command
    +Couldn't get a file descriptor referring to the console.

%%% FAILED: startup-y.tst:145: startup: -cl with non-existing HOME

%%% START: startup-y.tst:150: startup: -ci +m with non-existing HOME
% standard output diff:

% standard error diff:
--- - 2024-09-28 01:29:49.009011830 -0700
+++ 150.err 2024-09-28 01:29:49.000026633 -0700
@@ -0,0 +1 @@
+.: file `initialization/common' was not found in $YASH_LOADPATH

%%% FAILED: startup-y.tst:150: startup: -ci +m with non-existing HOME

%%% START: startup-y.tst:197: startup: -ci +m, LOADPATH fallback for missing yashrc
% standard output diff:
--- - 2024-09-28 01:29:49.035443286 -0700
+++ 197.out 2024-09-28 01:29:49.030026633 -0700
@@ -1,2 +1 @@
-default
ci

% standard error diff:
--- - 2024-09-28 01:29:49.036486049 -0700
+++ 197.err 2024-09-28 01:29:49.030026633 -0700
@@ -0,0 +1 @@
+.: file `initialization/common' was not found in $YASH_LOADPATH

%%% FAILED: startup-y.tst:197: startup: -ci +m, LOADPATH fallback for missing yashrc

%%% START: startup-y.tst:218: startup: -ci +m, no LOADPATH fallback if ~/.yashrc found
% standard output diff:
--- - 2024-09-28 01:29:49.058488177 -0700
+++ 218.out 2024-09-28 01:29:49.050026634 -0700
@@ -1,2 +1 @@
-yashrc
ci

% standard error diff:
--- - 2024-09-28 01:29:49.059592865 -0700
+++ 218.err 2024-09-28 01:29:49.050026634 -0700
@@ -0,0 +1 @@
+.: file `initialization/common' was not found in $YASH_LOADPATH

%%% FAILED: startup-y.tst:218: startup: -ci +m, no LOADPATH fallback if ~/.yashrc found

%%% START: startup-y.tst:250: errors in profile
% exit status: expected=0 actual=1

% standard output diff:
--- - 2024-09-28 01:29:49.175976726 -0700
+++ 250.out 2024-09-28 01:29:49.063359967 -0700
@@ -1,6 +0,0 @@
-error 1
-error 2
-error 2 expansion error $?=2
-error 1 syntax error $?=258
-error 1 expansion error $?=2
-cl

% standard error (expecting non-empty output):

xauth: (stdin):1: bad display name "sakura:1" in "add" command

X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
Current Operating System: Linux sakura 6.10.11-gentoo-dist #1 SMP PREEMPT_DYNAMIC Wed Sep 18 18:49:44 -00 2024 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-6.10.11-gentoo-dist root=UUID=49614b6a-ead7-4e86-beac-9e3018042b78 ro

Current version of pixman: 0.43.4
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/aaron/projects/yash/tests/tmp.13882/home228/.local/share/xorg/Xorg.1.log", Time: Sat Sep 28 01:29:49 2024
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) xf86OpenConsole: Switching VT failed
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/home/aaron/projects/yash/tests/tmp.13882/home228/.local/share/xorg/Xorg.1.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
xauth: (argv):1: bad display name "sakura:1" in "remove" command
Couldn't get a file descriptor referring to the console.

%%% FAILED: startup-y.tst:250: errors in profile

%%% START: startup-y.tst:260: errors in rcfile
% exit status: expected=0 actual=0

% standard output diff:
--- - 2024-09-28 01:29:49.181616929 -0700
+++ 260.out 2024-09-28 01:29:49.176693305 -0700
@@ -1,6 +1 @@
-error 1
-error 2
-error 2 expansion error $?=2
-error 1 syntax error $?=258
-error 1 expansion error $?=2
ci

% standard error (expecting non-empty output):
.: file `initialization/common' was not found in $YASH_LOADPATH

%%% FAILED: startup-y.tst:260: errors in rcfile

%%% START: startup-y.tst:272: startup: -abCcefhluvx
% standard output diff:
--- - 2024-09-28 01:29:49.187021350 -0700
+++ 272.out 2024-09-28 01:29:49.180026638 -0700
@@ -1 +0,0 @@
-aCcefhlbuvx

%%% FAILED: startup-y.tst:272: startup: -abCcefhluvx

%%% START: startup-y.tst:277: startup: -abCefhlsuvx
% standard output diff:
--- - 2024-09-28 01:29:49.193438901 -0700
+++ 277.out 2024-09-28 01:29:49.183359972 -0700
@@ -1 +0,0 @@
-aCefhlbsuvx

%%% FAILED: startup-y.tst:277: startup: -abCefhlsuvx

%%% START: startup-y.tst:364: hyphen prefix enables interactive mode (w/o directory name)
% standard output diff:
--- - 2024-09-28 01:29:49.377029463 -0700
+++ 364.out 2024-09-28 01:29:49.270026641 -0700
@@ -1 +0,0 @@
-ls

% standard error diff:
--- - 2024-09-28 01:29:49.379889777 -0700
+++ 364.err 2024-09-28 01:29:49.366693309 -0700
@@ -0,0 +1,21 @@
+

+xauth: (stdin):1: bad display name "sakura:1" in "add" command
+
+(EE)
+Fatal server error:
+(EE) Cannot open log file "/.local/share/xorg/Xorg.1.log"
+(EE)
+(EE)
+Please consult the The X.Org Foundation support

  • at http://wiki.x.org
  • for help.
    +(EE)
    +xinit: giving up
    +xinit: unable to connect to X server: Connection refused
    +xinit: server error
    +xauth: (argv):1: bad display name "sakura:1" in "remove" command
    +Couldn't get a file descriptor referring to the console.

%%% FAILED: startup-y.tst:364: hyphen prefix enables interactive mode (w/o directory name)

%%% START: startup-y.tst:372: hyphen prefix enables interactive mode (with directory name)
% standard output diff:
--- - 2024-09-28 01:29:49.521977961 -0700
+++ 372.out 2024-09-28 01:29:49.380026644 -0700
@@ -1 +0,0 @@
-ls

% standard error diff:
--- - 2024-09-28 01:29:49.523117053 -0700
+++ 372.err 2024-09-28 01:29:49.516693314 -0700
@@ -0,0 +1,21 @@
+

+xauth: (stdin):1: bad display name "sakura:1" in "add" command
+
+(EE)
+Fatal server error:
+(EE) Cannot open log file "/.local/share/xorg/Xorg.1.log"
+(EE)
+(EE)
+Please consult the The X.Org Foundation support

  • at http://wiki.x.org
  • for help.
    +(EE)
    +xinit: giving up
    +xinit: unable to connect to X server: Connection refused
    +xinit: server error
    +xauth: (argv):1: bad display name "sakura:1" in "remove" command
    +Couldn't get a file descriptor referring to the console.

%%% FAILED: startup-y.tst:372: hyphen prefix enables interactive mode (with directory name)

==============
TOTAL: 20071
PASSED: 20035
FAILED: 34
SKIPPED: 2

share/initialization/common Show resolved Hide resolved
@@ -48,7 +48,8 @@ variable to a different value. Please consult your OS's documentation to learn
how to configure these variables in detail.

If you want to apply the same configuration every time you start yash, write
the command in ~/.yashrc or ~/.yash_profile.
the command in $XDG_CONFIG_HOME/yash/rc or $XDG_CONFIG_HOME/yash/profile. The old locations
~/.yashrc and ~/.yash_profile are also supported as a fallback.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel that this could have been worded better, however, I do not have a specific way I would like this explanation to be worded in mind.

Copy link
Owner

@magicant magicant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange or not, all the tests pass on my end. Assuming the error is specific to your environment, I guess we should add XDG_CONFIG_HOME to the list of environment variables that are removed before running tests.

share/initialization/common Show resolved Hide resolved
Co-authored-by: WATANABE Yuki <magicant@wonderwand.net>
Copy link
Owner

@magicant magicant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're finally ready to merge. Do you think you have anything left to do?

@unrealapex
Copy link
Contributor Author

LGTM! Thank you for making my first contribution to this project so smooth!

@magicant
Copy link
Owner

Great! Thank you so much!

@magicant magicant merged commit a67ac2f into magicant:trunk Sep 30, 2024
2 checks passed
@magicant magicant added this to the 2.58 milestone Sep 30, 2024
@unrealapex unrealapex deleted the xdg-compliance branch September 30, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Searching XDG directories for initialization files
2 participants