-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Roll xdg-mime to 722325fba8968a26eb243642cbe89a044d6dfd6c.
$ git log 2cdd8d36d..722325fba --date=short --no-merges --format='%ad %ae %s' 2021-03-18 kdudka@redhat.com Fix fd leak in error path 2021-01-06 hadess@hadess.net ci: Add CI 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warnings in src/xdgmimecache.c 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warnings in src/xdgmimecache.c:__gio_xdg_cache_list_mime_parents() 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warning in src/xdgmimecache.c:__gio_xdg_cache_mime_type_subclass() 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warning in src/xdgmimecache.c:cache_glob_node_lookup_suffix() 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warning in rc/xdgmimecache.c:cache_glob_lookup_fnmatch() 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warning in src/xdgmimecache.c:cache_magic_compare_to_data() 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warning in src/xdgmimecache.c:cache_magic_matchlet_compare() 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warnings in src/xdgmimecache.c:cache_magic_matchlet_compare_to_data() 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warnings in src/xdgmimemagic.c:_xdg_mime_magic_matchlet_compare_to_data() 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warnings in src/xdgmimemagic.c:_xdg_mime_magic_parse_magic_line() 2020-11-21 emmanuel.fleury@u-bordeaux.fr Fix signedness warning in src/xdgmimeint.c 2020-12-27 faure@kde.org Fix fallback after multiple matching globs 2020-12-27 faure@kde.org Fix usage information for print-mime-data 2019-06-03 withnall@endlessm.com xdgmime: Don’t set an out argument if it’s NULL 2018-11-19 ville.skytta@iki.fi Comment grammar fix 2018-07-16 mcatanzaro@igalia.com Fix buffer underflow in __gio_xdg_cache_mime_type_subclass() 2018-07-16 mcatanzaro@igalia.com Fix special case for mime_type_subclass 2018-07-16 mcatanzaro@igalia.com Handle EINTR in open() 2018-07-16 mcatanzaro@igalia.com Don't forget to free resources on an early return 2018-07-16 mcatanzaro@igalia.com Fix void pointer arithmetic in cache_magic_matchlet_compare_to_data() 2018-07-16 mcatanzaro@igalia.com Fix use after free in xdg_mime_get_mime_type_for_file 2018-07-16 mcatanzaro@igalia.com Add space before paren in _xdg_mime_cache_get_mime_type_for_file 2018-06-30 mcatanzaro@igalia.com build: Add a .gitignore 2018-06-17 ville.skytta@iki.fi Spelling fixes 2017-09-05 hadess@hadess.net Check further into the file whether it is text or binary 2013-01-07 hadess@hadess.net tests: Fix current test-mime failures 2013-01-07 hadess@hadess.net tests: Make test-mime failures fatal 2013-01-07 hadess@hadess.net tests: Mime-types are not case-sensitive 2012-09-27 hadess@hadess.net Ignore non-regular files in print-mime-data 2012-09-25 hadess@hadess.net Add print-mime-data program (cherry picked from commit a80974f) Fixed: 1184294 Change-Id: I74717bb13d49088b18bd88404c7cf7b8032a7d99 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2803936 Reviewed-by: Adrian Taylor <adetaylor@chromium.org> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Commit-Queue: Daniel Cheng <dcheng@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#871055} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2820648 Cr-Commit-Position: refs/branch-heads/4472@{#17} Cr-Branched-From: 3d60439-refs/heads/master@{#870763}
- Loading branch information
1 parent
bb7621d
commit 2a4ba6d
Showing
12 changed files
with
207 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
Name: xdg-mime | ||
URL: http://freedesktop.org | ||
URL: https://gitlab.freedesktop.org/xdg/xdgmime | ||
Version: 722325fba8968a26eb243642cbe89a044d6dfd6c | ||
CPEPrefix: unknown | ||
License: Academic Free License version 2.0 or LGPL v2 | ||
Security critical: yes | ||
|
||
The code in this directory is synced from: | ||
git://anongit.freedesktop.org/xdg/xdgmime | ||
@ 2cdd8d36d7930d5a594587286cb1949ff62f7027 on 2012/08/06. | ||
Run //base/third_party/xdg_mime/roll.py to update this dependency. | ||
|
||
In addition, we have the following patch(es): | ||
- compile.patch: small tweaks to make the code compile. | ||
- free_pointer_later.patch: small patch that fixes potential crash in | ||
xdg_mime_get_mime_type_for_file() - use of pointer after being freed. | ||
- function_casts.patch: fix bad function casts. | ||
- Added a LICENSE file. | ||
Patches: | ||
- 000-have-mmap.patch: enable code guarded with HAVE_MMAP since | ||
Chrome does not run autoconf. | ||
- 001-fix-casts-for-cfi.patch: remove casting between function | ||
pointer types (!!!) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/base/third_party/xdg_mime/xdgmimecache.c b/base/third_party/xdg_mime/xdgmimecache.c | ||
index acaed9d470ed..ccf297527788 100644 | ||
--- a/base/third_party/xdg_mime/xdgmimecache.c | ||
+++ b/base/third_party/xdg_mime/xdgmimecache.c | ||
@@ -40,6 +40,8 @@ | ||
|
||
#include <netinet/in.h> /* for ntohl/ntohs */ | ||
|
||
+#define HAVE_MMAP 1 | ||
+ | ||
#ifdef HAVE_MMAP | ||
#include <sys/mman.h> | ||
#else |
10 changes: 6 additions & 4 deletions
10
...third_party/xdg_mime/function_casts.patch → ..._mime/patches/001-fix-casts-for-cfi.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#!/usr/bin/env python3 | ||
|
||
# Copyright 2021 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import os | ||
import shlex | ||
import shutil | ||
import subprocess | ||
import tempfile | ||
|
||
_REPO_URL = "https://gitlab.freedesktop.org/xdg/xdgmime.git" | ||
_FILES_TO_COPY = ( | ||
"README", | ||
"src/xdgmimealias.c", | ||
"src/xdgmime.c", | ||
"src/xdgmimecache.h", | ||
"src/xdgmimeglob.h", | ||
"src/xdgmimeicon.c", | ||
"src/xdgmimeint.c", | ||
"src/xdgmimemagic.c", | ||
"src/xdgmimeparent.c", | ||
"src/xdgmimealias.h", | ||
"src/xdgmimecache.c", | ||
"src/xdgmimeglob.c", | ||
"src/xdgmime.h", | ||
"src/xdgmimeicon.h", | ||
"src/xdgmimeint.h", | ||
"src/xdgmimemagic.h", | ||
"src/xdgmimeparent.h", | ||
) | ||
|
||
_PATCHES = ("000-have-mmap.patch", "001-fix-casts-for-cfi.patch") | ||
|
||
|
||
def main(): | ||
out_dir = os.path.dirname(os.path.realpath(__file__)) | ||
|
||
with open(os.path.join(out_dir, "README.chromium")) as readme_file: | ||
_VERSION_PREFIX = "Version: " | ||
for line in readme_file: | ||
if not line.startswith(_VERSION_PREFIX): | ||
continue | ||
old_commit = line[len(_VERSION_PREFIX):].strip() | ||
with tempfile.TemporaryDirectory() as staging_dir: | ||
os.chdir(staging_dir) | ||
|
||
print(f"Cloning from {_REPO_URL}...") | ||
subprocess.check_call([ | ||
"git", | ||
"clone", | ||
_REPO_URL, | ||
".", | ||
]) | ||
|
||
for f in _FILES_TO_COPY: | ||
shutil.copy(os.path.join(staging_dir, f), out_dir) | ||
|
||
new_commit = subprocess.check_output([ | ||
"git", | ||
"rev-parse", | ||
"HEAD", | ||
]).decode("ascii").strip() | ||
|
||
# This is cargo-culted from depot_tool's roll_dep.py | ||
log_command = ( | ||
"git", | ||
"log", | ||
f"{old_commit}..{new_commit}", | ||
"--date=short", | ||
"--no-merges", | ||
"--format=%ad %ae %s", | ||
) | ||
diffs = subprocess.check_output(log_command).decode("utf-8") | ||
|
||
os.chdir(os.path.join(out_dir, "..", "..", "..")) | ||
|
||
for p in _PATCHES: | ||
print(f"Applying patch {p}...") | ||
with open(os.path.join(out_dir, "patches", p)) as patch_file: | ||
subprocess.check_call(["patch", "-p1"], stdin=patch_file) | ||
|
||
print(f"Done! Updated from {old_commit} to {new_commit}") | ||
print("Changes:") | ||
print( | ||
f"$ git log {old_commit[:9]}..{new_commit[:9]} " | ||
f"--date=short --no-merges --format='%ad %ae %s'" | ||
) | ||
print(diffs) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.