Page MenuHomeFreeBSD

release: Add variables for makefs and mkimg arguments
Needs ReviewPublic

Authored by markj on Sep 4 2025, 6:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 9, 6:56 PM
Unknown Object (File)
Thu, Oct 9, 4:32 PM
Unknown Object (File)
Thu, Oct 9, 4:32 PM
Unknown Object (File)
Thu, Oct 9, 4:32 PM
Unknown Object (File)
Thu, Oct 9, 2:54 PM
Unknown Object (File)
Sat, Sep 27, 6:23 AM
Unknown Object (File)
Sat, Sep 20, 6:22 AM
Unknown Object (File)
Fri, Sep 19, 12:17 PM
Subscribers

Details

Reviewers
bnovkov
emaste
andrew
Group Reviewers
releng
Summary

This will be useful for enabling reproducible image creation. Right
now, makefs and mkimg are generating non-reproducible images since they
preserve timestamps from files in the staging tree. To make image
creation reproducible, we need to specify an explicit timestamp using
command-line arguments. So, add variables which can be defined in
release/scripts/vmimage.subr.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67048
Build 63931: arc lint + arc unit

Event Timeline

markj requested review of this revision.Sep 4 2025, 6:12 PM

Are we sure all these scripts aren't set -u? Even if that's true, I don't love relying on that.

Are we sure all these scripts aren't set -u? Even if that's true, I don't love relying on that.

Yes, they are definitely not set -u-clean. I don't quite follow though: how does this patch rely on that? : ${FOO:=bar} is ok even with set -u configured.

Are we sure all these scripts aren't set -u? Even if that's true, I don't love relying on that.

Yes, they are definitely not set -u-clean. I don't quite follow though: how does this patch rely on that? : ${FOO:=bar} is ok even with set -u configured.

The setting of the default values for ..ARGS looks to be stacked on top of this, so in this patch they are not yet defined unless the external environment sets them?

Are we sure all these scripts aren't set -u? Even if that's true, I don't love relying on that.

Yes, they are definitely not set -u-clean. I don't quite follow though: how does this patch rely on that? : ${FOO:=bar} is ok even with set -u configured.

The setting of the default values for ..ARGS looks to be stacked on top of this, so in this patch they are not yet defined unless the external environment sets them?

Oh, yes, that's true, but after the subsequent patch to set default values they should be defined everywhere. At that point, set -u would be useful (but having tried setting it locally, that will take some work).

release/amd64/make-memstick.sh
55–56

The MAKEFSARGS (flags) vs MAKEFSARG (target manifest) naming scheme is a bit confusing, somebody might get burned by this in the future.
Would something like MAKEFSMTREE be a better fit?

release/amd64/mkisoimages.sh
85–86

Minor nit, just so we remain consistent with wrapping vars in curly braces here (and in other places in this patch).

Rename the pre-existing MAKEFSARG variable, which contains a path to a staging tree or
mtree metalog, to MAKEFSTARGET, to avoid clashing with MAKEFSARGS.

markj added inline comments.
release/amd64/make-memstick.sh
55–56

The argument may be a directory instead of an mtree file, so that name isn't really right. I went with MAKEFSTARGET locally, but I don't love that either. Further suggestions are welcome.