HomeFreeBSD

cross-build: Provide real fflagstostr/strtofflags on Linux

Description

cross-build: Provide real fflagstostr/strtofflags on Linux

These are used by mtree and makefs, so in order to be able to set schg
on /var/empty in METALOG and set schg on various files and directories
in the resulting disk images we need to have a real implementation
rather than always giving no flags.

Ideally mtree wouldn't rely on round-tripping the textual flags field
via the "native" flags encoding using these functions, and ideally
makefs wouldn't rely on the "native" flags encoding matching FreeBSD's,
but in practice macOS's schg is the same and we can pretend Linux has
the same.

This fixes Linux-produced disk images lacking schg on any files or
directories, and Linux-produced distribution tarballs lacking schg on
/var/empty (note though that they do set schg on files, as install
already preserves file flags on Linux).

Reviewed by: emaste, markj
Differential Revision: https://reviews.freebsd.org/D50080

Details

Provenance
jrtc27Authored on Tue, May 6, 4:58 PM
Reviewer
emaste
Differential Revision
D50080: cross-build: Provide real fflagstostr/strtofflags on Linux
Parents
rG54072047da3d: xinstall: Don't use UF_SETTABLE to infer whether st_flags is present
Branches
Unknown
Tags
Unknown
OSZAR »