RE: [PATCH 0/3] Advertise OS version
From: <hidden>
Date: 2024-06-19 15:25:20
On Wednesday, June 19, 2024 10:51 AM, Peff wrote:
On Wed, Jun 19, 2024 at 04:01:57PM +0200, Christian Couder wrote:quoted
On Wed, Jun 19, 2024 at 3:50 PM Dragan Simic [off-list ref] wrote:quoted
quoted
I don't mind if this is present but disabled by default, but then I guess it is not really serving much of a purpose, as hardly anybody would enable it. Which makes collecting large-scale statistics by hosting providers pretty much useless (and I don't think it is all that useful for debugging individual cases).I agree that it should actually be disabled by default, for privacy and security reasons, but that would actually defeat its purpose, so I'm not really sure should it be merged.One possibility is to send just the `sysname`, described as 'Operating system name (e.g., "Linux")', field of the struct utsname filled out by uname(2) by default.That would be better to me. I still don't love it, but I admit it's coming more from a knee-jerk response than from some rational argument against people knowing I run Linux. Since HTTP user-agent fields are common, we can look at those for prior art. curl sends its own version but nothing else. Most browsers do seem to include some OS information. My version of firefox gives its own version along with "Linux x86_64". So basically "uname -sm".quoted
And then there might be a knob to deactivate it completely or to make it more verbose (which might be useful for example in a corporate context).Yes, I think we should definitely have an option to suppress or override it, just like we do for the user-agent string.
Instead of an override, what about a knob that specifies the uname command to use to build the value. Personally, I would use `uname -s -r -v` on NonStop to get the kernel version used in the build. The difficulty on my platform is that this is not truly useful info. The effective build OS compatibility version is in a #define __L_Series_RVU and __H_Series_RVU, so the knob might be needed in git_compat_util.h or similar. This comes from the compiler arguments, which are not yet captured.