1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
From 2658aeff8f4c17865382e1699d4cc92043f89f60 Mon Sep 17 00:00:00 2001
From: Cristian Le <cristian.le@qt.io>
Date: Thu, 19 Jun 2025 17:12:46 +0200
Subject: [PATCH 18/24] Drop CMAKE_SYSTEM_VERSION from modules json if Linux
In order to make the project build reproducible it should not record
transient information of the build host.
The linux kernel is not encoded in the source, and the value from the
modules.json does not seem to be used anywhere, so we can drop it for
now.
Fixes: QTBUG-136060
Change-Id: Ic157d66d47040b080e9121fd065a8d60d489f586
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
---
cmake/ModuleDescription.json.in | 2 +-
cmake/QtModuleHelpers.cmake | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/cmake/ModuleDescription.json.in b/cmake/ModuleDescription.json.in
index e8b58387d9e..5d41bc8e377 100644
--- a/cmake/ModuleDescription.json.in
+++ b/cmake/ModuleDescription.json.in
@@ -1,5 +1,5 @@
{
- "schema_version": 2,
+ "schema_version": 3,
"name": "${target}",
"repository": "${lower_case_project_name}",
"version": "${PROJECT_VERSION}",${extra_module_information}
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake
index 97f5ea79946..98c961c982b 100644
--- a/cmake/QtModuleHelpers.cmake
+++ b/cmake/QtModuleHelpers.cmake
@@ -1608,9 +1608,13 @@ ${indent3}\"name\": \"${platform_name}\",")
string(APPEND platforms_information "
${indent3}\"variant\": \"${platform_variant}\",")
endif()
- if(NOT "${CMAKE_SYSTEM_VERSION}" STREQUAL "")
+ if(NOT "${CMAKE_SYSTEM_VERSION}" STREQUAL "" AND
+ NOT platform_name STREQUAL "Linux")
string(APPEND platforms_information "
${indent3}\"version\": \"${CMAKE_SYSTEM_VERSION}\",")
+ else()
+ string(APPEND platforms_information "
+${indent3}\"version\": null,")
endif()
string(APPEND platforms_information "
${indent3}\"compiler_id\": \"${CMAKE_CXX_COMPILER_ID}\",
--
2.52.0
|