Bug#755212: transition: protobuf-c
Robert Edmonds
edmonds at debian.org
Fri Jul 18 20:19:21 UTC 2014
Package: release.debian.org
Severity: normal
User: release.debian.org at packages.debian.org
Usertags: transition
Hello,
I am requesting an upload slot to upload protobuf-c 1.0.0-1 to unstable.
I am hoping to accomplish a transition to protobuf-c 1.0.0 in time for
the jessie release. (Disclaimer: I am also one of the protobuf-c
upstream maintainers.) This requires an ABI bump as well as some other
changes that affect reverse (build-) dependencies, described below.
protobuf-c 1.0.0~rc2-1 has been built successfully in experimental.
There are a few minor changes queued upstream for the final 1.0.0
release which I don't expect to cause issues.
Here is a proposed ben file for the transition:
title = "protobuf-c";
is_affected = .build-depends ~ /libprotobuf-c0-dev|protobuf-c-compiler/ | .depends ~ /libprotobuf-c-dev|libprotobuf-c1|libprotobuf-c1-dbg|libprotobuf-c0|libprotobuf-c0-dev|protobuf-c-compiler/;
is_good = .build-depends ~ /libprotobuf-c-dev/ | .depends ~ /libprotobuf-c-dev|libprotobuf-c1|libprotobuf-c1-dbg/;
is_bad = .build-depends ~ /libprotobuf-c0-dev/ | .depends ~ /libprotobuf-c0|libprotobuf-c0-dev/
protobuf-c is a C implementation of Protocol Buffers, a structured data
serialization format that is typically implemented in most programming
languages with a code generator.
In Debian, protobuf-c is split into several binary packages:
* The code generator utility (/usr/bin/protoc-c) which creates
.pb-c.c and .pb-c.h output files from a .proto input file. This
is shipped in the protobuf-c-compiler package.
Unlike other code generators that produce C code, like bison and
flex, the output of protoc-c is not usable by itself.
* The shared library (libprotobuf-c) which compiled .pb-c.c files
must be linked against. This is shipped in the libprotobuf-c0
package (protobuf-c < 1.0.0), or the libprotobuf-c1 package
(protobuf-c >= 1.0.0).
* The header file (protobuf-c.h) which compiled .pb-c.h files must
include. This is shipped in the libprotobuf-c0-dev package
(protobuf-c < 1.0.0), or the libprotobuf-c-dev package (protobuf-c
>= 1.0.0). (libprotobuf-c-dev Provides: libprotobuf-c0-dev, which
smoothes the transition for packages with an unversioned
build-dependency on libprotobuf-c0-dev.)
In the past, protobuf-c has had issues with unannounced ABI/API changes,
so for the protobuf-c 1.0.0 release we are explicitly adopting Semantic
Versioning and have added version guard macros to the header file to
prevent incompatible version skew between protoc-c and protobuf-c.h. We
have also started versioning the symbols exported by the library. For
more details, see the Versioning section in the README:
https://github.com/protobuf-c/protobuf-c#versioning
Because of the relationships between protoc-c, libprotobuf-c, and
protobuf-c.h, and the (previously) less clear versioning situation,
there are some gotchas that can occur:
* Projects utilizing the output of protoc-c might ship generated
copies of the .pb-c.c and .pb-c.h files in their distribution
tarballs. These files should always be regenerated with the
system's copy of protoc-c. Searching source packages for
filenames ending in ".pb-c.c" or ".pb-c.h" can identify candidates
where this may have occurred.
* Projects shipping a shared library might export symbols from C
files that were generated by protoc-c, which introduces a
dependency on a specific major version of libprotobuf-c. Clients
of such libraries cannot use these symbols with another
libprotobuf-c major version. Searching the symbol tables of
libraries for exported symbols whose names end in "__descriptor"
or "__pack_to_buffer" can identify candidates where this has
occurred.
* Projects may include generated .pb-c.h files in /usr/include,
which introduces a versioned dependency between clients of such a
project and the protobuf-c.h header. E.g., if a project ships a
.pb-c.h file in /usr/include which was generated by protoc-c from
protobuf-c < 1.0.0, clients of such a project attempting to import
such a header file will FTBFS when building against protobuf-c.h
from protobuf-c >= 1.0.0. Searching binary packages for filenames
ending in .pb-c.h under /usr/include will identify candidates
where this has occurred. (If possible, I recommend instead
shipping the original .proto definition file, perhaps in /usr/share,
to allow clients to build the .pb-c.c and .pb-c.h files with the
system's copy of protoc-c.)
I've researched the packages in the Debian archive which make use of
protobuf-c to some degree and detail my findings below. The summary is:
Package Disposition
-------------------------------
collectd BinNMU possible
criu BinNMU possible
libgadu Sourceful changes required
navit Embedded copy of libprotobuf-c
osm2pgsql Sourceful changes required
riemann-c-client BinNMU possible
Here are the details for each package:
collectd
--------
Rebuilt by hand successfully against protobuf-c 1.0.0~rc2-1 from
experimental.
Has an unversioned build dependency on libprotobuf-c0-dev. This
needs to be updated to libprotobuf-c-dev eventually, but is binNMU
safe.
Has a build dependency on protobuf-c-compiler and runs protoc-c
during the build.
No protoc-c generated symbols are exported by libcollectdclient1.
The collectd-dev package exports the following header files
generated by protoc-c:
/usr/include/collectd/core/pinba.pb-c.h
/usr/include/collectd/core/riemann.pb-c.h
However, I have not found any packages in the Debian archive which
utilize these files. I would recommend that the upstream developers
ship .proto files instead.
criu
----
Rebuilt by hand successfully against protobuf-c 1.0.0~rc2-1 from
experimental.
Has an unversioned build dependency on libprotobuf-c0-dev. This
needs to be updated to libprotobuf-c-dev eventually, but is binNMU
safe.
Has a build dependency on protobuf-c-compiler and runs protoc-c
during the build.
The 'criu' binary package ships a shared library which exports
symbols generated by protoc-c. However, there are no header files
with prototypes for these symbols, and no packages in the Debian
archive appear to make use of these symbols or even link against
this library.
libgadu
-------
Has a build dependency on protobuf-c-compiler and uses the system's
protoc-c during the build, but it uses an embedded copy of
libprotobuf-c from protobuf-c < 1.0.0. This will cause breakage if
libgadu is rebuilt against protobuf-c-compiler >= 1.0.0.
Adding libprotobuf-c-dev to the build-deps will disable the embedded
libprotobuf-c copy.
No protoc-c generated symbols are exported by libgadu3.
I have attached a patch (libgadu.patch) showing the needed changes.
navit
-----
This package has no (build-) dependencies on any of the packages
provided by protobuf-c. It has an embedded copy of libprotobuf-c
which is used unconditionally and it appears the upstream developer
updates the generated .pb-c.c and .pb-c.h files by hand.
This package is not affected by a protobuf-c transition but the
embedded code copy is a concern.
osm2pgsql
---------
Has a too-strict upstream build system check that will cause a FTBFS
if the current version is binNMU'd. See the following bug in the
upstream issue tracker:
https://github.com/openstreetmap/osm2pgsql/issues/129
The build system fix is the first hunk in this commit:
https://github.com/openstreetmap/osm2pgsql/commit/8c7c6dbb319e97715b174edd081303174c96b03b.patch
There are additional changes needed due to API changes in protobuf-c
>= 1.0.0 which have not yet been fixed upstream.
Has a build-dep on protobuf-c-compiler and runs protoc-c during the
build.
Has a versioned build-dep on libprotobuf-c0-dev. This needs to be
updated to an unversioned build-dep on libprotobuf-c-dev.
I have attached a patch (osm2pgsql.patch) showing the needed
changes.
riemann-c-client
----------------
Rebuilt by hand successfully against protobuf-c 1.0.0~rc2-1 from
experimental.
Has an unversioned build dependency on libprotobuf-c0-dev. This
needs to be updated to libprotobuf-c-dev eventually.
Has a build dependency on protobuf-c-compiler and runs protoc-c
during the build.
No protoc-c generated symbols are exported by libriemann-client0.
The libriemann-client-dev package exports the following header files
generated by protoc-c:
/usr/include/riemann/proto/riemann.pb-c.h
However, I have not found any packages in the Debian archive which
utilize this file. I would recommend that the upstream developers
ship a .proto file instead.
Thanks!
--
Robert Edmonds
edmonds at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libgadu.patch
Type: text/x-diff
Size: 1196 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20140718/6d79a5e7/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osm2pgsql.patch
Type: text/x-diff
Size: 2504 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20140718/6d79a5e7/attachment-0001.patch>
More information about the Pkg-grass-devel
mailing list