Page MenuHomeFreeBSD

Fix makefs bootstrap after d485c77f203fb0f4cdc08dea5ff81631b51d8809
ClosedPublic

Authored by arichardson on Feb 21 2021, 12:55 PM.
Tags
None
Referenced Files
F102395155: D28835.diff
Mon, Nov 11, 4:34 PM
F102381501: D28835.diff
Mon, Nov 11, 12:06 PM
Unknown Object (File)
Sun, Nov 10, 2:47 PM
Unknown Object (File)
Sun, Nov 10, 2:46 PM
Unknown Object (File)
Sun, Nov 10, 8:46 AM
Unknown Object (File)
Sun, Nov 10, 8:45 AM
Unknown Object (File)
Sun, Nov 10, 2:44 AM
Unknown Object (File)
Sun, Nov 10, 2:15 AM
Subscribers

Details

Summary

The makefs msdosfs code includes fs/msdosfs/denode.h which directly uses
struct buf from <sys/buf.h> rather than the makefs struct m_buf.
To work around this problem provide a local denode.h that includes
ffs/buf.h and defines buf as an alias for m_buf.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Could you please explain suggested modification to the msdosfs headers?

I am fine with the workaround from this review, but I highly dislike direct abuse of kernel headers done in makefs(8). I did buildworld on HEAD, and run kyua test in usr.sbin/makefs. I have no idea how to detect more breakage.

BTW, I run tinderbox and make buildworld on stable/12, and it succeeded.

This revision is now accepted and ready to land.Feb 21 2021, 2:51 PM

The breakage only occurs if you build makefs as part of the bootstrap tools. I.e. you'll need LOCAL_XTOOL_DIRS="lib/libnetbsd usr.sbin/makefs" -DBOOTSTRAP_ALL_TOOLS and/or D27619 to reproduce the build failure (happening for me on 12.2).

I'll look into the changes to the msdosfs headers tomorrow to see if that's less ugly.

Possibly slightly less ugly version

This revision now requires review to proceed.Feb 22 2021, 11:01 AM
sys/fs/msdosfs/denode.h
55

May be, instead of _KERNEL check, add #include <sys/buf.h> to consumers in sys/fs/msdosfs that lack it? Then remove this include at all.

sys/fs/msdosfs/denode.h
55

Sounds good, let me try that.

Seems to build just fine without the sys/buf.h include

arichardson edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Feb 22 2021, 5:41 PM