From 5ae3fe6246ae66265695bff929b4da792788bd9e Mon Sep 17 00:00:00 2001
From: Metztli Information Technology <jose@metztli-it.com>
Date: Fri, 15 Dec 2017 21:41:53 -0800
Subject: [PATCH] Reiser4 SFRN 4.0.2 and GCC6 stretch-backports

---
 debian/config/amd64/defines                          |  5 +++--
 debian/config/armel/defines                          |  2 +-
 debian/config/armhf/defines                          |  2 +-
 debian/config/defines                                |  4 ++--
 debian/config/hppa/defines                           |  2 +-
 debian/config/i386/defines                           |  3 ++-
 debian/config/s390x/defines                          |  2 +-
 debian/installer/amd64/modules/amd64/reiser4-modules |  1 +
 debian/installer/amd64/package-list                  |  3 +++
 debian/installer/i386/modules/i386/reiser4-modules   |  1 +
 debian/installer/i386/package-list                   |  3 +++
 debian/installer/modules/reiser4-modules             |  1 +
 debian/installer/package-list                        |  7 +++++++
 debian/templates/control.extra.in                    | 12 ++++++------
 14 files changed, 33 insertions(+), 15 deletions(-)
 create mode 100644 debian/installer/amd64/modules/amd64/reiser4-modules
 create mode 100644 debian/installer/i386/modules/i386/reiser4-modules
 create mode 100644 debian/installer/modules/reiser4-modules

diff --git a/debian/config/amd64/defines b/debian/config/amd64/defines
index 297066db2..344342da7 100644
--- a/debian/config/amd64/defines
+++ b/debian/config/amd64/defines
@@ -5,8 +5,9 @@ featuresets:
 kernel-arch: x86
 
 [build]
-debug-info: true
+debug-info: false
 image-file: arch/x86/boot/bzImage
+signed-modules: false
 vdso: true
 
 [image]
@@ -15,7 +16,7 @@ install-stem: vmlinuz
 breaks: xserver-xorg-input-vmmouse (<< 1:13.0.99)
 
 [relations]
-headers%gcc-7: linux-compiler-gcc-7-x86
+headers%gcc-6: linux-compiler-gcc-6-x86
 
 [amd64_description]
 hardware: 64-bit PCs
diff --git a/debian/config/armel/defines b/debian/config/armel/defines
index b6f172dcc..9f4ed16b1 100644
--- a/debian/config/armel/defines
+++ b/debian/config/armel/defines
@@ -16,7 +16,7 @@ uncompressed-image-file: arch/arm/boot/Image
 install-stem: vmlinuz
 
 [relations]
-headers%gcc-7: linux-compiler-gcc-7-arm
+headers%gcc-6: linux-compiler-gcc-6-arm
 
 [marvell_description]
 hardware: Marvell Kirkwood/Orion
diff --git a/debian/config/armhf/defines b/debian/config/armhf/defines
index 497f6bb50..6cb465885 100644
--- a/debian/config/armhf/defines
+++ b/debian/config/armhf/defines
@@ -12,7 +12,7 @@ vdso: true
 install-stem: vmlinuz
 
 [relations]
-headers%gcc-7: linux-compiler-gcc-7-arm
+headers%gcc-6: linux-compiler-gcc-6-arm
 
 [armmp_description]
 hardware: ARMv7 multiplatform compatible SoCs
diff --git a/debian/config/defines b/debian/config/defines
index dc52b4793..bdd2eb933 100644
--- a/debian/config/defines
+++ b/debian/config/defines
@@ -99,7 +99,7 @@ arches:
  sparc64
  tilegx
  x32
-compiler: gcc-7
+compiler: gcc-6
 featuresets:
  none
  rt
@@ -124,7 +124,7 @@ recommends: apparmor
 
 [relations]
 # compilers
-gcc-7: gcc-7 <!stage1 !cross>, gcc-7-@gnu-type-package@ <!stage1 cross>
+gcc-6: gcc-6 <!stage1 !cross>, gcc-6-@gnu-type-package@ <!stage1 cross>
 
 # initramfs-generators
 initramfs-fallback: linux-initramfs-tool
diff --git a/debian/config/hppa/defines b/debian/config/hppa/defines
index 761bda61f..8eac51d26 100644
--- a/debian/config/hppa/defines
+++ b/debian/config/hppa/defines
@@ -24,5 +24,5 @@ hardware: multiprocessor 64-bit PA-RISC
 hardware-long: HP PA-RISC 64-bit SMP systems with support for more than 4 GB RAM
 
 [relations]
-gcc-7: gcc-7 <!stage1 !cross>, binutils-hppa64-linux-gnu <!stage1 !cross>, gcc-7-hppa64-linux-gnu <!stage1 !cross>, gcc-7-hppa-linux-gnu <!stage1 cross>, binutils-hppa64-linux-gnu <!stage1 cross>, gcc-7-hppa64-linux-gnu <!stage1 cross>
+gcc-6: gcc-6 <!stage1 !cross>, binutils-hppa64-linux-gnu <!stage1 !cross>, gcc-6-hppa64-linux-gnu <!stage1 !cross>, gcc-6-hppa-linux-gnu <!stage1 cross>, binutils-hppa64-linux-gnu <!stage1 cross>, gcc-6-hppa64-linux-gnu <!stage1 cross>
 
diff --git a/debian/config/i386/defines b/debian/config/i386/defines
index 880ad44f0..7742036ba 100644
--- a/debian/config/i386/defines
+++ b/debian/config/i386/defines
@@ -6,6 +6,7 @@ kernel-arch: x86
 
 [build]
 image-file: arch/x86/boot/bzImage
