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