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, protobuf.gyp, |
13 protobuf_lite.gypi, protobuf_nacl.gyp). | 13 protobuf_lite.gypi, protobuf_nacl.gyp). |
14 | 14 |
15 Be sure to update the list of source files, as additional .cc files and | 15 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 | 16 headers might have been added -- you need to find the transitive closure of |
17 include files required by targets. | 17 include files required by targets. |
18 | 18 |
19 Other things to care about are defines required by protobuf on various | 19 Other things to care about are defines required by protobuf on various |
20 platforms, warnings generated by compilers, and new dependencies introduced. | 20 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 | 21 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. | 22 it to protobuf/third_party/six/six.py. |
23 4. Apply patches in patches/ (see the description below): | 23 4. Apply patches in patches/ (see the description below): |
24 | 24 |
25 $ for patch in patches/*; do patch -s -p1 < $patch; done | 25 $ for patch in patches/*; do patch -s -p1 < $patch; done |
26 | 26 |
27 For future releases, it will be worth looking into which patches still need | 27 For future releases, it will be worth looking into which patches still need |
28 to be applied. | 28 to be applied. |
29 5. Generate descriptor_pb2.py using something like the following steps. Make | 29 5. Extract all globals to src/google/protobuf/globals.cc and prefix these |
| 30 symbols with 'cr_'. On Linux, the command |
| 31 |
| 32 $ objdump -t -j.data -j.bss obj/third_party/protobuf/libprotobuf_lite.a |
| 33 |
| 34 should produce the output |
| 35 |
| 36 objdump: section '.bss' mentioned in a -j option, but not found in any input
file |
| 37 objdump: section '.data' mentioned in a -j option, but not found in any input
file |
| 38 |
| 39 This will require updating 0012-extract-globals.patch. |
| 40 6. Generate descriptor_pb2.py using something like the following steps. Make |
30 sure you've regenerated your buildfiles and will build protoc from the | 41 sure you've regenerated your buildfiles and will build protoc from the |
31 newly-modified sources above. | 42 newly-modified sources above. |
32 | 43 |
33 $ cd $SRC_DIR | 44 $ cd $SRC_DIR |
34 $ ninja -C out/Debug protoc | 45 $ ninja -C out/Debug protoc |
35 $ cd third_party/protobuf/src | 46 $ cd third_party/protobuf/src |
36 $ ../../../out/Debug/protoc --python_out=../python google/protobuf/descriptor
.proto | 47 $ ../../../out/Debug/protoc --python_out=../python google/protobuf/descriptor
.proto |
37 | 48 |
38 6. Add an __init__.py to protobuf/ that adds third_party/six/ to Python path. | 49 7. Add an __init__.py to protobuf/ that adds third_party/six/ to Python path. |
39 7. Update README.chromium. | 50 8. Update README.chromium. |
40 | 51 |
41 Description of the patches: | 52 Description of the patches: |
42 | 53 |
43 - 0003-remove-static-initializers.patch | 54 - 0003-remove-static-initializers.patch |
44 | 55 |
45 This patch removes all static initializers from Chromium. The change in Status | 56 This patch removes all static initializers from Chromium. The change in Status |
46 class is not completely compatible with upstream, but it's compatible enough | 57 class is not completely compatible with upstream, but it's compatible enough |
47 to work in Chromium, which doesn't use this functionality yet. The work on | 58 to work in Chromium, which doesn't use this functionality yet. The work on |
48 upstreaming the removal of static initializers is in progress: | 59 upstreaming the removal of static initializers is in progress: |
49 https://github.com/google/protobuf/issues/1404 | 60 https://github.com/google/protobuf/issues/1404 |
(...skipping 19 matching lines...) Expand all Loading... |
69 | 80 |
70 These patches uninline some functions, resulting in a significant reduction | 81 These patches uninline some functions, resulting in a significant reduction |
71 (somewhere between 500 KB and 1 MB) of binary size. | 82 (somewhere between 500 KB and 1 MB) of binary size. |
72 | 83 |
73 - 0011-libprotobuf_export.patch | 84 - 0011-libprotobuf_export.patch |
74 | 85 |
75 During merge with internal branch, the dll export attribute was accidentally | 86 During merge with internal branch, the dll export attribute was accidentally |
76 removed in C++11 mode. | 87 removed in C++11 mode. |
77 | 88 |
78 Fixed in https://github.com/google/protobuf/pull/1549 | 89 Fixed in https://github.com/google/protobuf/pull/1549 |
| 90 |
| 91 - 0012-extract-globals.patch |
| 92 |
| 93 Fixes https://crbug.com/700120. Moves everything that would have |
| 94 gotten linked into .data or .bss sections into globals.cc so that |
| 95 Chromium may build a shared library containing just protobuf |
| 96 globals. Also prefixes every symbol with 'cr_' to avoid conflicting |
| 97 with symbols from the system protobuf. |
OLD | NEW |