aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-29 14:11:35 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-29 14:11:35 +0100
commitc324ad52b6066b4626312a4120b645c43989dd0a (patch)
tree96b98b6d0a3ac9a9fb984b3190517c93e1d2091b /gnu/packages
parentf2c99fe52b73bfe81acad825214de952234f82bc (diff)
downloadguix-c324ad52b6066b4626312a4120b645c43989dd0a.tar.gz
guix-c324ad52b6066b4626312a4120b645c43989dd0a.zip
gnu: lirc: Build reproducibly.
* gnu/packages/patches/lirc-reproducible-build.patch: New file. * gnu/packages/lirc.scm (lirc)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/lirc.scm3
-rw-r--r--gnu/packages/patches/lirc-reproducible-build.patch72
2 files changed, 74 insertions, 1 deletions
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
", "description: two spaces after end of sentence", "description: end-of-sentence detection with abbreviations", "description: may not contain trademark signs: ™", "description: may not contain trademark signs: ®", "description: suggest ornament instead of quotes", "synopsis: not a string", "synopsis: not empty", "synopsis: valid Texinfo markup", "synopsis: does not start with an upper-case letter", "synopsis: may start with a digit", "synopsis: ends with a period", "synopsis: ends with 'etc.'", "synopsis: starts with 'A'", "synopsis: starts with 'a'", "synopsis: starts with 'an'", "synopsis: too long", "synopsis: start with package name", "synopsis: start with package name prefix", "synopsis: start with abbreviation", "inputs: pkg-config is probably a native input", "inputs: glib:bin is probably a native input", "inputs: python-setuptools should not be an input at all (input)", "inputs: python-setuptools should not be an input at all (native-input)", "inputs: python-setuptools should not be an input at all (propagated-input)", "patches: file names", "patches: file name too long", "patches: not found", "derivation: invalid arguments", "license: invalid license", "home-page: wrong home-page", "home-page: invalid URI", "home-page: host not found", "home-page: Connection refused", "home-page: 200", "home-page: 200 but short length", "home-page: 404", "home-page: 301, invalid", "home-page: 301 -> 200", "home-page: 301 -> 404", "source-file-name", "source-file-name: v prefix", "source-file-name: bad checkout", "source-file-name: good checkout", "source-file-name: valid", "source-unstable-tarball", "source-unstable-tarball: source #f", "source-unstable-tarball: valid", "source-unstable-tarball: package named archive", "source-unstable-tarball: not-github", "source-unstable-tarball: git-fetch", "source: 200", "source: 200 but short length", "source: 404", "source: 301 -> 200", "source: 301 -> 404", "mirror-url", "mirror-url: one suggestion", "github-url", "github-url: one suggestion", "github-url: already the correct github url", "cve", "cve: one vulnerability", "cve: one patched vulnerability", "cve: known safe from vulnerability", "cve: vulnerability fixed in replacement version", "cve: patched vulnerability in replacement", "formatting: lonely parentheses", "formatting: alright"): Change test-assert to test-equal, and adjust to work with the changes above. ("formatting: tabulation", "formatting: trailing white space", "formatting: long line"): Use string-match-or-error rather than string-contains. Christopher Baines 2019-01-20tests: More adjustments to python.scm split....This is a followup to 44d10b1f722856ab8e9b942804aa7ef33e2ef739. * tests/lint.scm: Update imports. Efraim Flashner 2019-01-10guix: lint: Warn only if GitHub URI is not same as the package URI....* guix/scripts/lint.scm (check-github-url): Warn only if the GitHub URI obtained after following redirects is not same as the original URI. * tests/lint.scm ("github-url: already the correct github url"): New test. Arun Isaac 2018-12-27lint: Check for unstable tarballs....* guix/scripts/lint.scm (check-source-unstable-tarball): New procedure. (%checkers): Add it. * tests/lint.scm ("source-unstable-tarball", "source-unstable-tarball: source #f", "source-unstable-tarball: valid", "source-unstable-tarball: package named archive", "source-unstable-tarball: not-github", "source-unstable-tarball: git-fetch"): New tests. * doc/guix.texi (Invoking guix lint): Document it. Efraim Flashner 2018-12-24guix: lint: Check for source URIs redirecting to GitHub....* guix/scripts/lint.scm (check-github-uri): New procedure. (%checkers): Add it. * doc/guix.texi (Invoking guix lint): Document it. * tests/lint.scm ("github-url", "github-url: one suggestion"): New tests. Arun Isaac 2018-11-20lint: 'check-derivation' tries all the package's supported systems....This allows us to catch architecture-specific evaluation failures. * guix/scripts/lint.scm (check-derivation): Move body into... [try]: ... this. New procedure. Call 'try' for each supported system of PACKAGE. Ludovic Courtès