1 |
I've recently been spending some time getting to know a little more about |
2 |
portage, and I've run into a few issues. |
3 |
|
4 |
$ emerge --update --deep --newuse world |
5 |
|
6 |
It's reasonably well known that the above doesn't update all packages |
7 |
installed on a system - I think it only updates packages that are in the |
8 |
world file. Recently, this issue has left a server of mine with a insecure |
9 |
version of apache (apache was installed due to a dependency caused by PHP, or |
10 |
some application I installed that pulled in php, which in turn pulled in |
11 |
apache.). |
12 |
The man page does cover this, but it's by no means made obvious - and I think |
13 |
this is rather a large issue, as a log of users of gentoo probably don't know |
14 |
this. |
15 |
|
16 |
From the manual: |
17 |
|
18 |
"When you install a package with uninstalled dependencies and do not |
19 |
explicitly state those dependencies in the list of parameters, they will not |
20 |
be added to the world file. If you want them to be detected for world |
21 |
updates, make sure to explicitly list them as parameters to emerge." |
22 |
|
23 |
It should have a big WARNING or something next to it IMO. |
24 |
|
25 |
emerge --depclean will point out what isn't in your world file for you, so you |
26 |
can go ahead and add things to the world file manually. Having done this, |
27 |
when you uninstall whatever it was that dragged that dependency in in the |
28 |
first place, you will get unneeed packages on the system. |
29 |
|
30 |
Lets say for examples sake I install mail-client/squirrelmail. This will pull |
31 |
in PHP, which will pull in apache. In this case, -uD will not update apache |
32 |
should a new version appear. An emerge --depclean will show apache as being |
33 |
removable- so apache will need manually adding to the world file. Now, when |
34 |
I uninstall squirrrelmail, apache is no longer needed, but depclean won't |
35 |
show that, because I was forced to add it to the world file. In a lot of |
36 |
situations, the package might be a lot more obscure, perhaps some odd |
37 |
libraries which now are in the world file, and will stay there, because |
38 |
unless I manually look though the world file, and run an 'equery depends' on |
39 |
each one, I won't notice they are no longer needed. |
40 |
|
41 |
So it seems that I either suffer packages not being updated, or am forced into |
42 |
adding things into the world file and then face the problem that dependencies |
43 |
will not be removable by depclean. |
44 |
|
45 |
Also, I don't understand why emerge --depclean will show a package, which upon |
46 |
doing an 'equery depends' on that package will show that actaully that |
47 |
package is needed. Why do these tools contradict each other? Surly depclean |
48 |
should have the logic that equery uses to see when a dependency really is |
49 |
needed? |
50 |
|
51 |
glsa-check goes some way to solving the problem, it does check to see if there |
52 |
are outdated packages that have been effected by security issues - but it |
53 |
doens't update libraries that were installed but aren't in the world file. |
54 |
|
55 |
Is there a script that's been developed to be cronned to email the sys admin a |
56 |
report saying what packages need updating? I noticed that in the last month |
57 |
on this list there has been some useful information about running glsa-check |
58 |
and rsynicng just part of the portage tree. This kind of thing is intregal to |
59 |
running a server, and if no such script exists in the portage tree, I will |
60 |
attempt to write one. |
61 |
|
62 |
Kind Regards, |
63 |
|
64 |
-- |
65 |
Ian P. Christian ~ http://pookey.co.uk |