Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: patches/eudev/3.2.10/, patches/eudev/3.2.9/
Date: Wed, 10 Feb 2021 00:27:34
Message-Id: 1612916692.0cf43879c9b01d6c6b09275499db5ebd0166806b.whissi@gentoo
1 commit: 0cf43879c9b01d6c6b09275499db5ebd0166806b
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 10 00:24:52 2021 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 10 00:24:52 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=0cf43879
7
8 Bump eudev to v3.2.10
9
10 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
11
12 .../eudev-3.2.10-static.patch} | 0
13 .../3.2.9/eudev-3.2.9-allow-empty-properties.patch | 130 ---------------------
14 2 files changed, 130 deletions(-)
15
16 diff --git a/patches/eudev/3.2.9/eudev-3.2.9-static.patch b/patches/eudev/3.2.10/eudev-3.2.10-static.patch
17 similarity index 100%
18 rename from patches/eudev/3.2.9/eudev-3.2.9-static.patch
19 rename to patches/eudev/3.2.10/eudev-3.2.10-static.patch
20
21 diff --git a/patches/eudev/3.2.9/eudev-3.2.9-allow-empty-properties.patch b/patches/eudev/3.2.9/eudev-3.2.9-allow-empty-properties.patch
22 deleted file mode 100644
23 index 2eb7565..0000000
24 --- a/patches/eudev/3.2.9/eudev-3.2.9-allow-empty-properties.patch
25 +++ /dev/null
26 @@ -1,130 +0,0 @@
27 -https://github.com/gentoo/eudev/pull/192
28 -
29 ---- a/src/udev/udevadm-hwdb.c
30 -+++ b/src/udev/udevadm-hwdb.c
31 -@@ -426,21 +426,24 @@ static int insert_data(struct trie *trie, struct udev_list *match_list,
32 - char *value;
33 - struct udev_list_entry *entry;
34 -
35 -+ assert(line[0] == ' ');
36 -+
37 - value = strchr(line, '=');
38 - if (!value) {
39 -- log_error("Error, key/value pair expected but got '%s' in '%s':", line, filename);
40 -+ log_error("Warning, key-value pair expected but got \"%s\", ignoring", line);
41 - return -EINVAL;
42 - }
43 -
44 - value[0] = '\0';
45 - value++;
46 -
47 -- /* libudev requires properties to start with a space */
48 -+ /* Replace multiple leading spaces by a single space */
49 - while (isblank(line[0]) && isblank(line[1]))
50 - line++;
51 -
52 -- if (line[0] == '\0' || value[0] == '\0') {
53 -- log_error("Error, empty key or value '%s' in '%s':", line, filename);
54 -+ if (isempty(line + 1)) {
55 -+ log_error("Warning, empty key in \"%s=%s\", ignoring",
56 -+ line, value);
57 - return -EINVAL;
58 - }
59 -
60 -@@ -459,17 +462,21 @@ static int import_file(struct udev *udev, struct trie *trie, const char *filenam
61 - FILE *f;
62 - char line[LINE_MAX];
63 - struct udev_list match_list;
64 -+ uint32_t line_number = 0;
65 -+ int r = 0, err;
66 -
67 - udev_list_init(udev, &match_list, false);
68 -
69 - f = fopen(filename, "re");
70 -- if (f == NULL)
71 -+ if (!f)
72 - return -errno;
73 -
74 - while (fgets(line, sizeof(line), f)) {
75 - size_t len;
76 - char *pos;
77 -
78 -+ ++line_number;
79 -+
80 - /* comment line */
81 - if (line[0] == '#')
82 - continue;
83 -@@ -491,7 +498,8 @@ static int import_file(struct udev *udev, struct trie *trie, const char *filenam
84 - break;
85 -
86 - if (line[0] == ' ') {
87 -- log_error("Error, MATCH expected but got '%s' in '%s':", line, filename);
88 -+ log_error("Warning, match expected but got indented property \"%s\", ignoring line", line);
89 -+ r = -EINVAL;
90 - break;
91 - }
92 -
93 -@@ -502,46 +510,55 @@ static int import_file(struct udev *udev, struct trie *trie, const char *filenam
94 -
95 - case HW_MATCH:
96 - if (len == 0) {
97 -- log_error("Error, DATA expected but got empty line in '%s':", filename);
98 -+ log_error("Warning, property expected, ignoring record with no properties");
99 -+ r = -EINVAL;
100 - state = HW_NONE;
101 - udev_list_cleanup(&match_list);
102 - break;
103 - }
104 -
105 -- /* another match */
106 - if (line[0] != ' ') {
107 -+ /* another match */
108 - udev_list_entry_add(&match_list, line, NULL);
109 - break;
110 - }
111 -
112 - /* first data */
113 - state = HW_DATA;
114 -- insert_data(trie, &match_list, line, filename);
115 -+ err = insert_data(trie, &match_list, line, filename);
116 -+ if (err < 0)
117 -+ r = err;
118 - break;
119 -
120 - case HW_DATA:
121 -- /* end of record */
122 - if (len == 0) {
123 -+ /* end of record */
124 - state = HW_NONE;
125 - udev_list_cleanup(&match_list);
126 - break;
127 - }
128 -
129 - if (line[0] != ' ') {
130 -- log_error("Error, DATA expected but got '%s' in '%s':", line, filename);
131 -+ log_error("Warning, property or empty line expected, got \"%s\", ignoring record", line);
132 -+ r = -EINVAL;
133 - state = HW_NONE;
134 - udev_list_cleanup(&match_list);
135 - break;
136 - }
137 -
138 -- insert_data(trie, &match_list, line, filename);
139 -+ err = insert_data(trie, &match_list, line, filename);
140 -+ if (err < 0)
141 -+ r = err;
142 - break;
143 - };
144 - }
145 -
146 -+ if (state == HW_MATCH)
147 -+ log_error("Warning, property expected, ignoring record with no properties");
148 -+
149 - fclose(f);
150 - udev_list_cleanup(&match_list);
151 -- return 0;
152 -+ return r;
153 - }
154 -
155 - static void help(void) {
156 -