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: Tue, 11 Aug 2015 18:11:48
Message-Id: 1439316698.3120.122.camel@transmode.se
In Reply to: Re: [gentoo-dev] Managing etc/* in an embbeded system by Zac Medico
1 On Tue, 2015-08-11 at 10:55 -0700, Zac Medico wrote:
2 > On 08/11/2015 10:48 AM, Joakim Tjernlund wrote:
3 > > On Thu, 2015-07-23 at 08:47 -0700, Zac Medico wrote:
4 > > > On 07/23/2015 12:46 AM, Joakim Tjernlund wrote:
5 > > > > On Wed, 2015-07-22 at 19:47 -0400, Ian Stakenvicius wrote:
6 > > > > >
7 > > > > > Sent from an iPhone, sorry for the HTML...
8 > > > > >
9 > > > > > > On Jul 22, 2015, at 5:38 PM, Rich Freeman <rich0@g.o> wrote:
10 > > > > > >
11 > > > > > > On Wed, Jul 22, 2015 at 8:05 AM, Joakim Tjernlund
12 > > > > > > <joakim.tjernlund@×××××××××.se> wrote:
13 > > > > > > >
14 > > > > > > > There can not be any manual merges after an SW update here.
15 > > > > > > >
16 > > > > > > > I started to look at INSTALL_MASK, what if I set INSTALL_MASK
17 > > > > > > > to point to all conf files I want to manage myself.
18 > > > > > > > Then /etc/inittab etc. will not be touched when updating init
19 > > > > > >
20 > > > > > > This sounds like overkill.
21 > > > > > >
22 > > > > > > If you've already installed a custom /etc/inittab, then when you
23 > > > > > > emerge init, it won't overwrite your inittab even if you don't change
24 > > > > > > anything in your portage config. emerge won't touch any files in /etc
25 > > > > > > unless they don't already exist.
26 > > > > >
27 > > > > >
28 > > > > > ..AND have been modified. IIRC if the hash of the config files match what they were when the
29 > > > > > package
30 > > > > > was
31 > > > > > previously emerged, then the files are updated aren't they?
32 > > > > >
33 > > > > > I expect that this is fine in the situation described, but it's worth knowing that a config file
34 > > > > > left
35 > > > > > unmodified may be replaced with a different vanilla config file later on.
36 > > > >
37 > > > > Sure, but what if I need to change a conf file in an installed system? Or rebuild a a system from
38 > > > > scratch?
39 > > > > The user only runs a one SW update command to update an installed system in the field and cannot edit
40 > > > > a
41 > > > > bunch
42 > > > > of files too. Especially when there are hundreds of systems sitting in remote locations.
43 > > >
44 > > > If you use the profile-bashrcs profile-formats setting [1], then your
45 > > > profiles can use package.bashrc to define post_src_install and/or
46 > > > INSTALL_MASK to remove unwanted config files from upstream packages.
47 > > > Then you can easily replace the upstream config files with config files
48 > > > installed by your own configurations installed by your own ebuilds.
49 > >
50 > > Finally getting back to this after lots of distractions.
51 > > I cannot get profile-formats = profile-bashrcs to work.
52 > > I have in metadata/layout.conf:
53 > > masters = gentoo
54 > > profile-formats = portage-2 profile-bashrcs
55 > > then in profiles/tmv3-target-overlay/profile.bashrc:
56 > > INSTALL_MASK=xxxx
57 > > Doing portageq envvar INSTALL_MASK just yields an empty line
58 > > I guess I am missing something here?
59 > >
60 > >
61 >
62 > See the "man portage" for profile-bashrcs details. It uses
63 > package.bashrc rather than profile.bashrc, so that explains why it's not
64 > working for you.
65
66 hmm, I figured I could use profile.bashrc to set stuff for all pkgs?
67 In any case I tried package.bashrc but portageq envvar INSTALL_MASK does not print
68 anything either. It occurred to me that portageq envvar is not the right tool see
69 variable defined in bash scripts? Is there some other tools I can use?
70
71 Jocke

Replies

Subject Author
Re: [gentoo-dev] Managing etc/* in an embbeded system Zac Medico <zmedico@g.o>