Gentoo Archives: gentoo-dev

From: Joakim Tjernlund <joakim.tjernlund@×××××××××.se>
To: "gentoo-dev@l.g.o" <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Managing etc/* in an embbeded system
Date: Wed, 22 Jul 2015 13:20:28
Message-Id: 1437571210.10831.110.camel@transmode.se
In Reply to: Re: [gentoo-dev] Managing etc/* in an embbeded system by "Michał Górny"
1 On Wed, 2015-07-22 at 14:30 +0200, Michał Górny wrote:
2 >
3 > Joakim Tjernlund <joakim.tjernlund@×××××××××.se> napisał:
4 >
5 > > We got an embedded gentoo system where we need to manage many conf
6 > > files under /etc that we have
7 > > modified and should be under our control when an SW upgrade is
8 > > performed.
9 > >
10 > > Cloning every ebuild where we have modified its conf file(s) under /etc
11 > > feels awkward so
12 > > I am looking for some other way to do this automatically during SW
13 > > upgrade and I figured
14 > > this can not be an unique problem for us, so I wonder how other people
15 > > have solved this problem?
16 > > Our customers will not use emerge directly and we will provide binary
17 > > pkgs.
18 > >
19 > > Any ideas welcome :)
20 > >
21 > > Jocke
22 >
23 > Maybe post-phase hooks would help you. Not around a PC right now but I think they're described in portage.5.
24 > Long story short, you create per-package env files in /etc/portage/env (you can pin them generically or to a
25 > specific version, or package spec via package.env) and declare post_src_install() where you add your custom
26 > config files atop the package.
27 >
28
29 hmm, that sounds interesting but I don't quite get what to do, you think I should copy over /etc/inittab after
30 it has been installed by sys-apps/sysvinit with my own version(which is stored where?)
31
32 This gave me an idea though:
33 In /etc/portage/env/install-mask.conf I add
34 INSTALL_MASK="${INSTALL_MASK} /etc/inittab /etc/xxx"
35 then in /etc/portage/package.env/install-mask
36 sys-apps/sysvinit install-mask.conf
37 sys-apps/xxx install-mask.conf
38 ...
39 (Can I do this from my own custom profile instead? how?)
40
41 This should prevent sys-apps/sysvinit to install conf files I want to manage, right?
42
43 Then I create my own new ebuild holding all config files I have changed myself.
44
45 Jocke

Replies

Subject Author
Re: [gentoo-dev] Managing etc/* in an embbeded system Jason Zaman <perfinion@g.o>
Re: [gentoo-dev] Managing etc/* in an embbeded system "Michał Górny" <mgorny@g.o>
Re: [gentoo-dev] Managing etc/* in an embbeded system Alexander Tsoy <alexander@××××.me>