Page MenuHomeFreeBSD

mtree: TESTSBASE directory always starts with a /
AcceptedPublic

Authored by jlduran on Nov 24 2024, 6:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 7, 6:05 PM
Unknown Object (File)
Thu, Nov 28, 8:41 PM
Unknown Object (File)
Thu, Nov 28, 5:38 AM
Unknown Object (File)
Nov 24 2024, 6:44 AM
Subscribers

Details

Reviewers
emaste
imp
Summary

Remove the extra forward slash ("/"), otherwise the mtree specification
file will have the double slash and will not be parsed by makefs when
attempting to build NanoBSD with NO_ROOT privileges.

Fixes: 07670b30fa43 ("Create /usr/tests *.debug file directory hierarchy")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jlduran created this revision.

This is fine with me, but you could instead strip a leading / from TESTBASE if present, e.g. /usr/lib/debug/${TESTBASE:S,^/,,}. This will be robust against a possible TESTBASE without a leading slash.

This revision is now accepted and ready to land.Fri, Nov 29, 4:46 PM

This is fine with me, but you could instead strip a leading / from TESTBASE if present, e.g. /usr/lib/debug/${TESTBASE:S,^/,,}. This will be robust against a possible TESTBASE without a leading slash.

I like this suggestion, I'll submit it on a separate review, as TESTSBASE is used in some other places as well.

Also, I have yet to investigate if the mtree parsing under makefs is too strict (https://cgit.freebsd.org/src/tree/usr.sbin/makefs/mtree.c#n1004). But I'll check that once I have finished polishing building NanoBSD without root privileges (https://reviews.freebsd.org/D47653#1086475, https://www.youtube.com/watch?v=5qCaOMQ3ZnQ&t=2917s).