Bug#773300: Improve glibc bootstrap

2014-12-16 Thread YunQiang Su
Package: src:glibc
Version: 2.20-1

Hi, the attached patch can improve bootstrapping of glibc.

It produces the similiar stage1 glibc
(libc6/libc6-dev and multilib version of them),
at the same time, the dependencies of them are also correct.

So it will more smooth to bootstrap Debian.

Please consider it in the future version (2.20?)

-- 
YunQiang Su


glibc.debdiff
Description: Binary data


Bug#773300: Improve glibc bootstrap

2014-12-16 Thread Helmut Grohne
On Tue, Dec 16, 2014 at 11:39:40PM +0800, YunQiang Su wrote:
 Hi, the attached patch can improve bootstrapping of glibc.

Partially, this seems to be a duplicate of #766877. Maybe these should
be merged?

 It produces the similiar stage1 glibc
 (libc6/libc6-dev and multilib version of them),
 at the same time, the dependencies of them are also correct.

The documentation and rationale of this patch are scarce. I have a few
comments on individual hunks though.

diff -Nru glibc-2.19/debian/rules glibc-2.19/debian/rules
--- glibc-2.19/debian/rules 2014-10-17 07:43:19.0 +
+++ glibc-2.19/debian/rules 2014-12-10 23:16:28.0 +
@@ -143,8 +143,12 @@
 endif
 endif
 
+ifeq ($(DEB_STAGE),stage2)
+  DEB_BUILD_PROFILES+=stage2
+endif
+
 ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
-  DEB_ARCH_REGULAR_PACKAGES = $(libc)-dev
+  DEB_ARCH_REGULAR_PACKAGES = $(libc)-dev $(libc)
   DEB_INDEP_REGULAR_PACKAGES = 
   DEB_UDEB_PACKAGES = 
 else

I have no clue how one would build the libc in stage1. The gcc stage1
does not provide the means for doing so. If anything those packages
would be empty. I.e. this seems rather wrong to me.

diff -Nru glibc-2.19/debian/sysdeps/linux.mk glibc-2.19/debian/sysdeps/linux.mk
--- glibc-2.19/debian/sysdeps/linux.mk  2014-07-16 18:43:31.0 +
+++ glibc-2.19/debian/sysdeps/linux.mk  2014-12-10 23:11:05.0 +
@@ -16,11 +16,7 @@
 endif
 
 ifndef LINUX_SOURCE
-  ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-LINUX_HEADERS := /usr/include
-  else
-LINUX_HEADERS := /usr/$(DEB_HOST_GNU_TYPE)/include
-  endif
+  LINUX_HEADERS := /usr/include
   LINUX_ARCH_HEADERS := /usr/include/$(DEB_HOST_MULTIARCH)
 else
   LINUX_HEADERS := $(LINUX_SOURCE)/include

This breaks the supported cross build method.

diff -Nru glibc-2.19/debian/sysdeps/mips64.mk 
glibc-2.19/debian/sysdeps/mips64.mk
--- glibc-2.19/debian/sysdeps/mips64.mk 2014-10-17 07:43:19.0 +
+++ glibc-2.19/debian/sysdeps/mips64.mk 2014-12-11 03:50:09.0 +
@@ -59,5 +59,5 @@
 # create a symlink for the 32 bit dynamic linker in /lib
 define libc6-mips32_extra_pkg_install
 mkdir -p debian/libc6-mips32/lib
-ln -sf /libo32/ld.so.1 debian/libc6-mips32/lib
+ln -sf ../libo32/ld.so.1 debian/libc6-mips32/lib
 endef

This violates a should in Debian policy section 10.5.

Helmut


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141216191023.ga13...@alf.mars



Bug#766877: Fix multilib enabled stage1 cross builds

2014-12-16 Thread Helmut Grohne
Control: user helm...@debian.org
Control: usertags -1 + rebootstrap

On Sun, Oct 26, 2014 at 02:23:07PM +0100, Matthias Klose wrote:
 The patch fixes building multilib enabled stage1 cross, by doing the call xx
 dance for stage1 as well, as well as generating the debhelper files for 
 multilib
 stage1 packages.

Matthias patch does not work for architectures with optimized libcs
(called otherarch in glibc packaging, i.e. i386, mipsel, alpha).

Quoting the commit message of
http://anonscm.debian.org/cgit/users/helmutg/rebootstrap.git/commit/?id=b462ceb
for details:

| attempt at fixing glibc multilib stage1 builds
| 
| Currently for mipsel libc6-dev and libc6-dev-mips64 (stage1) are not
| coinstallable, because they have an undeclared file conflict in
| /usr/include/sys. Since libc6-dev is multiarch, it shouldn't contain
| that directory but use something below /usr/include/triplet.
| 
| The cause is the debhelper tooling affected by the patch below. It is
| run for each $curpass, where in case of mipsel passes include libc,
| mips64 and loongson2f. The last one is interesting, because it is not
| covered by either existing cases. In the non-stage1 variant of this
| code, it is classified as a pass=-otherbuild. Since we don't change
| templates or pass for loongson2f, the snippet overwrites the debhelper
| .install files for libc causing the libc6-dev package to contain the
| headers for loongson2f (in non-multiarch locations). So the non-stage1
| restricts templates to just libc for otherbuild. Since stage1 restricts
| templates to libc-dev, the intersection for stage1 and otherbuild is
| empty.
| 
| Arguably, the loongson2f pass should be skipped in stage1 entirely.
| 
| This bug should break any architecture with optimized libc packages:
|  * mipsel - loongon2f
|  * i386 - 686 (breaks in gcc earlier atm)
|  * alpha - alphaev67 (libc6.1-dev and libc6-dev conflict already)

Helmut


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20141216195143.ga15...@alf.mars