2015-10-08 00:17:08 +00:00
|
|
|
Name: Protocol Buffers
|
|
|
|
Short Name: protobuf
|
2016-07-31 20:44:31 +00:00
|
|
|
URL: https://github.com/google/protobuf
|
2015-10-08 00:17:08 +00:00
|
|
|
License: BSD
|
2016-07-31 20:44:31 +00:00
|
|
|
License File: LICENSE
|
2018-05-05 00:30:16 +00:00
|
|
|
Version: 3.3.0
|
|
|
|
Revision: 040f56e61b379e92dfdf107b12244a7580f60823
|
2015-10-08 00:17:08 +00:00
|
|
|
Security Critical: yes
|
|
|
|
|
2016-07-31 20:44:31 +00:00
|
|
|
Steps used to create the current version:
|
|
|
|
1. Pull the release from https://github.com/google/protobuf/releases
|
2018-05-05 00:30:16 +00:00
|
|
|
2. Add build files (BUILD.gn, proto_library.gni).
|
2015-10-08 00:17:08 +00:00
|
|
|
|
2016-07-31 20:44:31 +00:00
|
|
|
Be sure to update the list of source files, as additional .cc files and
|
|
|
|
headers might have been added -- you need to find the transitive closure of
|
|
|
|
include files required by targets.
|
2015-10-08 00:17:08 +00:00
|
|
|
|
2016-07-31 20:44:31 +00:00
|
|
|
Other things to care about are defines required by protobuf on various
|
|
|
|
platforms, warnings generated by compilers, and new dependencies introduced.
|
2018-05-05 00:30:16 +00:00
|
|
|
3. Add DEPS and OWNERS.
|
|
|
|
4. Add mirclient.cc and mirclient.map.
|
|
|
|
5. Get open-source library six.py from https://pypi.python.org/pypi/six/ and add
|
2016-07-31 20:44:31 +00:00
|
|
|
it to protobuf/third_party/six/six.py.
|
2018-05-05 00:30:16 +00:00
|
|
|
6. Apply patches in patches/ (see the description below):
|
2015-10-08 00:17:08 +00:00
|
|
|
|
2016-07-31 20:44:31 +00:00
|
|
|
$ for patch in patches/*; do patch -s -p1 < $patch; done
|
2015-10-08 00:17:08 +00:00
|
|
|
|
2016-07-31 20:44:31 +00:00
|
|
|
For future releases, it will be worth looking into which patches still need
|
2018-05-05 00:30:16 +00:00
|
|
|
to be applied. In case of conflict, update those patches accordingly and save
|
|
|
|
them back in place (i.e. in patches directory).
|
|
|
|
7. Generate well_known_types_embed.cc and descriptor_pb2.py using something like
|
|
|
|
the following steps. Make sure you've regenerated your buildfiles and will
|
|
|
|
build js_embed then protoc from the newly-modified sources above.
|
2015-10-08 00:17:08 +00:00
|
|
|
|
2018-05-05 00:30:16 +00:00
|
|
|
$ cd $SRC_DIR
|
|
|
|
$ gn gen out/Debug
|
|
|
|
$ ninja -C out/Debug js_embed
|
|
|
|
$ cd third_party/protobuf/src/google/protobuf/compiler/js
|
|
|
|
$ $SRC_DIR/out/Debug/js_embed \
|
|
|
|
./well_known_types/any.js ./well_known_types/struct.js \
|
|
|
|
./well_known_types/timestamp.js > well_known_types_embed.cc
|
2016-07-31 20:44:31 +00:00
|
|
|
$ cd $SRC_DIR
|
|
|
|
$ ninja -C out/Debug protoc
|
|
|
|
$ cd third_party/protobuf/src
|
2018-05-05 00:30:16 +00:00
|
|
|
$ $SRC_DIR/out/Debug/protoc --python_out=../python google/protobuf/descriptor.proto
|
2015-10-08 00:17:08 +00:00
|
|
|
|
2018-05-05 00:30:16 +00:00
|
|
|
8. Add an __init__.py to protobuf/ that adds third_party/six/ to Python path.
|
|
|
|
9. Update README.chromium.
|
2015-10-08 00:17:08 +00:00
|
|
|
|
2018-05-05 00:30:16 +00:00
|
|
|
Note about libmirclient:
|
2015-10-08 00:17:08 +00:00
|
|
|
|
2018-05-05 00:30:16 +00:00
|
|
|
On Ubuntu, Chromium has an indirect dependency on the system
|
|
|
|
libprotobuf-lite through libmirclient (through GTK). The symbols in
|
|
|
|
the system library conflict with Chromium's libprotobuf-lite used on
|
|
|
|
component builds.
|
2016-07-31 20:44:31 +00:00
|
|
|
|
2018-05-05 00:30:16 +00:00
|
|
|
mirclient.* are added to stub out libmirclient.so.9 to prevent loading
|
|
|
|
the system libprotobuf-lite. Chromium's replacement libmirclient will
|
|
|
|
get loaded, but its symbols will never be used directly or indirectly.
|
2016-07-31 20:44:31 +00:00
|
|
|
|
2018-05-05 00:30:16 +00:00
|
|
|
Description of the patches:
|
2016-07-31 20:44:31 +00:00
|
|
|
|
|
|
|
- 0003-remove-static-initializers.patch
|
|
|
|
|
|
|
|
This patch removes all static initializers from Chromium. The change in Status
|
|
|
|
class is not completely compatible with upstream, but it's compatible enough
|
|
|
|
to work in Chromium, which doesn't use this functionality yet. The work on
|
|
|
|
upstreaming the removal of static initializers is in progress:
|
|
|
|
https://github.com/google/protobuf/issues/1404
|
|
|
|
|
|
|
|
- 0004-fix-integer-types-and-shared-library-exports.patch
|
|
|
|
|
|
|
|
This patch makes protobuf int64 to be int64_t (as opposed to long long in
|
|
|
|
upstream), and similarly for other integer types. It also allows exporting
|
|
|
|
protobuf symbols in Linux .so libraries, so that protobuf can be built as a
|
|
|
|
component (see http://crrev.com/179806).
|
|
|
|
|
|
|
|
- 0007-uninline_googleonce.patch
|
|
|
|
- 0008-uninline_get_empty_string.patch
|
|
|
|
- 0009-uninline-arenastring.patch
|
|
|
|
- 0010-uninline-generated-code.patch
|
|
|
|
|
|
|
|
These patches uninline some functions, resulting in a significant reduction
|
|
|
|
(somewhere between 500 KB and 1 MB) of binary size.
|
|
|
|
|
2018-05-05 00:30:16 +00:00
|
|
|
- 0012-fixes-for-js-embed-cc.patch
|
2016-07-31 20:44:31 +00:00
|
|
|
|
|
|
|
Fixed in https://github.com/google/protobuf/pull/1549
|
2018-05-05 00:30:16 +00:00
|
|
|
|
|
|
|
- 0013-fixes-expansion-to-defined.patch
|
|
|
|
|
|
|
|
Fixes a macro whose expansion has a defined() in it. This is
|
|
|
|
results in undefined behavior and some compilers will warn/error
|
|
|
|
when seeing this.
|
|
|
|
|
|
|
|
- 0014-truncate-uint8-constants.patch
|
|
|
|
|
|
|
|
Fixed upstream in CL 161573822
|
|
|
|
|
|
|
|
- 0015-fixes-forcing-value-to-bool.patch
|
|
|
|
|
|
|
|
Fixes an MSVC error that forbids conversion from int to bool. Needs
|
|
|
|
to be upstreamed.
|
|
|
|
|
|
|
|
- 0014-truncate-uint8-constants.patch
|
|
|
|
|
|
|
|
Fixed upstream in CL 163270735
|
|
|
|
|
|
|
|
- 0017-constexpr-for-vs-2017.patch
|
|
|
|
|
|
|
|
Define PROTOBUF_CONSTEXPR_VAR as constexpr for VS 2017, also landed upstream
|
|
|
|
as https://github.com/google/protobuf/commit/210be267fd81d5aafdc049d197d57cb45b75f3ba
|
|
|
|
|
|
|
|
- 0018-fallthrough.patch
|
|
|
|
|
|
|
|
Cherry-picks upstream https://github.com/google/protobuf/commit/b8e47830d
|
|
|
|
|
|
|
|
- 0019-rename-a-shadowed-variable.patch
|
|
|
|
|
|
|
|
Cherry-picks upstream https://github.com/google/protobuf/commit/af3813cd7
|
|
|
|
|
|
|
|
- 0020-Add-support-for-libc-on-Windows.patch
|
|
|
|
|
|
|
|
Cherry-picks upstream https://github.com/google/protobuf/commit/3ba21cd5f
|