| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright 2017 The Chromium Authors. All rights reserved. | 3 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 import argparse | 7 import argparse |
| 8 import os | 8 import os |
| 9 import os.path | 9 import os.path |
| 10 import shutil | 10 import shutil |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 # d. third_party/libxml/chromium/roll.py --mac | 68 # d. third_party/libxml/chromium/roll.py --mac |
| 69 # e. Make and commit any final changes to README.chromium, BUILD.gn, etc. | 69 # e. Make and commit any final changes to README.chromium, BUILD.gn, etc. |
| 70 # f. Complete the code review process as usual: git cl upload -d; | 70 # f. Complete the code review process as usual: git cl upload -d; |
| 71 # git cl try-results; etc. | 71 # git cl try-results; etc. |
| 72 | 72 |
| 73 PATCHES = [ | 73 PATCHES = [ |
| 74 'chromium-issue-599427.patch', | 74 'chromium-issue-599427.patch', |
| 75 'chromium-issue-620679.patch', | 75 'chromium-issue-620679.patch', |
| 76 'chromium-issue-628581.patch', | 76 'chromium-issue-628581.patch', |
| 77 'chromium-issue-683629.patch', | 77 'chromium-issue-683629.patch', |
| 78 'libxml2-2.9.4-security-CVE-2017-7375-xmlParsePEReference-xxe.patch', | |
| 79 'libxml2-2.9.4-security-CVE-2017-7376-nanohttp-out-of-bounds-write.patch', | 78 'libxml2-2.9.4-security-CVE-2017-7376-nanohttp-out-of-bounds-write.patch', |
| 80 'libxml2-2.9.4-security-xpath-nodetab-uaf.patch', | 79 'libxml2-2.9.4-security-xpath-nodetab-uaf.patch', |
| 81 'libxml2-2.9.4-xmlDumpElementContent-null-deref.patch', | 80 'libxml2-2.9.4-xmlDumpElementContent-null-deref.patch', |
| 82 'chromium-issue-708434.patch', | 81 'chromium-issue-708434.patch', |
| 83 ] | 82 ] |
| 84 | 83 |
| 85 | 84 |
| 86 # See libxml2 configure.ac and win32/configure.js to learn what | 85 # See libxml2 configure.ac and win32/configure.js to learn what |
| 87 # options are available. | 86 # options are available. |
| 88 | 87 |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 shell=True) | 336 shell=True) |
| 338 finally: | 337 finally: |
| 339 shutil.rmtree(temp_dir) | 338 shutil.rmtree(temp_dir) |
| 340 | 339 |
| 341 with WorkingDir(THIRD_PARTY_LIBXML_SRC): | 340 with WorkingDir(THIRD_PARTY_LIBXML_SRC): |
| 342 # Put the version number is the README file | 341 # Put the version number is the README file |
| 343 sed_in_place('../README.chromium', | 342 sed_in_place('../README.chromium', |
| 344 's/Version: .*$/Version: %s/' % commit) | 343 's/Version: .*$/Version: %s/' % commit) |
| 345 | 344 |
| 346 for patch in PATCHES: | 345 for patch in PATCHES: |
| 347 subprocess.check_call('cat ../chromium/%s | patch -p1' % patch, | 346 subprocess.check_call( |
| 348 shell=True) | 347 'cat ../chromium/%s | patch -p1 --fuzz=0' % patch, |
| 348 shell=True) |
| 349 | 349 |
| 350 with WorkingDir('../linux'): | 350 with WorkingDir('../linux'): |
| 351 subprocess.check_call( | 351 subprocess.check_call( |
| 352 ['../src/autogen.sh'] + XML_CONFIGURE_OPTIONS) | 352 ['../src/autogen.sh'] + XML_CONFIGURE_OPTIONS) |
| 353 check_copying(os.getcwd()) | 353 check_copying(os.getcwd()) |
| 354 sed_in_place('config.h', 's/#define HAVE_RAND_R 1//') | 354 sed_in_place('config.h', 's/#define HAVE_RAND_R 1//') |
| 355 | 355 |
| 356 # Add *everything* | 356 # Add *everything* |
| 357 with WorkingDir('../src'): | 357 with WorkingDir('../src'): |
| 358 git('add', '*') | 358 git('add', '*') |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 libxml2_repo_path = os.path.abspath(libxml2_repo_path) | 431 libxml2_repo_path = os.path.abspath(libxml2_repo_path) |
| 432 roll_libxml_linux(src_dir, libxml2_repo_path) | 432 roll_libxml_linux(src_dir, libxml2_repo_path) |
| 433 elif args.win32: | 433 elif args.win32: |
| 434 roll_libxml_win32(src_dir) | 434 roll_libxml_win32(src_dir) |
| 435 elif args.mac: | 435 elif args.mac: |
| 436 roll_libxml_mac(src_dir) | 436 roll_libxml_mac(src_dir) |
| 437 | 437 |
| 438 | 438 |
| 439 if __name__ == '__main__': | 439 if __name__ == '__main__': |
| 440 main() | 440 main() |
| OLD | NEW |