Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#74778 - [sway]: /etc/sway/config.d/50-systemd-user.conf is not included in backup array

Attached to Project: Community Packages
Opened by mearon (mearon) - Tuesday, 17 May 2022, 13:34 GMT
Last edited by Brett Cornwall (ainola) - Friday, 20 May 2022, 17:33 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jerome Leclanche (Adys)
Brett Cornwall (ainola)
Maxim Baz (maximbaz)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The sway 1.7 package ships /etc/sway/config.d/50-systemd-user.conf, see also https://bugs.archlinux.org/task/63021 .

Is there a specific reason it is not included in the backup array of the PKGBUILD? That would be useful if the user wants to modify the behavior (i.e. import a different set of variables).

This task depends upon

Closed by  Brett Cornwall (ainola)
Friday, 20 May 2022, 17:33 GMT
Reason for closing:  Implemented
Additional comments about closing:  sway-1.7-9 has implemented this and will be released shortly. Thanks for reporting!
Comment by mearon (mearon) - Tuesday, 17 May 2022, 13:50 GMT
It would be nice to also include all other files under /etc/sway/config.d/ in the backup array (I just discovered that there are more to come via https://bugs.archlinux.org/task/72297 ).
Comment by Brett Cornwall (ainola) - Wednesday, 18 May 2022, 20:36 GMT
I'm not sure about this: /etc/X11/xinit/xinitrc.d/50-systemd-user.conf is not tracked either. If you want to import another set of vars, is there anything stopping you from creating a new file yourself?

The current variables imported via 50-systemd-user.conf are "must-haves" so there's unlikely to be any need to alter that file.
Comment by mearon (mearon) - Wednesday, 18 May 2022, 21:05 GMT
"Backup" config files are nice for tracking upstream changes (in this case the custom config by archlinux).

- Suppose I want to import more variables. It's nicer to add them into this file than create another file in config.d to remove duplicate boilerplate.
- Suppose I don't want some of the variables imported. When I remove them from 50-systemd-user.conf, on the next update my changes are overwritten. I could unset them in another file 60-systemd-user-remove.conf, but that's ugly and only works for the systemd part, not dbus.
- Suppose I want to unset the variables after sway exits. I can make a custom script for that (swaymsg -t subscribe '["shutdown"]'; systemctl --user unset-environment DISPLAY...) which is executed at the end of the sway config, but I have to manually check 50-systemd-user.conf after each system upgrade if the set of variables changed and adjust my script. With it part of the backup array, I can just make a dummy modification/comment so I get notified on changes and adjust my script accordingly.

The last point is my actual use case. The problem here is that 50-systemd-user.conf does only one half of the job. The other half, unsetting the variables on sway exit, is left out. With 50-systemd-user.conf part of the backup array, the user can at least easily fix this.
Comment by Maxim Baz (maximbaz) - Wednesday, 18 May 2022, 22:42 GMT
I suppose it costs us nothing to add the file(s) into the backup array, even if we didn't anticipate changes or there are other ways to achieve the same, these files are configs and so let's have them backed up just in case?

Loading...