Page MenuHomeFreeBSD

Fix makefs bootstrap after d485c77f203fb0f4cdc08dea5ff81631b51d8809
ClosedPublic

Authored by arichardson on Feb 21 2021, 12:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 8:16 AM
Unknown Object (File)
Mar 15 2024, 3:27 PM
Unknown Object (File)
Mar 15 2024, 3:27 PM
Unknown Object (File)
Mar 15 2024, 3:27 PM
Unknown Object (File)
Mar 15 2024, 3:27 PM
Unknown Object (File)
Mar 15 2024, 3:27 PM
Unknown Object (File)
Mar 15 2024, 3:27 PM
Unknown Object (File)
Mar 11 2024, 6:21 PM
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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37262
Build 34151: arc lint + arc unit

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
57

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
57

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