Re: git: 315ee00fa961 - main - zfs: merge openzfs/zfs@804414aad

From: FreeBSD User <freebsd_at_walstatt-de.de>
Date: Mon, 28 Aug 2023 19:21:41 UTC
Am Mon, 28 Aug 2023 15:36:57 +0200
FreeBSD User <freebsd@walstatt-de.de> schrieb:

> Am Sun, 27 Aug 2023 20:23:14 -0700
> Cy Schubert <Cy.Schubert@cschubert.com> schrieb:
> 
> > In message <5520d4cf-076c-9a06-7000-9ef608d21470@gmail.com>, Alexander 
> > Motin wr
> > ites:  
> > > Hi,
> > >
> > > I've just updated my test system and it happily imported everything. 
> > > Could you give more details?  Does "all pools do not import" means that 
> > > no pools were imported or that some pools were not imported?  Where they 
> > > imported before reboot and had default cachefile pool property value? 
> > > Generally on boot ZFS does not import all the pools.  Aside of the boot 
> > > pool ZFS on boot imports only pools that were imported before reboot and 
> > > used default cachefile, which is /etc/zfs/zpool.cache.  Do you see any 
> > > errors related to import?  Anything suspicious can be seen in sysctl 
> > > kstat.zfs.misc.dbgmsg ?    
> > 
> > Confirmed. This is a regression for users whose /usr is in a separate 
> > filesystem than root (/). If you have a rootfs that includes /usr, you are 
> > OK. But, if your /usr is on a different filesystem your computer will fail 
> > to boot and will need the following patch:  
> 
> That's it! Thanks for the hint.
> 
> On all failing systems the base/OS is on an UFS SSD with "/usr" being a dedicated partition.
> 
> > 
> > From 3a79eb11e8912621d5f6200c7fc22466a27807fc Mon Sep 17 00:00:00 2001
> > From: Cy Schubert <cy@FreeBSD.org>
> > Date: Sun, 27 Aug 2023 20:02:17 -0700
> > Subject: [PATCH] librt: Chase 315ee00fa961, fixing boot
> > 
> > libzfs uses librt as a dependency. Systems with a separate / and /usr
> > will fail to load the libzfs.so library because librt.so is not
> > available due to the fact that /usr is not mounted yet. Install librt
> > in /lib making it available to libzfs.
> > 
> > Fixes:		315ee00fa961
> > ---
> >  lib/librt/Makefile | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/lib/librt/Makefile b/lib/librt/Makefile
> > index 9a54c3ea2812..8b880c41ec44 100644
> > --- a/lib/librt/Makefile
> > +++ b/lib/librt/Makefile
> > @@ -3,6 +3,7 @@
> >  
> >  PACKAGE=clibs
> >  LIB=rt
> > +SHLIBDIR=/lib
> >  SHLIB_MAJOR= 1
> >  CFLAGS+=-I${SRCTOP}/lib/libc/include -I${.CURDIR}
> >  .ifndef NO_THREAD_STACK_UNWIND  
> 
> 
> 

I'm on CURRENT (FreeBSD 15.0-CURRENT amd64 1500000 #0 main-n265062-76edfabbecde: Mon Aug 28
19:20:05 CEST 2023 amd64). Assuming the patch above has been commited since "make
delete-old-libs" is already killing /usr/lib/librt.so.1:

 THERE IS NO /lib/librt.so.1 !

After a clean/from scratch buildworld buildkernel and installworld/installkernel, rebooting,
perfomring "make delete-old-libs" leaves me with a dead system behind! Luckily, I got access
to other boxes for copying the missing librt.so.1 (out build system is on ZFS)

regards
oh

-- 
O. Hartmann