Mailing List Archive

merge-usr and lib[ow]crypt*
Hi,

after updating the kernels to the latest stable version (6.6.21)
and updating the profiles from 17.1 to 23.0, the last update step
would be "merge-usr" as described at https://wiki.gentoo.org/wiki/Merge-usr
in order to have complete up-to-date systems.

But my two (nearly identical) systems generate different output
when running "merge-usr --dryrun":

Dry run on system 1 (a bit older than system 2) shows:

INFO: Migrating files from '/bin' to '/usr/bin'
INFO: Skipping symlink '/bin/awk'; '/usr/bin/awk' already exists
INFO: No problems found for '/bin'
INFO: Migrating files from '/sbin' to '/usr/bin'
INFO: No problems found for '/sbin'
INFO: Migrating files from '/usr/sbin' to '/usr/bin'
INFO: No problems found for '/usr/sbin'
INFO: Migrating files from '/lib' to '/usr/lib'
INFO: No problems found for '/lib'
INFO: Migrating files from '/lib64' to '/usr/lib64'
INFO: No problems found for '/lib64'

So this seems OK? The "awk thing" is a symbolic link anyway:

home01 ~ # ls -l /bin/awk
lrwxrwxrwx 1 root root 14 Dec 31 2022 /bin/awk -> ../usr/bin/awk
home01 ~ # ls -l /usr/bin/awk
lrwxrwxrwx 1 root root 4 Dec 31 2022 /usr/bin/awk -> gawk
home01 ~ # ls -l /usr/bin/gawk
-rwxr-xr-x 1 root root 682216 Feb 10 09:59 /usr/bin/gawk

But the dry run on system 2 (a bit newer than system 1) shows:

INFO: Migrating files from '/bin' to '/usr/bin'
INFO: Skipping symlink '/bin/awk'; '/usr/bin/awk' already exists
INFO: No problems found for '/bin'
INFO: Migrating files from '/sbin' to '/usr/bin'
INFO: No problems found for '/sbin'
INFO: Migrating files from '/usr/sbin' to '/usr/bin'
INFO: No problems found for '/usr/sbin'
INFO: Migrating files from '/lib' to '/usr/lib'
INFO: Skipping symlink '/lib/libcrypt.so.2'; '/usr/lib/libcrypt.so.2' already exists
INFO: No problems found for '/lib'
INFO: Migrating files from '/lib64' to '/usr/lib64'
INFO: Skipping symlink '/lib64/libcrypt.so.2'; '/usr/lib64/libcrypt.so.2' already exists
INFO: No problems found for '/lib64'

Since the messages are "INFO" (and not "WARNING" or "ERROR"), I guess
it's OK, too. But looking for "libcrypt*" is somewhat confusing:

n ~ # ls -l /lib/libcrypt*
lrwxrwxrwx 1 root root 17 Apr 14 23:39 /lib/libcrypt.so.1 -> libcrypt.so.1.1.0
-rwxr-xr-x 1 root root 218416 Apr 14 23:39 /lib/libcrypt.so.1.1.0
lrwxrwxrwx 1 root root 17 Apr 14 23:39 /lib/libcrypt.so.2 -> libcrypt.so.2.0.0
-rwxr-xr-x 1 root root 214320 Apr 14 23:39 /lib/libcrypt.so.2.0.0
n ~ # ls -l /usr/lib/libcrypt*
lrwxrwxrwx 1 root root 27 Apr 14 23:39 /usr/lib/libcrypt.so -> ../../lib/libcrypt.so.2.0.0
lrwxrwxrwx 1 root root 13 Dec 8 2022 /usr/lib/libcrypt.so.2 -> libowcrypt.so
n ~ # ls -l /usr/lib/libowcrypt*
lrwxrwxrwx 1 root root 27 Apr 14 23:39 /usr/lib/libowcrypt.so -> ../../lib/libcrypt.so.2.0.0

On system 1, it's a bit more simple:

home01 ~ # ls -l /lib/libcrypt*
lrwxrwxrwx 1 root root 17 Sep 12 2023 /lib/libcrypt.so.1 -> libcrypt.so.1.1.0
-rwxr-xr-x 1 root root 218368 Sep 12 2023 /lib/libcrypt.so.1.1.0
lrwxrwxrwx 1 root root 17 Sep 12 2023 /lib/libcrypt.so.2 -> libcrypt.so.2.0.0
-rwxr-xr-x 1 root root 218368 Sep 12 2023 /lib/libcrypt.so.2.0.0
home01 ~ # ls -l /usr/lib/libcrypt*
lrwxrwxrwx 1 root root 27 Sep 12 2023 /usr/lib/libcrypt.so -> ../../lib/libcrypt.so.2.0.0

(The same for "lib64" instead of "lib".)

Could the symbolic links from "/usr/lib" to "../../lib" be a kind of
circular references? And what is "libowcrypt" on system 2 - and why
doesn't it appear on system 1?

Is it safe to run "merge-usr" on both systems?

Thanks,

-Matt
Re: merge-usr and lib[ow]crypt* [ In reply to ]
----------------------- Original message -----------------------
From: Matthias Hanft <mh@hanft.de>
To: gentoo-user@lists.gentoo.org
Date: Mon, 15 Apr 2024 10:14:18 +0200
----------------------------------------------------------------

