summaryrefslogtreecommitdiffstats
path: root/debian/templates
diff options
context:
space:
mode:
Diffstat (limited to 'debian/templates')
-rw-r--r--debian/templates/config.control.in13
-rw-r--r--debian/templates/docs.control.in15
-rw-r--r--debian/templates/docs.meta.control.in10
-rw-r--r--debian/templates/docs.meta.maintscript.in1
-rw-r--r--debian/templates/extra.control.in49
-rw-r--r--debian/templates/headers.control.in11
-rw-r--r--debian/templates/headers.featureset.control.in12
-rw-r--r--debian/templates/headers.meta.control.in8
-rw-r--r--debian/templates/headers.meta.maintscript.in1
-rwxr-xr-xdebian/templates/headers.postinst.in18
-rw-r--r--debian/templates/headers.tests-control.in4
-rw-r--r--debian/templates/image-dbg.control.in9
-rw-r--r--debian/templates/image-dbg.lintian-overrides.j232
-rw-r--r--debian/templates/image-dbg.meta.control.in9
-rw-r--r--debian/templates/image-dbg.meta.lintian-overrides.in1
-rw-r--r--debian/templates/image-dbg.meta.maintscript.in1
-rw-r--r--debian/templates/image-unsigned.control.in10
l---------debian/templates/image-unsigned.lintian-overrides.j21
l---------debian/templates/image-unsigned.postinst.in1
l---------debian/templates/image-unsigned.postrm.in1
l---------debian/templates/image-unsigned.preinst.in1
l---------debian/templates/image-unsigned.prerm.in1
-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-1tainted41
-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-network69
-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
-rw-r--r--debian/templates/image.control.in8
-rw-r--r--debian/templates/image.lintian-overrides.j213
-rw-r--r--debian/templates/image.meta.bug-presubj.in5
-rw-r--r--debian/templates/image.meta.control.in9
-rw-r--r--debian/templates/image.meta.maintscript.in1
-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/image.tests-control.in4
-rw-r--r--debian/templates/libc-dev.control.in9
-rw-r--r--debian/templates/main.control.in12
-rw-r--r--debian/templates/main.tests-control.in3
-rw-r--r--debian/templates/signed-template.control.in7
-rw-r--r--debian/templates/source.control.in44
-rw-r--r--debian/templates/sourcebin.control.in16
-rw-r--r--debian/templates/sourcebin.meta.control.in9
-rw-r--r--debian/templates/sourcebin.meta.maintscript.in1
-rw-r--r--debian/templates/tools-unversioned.control.in150
-rw-r--r--debian/templates/tools-versioned.control.in18
55 files changed, 990 insertions, 0 deletions
diff --git a/debian/templates/config.control.in b/debian/templates/config.control.in
new file mode 100644
index 000000000..a48588f22
--- /dev/null
+++ b/debian/templates/config.control.in
@@ -0,0 +1,13 @@
+Package: @source_basename@-config-@version@
+Meta-Rules-Target: config
+Architecture: linux-any
+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/docs.control.in b/debian/templates/docs.control.in
new file mode 100644
index 000000000..47ed7f75b
--- /dev/null
+++ b/debian/templates/docs.control.in
@@ -0,0 +1,15 @@
+Package: @source_basename@-doc-@version@
+Meta-Rules-Target: doc
+Build-Profiles: <!stage1 !nodoc !pkg.linux.quick>
+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. An index to the documentation is installed as
+ /usr/share/doc/linux-doc-@version@/html/index.html.
diff --git a/debian/templates/docs.meta.control.in b/debian/templates/docs.meta.control.in
new file mode 100644
index 000000000..5bbdd1bb8
--- /dev/null
+++ b/debian/templates/docs.meta.control.in
@@ -0,0 +1,10 @@
+Package: @source_basename@-doc@source_suffix@
+Meta-Rules-Target: meta
+Meta-Rules-Makeflags-INSTALLDOCS_LINK_DOC: @source_basename@-doc-@version@
+Build-Profiles: <!stage1 !nodoc !pkg.linux.nometa !pkg.linux.quick>
+Section: doc
+Architecture: all
+Depends: @source_basename@-doc-@version@ (= ${binary:Version}), ${misc:Depends}
+Description: Linux kernel specific documentation (meta-package)
+ This package depends on the package containing the documentation for the
+ latest Linux kernel.
diff --git a/debian/templates/docs.meta.maintscript.in b/debian/templates/docs.meta.maintscript.in
new file mode 100644
index 000000000..7c1750a4a
--- /dev/null
+++ b/debian/templates/docs.meta.maintscript.in
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/@package@ @source_basename@-doc-@version@ 5.7~rc5-1~exp1 @package@
diff --git a/debian/templates/extra.control.in b/debian/templates/extra.control.in
new file mode 100644
index 000000000..6bb0e0f8f
--- /dev/null
+++ b/debian/templates/extra.control.in
@@ -0,0 +1,49 @@
+Package: linux-compiler-gcc-12-arm
+Meta-Rules-Target: meta
+Build-Profiles: <!stage1>
+Depends: gcc-12, ${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-12-s390
+Meta-Rules-Target: meta
+Build-Profiles: <!stage1>
+Depends: gcc-12, ${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-12-x86
+Meta-Rules-Target: meta
+Build-Profiles: <!stage1>
+Depends: gcc-12, ${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.
+
+Package: linux-image-parisc64-smp
+Meta-Rules-Target: meta
+Build-Profiles: <!stage1 !pkg.linux.nokernel !pkg.linux.nometa>
+Architecture: hppa
+Section: oldlibs
+Priority: extra
+Depends: linux-image-parisc64, ${misc:Depends}
+Description: Linux for multiprocessor 64-bit PA-RISC (dummy package)
+ This is a dummy transitional package. It can be safely removed.
+
+Package: linux-image-parisc-smp
+Meta-Rules-Target: meta
+Build-Profiles: <!stage1 !pkg.linux.nokernel !pkg.linux.nometa>
+Architecture: hppa
+Section: oldlibs
+Priority: extra
+Depends: linux-image-parisc, ${misc:Depends}
+Description: Linux for multiprocessor 32-bit PA-RISC (dummy package)
+ This is a dummy transitional package. It can be safely removed.
diff --git a/debian/templates/headers.control.in b/debian/templates/headers.control.in
new file mode 100644
index 000000000..253ad5533
--- /dev/null
+++ b/debian/templates/headers.control.in
@@ -0,0 +1,11 @@
+Package: linux-headers-@abiname@@localversion@
+Meta-Rules-Target: headers
+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/headers.featureset.control.in b/debian/templates/headers.featureset.control.in
new file mode 100644
index 000000000..bbccc0c62
--- /dev/null
+++ b/debian/templates/headers.featureset.control.in
@@ -0,0 +1,12 @@
+Package: linux-headers-@abiname@-common@localversion@
+Meta-Rules-Target: headers-common
+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/headers.meta.control.in b/debian/templates/headers.meta.control.in
new file mode 100644
index 000000000..57ee3101a
--- /dev/null
+++ b/debian/templates/headers.meta.control.in
@@ -0,0 +1,8 @@
+Package: linux-headers@source_suffix@@localversion@
+Meta-Rules-Target: meta
+Meta-Rules-Makeflags-INSTALLDOCS_LINK_DOC: linux-headers-@abiname@@localversion@
+Build-Profiles: <!stage1 !pkg.linux.nokernel !pkg.linux.nometa>
+Depends: linux-headers-@abiname@@localversion@ (= ${binary:Version}), ${misc:Depends}
+Description: Header files for Linux @flavour@ configuration (meta-package)
+ This package depends on the architecture-specific header files for the latest
+ Linux kernel @flavour@ configuration.
diff --git a/debian/templates/headers.meta.maintscript.in b/debian/templates/headers.meta.maintscript.in
new file mode 100644
index 000000000..a4ede2280
--- /dev/null
+++ b/debian/templates/headers.meta.maintscript.in
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/@package@ linux-headers-@abiname@@localversion@ 5.7~rc5-1~exp1 @package@
diff --git a/debian/templates/headers.postinst.in b/debian/templates/headers.postinst.in
new file mode 100755
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/headers.tests-control.in b/debian/templates/headers.tests-control.in
new file mode 100644
index 000000000..f56894d8d
--- /dev/null
+++ b/debian/templates/headers.tests-control.in
@@ -0,0 +1,4 @@
+Tests: kbuild
+Architecture:
+Depends: python3
+Restrictions: superficial
diff --git a/debian/templates/image-dbg.control.in b/debian/templates/image-dbg.control.in
new file mode 100644
index 000000000..3e7175f7e
--- /dev/null
+++ b/debian/templates/image-dbg.control.in
@@ -0,0 +1,9 @@
+Package: linux-image-@abiname@@localversion@-dbg
+Meta-Rules-Target: image-dbg
+Build-Profiles: <!stage1 !pkg.linux.nokernel !pkg.linux.nokerneldbg !pkg.linux.quick>
+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/image-dbg.lintian-overrides.j2 b/debian/templates/image-dbg.lintian-overrides.j2
new file mode 100644
index 000000000..ce59aa995
--- /dev/null
+++ b/debian/templates/image-dbg.lintian-overrides.j2
@@ -0,0 +1,32 @@
+# Kernel dbg packages contain a full image with debug data
+{{package}}: 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
+{% if arch in ['arm64', 'armhf'] %}
+{{package}}: shared-library-lacks-stack-section *usr/lib/debug/lib/modules/{{abiname}}{{localversion}}/vdso/vdso.so*
+{% endif %}
+{% if arch in ['amd64', 'arm64', 'i386', 'ppc64el', 's390x'] %}
+{{package}}: shared-library-lacks-stack-section *usr/lib/debug/lib/modules/{{abiname}}{{localversion}}/vdso/vdso32.so*
+{% endif %}
+{% if arch in ['amd64', 'ppc64el', 's390x'] %}
+{{package}}: shared-library-lacks-stack-section *usr/lib/debug/lib/modules/{{abiname}}{{localversion}}/vdso/vdso64.so*
+{% endif %}
+{% if arch in ['amd64'] %}
+{{package}}: shared-library-lacks-stack-section *usr/lib/debug/lib/modules/{{abiname}}{{localversion}}/vdso/vdsox32.so*
+{% endif %}
+
+# It is intended that 64-bit kernels provide vDSOs for 32-bit executables.
+# lintian currently allows i386 executables on amd64.
+{% if arch in ['arm64', 'ppc64el', 's390x'] %}
+{{package}}: binary-from-other-architecture *usr/lib/debug/lib/modules/{{abiname}}{{localversion}}/vdso/vdso32.so*
+{% endif %}
+{% if arch in ['amd64'] %}
+{{package}}: binary-from-other-architecture *usr/lib/debug/lib/modules/{{abiname}}{{localversion}}/vdso/vdsox32.so*
+{% endif %}
+
+# Some 32-bit architectures need 64-bit kernels and we still build
+# these as the "wrong" architecture rather than mandating multiarch.
+{% if arch in ['hppa', 'mips', 'mipsel', 'powerpc'] %}
+{{package}}: binary-from-other-architecture *usr/lib/debug/*
+{% endif %}
diff --git a/debian/templates/image-dbg.meta.control.in b/debian/templates/image-dbg.meta.control.in
new file mode 100644
index 000000000..b129c1f88
--- /dev/null
+++ b/debian/templates/image-dbg.meta.control.in
@@ -0,0 +1,9 @@
+Package: linux-image@source_suffix@@localversion@-dbg
+Meta-Rules-Target: meta
+Meta-Rules-Makeflags-INSTALLDOCS_LINK_DOC: linux-image-@abiname@@localversion@-dbg
+Build-Profiles: <!stage1 !pkg.linux.nokernel !pkg.linux.nokerneldbg !pkg.linux.nometa !pkg.linux.quick>
+Depends: linux-image-@abiname@@localversion@-dbg (= ${binary:Version}), ${misc:Depends}
+Provides: linux-latest-image-dbg
+Description: Debugging symbols for Linux @flavour@ configuration (meta-package)
+ This package depends on the detached debugging symbols for the latest
+ Linux kernel @flavour@ configuration.
diff --git a/debian/templates/image-dbg.meta.lintian-overrides.in b/debian/templates/image-dbg.meta.lintian-overrides.in
new file mode 100644
index 000000000..aef9e3295
--- /dev/null
+++ b/debian/templates/image-dbg.meta.lintian-overrides.in
@@ -0,0 +1 @@
+@package@: wrong-section-according-to-package-name linux-image@source_suffix@-@flavour@-dbg => debug
diff --git a/debian/templates/image-dbg.meta.maintscript.in b/debian/templates/image-dbg.meta.maintscript.in
new file mode 100644
index 000000000..cd8078c6e
--- /dev/null
+++ b/debian/templates/image-dbg.meta.maintscript.in
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/@package@ linux-image-@abiname@@localversion@-dbg 5.7~rc5-1~exp1 @package@
diff --git a/debian/templates/image-unsigned.control.in b/debian/templates/image-unsigned.control.in
new file mode 100644
index 000000000..5e05f3e04
--- /dev/null
+++ b/debian/templates/image-unsigned.control.in
@@ -0,0 +1,10 @@
+Package: linux-image-@abiname@@localversion@-unsigned
+Meta-Rules-Target: image
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Depends: kmod, linux-base (>= 4.3~), ${misc:Depends}
+Recommends: firmware-linux-free
+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/image-unsigned.lintian-overrides.j2 b/debian/templates/image-unsigned.lintian-overrides.j2
new file mode 120000
index 000000000..495f21e6b
--- /dev/null
+++ b/debian/templates/image-unsigned.lintian-overrides.j2
@@ -0,0 +1 @@
+image.lintian-overrides.j2 \ No newline at end of file
diff --git a/debian/templates/image-unsigned.postinst.in b/debian/templates/image-unsigned.postinst.in
new file mode 120000
index 000000000..0927bf1fd
--- /dev/null
+++ b/debian/templates/image-unsigned.postinst.in
@@ -0,0 +1 @@
+image.postinst.in \ No newline at end of file
diff --git a/debian/templates/image-unsigned.postrm.in b/debian/templates/image-unsigned.postrm.in
new file mode 120000
index 000000000..91fe50b1d
--- /dev/null
+++ b/debian/templates/image-unsigned.postrm.in
@@ -0,0 +1 @@
+image.postrm.in \ No newline at end of file
diff --git a/debian/templates/image-unsigned.preinst.in b/debian/templates/image-unsigned.preinst.in
new file mode 120000
index 000000000..f71396d0e
--- /dev/null
+++ b/debian/templates/image-unsigned.preinst.in
@@ -0,0 +1 @@
+image.preinst.in \ No newline at end of file
diff --git a/debian/templates/image-unsigned.prerm.in b/debian/templates/image-unsigned.prerm.in
new file mode 120000
index 000000000..6f0e8a6ec
--- /dev/null
+++ b/debian/templates/image-unsigned.prerm.in
@@ -0,0 +1 @@
+image.prerm.in \ No newline at end of file
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..7eedf260b
--- /dev/null
+++ b/debian/templates/image.bug/include-1tainted
@@ -0,0 +1,41 @@
+_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
+ # Use debian/bin/update-bug-taint-list to update this
+ _check 0 P 'proprietary module was loaded'
+ _check 1 F 'module was force loaded'
+ _check 2 S 'SMP kernel oops on an officially SMP incapable processor'
+ _check 3 R 'module was force unloaded'
+ _check 4 M 'processor reported a Machine Check Exception (MCE)'
+ _check 5 B 'bad page referenced or some unexpected page flags'
+ _check 6 U 'taint requested by userspace application'
+ _check 7 D 'kernel died recently, i.e. there was an OOPS or BUG'
+ _check 8 A 'ACPI table overridden by user'
+ _check 9 W 'kernel issued warning'
+ _check 10 C 'staging driver was loaded'
+ _check 11 I 'workaround for bug in platform firmware applied'
+ _check 12 O 'externally-built ("out-of-tree") module was loaded'
+ _check 13 E 'unsigned module was loaded'
+ _check 14 L 'soft lockup occurred'
+ _check 15 K 'kernel has been live patched'
+ _check 16 X 'auxiliary taint, defined for and used by distros'
+ _check 17 T 'kernel was built with the struct randomization plugin'
+ 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..91d3cc33c
--- /dev/null
+++ b/debian/templates/image.bug/include-model
@@ -0,0 +1,60 @@
+grep_model() {
+ case "$(uname -m)" in
+ alpha)
+ grep -E '^(system (type|variation|revision)|platform string)\b' /proc/cpuinfo
+ ;;
+ arm*)
+ grep -E '^(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)
+ grep -E '^(system type|cpu model)\b' /proc/cpuinfo
+ ;;
+ parisc|parisc64)
+ grep -E '^(model|[hs]version)\b' /proc/cpuinfo
+ ;;
+ ppc|ppc64|ppc64le)
+ grep -E -i '^(board|machine|model|motherboard|platform|revision|vendor)\b' /proc/cpuinfo
+ ;;
+ s390|s390x)
+ grep -E '^processor\b' /proc/cpuinfo
+ ;;
+ sparc|sparc64)
+ grep -E '^(cpu|fpu|pmu|prom|type)\b' /proc/cpuinfo
+ ;;
+ sh4|sh4a)
+ grep -E '^(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..89d9cb9de
--- /dev/null
+++ b/debian/templates/image.bug/include-network
@@ -0,0 +1,69 @@
+_list_etc_network_interfaces() {
+ local file
+
+ for file in /etc/network/interfaces /etc/network/interfaces.d/*; do
+ if ! [ -f "$file" ]; then
+ continue
+ fi
+ case "${file##*/}" in
+ *[^-a-zA-Z0-9_]*)
+ continue
+ ;;
+ esac
+ echo "$file"
+ done
+}
+
+_add_etc_network_interfaces() {
+ local file
+ test -f /etc/network/interfaces || return 0
+
+ echo '** Network interface configuration:' >&3
+
+ while read file; do
+ if ! [ -r "$file" ]; then
+ echo "*** $file: unreadable" >&3
+ echo >&3
+ continue
+ fi
+ echo "*** $file:" >&3
+ # Hide passwords/keys
+ awk '$1 ~ /key|pass|^wpa-(anonymous|identity|phase|pin|private|psk)/ { gsub(".", "*", $2); }
+ $1 == "ethtool-wol" { gsub(".", "*", $3); }
+ !/^[[:space:]]*\#/ { print; }
+ ' <"$file" >&3
+ echo >&3
+ done < <(_list_etc_network_interfaces)
+}
+
+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
+ test -f /etc/network/interfaces || 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.control.in b/debian/templates/image.control.in
new file mode 100644
index 000000000..d1738e0ec
--- /dev/null
+++ b/debian/templates/image.control.in
@@ -0,0 +1,8 @@
+Package: linux-image-@abiname@@localversion@
+Meta-Rules-Target: image
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Depends: kmod, linux-base (>= 4.3~), linux-bootwrapper-@abiname@ [powerpc ppc64], ${misc:Depends}
+Recommends: firmware-linux-free
+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/image.lintian-overrides.j2 b/debian/templates/image.lintian-overrides.j2
new file mode 100644
index 000000000..2bd64b413
--- /dev/null
+++ b/debian/templates/image.lintian-overrides.j2
@@ -0,0 +1,13 @@
+# Some 32-bit architectures need 64-bit kernels and we still build
+# these as the "wrong" architecture rather than mandating multiarch.
+{% if arch in ['mips', 'mipsel'] %}
+{{package}}: binary-from-other-architecture *boot/vmlinu*
+{% endif %}
+{% if arch in ['hppa', 'mips', 'mipsel', 'powerpc'] %}
+{{package}}: binary-from-other-architecture *lib/modules/*
+{% endif %}
+
+# vmlinux needs extra sections that would normally be stripped.
+{% if arch in ['mips64el', 'mipsel', 'ppc64el'] %}
+{{package}}: unstripped-binary-or-object *boot/vmlinu*
+{% endif %}
diff --git a/debian/templates/image.meta.bug-presubj.in b/debian/templates/image.meta.bug-presubj.in
new file mode 100644
index 000000000..1f2c5e9c7
--- /dev/null
+++ b/debian/templates/image.meta.bug-presubj.in
@@ -0,0 +1,5 @@
+You are about to report a bug in a Linux kernel meta package.
+This is probably not what you intended to do.
+
+If you want to report a bug in the Linux kernel or modules, you should use
+the package name linux-image-@abiname@@localversion@ instead.
diff --git a/debian/templates/image.meta.control.in b/debian/templates/image.meta.control.in
new file mode 100644
index 000000000..e9e8314e1
--- /dev/null
+++ b/debian/templates/image.meta.control.in
@@ -0,0 +1,9 @@
+Package: linux-image@source_suffix@@localversion@
+Meta-Rules-Target: meta
+Meta-Rules-Makeflags-INSTALLDOCS_LINK_DOC: linux-image-@abiname@@localversion@
+Build-Profiles: <!stage1 !pkg.linux.nokernel !pkg.linux.nometa>
+Depends: linux-image-@abiname@@localversion@ (= ${binary:Version}), ${misc:Depends}
+Provides: linux-latest-modules-@abiname@@localversion@, wireguard-modules (= 1.0.0), virtualbox-guest-modules [amd64 i386]
+Description: Linux for @class@ (meta-package)
+ This package depends on the latest Linux kernel and modules for use on
+ @longclass@.
diff --git a/debian/templates/image.meta.maintscript.in b/debian/templates/image.meta.maintscript.in
new file mode 100644
index 000000000..f708b9c94
--- /dev/null
+++ b/debian/templates/image.meta.maintscript.in
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/@package@ linux-image-@abiname@@localversion@ 5.7~rc5-1~exp1 @package@
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/image.tests-control.in b/debian/templates/image.tests-control.in
new file mode 100644
index 000000000..62497c67a
--- /dev/null
+++ b/debian/templates/image.tests-control.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/libc-dev.control.in b/debian/templates/libc-dev.control.in
new file mode 100644
index 000000000..51a7970d0
--- /dev/null
+++ b/debian/templates/libc-dev.control.in
@@ -0,0 +1,9 @@
+Package: linux-libc-dev
+Meta-Rules-Target: libc-dev
+Section: devel
+Architecture: linux-any
+Depends: ${misc:Depends}
+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/main.control.in b/debian/templates/main.control.in
new file mode 100644
index 000000000..298609d9f
--- /dev/null
+++ b/debian/templates/main.control.in
@@ -0,0 +1,12 @@
+Package: @source_basename@-support-@abiname@
+Meta-Rules-Target: support
+Build-Profiles: <!stage1>
+Architecture: all
+Section: devel
+Depends: ${python3:Depends}, python3-jinja2, ${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/main.tests-control.in b/debian/templates/main.tests-control.in
new file mode 100644
index 000000000..0b2e2daf0
--- /dev/null
+++ b/debian/templates/main.tests-control.in
@@ -0,0 +1,3 @@
+Tests: python
+Depends: python3
+Restrictions: superficial
diff --git a/debian/templates/signed-template.control.in b/debian/templates/signed-template.control.in
new file mode 100644
index 000000000..a548ebc06
--- /dev/null
+++ b/debian/templates/signed-template.control.in
@@ -0,0 +1,7 @@
+Package: linux-image@source_suffix@-@arch@-signed-template
+Meta-Rules-Target: signed-template
+Build-Profiles: <!stage1 !pkg.linux.nokernel>
+Depends: dpkg-dev, python3:any, ${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/source.control.in b/debian/templates/source.control.in
new file mode 100644
index 000000000..9a4f1417e
--- /dev/null
+++ b/debian/templates/source.control.in
@@ -0,0 +1,44 @@
+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 <benh@debian.org>, Salvatore Bonaccorso <carnil@debian.org>
+Standards-Version: 4.2.0
+Build-Depends:
+ debhelper-compat (= 12), dh-exec,
+# used to run debian/bin/*.py
+ python3:native,
+ python3-jinja2:native,
+# 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.102~) <!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 images; host arch for
+# linux-kbuild), perf (host arch)
+ libelf-dev:native <!stage1 !pkg.linux.nokernel>,
+ libelf-dev <!stage1 !pkg.linux.notools>,
+# used by upstream headers_install target and by debian/rules.d/tools/usb/usbip
+ rsync,
+ lz4 [amd64 arm64] <!stage1 !pkg.linux.nokernel>,
+# used for bft debug info
+ pahole <!stage1 !pkg.linux.nokernel> | dwarves:native (>= 1.16~) <!stage1 !pkg.linux.nokernel>,
+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/sourcebin.control.in b/debian/templates/sourcebin.control.in
new file mode 100644
index 000000000..d179006d2
--- /dev/null
+++ b/debian/templates/sourcebin.control.in
@@ -0,0 +1,16 @@
+Package: @source_basename@-source-@version@
+Meta-Rules-Target: source
+Build-Profiles: <!stage1 !pkg.linux.nosource !pkg.linux.quick>
+Architecture: all
+Section: kernel
+Build-Depends: patchutils
+Depends: binutils, xz-utils, ${misc:Depends}
+Recommends: build-essential, bc, rsync, kmod, cpio, bison, flex, libelf-dev, libssl-dev, @source_basename@-config-@version@
+Suggests: libncurses-dev | ncurses-dev, qtbase5-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/sourcebin.meta.control.in b/debian/templates/sourcebin.meta.control.in
new file mode 100644
index 000000000..dabe394a9
--- /dev/null
+++ b/debian/templates/sourcebin.meta.control.in
@@ -0,0 +1,9 @@
+Package: @source_basename@-source@source_suffix@
+Meta-Rules-Target: meta
+Meta-Rules-Makeflags-INSTALLDOCS_LINK_DOC: @source_basename@-source-@version@
+Build-Profiles: <!stage1 !pkg.linux.nosource !pkg.linux.nometa !pkg.linux.quick>
+Architecture: all
+Depends: @source_basename@-source-@version@ (= ${binary:Version}), ${misc:Depends}
+Description: Linux kernel source (meta-package)
+ This package depends on packages containing the sources of the latest Linux
+ kernel.
diff --git a/debian/templates/sourcebin.meta.maintscript.in b/debian/templates/sourcebin.meta.maintscript.in
new file mode 100644
index 000000000..9b8a862ae
--- /dev/null
+++ b/debian/templates/sourcebin.meta.maintscript.in
@@ -0,0 +1 @@
+dir_to_symlink /usr/share/doc/@package@ @source_basename@-source-@version@ 5.7~rc5-1~exp1 @package@
diff --git a/debian/templates/tools-unversioned.control.in b/debian/templates/tools-unversioned.control.in
new file mode 100644
index 000000000..bb1591746
--- /dev/null
+++ b/debian/templates/tools-unversioned.control.in
@@ -0,0 +1,150 @@
+Package: bpftool
+Meta-Rules-Target: bpftool
+Build-Profiles: <!stage1 !pkg.linux.notools !pkg.linux.mintools>
+Section: devel
+Architecture: linux-any
+Build-Depends:
+ python3-docutils <!stage1 !nodoc !pkg.linux.notools>,
+ libelf-dev,
+ zlib1g-dev,
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Inspection and simple manipulation of BPF programs and maps
+ The bpftool command allows for inspection and simple modification of
+ Berkeley Packet Filter (BPF) objects on the system.
+
+Package: linux-cpupower
+Meta-Rules-Target: cpupower
+Build-Profiles: <!stage1 !pkg.linux.notools !pkg.linux.mintools>
+Section: admin
+Architecture: linux-any
+Build-Depends:
+ libcap-dev,
+ 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 supports these features. It
+ replaces "cpufreq-info" and "cpufreq-set" in cpufrequtils.
+ .
+ ${cpupower:Arch-Description}
+
+Package: libcpupower1
+Meta-Rules-Target: cpupower
+Build-Profiles: <!stage1 !pkg.linux.notools !pkg.linux.mintools>
+Section: libs
+Architecture: linux-any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: CPU frequency and voltage scaling tools for Linux (libraries)
+ libcpupower is a library for inspecting and controlling cpufreq and
+ cpuidle tunables.
+ .
+ This package contains the shared library.
+
+Package: libcpupower-dev
+Meta-Rules-Target: cpupower
+Build-Profiles: <!stage1 !pkg.linux.notools !pkg.linux.mintools>
+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)
+ libcpupower is a library for inspecting and controlling cpufreq and
+ cpuidle tunables.
+ .
+ This package is needed to compile programs against libcpupower.
+
+Package: linux-perf
+Meta-Rules-Target: perf
+Build-Profiles: <!stage1 !pkg.linux.notools !pkg.linux.mintools !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 riscv64 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,
+ libdw-dev,
+ libiberty-dev,
+ libnewt-dev,
+ libnuma-dev,
+ libopencsd-dev (>= 1.1.1),
+ libperl-dev,
+ libpython3-dev,
+ libunwind-dev [amd64 arm64 armel armhf hppa i386 mips mips64 mips64el mipsel powerpc ppc64 ppc64el sh4],
+ libzstd-dev,
+ python3-dev:any,
+ python3-setuptools,
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ${python3:Depends}
+Provides: linux-tools-@version@
+Conflicts: linux-tools-@version@
+Replaces: linux-tools-@version@
+Suggests: linux-doc-@version@
+Description: Performance analysis tools for Linux
+ This package contains the 'perf' performance analysis tools for Linux.
+
+Package: usbip
+Meta-Rules-Target: usbip
+Build-Profiles: <!stage1 !pkg.linux.notools !pkg.linux.mintools>
+Architecture: linux-any
+Build-Depends:
+ autoconf,
+ automake,
+ libtool,
+ libglib2.0-dev,
+ libudev-dev,
+ libwrap0-dev,
+Depends: usb.ids, ${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
+Meta-Rules-Target: hyperv-daemons
+Build-Profiles: <!stage1 !pkg.linux.notools !pkg.linux.mintools>
+Architecture: i386 amd64 x32 arm64
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${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: rtla
+Meta-Rules-Target: rtla
+Build-Profiles: <!stage1 !pkg.linux.notools !pkg.linux.mintools>
+Architecture: amd64 arm64 armhf i386 x32
+Build-Depends: libtracefs-dev (>= 1.3), libtraceevent-dev (>= 1:1.5), python3-docutils
+Depends: ${shlibs:Depends}
+Section: devel
+Description: Real-Time Linux Analysis tools
+ rtla provides a set of commands for analysing the real-time
+ properties of Linux. rtla uses kernel tracing capabilities to
+ provide precise information about the properties and root causes of
+ unexpected results.
diff --git a/debian/templates/tools-versioned.control.in b/debian/templates/tools-versioned.control.in
new file mode 100644
index 000000000..84480de13
--- /dev/null
+++ b/debian/templates/tools-versioned.control.in
@@ -0,0 +1,18 @@
+Package: linux-kbuild-@version@
+Meta-Rules-Target: kbuild
+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-bootwrapper-@abiname@
+Meta-Rules-Target: bootwrapper
+Build-Profiles: <!stage1 !pkg.linux.notools>
+Architecture: powerpc 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.