...
 
Commits (10)
nvidia-settings-legacy-340xx (340.107-1) unstable; urgency=medium
* New upstream release 340.107.
* Use reproducibility patches from upstream.
* Bump Standards-Version to 4.1.5. No changes needed.
* Switch to debhelper compat level 11.
-- Andreas Beckmann <anbe@debian.org> Mon, 16 Jul 2018 18:37:26 +0200
nvidia-settings-legacy-340xx (340.106-1) unstable; urgency=medium
* New upstream release 340.106.
......@@ -1008,4 +1017,3 @@ nvidia-settings (1.0-1) unstable; urgency=low
* Initial Release.
-- Randall Donald <rdonald@debian.org> Wed, 30 Jun 2004 16:45:52 -0700
......@@ -7,7 +7,7 @@ Uploaders:
Vincent Cheng <vcheng@debian.org>,
Luca Boccassi <bluca@debian.org>,
Build-Depends:
debhelper (>= 10),
debhelper (>= 11),
dh-exec (>= 0.3),
m4,
libgl1-mesa-dev | libgl-dev,
......@@ -22,7 +22,7 @@ Build-Depends:
Build-Conflicts:
libxnvctrl-dev,
Rules-Requires-Root: no
Standards-Version: 4.1.3
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 -b 340xx/master
......
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(-)
--- a/src/Makefile
+++ b/src/Makefile
@@ -95,8 +95,6 @@ VIRTUAL_RESOLUTIONS_DIR ?= $(COMMON_UNIX
NVIDIA_SETTINGS = $(OUTPUTDIR)/nvidia-settings
-NVIDIA_SETTINGS_PROGRAM_NAME = "nvidia-settings"
-
NVIDIA_SETTINGS_VERSION := $(NVIDIA_VERSION)
CFLAGS += $(X_CFLAGS)
@@ -160,8 +158,6 @@ SRC += $(addprefix $(COMMON_UTILS
include $(VIRTUAL_RESOLUTIONS_DIR)/src.mk
SRC += $(addprefix $(VIRTUAL_RESOLUTIONS_DIR)/,$(VIRTUAL_RESOLUTIONS_SRC))
-SRC += $(STAMP_C)
-
OBJS = $(call BUILD_OBJECT_LIST,$(SRC))
CFLAGS += -I .
@@ -211,9 +207,6 @@ $(NVIDIA_SETTINGS): $(OBJS) $(XNVCTRL_AR
# 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),$(NVIDIA_SETTINGS_PROGRAM_NAME)))
-
# define the rule to build $(XNVCTRL_ARCHIVE)
$(XNVCTRL_ARCHIVE): build-xnvctrl
@@ -221,7 +214,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
@$(MAKE) -C $(XNVCTRL_DIR) -f $(XNVCTRL_MAKEFILE) clean
--- 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 "
--- a/src/common-utils/common-utils.h
+++ b/src/common-utils/common-utils.h
@@ -117,4 +117,6 @@ typedef enum {
NV_OPTIONAL_BOOL_TRUE = TRUE
} NVOptionalBool;
+#define NV_ID_STRING PROGRAM_NAME ": version " NVIDIA_VERSION
+
#endif /* __COMMON_UTILS_H__ */
--- a/src/gtk+-2.x/ctkdisplayconfig-utils.c
+++ b/src/gtk+-2.x/ctkdisplayconfig-utils.c
@@ -3895,8 +3895,6 @@ nvDisplayPtr layout_get_display(const nv
* Code adapted from nvidia-xconfig
*/
-extern const char *pNV_ID;
-
static void update_banner(XConfigPtr config)
{
static const char *banner =
@@ -3937,7 +3935,7 @@ static void update_banner(XConfigPtr con
/* 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);
--- a/src/libXNVCtrl/Makefile
+++ b/src/libXNVCtrl/Makefile
@@ -43,7 +43,6 @@ CFLAGS += -I $(OUTPUTDIR)
CFLAGS += -DPROGRAM_NAME=\"$(LIBXNVCTRL_PROGRAM_NAME)\"
SRC += NVCtrl.c
-SRC += $(STAMP_C)
OBJS = $(call BUILD_OBJECT_LIST,$(SRC))
@@ -62,9 +61,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
--- a/src/libXNVCtrl/utils.mk
+++ b/src/libXNVCtrl/utils.mk
@@ -65,8 +65,6 @@ PRINTF ?= printf
MKDIR ?= mkdir -p
RM ?= rm -f
TOUCH ?= touch
-WHOAMI ?= whoami
-HOSTNAME_CMD ?= hostname
DATE ?= date
GZIP_CMD ?= gzip
CHMOD ?= chmod
@@ -171,6 +169,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
@@ -320,35 +320,3 @@ define DEFINE_OBJECT_RULE
$$(eval $$(call DEFINE_OBJECT_RULE_WITH_OBJECT_NAME,$(1),$(2),\
$$(call BUILD_OBJECT_LIST,$(2))))
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
--- a/utils.mk
+++ b/utils.mk
@@ -65,8 +65,6 @@ PRINTF ?= printf
MKDIR ?= mkdir -p
RM ?= rm -f
TOUCH ?= touch
-WHOAMI ?= whoami
-HOSTNAME_CMD ?= hostname
DATE ?= date
GZIP_CMD ?= gzip
CHMOD ?= chmod
@@ -171,6 +169,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
@@ -320,35 +320,3 @@ define DEFINE_OBJECT_RULE
$$(eval $$(call DEFINE_OBJECT_RULE_WITH_OBJECT_NAME,$(1),$(2),\
$$(call BUILD_OBJECT_LIST,$(2))))
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
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
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
04_link_as-needed.diff
12_nvidia-settings.desktop.diff
16_gzip-n.diff
typos.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 = 340.106
NVIDIA_VERSION = 340.107
NVIDIA_VERSION = 340.106
NVIDIA_VERSION = 340.107
NVIDIA_VERSION = 340.106
NVIDIA_VERSION = 340.107
NVIDIA_VERSION = 340.106
NVIDIA_VERSION = 340.107
NVIDIA_VERSION = 340.106
NVIDIA_VERSION = 340.107