make installworld creates dozens of unneeded directories
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 15 Jun 2025 10:59:01 UTC
Hi all!
I'm running FreeBSD 14-STABLE. In /etc/src.conf amongst several others, I have
following lines, which prevent debug stuff and ZFS from being built. I have
quite some modules that I don't want to build, but these two are particular.
These lines in /etc/src.conf work fine and these modules are not built, but
I figured that after every installworld a bunch of unneeded empty directories is
created. All of them are related to modules that I prevented from build.
Here's the output of make check-old:
>>> Checking for old files
>>> Checking for old libraries
>>> Checking for old directories
/usr/share/vi/catalog
/usr/share/vi
/usr/share/syscons/scrnmaps
/usr/share/syscons/keymaps
/usr/share/syscons/fonts
/usr/share/syscons
/usr/share/sendmail
/usr/share/games/fortune
/usr/share/games
/usr/share/examples/tcsh
/usr/share/examples/pf
/usr/share/examples/ipfilter
/usr/share/examples/hast
/usr/share/examples/bhyve
/usr/share/doc/ncurses
/usr/share/doc/atf
/usr/share/calendar
/usr/share/atf
/usr/libexec/lpr/ru
/usr/lib/debug/usr/libexec/lpr/ru
/usr/libexec/lpr
/usr/lib/debug/usr/libexec/lpr
/usr/lib/debug/usr/tests
/usr/lib/debug/usr/sbin
/usr/lib/debug/usr/libexec/zfs
/usr/lib/debug/usr/libexec/sm.bin
/usr/lib/debug/usr/libexec/sendmail
/usr/lib/debug/usr/libexec/lpr/ru
/usr/lib/debug/usr/libexec/lpr
/usr/lib/debug/usr/libexec/bsdinstall
/usr/lib/debug/usr/libexec
/usr/lib/debug/usr/lib32/pkgconfig
/usr/lib/debug/usr/lib32/ossl-modules
/usr/lib/debug/usr/lib32/libxo/encoder
/usr/lib/debug/usr/lib32/libxo
/usr/lib/debug/usr/lib32/i18n
/usr/lib/debug/usr/lib32/geom
/usr/lib/debug/usr/lib32/engines-3
/usr/lib/debug/usr/lib32/dtrace
/usr/lib/debug/usr/lib32
/usr/lib/debug/usr/lib/ossl-modules
/usr/lib/debug/usr/lib/libxo/encoder
/usr/lib/debug/usr/lib/libxo
/usr/lib/debug/usr/lib/i18n
/usr/lib/debug/usr/lib/flua
/usr/lib/debug/usr/lib/engines-3
/usr/lib/debug/usr/lib/clang/19/lib/freebsd
/usr/lib/debug/usr/lib/clang/19/lib
/usr/lib/debug/usr/lib/clang/19
/usr/lib/debug/usr/lib/clang
/usr/lib/debug/usr/lib
/usr/lib/debug/usr/bin
/usr/lib/debug/usr
/usr/lib/debug/sbin
/usr/lib/debug/libexec
/usr/lib/debug/lib/nvmecontrol
/usr/lib/debug/lib/geom
/usr/lib/debug/lib
/usr/lib/debug/boot
/usr/lib/debug/bin
/usr/include/private/gtest/internal/custom
/usr/include/private/gtest/internal
/usr/include/private/gtest/
/usr/include/private/gmock/internal/custom
/usr/include/private/gmock/internal
/usr/include/private/gmock/
/usr/include/netgraph/bluetooth/include
/usr/include/netgraph/bluetooth
/usr/include/libmilter
/usr/include/atf-c++
/usr/include/atf-c
/etc/zfs
/etc/ppp
/etc/bluetooth
/etc/autofs
So every time after installworld I have to do make -DBATCH_DELETE_OLD_FILES
delete-old. It does its work (deletes these directories), but it shows two
errors:
rmdir: /usr/lib/debug/boot: Directory not empty
rmdir: /etc/zfs: Directory not empty
/usr/lib/debug/boot has two empty directories kernel/ and modules/ in it, which
are not listed in check-old output, so they are not deleted. The same story
with /etc/compatibility.d/.
In short, I have to rm -r these directories manually. First time I thought that
I screwed something up, but it has been repeated over and over again after every
install and I started to find it annoying. I mean, it's not something difficult
to delete these things, it just doesn't make sense to me: according
to /etc/src.conf these components shouldn't have been created, why are they
still here?
So my questions are:
1) Why do these empty directories appear at all if they are disabled
in /etc/src.conf? Maybe I understand the concept of `check-old' wrongly,
but I used to think that `old' files are those that linger around from
the previous build. But in my case, I do remove these directories after
every install and they are still created on every next one.
2) How can I fix the situation with /usr/lib/debug/boot and /etc/zfs so that
they would be removed automatically (by -DBATCH_DELETE_OLD_FILES
delete-old) and I will not have to remove these special cases manually?
Thank you,
Artem.