Gentoo Archives: gentoo-hardened

From: Jan Krueger <jk@×××××××××××.net>
To: solar@g.o
Cc: Alexander Gabert <pappy@g.o>, gentoo-hardened@g.o
Subject: Re: [gentoo-hardened] portage hooks/modules (was Ports Security)
Date: Fri, 05 Sep 2003 23:34:16
Message-Id: 200309060139.42739.jk@microgalaxy.net
In Reply to: Re: [gentoo-hardened] Ports Security by Ned Ludd
1 On Friday 05 September 2003 22:47, Ned Ludd wrote:
2 > On Fri, 2003-09-05 at 16:25, Jan Krueger wrote:
3 >
4 > I don't think the idea is bad in anyway at all, yes it will be very time
5 > consuming and yes a few of us would actually like to use such a thing.
6 > flawfinder would of been ideal for such a thing as its python based and
7 > all, but would need some major testing. I'm attaching a small patch for
8 > your ebuild.sh that should do exactly what your looking for. Note:
9 > flawfinder must be located in /usr/bin and "flawfinder" must be found in
10 > your features.
11 >
12 > Perhaps you would like to begin/finish coding this feature. :)
13
14 Yes. Thank you for your positive feedback, especially the patch.
15 I felt a little bit lost in /usr/lib/portage. Your words and patch just
16 motivated me to go ahead :)
17
18 > What I make of all this is sounds like we need need some portage hooks
19 > for users.
20 Yes, thats it. Leaves room open for whatever.
21 Somehow one could see src_compile and the other existing functions as already
22 existing hooks, abstracting a little bit. Lets rename "hooks" into "modules"
23 This would leave a directory, lets say /usr/lib/portage/modules.d, that would
24 be very similar to /etc/init.d in fact:
25 scripts that do something and have dependencies on each other:
26 src_install.sh:
27 depend() {
28 need src_compile
29 }
30 src-compile.sh:
31 depend() {
32 need src_unpack
33 }
34 ...
35
36 flawfinder.sh {
37 depend() {
38 need src_unpack
39 before src_compile
40 }
41
42 This would give an before unseen flexibility to ports (just like our machine
43 startup-processes differ and still all machines come up (most of them) and
44 provide a wide variety of services :) without touching portage itself (as we
45 dont touch init)
46
47 one could do:
48 # portage-module add flawfinder need src_unpack before src_compile
49
50 and if one doesnt want stripped binaries because he/she loves debugging
51 # portage-module remove strip
52
53 Jan
54
55
56 --
57 gentoo-hardened@g.o mailing list

Replies