1 |
On 08/13/18 13:14, Corentin �Nado� Pazdera wrote: |
2 |
> August 13, 2018 6:58 PM, "james" <garftd@×××××××.net> wrote: |
3 |
> |
4 |
>> Here's what I got running your script:: |
5 |
>> |
6 |
>> /etc # /root/profile-explorer.sh |
7 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
8 |
>> /usr/portage/profiles/base/packages |
9 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
10 |
>> *>=sys-apps/baselayout-2 |
11 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
12 |
>> *>=sys-apps/findutils-4.4 |
13 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
14 |
>> *>=sys-devel/patch-2.7 |
15 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
16 |
>> /usr/portage/profiles/default/linux/packages |
17 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
18 |
>> /usr/portage/profiles/base/packages |
19 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
20 |
>> *>=sys-apps/baselayout-2 |
21 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
22 |
>> *>=sys-apps/findutils-4.4 |
23 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
24 |
>> *>=sys-devel/patch-2.7 |
25 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
26 |
>> /usr/portage/profiles/default/linux/packages |
27 |
>> |
28 |
>> Manually looking a the |
29 |
> |
30 |
> Seems weird, also no need to run it as root... |
31 |
> Here's my output for comparison : |
32 |
> |
33 |
> ``` |
34 |
> % ./profile-explorer.sh |
35 |
> [+] EROOT : / |
36 |
> [+] PORTDIR : /var/db/repos/gentoo |
37 |
> [+] CURPROFILE: default/linux/amd64/17.0 |
38 |
> [+] EAPI : 5 |
39 |
> |
40 |
> [+] packages (@system) |
41 |
> /var/db/repos/gentoo/profiles/base/packages |
42 |
> /var/db/repos/gentoo/profiles/default/linux/packages |
43 |
> ``` |
44 |
> |
45 |
> And the `explored-packages` file should symply contain a copy of the different inherited packages |
46 |
> files. |
47 |
> |
48 |
>> less /etc/portage/package.use/explored-packages: |
49 |
>> /usr/portage/profiles/base/packages |
50 |
>> |
51 |
>> I see: |
52 |
>> # Old ICU is unsupported. ICU 58 only remains for 13.0 based profiles. |
53 |
>> <dev-libs/icu-59 |
54 |
>> <dev-libs/icu-layoutex-59 |
55 |
>> |
56 |
>> But the system has:: |
57 |
>> |
58 |
>> [I] dev-libs/icu .... 60.2 |
59 |
>> |
60 |
>> equery uses icu |
61 |
>> |
62 |
>> gives me similar info: |
63 |
>> |
64 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
65 |
>> /usr/portage/profiles/base/packages |
66 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
67 |
>> *>=sys-apps/baselayout-2 |
68 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
69 |
>> *>=sys-apps/findutils-4.4 |
70 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
71 |
>> *>=sys-devel/patch-2.7 |
72 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
73 |
>> /usr/portage/profiles/default/linux/packages |
74 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
75 |
>> /usr/portage/profiles/base/packages |
76 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
77 |
>> *>=sys-apps/baselayout-2 |
78 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
79 |
>> *>=sys-apps/findutils-4.4 |
80 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
81 |
>> *>=sys-devel/patch-2.7 |
82 |
>> --- Invalid atom in /etc/portage/package.use/explored-packages: |
83 |
>> /usr/portage/profiles/default/linux/packages |
84 |
>> [ Legend : U - final flag setting for installation] |
85 |
>> [ : I - package is installed with flag ] |
86 |
>> [ Colors : set, unset ] |
87 |
>> * Found these USE flags for dev-libs/icu-60.2: |
88 |
>> U I |
89 |
>> + + abi_x86_32 : 32-bit (x86) libraries |
90 |
>> - - debug : Enable extra debug codepaths, like asserts and extra |
91 |
>> output. If |
92 |
>> you want to get meaningful backtraces see |
93 |
>> |
94 |
>> https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces |
95 |
>> - - doc : Add extra documentation (API, Javadoc, etc). It is |
96 |
>> recommended to |
97 |
>> enable per package instead of globally |
98 |
>> + + examples : Install examples, usually source code |
99 |
>> - - static-libs : Build static versions of dynamic libraries as well |
100 |
>> |
101 |
>> Which begs the Q1} can I get rid of the flag icu? What are |
102 |
>> consequences, as a baseline system flag, of it's removal ? |
103 |
>> |
104 |
>> less /usr/portage/profiles/base/packages |
105 |
>> show me more of what the @system set contains. Very interesting and |
106 |
>> useful. I'm thinking of aggregation of those listed packages |
107 |
>> and some basic (ascii) table form (equery,emerge, eix) parsed listing |
108 |
>> of the default and current flag settings. A "verification" tool |
109 |
>> if you like. Surely it would help if this info was (is?) more readily |
110 |
>> available and organized for folks that need a systematic approach, like |
111 |
>> heterogeneous HPC clusters. The tools exist for 'ad-hoc' and one off, |
112 |
>> but more of an organized representation at least at the set level. |
113 |
>> |
114 |
>> I feel like there is an existing tool that can yield all of this |
115 |
>> information, as it is on a current system. I've read where there are |
116 |
>> efforts to clean up the packages and default flags used in @system, |
117 |
>> so the bare minimum list per arch/profiles would ultimately be |
118 |
>> a useful listing, particular for my HPC. In HPC less is always faster |
119 |
>> and better, as it is in security and so many more aspects of CS. |
120 |
>> |
121 |
>> Obviosly, I have a few things to fix on this (fragile) system, but |
122 |
>> that'll happen as I'm at the beginning stages of auto_installs of |
123 |
>> minimized systems. What are your plans for you little script? |
124 |
>> |
125 |
>> Just to match equery uses <flag> and such? |
126 |
>> |
127 |
>> Here's a cutie: |
128 |
>> /usr/portage/profiles/default/linux/amd64/package.use.mask |
129 |
>> |
130 |
>> # Mike Frysinger <vapier@g.o> (08 May 2016) |
131 |
>> # This target supports VTV #547040. |
132 |
>>> =sys-devel/gcc-4.9 -vtv |
133 |
>> |
134 |
>> # Mike Frysinger <vapier@g.o> (21 Oct 2014) |
135 |
>> # This target supports ASAN/etc... #504200. |
136 |
>> sys-devel/gcc -sanitize |
137 |
>> |
138 |
>> And where was it that the processor/arch flags are now listed? |
139 |
>> |
140 |
>> tia, |
141 |
>> James |
142 |
>> cat |
143 |
> |
144 |
> To check impact on negating icu on your system : `USE="-icu" emerge -puDU --with-bdeps=y world` |
145 |
> |
146 |
> And concerning processor/arch flags I�d suggest keep exploring profiles, take a look at |
147 |
> make.defaults files. |
148 |
> Here the different files you can find according to PMS |
149 |
> https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-430005.2 |
150 |
> |
151 |
> -- |
152 |
> Corentin �Nado� Pazdera |
153 |
> |
154 |
> |
155 |
|
156 |
Yea, it's now working:: |
157 |
|
158 |
$ ./profile-explorer.sh |
159 |
[+] EROOT : / |
160 |
[+] PORTDIR : /usr/portage |
161 |
[+] CURPROFILE: default/linux/amd64/17.0 |
162 |
[+] EAPI : 5 |
163 |
|
164 |
[+] packages (@system) |
165 |
/usr/portage/profiles/base/packages |
166 |
/usr/portage/profiles/default/linux/packages |
167 |
|
168 |
|
169 |
|
170 |
So the explored-packages file looks complete (45) |
171 |
for my current minimize workstation (lxde) amd64 . |
172 |
|
173 |
|
174 |
So now parsing out these package listings with the current or default |
175 |
flag settings; I'm going to have to marinate on that. I actually need |
176 |
the reference (current default) flags once. But a method for dynamic |
177 |
verification of gentoo systems that ask to join a cluster, will have to |
178 |
have these packages/flags verified to join (down the road issue). |
179 |
amd64 is ok for now). Ideas on finding the default @system flag settings? |
180 |
|
181 |
Maybe find a amd64-stage-3 to unpack and parse out that data? |
182 |
Looking at the list of (45), the virtuals can be ignored, as there are |
183 |
no flags to set? The exact version installed is not present in that |
184 |
reported list. Some packages like gcc could be difficult with my |
185 |
pedestrian sed|awk|sort|uniq skills with regular expressions. Oh well |
186 |
time for a review... |
187 |
|
188 |
Would the parsing 'metadata.xml' per package be the easiest way to get |
189 |
the total list of flags for a given package (ebuild) ? |
190 |
Suggestions are welcome. |
191 |
|
192 |
thx Corentin, |
193 |
|
194 |
|
195 |
|
196 |
James |