...
 
Commits (9)
nvidia-settings (390.67-1) unstable; urgency=medium
* New upstream release 390.67.
* Use reproducibility patches from upstream.
* Bump Standards-Version to 4.1.5. No changes needed.
-- Andreas Beckmann <anbe@debian.org> Sun, 15 Jul 2018 02:33:17 +0200
nvidia-settings (390.48-2) unstable; urgency=medium
* Add Provides+Conflicts: nvidia-settings-gtk-${nvidia:Version} to prevent
......@@ -1330,4 +1338,3 @@ nvidia-settings (1.0-1) unstable; urgency=low
* Initial Release.
-- Randall Donald <rdonald@debian.org> Wed, 30 Jun 2004 16:45:52 -0700
......@@ -23,7 +23,7 @@ Build-Depends:
Build-Conflicts:
libxnvctrl-dev,
Rules-Requires-Root: no
Standards-Version: 4.1.4
Standards-Version: 4.1.5
Homepage: https://download.nvidia.com/XFree86/nvidia-settings/
Vcs-Browser: https://salsa.debian.org/nvidia-team/nvidia-settings
Vcs-Git: https://salsa.debian.org/nvidia-team/nvidia-settings.git
......
libXNVCtrl.so.0 #PACKAGE# #MINVER#
NV_ID@Base 337
#MISSING: 390.67# NV_ID@Base 337
XNVCTRLBindWarpPixmapName@Base 313
XNVCTRLIsNvScreen@Base 0
XNVCTRLQueryAttribute@Base 0
......@@ -30,4 +30,4 @@ libXNVCtrl.so.0 #PACKAGE# #MINVER#
XNVCTRLStringOperation@Base 0
XNVCtrlSelectNotify@Base 0
XNVCtrlSelectTargetNotify@Base 0
pNV_ID@Base 337
#MISSING: 390.67# pNV_ID@Base 337
From 5c1dffffaae81050e5fc668fcc88478712933458 Mon Sep 17 00:00:00 2001
From: Aaron Plattner <aplattner@nvidia.com>
Date: Fri, 23 Mar 2018 17:13:50 -0700
Subject: [PATCH 1/2] nvidia-settings: Remove $(STAMP_C)
This file is generated at build time and includes the version, builder, and date
of the build. For example,
$ strings /usr/bin/nvidia-settings | grep 'nvidia id'
nvidia id: nvidia-settings: version 396.14 (buildmeister@swio-display-x86-rhel47-09) Mon Mar 19 20:18:47 PDT 2018
This information isn't hugely useful, and makes it difficult for some
distributions to achieve their goal of reproducible builds. Rather than adding a
build-time flag to hard-code this information, just remove it.
See https://github.com/NVIDIA/nvidia-settings/pull/12
---
src/Makefile | 9 +--------
src/command-line.c | 4 +---
src/common-utils/common-utils.h | 2 ++
src/gtk+-2.x/ctkdisplayconfig-utils.c | 4 +---
src/libXNVCtrl/Makefile | 6 +-----
src/libXNVCtrl/utils.mk | 35 ++---------------------------------
utils.mk | 35 ++---------------------------------
7 files changed, 10 insertions(+), 85 deletions(-)
diff --git a/src/Makefile b/src/Makefile
index af7d209..5f42aff 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -124,8 +124,6 @@ VIRTUAL_RESOLUTIONS_DIR ?= $(COMMON_UNIX_DIR)/virtual-resolutions
NVIDIA_SETTINGS = $(OUTPUTDIR)/nvidia-settings
-NVIDIA_SETTINGS_PROGRAM_NAME = "nvidia-settings"
-
NVIDIA_SETTINGS_VERSION := $(NVIDIA_VERSION)
GTK2LIB_NAME = libnvidia-gtk2.so
@@ -212,8 +210,6 @@ SRC += $(addprefix $(COMMON_UTILS_DIR)/,$(COMMON_UTILS_SRC))
include $(VIRTUAL_RESOLUTIONS_DIR)/src.mk
SRC += $(addprefix $(VIRTUAL_RESOLUTIONS_DIR)/,$(VIRTUAL_RESOLUTIONS_SRC))
-SRC += $(STAMP_C)
-
OBJS = $(call BUILD_OBJECT_LIST,$(SRC))
XCP_OBJS = $(call BUILD_OBJECT_LIST,$(XCP_SRC))
@@ -312,9 +308,6 @@ endif
$(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
$(foreach src,$(XCP_SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
-# define the rule to generate $(STAMP_C)
-$(eval $(call DEFINE_STAMP_C_RULE, $(OBJS),$(NVIDIA_SETTINGS_PROGRAM_NAME)))
-
# define the rule to build $(XNVCTRL_ARCHIVE)
$(XNVCTRL_ARCHIVE): build-xnvctrl
@@ -322,7 +315,7 @@ build-xnvctrl:
@$(MAKE) -C $(XNVCTRL_DIR) -f $(XNVCTRL_MAKEFILE)
clean clobber:
- rm -rf $(NVIDIA_SETTINGS) *~ $(STAMP_C) \
+ rm -rf $(NVIDIA_SETTINGS) *~ \
$(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d \
$(GTK2LIB) $(GTK3LIB) $(GTK2LIB_DIR) $(GTK3LIB_DIR) \
$(IMAGE_HEADERS)
diff --git a/src/command-line.c b/src/command-line.c
index 21dccaf..8c671a5 100644
--- a/src/command-line.c
+++ b/src/command-line.c
@@ -45,12 +45,10 @@ static void print_help(void);
* print_version() - print version information
*/
-extern const char *pNV_ID;
-
static void print_version(void)
{
nv_msg(NULL, "");
- nv_msg(NULL, "%s", pNV_ID);
+ nv_msg(NULL, NV_ID_STRING);
nv_msg(TAB, "The NVIDIA X Server Settings tool.");
nv_msg(NULL, "");
nv_msg(TAB, "This program is used to configure the "
diff --git a/src/common-utils/common-utils.h b/src/common-utils/common-utils.h
index 6ef1d06..7d51910 100644
--- a/src/common-utils/common-utils.h
+++ b/src/common-utils/common-utils.h
@@ -132,4 +132,6 @@ typedef enum {
NV_OPTIONAL_BOOL_TRUE = TRUE
} NVOptionalBool;
+#define NV_ID_STRING PROGRAM_NAME ": version " NVIDIA_VERSION
+
#endif /* __COMMON_UTILS_H__ */
diff --git a/src/gtk+-2.x/ctkdisplayconfig-utils.c b/src/gtk+-2.x/ctkdisplayconfig-utils.c
index 40c9c7c..9f686b2 100644
--- a/src/gtk+-2.x/ctkdisplayconfig-utils.c
+++ b/src/gtk+-2.x/ctkdisplayconfig-utils.c
@@ -4136,8 +4136,6 @@ nvDisplayPtr layout_get_display(const nvLayoutPtr layout,
* Code adapted from nvidia-xconfig
*/
-extern const char *pNV_ID;
-
static void update_banner(XConfigPtr config)
{
static const char *banner =
@@ -4178,7 +4176,7 @@ static void update_banner(XConfigPtr config)
/* add our prefix lines at the start of the comment */
config->comment = g_strconcat(prefix, banner,
- "# ", pNV_ID, "\n",
+ "# " NV_ID_STRING "\n",
(s ? s : ""),
NULL);
if (s) g_free(s);
diff --git a/src/libXNVCtrl/Makefile b/src/libXNVCtrl/Makefile
index e4357fd..6942c3e 100644
--- a/src/libXNVCtrl/Makefile
+++ b/src/libXNVCtrl/Makefile
@@ -46,7 +46,6 @@ CFLAGS += -I $(OUTPUTDIR)
CFLAGS += -DPROGRAM_NAME=\"$(LIBXNVCTRL_PROGRAM_NAME)\"
SRC += NVCtrl.c
-SRC += $(STAMP_C)
OBJS = $(call BUILD_OBJECT_LIST,$(SRC))
@@ -65,9 +64,6 @@ $(LIBXNVCTRL) : $(OBJS)
# define the rule to build each object file
$(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
-# define the rule to generate $(STAMP_C)
-$(eval $(call DEFINE_STAMP_C_RULE, $(OBJS),$(LIBXNVCTRL_PROGRAM_NAME)))
-
clean:
- rm -rf $(LIBXNVCTRL) *~ $(STAMP_C) \
+ rm -rf $(LIBXNVCTRL) *~ \
$(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d
diff --git a/src/libXNVCtrl/utils.mk b/src/libXNVCtrl/utils.mk
index 66dbb16..8218e0c 100644
--- a/src/libXNVCtrl/utils.mk
+++ b/src/libXNVCtrl/utils.mk
@@ -74,9 +74,7 @@ PRINTF ?= printf
MKDIR ?= mkdir -p
RM ?= rm -f
TOUCH ?= touch
-WHOAMI ?= whoami
HARDLINK ?= ln -f
-HOSTNAME_CMD ?= hostname
DATE ?= date
GZIP_CMD ?= gzip
CHMOD ?= chmod
@@ -214,6 +212,8 @@ ifndef NVIDIA_VERSION
$(error NVIDIA_VERSION undefined)
endif
+CFLAGS += -DNVIDIA_VERSION=\"$(NVIDIA_VERSION)\"
+
##############################################################################
# Several of the functions below take an argument that indicates if
@@ -425,37 +425,6 @@ define DEBUG_INFO_RULES
endef
##############################################################################
-# STAMP_C - this is a source file that is generated during the build
-# to capture information about the build environment for the utility.
-#
-# The DEFINE_STAMP_C_RULE function is used to define the rule for
-# generating STAMP_C. First argument is a list of dependencies for
-# STAMP_C (g_stamp.o is filtered out of the list); second argument is
-# the name of the program being built.
-#
-# The includer of utils.mk should add $(STAMP_C) to its list of source
-# files
-##############################################################################
-
-STAMP_C = $(OUTPUTDIR)/g_stamp.c
-
-define DEFINE_STAMP_C_RULE
-
- $$(STAMP_C): $$(filter-out \
- $$(call BUILD_OBJECT_LIST,$$(STAMP_C)),$(1)) \
- $$(VERSION_MK)
- @ $$(RM) $$@
- @ $$(PRINTF) "%s" "const char NV_ID[] = \"nvidia id: " >> $$@
- @ $$(PRINTF) "%s" "$(2): " >> $$@
- @ $$(PRINTF) "%s" "version $$(NVIDIA_VERSION) " >> $$@
- @ $$(PRINTF) "%s" "($$(shell $$(WHOAMI))" >> $$@
- @ $$(PRINTF) "%s" "@$$(shell $$(HOSTNAME_CMD))) " >> $$@
- @ $$(PRINTF) "%s\n" "$$(shell $(DATE))\";" >> $$@
- @ $$(PRINTF) "%s\n" "const char *pNV_ID = NV_ID + 11;" >> $$@
-
-endef
-
-##############################################################################
# Define rules that can be used for embedding a file into an ELF object that
# contains the raw contents of that file and symbols pointing to the embedded
# data.
diff --git a/utils.mk b/utils.mk
index 66dbb16..8218e0c 100644
--- a/utils.mk
+++ b/utils.mk
@@ -74,9 +74,7 @@ PRINTF ?= printf
MKDIR ?= mkdir -p
RM ?= rm -f
TOUCH ?= touch
-WHOAMI ?= whoami
HARDLINK ?= ln -f
-HOSTNAME_CMD ?= hostname
DATE ?= date
GZIP_CMD ?= gzip
CHMOD ?= chmod
@@ -214,6 +212,8 @@ ifndef NVIDIA_VERSION
$(error NVIDIA_VERSION undefined)
endif
+CFLAGS += -DNVIDIA_VERSION=\"$(NVIDIA_VERSION)\"
+
##############################################################################
# Several of the functions below take an argument that indicates if
@@ -425,37 +425,6 @@ define DEBUG_INFO_RULES
endef
##############################################################################
-# STAMP_C - this is a source file that is generated during the build
-# to capture information about the build environment for the utility.
-#
-# The DEFINE_STAMP_C_RULE function is used to define the rule for
-# generating STAMP_C. First argument is a list of dependencies for
-# STAMP_C (g_stamp.o is filtered out of the list); second argument is
-# the name of the program being built.
-#
-# The includer of utils.mk should add $(STAMP_C) to its list of source
-# files
-##############################################################################
-
-STAMP_C = $(OUTPUTDIR)/g_stamp.c
-
-define DEFINE_STAMP_C_RULE
-
- $$(STAMP_C): $$(filter-out \
- $$(call BUILD_OBJECT_LIST,$$(STAMP_C)),$(1)) \
- $$(VERSION_MK)
- @ $$(RM) $$@
- @ $$(PRINTF) "%s" "const char NV_ID[] = \"nvidia id: " >> $$@
- @ $$(PRINTF) "%s" "$(2): " >> $$@
- @ $$(PRINTF) "%s" "version $$(NVIDIA_VERSION) " >> $$@
- @ $$(PRINTF) "%s" "($$(shell $$(WHOAMI))" >> $$@
- @ $$(PRINTF) "%s" "@$$(shell $$(HOSTNAME_CMD))) " >> $$@
- @ $$(PRINTF) "%s\n" "$$(shell $(DATE))\";" >> $$@
- @ $$(PRINTF) "%s\n" "const char *pNV_ID = NV_ID + 11;" >> $$@
-
-endef
-
-##############################################################################
# Define rules that can be used for embedding a file into an ELF object that
# contains the raw contents of that file and symbols pointing to the embedded
# data.
--
2.11.0
From 9fe17e24fd93676edbc61f059b533d26eac97907 Mon Sep 17 00:00:00 2001
From: Aaron Plattner <aplattner@nvidia.com>
Date: Fri, 23 Mar 2018 17:16:10 -0700
Subject: [PATCH 2/2] nvidia-settings: Remove __DATE__ from the man page
The man page is supposed to have a date in it that describes when it was
updated. It's hard to remember to change it so we have the makefile insert the
build date instead. However, doing that makes it difficult for distributions to
achieve reproducible builds since it changes the resulting package when builds
happen on different days.
The date in this file doesn't really matter, so just hard-code today's date and
remove the code to generate it.
Closes https://github.com/NVIDIA/nvidia-settings/pull/12
---
doc/Makefile | 1 -
doc/nvidia-settings.1.m4 | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/doc/Makefile b/doc/Makefile
index a511322..618f6b8 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -109,7 +109,6 @@ $(MANPAGE_not_gzipped): nvidia-settings.1.m4 $(OPTIONS_1_INC) $(VERSION_MK)
-D__HEADER__=$(AUTO_TEXT) \
-D__BUILD_OS__=$(TARGET_OS) \
-D__VERSION__=$(NVIDIA_VERSION) \
- -D__DATE__="`$(DATE) +%F`" \
-I $(OUTPUTDIR) \
$< > $@
diff --git a/doc/nvidia-settings.1.m4 b/doc/nvidia-settings.1.m4
index 917a48b..b8c35c9 100644
--- a/doc/nvidia-settings.1.m4
+++ b/doc/nvidia-settings.1.m4
@@ -10,7 +10,7 @@ __HEADER__
\\$2 \(la \\$1 \(ra\\$3
..
.if \n[.g] .mso www.tmac
-.TH nvidia\-settings 1 "__DATE__" "nvidia\-settings __VERSION__"
+.TH nvidia\-settings 1 "2018-03-20" "nvidia\-settings __VERSION__"
.SH NAME
nvidia\-settings \- configure the NVIDIA graphics driver
.SH SYNOPSIS
--
2.11.0
......@@ -14,7 +14,7 @@ Bug-Debian: https://bugs.debian.org/666909
XCONFIG_PARSER_DIR ?= XF86Config-parser
COMMON_UTILS_DIR ?= common-utils
COMMON_UNIX_DIR ?= common-unix
@@ -286,9 +289,9 @@ NVIDIA_SETTINGS_install: $(NVIDIA_SETTIN
@@ -282,9 +285,9 @@ NVIDIA_SETTINGS_install: $(NVIDIA_SETTIN
$(INSTALL) $(INSTALL_BIN_ARGS) $< $(BINDIR)/$(notdir $<)
$(eval $(call DEBUG_INFO_RULES, $(NVIDIA_SETTINGS)))
......@@ -26,7 +26,7 @@ Bug-Debian: https://bugs.debian.org/666909
$(eval $(call DEBUG_INFO_RULES, $(GTK2LIB)))
$(GTK2LIB).unstripped: $(GTK2_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK)
@@ -296,7 +299,7 @@ $(GTK2LIB).unstripped: $(GTK2_OBJS) $(XC
@@ -292,7 +295,7 @@ $(GTK2LIB).unstripped: $(GTK2_OBJS) $(XC
-o $@ \
-Wl,-soname -Wl,$(GTK2LIB_SONAME) \
$(GTK2_OBJS) $(IMAGE_OBJS) $(XCP_OBJS) \
......@@ -35,7 +35,7 @@ Bug-Debian: https://bugs.debian.org/666909
ifdef BUILD_GTK3LIB
$(eval $(call DEBUG_INFO_RULES, $(GTK3LIB)))
@@ -305,7 +308,7 @@ $(GTK3LIB).unstripped: $(GTK3_OBJS) $(XC
@@ -301,7 +304,7 @@ $(GTK3LIB).unstripped: $(GTK3_OBJS) $(XC
-o $@ \
-Wl,-soname -Wl,$(GTK3LIB_SONAME) \
$(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) \
......@@ -44,8 +44,8 @@ Bug-Debian: https://bugs.debian.org/666909
endif
# define the rule to build each object file
@@ -316,7 +319,7 @@ $(foreach src,$(XCP_SRC),$(eval $(call D
$(eval $(call DEFINE_STAMP_C_RULE, $(OBJS),$(NVIDIA_SETTINGS_PROGRAM_NAME)))
@@ -309,7 +312,7 @@ $(foreach src,$(SRC),$(eval $(call DEFIN
$(foreach src,$(XCP_SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
# define the rule to build $(XNVCTRL_ARCHIVE)
-$(XNVCTRL_ARCHIVE): build-xnvctrl
......@@ -55,7 +55,7 @@ Bug-Debian: https://bugs.debian.org/666909
@$(MAKE) -C $(XNVCTRL_DIR) -f $(XNVCTRL_MAKEFILE)
--- a/src/libXNVCtrl/Makefile
+++ b/src/libXNVCtrl/Makefile
@@ -58,10 +58,17 @@ OBJS = $(call BUILD_OBJECT_LIST,$(SRC))
@@ -57,13 +57,21 @@ OBJS = $(call BUILD_OBJECT_LIST,$(SRC))
.PHONY: clean
all: $(LIBXNVCTRL)
......@@ -73,8 +73,7 @@ Bug-Debian: https://bugs.debian.org/666909
# define the rule to build each object file
$(foreach src,$(SRC),$(eval $(call DEFINE_OBJECT_RULE,TARGET,$(src))))
@@ -71,3 +78,4 @@ $(eval $(call DEFINE_STAMP_C_RULE, $(OBJ
clean:
rm -rf $(LIBXNVCTRL) *~ $(STAMP_C) \
rm -rf $(LIBXNVCTRL) *~ \
$(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d
+ rm -f libXNVCtrl.so libXNVCtrl.so.*
Author: luca.boccassi@gmail.com
Description: Reproducible builds: use SOURCE_DATE_EPOCH for STAMP_C
Forwarded: https://github.com/NVIDIA/nvidia-settings/pull/12
If SOURCE_DATE_EPOCH is available use it instead of the current date
in order to allow for reproducible builds.
The fallback is date for backward compatibility.
Snippet adapted from:
https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Makefile
--- a/src/libXNVCtrl/utils.mk
+++ b/src/libXNVCtrl/utils.mk
@@ -432,6 +432,12 @@ endef
STAMP_C = $(OUTPUTDIR)/g_stamp.c
+ifdef SOURCE_DATE_EPOCH
+ BUILD_DATE ?= $(shell $(DATE) -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || $(DATE) -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || $(DATE) -u)
+else
+ BUILD_DATE ?= $(shell $(DATE))
+endif
+
define DEFINE_STAMP_C_RULE
$$(STAMP_C): $$(filter-out \
@@ -443,7 +449,7 @@ define DEFINE_STAMP_C_RULE
@ $$(PRINTF) "%s" "version $$(NVIDIA_VERSION) " >> $$@
@ $$(PRINTF) "%s" "($$(shell $$(WHOAMI))" >> $$@
@ $$(PRINTF) "%s" "@$$(shell $$(HOSTNAME_CMD))) " >> $$@
- @ $$(PRINTF) "%s\n" "$$(shell $(DATE))\";" >> $$@
+ @ $$(PRINTF) "%s\n" "$$(BUILD_DATE)\";" >> $$@
@ $$(PRINTF) "%s\n" "const char *pNV_ID = NV_ID + 11;" >> $$@
endef
--- a/utils.mk
+++ b/utils.mk
@@ -435,6 +435,12 @@ endef
STAMP_C = $(OUTPUTDIR)/g_stamp.c
+ifdef SOURCE_DATE_EPOCH
+ BUILD_DATE ?= $(shell $(DATE) -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || $(DATE) -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || $(DATE) -u)
+else
+ BUILD_DATE ?= $(shell $(DATE))
+endif
+
define DEFINE_STAMP_C_RULE
$$(STAMP_C): $$(filter-out \
@@ -446,7 +452,7 @@ define DEFINE_STAMP_C_RULE
@ $$(PRINTF) "%s" "version $$(NVIDIA_VERSION) " >> $$@
@ $$(PRINTF) "%s" "($$(shell $$(WHOAMI))" >> $$@
@ $$(PRINTF) "%s" "@$$(shell $$(HOSTNAME_CMD))) " >> $$@
- @ $$(PRINTF) "%s\n" "$$(shell $(DATE))\";" >> $$@
+ @ $$(PRINTF) "%s\n" "$$(BUILD_DATE)\";" >> $$@
@ $$(PRINTF) "%s\n" "const char *pNV_ID = NV_ID + 11;" >> $$@
endef
Author: luca.boccassi@gmail.com
Description: Reproducible builds: use SOURCE_DATE_EPOCH for manpage
Forwarded: https://github.com/NVIDIA/nvidia-settings/pull/12
If SOURCE_DATE_EPOCH is available use it instead of the current date
in order to allow for reproducible builds.
The fallback is date +%F for backward compatibility.
Snippet adapted from:
https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Makefile
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -104,12 +104,19 @@ $(GEN_MANPAGE_OPTS): $(GEN_MANPAGE_OPTS_
$(OPTIONS_1_INC): $(GEN_MANPAGE_OPTS)
@$< > $@
+DATE_FMT = %F
+ifdef SOURCE_DATE_EPOCH
+ BUILD_DATE ?= $(shell $(DATE) -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || $$(DATE) -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || $(DATE) -u "+$(DATE_FMT)")
+else
+ BUILD_DATE ?= $(shell $(DATE) "+$(DATE_FMT)")
+endif
+
$(MANPAGE_not_gzipped): nvidia-settings.1.m4 $(OPTIONS_1_INC) $(VERSION_MK)
$(call quiet_cmd,M4) \
-D__HEADER__=$(AUTO_TEXT) \
-D__BUILD_OS__=$(TARGET_OS) \
-D__VERSION__=$(NVIDIA_VERSION) \
- -D__DATE__="`$(DATE) +%F`" \
+ -D__DATE__="$(BUILD_DATE)" \
-I $(OUTPUTDIR) \
$< > $@
Author: luca.boccassi@gmail.com
Description: Reproducible builds: use dummy hostname/user for STAMP_C
Forwarded: https://github.com/NVIDIA/nvidia-settings/pull/12
Use dummy values instead of the real hostname and user when
generating STAMP_C if SOURCE_DATE_EPOCH is available, which is a good
enough indicator that the user/packager wants to achieve reproducible
builds.
Fall back to WHOAMI and HOSTNAME_CMD otherwise for backward
compatibility.
--- a/src/libXNVCtrl/utils.mk
+++ b/src/libXNVCtrl/utils.mk
@@ -434,8 +434,12 @@ STAMP_C = $(OUTPUTDIR)/g_stamp.c
ifdef SOURCE_DATE_EPOCH
BUILD_DATE ?= $(shell $(DATE) -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || $(DATE) -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || $(DATE) -u)
+ BUILD_USER ?= build-user
+ BUILD_HOST ?= build-machine
else
BUILD_DATE ?= $(shell $(DATE))
+ BUILD_USER ?= $(shell $(WHOAMI))
+ BUILD_HOST ?= $(shell $(HOSTNAME_CMD))
endif
define DEFINE_STAMP_C_RULE
@@ -447,8 +451,8 @@ define DEFINE_STAMP_C_RULE
@ $$(PRINTF) "%s" "const char NV_ID[] = \"nvidia id: " >> $$@
@ $$(PRINTF) "%s" "$(2): " >> $$@
@ $$(PRINTF) "%s" "version $$(NVIDIA_VERSION) " >> $$@
- @ $$(PRINTF) "%s" "($$(shell $$(WHOAMI))" >> $$@
- @ $$(PRINTF) "%s" "@$$(shell $$(HOSTNAME_CMD))) " >> $$@
+ @ $$(PRINTF) "%s" "($$(BUILD_USER)" >> $$@
+ @ $$(PRINTF) "%s" "@$$(BUILD_HOST)) " >> $$@
@ $$(PRINTF) "%s\n" "$$(BUILD_DATE)\";" >> $$@
@ $$(PRINTF) "%s\n" "const char *pNV_ID = NV_ID + 11;" >> $$@
--- a/utils.mk
+++ b/utils.mk
@@ -437,8 +437,12 @@ STAMP_C = $(OUTPUTDIR)/g_stamp.c
ifdef SOURCE_DATE_EPOCH
BUILD_DATE ?= $(shell $(DATE) -u -d "@$(SOURCE_DATE_EPOCH)" 2>/dev/null || $(DATE) -u -r "$(SOURCE_DATE_EPOCH)" 2>/dev/null || $(DATE) -u)
+ BUILD_USER ?= build-user
+ BUILD_HOST ?= build-machine
else
BUILD_DATE ?= $(shell $(DATE))
+ BUILD_USER ?= $(shell $(WHOAMI))
+ BUILD_HOST ?= $(shell $(HOSTNAME_CMD))
endif
define DEFINE_STAMP_C_RULE
@@ -450,8 +454,8 @@ define DEFINE_STAMP_C_RULE
@ $$(PRINTF) "%s" "const char NV_ID[] = \"nvidia id: " >> $$@
@ $$(PRINTF) "%s" "$(2): " >> $$@
@ $$(PRINTF) "%s" "version $$(NVIDIA_VERSION) " >> $$@
- @ $$(PRINTF) "%s" "($$(shell $$(WHOAMI))" >> $$@
- @ $$(PRINTF) "%s" "@$$(shell $$(HOSTNAME_CMD))) " >> $$@
+ @ $$(PRINTF) "%s" "($$(BUILD_USER)" >> $$@
+ @ $$(PRINTF) "%s" "@$$(BUILD_HOST)) " >> $$@
@ $$(PRINTF) "%s\n" "$$(BUILD_DATE)\";" >> $$@
@ $$(PRINTF) "%s\n" "const char *pNV_ID = NV_ID + 11;" >> $$@
0001-nvidia-settings-Remove-STAMP_C.patch
0002-nvidia-settings-Remove-__DATE__-from-the-man-page.patch
link-order.diff
04_link_as-needed.diff
10_libxnvctrl_so_0.diff
......@@ -6,6 +8,3 @@ link-order.diff
typos.diff
kfreebsd-hurd.diff
xorg.patch
SOURCE_DATE_EPOCH-for-manpage.patch
SOURCE_DATE_EPOCH-for-STAMP_C.patch
dummy-hostname-user-for-STAMP_C.patch
NVIDIA_VERSION = 390.48
NVIDIA_VERSION = 390.67
NVIDIA_VERSION = 390.48
NVIDIA_VERSION = 390.67
NVIDIA_VERSION = 390.48
NVIDIA_VERSION = 390.67
#define NVIDIA_VERSION "390.48"
#define NVIDIA_VERSION "390.67"
NVIDIA_VERSION = 390.48
NVIDIA_VERSION = 390.67
NVIDIA_VERSION = 390.48
NVIDIA_VERSION = 390.67