Gentoo Archives: gentoo-portage-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] Re: Is portage (/usr)/bin-merge safe?
Date: Thu, 07 Dec 2017 08:37:42
Message-Id: pan$b21ee$7b9a8b84$d6f050df$3ef1a601@cox.net
In Reply to: Re: [gentoo-portage-dev] Is portage (/usr)/bin-merge safe? by Zac Medico
1 Zac Medico posted on Fri, 31 May 2013 22:49:02 -0700 as excerpted:
2
3 > On 05/31/2013 10:36 PM, Duncan wrote:
4 >> As in subject, is portage bin/usr-bin merge safe?
5 >>
6 >> It appears most of my clashing files are /usr/bin/* -> /bin/* symlinks.
7 >> (That's just bin, I've not looked at sbin.)
8 >
9 > I haven't tried it, but it should work just fine. Portage has always
10 > supported directory symlinks like these. I haven't heard any recent
11 > complaints regarding them.
12
13 As the attribution says, I'm resurrecting a thread from 2013...
14
15 I set up a merged /usr/bin -> /bin (and sbin -> bin, and /usr -> .) soon
16 after that, with very few problems, usually ebuilds doing unconditional
17 rms in postinst or the like, until recently...
18
19 [I'll likely file this as a bug as well, but thought I'd post a followup
20 to the old thread here, first. I'm kinda busy troubleshooting the
21 unrelated bug that triggered the coreutils expression of this bug for me,
22 ATM.]
23
24 Something recently changed, as now I'm having many more problems, so far
25 with four packages, glibc (!!), coreutils (!!), nano, and shadow,
26 installing symlinks that ultimately point to themselves. The glibc one
27 is of course critical as it breaks pretty much the entire system right
28 away, the coreutils set is critical due to the number of frequently used
29 binaries it breaks, and I'm lucky I discovered nano before needing it as
30 a low-dep fallback editor. Being a single-user system I don't so often
31 use passwd, but like nano, it's one of those things that when it's
32 needed, it's REALLY needed.
33
34 From my current installmask file:
35
36 # 2017.1112 glibc: libm-2.*.so due to /usr -> . symlink,
37 # symlink overwrites the lib it points to!
38 INSTALL_MASK="
39 $INSTALL_MASK
40 /usr/lib64/libm-2.*.so
41 "
42
43 # 2017.1207 coreutils symlinks that overwrite their binaries
44 INSTALL_MASK="
45 $INSTALL_MASK
46 /usr/bin/basename
47 /usr/bin/chroot
48 /usr/bin/cut
49 /usr/bin/dir
50 /usr/bin/dirname
51 /usr/bin/du
52 /usr/bin/env
53 /usr/bin/expr
54 /usr/bin/head
55 /usr/bin/mkfifo
56 /usr/bin/mktemp
57 /usr/bin/readlink
58 /usr/bin/seq
59 /usr/bin/sleep
60 /usr/bin/sort
61 /usr/bin/tail
62 /usr/bin/touch
63 /usr/bin/tr
64 /usr/bin/tty
65 /usr/bin/uname
66 /usr/bin/vdir
67 /usr/bin/wc
68 /usr/bin/yes
69 "
70 # 2017.1207 shadow, nano symlinks
71 INSTALL_MASK="
72 $INSTALL_MASK
73 /usr/bin/nano
74 /usr/bin/passwd
75 "
76
77 So what changed in portage that previously prevented the /usr/* symlinks
78 from overwriting the non-usr binaries, but now allows the overwrites to
79 go ahead, breaking the system?
80
81 Note that I ran into the glibc library symlink issue first. I ran into
82 the coreutils issue after a bad upgrade (unrelated, I think) broke X,
83 forcing me back to a backup and I started upgrading a few packages at a
84 time from binpkg, to see which one broke X again. When I got to
85 coreutils, the qmerge phase broke half way thru as a binary was replaced
86 by a symlink to itself. I'm not sure why it triggered in binpkg install
87 but not when I had originally installed it on the system, but it may be
88 due to the fact that I normally run parallel merges so the system is
89 heavily loaded during normal merge, while with the binpkg merge it
90 wasn't, thus implying a race condition of some sort. I discovered the
91 nano and shadow/passwd issues, seeing their binaries were broken symlinks
92 to themselves, when fixing the coreutils issue. I've no idea when they
93 happened.
94
95 --
96 Duncan - List replies preferred. No HTML msgs.
97 "Every nonfree program has a lord, a master --
98 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-portage-dev] Re: Is portage (/usr)/bin-merge safe? Zac Medico <zmedico@g.o>