There are some files in the main utilities.plist, which should go to the utilities-lib32.plist: utilities.plist:@(root,wheel,0444,) /etc/mtree/BSD.lib32.dist utilities.plist:@dir(root,wheel,0755,) /usr/lib32 utilities.plist:@(root,wheel,0444,) /usr/lib32/Scrt1.o utilities.plist:@(root,wheel,0444,) /usr/lib32/crt1.o utilities.plist:@(root,wheel,0444,) /usr/lib32/crtbegin.o utilities.plist:@(root,wheel,0444,) /usr/lib32/crtbeginS.o utilities.plist:@(root,wheel,0444,) /usr/lib32/crtbeginT.o utilities.plist:@(root,wheel,0444,) /usr/lib32/crtend.o utilities.plist:@(root,wheel,0444,) /usr/lib32/crtendS.o utilities.plist:@(root,wheel,0444,) /usr/lib32/crti.o utilities.plist:@(root,wheel,0444,) /usr/lib32/crtn.o utilities.plist:@dir(root,wheel,0755,) /usr/lib32/dtrace utilities.plist:@(root,wheel,0444,) /usr/lib32/dtrace/drti.o utilities.plist:@(root,wheel,0444,) /usr/lib32/gcrt1.o
lib32 is handled by bsd.lib.mk: .if ${SHLIBDIR:M*lib32*} TAGS+= lib32 .endif .if defined(NO_ROOT) .if !defined(TAGS) || ! ${TAGS:Mpackage=*} TAGS+= package=${PACKAGE:Uutilities} .endif TAG_ARGS= -T ${TAGS:[*]:S/ /,/g} .endif but TAG_ARGS is used only by the install rules in bsd.lib.mk, not the rules in bsd.files.mk, which is what's used to install the csu files (lib/csu/Makefile.inc) OBJS+= Scrt1.o crt1.o gcrt1.o OBJS+= crtbegin.o crtbeginS.o crtbeginT.o OBJS+= crtend.o crtendS.o OBJS+= crti.o crtn.o ... FILES= ${OBJS} FILESMODE= ${LIBMODE} FILESOWN= ${LIBOWN} FILESGRP= ${LIBGRP} FILESDIR= ${LIBDIR}
It seems things have changed a bit since this bug was last looked at. The good news is that the lib32-related files mentioned here are no longer in utilities.plist. The bad news is that they still aren't in the correct place: # cat clibs-dev.plist | grep lib32 @dir(root,wheel,0755,) /usr/lib32 @(root,wheel,0444,) /usr/lib32/Scrt1.o @(root,wheel,0444,) /usr/lib32/crt1.o @(root,wheel,0444,) /usr/lib32/crtbegin.o @(root,wheel,0444,) /usr/lib32/crtbeginS.o @(root,wheel,0444,) /usr/lib32/crtbeginT.o @(root,wheel,0444,) /usr/lib32/crtend.o @(root,wheel,0444,) /usr/lib32/crtendS.o @(root,wheel,0444,) /usr/lib32/crti.o @(root,wheel,0444,) /usr/lib32/crtn.o @(root,wheel,0444,) /usr/lib32/gcrt1.o # cat dtrace.plist | grep lib32 @dir(root,wheel,0755,) /usr/lib32/dtrace @(root,wheel,0444,) /usr/lib32/dtrace/drti.o Also, /usr/bin/ldd32 is now in utilities.plist which doesn't seem correct: # cat utilities.plist | grep ldd32 @(root,wheel,0555,) /usr/bin/ldd32 I'll look in to fixing this.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=53bb5613a8a15363718b6e6de8d965bf9a2c5469 commit 53bb5613a8a15363718b6e6de8d965bf9a2c5469 Author: Isaac Freund <ifreund@freebsdfoundation.org> AuthorDate: 2024-10-09 13:24:06 +0000 Commit: Joseph Mingrone <jrm@FreeBSD.org> CommitDate: 2024-10-09 13:31:52 +0000 ldd32: place in utilities-lib32 not utilities The ldd32 binary is currently in the utilities package but belongs in utilities-lib32. This patch corrects the situation. PR: 249145 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47023 usr.bin/ldd32/Makefile | 1 + 1 file changed, 1 insertion(+)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=d5e9faf1f3291d0af9dcdd53ccdaf0971e5d8f63 commit d5e9faf1f3291d0af9dcdd53ccdaf0971e5d8f63 Author: Isaac Freund <ifreund@freebsdfoundation.org> AuthorDate: 2024-10-07 16:32:46 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-10-09 16:03:26 +0000 mk: honor TAGS for FILES in default group Currently the lib32 crt files (/usr/lib32/Scrt1.o etc.) are placed in the clibs-dev package rather than the clibs-dev-lib32 package. The /usr/lib32/dtrace/drti.o file is similarly placed in the dtrace package rather than the dtrace-lib32 package. Splitting shared libraries in /usr/lib32 into a -lib32 package is handled in bsd.lib.mk by adding "lib32" to TAGS. However bsd.files.mk ignores TAGS and only honors ${group}TAGS since 144c442. This patch changes the behavior of bsd.files.mk to honor TAGS if the default FILES group is used. This matches the handling of PACKAGE, which is also ignored unless the default FILES group is used. With this patch, both the clibs and dtrace package are split correctly. PR: 249145 Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46991 share/mk/bsd.files.mk | 1 + 1 file changed, 1 insertion(+)
I believe this can be closed as it is fixed by the two commits landed in main. There are no longer any /usr/lib32 files in non *-lib32 packages.
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=85b6bfaac92551716cfece08137c3cb4d2261521 commit 85b6bfaac92551716cfece08137c3cb4d2261521 Author: Isaac Freund <ifreund@freebsdfoundation.org> AuthorDate: 2024-10-07 16:32:46 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-10-21 19:04:56 +0000 mk: honor TAGS for FILES in default group Currently the lib32 crt files (/usr/lib32/Scrt1.o etc.) are placed in the clibs-dev package rather than the clibs-dev-lib32 package. The /usr/lib32/dtrace/drti.o file is similarly placed in the dtrace package rather than the dtrace-lib32 package. Splitting shared libraries in /usr/lib32 into a -lib32 package is handled in bsd.lib.mk by adding "lib32" to TAGS. However bsd.files.mk ignores TAGS and only honors ${group}TAGS since 144c442. This patch changes the behavior of bsd.files.mk to honor TAGS if the default FILES group is used. This matches the handling of PACKAGE, which is also ignored unless the default FILES group is used. With this patch, both the clibs and dtrace package are split correctly. PR: 249145 Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46991 (cherry picked from commit d5e9faf1f3291d0af9dcdd53ccdaf0971e5d8f63) share/mk/bsd.files.mk | 1 + 1 file changed, 1 insertion(+)
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=ae9d96dd9f8599a6fccf190ef6863f1c514a7a27 commit ae9d96dd9f8599a6fccf190ef6863f1c514a7a27 Author: Isaac Freund <ifreund@freebsdfoundation.org> AuthorDate: 2024-10-09 13:24:06 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2024-10-21 19:04:55 +0000 ldd32: place in utilities-lib32 not utilities The ldd32 binary is currently in the utilities package but belongs in utilities-lib32. This patch corrects the situation. PR: 249145 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47023 (cherry picked from commit 53bb5613a8a15363718b6e6de8d965bf9a2c5469) usr.bin/ldd32/Makefile | 1 + 1 file changed, 1 insertion(+)