Gentoo Archives: gentoo-hardened

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-dev@l.g.o
Cc: gentoo-hardened@l.g.o
Subject: [gentoo-hardened] Re: [gentoo-dev] profiles/features/64bit-native/package.use.mask contents redundancy
Date: Sun, 12 Feb 2012 18:12:50
Message-Id: 20120212211553.2e5ac911@sf.home
In Reply to: [gentoo-hardened] Re: [gentoo-dev] profiles/features/64bit-native/package.use.mask contents redundancy by Sergei Trofimovich
1 > > > Looks like 'arch/amd64/no-multilib' profile inclusion is kept in
2 > > > sync with 'features/64bit-native' one: [1]. Exception is
3 > > > 'hardened/linux/amd64/no-multilib' profile. Looks like a bug.
4 > >
5 > > Synced this bit with a fix:
6 > >
7 > > | 11 Feb 2012; Sergei Trofimovich <slyfox@g.o>
8 > > | hardened/linux/amd64/no-multilib/parent:
9 > > | Make hardened/linux/amd64/no-multilib include arch/amd64/no-multilib
10 > > | (http://archives.gentoo.org/gentoo-dev/msg_7c41ab6653426048c2e8b0f271637bf3.x
11 > > | ml).
12 >
13 > And the change brought the breakage:
14 >
15 > New profiles popped up:
16 > | /usr/portage/profiles/arch/base
17 > | /usr/portage/profiles/features/multilib
18 > | /usr/portage/profiles/features/multilib/lib32
19 >
20 > Likely because of double inclusion of some suspicious
21 > parent profiles.
22 >
23 > Reverted the change :[
24
25 Zorry and blueness helped me to investigated the issue further.
26 'default/linux/amd64/10.0/no-multilib' contains duplicate inheritance chain:
27
28 Simple script [1] shows us profile loading order:
29
30 /subvolumes/gentoo-portage/profiles/base
31 /subvolumes/gentoo-portage/profiles/default/linux
32 /subvolumes/gentoo-portage/profiles/arch/base
33 /subvolumes/gentoo-portage/profiles/features/multilib
34 /subvolumes/gentoo-portage/profiles/features/multilib/lib32
35 /subvolumes/gentoo-portage/profiles/arch/amd64
36 /subvolumes/gentoo-portage/profiles/default/linux/amd64
37 /subvolumes/gentoo-portage/profiles/releases
38 /subvolumes/gentoo-portage/profiles/releases/10.0
39 /subvolumes/gentoo-portage/profiles/default/linux/amd64/10.0
40 /subvolumes/gentoo-portage/profiles/arch/base
41 /subvolumes/gentoo-portage/profiles/features/multilib
42 /subvolumes/gentoo-portage/profiles/features/multilib/lib32
43 /subvolumes/gentoo-portage/profiles/arch/amd64
44 /subvolumes/gentoo-portage/profiles/arch/amd64/no-multilib
45 /subvolumes/gentoo-portage/profiles/features/64bit-native
46 /subvolumes/gentoo-portage/profiles/default/linux/amd64/10.0/no-multilib
47
48 What we see here is repeating block:
49 /subvolumes/gentoo-portage/profiles/arch/base
50 /subvolumes/gentoo-portage/profiles/features/multilib
51 /subvolumes/gentoo-portage/profiles/features/multilib/lib32
52 /subvolumes/gentoo-portage/profiles/arch/amd64
53 /subvolumes/gentoo-portage/profiles/default/linux/amd64
54
55 which can rollback all changes introduced by the profiles:
56 /subvolumes/gentoo-portage/profiles/releases
57 /subvolumes/gentoo-portage/profiles/releases/10.0
58 /subvolumes/gentoo-portage/profiles/default/linux/amd64/10.0
59
60 Does not sound like a good thing.
61
62 For those who can't read:
63 http://dev.gentoo.org/~slyfox/profiles_default.png
64
65 Notice the 'arch/amd64' inheritance both by
66 'arch/amd64/no-multilib'
67 'default/linux/amd64'
68
69 I think 'arch/amd64/no-multilib' does not need any parents as any profile
70 belongs to some arch, so pulls it explicitely.
71
72 Even thing like prefix (has the same double-inclusion "feature" as well):
73 http://dev.gentoo.org/~slyfox/profiles_prefix.png
74
75 I suggest to:
76 - drop 'parents' for 'profiles/arch/amd64/no-multilib'
77 - [optionally] move 'profiles/arch/amd64/no-multilib' to 'features/amd64-no-multilib'
78 - and 'profiles/arch/amd64/no-multilib' back to 'hardened/linux/amd64/no-multilib'
79 It would state explicitely that it does not inherit anything.
80
81 [ Another option would be to simplify 'default/linux/amd64' thing not to include 'profiles/arch' ]
82
83 Thoughts?
84
85 Feature request:
86 Can we add a double-inclusion detector for profiles to repoman?
87
88 Thanks for your patience!
89
90 [1]
91 #!/usr/bin/env python
92
93 import portage
94 for p in portage.settings.profiles:
95 print "%s" % p
96
97 --
98
99 Sergei

Attachments

File name MIME type
signature.asc application/pgp-signature