Gentoo Archives: gentoo-dev

From: Jeroen Roovers <jer@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: logrotate and xinetd use flags
Date: Mon, 25 Apr 2011 02:23:46
Message-Id: 20110425042304.56f4d6ce@epia.jer-c2.orkz.net
In Reply to: [gentoo-dev] rfc: logrotate and xinetd use flags by William Hubbs
1 On Sun, 24 Apr 2011 16:58:23 -0500
2 William Hubbs <williamh@g.o> wrote:
3
4 > I feel that the current approach (using INSTALL_MASK) to control
5 > whether these configuration files are installed or not is not well
6 > documented. We tell people about it on the mailing lists, but I do
7 > not know of a place where it is documented.
8
9 INSTALL_MASK is documented in make.conf(5).
10
11 > Also, it seems to be an all or nothing arrangement. If I do not want
12 > logrotate support, I have to set the INSTALL_MASK then if I decide
13 > later I want it, I have to unset the INSTALL_MASK and run "emerge -e
14 > world" to get the files installed.
15
16 That sounds like a design decision about your own special Gentoo based
17 distro - it is the same with most USE flags and with other build time
18 settings like USE flags.
19
20 Usually when you decide to use INSTALL_MASK, it's because you want an
21 as small as possible system image - you're probably developing an
22 embedded system with storage constraints. If you're really clever about
23 that and want to delay the INSTALL_MASK decision, you might as well
24 `mount --bind' some directory on the development system
25 to /etc/logrotate.d inside the chroot before you start `emerge world'.
26
27 Another option is to plan your distribution even better and set
28 FEATURES=buildpkg. Then, you can unset INSTALL_MASK in make.conf or on
29 the command line, and emerge the .tbz2 - no rebuilding needed. Maybe
30 *this* could be better documented, although it does belong in the tips
31 and tricks department.
32
33 (And if you really want to prevent portage from even putting certain
34 files in the .tbz2, then use PKG_INSTALL_MASK instead.)
35
36 > If we use a "logrotate" or "xinetd" use flag, it gives the users
37 > better control of which packages have this support, and the --newuse
38 > option in portage can be used to rebuild only the affected packages.
39
40 `ls /etc/logrotate.d' should give a clue in the current situation. :)
41
42 > I guess the argument against the use flag was that packages were being
43 > rebuilt just to install configuration files. I can see how that could
44 > be a pita for big packages. Did anyone ever bring up using pkg_config
45 > to un/install these files based on the use flags?
46
47 It isn't just that you have to rebuild a large package, perhaps
48 consuming a lot of time or other resources unrelated to actual storage,
49 but that a package with a large install image (many megabytes) does not
50 benefit from a USE flag that controls installing an extra kilobyte
51 (plus a couple more on a typical filesystem).
52
53
54 jer