On Wed, 2015-07-22 at 14:30 +0200, Michał Górny wrote: > > Joakim Tjernlund <joakim.tjernl...@transmode.se> napisał: > > > We got an embedded gentoo system where we need to manage many conf > > files under /etc that we have > > modified and should be under our control when an SW upgrade is > > performed. > > > > Cloning every ebuild where we have modified its conf file(s) under /etc > > feels awkward so > > I am looking for some other way to do this automatically during SW > > upgrade and I figured > > this can not be an unique problem for us, so I wonder how other people > > have solved this problem? > > Our customers will not use emerge directly and we will provide binary > > pkgs. > > > > Any ideas welcome :) > > > > Jocke > > Maybe post-phase hooks would help you. Not around a PC right now but I think > they're described in portage.5. > Long story short, you create per-package env files in /etc/portage/env (you > can pin them generically or to a > specific version, or package spec via package.env) and declare > post_src_install() where you add your custom > config files atop the package. >
hmm, that sounds interesting but I don't quite get what to do, you think I should copy over /etc/inittab after it has been installed by sys-apps/sysvinit with my own version(which is stored where?) This gave me an idea though: In /etc/portage/env/install-mask.conf I add INSTALL_MASK="${INSTALL_MASK} /etc/inittab /etc/xxx" then in /etc/portage/package.env/install-mask sys-apps/sysvinit install-mask.conf sys-apps/xxx install-mask.conf ... (Can I do this from my own custom profile instead? how?) This should prevent sys-apps/sysvinit to install conf files I want to manage, right? Then I create my own new ebuild holding all config files I have changed myself. Jocke