About configuration files for the user session
James Hunt
james.hunt at canonical.com
Fri Dec 7 11:14:13 UTC 2012
On 07/12/12 01:04, Steve Langasek wrote:
> On Thu, Dec 06, 2012 at 04:39:00PM +0000, James Hunt wrote:
>> I've attempted to distill what is becoming a rather difficult-to-follow
>> discussion due to all the examples in the spec here:
>
>> https://wiki.ubuntu.com/FoundationsTeam/Specs/RaringUpstartUserSessions#Collision_Resolution
>
>> Please update if you spot problems.
>
> The table here is very confusing to me with its references to "system
> files". Is this /etc/init, or /etc/xdg/upstart? Given the distinction
> drawn between system and user files, I would have assumed it's /etc/init,
> but your terminology table suggests it's /etc/xdg/upstart.
The latter since these search resolution discussions only relate to Upstart
running as a Session Init.
>
>> Note that I've also updated the Terminology section and special-cased
>> "System Directories and Files" such that they should be considered as
>> "higher priority" than User Directories to allow sysadmins to control user
>> jobs via overrides to some extent, as already discussed in this thread.
>
> I think that's exactly the opposite of what is being proposed in this
> thread.
... which just goes to prove that this thread is indeed becoming confusing :-)
> It's the user's file that should take precedence over the system
> copy, not vice-versa.
Steve Langasek <steve.langasek at ubuntu.com> wrote:
> - change the packaged job behavior for all users on your system as part of
> a site policy: /etc/xdg/xdg/upstart/foo.override
Just so we are all clear, the current design means that "site policy" is not
enforceable (*) since the user can create a foo.override and "block" the site
policy file /etc/xdg/xdg/upstart/foo.override from applying.
>
>> I totally agree that we want to avoid user confusion. Therefore, I think
>> that along with strong documentation, we should update init-checkconf(8)
>> to run something like 'init --user --list-jobs' which will not run a
>> Session Init, but which will print:
>
>> - each directory it is searching.
>> - each file it finds.
>> - whether the file will be considered or not based on either implicit XDG
>> paths, or --confdir ones.
>
>> Thus allowing a user/admin to make sense of what is happening.
>
> Sounds like a reasonable debugging aid. I think it would be readable to
> only report on the files that are actually used, though, and ignore those
> that are being masked out.
>
>> I agree that ~/.init should be considered last. _Please_ feel free to
>> update the spec if you notice problems - it's a working document for all
>> to contribute to :-).
>
> I don't currently see the proposed search path specified anywhere in this
> document. Should this be under
> https://wiki.ubuntu.com/FoundationsTeam/Specs/RaringUpstartUserSessions#Configuration_Files_for_User_Jobs
> ?
>
>> Steve - I'm not clear on whether you're suggesting we need to consider
>> perhaps a "/usr/share/upstart/conf/" too (a la initramfs-tools in Ubuntu?)
>
> Yes, I am proposing that.
>
>> Regarding allowing multiple --confdir invocations on the command-line, I
>> really would prefer we have this - it's just exposing the internal search
>> path logic, shouldn't be difficult to implement and would be invaluable
>> for (non-DEP-8) testing in my view.
>
> That means there would be two *different* mechanisms for specifying a series
> of config dirs, with different semantics: one by adjusting the contents of
> $XDG_CONFIG_DIRS, the other by passing multiple --confdir options. I think
> this is more flexibility than we really want to have to manage.
The current design already includes two different mechanisms since we're
proposing to add support for XDG_CONFIG_DIRS alongside --confdir, but I
certainly don't want us to drop atleast being able to specify --confdir once,
and that should have priority than any internal defaults and environment
variable values.
All we're saying is that by specifying multiple --confdir values, each one gets
prepended to the internal list which will by default contain the values of the
XDG_CONFIG_DIRS. This is a change to current behaviour in that currently only
the last --confdir value is honoured, but adding Enhanced User Sessions to
Upstart is a change to the current behaviour too :-)
Cheers,
James.
(*) - well it technically still could almost be via 'typeset -r'/readonly shell
tricks.
--
James Hunt
____________________________________
Ubuntu Foundations Team, Canonical.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/upstart-devel/attachments/20121207/09288e4d/attachment.pgp>
More information about the upstart-devel
mailing list