Source: protobuf
Version: 3.12.4-1
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap
Control: block -1 by 981014
protobuf participates in dependency loops relevant to architecture
bootstrap. I noticed that protobuf's Build-Depends are well organized.
Thank you! There is not much room for trimming them, but using build
profiles one can cut certain cycles. The most useful profile likely is
nocheck. Beyond that, I'm proposing profiles nopython and noruby. Please
consider applying the attached patch. Note that #981014 needs to before
you can ship the nopython and noruby profiles.
Helmut
diff --minimal -Nru protobuf-3.12.4/debian/changelog
protobuf-3.12.4/debian/changelog
--- protobuf-3.12.4/debian/changelog2021-01-16 23:12:54.0 +0100
+++ protobuf-3.12.4/debian/changelog2021-01-25 14:24:12.0 +0100
@@ -1,3 +1,10 @@
+protobuf (3.12.4-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Support build profiles nocheck, nopython and noruby. (Closes: #-1)
+
+ -- Helmut Grohne Mon, 25 Jan 2021 14:24:12 +0100
+
protobuf (3.12.4-1) unstable; urgency=medium
* New upstream release.
diff --minimal -Nru protobuf-3.12.4/debian/control
protobuf-3.12.4/debian/control
--- protobuf-3.12.4/debian/control 2021-01-16 23:12:54.0 +0100
+++ protobuf-3.12.4/debian/control 2021-01-25 14:24:12.0 +0100
@@ -8,21 +8,22 @@
, dh-elpa
# C/C++
, zlib1g-dev
- , libgmock-dev
- , libgtest-dev
+ , libgmock-dev
+ , libgtest-dev
# Python
- , dh-python
- , python3-all:any
- , libpython3-all-dev
- , python3-setuptools
- , python3-six
+ , dh-python
+ , dh-sequence-python3
+ , python3-all:any
+ , libpython3-all-dev
+ , python3-setuptools
+ , python3-six
# Manpage generator
, xmlto
# Tests
- , unzip
+ , unzip
# Ruby
- , rake-compiler
- , gem2deb
+ , rake-compiler
+ , gem2deb
Build-Depends-Indep:
# Java
ant
@@ -41,6 +42,7 @@
Package: ruby-google-protobuf
Architecture: any
Multi-Arch: same
+Build-Profiles:
Section: ruby
X-DhRuby-Root: ruby
XB-Ruby-Versions: ${ruby:Versions}
@@ -191,6 +193,7 @@
Package: python3-protobuf
Architecture: any
+Build-Profiles:
Section: python
Depends: ${shlibs:Depends}, ${python3:Depends}, ${misc:Depends}
Description: Python 3 bindings for protocol buffers
diff --minimal -Nru protobuf-3.12.4/debian/rules protobuf-3.12.4/debian/rules
--- protobuf-3.12.4/debian/rules2021-01-16 23:12:54.0 +0100
+++ protobuf-3.12.4/debian/rules2021-01-25 14:24:06.0 +0100
@@ -21,7 +21,7 @@
API_VERSION=$(SONAME)-0
%:
- dh $@ --with autoreconf,elpa,python3
+ dh $@ --with autoreconf,elpa
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
override_dh_auto_configure:
@@ -57,14 +57,18 @@
# Generate the manpage
xmlto man debian/protoc.xml
+ifeq (,$(filter nopython,$(DEB_BUILD_PROFILES)))
# Python3 build
cp -rv python python3
set -e; cd python3 && for pv in $(shell py3versions -vr); do \
$(PYTHON_CROSS_VARS) python$$pv setup.py build
--cpp_implementation; \
done
+endif
+ifeq (,$(filter noruby,$(DEB_BUILD_PROFILES)))
# Ruby build
cd ruby && rake package genproto
+endif
override_dh_auto_build-indep:
dh_auto_build --indep
@@ -74,7 +78,9 @@
override_dh_clean:
$(RM) -rv gmock
+ifeq (,$(filter noruby,$(DEB_BUILD_PROFILES)))
cd ruby && rake clobber
+endif
dh_clean
$(RM) config.h config.log config.status
$(RM) *.pc
@@ -94,7 +100,7 @@
override_dh_auto_test-arch:
dh_auto_test --arch
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))$(filter
nopython,$(DEB_BUILD_PROFILES)))
# Python3 test
set -e; \
export LD_LIBRARY_PATH=$(CURDIR)/src/.libs; \
@@ -122,6 +128,7 @@
override_dh_auto_install-arch:
dh_auto_install --arch
+ifeq (,$(filter nopython,$(DEB_BUILD_PROFILES)))
# Python3 install
set -e; \
cd python3 && for pv in $(shell py3versions -vr); do \
@@ -130,13 +137,16 @@
--root=$(CURDIR)/debian/python3-protobuf; \
done
find $(CURDIR)/debian/python3-protobuf -name 'protobuf-*-nspkg.pth'
-delete
+endif
+ifeq (,$(filter noruby,$(DEB_BUILD_PROFILES)))
# Ruby install
sed 's|ext/|ruby/ext/|' $(CURDIR)/ruby/google-protobuf.gemspec \
>$(CURDIR)/google-protobuf.gemspec
dh_auto_install -O--buildsystem=ruby -O--package=ruby-google-protobuf
--destdir=$(CURDIR)/debian/ruby-google-protobuf
find $(CURDIR)/debian/ruby-google-protobuf/usr/lib/ \
-name well_known_types.rb -exec chmod a+x {} \;
+endif
override_dh_auto_install-indep:
dh_auto_install --indep