diff options
Diffstat (limited to 'debian/templates')
69 files changed, 1089 insertions, 0 deletions
diff --git a/debian/templates/config.control.in b/debian/templates/config.control.in new file mode 100644 index 0000000000..0248dafdc0 --- /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: <!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 0000000000..0f9529bc67 --- /dev/null +++ b/debian/templates/docs.control.in @@ -0,0 +1,15 @@ +Package: @source_basename@-doc-@version@ +Meta-Rules-Target: doc +Build-Profiles: <!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 0000000000..c97e3db3b0 --- /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: <!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 0000000000..7c1750a4a9 --- /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 0000000000..e69de29bb2 --- /dev/null +++ b/debian/templates/extra.control.in diff --git a/debian/templates/headers.control.in b/debian/templates/headers.control.in new file mode 100644 index 0000000000..ab1439820e --- /dev/null +++ b/debian/templates/headers.control.in @@ -0,0 +1,15 @@ +Package: linux-headers-@abiname@@localversion@ +Meta-Rules-Target: headers +Build-Profiles: <!pkg.linux.nokernel> +Depends: + linux-headers-@abiname@-common@localversion_headers@ (= ${source:Version}), + linux-image-@abiname@@localversion@ (= ${binary:Version}) | linux-image-@abiname@@localversion@-unsigned (= ${binary:Version}), + linux-kbuild-@abiname@, + ${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 0000000000..cc7658f293 --- /dev/null +++ b/debian/templates/headers.featureset.control.in @@ -0,0 +1,15 @@ +Package: linux-headers-@abiname@-common@localversion@ +Meta-Rules-Target: headers-common +Build-Profiles: <!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. These files are going to be installed into + /usr/src/linux-headers-@abiname@-common@localversion@. + . + 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 0000000000..d5df832857 --- /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: <!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 0000000000..a4ede22804 --- /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 100644 index 0000000000..c13e6dc54e --- /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 0000000000..f56894d8da --- /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 0000000000..770403bfaa --- /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: <!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 0000000000..ce59aa9957 --- /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 0000000000..b2af08dd11 --- /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: <!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 0000000000..aef9e32953 --- /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 0000000000..cd8078c6ea --- /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.NEWS.in b/debian/templates/image-unsigned.NEWS.in new file mode 120000 index 0000000000..e70f537c2f --- /dev/null +++ b/debian/templates/image-unsigned.NEWS.in @@ -0,0 +1 @@ +image.NEWS.in
\ No newline at end of file diff --git a/debian/templates/image-unsigned.control.in b/debian/templates/image-unsigned.control.in new file mode 100644 index 0000000000..40b656f068 --- /dev/null +++ b/debian/templates/image-unsigned.control.in @@ -0,0 +1,15 @@ +Package: linux-image-@abiname@@localversion@-unsigned +Meta-Rules-Target: image +Build-Profiles: <!pkg.linux.nokernel> +Build-Depends: +# used by debian/rules.real to build udebs + kernel-wedge (>= 2.105~), +# used by kernel-wedge (only on Linux, thus not declared as a dependency) + kmod, +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 0000000000..495f21e6bc --- /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 0000000000..0927bf1fd4 --- /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 0000000000..91fe50b1da --- /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 0000000000..f71396d0e8 --- /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 0000000000..6f0e8a6ec8 --- /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.NEWS.in b/debian/templates/image.NEWS.in new file mode 100644 index 0000000000..f8e1fc0229 --- /dev/null +++ b/debian/templates/image.NEWS.in @@ -0,0 +1,83 @@ +linux (5.10.46-4) unstable; urgency=medium + + * From Linux 5.10.46-4, unprivileged calls to bpf() are disabled by + default, mitigating several security issues. However, an admin can + still change this setting later on, if needed, by writing 0 or 1 to + the kernel.unprivileged_bpf_disabled sysctl. + + If you prefer to keep unprivileged calls to bpf() enabled, set the + sysctl: + + kernel.unprivileged_bpf_disabled = 0 + + which is the upstream default. + + -- Salvatore Bonaccorso <carnil@debian.org> Mon, 02 Aug 2021 22:59:24 +0200 + +linux (5.10~rc7-1~exp2) unstable; urgency=medium + + * From Linux 5.10, all users are allowed to create user namespaces by + default. This will allow programs such as web browsers and container + managers to create more restricted sandboxes for untrusted or + less-trusted code, without the need to run as root or to use a + setuid-root helper. + + The previous Debian default was to restrict this feature to processes + running as root, because it exposed more security issues in the + kernel. However, the security benefits of more widespread sandboxing + probably now outweigh this risk. + + If you prefer to keep this feature restricted, set the sysctl: + + kernel.unprivileged_userns_clone = 0 + + -- Ben Hutchings <benh@debian.org> Sun, 13 Dec 2020 17:11:36 +0100 + +linux-latest (86) unstable; urgency=medium + + * From Linux 4.13.10-1, AppArmor is enabled by default. This allows + defining a "profile" for each installed program that can mitigate + security vulnerabilities in it. However, an incorrect profile might + disable some functionality of the program. + + In case you suspect that an AppArmor profile is incorrect, see + <https://lists.debian.org/debian-devel/2017/11/msg00178.html> and + consider reporting a bug in the package providing the profile. The + profile may be part of the program's package or apparmor-profiles. + + -- Ben Hutchings <ben@decadent.org.uk> Thu, 30 Nov 2017 20:08:25 +0000 + +linux-latest (81) unstable; urgency=medium + + * From Linux 4.10, the old 'virtual syscall' interface on 64-bit PCs + (amd64) is disabled. This breaks chroot environments and containers + that use (e)glibc 2.13 and earlier, including those based on Debian 7 + or RHEL/CentOS 6. To re-enable it, set the kernel parameter: + vsyscall=emulate + + -- Ben Hutchings <ben@decadent.org.uk> Fri, 30 Jun 2017 23:50:03 +0100 + +linux-latest (76) unstable; urgency=medium + + * From Linux 4.8, several changes have been made in the kernel + configuration to 'harden' the system, i.e. to mitigate security bugs. + Some changes may cause legitimate applications to fail, and can be + reverted by run-time configuration: + - On most architectures, the /dev/mem device can no longer be used to + access devices that also have a kernel driver. This breaks dosemu + and some old user-space graphics drivers. To allow this, set the + kernel parameter: iomem=relaxed + - The kernel log is no longer readable by unprivileged users. To + allow this, set the sysctl: kernel.dmesg_restrict=0 + + -- Ben Hutchings <ben@decadent.org.uk> Sat, 29 Oct 2016 02:05:32 +0100 + +linux-latest (75) unstable; urgency=medium + + * From Linux 4.7, the iptables connection tracking system will no longer + automatically load helper modules. If your firewall configuration + depends on connection tracking helpers, you should explicitly load the + required modules. For more information, see + <https://home.regit.org/netfilter-en/secure-use-of-helpers/>. + + -- Ben Hutchings <ben@decadent.org.uk> Sat, 29 Oct 2016 01:53:18 +0100 diff --git a/debian/templates/image.bug/control b/debian/templates/image.bug/control new file mode 100644 index 0000000000..b60912c4cd --- /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 0000000000..b5b32bfbd1 --- /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 0000000000..3fcc940982 --- /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 0000000000..8ae5e4766d --- /dev/null +++ b/debian/templates/image.bug/include-1tainted @@ -0,0 +1,42 @@ +_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 'kernel running on an out of specification system' + _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' + _check 18 N 'an in-kernel test has been run' + 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 0000000000..634dc99acb --- /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 0000000000..91d3cc33c1 --- /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 0000000000..22271c9058 --- /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 0000000000..89d9cb9de4 --- /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 0000000000..8e6528e5a7 --- /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 0000000000..43285bd6a9 --- /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 0000000000..e8eb67e42d --- /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 0000000000..59b891acb9 --- /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 0000000000..8e0b5d557d --- /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 0000000000..8998e61ba1 --- /dev/null +++ b/debian/templates/image.control.in @@ -0,0 +1,13 @@ +Package: linux-image-@abiname@@localversion@ +Meta-Rules-Target: image +Build-Profiles: <!pkg.linux.nokernel> +Build-Depends: +# used by debian/rules.real to build udebs + kernel-wedge (>= 2.105~), +# used by kernel-wedge (only on Linux, thus not declared as a dependency) + kmod, +Depends: kmod, linux-base (>= 4.3~), ${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 0000000000..2bd64b4135 --- /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 0000000000..1f2c5e9c75 --- /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 0000000000..386dd78cfd --- /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: <!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 0000000000..f708b9c94c --- /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 100644 index 0000000000..25e7dd6546 --- /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 100644 index 0000000000..4298752b33 --- /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 100644 index 0000000000..8a5658ecd1 --- /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 100644 index 0000000000..f1bde29b11 --- /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 0000000000..62497c67ae --- /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 0000000000..117d407acd --- /dev/null +++ b/debian/templates/libc-dev.control.in @@ -0,0 +1,13 @@ +Package: linux-libc-dev +Meta-Rules-Target: libc-dev +Section: devel +Architecture: all +Build-Depends: +# used by upstream headers_install target + rsync, +Depends: ${misc:Depends} +Multi-Arch: foreign +Description: Linux support headers for userspace development + This package provides userspaces headers from the Linux kernel. These files + are going to be installed into /usr/include, and 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 0000000000..beee1d1b29 --- /dev/null +++ b/debian/templates/main.control.in @@ -0,0 +1,12 @@ +Package: @source_basename@-support-@abiname@ +Meta-Rules-Target: support +Build-Profiles: <!pkg.linux.notools> +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 0000000000..7b8fca661e --- /dev/null +++ b/debian/templates/main.tests-control.in @@ -0,0 +1,3 @@ +Test-Command: py.test debian/lib/python +Depends: python3-pytest, python3-jinja2 +Restrictions: superficial diff --git a/debian/templates/signed-template.control.in b/debian/templates/signed-template.control.in new file mode 100644 index 0000000000..36553a335c --- /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: <!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/signed-template.lintian-overrides.in b/debian/templates/signed-template.lintian-overrides.in new file mode 100644 index 0000000000..7fef9b1c52 --- /dev/null +++ b/debian/templates/signed-template.lintian-overrides.in @@ -0,0 +1 @@ +linux-image@source_suffix@-@arch@-signed-template: script-not-executable diff --git a/debian/templates/signed.headers.meta.control.in b/debian/templates/signed.headers.meta.control.in new file mode 120000 index 0000000000..821bbb63e6 --- /dev/null +++ b/debian/templates/signed.headers.meta.control.in @@ -0,0 +1 @@ +headers.meta.control.in
\ No newline at end of file diff --git a/debian/templates/signed.headers.meta.lintian-overrides.in b/debian/templates/signed.headers.meta.lintian-overrides.in new file mode 100644 index 0000000000..4a0a7c08ce --- /dev/null +++ b/debian/templates/signed.headers.meta.lintian-overrides.in @@ -0,0 +1,3 @@ +# linux-signed-* source packages are generated by the linux source +# package, so it is OK for their binaries to share documentation +@package@: usr-share-doc-symlink-to-foreign-package linux-headers-@abiname@@localversion@ diff --git a/debian/templates/signed.headers.meta.maintscript.in b/debian/templates/signed.headers.meta.maintscript.in new file mode 120000 index 0000000000..d711dac3e0 --- /dev/null +++ b/debian/templates/signed.headers.meta.maintscript.in @@ -0,0 +1 @@ +headers.meta.maintscript.in
\ No newline at end of file diff --git a/debian/templates/signed.image.NEWS.in b/debian/templates/signed.image.NEWS.in new file mode 120000 index 0000000000..e70f537c2f --- /dev/null +++ b/debian/templates/signed.image.NEWS.in @@ -0,0 +1 @@ +image.NEWS.in
\ No newline at end of file diff --git a/debian/templates/signed.image.control.in b/debian/templates/signed.image.control.in new file mode 100644 index 0000000000..de85cfeb45 --- /dev/null +++ b/debian/templates/signed.image.control.in @@ -0,0 +1,23 @@ +Package: linux-image-@abiname@@localversion@ +Meta-Rules-Target: image +Meta-Sign-Package: linux-image-@abiname@@localversion@-unsigned +Meta-Sign-Files: boot/@image-stem@-@abiname@@localversion@:efi +Build-Profiles: <!pkg.linux.nokernel> +Build-Depends: + linux-image-@abiname@@localversion@-unsigned (= @signedtemplate_binaryversion@), +# used by debian/rules.real to build udebs + kernel-wedge (>= 2.105~), +# used by kernel-wedge (only on Linux, thus not declared as a dependency) + kmod, +# Used by debian/signing_templates/rules.real + rsync, +Built-Using: @source_basename@@source_suffix@ (= @version_complete@) +Depends: kmod, linux-base (>= 4.3~), ${misc:Depends} +Recommends: firmware-linux-free +Conflicts: linux-image-@abiname@@localversion@-unsigned +Replaces: linux-image-@abiname@@localversion@-unsigned +Suggests: linux-doc-@version@, debian-kernel-handbook +Description: Linux @upstreamversion@ for @class@ (signed) + The Linux kernel @upstreamversion@ and modules for use on @longclass@. + . + The kernel image is signed for use with Secure Boot. diff --git a/debian/templates/signed.image.postinst.in b/debian/templates/signed.image.postinst.in new file mode 120000 index 0000000000..0927bf1fd4 --- /dev/null +++ b/debian/templates/signed.image.postinst.in @@ -0,0 +1 @@ +image.postinst.in
\ No newline at end of file diff --git a/debian/templates/signed.image.postrm.in b/debian/templates/signed.image.postrm.in new file mode 120000 index 0000000000..91fe50b1da --- /dev/null +++ b/debian/templates/signed.image.postrm.in @@ -0,0 +1 @@ +image.postrm.in
\ No newline at end of file diff --git a/debian/templates/signed.image.preinst.in b/debian/templates/signed.image.preinst.in new file mode 120000 index 0000000000..f71396d0e8 --- /dev/null +++ b/debian/templates/signed.image.preinst.in @@ -0,0 +1 @@ +image.preinst.in
\ No newline at end of file diff --git a/debian/templates/signed.image.prerm.in b/debian/templates/signed.image.prerm.in new file mode 120000 index 0000000000..6f0e8a6ec8 --- /dev/null +++ b/debian/templates/signed.image.prerm.in @@ -0,0 +1 @@ +image.prerm.in
\ No newline at end of file diff --git a/debian/templates/signed.source.control.in b/debian/templates/signed.source.control.in new file mode 100644 index 0000000000..1f55a8e35d --- /dev/null +++ b/debian/templates/signed.source.control.in @@ -0,0 +1,14 @@ +Source: linux-signed@source_suffix@-@arch@ +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, + python3:any, + sbsigntool [amd64 arm64 i386], +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/signed.source.lintian-overrides.in b/debian/templates/signed.source.lintian-overrides.in new file mode 100644 index 0000000000..34d68e762b --- /dev/null +++ b/debian/templates/signed.source.lintian-overrides.in @@ -0,0 +1,7 @@ +# linux-signed-* source packages are generated by the linux source +# package, and produce binaries with the same versions, even in case +# of a binNMU of linux +linux-signed-@arch@ source: version-substvar-for-external-package Depends *${binary:Version} linux-headers-* -> linux-headers-* + +# The changelog is mostly copied from linux which is non-native +linux-signed-@arch@ source: odd-historical-debian-changelog-version * (for native)* diff --git a/debian/templates/source.control.in b/debian/templates/source.control.in new file mode 100644 index 0000000000..7c64616706 --- /dev/null +++ b/debian/templates/source.control.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 <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 <!pkg.linux.nokernel>, +# used by upstream to compress kernel and by debian/rules.real to build linux-source + xz-utils <!pkg.linux.nokernel !pkg.linux.nosource>, +# used by debian/rules.real to build linux-perf and linux-support + dh-python <!pkg.linux.notools>, +# used by upstream to build genksyms, kconfig, and perf + bison <!pkg.linux.nokernel>, flex (>= 2.6.1-1.1~) <!pkg.linux.nokernel>, +Build-Depends-Arch: +# used by upstream to build include/generated/timeconst.h + bc <!pkg.linux.nokernel>, +# used by upstream to build signing tools and to process certificates + libssl-dev:native <!pkg.linux.nokernel>, + libssl-dev <!pkg.linux.notools>, + openssl (>= 1.1.0-1~) <!pkg.linux.nokernel>, +# used by upstream to build objtool (native for images; host arch for +# linux-kbuild), perf (host arch) + libelf-dev:native <!pkg.linux.nokernel>, + libelf-dev <!pkg.linux.notools>, + lz4 [amd64 arm64] <!pkg.linux.nokernel>, +# used for bft debug info + pahole <!pkg.linux.nokernel> | dwarves:native (>= 1.16~) <!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 0000000000..8f6569d770 --- /dev/null +++ b/debian/templates/sourcebin.control.in @@ -0,0 +1,16 @@ +Package: @source_basename@-source-@version@ +Meta-Rules-Target: source +Build-Profiles: <!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 0000000000..d176644b52 --- /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: <!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 0000000000..9b8a862ae1 --- /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 0000000000..85e9f49e9f --- /dev/null +++ b/debian/templates/tools-unversioned.control.in @@ -0,0 +1,153 @@ +Package: bpftool +Meta-Rules-Target: bpftool +Build-Profiles: <!pkg.linux.notools !pkg.linux.mintools> +Section: devel +Architecture: linux-any +Build-Depends: + python3-docutils <!nodoc !pkg.linux.notools>, + binutils-dev [hppa], + 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: <!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: <!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: <!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: <!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 <!nodoc !pkg.linux.notools !nopython>, + gcc-multilib [amd64 mips64 mips64el mips64r6 mips64r6el ppc64 s390x sparc64], + libaudit-dev, + libbabeltrace-dev, + libdw-dev, + libnewt-dev, + libnuma-dev, + libopencsd-dev (>= 1.1.1), + libperl-dev, + libpython3-dev, + libtraceevent-dev (>= 1:1.5), + 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: <!pkg.linux.notools !pkg.linux.mintools> +Architecture: linux-any +Build-Depends: + autoconf, + automake, + libtool, + libglib2.0-dev, + libudev-dev, + libwrap0-dev, +# debian/rules.d/tools/usb/usbip + rsync, +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: <!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: <!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 0000000000..91e126fa1b --- /dev/null +++ b/debian/templates/tools-versioned.control.in @@ -0,0 +1,8 @@ +Package: linux-kbuild-@abiname@ +Meta-Rules-Target: kbuild +Build-Profiles: <!pkg.linux.notools> +Architecture: linux-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: foreign +Description: Kbuild infrastructure for Linux @abiname@ + This package provides the kbuild infrastructure for the headers packages for Linux kernel version @version@. |