+signed-modules: false
 vdso: true
 
 [description]
@@ -20,7 +21,7 @@ install-stem: vmlinuz
 breaks: xserver-xorg-input-vmmouse (<< 1:13.0.99)
 
 [relations]
-headers%gcc-7: linux-compiler-gcc-7-x86
+headers%gcc-6: linux-compiler-gcc-6-x86
 
 [686_description]
 hardware: older PCs
diff --git a/debian/config/s390x/defines b/debian/config/s390x/defines
index 47de62402..8dcf9fde1 100644
--- a/debian/config/s390x/defines
+++ b/debian/config/s390x/defines
@@ -12,7 +12,7 @@ bootloaders: s390-tools
 install-stem: vmlinuz
 
 [relations]
-headers%gcc-7: linux-compiler-gcc-7-s390
+headers%gcc-6: linux-compiler-gcc-6-s390
 
 [s390x_build]
 debug-info: true
diff --git a/debian/installer/amd64/modules/amd64/reiser4-modules b/debian/installer/amd64/modules/amd64/reiser4-modules
new file mode 100644
index 000000000..9373ef12f
--- /dev/null
+++ b/debian/installer/amd64/modules/amd64/reiser4-modules
@@ -0,0 +1 @@
+#include <reiser4-modules>
diff --git a/debian/installer/amd64/package-list b/debian/installer/amd64/package-list
index e55a71031..ec9dbb3c3 100644
--- a/debian/installer/amd64/package-list
+++ b/debian/installer/amd64/package-list
@@ -3,6 +3,9 @@
 # architecture, which is derived from the files in the modules directory.
 # It overwrites specifications from /usr/share/kernel-wedge/package-list.
 #
+#Jose/Metztli IT 10-16-2017 reiser4 support
+Package: reiser4-modules
+Priority: standard
 
 Package: fat-modules
 Priority: standard
diff --git a/debian/installer/i386/modules/i386/reiser4-modules b/debian/installer/i386/modules/i386/reiser4-modules
new file mode 100644
index 000000000..9373ef12f
--- /dev/null
+++ b/debian/installer/i386/modules/i386/reiser4-modules
@@ -0,0 +1 @@
+#include <reiser4-modules>
diff --git a/debian/installer/i386/package-list b/debian/installer/i386/package-list
index b92d69595..3db3bf824 100644
--- a/debian/installer/i386/package-list
+++ b/debian/installer/i386/package-list
@@ -3,6 +3,9 @@
 # architecture, which is derived from the files in the modules directory.
 # It overwrites specifications from /usr/share/kernel-wedge/package-list.
 #
+#Jose/Metztli IT 10-16-2017 reiser4 support
+Package: reiser4-modules
+Priority: standard
 
 Package: kernel-image
 Provides: rtc-modules, zlib-modules
diff --git a/debian/installer/modules/reiser4-modules b/debian/installer/modules/reiser4-modules
new file mode 100644
index 000000000..70ddae431
--- /dev/null
+++ b/debian/installer/modules/reiser4-modules
@@ -0,0 +1 @@
+reiser4
diff --git a/debian/installer/package-list b/debian/installer/package-list
index a148a42cc..702f39405 100644
--- a/debian/installer/package-list
+++ b/debian/installer/package-list
@@ -123,6 +123,13 @@ Priority: standard
 Description: JFS filesystem support
  This package contains the JFS filesystem module for the kernel.
 
+# Jose/Metztli IT 10-16-2017 reiser4 support
+Package: reiser4-modules
+Depends: kernel-image, crc-modules
+Priority: extra
+Description: Reiser4 filesystem support
+ This package contains the Reiser4 filesystem module for the kernel.
+
 Package: ntfs-modules
 Depends: kernel-image
 Priority: optional
diff --git a/debian/templates/control.extra.in b/debian/templates/control.extra.in
index d4379685f..b0f3e8625 100644
--- a/debian/templates/control.extra.in
+++ b/debian/templates/control.extra.in
@@ -1,24 +1,24 @@
-Package: linux-compiler-gcc-7-arm
+Package: linux-compiler-gcc-6-arm
 Build-Profiles: <!stage1>
-Depends: gcc-7, ${misc:Depends}
+Depends: gcc-6, ${misc:Depends}
 Architecture: armel armhf
 Multi-Arch: foreign
 Description: Compiler for Linux on ARM (meta-package)
  This package depends on gcc 6 of the appropriate architecture for
  Linux on armel and armhf.
 
-Package: linux-compiler-gcc-7-s390
+Package: linux-compiler-gcc-6-s390
 Build-Profiles: <!stage1>
-Depends: gcc-7, ${misc:Depends}
+Depends: gcc-6, ${misc:Depends}
 Architecture: s390 s390x
 Multi-Arch: foreign
 Description: Compiler for Linux on IBM zSeries (meta-package)
  This package depends on gcc 6 of the appropriate architecture for
  Linux on s390 and s390x.
 
-Package: linux-compiler-gcc-7-x86
+Package: linux-compiler-gcc-6-x86
 Build-Profiles: <!stage1>
-Depends: gcc-7, ${misc:Depends}
+Depends: gcc-6, ${misc:Depends}
 Architecture: amd64 i386 x32
 Multi-Arch: foreign
 Description: Compiler for Linux on x86 (meta-package)
-- 
2.14.2

