Created attachment 557970 [details, diff] db.eclass prefix patch The patch in the attachment contain changes necessary to deal with different extensions for shared libraries on various Prefix platforms. Please review.
@base-system, how does this look?
This part appears to be incorrect: > - if [ -f $i-3.2.so ]; then > - ln -sf $i-3.2.so $i-3.so > - ln -sf $i-3.2.so $i.so.3 > + if [ -f $i-3$(get_libname 2) ]; then > + ln -sf $i-3$(get_libname 2) $i-3$(get_libname) > + ln -sf $i-3$(get_libname 2) $i$(get_libname 3) On Linux, the old code looks for "libdb-3.2.so". The new code looks for "libdb-3.so.2".
(In reply to Mike Gilbert from comment #2) > This part appears to be incorrect: > > > - if [ -f $i-3.2.so ]; then > > - ln -sf $i-3.2.so $i-3.so > > - ln -sf $i-3.2.so $i.so.3 > > + if [ -f $i-3$(get_libname 2) ]; then > > + ln -sf $i-3$(get_libname 2) $i-3$(get_libname) > > + ln -sf $i-3$(get_libname 2) $i$(get_libname 3) > > > On Linux, the old code looks for "libdb-3.2.so". > The new code looks for "libdb-3.so.2". you're right, took me a while to see this one.
how about this instead: local i for i in libdb libdb_{cxx,tcl,java,sql,stl}; do - if [[ -f ${i}-3.2.so ]]; then - ln -sf ${i}-3.2.so ${i}-3.so - ln -sf ${i}-3.2.so ${i}.so.3 + if [[ -f $i-3.2$(get_libname) ]]; then + ln -sf $i-3.2$(get_libname) $i-3$(get_libname) + ln -sf $i-3.2$(get_libname) $i$(get_libname 3) fi done
That looks reasonable.
What about the full patch? Can I take it up for review on -dev?
I didn't spot any other problems. gentoo-dev seems like a good next step.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b158fba5eee07da21f8b80fd737b9bdd3865256b commit b158fba5eee07da21f8b80fd737b9bdd3865256b Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2021-01-14 12:27:45 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2021-01-14 12:28:34 +0000 eclass/db.eclass: use get_libname for Darwin support Closes: https://bugs.gentoo.org/673322 Signed-off-by: Fabian Groffen <grobian@gentoo.org> eclass/db.eclass | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e154526e7b59f94428b302b6360e54b5f689b9a5 commit e154526e7b59f94428b302b6360e54b5f689b9a5 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-01-16 16:08:10 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-01-16 16:08:10 +0000 Revert "eclass/db.eclass: use get_libname for Darwin support" This change somehow causes libdb.so to be installed. Bug: https://bugs.gentoo.org/673322 Closes: https://bugs.gentoo.org/765625 Reverts: b158fba5eee07da21f8b80fd737b9bdd3865256b Signed-off-by: Mike Gilbert <floppym@gentoo.org> eclass/db.eclass | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
I think this is the problem: - find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"$(get_libname)" -delete || die - find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"$(get_libname "[23]")" -delete || die + find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so' -delete || die + find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*so.[23]' -delete || die get_libname returns .so here, thus libdb[1._-]*.so which matches the '.' before '.so'. Given the amount of possibilities here, including things like libdb-1.1.so, easiest to me looks like: local soext=$(get_libname) soext=${soext#.} find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"${soext}" -delete || die soext=$(get_libname "[23]") soext=${soext#.} find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"${soext}" -delete || die perhaps?
can you share which version of db to test this with to see the output is the same?
I'm terribly sorry for the breakage, this never turned out to be a problem on Prefix hosts for some reason, but that's not relevant any more now. To salvage this situation, I did the following: mkdir /var/tmp/sys-libs-db; for e in *.ebuild ; do ebuild $e clean install ; find /var/tmp/portage/sys-libs/${e%.ebuild}/image > /var/tmp/sys-libs-db/$e ; done re-applied my original commit, did the same thing on a different directory, and ran diff -Naur. As bug 765625 points out, the diff indeed is like: --- /var/tmp/sys-libs-db/db-6.2.38.ebuild +++ /var/tmp/sys-libs-db-prefix1/db-6.2.38.ebuild @@ -26,4 +26,5 @@ /var/tmp/portage/sys-libs/db-6.2.38/image/usr/include/db6.2/db_185.h /var/tmp/portage/sys-libs/db-6.2.38/image/usr/include/db6.2/db.h /var/tmp/portage/sys-libs/db-6.2.38/image/usr/lib64 +/var/tmp/portage/sys-libs/db-6.2.38/image/usr/lib64/libdb.so /var/tmp/portage/sys-libs/db-6.2.38/image/usr/lib64/libdb-6.2.so So, I've applied what I think is my fix, and re-run this to ensure no diffs are there. The fix pertains to this section, like this: # first clean up old symlinks local soext=$(get_libname) find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"${soext#.}" -delete || die soext=$(get_libname "[23]") find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*'"${soext#.}" -delete || die find "${LIB}" -maxdepth 1 -type l -name 'libdb[1._-]*a' -delete || die I'll re-attach the new fix, please review it. I'm asking to be able to re-commit the fixed version (now I've verified for all versions this doesn't change the installed files) as to unbreak the Darwin targets again.
Created attachment 683302 [details, diff] db.eclass prefix-2 patch
It sounds like you tested this appropriately, so feel free to apply a revised patch.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4741fcd38d7a99bf5d1c3c31e4ba8300cd4bbb97 commit 4741fcd38d7a99bf5d1c3c31e4ba8300cd4bbb97 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2021-01-19 17:13:02 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2021-01-19 17:14:48 +0000 eclass/db.eclass: use get_libname for Darwin hosts (version 2) Redo the original attempt of this patch (b158fba5eee07da21f8b80fd737b9bdd3865256b) this time ensuring there is absoletely no change in installed files. Closes: https://bugs.gentoo.org/673322 Signed-off-by: Fabian Groffen <grobian@gentoo.org> eclass/db.eclass | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-)
GLEP 66 says the summary line for eclass changes should look like this: db.eclass: use get_libname for Darwin support It looks like you prefixed it with "eclass/", which is redundant and incorrect according to the GLEP. Just something to keep in mind for future patches.
Unware of that, thanks for letting me know!