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