Bug#737954: bzip2: Patch to bootstrap without multilib

2014-05-11 Thread Helmut Grohne
user helm...@debian.org
usertags 737954 + rebootstrap
thanks

On Fri, Feb 07, 2014 at 12:06:41AM -0800, Daniel Schepler wrote:
> As the subject says: the attached patch allows for bootstrapping bzip2 in an 
> early stage when multilib compilers and libraries are not yet available.

I'd like to propose a different patch for the following reasons:
 * There is no technical need for a stage1. Going multilib directly is
   possible in theory. Nevertheless being able to build without multilib
   is both useful in a bootstrap and potentially native builds.
 * The build profile spec[1] is now about to be finalized and support is
   available in dpkg, apt, python-apt, sbuild and others.

Therefore, please consider the attached patch.

It is actively being tested at
https://jenkins.debian.net/view/rebootstrap/.

Helmut

[1] https://wiki.debian.org/BuildProfileSpec
diff -Nru bzip2-1.0.6/debian/changelog bzip2-1.0.6/debian/changelog
--- bzip2-1.0.6/debian/changelog2013-08-13 00:18:27.0 +0200
+++ bzip2-1.0.6/debian/changelog2014-05-10 11:01:25.0 +0200
@@ -1,3 +1,10 @@
+bzip2 (1.0.6-5.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Support nobiarch build profile. (Closes: #737954)
+
+ -- Helmut Grohne   Sat, 10 May 2014 11:01:05 +0200
+
 bzip2 (1.0.6-5) unstable; urgency=low
 
   * Adding watch file
diff -Nru bzip2-1.0.6/debian/control bzip2-1.0.6/debian/control
--- bzip2-1.0.6/debian/control  2013-08-13 00:18:27.0 +0200
+++ bzip2-1.0.6/debian/control  2014-05-10 10:57:54.0 +0200
@@ -4,7 +4,7 @@
 Maintainer: Anibal Monsalve Salazar 
 Uploaders: Santiago Ruano Rincón , Jorge Ernesto Guevara 
Cuenca 
 Standards-Version: 3.9.4
-Build-depends: texinfo, gcc-multilib [amd64 i386 kfreebsd-amd64 powerpc ppc64 
s390 sparc] | gcc-4.1 (<< 4.1.2) [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 
sparc], dpkg-dev (>= 1.16.0)
+Build-depends: texinfo, gcc-multilib [amd64 i386 kfreebsd-amd64 powerpc ppc64 
s390 sparc]  | gcc-4.1 (<< 4.1.2) [amd64 i386 kfreebsd-amd64 
powerpc ppc64 s390 sparc], dpkg-dev (>= 1.16.0)
 Homepage: http://www.bzip.org/
 Vcs-Git: git://git.debian.org/collab-maint/bzip2.git
 Vcs-Browser: http://git.debian.org/?p=collab-maint/bzip2.git
@@ -86,6 +86,7 @@
 Architecture: i386 powerpc sparc s390
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Replaces: amd64-libs (<< 1.5)
+Build-Profiles: !nobiarch
 Description: high-quality block-sorting file compressor library - 64bit runtime
  This package contains the libbzip2 64bit runtime library.
 
@@ -95,6 +96,7 @@
 Replaces: amd64-libs-dev (<< 1.5)
 Architecture: i386 powerpc sparc s390
 Depends: lib64bz2-1.0 (=${binary:Version}), libbz2-dev (=${binary:Version}), 
${dev:Depends}
+Build-Profiles: !nobiarch
 Description: high-quality block-sorting file compressor library - 64bit 
development
  Static libraries and include files for the bzip2 compressor library (64bit).
 
@@ -105,6 +107,7 @@
 Pre-Depends: libc6-i386 (>= 2.9-18) [amd64]
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Replaces: ia32-libs
+Build-Profiles: !nobiarch
 Description: high-quality block-sorting file compressor library - 32bit runtime
  This package contains the libbzip2 32bit runtime library.
 
@@ -114,6 +117,7 @@
 Architecture: amd64 ppc64
 Depends: lib32bz2-1.0 (=${binary:Version}), libbz2-dev (=${binary:Version}), 
${dev:Depends}
 Replaces: ia32-libs-dev
+Build-Profiles: !nobiarch
 Description: high-quality block-sorting file compressor library - 32bit 
development
  Static libraries and include files for the bzip2 compressor library (32bit).
 
diff -Nru bzip2-1.0.6/debian/rules bzip2-1.0.6/debian/rules
--- bzip2-1.0.6/debian/rules2013-08-13 00:18:27.0 +0200
+++ bzip2-1.0.6/debian/rules2014-05-10 11:00:56.0 +0200
@@ -52,6 +52,11 @@
lib32 := usr/lib32
 endif
 
+ifneq ($(filter nobiarch,$(DEB_BUILD_PROFILES)),)
+build64-stamp :=
+build32-stamp :=
+endif
+
 build-arch: build
 build-indep: build
 build: build-stamp $(build32-stamp) $(build64-stamp)


Bug#737954: bzip2: Patch to bootstrap without multilib

2014-02-07 Thread Daniel Schepler
Source: bzip2
Version: 1.0.6-5
Severity: wishlist
Tags: patch

As the subject says: the attached patch allows for bootstrapping bzip2 in an 
early stage when multilib compilers and libraries are not yet available.
-- 
Daniel Schepler
diff -urN bzip2-1.0.6.old/debian/rules bzip2-1.0.6/debian/rules
--- bzip2-1.0.6.old/debian/rules	2012-06-03 02:16:31.0 -0700
+++ bzip2-1.0.6/debian/rules	2013-05-28 10:41:20.278405845 -0700
@@ -39,6 +39,8 @@
 		| sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
 UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/-[0-9.]*$$//')
 
+ifneq ($(DEB_BUILD_PROFILE),stage1)
+
 ifneq (,$(findstring /$(DEB_HOST_ARCH)/,/i386/powerpc/sparc/s390/))
 	build64-stamp := build64-stamp
 	CC64=$(CC) -m64
@@ -52,6 +54,8 @@
 	lib32 := usr/lib32
 endif
 
+endif
+
 build-arch: build
 build-indep: build
 build: build-stamp $(build32-stamp) $(build64-stamp)