Bug 252664

Summary: change "-dirty" uname -v designator to something less obtrusive
Product: Base System Reporter: Helge Oldach <freebsd>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: emaste, freebsd, imp, lwhsu, uqs
Priority: ---    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Helge Oldach 2021-01-14 09:32:17 UTC
Since migration to git, a build from a modified tree would show up tagged as "-dirty", e.g.

FreeBSD 12.2-STABLE #0 df592782db9(stable/12)-dirty

This will also show up to innocent end users through motd, potentially suggesting they are connecting to a system that is kind of "dirty" in some way and requires cleaning or so.

Can we please change this back to something less obtrusive? With svn, we simply had an "M" (for "modified") designator attached to the revision (generated by svnversion).

s/-dirty/M/ applied to newvers.sh should be sufficient.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2021-01-15 03:20:05 UTC
It comes from standard git terminology, e.g. from `git describe`

       --dirty[=<mark>], --broken[=<mark>]
           Describe the state of the working tree. When the working tree
           matches HEAD, the output is the same as "git describe HEAD". If the
           working tree has local modification "-dirty" is appended to it. If
           a repository is corrupt and Git cannot determine if there is local
           modification, Git will error out, unless `--broken' is given, which
           appends the suffix "-broken" instead.

Perhaps we could use e.g. --dirty=-modified or such.

Separately, one of the advantages of git is that you can track any local changes, so I'd suggest committing all changes in place on a system that innocent end users would connect to.
Comment 2 Ulrich Spörlein freebsd_committer freebsd_triage 2021-01-15 13:46:21 UTC
This is used in the git and Linux world, so roughly everywhere. Why is this a problem for FreeBSD users, but not for Linux users?

As Ed mentioned, if this is more like a "permanent" modification, then using a custom branch for that would be best, and that would result in the branch name showing up, not -dirty.
Comment 3 Helge Oldach 2021-01-15 15:58:54 UTC
(In reply to Ulrich Spörlein from comment #2)
The connotation of "dirty" is pretty different in real life than in git.

I'm not feeling intimidated keeping it as is but then we might as well keep "blacklist" etc. and not follow Linux' strive for a more neutral language.

Feel free to close if you consider this an absurd argument.
Comment 4 Ulrich Spörlein freebsd_committer freebsd_triage 2021-01-15 19:46:59 UTC
It's not absurd, but I think the best place to change the terminology would be in upstream, i.e. git itself, so that FreeBSD (for once!) uses whatever upstream uses and doesn't come up with its own way of doing or naming things.

The "dirty" here will not be visible to regular users anyway. If we get actual reports that people feel weirded out by this, we can and should re-evaluate.

For now, let's keep the industry standard wording here. "dirty" is a good opposite of a "clean" build or tree.