aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/lirc.scm3
-rw-r--r--gnu/packages/patches/lirc-reproducible-build.patch72
3 files changed, 75 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 32b561472e..6de6306ec5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -935,6 +935,7 @@ dist_patch_DATA = \
%D%/packages/patches/lierolibre-try-building-other-arch.patch \
%D%/packages/patches/linux-pam-no-setfsuid.patch \
%D%/packages/patches/lirc-localstatedir.patch \
+ %D%/packages/patches/lirc-reproducible-build.patch \
%D%/packages/patches/llvm-3.5-fix-clang-build-with-gcc5.patch \
%D%/packages/patches/llvm-for-extempore.patch \
%D%/packages/patches/lm-sensors-hwmon-attrs.patch \
diff --git a/gnu/packages/lirc.scm b/gnu/packages/lirc.scm
index 860822ce49..7ba2d44532 100644
--- a/gnu/packages/lirc.scm
+++ b/gnu/packages/lirc.scm
@@ -43,7 +43,8 @@
(sha256
(base32
"1whlyifvvc7w04ahq07nnk1h18wc8j7c6wnvlb6mszravxh3qxcb"))
- (patches (search-patches "lirc-localstatedir.patch"))))
+ (patches (search-patches "lirc-localstatedir.patch"
+ "lirc-reproducible-build.patch"))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags
diff --git a/gnu/packages/patches/lirc-reproducible-build.patch b/gnu/packages/patches/lirc-reproducible-build.patch
new file mode 100644
index 0000000000..20f9344715
--- /dev/null
+++ b/gnu/packages/patches/lirc-reproducible-build.patch
@@ -0,0 +1,72 @@
+Build Lirc reproducibly.
+
+https://sourceforge.net/p/lirc/tickets/301/
+https://sourceforge.net/p/lirc/git/merge-requests/33/
+https://sourceforge.net/p/lirc/git/merge-requests/34/
+https://sourceforge.net/p/lirc/git/merge-requests/36/
+
+Index: lirc-0.10.1/tools/lirc-lsplugins.cpp
+===================================================================
+--- lirc-0.10.1.orig/tools/lirc-lsplugins.cpp
++++ lirc-0.10.1/tools/lirc-lsplugins.cpp
+@@ -415,10 +415,9 @@ static void print_header(void)
+ static void print_yaml_header(void)
+ {
+ static const char* const YAML_HEADER =
+- "#\n# Generated by lirc-lsplugins --yaml (%s) at %s#\n ";
+- const time_t now = time(NULL);
++ "#\n# Generated by lirc-lsplugins --yaml (%s)#\n ";
+
+- printf(YAML_HEADER, VERSION, ctime(&now));
++ printf(YAML_HEADER, VERSION);
+ printf("\ndrivers:\n");
+ }
+
+Index: lirc-0.10.1/python-pkg/lirc/database.py
+===================================================================
+--- lirc-0.10.1.orig/python-pkg/lirc/database.py
++++ lirc-0.10.1/python-pkg/lirc/database.py
+@@ -156,7 +156,7 @@ class Database(object):
+ d['device_hint'] = hint
+
+ configs = {}
+- for path in glob.glob(configdir + '/*.conf'):
++ for path in sorted(glob.glob(configdir + '/*.conf')):
+ with open(path) as f:
+ cf = yaml.load(f.read())
+ configs[cf['config']['id']] = cf['config']
+Index: lirc-0.10.1/tools/irdb-get
+===================================================================
+--- lirc-0.10.1.orig/tools/irdb-get
++++ lirc-0.10.1/tools/irdb-get
+@@ -9,7 +9,6 @@ import fnmatch
+ import os
+ import os.path
+ import sys
+-import time
+ import urllib.error # pylint: disable=no-name-in-module,F0401,E0611
+ import urllib.request # pylint: disable=no-name-in-module,F0401,E0611
+
+@@ -193,7 +192,7 @@ def do_yaml_config():
+ lircmd_by_driver[driver].append("%s/%s" % (tokens[0], tokens[2]))
+
+ print("#")
+- print("# Created by 'irdb-get yaml-config' at " + time.ctime())
++ print("# Created by 'irdb-get yaml-config'")
+ print("#")
+ print("\nlircd_by_driver:")
+ print_yaml_dict(lircd_by_driver)
+Index: lirc-0.10.1/tools/lirc-make-devinput
+===================================================================
+--- lirc-0.10.1.orig/tools/lirc-make-devinput
++++ lirc-0.10.1/tools/lirc-make-devinput
+@@ -61,8 +61,7 @@ if test -n "$lirc_map"; then
+ fi
+
+
+-echo "# Generated by $(basename $0) on $(uname -r)"
+-echo "# Date: $(date)"
++echo "# Generated by $(basename $0)"
+ cat <<EOF
+
+ begin remote