Bug#758466: [libproxy] Allow bootstrapping a minimal usable libproxy package set
Peter Pentchev
roam at ringlet.net
Sun Aug 17 19:04:24 UTC 2014
Source: libproxy
Version: 0.4.11-4
Severity: wishlist
Tags: patch
Hi,
Thanks for taking care of libproxy in Debian!
As part of this year's "Bootstrappable Debian" Google Summer of Code
project I took a look at libproxy to break a circular build dependency
as noted in the "Feedback Arc Set" section of
http://bootstrap.debian.net/amd64/ and, more specifically, at
http://bootstrap.debian.net/source/libproxy.html and the
version-specific pages linked from it. There are two primary goals to
my work on this GSoC project:
- The first goal is to modify some packages so that they may be built in
some limited way ("nocheck", binary-only, or build profiles like
"stage1") without some of their usual build dependencies. In most
cases this is caused by one or more dependency loops between binary
and source packages, so that a source package requires for its
building, directly or indirectly, one of its own binary packages to be
already built. The modifications make the source build in a limited
fashion (not generating documentation, not running tests, not building
some of the binary packages) so that this may happen with only the
rest of the build dependencies, so Debian may be bootstrapped on a new
architecture starting from a very few cross-built toolchain packages
and then moving along, source package by source package.
- The second goal, which is actually closely related to the first, is
that in the process of modifications, any changes (some files not
regenerated, others not built at all) can be made with binary package
level granularity. This means that if a binary package is built at
all during a limited build, then it must have the same contents as the
same binary package resulting from a full build. The point here is to
avoid breakage if other packages in the archive depend on some
functionality provided by the omitted files; if so, it should be
obvious that the functionality is missing, and the clearest way to do
that is by omitting a full binary package or, rather, delaying its
build until the rest of the build dependencies are present.
The libproxy source package builds what I'd call a minimal usable set of
binary packages (a shared library, a development package for it, a
couple of support packages) and then another set of modules that allow
the core library to interface with various third-party packages.
Consequently, since some of those third-party packages use libproxy on
their own, this creates a lot of build dependency loops. So what do you
think about the attached patch that checks for a "stage1" build profile
specified in the DEB_BUILD_PROFILES variable and, if so, skips the build
of most of the libproxy modules, thus obviating the need for many of the
build dependencies?
In this iteration, one would also have to manually remove the offending
build dependencies from the control file; I will file another bug that
makes use of the new <profile.*> restriction and the new Build-Profiles
binary stanza header to make this completely automated. However, that
would have to wait for the actual introduction of build profile-aware
tools in the Debian archive infrastructure.
If anything should go wrong with the patch, it is also available at
https://gitorious.org/roam-debian-bootstrap/libproxy-debian/commits/roam-stage1-build
Thanks in advance for your time, and thanks for your work on Debian!
G'luck,
Peter
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
From b65915d4b632e36b3bfc585fe708e65e984c23bc Mon Sep 17 00:00:00 2001
From: Peter Pentchev <roam at ringlet.net>
Date: Sat, 2 Aug 2014 01:57:11 +0300
Subject: [PATCH 1/2] Break a couple of build dependency loops.
Several widely-used libraries depend on libproxy which, in its turn,
tries to build plug-ins to interface with the same widely-used libraries.
This creates several build dependency loops, as outlined on
http://bootstrap.debian.net/source/libproxy.html
and the versioned pages linked from that page.
This commit introduces a stage1 build profile that builds pretty much
only the base libproxy functionality so that the dependent libraries
may be built. Afterwards, a full build will also generate the plug-ins.
---
debian/control.in | 4 ++++
debian/rules | 35 +++++++++++++++++++++++++----------
2 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/debian/control.in b/debian/control.in
index e36f5e7..a9c838b 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -3,7 +3,11 @@ Section: libs
Priority: optional
Maintainer: Emilio Pozuelo Monfort <pochu at debian.org>
Uploaders: @GNOME_TEAM@
+# In the stage1 build profile, remove both cli-common-dev and mono-devel.
Build-Depends-Indep: cli-common-dev (>= 0.5.7~), mono-devel (>= 2.4.3)
+# In the stage1 build profile, remove libmozjs185-dev, kdelibs5-dev,
+# libqt4-dev, libwebkitgtk-3.0-dev, libjavascriptcoregtk-3.0-dev,
+# libglib2.0-dev, libxmu-dev.
Build-Depends: debhelper (>= 9),
gnome-pkg-tools,
netbase,
diff --git a/debian/rules b/debian/rules
index 1be67b7..ec42de8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,41 +10,56 @@ libproxy := $(shell sed -nr 's/^Package:[[:space:]]*(libproxy[0-9]+)[[:space:]]*
export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
# only invoke dh --with cli if cli-common-dev is present
-WITH_CLI = --with cli
-WITH_DOTNET = -DWITH_DOTNET=ON
-ifeq (,$(wildcard /usr/share/perl5/Debian/Debhelper/Sequence/cli.pm))
WITH_CLI =
WITH_DOTNET = -DWITH_DOTNET=OFF
+ifneq (,$(wildcard /usr/share/perl5/Debian/Debhelper/Sequence/cli.pm))
+ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
+WITH_CLI = --with cli
+WITH_DOTNET = -DWITH_DOTNET=ON
+endif
endif
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
CONFIGURE_FLAGS = $(WITH_DOTNET) \
-DWITH_VALA=ON \
- -DWITH_GNOME3=ON \
- -DWITH_MOZJS=ON \
- -DWITH_WEBKIT3=ON \
-DGMCS_EXECUTABLE=/usr/bin/mono-csc \
-DCMAKE_SKIP_RPATH=ON \
-DBIPR=0 \
-DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
-DLIBEXEC_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/libproxy/$(SHLIBVER)
+ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
+CONFIGURE_FLAGS += \
+ -DWITH_GNOME3=ON \
+ -DWITH_MOZJS=ON \
+ -DWITH_WEBKIT3=ON
+DH_EXCLUDE =
+else
+CONFIGURE_FLAGS += \
+ -DWITH_GNOME3=OFF \
+ -DWITH_MOZJS=OFF \
+ -DWITH_WEBKIT3=OFF
+DH_EXCLUDE = -Nlibproxy1-plugin-gsettings -Nlibproxy1-plugin-kconfig -Nlibproxy1-plugin-mozjs -Nlibproxy1-plugin-webkit -Nlibproxy0.4-cil -Nlibproxy-cil-dev
+endif
+
override_dh_auto_configure:
dh_auto_configure -- $(CONFIGURE_FLAGS)
override_dh_install-arch:
- dh_install
+ dh_install $(DH_EXCLUDE)
rm -f \
debian/libproxy-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/libproxy-sharp-*.pc
override_dh_install-indep:
- dh_install
+ dh_install $(DH_EXCLUDE)
+ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
sed -i 's!/usr/lib/mono/libproxy-sharp!/usr/lib/cli/libproxy-sharp-0.4!' \
debian/libproxy-cil-dev/usr/lib/pkgconfig/libproxy-sharp-1.0.pc
+endif
override_dh_makeshlibs:
- dh_makeshlibs -V '$(libproxy) (>= $(SHLIBVER))' -- -c4
+ dh_makeshlibs -V '$(libproxy) (>= $(SHLIBVER))' $(DH_EXCLUDE) -- -c4
%:
- dh $@ $(WITH_CLI) --with python2
+ dh $@ $(WITH_CLI) --with python2 $(DH_EXCLUDE)
--
2.1.0.rc1
-------------- next part --------------
From ca711b094dced83678dc784f354f4d11ac9686ca Mon Sep 17 00:00:00 2001
From: Peter Pentchev <roam at ringlet.net>
Date: Sat, 2 Aug 2014 02:00:21 +0300
Subject: [PATCH 2/2] Regenerate the control file.
---
debian/control | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/debian/control b/debian/control
index cc432f1..380c958 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,11 @@ Section: libs
Priority: optional
Maintainer: Emilio Pozuelo Monfort <pochu at debian.org>
Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers at lists.alioth.debian.org>, Laurent Bigonville <bigon at debian.org>
+# In the stage1 build profile, remove both cli-common-dev and mono-devel.
Build-Depends-Indep: cli-common-dev (>= 0.5.7~), mono-devel (>= 2.4.3)
+# In the stage1 build profile, remove libmozjs185-dev, kdelibs5-dev,
+# libqt4-dev, libwebkitgtk-3.0-dev, libjavascriptcoregtk-3.0-dev,
+# libglib2.0-dev, libxmu-dev.
Build-Depends: debhelper (>= 9),
gnome-pkg-tools,
netbase,
--
2.1.0.rc1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20140817/1857d14f/attachment.sig>
More information about the pkg-gnome-maintainers
mailing list