1 |
> On 2018-08-16, at 16:09, Corentin “Nado” Pazdera <nado@××××××××××.be> wrote: |
2 |
> |
3 |
> Hi, |
4 |
> |
5 |
> So I tested it, and I was surprised how many /etc files weren't put into whitelist. |
6 |
> Actually, most of /etc shouldn't be suggested for deletion if the packages are still installed. |
7 |
|
8 |
Thanks for testing! Really appreciate it. |
9 |
|
10 |
The whitelist is the biggest work in progress right now. Most of what it lists from /etc for me is /etc/config-archive which AFAIK is not managed by Portage at all although Portage will place old files there? I don't use the feature because my /etc is controlled by Git. The stuff listed in /var/ is pretty accurate as there's a lot of old website cruft and this computer does not serve anything like that anymore. |
11 |
|
12 |
> |
13 |
> Portage stuff like repositories could be whitelisted in a dynamic manner, or at least bing able to |
14 |
> tell what directorie(s) are used to store them. |
15 |
|
16 |
The idea is to move to everything in the whitelist.c file to a declarative (no code unless you count RE) configuration file. I have not decided on a format but I am leaning towards INI-style because GLib2 has a parser for that built-in. The config file will specify exact paths, RE, and globs. There will be a default dynamic list generated at runtime based on what packages you have installed (as gcruft had this feature). |
17 |
|
18 |
> I also caught some wrongly listed files because of the multilib system with /lib symlink. |
19 |
> For example, dhcpcd declared /lib/dhcpcd/dhcpcd-hooks, thus the realpath /lib64/dhcpcd/dhcpcd-hooks |
20 |
> was listed in the removal suggestion. This should be fixed with profile 17.1 |
21 |
|
22 |
The /lib vs /lib64 issue will be resolved in a later version. I think I need to use lstat() everywhere instead of stat(), or I can call realpath() prior to storing values in the set. This file should be whitelisted, but only if you have dhcpcd installed (I've long since moved to dhcpd). |
23 |
|
24 |
I am trying to my best to give zero false positives, so you plan to have something like `% gcrud | ... | xargs rm -fR`. |
25 |
|
26 |
> |
27 |
> The log is so huge at the moment it is useless for me :/ |
28 |
> |
29 |
> % wc -l out.log |
30 |
> 461575 out.log |
31 |
|
32 |
Any thoughts on how to simplify analysis? |
33 |
|
34 |
-- |
35 |
Andrew |