Source: protobuf
Version: 3.12.4-1
Tags: patch
User: [email protected]
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/changelog    2021-01-16 23:12:54.000000000 +0100
+++ protobuf-3.12.4/debian/changelog    2021-01-25 14:24:12.000000000 +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 <[email protected]>  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.000000000 +0100
+++ protobuf-3.12.4/debian/control      2021-01-25 14:24:12.000000000 +0100
@@ -8,21 +8,22 @@
  , dh-elpa
 # C/C++
  , zlib1g-dev
- , libgmock-dev
- , libgtest-dev
+ , libgmock-dev <!nocheck>
+ , libgtest-dev <!nocheck>
 # Python
- , dh-python
- , python3-all:any
- , libpython3-all-dev
- , python3-setuptools
- , python3-six
+ , dh-python <!nopython>
+ , dh-sequence-python3 <!nopython>
+ , python3-all:any <!nopython>
+ , libpython3-all-dev <!nopython>
+ , python3-setuptools <!nopython>
+ , python3-six <!nopython>
 # Manpage generator
  , xmlto
 # Tests
- , unzip
+ , unzip <!nocheck>
 # Ruby
- , rake-compiler
- , gem2deb
+ , rake-compiler <!noruby>
+ , gem2deb <!noruby>
 Build-Depends-Indep:
 # Java
    ant
@@ -41,6 +42,7 @@
 Package: ruby-google-protobuf
 Architecture: any
 Multi-Arch: same
+Build-Profiles: <!noruby>
 Section: ruby
 X-DhRuby-Root: ruby
 XB-Ruby-Versions: ${ruby:Versions}
@@ -191,6 +193,7 @@
 
 Package: python3-protobuf
 Architecture: any
+Build-Profiles: <!nopython>
 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/rules        2021-01-16 23:12:54.000000000 +0100
+++ protobuf-3.12.4/debian/rules        2021-01-25 14:24:06.000000000 +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

Reply via email to