Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
False Alarm: Recent Stage3 Tarballs Cause Dangerous Cruft
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10654
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jun 26, 2024 2:31 pm    Post subject: False Alarm: Recent Stage3 Tarballs Cause Dangerous Cruft Reply with quote

I happened to notice that, according to Portage /usr/bin/blkid (which should be part of sys-apps/util-linux) wasn't owned by any package. I subsequently discovered that that was because the installed util-linux placed blkid in /sbin, where it was properly accounted for:
Code:
terra ~ # equery belongs /sbin/blkid
 * Searching for /sbin/blkid ...
sys-apps/util-linux-2.39.3-r7 (/sbin/blkid)
So I have two copies of blkid.

In trying to find out how this might have come about, I discovered that recent stages place blkid in /usr/bin. Now this shouldn't be a real problem because the package database in /var/db/pkg should account for the original location and, when any package is re-emerged or updated, should remove its files from the old location and install them in the new. However, what I found was that the package database in the stage3 showed blkid installed in /sbin but the actual blkid binary in the stage3 was in /usr/bin. So the problem appears to be baked into the stage3 and, by the way, affects many other files. I've check this on two different stage3 files:
  • stage3-amd64-desktop-openrc-20240513T200338Z.tar.xz, which I used to install my shiny new workstation, and
  • stage3-amd64-desktop-openrc-20240623T164908Z.tar.xz, which was that latest as of yesterday when I pulled it for comparison.
Another minor issue is that /sbin is not on the path on my new install when logged in as root. This is also directly attributable to the contents of the stage, as /sbin is not placed on the path by the /etc/env.d mechanism.

I'll be filing a bug shortly, so this is just a heads up, not a support request. I'll keep you posted.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.


Last edited by John R. Graham on Wed Jun 26, 2024 3:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3679
Location: Rasi, Finland

PostPosted: Wed Jun 26, 2024 2:37 pm    Post subject: Reply with quote

I wonder if this is something to do with the merged-usr/split-usr.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
RumpletonBongworth
n00b
n00b


Joined: 17 Jun 2024
Posts: 73

PostPosted: Wed Jun 26, 2024 2:42 pm    Post subject: Reply with quote

Quote:
So I have two copies of blkid.

You probably don't have two copies. Rather, you are probably using a /usr-merged system, where /sbin is a symlink to usr/bin. That much would be perfectly normal.

You are quite right to imply that the tooling adjacent to portage (equery, portage-utils etc) is woefully inept at handling /usr-merged systems adequately. I brought this up several months ago and even wrote my own replacement for qfile as an exercise in proving that it is quite possible to do better. I was also considering filing a bug myself but, thus far, the matter has failed to make it to the top of my list of priorities.

In particular, I do not think that it is a good thing for portage to write paths which traverse symlinks to /var/db/pkg/*/*/CONTENTS files. It might be better for it to only ever write fully canonicalised paths. When I brought this up, one particular developer said that it sounded good in principle, though such a change might then result in knock-on effects that have to be attended to in their own right. As far as I know, nobody is presently working on any of this.

Quote:
Another minor issue is that /sbin is not on the path on my new install when logged in as root

This is one of the nice things about the /usr-merge. There is no need for it to be present.


Last edited by RumpletonBongworth on Wed Jun 26, 2024 2:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
RumpletonBongworth
n00b
n00b


Joined: 17 Jun 2024
Posts: 73

PostPosted: Wed Jun 26, 2024 2:50 pm    Post subject: Reply with quote

Also, be sure to read news. There are also some interesting links cross-referenced by that news item, [5] in particular.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10654
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Jun 26, 2024 3:11 pm    Post subject: Reply with quote

RumpletonBongworth wrote:
You probably don't have two copies. Rather, you are probably using a /usr-merged system, where /sbin is a symlink to usr/bin. That much would be perfectly normal.
Ah. Quite right: I am. This is also my first merged-usr profile install. I didn't realize the tools were lagging behind in their ability to detect and report, although I see now that it's been discussed. (That in and of itself is probably going to be enough for me to switch course on my profile, painful though it'll be in the short term.) Thank you.

(Updated my original post's title.)

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum