Bug#869952: [pkg-db-devel] Bug#869952: db5.3: Update bootstrapping code to build profile

2017-08-01 Thread Daniel Schepler
On Sat, Jul 29, 2017 at 1:11 PM, Ondřej Surý  wrote:
> Hi Daniel,
>
> patch would be very much appreciated.

OK, here it is.
-- 
Daniel Schepler
diff -urN db5.3-5.3.28.old/debian/changelog db5.3-5.3.28/debian/changelog
--- db5.3-5.3.28.old/debian/changelog   2017-07-13 00:09:25.0 -0700
+++ db5.3-5.3.28/debian/changelog   2017-07-30 19:46:23.951717441 -0700
@@ -1,3 +1,9 @@
+db5.3 (5.3.28-13.0.1) UNRELEASED; urgency=medium
+
+  * Convert bootstrapping support to stage1 build profile (Closes: #869952)
+
+ -- Daniel Schepler   Sun, 30 Jul 2017 19:46:01 -0700
+
 db5.3 (5.3.28-13) unstable; urgency=medium
 
   * Use https url for Vcs-Browser
diff -urN db5.3-5.3.28.old/debian/control db5.3-5.3.28/debian/control
--- db5.3-5.3.28.old/debian/control 2017-07-13 00:09:25.0 -0700
+++ db5.3-5.3.28/debian/control 2017-07-30 19:38:28.063677656 -0700
@@ -10,10 +10,10 @@
 Build-Depends: debhelper (>= 10),
   autotools-dev,
   dh-autoreconf,
-  tcl-dev,
-  procps [!hurd-i386],
-  javahelper [!m68k],
-  default-jdk [!m68k]
+  tcl-dev ,
+  procps [!hurd-i386] ,
+  javahelper [!m68k] ,
+  default-jdk [!m68k] 
 Homepage: 
http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html
 Vcs-Browser: https://anonscm.debian.org/git/pkg-db/db5.3.git
 Vcs-Git: git://anonscm.debian.org/pkg-db/db5.3.git
@@ -111,6 +111,7 @@
 
 Package: libdb5.3-tcl
 Architecture: any
+Build-Profiles: 
 Section: interpreters
 Priority: extra
 Multi-Arch: same
@@ -136,6 +137,7 @@
 
 Package: libdb5.3-java-jni
 Architecture: any
+Build-Profiles: 
 Section: java
 Priority: optional
 Depends: ${shlibs:Depends},
@@ -150,6 +152,7 @@
 
 Package: libdb5.3-java
 Architecture: all
+Build-Profiles: 
 Section: java
 Priority: optional
 Depends: libdb5.3-java-jni (>= ${source:Version}),
@@ -165,6 +168,7 @@
 Architecture: any
 Section: libdevel
 Priority: optional
+Build-Profiles: 
 Depends: libdb5.3-java (= ${source:Version}),
 ${shlibs:Depends},
 ${misc:Depends}
diff -urN db5.3-5.3.28.old/debian/rules db5.3-5.3.28/debian/rules
--- db5.3-5.3.28.old/debian/rules   2017-07-13 00:09:25.0 -0700
+++ db5.3-5.3.28/debian/rules   2017-07-30 20:46:30.353714836 -0700
@@ -24,9 +24,11 @@
 
 ifeq (,$(filter $(DEB_HOST_ARCH), $(JAVA_BROKEN_ARCHS)))
   ENABLE_JAVA=yes
+else
+  DH_OPTIONS += -Nlibdb5.3-java -Nlibdb5.3-java-dev -Nlibdb5.3-java-jni
 endif
 
-ifeq ($(DEB_STAGE),stage1)
+ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
   ENABLE_JAVA=no
   ENABLE_TCL=no
 else
@@ -55,7 +57,6 @@
 else
   ENABLE_TESTS=no
   CONFIGURE_SWITCHES += --disable-tcl
-  DH_OPTIONS += -Nlibdb5.1-tcl
 endif
 
 ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
@@ -87,11 +88,10 @@
 DH_PLUGINS += --with=javahelper
 else
 CONFIGURE_SWITCHES += --disable-java
-DH_OPTIONS += -Nlibdb5.3-java -Nlibdb5.3-java-dev -Nlibdb5.3-java-jni
 endif
 
 ifeq (no,$(ENABLE_SQL))
-DH_OPTIONS += -Nlibdb5.1-sql
+DH_OPTIONS += -Nlibdb5.3-sql
   CONFIGURE_SWITCHES += --disable-sql
 endif
 
@@ -138,7 +138,7 @@
cd dist && libtoolize -cfi
cd lang/sql/sqlite && libtoolize -cfi
cd dist && ./s_config
-ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))$(filter 
stage1,$(DEB_BUILD_PROFILES)))
JAVACFLAGS="$(JAVACFLAGS)" dh_auto_configure -Ddist -Bbuild-test -- 
$(CONFIGURE_SWITCHES) --enable-test
 endif
JAVACFLAGS="$(JAVACFLAGS)" dh_auto_configure -Ddist -Bbuild-production 
-- $(CONFIGURE_SWITCHES) --disable-test
@@ -166,6 +166,7 @@
 override_dh_auto_test:
 ifeq (,$(findstring z$(DEB_BUILD_GNU_CPU)z,$(VERY_BROKEN_CPUS))$(findstring 
z$(DEB_BUILD_GNU_SYSTEM)z,$(VERY_BROKEN_SYSTEMS)))
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
cd build-test && make cutest && ./cutest
echo 'source ../test/tcl/test.tcl; run_std;' | tclsh
 
@@ -176,6 +177,9 @@
grep ^FAIL build-test/ALL.OUT || true
 endif
 else
+# Testsuite has been disabled by DEB_BUILD_PROFILES=$(DEB_BUILD_PROFILES)
+endif
+else
 # Testsuite has been disabled by DEB_BUILD_OPTIONS=$(DEB_BUILD_OPTIONS)
 endif
 else
@@ -209,7 +213,7 @@
 
echo -n "Berkeley DB signature is:"; $(CURDIR)/debian/db_signature
 
-ifneq ($(DEB_STAGE),stage1)
+ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
if [ -f $(CURDIR)/debian/saved_signature_$(DEB_HOST_ARCH).txt ]; then \
cmp $(CURDIR)/debian/saved_signature_$(DEB_HOST_ARCH).txt \
$(CURDIR)/debian/build_signature_$(DEB_HOST_ARCH).txt \


Bug#869952: [pkg-db-devel] Bug#869952: db5.3: Update bootstrapping code to build profile

2017-07-29 Thread Ondřej Surý
Hi Daniel,

patch would be very much appreciated.

Cheers,
-- 
Ondřej Surý 
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
Knot Resolver (https://www.knot-resolver.cz/) – secure, privacy-aware,
fast DNS(SEC) resolver
Vše pro chleba (https://vseprochleba.cz) – Mouky ze mlýna a potřeby pro
pečení chleba všeho druhu

On Fri, Jul 28, 2017, at 00:46, Daniel Schepler wrote:
> Source: db5.3
> Version: 5.3.28-13
> Severity: wishlist
> 
> It would be great if the next upload could update the DEB_STAGE=stage1
> support to support it as a build profile, i.e. support
> DEB_BUILD_PROFILES=stage1 and update the Build-Depends to something
> like:
> 
> Build-Depends: debhelper (>= 10),
>autotools-dev,
>dh-autoreconf,
>tcl-dev ,
>procps [!hurd-i386] ,
>javahelper [!m68k] ,
>default-jdk [!m68k] 
> 
> And also update the package stanzas for libdb5.3-java,
> libdb5.3-java-dev, libdb5.3-java-jni, libdb5.3-tcl in debian/control
> to include "Build-Profiles: ".
> 
> I should be able to write a patch for this if you want.
> -- 
> Daniel Schepler
> 
> ___
> pkg-db-devel mailing list
> pkg-db-de...@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-db-devel