1 |
Dnia 2015-07-22, o godz. 13:20:10 |
2 |
Joakim Tjernlund <joakim.tjernlund@×××××××××.se> napisał(a): |
3 |
|
4 |
> On Wed, 2015-07-22 at 14:30 +0200, Michał Górny wrote: |
5 |
> > |
6 |
> > Joakim Tjernlund <joakim.tjernlund@×××××××××.se> napisał: |
7 |
> > |
8 |
> > > We got an embedded gentoo system where we need to manage many conf |
9 |
> > > files under /etc that we have |
10 |
> > > modified and should be under our control when an SW upgrade is |
11 |
> > > performed. |
12 |
> > > |
13 |
> > > Cloning every ebuild where we have modified its conf file(s) under /etc |
14 |
> > > feels awkward so |
15 |
> > > I am looking for some other way to do this automatically during SW |
16 |
> > > upgrade and I figured |
17 |
> > > this can not be an unique problem for us, so I wonder how other people |
18 |
> > > have solved this problem? |
19 |
> > > Our customers will not use emerge directly and we will provide binary |
20 |
> > > pkgs. |
21 |
> > > |
22 |
> > > Any ideas welcome :) |
23 |
> > > |
24 |
> > > Jocke |
25 |
> > |
26 |
> > Maybe post-phase hooks would help you. Not around a PC right now but I think they're described in portage.5. |
27 |
> > Long story short, you create per-package env files in /etc/portage/env (you can pin them generically or to a |
28 |
> > specific version, or package spec via package.env) and declare post_src_install() where you add your custom |
29 |
> > config files atop the package. |
30 |
> > |
31 |
> |
32 |
> hmm, that sounds interesting but I don't quite get what to do, you think I should copy over /etc/inittab after |
33 |
> it has been installed by sys-apps/sysvinit with my own version(which is stored where?) |
34 |
|
35 |
Yes, exactly. You can either copy your own, or modify (sed? patch?) |
36 |
the standard one. You can store it anywhere, download (unless you |
37 |
use network-sandbox) from the net or just inline via here-doc syntax. |
38 |
|
39 |
> This gave me an idea though: |
40 |
> In /etc/portage/env/install-mask.conf I add |
41 |
> INSTALL_MASK="${INSTALL_MASK} /etc/inittab /etc/xxx" |
42 |
> then in /etc/portage/package.env/install-mask |
43 |
> sys-apps/sysvinit install-mask.conf |
44 |
> sys-apps/xxx install-mask.conf |
45 |
> ... |
46 |
> (Can I do this from my own custom profile instead? how?) |
47 |
> |
48 |
> This should prevent sys-apps/sysvinit to install conf files I want to manage, right? |
49 |
> |
50 |
> Then I create my own new ebuild holding all config files I have changed myself. |
51 |
|
52 |
Sure. Though I don't understand why would you set it per ebuild -- you |
53 |
can set it in make.conf globally in that case, or in make.defaults in |
54 |
your profile. If doing the latter, remember to use |
55 |
INSTALL_MASK="${INSTALL_MASK} ..." if you want to add additional dirs |
56 |
afterwards. |
57 |
|
58 |
-- |
59 |
Best regards, |
60 |
Michał Górny |
61 |
<http://dev.gentoo.org/~mgorny/> |