> Hi,
>
> after updating the kernels to the latest stable version (6.6.21)
> and updating the profiles from 17.1 to 23.0, the last update step
> would be "merge-usr" as described at https://wiki.gentoo.org/wiki/Merge-usr
> in order to have complete up-to-date systems.
>
> But my two (nearly identical) systems generate different output
> when running "merge-usr --dryrun":
>
> Dry run on system 1 (a bit older than system 2) shows:
>
> INFO: Migrating files from '/bin' to '/usr/bin'
> INFO: Skipping symlink '/bin/awk'; '/usr/bin/awk' already exists
> INFO: No problems found for '/bin'
> INFO: Migrating files from '/sbin' to '/usr/bin'
> INFO: No problems found for '/sbin'
> INFO: Migrating files from '/usr/sbin' to '/usr/bin'
> INFO: No problems found for '/usr/sbin'
> INFO: Migrating files from '/lib' to '/usr/lib'
> INFO: No problems found for '/lib'
> INFO: Migrating files from '/lib64' to '/usr/lib64'
> INFO: No problems found for '/lib64'
>
> So this seems OK? The "awk thing" is a symbolic link anyway:
>
> home01 ~ # ls -l /bin/awk
> lrwxrwxrwx 1 root root 14 Dec 31 2022 /bin/awk -> ../usr/bin/awk
> home01 ~ # ls -l /usr/bin/awk
> lrwxrwxrwx 1 root root 4 Dec 31 2022 /usr/bin/awk -> gawk
> home01 ~ # ls -l /usr/bin/gawk
> -rwxr-xr-x 1 root root 682216 Feb 10 09:59 /usr/bin/gawk
>
> But the dry run on system 2 (a bit newer than system 1) shows:
>
> INFO: Migrating files from '/bin' to '/usr/bin'
> INFO: Skipping symlink '/bin/awk'; '/usr/bin/awk' already exists
> INFO: No problems found for '/bin'
> INFO: Migrating files from '/sbin' to '/usr/bin'
> INFO: No problems found for '/sbin'
> INFO: Migrating files from '/usr/sbin' to '/usr/bin'
> INFO: No problems found for '/usr/sbin'
> INFO: Migrating files from '/lib' to '/usr/lib'
> INFO: Skipping symlink '/lib/libcrypt.so.2';
> '/usr/lib/libcrypt.so.2' already exists
> INFO: No problems found for '/lib'
> INFO: Migrating files from '/lib64' to '/usr/lib64'
> INFO: Skipping symlink '/lib64/libcrypt.so.2';
> '/usr/lib64/libcrypt.so.2' already exists
> INFO: No problems found for '/lib64'
>
> Since the messages are "INFO" (and not "WARNING" or "ERROR"), I guess
> it's OK, too. But looking for "libcrypt*" is somewhat confusing:
>
> n ~ # ls -l /lib/libcrypt*
> lrwxrwxrwx 1 root root 17 Apr 14 23:39 /lib/libcrypt.so.1 ->
> libcrypt.so.1.1.0
> -rwxr-xr-x 1 root root 218416 Apr 14 23:39 /lib/libcrypt.so.1.1.0
> lrwxrwxrwx 1 root root 17 Apr 14 23:39 /lib/libcrypt.so.2 ->
> libcrypt.so.2.0.0
> -rwxr-xr-x 1 root root 214320 Apr 14 23:39 /lib/libcrypt.so.2.0.0
> n ~ # ls -l /usr/lib/libcrypt*
> lrwxrwxrwx 1 root root 27 Apr 14 23:39 /usr/lib/libcrypt.so ->
> ../../lib/libcrypt.so.2.0.0
> lrwxrwxrwx 1 root root 13 Dec 8 2022 /usr/lib/libcrypt.so.2 -> libowcrypt.so
> n ~ # ls -l /usr/lib/libowcrypt*
> lrwxrwxrwx 1 root root 27 Apr 14 23:39 /usr/lib/libowcrypt.so ->
> ../../lib/libcrypt.so.2.0.0
>
> On system 1, it's a bit more simple:
>
> home01 ~ # ls -l /lib/libcrypt*
> lrwxrwxrwx 1 root root 17 Sep 12 2023 /lib/libcrypt.so.1 -> libcrypt.so.1.1.0
> -rwxr-xr-x 1 root root 218368 Sep 12 2023 /lib/libcrypt.so.1.1.0
> lrwxrwxrwx 1 root root 17 Sep 12 2023 /lib/libcrypt.so.2 -> libcrypt.so.2.0.0
> -rwxr-xr-x 1 root root 218368 Sep 12 2023 /lib/libcrypt.so.2.0.0
> home01 ~ # ls -l /usr/lib/libcrypt*
> lrwxrwxrwx 1 root root 27 Sep 12 2023 /usr/lib/libcrypt.so ->
> ../../lib/libcrypt.so.2.0.0
>
> (The same for "lib64" instead of "lib".)
>
> Could the symbolic links from "/usr/lib" to "../../lib" be a kind of
> circular references? And what is "libowcrypt" on system 2 - and why
> doesn't it appear on system 1?
>
> Is it safe to run "merge-usr" on both systems?

If you only see INFO lines, it's safe to run "merge-usr".
If you see anything else, you need to fix that first.

--
Joost