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 drop-ins approach for xdg autostart files #1151

Closed
marmarek opened this Issue Aug 27, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@marmarek
Member

marmarek commented Aug 27, 2015

There were many troubles with automatically generated/modified /etc/xdg/autostart content. Just a few of them:

  1. Interactive conflict resolution on debian upgrade (example); on Fedora new file is saved in .rpmnew and never used
  2. Above fixed by implementing overlay directory (marmarek/qubes-core-agent-linux#12), which needs to be regenerated at each update
  3. Such generator can be easily mislead

So instead of generation those files, implement drop-ins approach in qubes-session. And when upstream declare some standard for it, migrate there.

@nrgaway @adrelanos

@nrgaway

This comment has been minimized.

Show comment
Hide comment
@nrgaway

nrgaway Aug 27, 2015

On 27 August 2015 at 07:10, Marek Marczykowski-Górecki <
notifications@github.com> wrote:

There were many troubles with automatically generated/modified
/etc/xdg/autostart content. Just a few of them:

  1. Interactive conflict resolution on debian upgrade (example
    https://www.whonix.org/wiki/Upgrading_Whonix_10_to_Whonix_11#interactive_dpkg_conflict_resolution_dialog_.2Fetc.2Fxdg.2Fautostart.2Fnm-applet.desktop);
    on Fedora new file is saved in .rpmnew and never used

This would not happen now with the current triggers since the originals are
never touched. Debian has had this functionality since last year.

  1. Above fixed by implementing overlay directory (
    marmarek/qubes-core-agent-linux#12
    https://github.com/marmarek/qubes-core-agent-linux/pull/12), which
    needs to be regenerated at each update

  2. Such generator can be easily mislead
    https://groups.google.com/d/topic/qubes-users/S6NZeuiP6cg/discussion

    This was due to the issue of the qubes/xdg directory being moved from
    /usr/share/qubes/xdg to /var/lib/qubes/xdg. There was also a typo when you
    changed the default path in qubes-desktop-install-files that was changed to
    /vat, not /var; fixed in more recent push.

Again, Debian has been using this feature for almost a yeat now without
issue until the qubes directory got moved.

So instead of generation those files, implement drop-ins approach in
qubes-session. And when upstream declare some standard for it
https://bugs.freedesktop.org/show_bug.cgi?id=91560, migrate there.

I guess we can see how they feel about that since there current solution is
doing what we do; drop an override into another directory which get read
first. The user can even override that further by placing a use override
in home .config/??/autostart. That's part of the XDG standard.

I am currently working on drop-in support for the mgmt-salt package since
they do not have such a feature and will contribute it upstream. Already
briefly discussed with developers and they tend to agree on the approach;
May be able to re-use that code for XDG.

nrgaway commented Aug 27, 2015

On 27 August 2015 at 07:10, Marek Marczykowski-Górecki <
notifications@github.com> wrote:

There were many troubles with automatically generated/modified
/etc/xdg/autostart content. Just a few of them:

  1. Interactive conflict resolution on debian upgrade (example
    https://www.whonix.org/wiki/Upgrading_Whonix_10_to_Whonix_11#interactive_dpkg_conflict_resolution_dialog_.2Fetc.2Fxdg.2Fautostart.2Fnm-applet.desktop);
    on Fedora new file is saved in .rpmnew and never used

This would not happen now with the current triggers since the originals are
never touched. Debian has had this functionality since last year.

  1. Above fixed by implementing overlay directory (
    marmarek/qubes-core-agent-linux#12
    https://github.com/marmarek/qubes-core-agent-linux/pull/12), which
    needs to be regenerated at each update

  2. Such generator can be easily mislead
    https://groups.google.com/d/topic/qubes-users/S6NZeuiP6cg/discussion

    This was due to the issue of the qubes/xdg directory being moved from
    /usr/share/qubes/xdg to /var/lib/qubes/xdg. There was also a typo when you
    changed the default path in qubes-desktop-install-files that was changed to
    /vat, not /var; fixed in more recent push.

Again, Debian has been using this feature for almost a yeat now without
issue until the qubes directory got moved.

So instead of generation those files, implement drop-ins approach in
qubes-session. And when upstream declare some standard for it
https://bugs.freedesktop.org/show_bug.cgi?id=91560, migrate there.

I guess we can see how they feel about that since there current solution is
doing what we do; drop an override into another directory which get read
first. The user can even override that further by placing a use override
in home .config/??/autostart. That's part of the XDG standard.

I am currently working on drop-in support for the mgmt-salt package since
they do not have such a feature and will contribute it upstream. Already
briefly discussed with developers and they tend to agree on the approach;
May be able to re-use that code for XDG.

marmarek added a commit to marmarek/old-qubes-core-agent-linux that referenced this issue Aug 28, 2015

Implement dropins for /etc/xdg/autostart (#1151)
Usage of _static_ files (dropins) to override some of autostart entries
(enable/disable them in appropriate VM types) is much simpler and less
error prone than automatic generators.

Handling code is implemented in qubes-session-autostart, which is called
from qubes-session.

QubesOS/qubes-issues#1151

marmarek added a commit to marmarek/old-qubes-core-agent-linux that referenced this issue Aug 28, 2015

marmarek added a commit to marmarek/old-qubes-gui-agent-linux that referenced this issue Aug 28, 2015

Revert "qubes-session: use '/var/lib/qubes/xdg' instead of '/usr/shar…
…e/qubes/xdg'"

This reverts commit 924dc21.

Preparation for drop-ins approach - those files will no longer be
autogenerated.

QubesOS/qubes-issues#1151

marmarek added a commit to marmarek/old-qubes-gui-agent-linux that referenced this issue Aug 28, 2015

qubes-session: use qubes-session-autostart instead of poor man shell …
…version

qubes-session-autostart (provided by core-agent-linux) is much more
readable than cryptic sed expression. It's also much easier to extend.
Additionally it supports dropins for overriding parts of desktop files -
no need to keep separate copy of them in sync.

QubesOS/qubes-issues#1151
@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Aug 28, 2015

Member

The less code in maintainer scripts the better. It easily breaks updates (see Whonix 10->11 case).
Just pushed implementation to autostart-dropins branch (both core and gui agent). Much simpler than the previous approach (diffstat: 198 insertions(+), 519 deletions(-)).

Member

marmarek commented Aug 28, 2015

The less code in maintainer scripts the better. It easily breaks updates (see Whonix 10->11 case).
Just pushed implementation to autostart-dropins branch (both core and gui agent). Much simpler than the previous approach (diffstat: 198 insertions(+), 519 deletions(-)).

@marmarek marmarek referenced this issue in marmarek/old-qubes-core-agent-linux Sep 1, 2015

Closed

Depends #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment