libstore: remove impersonate-linux-26 setting

it's ancient, it does not do what it was added for (improving
determinism), and it probably hasn't been needed for anything
in a very long time. we can probably get away with killing it

Change-Id: I66f5c841964d9ad62726cb2dae8d6fc42095399f
This commit is contained in:
eldritch horrors
2026-01-31 20:05:45 +00:00
parent cf9735f82e
commit 1042d26c31
5 changed files with 15 additions and 20 deletions
@@ -0,0 +1,14 @@
---
synopsis: "`impersonate-linux-26` setting removed"
cls: [5047]
category: "Miscellany"
credits: [horrors]
---
Linux 3.0 was released 15 years ago. The `impersonate-linux-26` setting was added
14 years ago with no mention of it being necessary to build anything, only saying
that it improves determinism—which isn't accurate since impersonating Linux 2.6.x
still allows the version string to change, and the final component of the version
does still change with each Linux release. Since this setting should be no longer
necessary in modern systems and workarounds for building old code exist (by using
e.g. `setarch --uname-2.6` to wrap builds) we are removing this setting from Lix.
-7
View File
@@ -28,13 +28,6 @@ void setPersonality(std::string_view system)
throw SysError("cannot set 32-bit personality");
}
/* Impersonate a Linux 2.6 machine to get some determinism in
builds that depend on the kernel version. */
if ((system == "i686-linux" || system == "x86_64-linux") && settings.impersonateLinux26) {
int cur = personality(0xffffffff);
if (cur != -1) personality(cur | 0x0020000 /* == UNAME26 */);
}
/* Disable address space randomization for improved
determinism. */
int cur = personality(0xffffffff);
+1 -3
View File
@@ -1,10 +1,8 @@
#pragma once
///@file
#include <string>
#include <string_view>
namespace nix {
void setPersonality(std::string_view system);
}
-1
View File
@@ -100,7 +100,6 @@ libstore_setting_definitions = files(
'settings/hashed-mirrors.md',
'settings/id-count.md',
'settings/ignored-acls.md',
'settings/impersonate-linux-26.md',
'settings/keep-build-log.md',
'settings/keep-derivations.md',
'settings/keep-env-derivations.md',
@@ -1,9 +0,0 @@
---
name: impersonate-linux-26
internalName: impersonateLinux26
platforms: [linux]
type: bool
default: false
aliases: [build-impersonate-linux-26]
---
Whether to impersonate a Linux 2.6 machine on newer kernels.