Package: src:bash
Followup-For: Bug #806945

Dear Maintainer,

Attached is the patch refreshed for bash version 4.4-1. I have confirmed that
it works the same way as advertised previously.

As an update, pgrp-pipe.diff is now optional; you can also just drop it to get
the same effect, since upstream have patched configure{,.ac} to correctly
handle Linux 4. However, I recommend keeping our patch as-is, in case upstream
forget to do this again for Linux 5.

Outside of this patch, we have also started to vary the build-path during our
tests. This has revealed that bash also embeds the build-path into the output;
see the attached diffoscope output for details. We don't have a patch for this
yet, but in case anyone wants to help here is how we *would* fix it:

CFLAGS - we eventually want to patch gcc to fix this; bash doesn't need to
  handle this specifically.
BUILD_DIR - this does seem bash-specific, but I haven't yet studied the
  Makefiles in enough detail to propose something concrete.
PDF ID - this is caused by [1] and we will probably patch texlive-bin to fix
  this; bash doesn't need to handle this specifically.

The other differences are due to the three mentioned above, and will disappear
once these are fixed.

It would still be good if you applied the attached patch, just to "get it in
there" so we don't have to keep refreshing it against newer bash versions.

Thanks!
Ximin

[1] 
https://sources.debian.net/src/texlive-bin/2016.20160513.41080-6/texk/web2c/pdftexdir/utils.c/#L731

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable'), (300, 'unstable'), (200, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
--- /tmp/tmp16zayndw/control_artifact/
+++ /tmp/tmp16zayndw/experiment_artifact/
├── bash-builtins_4.4-1.0~reproducible1_amd64.deb
│   ├── file list
│   │ @@ -1,3 +1,3 @@
│   │  -rw-r--r--   0        0        0        4 2016-09-26 12:50:21.000000 
debian-binary
│   │ --rw-r--r--   0        0        0     3680 2016-09-26 12:50:21.000000 
control.tar.gz
│   │ --rw-r--r--   0        0        0   100872 2016-09-26 12:50:21.000000 
data.tar.xz
│   │ +-rw-r--r--   0        0        0     3678 2016-09-26 12:50:21.000000 
control.tar.gz
│   │ +-rw-r--r--   0        0        0   100848 2016-09-26 12:50:21.000000 
data.tar.xz
│   ├── control.tar.gz
│   │   ├── control.tar
│   │   │   ├── ./md5sums
│   │   │   │   ├── md5sums
│   │   │   │   │┄ Files in package differ
│   │   │   │   ╵
│   │   │   ╵
│   │   ╵
│   ├── data.tar.xz
│   │   ├── data.tar
│   │   │   ├── file list
│   │   │   │ @@ -59,15 +59,15 @@
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     3544 
2016-09-26 12:50:21.000000 ./usr/include/bash/syntax.h
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     2003 
2016-09-26 12:50:21.000000 ./usr/include/bash/unwind_prot.h
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)    16993 
2016-09-26 12:50:21.000000 ./usr/include/bash/variables.h
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)      578 
2016-09-26 12:50:21.000000 ./usr/include/bash/version.h
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     1759 
2016-09-26 12:50:21.000000 ./usr/include/bash/xmalloc.h
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/lib/
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/lib/bash/
│   │   │   │ --rw-r--r--   0 root         (0) root         (0)     2875 
2016-09-26 12:50:21.000000 ./usr/lib/bash/Makefile.inc
│   │   │   │ +-rw-r--r--   0 root         (0) root         (0)     2881 
2016-09-26 12:50:21.000000 ./usr/lib/bash/Makefile.inc
│   │   │   │  -rwxr-xr-x   0 root         (0) root         (0)     6352 
2016-09-26 12:50:21.000000 ./usr/lib/bash/basename
│   │   │   │  -rwxr-xr-x   0 root         (0) root         (0)     6312 
2016-09-26 12:50:21.000000 ./usr/lib/bash/dirname
│   │   │   │  -rwxr-xr-x   0 root         (0) root         (0)    14848 
2016-09-26 12:50:21.000000 ./usr/lib/bash/finfo
│   │   │   │  -rwxr-xr-x   0 root         (0) root         (0)    10512 
2016-09-26 12:50:21.000000 ./usr/lib/bash/head
│   │   │   │  -rwxr-xr-x   0 root         (0) root         (0)    10440 
2016-09-26 12:50:21.000000 ./usr/lib/bash/id
│   │   │   │  -rwxr-xr-x   0 root         (0) root         (0)    10528 
2016-09-26 12:50:21.000000 ./usr/lib/bash/ln
│   │   │   │  -rwxr-xr-x   0 root         (0) root         (0)     6352 
2016-09-26 12:50:21.000000 ./usr/lib/bash/logname
│   │   │   │ @@ -92,15 +92,15 @@
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/lib/pkgconfig/
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)      586 
2016-09-26 12:50:21.000000 ./usr/lib/pkgconfig/bash.pc
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/share/
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/share/doc/
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/loadables/
│   │   │   │ --rw-r--r--   0 root         (0) root         (0)     8194 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/loadables/Makefile
│   │   │   │ +-rw-r--r--   0 root         (0) root         (0)     8200 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/loadables/Makefile
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     3083 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/loadables/README
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     3440 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/loadables/basename.c
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     2269 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/loadables/cat.c
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     3129 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/loadables/dirname.c
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)    12418 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/loadables/finfo.c
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     3625 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/loadables/head.c
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     2924 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/examples/loadables/hello.c
│   │   │   ├── ./usr/lib/bash/Makefile.inc
│   │   │   │ @@ -34,15 +34,15 @@
│   │   │   │  
│   │   │   │  datarootdir = ${prefix}/share
│   │   │   │  
│   │   │   │  loadablesdir = ${libdir}/bash
│   │   │   │  headersdir = $(includedir)/$(PACKAGE_NAME)
│   │   │   │  
│   │   │   │  topdir = ../../../.
│   │   │   │ -BUILD_DIR = /tmp/autopkgtest.C1MX0O/control/build-bash
│   │   │   │ +BUILD_DIR = /tmp/autopkgtest.C1MX0O/disorderfs/build-bash
│   │   │   │  srcdir = ../../.././examples/loadables
│   │   │   │  VPATH = ../../.././examples/loadables
│   │   │   │  
│   │   │   │  # Support an alternate destination root directory for package 
building
│   │   │   │  DESTDIR =
│   │   │   │  
│   │   │   │  INSTALL = /usr/bin/install -c
│   │   │   │ @@ -57,15 +57,15 @@
│   │   │   │  
│   │   │   │  SHELL = /bin/sh
│   │   │   │  
│   │   │   │  host_os = linux-gnu
│   │   │   │  host_cpu = x86_64
│   │   │   │  host_vendor = pc
│   │   │   │  
│   │   │   │ -CFLAGS = -g -O2 
-fdebug-prefix-map=/tmp/autopkgtest.C1MX0O/control=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security
│   │   │   │ +CFLAGS = -g -O2 
-fdebug-prefix-map=/tmp/autopkgtest.C1MX0O/disorderfs=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wall 
-Wno-parentheses -Wno-format-security
│   │   │   │  LOCAL_CFLAGS = 
│   │   │   │  DEFS = -DHAVE_CONFIG_H
│   │   │   │  LOCAL_DEFS = -DSHELL
│   │   │   │  
│   │   │   │  CPPFLAGS = -Wdate-time -D_FORTIFY_SOURCE=2
│   │   │   │  
│   │   │   │  BASHINCDIR = ${topdir}/include
│   │   │   ├── ./usr/share/doc/bash/examples/loadables/Makefile
│   │   │   │ @@ -31,15 +31,15 @@
│   │   │   │  
│   │   │   │  datarootdir = ${prefix}/share
│   │   │   │  
│   │   │   │  loadablesdir = ${libdir}/bash
│   │   │   │  headersdir = $(includedir)/$(PACKAGE_NAME)
│   │   │   │  
│   │   │   │  topdir = ../../../.
│   │   │   │ -BUILD_DIR = /tmp/autopkgtest.C1MX0O/control/build-bash
│   │   │   │ +BUILD_DIR = /tmp/autopkgtest.C1MX0O/disorderfs/build-bash
│   │   │   │  srcdir = ../../.././examples/loadables
│   │   │   │  VPATH = ../../.././examples/loadables
│   │   │   │  
│   │   │   │  # Support an alternate destination root directory for package 
building
│   │   │   │  DESTDIR =
│   │   │   │  
│   │   │   │  INSTALL = /usr/bin/install -c
│   │   │   │ @@ -54,15 +54,15 @@
│   │   │   │  
│   │   │   │  SHELL = /bin/sh
│   │   │   │  
│   │   │   │  host_os = linux-gnu
│   │   │   │  host_cpu = x86_64
│   │   │   │  host_vendor = pc
│   │   │   │  
│   │   │   │ -CFLAGS = -g -O2 
-fdebug-prefix-map=/tmp/autopkgtest.C1MX0O/control=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wall -Wno-parentheses -Wno-format-security
│   │   │   │ +CFLAGS = -g -O2 
-fdebug-prefix-map=/tmp/autopkgtest.C1MX0O/disorderfs=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wall 
-Wno-parentheses -Wno-format-security
│   │   │   │  LOCAL_CFLAGS = 
│   │   │   │  DEFS = -DHAVE_CONFIG_H
│   │   │   │  LOCAL_DEFS = -DSHELL
│   │   │   │  
│   │   │   │  CPPFLAGS = -Wdate-time -D_FORTIFY_SOURCE=2
│   │   │   │  
│   │   │   │  BASHINCDIR = ${topdir}/include
│   │   │   ╵
│   │   ╵
│   ├── stat {}
│   │ @@ -1,8 +1,8 @@
│   │  
│   │ -  Size: 104744           Blocks: 208        IO Block: 4096   regular file
│   │ +  Size: 104718           Blocks: 208        IO Block: 4096   regular file
│   │  Links: 1
│   │  Access: (0644/-rw-r--r--)  Uid: ( 1000/infinity0)   Gid: ( 
1000/infinity0)
│   │  
│   │  Modify: 1970-01-01 00:00:00.000000000 +0000
│   │  
│   │   Birth: -
│   ╵
├── bash-doc_4.4-1.0~reproducible1_all.deb
│   ├── file list
│   │ @@ -1,3 +1,3 @@
│   │  -rw-r--r--   0        0        0        4 2016-09-26 12:50:21.000000 
debian-binary
│   │ --rw-r--r--   0        0        0     2456 2016-09-26 12:50:21.000000 
control.tar.gz
│   │ --rw-r--r--   0        0        0  1597132 2016-09-26 12:50:21.000000 
data.tar.xz
│   │ +-rw-r--r--   0        0        0     2455 2016-09-26 12:50:21.000000 
control.tar.gz
│   │ +-rw-r--r--   0        0        0  1597112 2016-09-26 12:50:21.000000 
data.tar.xz
│   ├── control.tar.gz
│   │   ├── control.tar
│   │   │   ├── ./md5sums
│   │   │   │   ├── md5sums
│   │   │   │   │┄ Files in package differ
│   │   │   │   ╵
│   │   │   ╵
│   │   ╵
│   ├── data.tar.xz
│   │   ├── data.tar
│   │   │   ├── ./usr/share/doc/bash/bashref.pdf
│   │   │   │   ├── pdftk {} output - uncompress
│   │   │   │   │ @@ -43976,14 +43976,14 @@
│   │   │   │   │  0002176075 00000 n 
│   │   │   │   │  0002176117 00000 n 
│   │   │   │   │  0002176231 00000 n 
│   │   │   │   │  trailer
│   │   │   │   │  
│   │   │   │   │  <<
│   │   │   │   │  /Info 2557 0 R
│   │   │   │   │ -/ID [<5a499d2b68da14d8fd8f3afd6478639b> 
<5a499d2b68da14d8fd8f3afd6478639b>]
│   │   │   │   │ +/ID [<728063cf5f3bb29cc3814273c468cff9> 
<728063cf5f3bb29cc3814273c468cff9>]
│   │   │   │   │  /Root 2556 0 R
│   │   │   │   │  /Size 2558
│   │   │   │   │  >>
│   │   │   │   │  startxref
│   │   │   │   │  2176491
│   │   │   │   │  %%EOF
│   │   │   │   ╵
│   │   │   ╵
│   │   ╵
│   ├── stat {}
│   │ @@ -1,8 +1,8 @@
│   │  
│   │ -  Size: 1599780          Blocks: 3128       IO Block: 4096   regular file
│   │ +  Size: 1599760          Blocks: 3128       IO Block: 4096   regular file
│   │  Links: 1
│   │  Access: (0644/-rw-r--r--)  Uid: ( 1000/infinity0)   Gid: ( 
1000/infinity0)
│   │  
│   │  Modify: 1970-01-01 00:00:00.000000000 +0000
│   │  
│   │   Birth: -
│   ╵
├── bash_4.4-1.0~reproducible1_amd64.deb
│   ├── file list
│   │ @@ -1,3 +1,3 @@
│   │  -rw-r--r--   0        0        0        4 2016-09-26 12:50:21.000000 
debian-binary
│   │ --rw-r--r--   0        0        0    16558 2016-09-26 12:50:21.000000 
control.tar.gz
│   │ --rw-r--r--   0        0        0  1395092 2016-09-26 12:50:21.000000 
data.tar.xz
│   │ +-rw-r--r--   0        0        0    16562 2016-09-26 12:50:21.000000 
control.tar.gz
│   │ +-rw-r--r--   0        0        0  1395616 2016-09-26 12:50:21.000000 
data.tar.xz
│   ├── control.tar.gz
│   │   ├── control.tar
│   │   │   ├── ./md5sums
│   │   │   │   ├── md5sums
│   │   │   │   │┄ Files in package differ
│   │   │   │   ╵
│   │   │   ╵
│   │   ╵
│   ├── data.tar.xz
│   │   ├── data.tar
│   │   │   ├── file list
│   │   │   │ @@ -5,15 +5,15 @@
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     1863 
2016-09-26 12:50:21.000000 ./etc/bash.bashrc
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./etc/skel/
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)      220 
2016-09-26 12:50:21.000000 ./etc/skel/.bash_logout
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     3526 
2016-09-26 12:50:21.000000 ./etc/skel/.bashrc
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)      675 
2016-09-26 12:50:21.000000 ./etc/skel/.profile
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/bin/
│   │   │   │ --rwxr-xr-x   0 root         (0) root         (0)     7115 
2016-09-26 12:50:21.000000 ./usr/bin/bashbug
│   │   │   │ +-rwxr-xr-x   0 root         (0) root         (0)     7118 
2016-09-26 12:50:21.000000 ./usr/bin/bashbug
│   │   │   │  -rwxr-xr-x   0 root         (0) root         (0)    10544 
2016-09-26 12:50:21.000000 ./usr/bin/clear_console
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/share/
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/share/doc/
│   │   │   │  drwxr-xr-x   0 root         (0) root         (0)        0 
2016-09-26 12:50:21.000000 ./usr/share/doc/bash/
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)   104048 
2016-09-07 20:49:58.000000 ./usr/share/doc/bash/CHANGES.gz
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     7853 
2016-09-07 20:43:48.000000 ./usr/share/doc/bash/COMPAT.gz
│   │   │   │  -rw-r--r--   0 root         (0) root         (0)     2921 
1999-02-17 21:13:42.000000 ./usr/share/doc/bash/INTRO.gz
│   │   │   ├── ./usr/bin/bashbug
│   │   │   │ @@ -25,15 +25,15 @@
│   │   │   │  #
│   │   │   │  # configuration section:
│   │   │   │  #        these variables are filled in by the make target in 
Makefile
│   │   │   │  #
│   │   │   │  MACHINE="x86_64"
│   │   │   │  OS="linux-gnu"
│   │   │   │  CC="gcc"
│   │   │   │ -CFLAGS=" -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../. -I.././include -I.././lib  -Wdate-time 
-D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/tmp/autopkgtest.C1MX0O/control=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wall 
-Wno-parentheses -Wno-format-security"
│   │   │   │ +CFLAGS=" -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../. -I.././include -I.././lib  -Wdate-time 
-D_FORTIFY_SOURCE=2 -g -O2 
-fdebug-prefix-map=/tmp/autopkgtest.C1MX0O/disorderfs=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wall 
-Wno-parentheses -Wno-format-security"
│   │   │   │  RELEASE="4.4"
│   │   │   │  PATCHLEVEL="0"
│   │   │   │  RELSTATUS="release"
│   │   │   │  MACHTYPE="x86_64-pc-linux-gnu"
│   │   │   │  
│   │   │   │  PATH=/bin:/usr/bin:/usr/local/bin:$PATH
│   │   │   │  export PATH
│   │   │   ╵
│   │   ╵
│   ├── stat {}
│   │ @@ -1,8 +1,8 @@
│   │  
│   │ -  Size: 1411842          Blocks: 2760       IO Block: 4096   regular file
│   │ +  Size: 1412370          Blocks: 2760       IO Block: 4096   regular file
│   │  Links: 1
│   │  Access: (0644/-rw-r--r--)  Uid: ( 1000/infinity0)   Gid: ( 
1000/infinity0)
│   │  
│   │  Modify: 1970-01-01 00:00:00.000000000 +0000
│   │  
│   │   Birth: -
│   ╵
╵
diff -Nru bash-4.4/debian/changelog bash-4.3/debian/changelog
--- bash-4.4/debian/changelog	2015-09-01 01:04:48.000000000 +0200
+++ bash-4.4/debian/changelog	2016-06-07 11:56:09.000000000 +0200
@@ -1,3 +1,15 @@
+bash (4.4-1.0~reproducible1) UNRELEASED; urgency=medium
+
+  [ Ximin Luo ]
+  * Non-maintainer upload.
+  * Set PGRP_PIPE unconditionally on Linux, reproducibly.
+
+  [ Reiner Herrmann ]
+  * Use the system man2html instead of the embedded one, for better build
+    reproducibility.
+
+ -- Ximin Luo <infini...@debian.org>  Mon, 26 Sep 2016 14:40:45 +0200
+
 bash (4.4-1) unstable; urgency=medium
 
   * Bash 4.4 release.
