{"action":"created","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/4830","repository_url":"https://api.github.com/repos/systemd/systemd","labels_url":"https://api.github.com/repos/systemd/systemd/issues/4830/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/4830/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/4830/events","html_url":"https://github.com/systemd/systemd/issues/4830","id":193524945,"number":4830,"title":"Applying default/distros presets override sysadmin previous configuration","user":{"login":"fbuihuu","id":251384,"avatar_url":"https://avatars.githubusercontent.com/u/251384?v=3","gravatar_id":"","url":"https://api.github.com/users/fbuihuu","html_url":"https://github.com/fbuihuu","followers_url":"https://api.github.com/users/fbuihuu/followers","following_url":"https://api.github.com/users/fbuihuu/following{/other_user}","gists_url":"https://api.github.com/users/fbuihuu/gists{/gist_id}","starred_url":"https://api.github.com/users/fbuihuu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbuihuu/subscriptions","organizations_url":"https://api.github.com/users/fbuihuu/orgs","repos_url":"https://api.github.com/users/fbuihuu/repos","events_url":"https://api.github.com/users/fbuihuu/events{/privacy}","received_events_url":"https://api.github.com/users/fbuihuu/received_events","type":"User","site_admin":false},"labels":[{"id":362042117,"url":"https://api.github.com/repos/systemd/systemd/labels/install","name":"install","color":"f9d0c4","default":false},{"id":191919608,"url":"https://api.github.com/repos/systemd/systemd/labels/RFE","name":"RFE","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-12-05T15:17:09Z","updated_at":"2016-12-11T10:03:36Z","closed_at":null,"body":"Hi,\r\n\r\nThis issue is not really new and there were some attempts to address it in the past already but unfortunately the work got lost somehow.\r\n\r\nFor example the latest work I found is the [preset-transient](https://lists.freedesktop.org/archives/systemd-devel/2015-February/028046.html) one which is in my understanding about having symlinks created by the preset commands in /run/systemd/ thus having lower precedence than the symlinks created by the sysadmin in /etc/systemd/. However a part is still missing as disabling services should create null symlinks now in /etc/ and should override any corresponding symlinks directories with lower precedences.\r\n\r\nThere might another possibility though: basically when the user is enabling/disabling a service (via the _EnableUnitFiles_ bus call), this operation would be recorded via a dedicated preset directive in a preset file located for example in  _/etc/systemd/system-preset/50-user-preferences.preset_\r\n\r\nFor example if the user does `systemctl enable foo.service`, this operation would add \"enable foo.service\" in the dedicated preset file. A subsequent `systemctl disable foo` would replace the previous directive with \"disable foo.service\".\r\n\r\nSince the preset file is located in /etc/systemd/systemd-preset, running `systemd preset foo.service` command would simply restore the user last preferences and would ignore the distro defaults as they are\r\nnow overridden.\r\n\r\nHowever this wouldn't work if the sysadmin created the symlinks manually (using ln(1)) but in this case it might be acceptable to consider that creating symlinks in this way is considered as low-level operations and thus might be missing some functionalities (but of course its main purpose would still work)."},"comment":{"url":"https://api.github.com/repos/systemd/systemd/issues/comments/266273321","html_url":"https://github.com/systemd/systemd/issues/4830#issuecomment-266273321","issue_url":"https://api.github.com/repos/systemd/systemd/issues/4830","id":266273321,"user":{"login":"fbuihuu","id":251384,"avatar_url":"https://avatars.githubusercontent.com/u/251384?v=3","gravatar_id":"","url":"https://api.github.com/users/fbuihuu","html_url":"https://github.com/fbuihuu","followers_url":"https://api.github.com/users/fbuihuu/followers","following_url":"https://api.github.com/users/fbuihuu/following{/other_user}","gists_url":"https://api.github.com/users/fbuihuu/gists{/gist_id}","starred_url":"https://api.github.com/users/fbuihuu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbuihuu/subscriptions","organizations_url":"https://api.github.com/users/fbuihuu/orgs","repos_url":"https://api.github.com/users/fbuihuu/repos","events_url":"https://api.github.com/users/fbuihuu/events{/privacy}","received_events_url":"https://api.github.com/users/fbuihuu/received_events","type":"User","site_admin":false},"created_at":"2016-12-11T10:03:36Z","updated_at":"2016-12-11T10:03:36Z","body":"@keszybz \r\n> Package %post scripts should not modify in anything in /usr/lib. If there are any symlinks in /usr/lib, they should be part of the contents of the package. Again, two steps:\r\n\r\nMoreover that sounds to defeat the whole purpose of the preset mechanism: keep the default enablement policies in one place that are under control of one single package which may be different according the distro flavor.\r\n\r\nIn the new scheme, \"systemctl preset\" really looks to be packaging material stuff only."}}
{"actor":{"display_login":"fbuihuu"}}