1 |
On Wed, Mar 12, 2014 at 01:08:43PM -0400, Rich Freeman wrote: |
2 |
> On Wed, Mar 12, 2014 at 12:52 PM, William Hubbs <williamh@g.o> wrote: |
3 |
> > On Wed, Mar 12, 2014 at 09:14:58AM -0400, Ian Stakenvicius wrote: |
4 |
> >> ...why not? As you've said yourself, nothing related to openrc uses |
5 |
> >> /etc/init.d/functions.sh; if everything else in the tree is going to |
6 |
> >> use the new gentoo-functions "lib", why wouldn't custom end-user |
7 |
> >> scripts too? |
8 |
> >> |
9 |
> >> (again, scanned the bug, didn't see anything relevant to this) |
10 |
> > |
11 |
> > The relevance is that /etc/init.d/functions.sh is currently part of |
12 |
> > OpenRc's public API, and semantic versioning has a very specific |
13 |
> > description of how to deprecate functionality. |
14 |
> > |
15 |
> > If Gentoo needs the symlink after it is removed from OpenRc, I think |
16 |
> > that is the time we can talk about putting it in gentoo-functions. |
17 |
> > |
18 |
> |
19 |
> If the goal is to be able to remove openrc from systems, how does it |
20 |
> help that we might fix any breakage after openrc no longer provides |
21 |
> it? |
22 |
|
23 |
I don't follow this question. |
24 |
|
25 |
> If the goal is to be able to remove openrc from systems, then |
26 |
> something else needs to provide the symlink. I guess in the meantime |
27 |
> users could just remove openrc and just manually install the symlink, |
28 |
> but that isn't really a clean solution. |
29 |
> |
30 |
> Otherwise openrc can't be removed until anything that sources this is |
31 |
> fixed. If it all does get fixed, then the symlink isn't even needed |
32 |
> (though I suppose openrc can still provide it for any other distros |
33 |
> that use it). |
34 |
|
35 |
Here is what I'm going to do inside openrc: |
36 |
|
37 |
/etc/init.d/functions.sh, which is a symlink now, will become an actual |
38 |
script that does the following: |
39 |
|
40 |
source "@LIBEXECDIR@"/sh/functions.sh |
41 |
ewarn "$0: sourcing /etc/init.d/functions.sh is deprecated." |
42 |
ewarn "This file will be removed in a future version of OpenRc, so please" |
43 |
ewarn "source \"@LIBEXECDIR@\"/sh/functions.sh if you need this functionality." |
44 |
|
45 |
Where @LIBEXECDIR@ is replaced at build time with OpenRc's libexecdir |
46 |
setting. |
47 |
|
48 |
From the gentoo side, when bugs are filed, the maintainers will have to |
49 |
make a decision about whether to source /lib/gentoo/functions.sh or |
50 |
@LIBEXECDIR@/sh/functions.sh based on whether their package really needs |
51 |
OpenRc specific functionality or not. |
52 |
|
53 |
Gentoo end users who are sourcing /etc/init.d/functions.sh will have to |
54 |
make the same decision. |
55 |
|
56 |
Non-gentoo end users will know what they have to do -- fix |
57 |
their scripts to source @LIBEXECDIR@/sh/functions.sh. |
58 |
|
59 |
So, I am having trouble seeing why the symlink will be needed at all |
60 |
after OpenRc removes this script in OpenRc 1.0. |
61 |
|
62 |
William |