gnu: ruby: Update to 2.3.1.
[jackhill/guix/guix.git] / gnu / packages / patches / eudev-rules-directory.patch
1 Add $EUDEV_RULES_DIRECTORY to the list of rules directories.
2
3 The old udev 182 supported $UDEV_CONFIG_FILE, which in turn allowed
4 the search path to be customized, but eudev no longer has this, hence
5 this hack.
6
7 --- eudev-3.1.5/src/udev/udev-rules.c 2015-10-13 06:22:14.000000000 +0800
8 +++ eudev-3.1.5/src/udev/udev-rules.c 2015-10-16 20:45:38.491934336 +0800
9 @@ -47,15 +47,11 @@
10 };
11 };
12
13 -static const char* const rules_dirs[] = {
14 +static const char* rules_dirs[] = {
15 UDEV_CONF_DIR "/rules.d",
16 UDEV_RULES_DIR,
17 - UDEV_ROOT_RUN "/udev/rules.d",
18 UDEV_LIBEXEC_DIR "/rules.d",
19 -#ifdef HAVE_SPLIT_USR
20 - "/lib/udev/rules.d",
21 - "/usr/lib/udev/rules.d",
22 -#endif
23 + NULL, /* placeholder for $EUDEV_RULES_DIRECTORY */
24 NULL};
25
26 struct udev_rules {
27 @@ -1704,6 +1700,9 @@
28
29 udev_rules_check_timestamp(rules);
30
31 + /* Allow the user to specify an additional rules directory. */
32 + rules_dirs[3] = getenv("EUDEV_RULES_DIRECTORY");
33 +
34 r = conf_files_list_strv(&files, ".rules", NULL, rules_dirs);
35 if (r < 0) {
36 log_error_errno(r, "failed to enumerate rules files: %m");