On Wed, Jun 11, 2025 at 01:19:45PM -0500, Andrew Daugherity wrote: > On a system which was installed several years ago, back when the > automatic disklabel gave 2 GB to /usr, that filesystem is filling up > to the point sysupgrade failed. sysclean helped me get enough space > to upgrade, but in searching for other things to clean up, I > discovered a large (225 MB) newbsd.gdb file in the kernel relink > directory. > > The Makefile in said directory removes bsd.gdb before renaming newbsd > to bsd. I think it should be removing newbsd.gdb instead, like so: > ==== > --- /usr/share/relink/kernel/GENERIC.MP/Makefile~ Sun Apr 13 09:19:41 2025 > +++ /usr/share/relink/kernel/GENERIC.MP/Makefile Wed Jun 11 12:51:38 2025 > @@ -2434,7 +2434,7 @@ > ${SYSTEM_LD_HEAD} > ${SYSTEM_LD} swapgeneric.o > ${SYSTEM_LD_TAIL} > - rm -f bsd.gdb > + rm -f newbsd.gdb > mv -f newbsd bsd > > update-link:
Good find. The Makefile is generated by 'make config' step for kernel builds and 'make install' creates and installs the terball. The bug is in config(8): Index: mkmakefile.c =================================================================== RCS file: /cvs/src/usr.sbin/config/mkmakefile.c,v diff -u -p -r1.48 mkmakefile.c --- mkmakefile.c 28 Nov 2021 19:26:03 -0000 1.48 +++ mkmakefile.c 11 Jun 2025 20:47:31 -0000 @@ -516,7 +516,7 @@ emitload(FILE *fp) "\t${SYSTEM_LD_HEAD}\n" "\t${SYSTEM_LD} swap%s.o\n" "\t${SYSTEM_LD_TAIL}\n" - "\trm -f %s.gdb\n" + "\trm -f new%s.gdb\n" "\tmv -f new%s %s\n\n", swname, nm, nm, nm) < 0) return (1);