summaryrefslogtreecommitdiffstats
path: root/debian/templates
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:02:38 +0000
commit08b74a000942a380fe028845f92cd3a0dee827d5 (patch)
treeaa78b4e12607c3e1fcce8d5cc42df4330792f118 /debian/templates
parentAdding upstream version 4.19.249. (diff)
downloadlinux-08b74a000942a380fe028845f92cd3a0dee827d5.tar.xz
linux-08b74a000942a380fe028845f92cd3a0dee827d5.zip
Adding debian version 4.19.249-2.debian/4.19.249-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/templates')
-rw-r--r--debian/templates/control.config.in11
-rw-r--r--debian/templates/control.docs.in15
-rw-r--r--debian/templates/control.extra.in26
-rw-r--r--debian/templates/control.headers.arch.in16
-rw-r--r--debian/templates/control.headers.featureset.in11
-rw-r--r--debian/templates/control.headers.in10
-rw-r--r--debian/templates/control.image-dbg.in8
-rw-r--r--debian/templates/control.image-unsigned.in9
-rw-r--r--debian/templates/control.image.in7
-rw-r--r--debian/templates/control.libc-dev.in9
-rw-r--r--debian/templates/control.main.in11
-rw-r--r--debian/templates/control.signed-template.in6
-rw-r--r--debian/templates/control.source.in38
-rw-r--r--debian/templates/control.sourcebin.in15
-rw-r--r--debian/templates/control.tools-unversioned.in102
-rw-r--r--debian/templates/control.tools-versioned.in48
-rw-r--r--debian/templates/headers.postinst.in18
-rw-r--r--debian/templates/image-dbg.lintian-overrides.in15
-rw-r--r--debian/templates/image.bug/control2
-rw-r--r--debian/templates/image.bug/include-0version9
-rw-r--r--debian/templates/image.bug/include-1cmdline9
-rw-r--r--debian/templates/image.bug/include-1tainted55
-rw-r--r--debian/templates/image.bug/include-dmesg21
-rw-r--r--debian/templates/image.bug/include-model60
-rw-r--r--debian/templates/image.bug/include-modules13
-rw-r--r--debian/templates/image.bug/include-network39
-rw-r--r--debian/templates/image.bug/include-pci12
-rw-r--r--debian/templates/image.bug/include-pstore77
-rw-r--r--debian/templates/image.bug/include-usb11
-rw-r--r--debian/templates/image.bug/presubj8
-rw-r--r--debian/templates/image.bug/script46
-rwxr-xr-xdebian/templates/image.postinst.in25
-rwxr-xr-xdebian/templates/image.postrm.in31
-rwxr-xr-xdebian/templates/image.preinst.in21
-rwxr-xr-xdebian/templates/image.prerm.in17
-rw-r--r--debian/templates/perf.lintian-overrides.in3
-rw-r--r--debian/templates/tests-control.image.in4
-rw-r--r--debian/templates/tests-control.main.in2
38 files changed, 840 insertions, 0 deletions
diff --git a/debian/templates/control.config.in b/debian/templates/control.config.in
new file mode 100644
index 000000000..5b3822776
--- /dev/null
+++ b/debian/templates/control.config.in
@@ -0,0 +1,11 @@
+Package: @source_basename@-config-@version@
+Build-Profiles: <!stage1 !pkg.linux.nosource>
+Multi-Arch: same
+Depends: ${misc:Depends}
+Recommends: @source_basename@-source-@version@
+Description: Debian kernel configurations for Linux @version@
+ This package contains the configuration files used to build the
+ official Debian kernel files, but without references to Debian's
+ signing certificates.
+ .
+ These can be used as a basis for configuring custom kernels.
diff --git a/debian/templates/control.docs.in b/debian/templates/control.docs.in
new file mode 100644
index 000000000..12540467b
--- /dev/null
+++ b/debian/templates/control.docs.in
@@ -0,0 +1,15 @@
+Package: @source_basename@-doc-@version@
+Build-Profiles: <!stage1 !nodoc>
+Architecture: all
+Build-Depends: graphviz, python3-sphinx, python3-sphinx-rtd-theme,
+ texlive-latex-base, texlive-latex-extra, dvipng
+Depends: ${misc:Depends}
+Section: doc
+Multi-Arch: foreign
+Description: Linux kernel specific documentation for version @version@
+ This package provides the various README files and HTML documentation for
+ the Linux kernel version @version@. Plenty of information, including the
+ descriptions of various kernel subsystems, filesystems, driver-specific
+ notes and the like. Consult the file
+ /usr/share/doc/linux-doc-@version@/Documentation/00-INDEX
+ for the detailed description of the contents.
diff --git a/debian/templates/control.extra.in b/debian/templates/control.extra.in
new file mode 100644
index 000000000..7abbc1132
--- /dev/null
+++ b/debian/templates/control.extra.in
@@ -0,0 +1,26 @@
+Package: linux-compiler-gcc-8-arm
+Build-Profiles: <!stage1>
+Depends: gcc-8, ${misc:Depends}
+Architecture: armel armhf
+Multi-Arch: foreign
+Description: Compiler for Linux on ARM (meta-package)
+ This package depends on GCC of the appropriate version and architecture
+ for Linux on armel and armhf.
+
+Package: linux-compiler-gcc-8-s390
+Build-Profiles: <!stage1>
+Depends: gcc-8, ${misc:Depends}
+Architecture: s390 s390x
+Multi-Arch: foreign
+Description: Compiler for Linux on IBM zSeries (meta-package)
+ This package depends on GCC of the appropriate version and architecture
+ for Linux on s390 and s390x.
+
+Package: linux-compiler-gcc-8-x86
+Build-Profiles: <!stage1>
+Depends: gcc-8 (>= 8-20180123-1~), ${misc:Depends}
+Architecture: amd64 i386 x32
+Multi-Arch: foreign
+Description: Compiler for Linux on x86 (meta-package)
+ This package depends on GCC of the appropriate version and architecture
+ for Linux on amd64, i386 and x32.
diff --git a/debian/templates/control.headers.arch.in b/debian/templates/control.headers.arch.in
new file mode 100644
index 000000000..34f97e179
--- /dev/null
+++ b/debian/templates/control.headers.arch.in
@@ -0,0 +1,16 @@
+Package: linux-headers-@abiname@-all
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Depends: linux-headers-@abiname@-all-${kernel:Arch} (= ${binary:Version}), ${misc:Depends}
+Description: All header files for Linux @version@ (meta-package)
+ This package depends against all architecture-specific kernel header files
+ for Linux kernel version @upstreamversion@, generally used for building out-of-tree
+ kernel modules.
+
+Package: linux-headers-@abiname@-all-@arch@
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Depends: ${misc:Depends}
+Description: All header files for Linux @version@ (meta-package)
+ This package depends against all architecture-specific kernel header files
+ for Linux kernel version @upstreamversion@, generally used for building out-of-tree
+ kernel modules.
+
diff --git a/debian/templates/control.headers.featureset.in b/debian/templates/control.headers.featureset.in
new file mode 100644
index 000000000..123fedf5a
--- /dev/null
+++ b/debian/templates/control.headers.featureset.in
@@ -0,0 +1,11 @@
+Package: linux-headers-@abiname@-common@localversion@
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Architecture: all
+Depends: ${misc:Depends}
+Multi-Arch: foreign
+Description: Common header files for Linux @abiname@@localversion@
+ This package provides the common kernel header files for Linux kernel
+ version @abiname@@featureset_desc@, generally used for building
+ out-of-tree kernel modules. To obtain a complete set of headers you
+ also need to install the linux-headers-@abiname@-(flavour) package,
+ matching the flavour of the kernel you intend the build for.
diff --git a/debian/templates/control.headers.in b/debian/templates/control.headers.in
new file mode 100644
index 000000000..dc77662cd
--- /dev/null
+++ b/debian/templates/control.headers.in
@@ -0,0 +1,10 @@
+Package: linux-headers-@abiname@@localversion@
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Depends: linux-headers-@abiname@-common@localversion_headers@ (= ${source:Version}), linux-kbuild-@version@ (>= ${source:Version}), ${misc:Depends}
+Description: Header files for Linux @abiname@@localversion@
+ This package provides the architecture-specific kernel header files
+ for Linux kernel @abiname@@localversion@, generally
+ used for building out-of-tree kernel modules. These files are going to be
+ installed into /usr/src/linux-headers-@abiname@@localversion@, and can
+ be used for building modules that load into the kernel provided by the
+ linux-image-@abiname@@localversion@ package.
diff --git a/debian/templates/control.image-dbg.in b/debian/templates/control.image-dbg.in
new file mode 100644
index 000000000..3c67d56ac
--- /dev/null
+++ b/debian/templates/control.image-dbg.in
@@ -0,0 +1,8 @@
+Package: linux-image-@abiname@@localversion@-dbg
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Depends: ${misc:Depends}
+Section: debug
+Priority: optional
+Description: Debug symbols for linux-image-@abiname@@localversion@
+ This package provides the detached debug symbols for the Linux kernel
+ and modules in linux-image-@abiname@@localversion@.
diff --git a/debian/templates/control.image-unsigned.in b/debian/templates/control.image-unsigned.in
new file mode 100644
index 000000000..2b258d005
--- /dev/null
+++ b/debian/templates/control.image-unsigned.in
@@ -0,0 +1,9 @@
+Package: linux-image-@abiname@@localversion@-unsigned
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Depends: kmod, linux-base (>= 4.3~), ${misc:Depends}
+Recommends: firmware-linux-free, ${kernel:Recommends}
+Suggests: linux-doc-@version@, debian-kernel-handbook
+Conflicts: linux-image-@abiname@@localversion@
+Replaces: linux-image-@abiname@@localversion@
+Description: Linux @upstreamversion@ for @class@
+ The Linux kernel @upstreamversion@ and modules for use on @longclass@.
diff --git a/debian/templates/control.image.in b/debian/templates/control.image.in
new file mode 100644
index 000000000..4a4b36aad
--- /dev/null
+++ b/debian/templates/control.image.in
@@ -0,0 +1,7 @@
+Package: linux-image-@abiname@@localversion@
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Depends: kmod, linux-base (>= 4.3~), linux-bootwrapper-@abiname@ [powerpc powerpcspe ppc64], ${misc:Depends}
+Recommends: firmware-linux-free, ${kernel:Recommends}
+Suggests: linux-doc-@version@, debian-kernel-handbook
+Description: Linux @upstreamversion@ for @class@
+ The Linux kernel @upstreamversion@ and modules for use on @longclass@.
diff --git a/debian/templates/control.libc-dev.in b/debian/templates/control.libc-dev.in
new file mode 100644
index 000000000..6e975e4c3
--- /dev/null
+++ b/debian/templates/control.libc-dev.in
@@ -0,0 +1,9 @@
+Package: linux-libc-dev
+Section: devel
+Depends: ${misc:Depends}
+# Remove this Provides when #826519 is closed
+Provides: linux-kernel-headers
+Multi-Arch: same
+Description: Linux support headers for userspace development
+ This package provides userspaces headers from the Linux kernel. These headers
+ are used by the installed headers for GNU libc and other system libraries.
diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in
new file mode 100644
index 000000000..aa092b025
--- /dev/null
+++ b/debian/templates/control.main.in
@@ -0,0 +1,11 @@
+Package: @source_basename@-support-@abiname@
+Build-Profiles: <!stage1>
+Architecture: all
+Section: devel
+Depends: ${python3:Depends}, ${misc:Depends}
+Multi-Arch: foreign
+Description: Support files for Linux @upstreamversion@
+ This package provides support files for the Linux kernel build,
+ e.g. scripts to handle ABI information and for generation of
+ build system meta data.
+
diff --git a/debian/templates/control.signed-template.in b/debian/templates/control.signed-template.in
new file mode 100644
index 000000000..2af3ba424
--- /dev/null
+++ b/debian/templates/control.signed-template.in
@@ -0,0 +1,6 @@
+Package: linux-image-@arch@-signed-template
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Depends: dpkg-dev, ${misc:Depends}
+Description: Template for signed linux-image packages for @arch@
+ This package is used to control code signing by the Debian signing
+ service.
diff --git a/debian/templates/control.source.in b/debian/templates/control.source.in
new file mode 100644
index 000000000..85c4d8b1b
--- /dev/null
+++ b/debian/templates/control.source.in
@@ -0,0 +1,38 @@
+Section: kernel
+Priority: optional
+Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
+Uploaders: Bastian Blank <waldi@debian.org>, maximilian attems <maks@debian.org>, Ben Hutchings <ben@decadent.org.uk>, Salvatore Bonaccorso <carnil@debian.org>
+Standards-Version: 4.2.0
+Build-Depends:
+ debhelper (>= 10.1~), dh-exec,
+# used to run debian/bin/*.py
+ python3:any,
+# used by debian/rules.real to prepare the source
+ quilt,
+# used by debian/rules.real to build linux-doc and linux-headers
+ cpio <!stage1>,
+# used by upstream to compress kernel and by debian/rules.real to build linux-source
+ xz-utils <!stage1>,
+# used by debian/rules.real to build linux-perf and linux-support
+ dh-python <!stage1>,
+# used by upstream to build genksyms, kconfig, and perf
+ bison <!stage1>, flex (>= 2.6.1-1.1~) <!stage1>,
+Build-Depends-Arch:
+# used by debian/rules.real to build udebs
+ kernel-wedge (>= 2.99~) <!stage1 !pkg.linux.nokernel>,
+# used by kernel-wedge (only on Linux, thus not declared as a dependency)
+ kmod <!stage1 !pkg.linux.nokernel>,
+# used by upstream to build include/generated/timeconst.h
+ bc <!stage1 !pkg.linux.nokernel>,
+# used by upstream to build signing tools and to process certificates
+ libssl-dev:native <!stage1 !pkg.linux.nokernel>,
+ libssl-dev <!stage1 !pkg.linux.notools>,
+ openssl (>= 1.1.0-1~) <!stage1 !pkg.linux.nokernel>,
+# used by upstream to build objtool (native for amd64 images; host arch for
+# linux-kbuild), perf (host arch), libbpf (host arch)
+ libelf-dev:native [amd64] <!stage1 !pkg.linux.nokernel>,
+ libelf-dev <!stage1 !pkg.linux.notools>,
+Rules-Requires-Root: no
+Vcs-Git: https://salsa.debian.org/kernel-team/linux.git
+Vcs-Browser: https://salsa.debian.org/kernel-team/linux
+Homepage: https://www.kernel.org/
diff --git a/debian/templates/control.sourcebin.in b/debian/templates/control.sourcebin.in
new file mode 100644
index 000000000..859a22c3f
--- /dev/null
+++ b/debian/templates/control.sourcebin.in
@@ -0,0 +1,15 @@
+Package: @source_basename@-source-@version@
+Build-Profiles: <!stage1 !pkg.linux.nosource>
+Architecture: all
+Section: kernel
+Build-Depends: patchutils
+Depends: binutils, xz-utils, ${misc:Depends}
+Recommends: libc6-dev | libc-dev, gcc, make, bc, bison, flex, @source_basename@-config-@version@
+Suggests: libncurses-dev | ncurses-dev, libqt4-dev, pkg-config
+Multi-Arch: foreign
+Description: Linux kernel source for version @version@ with Debian patches
+ This package provides source code for the Linux kernel version @version@.
+ This source closely tracks official Linux kernel releases. Debian's
+ modifications to that source consist of security fixes, bug fixes, and
+ features that have already been (or are believed to be) accepted by the
+ upstream maintainers.
diff --git a/debian/templates/control.tools-unversioned.in b/debian/templates/control.tools-unversioned.in
new file mode 100644
index 000000000..58f128d0a
--- /dev/null
+++ b/debian/templates/control.tools-unversioned.in
@@ -0,0 +1,102 @@
+Package: linux-cpupower
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Section: admin
+Architecture: linux-any
+Build-Depends: libpci-dev
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: CPU power management tools for Linux
+ The cpupower command allows inspection and control of cpufreq and
+ cpuidle tunables for hardware that support these features. It
+ replaces "cpufreq-info" and "cpufreq-set" in cpufrequtils.
+ .
+ ${cpupower:Arch-Description}
+
+Package: libcpupower1
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Section: libs
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: CPU frequency and voltage scaling tools for Linux (libraries)
+ This package contains the shared library.
+
+Package: libcpupower-dev
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Section: libdevel
+Architecture: linux-any
+Depends: ${misc:Depends}, libcpupower1 (= ${binary:Version})
+Provides: libcpufreq-dev
+Conflicts: libcpufreq-dev
+Replaces: libcpufreq-dev
+Description: CPU frequency and voltage scaling tools for Linux (development files)
+ This package contains the 'power/cpupower' headers and library shared objects.
+
+Package: usbip
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: linux-any
+Build-Depends:
+ autoconf,
+ automake,
+ libtool,
+ libglib2.0-dev,
+ libudev-dev,
+ libwrap0-dev,
+# used by debian/rules.d/tools/usb/usbip
+ rsync,
+Depends: usbutils, ${shlibs:Depends}, ${misc:Depends}
+Section: admin
+Description: USB device sharing system over IP network
+ USB/IP is a system for sharing USB devices over the network.
+ .
+ To share USB devices between computers with their full
+ functionality, USB/IP encapsulates "USB requests" into IP
+ packets and transmits them between computers.
+ .
+ Original USB device drivers and applications can be used
+ for remote USB devices without any modification of them. A
+ computer can use remote USB devices as if they were
+ directly attached.
+ .
+ Currently USB/IP provides no access control or encryption.
+ It should only be used in trusted environments.
+ .
+ This package provides the server component 'usbipd' and the
+ client tool 'usbip'.
+
+Package: hyperv-daemons
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: i386 amd64 x32
+Depends: lsb-base, ${shlibs:Depends}, ${misc:Depends}
+Section: admin
+Description: Support daemons for Linux running on Hyper-V
+ Suite of daemons for Linux guests running on Hyper-V, consisting of
+ hv_fcopy_daemon, hv_kvp_daemon and hv_vss_daemon.
+ .
+ hv_fcopy_daemon provides the file copy service, allowing the host to
+ copy files into the guest.
+ .
+ hv_kvp_daemon provides the key-value pair (KVP) service, allowing the
+ host to get and set the IP networking configuration of the guest.
+ (This requires helper scripts which are not currently included.)
+ .
+ hv_vss_daemon provides the volume shadow copy service (VSS), allowing
+ the host to freeze the guest filesystems while taking a snapshot.
+
+Package: libbpf@version@
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: alpha amd64 arm64 arm64ilp32 armel armhf hppa i386 mips mips64 mips64el mips64r6 mips64r6el mipsel mipsn32 mipsn32el mipsn32r6 mipsn32r6el mipsr6 mipsr6el powerpc powerpcspe ppc64 ppc64el riscv64 s390 s390x sh3 sh4 sparc sparc64 x32
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Section: libs
+Multi-Arch: same
+Description: eBPF helper library (shared library)
+ libbpf is a library for loading eBPF programs and reading and
+ manipulating eBPF objects from user-space.
+
+Package: libbpf-dev
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: alpha amd64 arm64 arm64ilp32 armel armhf hppa i386 mips mips64 mips64el mips64r6 mips64r6el mipsel mipsn32 mipsn32el mipsn32r6 mipsn32r6el mipsr6 mipsr6el powerpc powerpcspe ppc64 ppc64el riscv64 s390 s390x sh3 sh4 sparc sparc64 x32
+Depends: ${misc:Depends}, libbpf@version@ (= ${binary:Version})
+Section: libdevel
+Multi-Arch: same
+Description: eBPF helper library (development files)
+ libbpf is a library for loading eBPF programs and reading and
+ manipulating eBPF objects from user-space.
diff --git a/debian/templates/control.tools-versioned.in b/debian/templates/control.tools-versioned.in
new file mode 100644
index 000000000..6f330ffa3
--- /dev/null
+++ b/debian/templates/control.tools-versioned.in
@@ -0,0 +1,48 @@
+Package: linux-kbuild-@version@
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: foreign
+Description: Kbuild infrastructure for Linux @version@
+ This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@.
+
+Package: linux-perf-@version@
+Build-Profiles: <!stage1 !pkg.linux.notools !nopython>
+Section: devel
+Architecture: alpha amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel mipsn32 mipsn32el mipsr6 mipsr6el mipsn32r6 mipsn32r6el mips64r6 mips64r6el powerpc ppc64 ppc64el s390 s390x sh4 sparc sparc64
+Build-Depends:
+ asciidoctor <!stage1 !nodoc !pkg.linux.notools !nopython>,
+ gcc-multilib [amd64 mips64 mips64el mips64r6 mips64r6el ppc64 s390x sparc64],
+ libaudit-dev,
+ libbabeltrace-dev (>= 1.5.0),
+# libbabeltrace-ctf-dev may or may not be needed as well
+ libbabeltrace-dev (>= 1.5.3-2~) | libbabeltrace-ctf-dev (>= 1.5.0),
+ libdw-dev,
+ libiberty-dev,
+ libnewt-dev,
+ libnuma-dev,
+ libperl-dev,
+ libunwind-dev [amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc ppc64 ppc64el sh4],
+ libopencsd-dev,
+ python3-dev,
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python3:Depends}
+Recommends: linux-base
+Provides: linux-tools-@version@
+Conflicts: linux-tools-@version@
+Replaces: linux-tools-@version@
+Suggests: linux-doc-@version@
+Description: Performance analysis tools for Linux @version@
+ This package contains the 'perf' performance analysis tools for Linux
+ kernel version @version@.
+ .
+ The linux-base package contains a 'perf' command which will invoke the
+ appropriate version for the running kernel.
+
+Package: linux-bootwrapper-@abiname@
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: powerpc powerpcspe ppc64
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Multi-Arch: foreign
+Description: Boot wrapper tools for Linux @version@ on PowerPC
+ This package provides the 'wrapper' script and related tools needed
+ to process the Linux kernel image for use with some PowerPC platforms.
diff --git a/debian/templates/headers.postinst.in b/debian/templates/headers.postinst.in
new file mode 100644
index 000000000..c13e6dc54
--- /dev/null
+++ b/debian/templates/headers.postinst.in
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+# Author: Michael Gilbert <michael.s.gilbert@gmail.com>
+# Origin: Stripped down version of the linux-headers postinst from Ubuntu's
+# 2.6.32-14-generic kernel, which was itself derived from a
+# Debian linux-image postinst script.
+
+$|=1;
+my $version = "@abiname@@localversion@";
+
+if (-d "/etc/kernel/header_postinst.d") {
+ system ("run-parts --report --exit-on-error --arg=$version " .
+ "/etc/kernel/header_postinst.d") &&
+ die "Failed to process /etc/kernel/header_postinst.d";
+}
+
+exit 0;
+
+__END__
diff --git a/debian/templates/image-dbg.lintian-overrides.in b/debian/templates/image-dbg.lintian-overrides.in
new file mode 100644
index 000000000..4290c1566
--- /dev/null
+++ b/debian/templates/image-dbg.lintian-overrides.in
@@ -0,0 +1,15 @@
+#!/usr/bin/dh-exec
+
+# Kernel dbg packages contain a full image with debug data
+linux-image-@abiname@@localversion@-dbg: dbg-package-missing-depends
+
+# glibc doesn't seem to check for a PT_GNU_STACK section in vDSOs, so
+# it's OK that they don't have it
+[arm64 armhf] linux-image-@abiname@@localversion@-dbg: shlib-without-PT_GNU_STACK-section usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdso.so
+[amd64 i386 ppc64el s390x] linux-image-@abiname@@localversion@-dbg: shlib-without-PT_GNU_STACK-section usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdso32.so
+[amd64 ppc64el s390x] linux-image-@abiname@@localversion@-dbg: shlib-without-PT_GNU_STACK-section usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdso64.so
+[amd64] linux-image-@abiname@@localversion@-dbg: shlib-without-PT_GNU_STACK-section usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdsox32.so
+
+# It is intended that 64-bit kernels provide vDSOs for 32-bit executables
+[amd64 ppc64el s390x] linux-image-@abiname@@localversion@-dbg: binary-from-other-architecture usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdso32.so
+[amd64] linux-image-@abiname@@localversion@-dbg: binary-from-other-architecture usr/lib/debug/lib/modules/@abiname@@localversion@/vdso/vdsox32.so
diff --git a/debian/templates/image.bug/control b/debian/templates/image.bug/control
new file mode 100644
index 000000000..b60912c4c
--- /dev/null
+++ b/debian/templates/image.bug/control
@@ -0,0 +1,2 @@
+Submit-As: src:linux
+Package-Status: firmware-amd-graphics firmware-atheros firmware-bnx2 firmware-bnx2x firmware-brcm80211 firmware-cavium firmware-intelwimax firmware-intel-sound firmware-ipw2x00 firmware-ivtv firmware-iwlwifi firmware-libertas firmware-linux-nonfree firmware-misc-nonfree firmware-myricom firmware-netxen firmware-qlogic firmware-realtek firmware-samsung firmware-siano firmware-ti-connectivity xen-hypervisor
diff --git a/debian/templates/image.bug/include-0version b/debian/templates/image.bug/include-0version
new file mode 100644
index 000000000..b5b32bfbd
--- /dev/null
+++ b/debian/templates/image.bug/include-0version
@@ -0,0 +1,9 @@
+add_0version() {
+ echo '** Version:' >&3
+ cat /proc/version >&3
+ echo >&3
+}
+
+ask_0version() {
+ true
+}
diff --git a/debian/templates/image.bug/include-1cmdline b/debian/templates/image.bug/include-1cmdline
new file mode 100644
index 000000000..3fcc94098
--- /dev/null
+++ b/debian/templates/image.bug/include-1cmdline
@@ -0,0 +1,9 @@
+add_1cmdline() {
+ echo '** Command line:' >&3
+ cat /proc/cmdline >&3
+ echo >&3
+}
+
+ask_1cmdline() {
+ true
+}
diff --git a/debian/templates/image.bug/include-1tainted b/debian/templates/image.bug/include-1tainted
new file mode 100644
index 000000000..921922e3c
--- /dev/null
+++ b/debian/templates/image.bug/include-1tainted
@@ -0,0 +1,55 @@
+TAINT_PROPRIETARY_MODULE=0
+TAINT_FORCED_MODULE=1
+TAINT_UNSAFE_SMP=2
+TAINT_FORCED_RMMOD=3
+TAINT_MACHINE_CHECK=4
+TAINT_BAD_PAGE=5
+TAINT_USER=6
+TAINT_DIE=7
+TAINT_OVERRIDDEN_ACPI_TABLE=8
+TAINT_WARN=9
+TAINT_CRAP=10
+TAINT_FIRMWARE_WORKAROUND=11
+TAINT_OOT_MODULE=12
+TAINT_UNSIGNED_MODULE=13
+TAINT_SOFTLOCKUP=14
+TAINT_LIVEPATCH=15
+
+_check() {
+ if [ $(($tainted & 1<<$1)) -ne 0 ]; then
+ result_short="$result_short$2"
+ result_long="$result_long * $3\n"
+ fi
+}
+
+add_1tainted() {
+ tainted=$(cat /proc/sys/kernel/tainted)
+ if [ "$tainted" -gt 0 ]; then
+ local result_short result_long
+ _check $TAINT_PROPRIETARY_MODULE 'P' 'Proprietary module has been loaded.'
+ _check $TAINT_FORCED_MODULE 'F' 'Module has been forcibly loaded.'
+ _check $TAINT_UNSAFE_SMP 'S' 'SMP with CPUs not designed for SMP.'
+ _check $TAINT_FORCED_RMMOD 'R' 'User forced a module unload.'
+ _check $TAINT_MACHINE_CHECK 'M' 'System experienced a machine check exception.'
+ _check $TAINT_BAD_PAGE 'B' 'System has hit bad_page.'
+ _check $TAINT_USER 'U' 'Userspace-defined naughtiness.'
+ _check $TAINT_DIE 'D' 'Kernel has oopsed before.'
+ _check $TAINT_OVERRIDDEN_ACPI_TABLE 'A' 'ACPI table overridden.'
+ _check $TAINT_WARN 'W' 'Taint on warning.'
+ _check $TAINT_CRAP 'C' 'Module from drivers/staging has been loaded.'
+ _check $TAINT_FIRMWARE_WORKAROUND 'I' 'Working around severe firmware bug.'
+ _check $TAINT_OOT_MODULE 'O' 'Out-of-tree module has been loaded.'
+ _check $TAINT_UNSIGNED_MODULE 'E' 'Unsigned module has been loaded.'
+ _check $TAINT_SOFTLOCKUP 'L' 'Kernel has detected soft lockup before.'
+ _check $TAINT_LIVEPATCH 'K' 'Live patch has been loaded.'
+ echo "** Tainted: $result_short ($tainted)" >&3
+ printf "$result_long" >&3
+ else
+ echo '** Not tainted' >&3
+ fi
+ echo >&3
+}
+
+ask_1tainted() {
+ true
+}
diff --git a/debian/templates/image.bug/include-dmesg b/debian/templates/image.bug/include-dmesg
new file mode 100644
index 000000000..634dc99ac
--- /dev/null
+++ b/debian/templates/image.bug/include-dmesg
@@ -0,0 +1,21 @@
+add_dmesg() {
+ local got_log=
+ echo '** Kernel log:' >&3
+ if [ "$(cat /proc/sys/kernel/dmesg_restrict)" = 0 ]; then
+ dmesg > >(tail -n 100 >&3) && got_log=y
+ elif command -v sudo >/dev/null; then
+ yesno "Use sudo to read the kernel log? " yep
+ if [ "$REPLY" = yep ]; then
+ sudo dmesg > >(tail -n 100 >&3) && got_log=y
+ fi
+ fi
+ test "$got_log" || echo 'Unable to read kernel log; any relevant messages should be attached' >&3
+ echo >&3
+}
+
+ask_dmesg() {
+ # Remind the user to attach the kernel log. This should also trigger
+ # a reminder in some MUAs if the user tries to send without it.
+ echo '** Kernel log: boot messages should be attached' >&3
+ echo >&3
+}
diff --git a/debian/templates/image.bug/include-model b/debian/templates/image.bug/include-model
new file mode 100644
index 000000000..ba77fb266
--- /dev/null
+++ b/debian/templates/image.bug/include-model
@@ -0,0 +1,60 @@
+grep_model() {
+ case "$(uname -m)" in
+ alpha)
+ egrep '^(system (type|variation|revision)|platform string)\b' /proc/cpuinfo
+ ;;
+ arm*)
+ egrep '^(Processor|Hardware|Revision)\b' /proc/cpuinfo
+ ;;
+ i386|ia64|x86_64)
+ local found=
+ for name in {sys,product,chassis,bios,board}_{vendor,name,version}; do
+ if [ -f /sys/class/dmi/id/$name ]; then
+ echo -n "$name: "
+ cat /sys/class/dmi/id/$name
+ found=y
+ fi
+ done
+ test -n "$found"
+ ;;
+ mips|mips64)
+ egrep '^(system type|cpu model)\b' /proc/cpuinfo
+ ;;
+ parisc|parisc64)
+ egrep '^(model|[hs]version)\b' /proc/cpuinfo
+ ;;
+ ppc|ppc64|ppc64le)
+ egrep -i '^(board|machine|model|motherboard|platform|revision|vendor)\b' /proc/cpuinfo
+ ;;
+ s390|s390x)
+ egrep '^processor\b' /proc/cpuinfo
+ ;;
+ sparc|sparc64)
+ egrep '^(cpu|fpu|pmu|prom|type)\b' /proc/cpuinfo
+ ;;
+ sh4|sh4a)
+ egrep '^(machine|cpu)\b' /proc/cpuinfo
+ ;;
+ *)
+ false
+ ;;
+ esac
+
+ # Device Tree model
+ if [ -r /proc/device-tree/model ]; then
+ echo "Device Tree model:" $(cat /proc/device-tree/model)
+ fi
+}
+
+add_model() {
+ local found=
+ echo '** Model information' >&3
+ grep_model >&3 2>/dev/null || echo "not available" >&3
+ echo >&3
+}
+
+ask_model() {
+ # This is still valid as long as the bug is being reported on the same
+ # system.
+ test $same_system = nop || add_model
+}
diff --git a/debian/templates/image.bug/include-modules b/debian/templates/image.bug/include-modules
new file mode 100644
index 000000000..22271c905
--- /dev/null
+++ b/debian/templates/image.bug/include-modules
@@ -0,0 +1,13 @@
+add_modules() {
+ echo '** Loaded modules:' >&3
+ # List modules along with any taint flags.
+ # We should be able to tell cut to use an empty output delimiter, but
+ # currently (coreutils 8.13-3) this results in null bytes in the output.
+ cut -d' ' -f1,7 /proc/modules | sed 's/ //' >&3
+ echo >&3
+}
+
+ask_modules() {
+ true
+}
+
diff --git a/debian/templates/image.bug/include-network b/debian/templates/image.bug/include-network
new file mode 100644
index 000000000..bd12defe6
--- /dev/null
+++ b/debian/templates/image.bug/include-network
@@ -0,0 +1,39 @@
+_add_etc_network_interfaces() {
+ echo '** Network interface configuration:' >&3
+ # Hide passwords/keys
+ awk '$1 ~ /key|pass|^wpa-(anonymous|identity|phase|pin|private|psk)/ { gsub(".", "*", $2); }
+ $1 == "ethtool-wol" { gsub(".", "*", $3); }
+ !/^[[:space:]]*\#/ { print; }
+ ' </etc/network/interfaces >&3
+ echo >&3
+}
+
+add_network() {
+ yesno "Include network configuration and status from this computer? " nop
+ test $REPLY = yep || return 0
+
+ _add_etc_network_interfaces
+ echo '** Network status:' >&3
+ if command -v ip >/dev/null; then
+ echo '*** IP interfaces and addresses:' >&3
+ ip address show >&3
+ echo >&3
+ fi
+ echo '*** Device statistics:' >&3
+ cat /proc/net/dev >&3
+ echo >&3
+ if command -v netstat >/dev/null; then
+ echo '*** Protocol statistics:' >&3
+ netstat -s >&3 || true
+ echo >&3
+ fi
+ echo >&3
+}
+
+ask_network() {
+ test $same_system = yep || return 0
+ yesno "Include network configuration from this computer? " nop
+ test $REPLY = yep || return 0
+
+ _add_etc_network_interfaces
+}
diff --git a/debian/templates/image.bug/include-pci b/debian/templates/image.bug/include-pci
new file mode 100644
index 000000000..8e6528e5a
--- /dev/null
+++ b/debian/templates/image.bug/include-pci
@@ -0,0 +1,12 @@
+add_pci() {
+ echo '** PCI devices:' >&3
+ lspci -nnvv >&3 2>/dev/null || echo 'not available' >&3
+ echo >&3
+}
+
+ask_pci() {
+ # This information shouldn't vary much between kernel versions, so
+ # include it anyway.
+ test $same_system = nop || add_pci
+}
+
diff --git a/debian/templates/image.bug/include-pstore b/debian/templates/image.bug/include-pstore
new file mode 100644
index 000000000..43285bd6a
--- /dev/null
+++ b/debian/templates/image.bug/include-pstore
@@ -0,0 +1,77 @@
+_add_pstore_log() {
+ if [ $# -le 3 ]; then
+ return
+ fi
+
+ local backend="$1"
+ local event="$2"
+ local date="$3"
+
+ yesno "Include log of $event at $(date -d @$date +%c) stored by $backend?" yep
+ if [ $REPLY != yep ]; then
+ return
+ fi
+
+ echo >&3
+ echo "*** Log of $event at $(date -d @$date -Iseconds) from $backend" >&3
+
+ shift 3
+ for file in "$@"; do
+ tail -n +2 "$file" | sed 's/^<.>//' >&3
+ done
+}
+
+add_pstore() {
+ local backend
+ local i
+ local j
+ local file
+ local date
+ local head
+ local event
+ local log_files
+
+ if ! mountpoint -q /sys/fs/pstore; then
+ return 0
+ fi
+
+ set -- /sys/fs/pstore/dmesg-*-1
+ backend=${1#*/dmesg-}
+ backend=${backend%-1}
+ if [ "$backend" = '*' ]; then
+ return 0
+ fi
+
+ i=1
+ while [ -f /sys/fs/pstore/dmesg-$backend-$i ]; do
+ file=/sys/fs/pstore/dmesg-$backend-$i
+ head="$(head -1 "$file")"
+
+ # Is this the first part of a log?
+ if [ "x${head% Part1}" != "x$head" ]; then
+ # Flush previous log, if any
+ _add_pstore_log "$backend" "$event" "$date" $log_files
+
+ event="${head% Part1}"
+ date=$(stat -c %Y $file)
+ log_files=
+ j=1
+ fi
+
+ if [ "x$head" = "x$event Part$j" ]; then
+ # Each part is prepended to the list, because they're numbered
+ # backward in log history
+ log_files="$file $log_files"
+ j=$((j + 1))
+ fi
+
+ i=$((i + 1))
+ done
+
+ # Flush last log, if any
+ _add_pstore_log "$backend" "$event" "$date" $log_files
+}
+
+ask_pstore() {
+ add_pstore
+}
diff --git a/debian/templates/image.bug/include-usb b/debian/templates/image.bug/include-usb
new file mode 100644
index 000000000..e8eb67e42
--- /dev/null
+++ b/debian/templates/image.bug/include-usb
@@ -0,0 +1,11 @@
+add_usb() {
+ echo '** USB devices:' >&3
+ lsusb >&3 2>/dev/null || echo 'not available' >&3
+ echo >&3
+}
+
+ask_usb() {
+ # This information shouldn't vary much between kernel versions, so
+ # include it anyway.
+ test $same_system = nop || add_usb
+}
diff --git a/debian/templates/image.bug/presubj b/debian/templates/image.bug/presubj
new file mode 100644
index 000000000..59b891acb
--- /dev/null
+++ b/debian/templates/image.bug/presubj
@@ -0,0 +1,8 @@
+Please ensure that you are currently running the kernel version that you
+are reporting on. This will allow your bug report to include useful
+diagnostic information about the running kernel.
+
+If you are reporting that the kernel fails to boot, please use a digital
+camera, serial console or netconsole to record the boot messages and
+attach these to your report. You can use the kernel parameter
+'boot_delay=1000' to slow down the boot messages.
diff --git a/debian/templates/image.bug/script b/debian/templates/image.bug/script
new file mode 100644
index 000000000..8e0b5d557
--- /dev/null
+++ b/debian/templates/image.bug/script
@@ -0,0 +1,46 @@
+#!/bin/bash
+set -e
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+dir="$(dirname $0)"
+
+. "$dir"/info
+
+for file in "$dir"/include-*; do
+ name="$(echo $file | sed -e 's,^.*/include-,,')"
+ hooks+=($name)
+ . "$file"
+done
+
+if [ "$RELEASE" == "$(uname -r)" ]; then
+ running_ver="$(uname -v)"
+ running_ver="${running_ver#* $DISTRIBUTOR }"
+ running_ver="${running_ver%% *}"
+ if [ "$running_ver" != "$SOURCEVERSION" ]; then
+ cat <<EOF
+You have installed version $PACKAGE_VERSION of
+$PACKAGE_NAME, but version $running_ver is currently
+running.
+
+You should reboot to complete the upgrade. Until you do this, some
+modules may fail to load. This is NOT a bug.
+
+If you have already rebooted, check your boot loader configuration.
+
+EOF
+ yesno "Do you still want to report a bug? " nop
+ if [ "$REPLY" = nop ]; then
+ exit 1
+ fi
+ fi
+ for hook in ${hooks[@]}; do
+ add_$hook
+ done
+else
+ yesno "Does the bug you are reporting affect this computer? " yep
+ same_system=$REPLY
+ for hook in ${hooks[@]}; do
+ ask_$hook
+ done
+fi
diff --git a/debian/templates/image.postinst.in b/debian/templates/image.postinst.in
new file mode 100755
index 000000000..25e7dd654
--- /dev/null
+++ b/debian/templates/image.postinst.in
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+version=@abiname@@localversion@
+image_path=/boot/@image-stem@-$version
+
+if [ "$1" != configure ]; then
+ exit 0
+fi
+
+depmod $version
+
+if [ -f /lib/modules/$version/.fresh-install ]; then
+ change=install
+else
+ change=upgrade
+fi
+linux-update-symlinks $change $version $image_path
+rm -f /lib/modules/$version/.fresh-install
+
+if [ -d /etc/kernel/postinst.d ]; then
+ DEB_MAINT_PARAMS="$*" run-parts --report --exit-on-error --arg=$version \
+ --arg=$image_path /etc/kernel/postinst.d
+fi
+
+exit 0
diff --git a/debian/templates/image.postrm.in b/debian/templates/image.postrm.in
new file mode 100755
index 000000000..4298752b3
--- /dev/null
+++ b/debian/templates/image.postrm.in
@@ -0,0 +1,31 @@
+#!/bin/sh -e
+
+version=@abiname@@localversion@
+image_path=/boot/@image-stem@-$version
+
+rm -f /lib/modules/$version/.fresh-install
+
+if [ "$1" != upgrade ] && command -v linux-update-symlinks >/dev/null; then
+ linux-update-symlinks remove $version $image_path
+fi
+
+if [ -d /etc/kernel/postrm.d ]; then
+ DEB_MAINT_PARAMS="$*" run-parts --report --exit-on-error --arg=$version \
+ --arg=$image_path /etc/kernel/postrm.d
+fi
+
+if [ "$1" = purge ]; then
+ for extra_file in modules.dep modules.isapnpmap modules.pcimap \
+ modules.usbmap modules.parportmap \
+ modules.generic_string modules.ieee1394map \
+ modules.ieee1394map modules.pnpbiosmap \
+ modules.alias modules.ccwmap modules.inputmap \
+ modules.symbols modules.ofmap \
+ modules.seriomap modules.\*.bin \
+ modules.softdep modules.devname; do
+ eval rm -f /lib/modules/$version/$extra_file
+ done
+ rmdir /lib/modules/$version || true
+fi
+
+exit 0
diff --git a/debian/templates/image.preinst.in b/debian/templates/image.preinst.in
new file mode 100755
index 000000000..8a5658ecd
--- /dev/null
+++ b/debian/templates/image.preinst.in
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+
+version=@abiname@@localversion@
+image_path=/boot/@image-stem@-$version
+
+if [ "$1" = abort-upgrade ]; then
+ exit 0
+fi
+
+if [ "$1" = install ]; then
+ # Create a flag file for postinst
+ mkdir -p /lib/modules/$version
+ touch /lib/modules/$version/.fresh-install
+fi
+
+if [ -d /etc/kernel/preinst.d ]; then
+ DEB_MAINT_PARAMS="$*" run-parts --report --exit-on-error --arg=$version \
+ --arg=$image_path /etc/kernel/preinst.d
+fi
+
+exit 0
diff --git a/debian/templates/image.prerm.in b/debian/templates/image.prerm.in
new file mode 100755
index 000000000..f1bde29b1
--- /dev/null
+++ b/debian/templates/image.prerm.in
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+version=@abiname@@localversion@
+image_path=/boot/@image-stem@-$version
+
+if [ "$1" != remove ]; then
+ exit 0
+fi
+
+linux-check-removal $version
+
+if [ -d /etc/kernel/prerm.d ]; then
+ DEB_MAINT_PARAMS="$*" run-parts --report --exit-on-error --arg=$version \
+ --arg=$image_path /etc/kernel/prerm.d
+fi
+
+exit 0
diff --git a/debian/templates/perf.lintian-overrides.in b/debian/templates/perf.lintian-overrides.in
new file mode 100644
index 000000000..858faa782
--- /dev/null
+++ b/debian/templates/perf.lintian-overrides.in
@@ -0,0 +1,3 @@
+# These executables are needed to handle processes running in compat mode
+linux-perf-@version@: binary-from-other-architecture usr/lib/perf_@version@-core/perf-read-vdso32
+linux-perf-@version@: binary-from-other-architecture usr/lib/perf_@version@-core/perf-read-vdsox32
diff --git a/debian/templates/tests-control.image.in b/debian/templates/tests-control.image.in
new file mode 100644
index 000000000..62497c67a
--- /dev/null
+++ b/debian/templates/tests-control.image.in
@@ -0,0 +1,4 @@
+Tests: selftests
+Restrictions: breaks-testbed, needs-root, isolation-machine
+Depends: kexec-tools, python3, gcc, make, libpopt-dev, gcc-multilib [amd64], bc, fuse, libfuse-dev, pkg-config
+Classes: smp
diff --git a/debian/templates/tests-control.main.in b/debian/templates/tests-control.main.in
new file mode 100644
index 000000000..cd037b835
--- /dev/null
+++ b/debian/templates/tests-control.main.in
@@ -0,0 +1,2 @@
+Tests: python
+Depends: python3, pycodestyle, pyflakes3