diff -Nru bash-4.4/debian/control bash-4.3/debian/control
--- bash-4.4/debian/control	2015-01-28 17:13:32.000000000 +0100
+++ bash-4.4/debian/control	2016-06-06 03:00:38.000000000 +0200
@@ -5,7 +5,7 @@
 Standards-Version: 3.9.8
 Build-Depends: autoconf, autotools-dev, bison, libncurses5-dev,
  texinfo, texi2html, debhelper (>= 9), locales, gettext, sharutils, time,
- xz-utils, dpkg-dev (>= 1.16.1)
+ xz-utils, dpkg-dev (>= 1.16.1), man2html
 Build-Depends-Indep: texlive-latex-base, ghostscript, texlive-fonts-recommended
 Homepage: http://tiswww.case.edu/php/chet/bash/bashtop.html
 Vcs-Browser: https://code.launchpad.net/~doko/+junk/pkg-bash-debian
diff -Nru bash-4.4/debian/patches/pgrp-pipe.diff bash-4.3/debian/patches/pgrp-pipe.diff
--- bash-4.4/debian/patches/pgrp-pipe.diff	2013-10-23 14:41:22.000000000 +0200
+++ bash-4.4/debian/patches/pgrp-pipe.diff	2016-06-07 12:17:05.000000000 +0200
@@ -1,13 +1,43 @@
-# DP: Define PGRP_PIPE to avoid race condition.
-
-Index: b/config-bot.h
-===================================================================
---- a/config-bot.h
-+++ b/config-bot.h
-@@ -201,3 +201,6 @@
- 
- /* If you don't want bash to provide a default mail file to check. */
- #undef DEFAULT_MAIL_DIRECTORY
-+
-+/* Bug #224543 */
-+#define PGRP_PIPE 1
+Description: Set PGRP_PIPE unconditionally on Linux, reproducibly
+ The original fix to #224543 involved defining this unconditionally in
+ config-bot.h. Unfortunately, upstream has a check in configure.ac that defines
+ this conditionally in config.h, which makes the bash-builtins package 
+ unreproducible between different kernels. Here, we adopt a different approach,
+ which is to turn upstream's define into an uncondtional define. Then we can
+ also avoid touching config-bot.h.
+ .
+ More generally, installing config.h is bad practise because it fixes
+ build-time variables into everyone's installations, but that is a problem for
+ another day.
+Author: Ximin Luo <infini...@debian.org>
+Bug: https://lists.gnu.org/archive/html/bug-bash/2016-06/msg00053.html
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806945
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/configure.ac
++++ b/configure.ac
+@@ -1092,9 +1092,7 @@
+ solaris2*)	LOCAL_CFLAGS=-DSOLARIS ;;
+ lynxos*)	LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+ linux*)		LOCAL_LDFLAGS=-rdynamic		 # allow dynamic loading
+-		case "`uname -r`" in
+-		2.[[456789]]*|[[34]]*)	AC_DEFINE(PGRP_PIPE) ;;
+-		esac ;;
++		AC_DEFINE(PGRP_PIPE) ;;
+ *qnx6*)		LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
+ *qnx*)		LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
+ powerux*)	LOCAL_LIBS="-lgen" ;;
+--- a/configure
++++ b/configure
+@@ -16064,10 +16064,8 @@
+ solaris2*)	LOCAL_CFLAGS=-DSOLARIS ;;
+ lynxos*)	LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+ linux*)		LOCAL_LDFLAGS=-rdynamic		 # allow dynamic loading
+-		case "`uname -r`" in
+-		2.[456789]*|[34]*)	$as_echo "#define PGRP_PIPE 1" >>confdefs.h
++		$as_echo "#define PGRP_PIPE 1" >>confdefs.h
+  ;;
+-		esac ;;
+ *qnx6*)		LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
+ *qnx*)		LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
+ powerux*)	LOCAL_LIBS="-lgen" ;;
diff -Nru bash-4.4/debian/rules bash-4.4/debian/rules
--- bash-4.4/debian/rules	2015-01-28 17:55:12.000000000 +0100
+++ bash-4.4/debian/rules	2016-06-06 03:00:38.000000000 +0200
@@ -136,7 +136,7 @@
 bash-doc-build: stamps/stamp-build-bash-doc
 stamps/stamp-build-bash-doc:
 	rm -f bash/doc/bashref.info
-	$(MAKE) -C build-bash/doc info html
+	$(MAKE) -C build-bash/doc info html MAN2HTML=/usr/bin/man2html
 	$(MAKE) -C build-bash/doc bash.pdf bashref.pdf
 	touch stamps/stamp-build-bash-doc
 

Reply via email to