| OLD | NEW |
| 1 Name: Protocol Buffers | 1 Name: Protocol Buffers |
| 2 Short Name: protobuf | 2 Short Name: protobuf |
| 3 URL: https://github.com/google/protobuf | 3 URL: https://github.com/google/protobuf |
| 4 License: BSD | 4 License: BSD |
| 5 License File: LICENSE | 5 License File: LICENSE |
| 6 Version: 3.0.0-beta-3 | 6 Version: 3.0.0-beta-3 |
| 7 Revision: 3470b6895aa659b7559ed678e029a5338e535f14 | 7 Revision: 3470b6895aa659b7559ed678e029a5338e535f14 |
| 8 Security Critical: yes | 8 Security Critical: yes |
| 9 | 9 |
| 10 Steps used to create the current version: | 10 Steps used to create the current version: |
| 11 1. Pull the release from https://github.com/google/protobuf/releases | 11 1. Pull the release from https://github.com/google/protobuf/releases |
| 12 2. Add build files (BUILD.gn, proto_library.gni, protobuf.gyp, | 12 2. Add build files (BUILD.gn, proto_library.gni) |
| 13 protobuf_lite.gypi, protobuf_nacl.gyp). | |
| 14 | 13 |
| 15 Be sure to update the list of source files, as additional .cc files and | 14 Be sure to update the list of source files, as additional .cc files and |
| 16 headers might have been added -- you need to find the transitive closure of | 15 headers might have been added -- you need to find the transitive closure of |
| 17 include files required by targets. | 16 include files required by targets. |
| 18 | 17 |
| 19 Other things to care about are defines required by protobuf on various | 18 Other things to care about are defines required by protobuf on various |
| 20 platforms, warnings generated by compilers, and new dependencies introduced. | 19 platforms, warnings generated by compilers, and new dependencies introduced. |
| 21 3. Get open-source library six.py from https://pypi.python.org/pypi/six/ and add | 20 3. Get open-source library six.py from https://pypi.python.org/pypi/six/ and add |
| 22 it to protobuf/third_party/six/six.py. | 21 it to protobuf/third_party/six/six.py. |
| 23 4. Apply patches in patches/ (see the description below): | 22 4. Apply patches in patches/ (see the description below): |
| 24 | 23 |
| 25 $ for patch in patches/*; do patch -s -p1 < $patch; done | 24 $ for patch in patches/*; do patch -s -p1 < $patch; done |
| 26 | 25 |
| 27 For future releases, it will be worth looking into which patches still need | 26 For future releases, it will be worth looking into which patches still need |
| 28 to be applied. | 27 to be applied. |
| 29 5. Extract all globals to src/google/protobuf/globals.cc and prefix these | 28 5. Generate descriptor_pb2.py using something like the following steps. Make |
| 30 symbols with 'cr_'. On Linux, the command | |
| 31 | |
| 32 $ objdump -t -j.data -j.bss -j.tdata -j.tbss \ | |
| 33 obj/third_party/protobuf/libprotobuf_lite.a | |
| 34 | |
| 35 should produce the output | |
| 36 | |
| 37 objdump: section '.tbss' mentioned in a -j option, but not found in any input
file | |
| 38 objdump: section '.tdata' mentioned in a -j option, but not found in any inpu
t file | |
| 39 objdump: section '.bss' mentioned in a -j option, but not found in any input
file | |
| 40 objdump: section '.data' mentioned in a -j option, but not found in any input
file | |
| 41 | |
| 42 This will require updating 0012-extract-globals.patch. | |
| 43 6. Generate descriptor_pb2.py using something like the following steps. Make | |
| 44 sure you've regenerated your buildfiles and will build protoc from the | 29 sure you've regenerated your buildfiles and will build protoc from the |
| 45 newly-modified sources above. | 30 newly-modified sources above. |
| 46 | 31 |
| 47 $ cd $SRC_DIR | 32 $ cd $SRC_DIR |
| 48 $ ninja -C out/Debug protoc | 33 $ ninja -C out/Debug protoc |
| 49 $ cd third_party/protobuf/src | 34 $ cd third_party/protobuf/src |
| 50 $ ../../../out/Debug/protoc --python_out=../python google/protobuf/descriptor
.proto | 35 $ ../../../out/Debug/protoc --python_out=../python google/protobuf/descriptor
.proto |
| 51 | 36 |
| 52 7. Add an __init__.py to protobuf/ that adds third_party/six/ to Python path. | 37 6. Add an __init__.py to protobuf/ that adds third_party/six/ to Python path. |
| 53 8. Update README.chromium. | 38 7. Update README.chromium. |
| 39 |
| 40 Note about libmirclient: |
| 41 |
| 42 On Ubuntu, Chromium has an indirect dependency on the system |
| 43 libprotobuf-lite through libmirclient (through GTK). The symbols in |
| 44 the system library conflict with Chromium's libprotobuf-lite used on |
| 45 component builds. |
| 46 |
| 47 mirclient.* are added to stub out libmirclient.so.9 to prevent loading |
| 48 the system libprotobuf-lite. Chromium's replacement libmirclient will |
| 49 get loaded, but its symbols will never be used directly or indirectly. |
| 54 | 50 |
| 55 Description of the patches: | 51 Description of the patches: |
| 56 | 52 |
| 57 - 0003-remove-static-initializers.patch | 53 - 0003-remove-static-initializers.patch |
| 58 | 54 |
| 59 This patch removes all static initializers from Chromium. The change in Status | 55 This patch removes all static initializers from Chromium. The change in Status |
| 60 class is not completely compatible with upstream, but it's compatible enough | 56 class is not completely compatible with upstream, but it's compatible enough |
| 61 to work in Chromium, which doesn't use this functionality yet. The work on | 57 to work in Chromium, which doesn't use this functionality yet. The work on |
| 62 upstreaming the removal of static initializers is in progress: | 58 upstreaming the removal of static initializers is in progress: |
| 63 https://github.com/google/protobuf/issues/1404 | 59 https://github.com/google/protobuf/issues/1404 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 83 | 79 |
| 84 These patches uninline some functions, resulting in a significant reduction | 80 These patches uninline some functions, resulting in a significant reduction |
| 85 (somewhere between 500 KB and 1 MB) of binary size. | 81 (somewhere between 500 KB and 1 MB) of binary size. |
| 86 | 82 |
| 87 - 0011-libprotobuf_export.patch | 83 - 0011-libprotobuf_export.patch |
| 88 | 84 |
| 89 During merge with internal branch, the dll export attribute was accidentally | 85 During merge with internal branch, the dll export attribute was accidentally |
| 90 removed in C++11 mode. | 86 removed in C++11 mode. |
| 91 | 87 |
| 92 Fixed in https://github.com/google/protobuf/pull/1549 | 88 Fixed in https://github.com/google/protobuf/pull/1549 |
| 93 | |
| 94 - 0012-extract-globals.patch | |
| 95 | |
| 96 Fixes https://crbug.com/700120. Moves everything that would have | |
| 97 gotten linked into .data or .bss sections into globals.cc so that | |
| 98 Chromium may build a shared library containing just protobuf | |
| 99 globals. Also prefixes every symbol with 'cr_' to avoid conflicting | |
| 100 with symbols from the system protobuf. | |
| OLD | NEW |