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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Fri, 1 Dec 2023 14:17:20 -0800
X-Dgit-Generated: 1.23.0-2.1 8d72c3fd82d3eb08e28adc552aaeb93df83f9d3a
Subject: tools: Remove references to LIBINPUT_QUIRKS_SRCDIR. (Closes: #995809)
This embeds the build path which is not generally available at runtime and
makes it more difficult to reproduce the build.
https://reproducible-builds.org/docs/build-path/
---
diff --git a/tools/libinput-quirks.c b/tools/libinput-quirks.c
index e97eff6..7f3e26f 100644
--- a/tools/libinput-quirks.c
+++ b/tools/libinput-quirks.c
@@ -166,14 +166,8 @@ main(int argc, char **argv)
/* Overriding the data dir means no custom override file */
if (!data_path) {
- char *builddir = builddir_lookup();
- if (builddir) {
- data_path = LIBINPUT_QUIRKS_SRCDIR;
- free(builddir);
- } else {
- data_path = LIBINPUT_QUIRKS_DIR;
- override_file = LIBINPUT_QUIRKS_OVERRIDE_FILE;
- }
+ data_path = LIBINPUT_QUIRKS_DIR;
+ override_file = LIBINPUT_QUIRKS_OVERRIDE_FILE;
}
quirks = quirks_init_subsystem(data_path,
diff --git a/tools/libinput-record.c b/tools/libinput-record.c
index 30b2900..1de63bc 100644
--- a/tools/libinput-record.c
+++ b/tools/libinput-record.c
@@ -1762,19 +1762,10 @@ print_device_quirks(struct record_device *dev)
struct quirks_context *quirks;
const char *data_path = LIBINPUT_QUIRKS_DIR;
const char *override_file = LIBINPUT_QUIRKS_OVERRIDE_FILE;
- char *builddir = NULL;
if (stat(dev->devnode, &st) < 0)
return;
- if ((builddir = builddir_lookup())) {
- setenv("LIBINPUT_QUIRKS_DIR", LIBINPUT_QUIRKS_SRCDIR, 0);
- data_path = LIBINPUT_QUIRKS_SRCDIR;
- override_file = NULL;
- }
-
- free(builddir);
-
quirks = quirks_init_subsystem(data_path,
override_file,
quirks_log_handler,
diff --git a/tools/shared.c b/tools/shared.c
index 7a73027..fcacb03 100644
--- a/tools/shared.c
+++ b/tools/shared.c
@@ -411,16 +411,6 @@ tools_open_device(const char **paths, bool verbose, bool *grab)
return li;
}
-static void
-tools_setenv_quirks_dir(void)
-{
- char *builddir = builddir_lookup();
- if (builddir) {
- setenv("LIBINPUT_QUIRKS_DIR", LIBINPUT_QUIRKS_SRCDIR, 0);
- free(builddir);
- }
-}
-
struct libinput *
tools_open_backend(enum tools_backend which,
const char **seat_or_device,
@@ -429,8 +419,6 @@ tools_open_backend(enum tools_backend which,
{
struct libinput *li;
- tools_setenv_quirks_dir();
-
switch (which) {
case BACKEND_UDEV:
li = tools_open_udev(seat_or_device[0], verbose, grab);
|