diff options
author | Wang Mingyu <wangmy@fujitsu.com> | 2023-11-15 16:41:59 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-20 15:30:52 +0000 |
commit | e54a29b9022ec4516f0a568da471cfbdf780aadd (patch) | |
tree | 12b8ffe05675eb005a4b8e1398609e44913b6d6c /meta/recipes-support | |
parent | 97f53ce1bbe8f6821581f801a6920e90a21ae21a (diff) | |
download | poky-e54a29b9022ec4516f0a568da471cfbdf780aadd.tar.gz |
shared-mime-info: upgrade 2.3 -> 2.4
0001-Fix-string-literal-concatenation.patch
0001-Fix-literal-as-per-c-11.patch
removed since they're included in 2.4
Changelog:
==========
* Restore mimetype name for *.bz2 and *.tar.bz2
* Improve detection of application/mac-binhex40
* Add application/x-msdownload and subtypes
* Add Windows app store types
* Give Windows Installer packages the package icon
* Lower priority for text/x-mpsub's magic, so it doesn't match pcb-drillFile.drl
* Add application/x-powershell
* Add application/wasm
* Change comment of text/x-mpsub
* Change comment of text/x-mpl2
* Add text/x-component
* Give higher priority to the more specific image/apng magic
* Recognize *.jfif as image/jpeg
* Add application/its+xml
* Add text/x-vb
* Add text/x-basic
* Add new group "chemical" in update-mime-database
* Add mimetype for Protein Data Bank (pdb) files
* Remove too generic magic from application/x-pak
* Add application/json5
* Add text/vbscript.encode
* Add text/jscript.encode
* Add text/jscript as synonym of text/javascript
* Fix backwards relationship between text/javascript and application/ecmascript
* Add application/vnd.cups-ppd
* Add application/x-ms-shortcut
* Give application/x-mswinurl the link icon
* Fix missing sentinel warning with clang
* Fix false positive fdatasync detection on darwin
* Fix string literal concatenation
(From OE-Core rev: ec0c733062e8d934c86698bedcd5628a60ef38a5)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
3 files changed, 3 insertions, 324 deletions
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info/0001-Fix-literal-as-per-c-11.patch b/meta/recipes-support/shared-mime-info/shared-mime-info/0001-Fix-literal-as-per-c-11.patch deleted file mode 100644 index 25f409c206..0000000000 --- a/meta/recipes-support/shared-mime-info/shared-mime-info/0001-Fix-literal-as-per-c-11.patch +++ /dev/null | |||
@@ -1,279 +0,0 @@ | |||
1 | From 157c16b09f54741aefbc4be6a3507455f0378389 Mon Sep 17 00:00:00 2001 | ||
2 | From: Biswapriyo Nath <nathbappai@gmail.com> | ||
3 | Date: Sun, 8 Oct 2023 13:26:43 +0000 | ||
4 | Subject: [PATCH] Fix missing sentinel warning with clang | ||
5 | |||
6 | This fixes the compiler warnings similar as following. | ||
7 | |||
8 | ../src/update-mime-database.cpp:393:50: warning: missing sentinel in function call [-Wsentinel] | ||
9 | 393 | g_strconcat(namespaceURI, " ", localName, NULL), | ||
10 | | ^ | ||
11 | | , nullptr | ||
12 | |||
13 | Upstream-Status: Backport [https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/157c16b09f54741aefbc4be6a3507455f0378389] | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | src/update-mime-database.cpp | 58 ++++++++++++++++++------------------ | ||
17 | 1 file changed, 29 insertions(+), 29 deletions(-) | ||
18 | |||
19 | --- a/src/update-mime-database.cpp | ||
20 | +++ b/src/update-mime-database.cpp | ||
21 | @@ -390,7 +390,7 @@ static void add_namespace(Type *type, co | ||
22 | } | ||
23 | |||
24 | g_hash_table_insert(namespace_hash, | ||
25 | - g_strconcat(namespaceURI, " ", localName, NULL), | ||
26 | + g_strconcat(namespaceURI, " ", localName, nullptr), | ||
27 | type); | ||
28 | } | ||
29 | |||
30 | @@ -1023,7 +1023,7 @@ static void write_out_type(gpointer key, | ||
31 | char *lower; | ||
32 | |||
33 | lower = g_ascii_strdown(type->media, -1); | ||
34 | - media = g_strconcat(mime_dir, "/", lower, NULL); | ||
35 | + media = g_strconcat(mime_dir, "/", lower, nullptr); | ||
36 | g_free(lower); | ||
37 | #ifdef _WIN32 | ||
38 | fs::create_directory(media); | ||
39 | @@ -1032,7 +1032,7 @@ static void write_out_type(gpointer key, | ||
40 | #endif | ||
41 | |||
42 | lower = g_ascii_strdown(type->subtype, -1); | ||
43 | - filename = g_strconcat(media, "/", lower, ".xml.new", NULL); | ||
44 | + filename = g_strconcat(media, "/", lower, ".xml.new", nullptr); | ||
45 | g_free(lower); | ||
46 | g_free(media); | ||
47 | media = NULL; | ||
48 | @@ -1622,7 +1622,7 @@ static Magic *magic_new(xmlNode *node, T | ||
49 | magic_free(magic); | ||
50 | magic = NULL; | ||
51 | (*error)->message = g_strconcat( | ||
52 | - _("Error in <match> element: "), old, NULL); | ||
53 | + _("Error in <match> element: "), old, nullptr); | ||
54 | g_free(old); | ||
55 | } else if (magic->matches == NULL) { | ||
56 | magic_free(magic); | ||
57 | @@ -1843,7 +1843,7 @@ static TreeMagic *tree_magic_new(xmlNode | ||
58 | tree_magic_free(magic); | ||
59 | magic = NULL; | ||
60 | (*error)->message = g_strconcat( | ||
61 | - _("Error in <treematch> element: "), old, NULL); | ||
62 | + _("Error in <treematch> element: "), old, nullptr); | ||
63 | g_free(old); | ||
64 | } | ||
65 | } | ||
66 | @@ -1960,7 +1960,7 @@ static void delete_old_types(const gchar | ||
67 | |||
68 | for (i = 0; i < G_N_ELEMENTS(media_types); i++) | ||
69 | { | ||
70 | - const fs::path media_dir = g_strconcat(mime_dir, "/", media_types[i], NULL); | ||
71 | + const fs::path media_dir = g_strconcat(mime_dir, "/", media_types[i], nullptr); | ||
72 | |||
73 | if (!fs::is_directory(fs::status(media_dir))) | ||
74 | continue; | ||
75 | @@ -1973,13 +1973,13 @@ static void delete_old_types(const gchar | ||
76 | continue; | ||
77 | |||
78 | char *type_name = g_strconcat(media_types[i], "/", | ||
79 | - dir_entry.path().filename().string().c_str(), NULL); | ||
80 | + dir_entry.path().filename().string().c_str(), nullptr); | ||
81 | type_name[strlen(type_name) - 4] = '\0'; | ||
82 | if (!g_hash_table_lookup(types, type_name)) | ||
83 | { | ||
84 | char *path; | ||
85 | path = g_strconcat(mime_dir, "/", | ||
86 | - type_name, ".xml", NULL); | ||
87 | + type_name, ".xml", nullptr); | ||
88 | #if 0 | ||
89 | g_warning("Removing old info for type %s", | ||
90 | path); | ||
91 | @@ -2002,7 +2002,7 @@ static void add_ns(gpointer key, gpointe | ||
92 | Type *type = (Type *) value; | ||
93 | |||
94 | g_ptr_array_add(lines, g_strconcat(ns, " ", type->media, | ||
95 | - "/", type->subtype, "\n", NULL)); | ||
96 | + "/", type->subtype, "\n", nullptr)); | ||
97 | } | ||
98 | |||
99 | /* Write all the collected namespace rules to 'XMLnamespaces' */ | ||
100 | @@ -2038,7 +2038,7 @@ static void write_subclass(gpointer key, | ||
101 | |||
102 | for (l = list; l; l = l->next) | ||
103 | { | ||
104 | - line = g_strconcat (static_cast<const gchar *>(key), " ", l->data, "\n", NULL); | ||
105 | + line = g_strconcat (static_cast<const gchar *>(key), " ", l->data, "\n", nullptr); | ||
106 | fwrite(line, 1, strlen(line), stream); | ||
107 | g_free (line); | ||
108 | } | ||
109 | @@ -2061,7 +2061,7 @@ static void add_alias(gpointer key, gpoi | ||
110 | |||
111 | g_ptr_array_add(lines, g_strconcat(alias, " ", type->media, | ||
112 | "/", type->subtype, "\n", | ||
113 | - NULL)); | ||
114 | + nullptr)); | ||
115 | } | ||
116 | |||
117 | /* Write all the collected aliases */ | ||
118 | @@ -2092,7 +2092,7 @@ static void add_type(gpointer key, gpoin | ||
119 | { | ||
120 | GPtrArray *lines = (GPtrArray *) data; | ||
121 | |||
122 | - g_ptr_array_add(lines, g_strconcat((char *)key, "\n", NULL)); | ||
123 | + g_ptr_array_add(lines, g_strconcat((char *)key, "\n", nullptr)); | ||
124 | } | ||
125 | |||
126 | /* Write all the collected types */ | ||
127 | @@ -2127,7 +2127,7 @@ static void write_one_icon(gpointer key, | ||
128 | FILE *stream = (FILE *)data; | ||
129 | char *line; | ||
130 | |||
131 | - line = g_strconcat (mimetype, ":", iconname, "\n", NULL); | ||
132 | + line = g_strconcat (mimetype, ":", iconname, "\n", nullptr); | ||
133 | fwrite(line, 1, strlen(line), stream); | ||
134 | g_free (line); | ||
135 | } | ||
136 | @@ -2168,7 +2168,7 @@ static void check_in_path_xdg_data(const | ||
137 | dirs[n] = g_strdup(env); | ||
138 | else | ||
139 | dirs[n] = g_build_filename(g_get_home_dir(), ".local", | ||
140 | - "share", NULL); | ||
141 | + "share", nullptr); | ||
142 | n++; | ||
143 | |||
144 | for (i = 0; i < n; i++) | ||
145 | @@ -3588,7 +3588,7 @@ newest_mtime(const char *packagedir) | ||
146 | while ((name = g_dir_read_name(dir))) { | ||
147 | char *path; | ||
148 | |||
149 | - path = g_build_filename(packagedir, name, NULL); | ||
150 | + path = g_build_filename(packagedir, name, nullptr); | ||
151 | retval = g_stat(path, &statbuf); | ||
152 | g_free(path); | ||
153 | if (retval < 0) | ||
154 | @@ -3609,7 +3609,7 @@ is_cache_up_to_date (const char *mimedir | ||
155 | char *mimeversion; | ||
156 | int retval; | ||
157 | |||
158 | - mimeversion = g_build_filename(mimedir, "/version", NULL); | ||
159 | + mimeversion = g_build_filename(mimedir, "/version", nullptr); | ||
160 | retval = g_stat(mimeversion, &version_stat); | ||
161 | g_free(mimeversion); | ||
162 | if (retval < 0) | ||
163 | @@ -3694,7 +3694,7 @@ int main(int argc, char **argv) | ||
164 | } | ||
165 | } | ||
166 | |||
167 | - package_dir = g_strconcat(mime_dir, "/packages", NULL); | ||
168 | + package_dir = g_strconcat(mime_dir, "/packages", nullptr); | ||
169 | |||
170 | if (!fs::exists(mime_dir) && !fs::is_directory(fs::status(mime_dir))) | ||
171 | { | ||
172 | @@ -3747,7 +3747,7 @@ int main(int argc, char **argv) | ||
173 | |||
174 | g_hash_table_foreach(globs_hash, collect_glob2, &glob_list); | ||
175 | glob_list = g_list_sort(glob_list, (GCompareFunc)compare_glob_by_weight); | ||
176 | - globs_path = g_strconcat(mime_dir, "/globs.new", NULL); | ||
177 | + globs_path = g_strconcat(mime_dir, "/globs.new", nullptr); | ||
178 | globs = fopen_gerror(globs_path, error); | ||
179 | if (!globs) | ||
180 | goto out; | ||
181 | @@ -3761,7 +3761,7 @@ int main(int argc, char **argv) | ||
182 | goto out; | ||
183 | g_free(globs_path); | ||
184 | |||
185 | - globs_path = g_strconcat(mime_dir, "/globs2.new", NULL); | ||
186 | + globs_path = g_strconcat(mime_dir, "/globs2.new", nullptr); | ||
187 | globs = fopen_gerror(globs_path, error); | ||
188 | if (!globs) | ||
189 | goto out; | ||
190 | @@ -3782,7 +3782,7 @@ int main(int argc, char **argv) | ||
191 | FILE *stream; | ||
192 | char *magic_path; | ||
193 | int i; | ||
194 | - magic_path = g_strconcat(mime_dir, "/magic.new", NULL); | ||
195 | + magic_path = g_strconcat(mime_dir, "/magic.new", nullptr); | ||
196 | stream = fopen_gerror(magic_path, error); | ||
197 | if (!stream) | ||
198 | goto out; | ||
199 | @@ -3807,7 +3807,7 @@ int main(int argc, char **argv) | ||
200 | FILE *stream; | ||
201 | char *ns_path; | ||
202 | |||
203 | - ns_path = g_strconcat(mime_dir, "/XMLnamespaces.new", NULL); | ||
204 | + ns_path = g_strconcat(mime_dir, "/XMLnamespaces.new", nullptr); | ||
205 | stream = fopen_gerror(ns_path, error); | ||
206 | if (!stream) | ||
207 | goto out; | ||
208 | @@ -3823,7 +3823,7 @@ int main(int argc, char **argv) | ||
209 | FILE *stream; | ||
210 | char *path; | ||
211 | |||
212 | - path = g_strconcat(mime_dir, "/subclasses.new", NULL); | ||
213 | + path = g_strconcat(mime_dir, "/subclasses.new", nullptr); | ||
214 | stream = fopen_gerror(path, error); | ||
215 | if (!stream) | ||
216 | goto out; | ||
217 | @@ -3839,7 +3839,7 @@ int main(int argc, char **argv) | ||
218 | FILE *stream; | ||
219 | char *path; | ||
220 | |||
221 | - path = g_strconcat(mime_dir, "/aliases.new", NULL); | ||
222 | + path = g_strconcat(mime_dir, "/aliases.new", nullptr); | ||
223 | stream = fopen_gerror(path, error); | ||
224 | if (!stream) | ||
225 | goto out; | ||
226 | @@ -3855,7 +3855,7 @@ int main(int argc, char **argv) | ||
227 | FILE *stream; | ||
228 | char *path; | ||
229 | |||
230 | - path = g_strconcat(mime_dir, "/types.new", NULL); | ||
231 | + path = g_strconcat(mime_dir, "/types.new", nullptr); | ||
232 | stream = fopen_gerror(path, error); | ||
233 | if (!stream) | ||
234 | goto out; | ||
235 | @@ -3871,7 +3871,7 @@ int main(int argc, char **argv) | ||
236 | FILE *stream; | ||
237 | char *icon_path; | ||
238 | |||
239 | - icon_path = g_strconcat(mime_dir, "/generic-icons.new", NULL); | ||
240 | + icon_path = g_strconcat(mime_dir, "/generic-icons.new", nullptr); | ||
241 | stream = fopen_gerror(icon_path, error); | ||
242 | if (!stream) | ||
243 | goto out; | ||
244 | @@ -3887,7 +3887,7 @@ int main(int argc, char **argv) | ||
245 | FILE *stream; | ||
246 | char *icon_path; | ||
247 | |||
248 | - icon_path = g_strconcat(mime_dir, "/icons.new", NULL); | ||
249 | + icon_path = g_strconcat(mime_dir, "/icons.new", nullptr); | ||
250 | stream = fopen_gerror(icon_path, error); | ||
251 | if (!stream) | ||
252 | goto out; | ||
253 | @@ -3903,7 +3903,7 @@ int main(int argc, char **argv) | ||
254 | FILE *stream; | ||
255 | char *path; | ||
256 | int i; | ||
257 | - path = g_strconcat(mime_dir, "/treemagic.new", NULL); | ||
258 | + path = g_strconcat(mime_dir, "/treemagic.new", nullptr); | ||
259 | stream = fopen_gerror(path, error); | ||
260 | if (!stream) | ||
261 | goto out; | ||
262 | @@ -3928,7 +3928,7 @@ int main(int argc, char **argv) | ||
263 | FILE *stream; | ||
264 | char *path; | ||
265 | |||
266 | - path = g_strconcat(mime_dir, "/mime.cache.new", NULL); | ||
267 | + path = g_strconcat(mime_dir, "/mime.cache.new", nullptr); | ||
268 | stream = fopen_gerror(path, error); | ||
269 | if (!stream) | ||
270 | goto out; | ||
271 | @@ -3944,7 +3944,7 @@ int main(int argc, char **argv) | ||
272 | FILE *stream; | ||
273 | char *path; | ||
274 | |||
275 | - path = g_strconcat(mime_dir, "/version.new", NULL); | ||
276 | + path = g_strconcat(mime_dir, "/version.new", nullptr); | ||
277 | stream = fopen_gerror(path, error); | ||
278 | if (!stream) | ||
279 | goto out; | ||
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info/0001-Fix-string-literal-concatenation.patch b/meta/recipes-support/shared-mime-info/shared-mime-info/0001-Fix-string-literal-concatenation.patch deleted file mode 100644 index 7825c39312..0000000000 --- a/meta/recipes-support/shared-mime-info/shared-mime-info/0001-Fix-string-literal-concatenation.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From ccf704a606625bc62e70dbe815b309c22a0bda05 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tobias Mayer <tobim@fastmail.fm> | ||
3 | Date: Sun, 8 Oct 2023 00:11:49 +0200 | ||
4 | Subject: [PATCH] Fix string literal concatenation | ||
5 | |||
6 | Clang is not able to disambiguate between multiple string literatals | ||
7 | and C++11 user defined literals. Spaces help. | ||
8 | |||
9 | Upstream-Status: Backport [https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/12a3a6b1141c704fc594379af1808bb9008d588c] | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | src/update-mime-database.cpp | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/src/update-mime-database.cpp b/src/update-mime-database.cpp | ||
16 | index 733ba06..29d82a9 100644 | ||
17 | --- a/src/update-mime-database.cpp | ||
18 | +++ b/src/update-mime-database.cpp | ||
19 | @@ -2158,7 +2158,7 @@ static void check_in_path_xdg_data(const char *mime_path) | ||
20 | |||
21 | env = getenv("XDG_DATA_DIRS"); | ||
22 | if (!env) | ||
23 | - env = "/usr/local/share/"PATH_SEPARATOR"/usr/share/"; | ||
24 | + env = "/usr/local/share/" PATH_SEPARATOR "/usr/share/"; | ||
25 | dirs = g_strsplit(env, PATH_SEPARATOR, 0); | ||
26 | g_return_if_fail(dirs != NULL); | ||
27 | for (n = 0; dirs[n]; n++) | ||
28 | @@ -2170,7 +2170,7 @@ static void check_in_path_xdg_data(const char *mime_path) | ||
29 | dirs[n] = g_build_filename(g_get_home_dir(), ".local", | ||
30 | "share", NULL); | ||
31 | n++; | ||
32 | - | ||
33 | + | ||
34 | for (i = 0; i < n; i++) | ||
35 | { | ||
36 | if (stat(dirs[i], &dir_info) == 0 && | ||
37 | -- | ||
38 | 2.42.0 | ||
39 | |||
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb index cae0064333..937428221e 100644 --- a/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb +++ b/meta/recipes-support/shared-mime-info/shared-mime-info_git.bb | |||
@@ -8,12 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | |||
8 | 8 | ||
9 | DEPENDS = "libxml2 itstool-native glib-2.0 shared-mime-info-native xmlto-native" | 9 | DEPENDS = "libxml2 itstool-native glib-2.0 shared-mime-info-native xmlto-native" |
10 | 10 | ||
11 | SRC_URI = "git://gitlab.freedesktop.org/xdg/shared-mime-info.git;protocol=https;branch=master \ | 11 | SRC_URI = "git://gitlab.freedesktop.org/xdg/shared-mime-info.git;protocol=https;branch=master" |
12 | file://0001-Fix-string-literal-concatenation.patch \ | 12 | SRCREV = "9a6d6b8e963935f145f3a1ef446552de6996dada" |
13 | file://0001-Fix-literal-as-per-c-11.patch \ | 13 | PV = "2.4" |
14 | " | ||
15 | SRCREV = "8e80a317f5c61a7f410330abea441e0b0b9280b5" | ||
16 | PV = "2.3" | ||
17 | S = "${WORKDIR}/git" | 14 | S = "${WORKDIR}/git" |
18 | 15 | ||
19 | inherit meson pkgconfig gettext python3native mime | 16 | inherit meson pkgconfig gettext python3native mime |