public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Steven J. Long" <slong@rathaus.eclipse.co.uk>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: systemd profiles
Date: Wed, 10 Sep 2014 04:29:51 +0100	[thread overview]
Message-ID: <20140910032950.GA5558@rathaus.eclipse.co.uk> (raw)
In-Reply-To: <CAGfcS_=RyW+bw0Ojt4DexO9u_S1BBDsH=nLhD9+q2PbFZ77Ahg@mail.gmail.com>

On Wed, Sep 03, 2014 at 03:27:15PM -0400, Rich Freeman wrote:
> On Wed, Sep 3, 2014 at 2:11 PM, William Hubbs <williamh@gentoo.org> wrote:
> >
> > I can deprecate it. To do so, I would need to have it print out a
> > deprecation warning that would be wrong for Gentoo in the next release.
> >
> > That warning would have to tell users to source
> > /lib*/rc/sh/functions.sh.
> 
> I don't have a problem with openrc supplying an API.  However, that
> API should be limited to openrc-specific functions, and it really
> shouldn't be used by anything else except for stuff like
> starting/stopping services, determining the runlevel, or other
> openrc-ish things.  It shouldn't be used for utility functions.

Well the reason the util API is provided by openrc is so that _programs_
running at init time can provide the output users love, as well as scripts.
Yes they're trivial functionality and many a shell scripter has their own
variant, but equally it makes sense to have one C wrapper, with a lib
API, and not duplicate the code. Hence my strong disagreement with the
removal of the API, which was reverted a few weeks after it was committed
when it turned out to have a consumer after all.

Obviously that fits your description of init-specific, and I don't have
any issue at all with the shell lib being in one place either: it makes
total sense, in the same way as having the lib API in openrc for init
programs does.

> It would probably make more sense to have a generic init-agnostic
> Gentoo wrapper in /lib, and then have it call the appropriate
> openrc/systemd/whatever functions based on how the system is
> configured.

Most usage is of really trivial stuff, so I don't think that should
rely on any init-system at all: it's basic sh, minimal when done well.

> If the decision is to stick that generic Gentoo script in /etc I don't
> think it is the end of the world,

Not at all: a sh file is simple text after all, unless ofc it's been
complexified by someone who doesn't grok sh and obfuscated with insane
bracing. The discussion was had a long time ago about the canonical
location, which is separate from which package provides it: personally
I'd do what vapier said and put it back in baselayout where it belongs.

I don't care where it goes personally, so long as it's available at init
and not in some nubEnterpriseFactory location, but I'd defer to vapier
and UberLord if it were my call. I can see the reasoning that /etc
provides for site-specific customisation, as well as config updates, in
a location admins expect to customise, and indeed backup more strictly
than some places.

> but it probably shouldn't be provided by openrc.

>  In general we shouldn't have dependencies on an
> init system unless the package is actually interacting with the init
> system.

Agreed.

Regards,
steveL
-- 
#friendly-coders -- We're friendly, but we're not /that/ friendly ;-)


  reply	other threads:[~2014-09-10  3:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29 23:09 [gentoo-dev] systemd profiles Jauhien Piatlicki
2014-08-29 23:27 ` Alex Xu
2014-08-30  2:41 ` Rich Freeman
2014-08-30  9:09   ` Jauhien Piatlicki
2014-08-30 11:27   ` J. Roeleveld
2014-08-30 11:41     ` Michał Górny
2014-08-30 12:03       ` Rich Freeman
2014-08-30 12:55         ` Lars Wendler
2014-08-30 13:45           ` Rich Freeman
2014-09-03 18:11             ` William Hubbs
2014-09-03 18:19               ` Ian Stakenvicius
2014-09-03 18:45                 ` William Hubbs
2014-09-03 19:27               ` Rich Freeman
2014-09-10  3:29                 ` Steven J. Long [this message]
2014-08-30 12:05       ` J. Roeleveld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140910032950.GA5558@rathaus.eclipse.co.uk \
    --to=slong@rathaus.eclipse.co.uk \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox