Bug 249145

Summary: pkgbase: lib32 directories/files in utilities.plist which belong in utilities-lib32.plist
Product: Base System Reporter: Martin <martin.jakob>
Component: miscAssignee: freebsd-pkgbase (Nobody) <pkgbase>
Status: Open ---    
Severity: Affects Some People CC: emaste
Priority: --- Keywords: needs-patch, pkgbase
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Martin 2020-09-06 08:41:50 UTC
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
Comment 1 Ed Maste freebsd_committer freebsd_triage 2022-11-17 21:54:30 UTC
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}