1 |
On 07/23/2015 12:46 AM, Joakim Tjernlund wrote: |
2 |
> On Wed, 2015-07-22 at 19:47 -0400, Ian Stakenvicius wrote: |
3 |
>> |
4 |
>> Sent from an iPhone, sorry for the HTML... |
5 |
>> |
6 |
>>> On Jul 22, 2015, at 5:38 PM, Rich Freeman <rich0@g.o> wrote: |
7 |
>>> |
8 |
>>> On Wed, Jul 22, 2015 at 8:05 AM, Joakim Tjernlund |
9 |
>>> <joakim.tjernlund@×××××××××.se> wrote: |
10 |
>>>> |
11 |
>>>> There can not be any manual merges after an SW update here. |
12 |
>>>> |
13 |
>>>> I started to look at INSTALL_MASK, what if I set INSTALL_MASK |
14 |
>>>> to point to all conf files I want to manage myself. |
15 |
>>>> Then /etc/inittab etc. will not be touched when updating init |
16 |
>>> |
17 |
>>> This sounds like overkill. |
18 |
>>> |
19 |
>>> If you've already installed a custom /etc/inittab, then when you |
20 |
>>> emerge init, it won't overwrite your inittab even if you don't change |
21 |
>>> anything in your portage config. emerge won't touch any files in /etc |
22 |
>>> unless they don't already exist. |
23 |
>> |
24 |
>> |
25 |
>> ..AND have been modified. IIRC if the hash of the config files match what they were when the package was |
26 |
>> previously emerged, then the files are updated aren't they? |
27 |
>> |
28 |
>> I expect that this is fine in the situation described, but it's worth knowing that a config file left |
29 |
>> unmodified may be replaced with a different vanilla config file later on. |
30 |
> |
31 |
> Sure, but what if I need to change a conf file in an installed system? Or rebuild a a system from scratch? |
32 |
> The user only runs a one SW update command to update an installed system in the field and cannot edit a bunch |
33 |
> of files too. Especially when there are hundreds of systems sitting in remote locations. |
34 |
|
35 |
If you use the profile-bashrcs profile-formats setting [1], then your |
36 |
profiles can use package.bashrc to define post_src_install and/or |
37 |
INSTALL_MASK to remove unwanted config files from upstream packages. |
38 |
Then you can easily replace the upstream config files with config files |
39 |
installed by your own configurations installed by your own ebuilds. |
40 |
|
41 |
> This is why I need a way change conf files automatically and I want to use ebuilds/profile as |
42 |
> far as possible. I think there is room for some improvement here in portage to allow this kind |
43 |
> of customization. |
44 |
|
45 |
A template engine such as jinja [2] can be use to automate rendering of |
46 |
your config files with settings that are specific to a particular system. |
47 |
|
48 |
[1] |
49 |
https://gitweb.gentoo.org/proj/portage.git/commit/?id=803dafc462027d6015721f40513abb5f57dc1178 |
50 |
[2] http://jinja.pocoo.org/ |
51 |
-- |
52 |
Thanks, |
53 |
Zac |