#3579 PR merged: Include rsyslog loadable modules in LIBS

Labels: enhancement, fixed / solved / done

jsmeix opened issue at 2026-03-06 13:13:

In Linux.conf add /usr/lib//rsyslog/.so
because at least in Debian rsyslog
loadable modules are located in
/usr/lib/x86_64-linux-gnu/rsyslog/*.so
see https://github.com/rear/rear/issues/3573

jsmeix commented at 2026-03-16 11:15:

I think
https://github.com/rear/rear/pull/3584
cause the currently failing checks, see
https://github.com/rear/rear/pull/3584#issuecomment-4066912408

jsmeix commented at 2026-03-16 13:26:

@rear/contributors
I would like to merge it tomorrow afternoon
unless there are objections.

jsmeix commented at 2026-03-17 14:25:

@pcahyna
I wonder if in current conf/GNU/Linux.conf
the following part matches the intent of
"support Debian multiarch library paths consistently"

### support multiarch (Debian libraries are located in a subdirectory like x86_64-linux-gnu
### under {/lib,/usr/lib})
/lib/*/libnss_dns*
/lib/*/libnss_files*
/lib/*/libnss_usrfiles*

At least I think the code does not match its comment.
To match the comment I think it should be like

# On Debian and related systems
# libraries are located in directories like
# /lib/x86_64-linux-gnu or /usr/lib/x86_64-linux-gnu
# cf. https://github.com/rear/rear/issues/3573
/lib/*/libnss_dns*
/usr/lib/*/libnss_dns*
/lib/*/libnss_files*
/usr/lib/*/libnss_files*
/lib/*/libnss_usrfiles*
/usr/lib/*/libnss_usrfiles*

I think "support multiarch" is plain wrong wording
because architectures are e.g. i386 versus ppc64le.
If at all I think "support different distributions"
could be right wording for what the code actually does.

FWIW:
The "support multiarch" comment originates there:
https://github.com/rear/rear/commit/e96dc5437c26541b318f5edab09cf39b93beacab
As normal at that time it does not tell the reason behind.
Probably at that time the reason was obvious for everyone.
But nowadays more than ten years later...
Perhaps it had been actually different architectures
like /lib/ versus /lib64/ versus /lib32/ or things like that?
Cf.
https://unix.stackexchange.com/questions/74646/difference-between-lib-lib32-lib64-libx32-and-libexec

pcahyna commented at 2026-03-17 14:52:

I think "support multiarch" is plain wrong wording
because architectures are e.g. i386 versus ppc64le.
If at all I think "support different distributions"
could be right wording for what the code actually does.

No, the intent of the /lib/*/... lines is indeed to support multiarch on a particular distribution (Debian). (Sure, the need of having multiple different lines for a single library is that there are multiple distributions and they are different, but that was not the point of this comment.) Architectures are also e.g. i386 versus x86_64 and that's why one has subdirectories like x86_64-linux-gnu to distinguish libraries for different architectures on the same machine. See the Debian documentation about multiarch paths : https://wiki.debian.org/Multiarch/Implementation#Change_file_paths

Perhaps it had been actually different architectures
like /lib/ versus /lib64/ versus /lib32/ or things like that?

Indeed. Some distributions use directory names like /lib/ vs. /lib64/ to achieve the same effect in a different way. (I recall all three : /lib/ versus /lib64/ versus /lib32/ on IRIX because there were 3 MIPS ABIs :-) )

So, the comment was too brief and even after my addition it is probably too brief, but it has always been correct, AFAICT.

jsmeix commented at 2026-03-17 16:14:

@pcahyna
thank you for your clarification!

But then the current comment is still not right
at its specific place because in

### support multiarch (Debian libraries are located in a subdirectory like x86_64-linux-gnu
### under {/lib,/usr/lib})
/lib/*/libnss_dns*
/lib/*/libnss_files*
/lib/*/libnss_usrfiles*

there is nothing in /usr/lib here.
That case comes later at

# see note about multiarch and Debian above and
# https://github.com/rear/rear/issues/3573#issuecomment-3972176281
/usr/lib/*/rsyslog/*.so

So the comments are technically right but not really clear.
I will do a subsequent pull request to make it more clear...

jsmeix commented at 2026-03-17 16:55:

@pcahyna @rear/contributors
please have a look (as time permits):
https://github.com/rear/rear/pull/3586
FYI: Tomorrow I am not in the office.

pcahyna commented at 2026-03-17 18:22:

@pcahyna thank you for your clarification!

But then the current comment is still not right at its specific place because in

### support multiarch (Debian libraries are located in a subdirectory like x86_64-linux-gnu
### under {/lib,/usr/lib})
/lib/*/libnss_dns*
/lib/*/libnss_files*
/lib/*/libnss_usrfiles*

there is nothing in /usr/lib here.

Debian libraries are located under {/lib,/usr/lib} in general, but presumably these particular libraries have been known to always exist under /lib and not under /usr/lib, even on systems that don't have merged /usr (which makes sense, as those are basic system libraries).


[Export of Github issue for rear/rear.]