Binary files 4.14/.ruff_cache/0.12.2/3382917411769416560 and 4.14ubuntu2/.ruff_cache/0.12.2/3382917411769416560 differ
diff -pruN 4.14/.ruff_cache/CACHEDIR.TAG 4.14ubuntu2/.ruff_cache/CACHEDIR.TAG
--- 4.14/.ruff_cache/CACHEDIR.TAG	1970-01-01 00:00:00.000000000 +0000
+++ 4.14ubuntu2/.ruff_cache/CACHEDIR.TAG	2025-09-01 12:41:42.000000000 +0000
@@ -0,0 +1 @@
+Signature: 8a477f597d28d172789f06886806bc55
\ No newline at end of file
diff -pruN 4.14/apport/source_linux.py 4.14ubuntu2/apport/source_linux.py
--- 4.14/apport/source_linux.py	1970-01-01 00:00:00.000000000 +0000
+++ 4.14ubuntu2/apport/source_linux.py	2025-09-01 12:41:42.000000000 +0000
@@ -0,0 +1,190 @@
+"""Apport package hook for the Linux kernel.
+
+(c) 2025 Canonical Ltd.
+Contributors:
+Matt Zimmerman <mdz@canonical.com>
+Martin Pitt <martin.pitt@canonical.com>
+Brian Murray <brian@canonical.com>
+Juerg Haefliger <juerg.haefliger@canonical.com>
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
+the full text of the license.
+"""
+
+import glob
+import os
+import re
+
+import apport
+import apport.hookutils
+
+
+def is_ubuntu_kernel(report, ui):
+    """Check if the running kernel is an Ubuntu kernel."""
+    # If running an upstream kernel, instruct reporter to file bug upstream
+    abi = re.search("-(.*?)-", report["Uname"])
+    if abi and (abi.group(1) == "999" or re.search("^0\\d", abi.group(1))):
+        ui.information(
+            "It appears you are currently running a mainline kernel.  It would"
+            " be better to report this bug upstream at"
+            " http://bugzilla.kernel.org/ so that the upstream kernel"
+            " developers are aware of the issue.  If you'd still like to file"
+            " a bug against the Ubuntu kernel, please boot with an official"
+            " Ubuntu kernel and re-file."
+        )
+        report["UnreportableReason"] = "The running kernel is not an Ubuntu kernel."
+        return False
+
+    version_signature = report.get("ProcVersionSignature", "")
+    if not version_signature.startswith("Ubuntu ") and "CrashDB" not in report:
+        report["UnreportableReason"] = "The running kernel is not an Ubuntu kernel."
+        return False
+
+    return True
+
+
+def attach_data(report, _ui):
+    """Attach relevant data for kernel problems."""
+    apport.hookutils.attach_hardware(report)
+    apport.hookutils.attach_alsa(report)
+    apport.hookutils.attach_wifi(report)
+    apport.hookutils.attach_file(report, "/proc/fb", "ProcFB")
+
+    apport.hookutils.attach_file_if_exists(
+        report, "/etc/initramfs-tools/conf.d/resume", key="HibernationDevice"
+    )
+
+    # Attach the version of related packages
+    apport.hookutils.attach_related_packages(report, ["firmware-sof", "linux-firmware"])
+
+    # Attach the list of installed packages
+    if report.get("ProblemType", "") == "Package":
+        report["DpkgList"] = apport.hookutils.command_output(["dpkg", "--list"])
+
+
+def check_for_staging_drivers(report, _ui):
+    """Scan the kernel log for loaded staging drivers."""
+    staging_drivers = re.findall(
+        "(\\w+): module is from the staging directory", report["CurrentDmesg"]
+    )
+    if staging_drivers:
+        staging_drivers = list(set(staging_drivers))
+        report["StagingDrivers"] = " ".join(staging_drivers)
+        report["Tags"] += " staging"
+        # Only if there is an existing title prepend '[STAGING]'.
+        # Changed to prevent bug titles with just '[STAGING] '.
+        if report.get("Title"):
+            report["Title"] = "[STAGING] " + report.get("Title")
+
+
+def add_duplicate_crash_signature(report, _ui):
+    """Add crash signature for duplicate checks."""
+    if "Failure" in report and (
+        "resume" in report["Failure"] or "suspend" in report["Failure"]
+    ):
+        crash_signature = report.crash_signature()
+        if crash_signature:
+            report["DuplicateSignature"] = crash_signature
+
+
+def is_dkms_build_failure(report, ui):
+    """Check if the trigger is a DKMS build failure."""
+    if report.get("ProblemType", "") != "Package":
+        return False
+
+    # Collect the DKMS build logs. We only consider the first log. There should
+    # only be one anyways, right??
+    build_logs = glob.glob("/var/lib/dkms/*/*/build/make.log")
+    if not build_logs:
+        return False
+    build_log = build_logs[0]
+
+    dkms_source = os.path.realpath(
+        os.path.join(os.path.dirname(build_log), os.pardir, "source")
+    )
+    package = apport.packaging.get_file_package(dkms_source)
+    if package and apport.packaging.is_distro_package(package):
+        # This is a build failure from an offical DKMS, redirect the report there
+        report.add_package_info(package)
+        report["DkmsStatus"] = apport.hookutils.command_output(["dkms", "status"])
+        apport.hookutils.attach_file(report, build_log, "dkms-make.log")
+        return True
+
+    # Unofficial DKMS build failure, reject the report.
+    ui.information(
+        "It appears you have an unofficial third-party DKMS module installed that"
+        " fails to build for at least one of your installed kernels. You need to"
+        " remove this module or the installation of kernel headers packages will"
+        " continue to fail. You should also report this to the provider of the"
+        f" DKMS module. See {build_log} for details about the build failure."
+    )
+    report["UnreportableReason"] = (
+        "The failing DKMS module is not an Ubuntu DKMS module."
+    )
+    return True
+
+
+def is_aborted_kernel_removal(report, _ui):
+    """Check if the trigger is an aborted removal of the running kernel."""
+    if report.get("ProblemType", "") != "Package":
+        return False
+
+    dpkg_log = report.get("DpkgTerminalLog.txt")
+    if dpkg_log and "E: Aborting removal of the running kernel" in "".join(dpkg_log):
+        report["UnreportableReason"] = (
+            "The user aborted the removal of the running kernel."
+        )
+        return True
+
+    return False
+
+
+def add_info(report, ui):
+    """Add information for the Linux kernel."""
+    report.setdefault("Tags", "")
+
+    if not is_ubuntu_kernel(report, ui):
+        return
+
+    if is_aborted_kernel_removal(report, ui):
+        return
+
+    if is_dkms_build_failure(report, ui):
+        return
+
+    # Prevent reports against the linux-meta and linux-signed families,
+    # redirect to the main package.
+    for src_pkg in ("linux-meta", "linux-signed"):
+        if report["SourcePackage"].startswith(src_pkg):
+            report["SourcePackage"] = report["SourcePackage"].replace(
+                src_pkg, "linux", 1
+            )
+
+    # Attach kernel-relevant data to the report
+    attach_data(report, ui)
+
+    # Check the kernel log if staging drivers are loaded
+    check_for_staging_drivers(report, ui)
+
+    # Add crash signature for duplicate checks
+    add_duplicate_crash_signature(report, ui)
+
+
+## DEBUGGING ##
+if __name__ == "__main__":
+    import sys
+
+    r = apport.Report()
+    r.add_proc_info()
+    r.add_os_info()
+    try:
+        r["SourcePackage"] = sys.argv[1]
+    except IndexError:
+        r["SourcePackage"] = "linux"
+    r["ProcVersionSignature"] = "Ubuntu 3.4.0"
+    add_info(r, None)
+    for k, v in r.items():
+        print(f"[{k}]\n{v}")
diff -pruN 4.14/debian/changelog 4.14ubuntu2/debian/changelog
--- 4.14/debian/changelog	2025-07-18 12:19:44.000000000 +0000
+++ 4.14ubuntu2/debian/changelog	2025-09-01 12:41:42.000000000 +0000
@@ -1,3 +1,36 @@
+linux-base (4.14ubuntu2) questing; urgency=medium
+
+  * d/control: Update Vcs-Git
+  * Apport kernel hook:
+    - Fix debugging, update copyright.
+    - Split the main logic into multiple functions.
+    - Remove obsolete code and kerneloops handling.
+    - Attach the list of installed packages.
+    - Handle DKMS build failures and attach the build log (LP: #2069262,
+      LP: #2071587).
+    - Ignore reports due to aborted removal of the running kernel
+      (LP: #2073399).
+    - Add firmware-sof to the list of related packages.
+
+ -- Juerg Haefliger <juerg.haefliger@canonical.com>  Mon, 01 Sep 2025 14:41:42 +0200
+
+linux-base (4.14ubuntu1) questing; urgency=medium
+
+  * Merge from Debian unstable. Remaining changes:
+    - Default to link_in_boot by default, on all architectures.
+    - Add kernel postinst hook to update initrd softlinks to match the kernel
+      version targets (LP: #1877088, #1929255).
+    - Check for update-initramfs being installed before running the postinst
+      hook which updates the softlinks (LP: #1928700).
+    - Add linux-base-sgx package with SGX udev rules (LP: #1867820, #1881338,
+      #1932582).
+    - Add Apport package hook and links for kernel packages (LP: #2018128,
+      #2098735).
+    - Change package maintainer to Ubuntu Kernel Team.
+    - Fix linux-base-sgx lintian warnings and add overrides.
+
+ -- Juerg Haefliger <juerg.haefliger@canonical.com>  Wed, 27 Aug 2025 15:59:41 +0200
+
 linux-base (4.14) unstable; urgency=medium
 
   * Upload to unstable
@@ -16,6 +49,23 @@ linux-base (4.13) experimental; urgency=
 
  -- Ben Hutchings <benh@debian.org>  Fri, 11 Jul 2025 13:20:04 +0200
 
+linux-base (4.12ubuntu1) questing; urgency=medium
+
+  * Merge from Debian unstable. Remaining changes:
+    - Default to link_in_boot by default, on all architectures.
+    - Add kernel postinst hook to update initrd softlinks to match the kernel
+      version targets (LP: #1877088, #1929255).
+    - Check for update-initramfs being installed before running the postinst
+      hook which updates the softlinks (LP: #1928700).
+    - Add linux-base-sgx package with SGX udev rules (LP: #1867820, #1881338,
+      #1932582).
+    - Add Apport package hook and links for kernel packages (LP: #2018128,
+      #2098735).
+  * Change package maintainer to Ubuntu Kernel Team.
+  * Fix linux-base-sgx lintian warnings and add overrides.
+
+ -- Juerg Haefliger <juerg.haefliger@canonical.com>  Tue, 27 May 2025 12:02:50 +0200
+
 linux-base (4.12) unstable; urgency=medium
 
   * d/changelog: Word-wrap previous entry to under 80 characters
@@ -53,6 +103,31 @@ linux-base (4.11) unstable; urgency=medi
 
  -- Salvatore Bonaccorso <carnil@debian.org>  Wed, 01 Jan 2025 13:33:30 +0100
 
+linux-base (4.10.1ubuntu2) plucky; urgency=medium
+
+  * Update Apport links for kernel packages (LP: #2098735)
+
+ -- Juerg Haefliger <juerg.haefliger@canonical.com>  Tue, 18 Feb 2025 09:26:38 +0100
+
+linux-base (4.10.1ubuntu1) plucky; urgency=medium
+
+  * Merge from Debian unstable. Remaining changes:
+    - Default to link_in_boot by default, on all architectures.
+    - Add kernel postinst hook to update initrd softlinks to match the kernel
+      version targets (LP: #1877088, #1929255).
+    - Check for update-initramfs being installed before running the postinst
+      hook which updates the softlinks (LP: #1928700).
+    - Add linux-base-sgx package with SGX udev rules (LP: #1867820, #1881338,
+      #1932582)
+      - Add /etc/profile.d/linux-base-sgx.sh and
+        /usr/lib/systemd/system-environment-generators/linux-base-sgx to
+        export environmental variable for out-of-process attestation by
+        default for: tty login sessions; ssh login sessions; systemd
+        user services; systemd system services.
+  * Add Apport package hook and links for kernel packages (LP: #2018128)
+
+ -- Juerg Haefliger <juerg.haefliger@canonical.com>  Wed, 13 Nov 2024 17:57:51 +0100
+
 linux-base (4.10.1) unstable; urgency=medium
 
   * No-change source upload for testing migration
@@ -159,6 +234,77 @@ linux-base (4.6) unstable; urgency=mediu
 
  -- Ben Hutchings <ben@decadent.org.uk>  Sun, 07 Apr 2019 17:58:17 +0100
 
+linux-base (4.5ubuntu9) impish; urgency=medium
+
+  [ Tim Gardner ]
+  * Add SGX support for Linux >= v5.11 (LP: #1932582)
+    - Added a udev rule for v5.11 SGX device names,
+
+  [ Tim Gardner & Dimitri John Ledkov ]
+    - Add /etc/profile.d/linux-base-sgx.sh and
+    /usr/lib/systemd/system-environment-generators/linux-base-sgx to
+    export environmental variable for out-of-process attestation by
+    default for: tty login sessions; ssh login sessions; systemd
+    user services; systemd system services.
+
+ -- Tim Gardner <tim.gardner@canonical.com>  Tue, 22 Jun 2021 07:38:37 -0600
+
+linux-base (4.5ubuntu8) impish; urgency=medium
+
+  * Rewrite xx-update-initrd-links to use linux-update-symlinks. This will
+    now make installkernel behaviour match the linux-image-*.postinst
+    behaviour exactly with respect to creating & updating vmlinu? and
+    initrd.img symlinks in / or /boot. LP: #1929255
+
+ -- Dimitri John Ledkov <dimitri.ledkov@canonical.com>  Thu, 27 May 2021 10:43:52 +0100
+
+linux-base (4.5ubuntu7) impish; urgency=medium
+
+  * Check for update-initramfs being installed before running the postinst
+    hook which updates the softlinks (LP: #1928700).
+
+ -- Stefan Bader <stefan.bader@canonical.com>  Mon, 17 May 2021 17:55:34 +0200
+
+linux-base (4.5ubuntu6) impish; urgency=medium
+
+  * linux-version: Fix sorting of versions provided via stdin to match
+    the output when provided via argv (LP: #1926985).
+
+ -- dann frazier <dann.frazier@canonical.com>  Mon, 03 May 2021 10:16:43 -0600
+
+linux-base (4.5ubuntu5) hirsute; urgency=medium
+
+  * Add kernel postinst hook to update initrd softlinks to match the kernel
+    version targets (LP: #1877088).
+
+ -- Stefan Bader <stefan.bader@canonical.com>  Wed, 03 Feb 2021 16:05:08 +0100
+
+linux-base (4.5ubuntu4) groovy; urgency=medium
+
+  * Update SGX udev rules for version LD_1.33 (LP: #1881338).
+
+ -- Marcelo Henrique Cerri <marcelo.cerri@canonical.com>  Thu, 25 Jun 2020 14:23:24 -0300
+
+linux-base (4.5ubuntu3) focal; urgency=medium
+
+  * Add linux-base-sgx package with SGX udev rules (LP: #1867820).
+
+ -- Timo Aaltonen <tjaalton@ubuntu.com>  Wed, 18 Mar 2020 13:05:24 +0200
+
+linux-base (4.5ubuntu2) devel; urgency=medium
+
+  * Default to link_in_boot by default, on all architectures.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com>  Wed, 17 Apr 2019 17:20:45 +0100
+
+linux-base (4.5ubuntu1) artful; urgency=low
+
+  * Merge from Debian unstable.  Remaining changes:
+    - do not install /usr/bin/perf, perf.8, bash-completion/perf
+      which are provided by linux-tools-common (LP: #1008713)
+
+ -- Andy Whitcroft <apw@ubuntu.com>  Fri, 28 Apr 2017 05:16:31 +0100
+
 linux-base (4.5) unstable; urgency=medium
 
   [ Salvatore Bonaccorso ]
@@ -224,6 +370,14 @@ linux-base (4.1) unstable; urgency=mediu
 
  -- Ben Hutchings <ben@decadent.org.uk>  Sun, 05 Jun 2016 02:13:38 +0100
 
+linux-base (4.0ubuntu1) xenial; urgency=low
+
+  * Merge from Debian unstable.  Remaining changes:
+    - do not install /usr/bin/perf or perf.8 which are provided by
+      linux-tools-common (LP: #1008713)
+
+ -- Andy Whitcroft <apw@ubuntu.com>  Wed, 13 Jan 2016 17:18:53 +0000
+
 linux-base (4.0) unstable; urgency=low
 
   * Remove obsolete postinst upgrade code and translations
@@ -241,6 +395,43 @@ linux-base (4.0) unstable; urgency=low
 
  -- Ben Hutchings <ben@decadent.org.uk>  Tue, 04 Aug 2015 21:24:05 +0100
 
+linux-base (3.5ubuntu4) quantal-proposed; urgency=low
+
+  * Remove perf man page since its provided by (and conflicts with)
+    linux-tools-common.
+    -LP: #1008713
+
+ -- Tim Gardner <tim.gardner@canonical.com>  Tue, 25 Sep 2012 14:24:56 -0600
+
+linux-base (3.5ubuntu3) quantal; urgency=low
+
+  * remove the postinst script, in ubuntu we did the UUID transition
+    years ago and it does not seem to take u-boot into account as a
+    bootloader. this results in a debconf error message on all arm
+    systems.
+
+ --  <ogra@ubuntu.com>  Thu, 31 May 2012 17:39:54 +0200
+
+linux-base (3.5ubuntu2) quantal; urgency=low
+
+  * Added 'Build-Depends: quilt'
+
+ -- Tim Gardner <tim.gardner@canonical.com>  Wed, 23 May 2012 13:54:16 -0600
+
+linux-base (3.5ubuntu1) quantal; urgency=low
+
+  * Added quilt patch support
+  * Remove /usr/bin/perf from this package as it conflicts with
+    the Ubuntu kernel tools package linux-tools-common (which
+    provides the real /usr/bin/perf). I can think of no reason why
+    this should cause a problem. /usr/bin/perf is kernel ABI version
+    specific, therefore it can only be provided by the correct
+    version of linux-tools-$version-$abi.
+    debian/patches/0001-remove-bin-perf.patch
+    -LP: #931353
+
+ -- Tim Gardner <tim.gardner@canonical.com>  Wed, 23 May 2012 13:35:38 -0600
+
 linux-base (3.5) unstable; urgency=low
 
   * debian/control: Set Multi-Arch: foreign to allow for installation
diff -pruN 4.14/debian/control 4.14ubuntu2/debian/control
--- 4.14/debian/control	2025-05-03 14:15:00.000000000 +0000
+++ 4.14ubuntu2/debian/control	2025-09-01 12:41:42.000000000 +0000
@@ -1,19 +1,19 @@
 Source: linux-base
 Section: kernel
 Priority: optional
-Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
+Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
 Uploaders: Ben Hutchings <benh@debian.org>, Salvatore Bonaccorso <carnil@debian.org>
 Standards-Version: 4.7.0
 Build-Depends: debhelper-compat (= 13), libtext-glob-perl <!nocheck>, po4a
-Vcs-Git: https://salsa.debian.org/kernel-team/linux-base.git
-Vcs-Browser: https://salsa.debian.org/kernel-team/linux-base
+Vcs-Git: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-base/+git/linux-base
 Rules-Requires-Root: no
 
 Package: linux-base
 Architecture: all
 Depends: ${misc:Depends}
-Breaks: kernel-common (<= 13.018+nmu1), linux-perf (<< 5.16.2-1~exp1)
-Replaces: kernel-common (<= 13.018+nmu1)
+Breaks: apport (<< 2.30.0-0ubuntu5~), kernel-common (<= 13.018+nmu1), linux-perf (<< 5.16.2-1~exp1)
+Replaces: apport (<< 2.30.0-0ubuntu5~), kernel-common (<= 13.018+nmu1)
 Multi-Arch: foreign
 Description: Linux image base package
  This package contains files and support scripts for all Linux
@@ -27,3 +27,11 @@ Multi-Arch: foreign
 Description: default sysctl configuration for Linux
  This package contains a sysctl configuration file setting some
  sensible defaults for Linux.
+
+Package: linux-base-sgx
+Architecture: all
+Depends: ${misc:Depends}
+Multi-Arch: foreign
+Description: Linux image base package for DCAP SGX
+ This package contains files and support scripts for all Linux
+ images with DCAP SGX drivers.
diff -pruN 4.14/debian/linux-base-sgx.install 4.14ubuntu2/debian/linux-base-sgx.install
--- 4.14/debian/linux-base-sgx.install	1970-01-01 00:00:00.000000000 +0000
+++ 4.14ubuntu2/debian/linux-base-sgx.install	2024-11-13 12:48:18.000000000 +0000
@@ -0,0 +1,2 @@
+profile.d/linux-base-sgx.sh etc/profile.d/
+system-environment-generators/linux-base-sgx usr/lib/systemd/system-environment-generators
diff -pruN 4.14/debian/linux-base-sgx.lintian-overrides 4.14ubuntu2/debian/linux-base-sgx.lintian-overrides
--- 4.14/debian/linux-base-sgx.lintian-overrides	1970-01-01 00:00:00.000000000 +0000
+++ 4.14ubuntu2/debian/linux-base-sgx.lintian-overrides	2025-09-01 12:41:42.000000000 +0000
@@ -0,0 +1 @@
+linux-base-sgx: appstream-metadata-missing-modalias-provide usr/lib/udev/rules.d/60-linux-base-sgx.rules
diff -pruN 4.14/debian/linux-base-sgx.postinst 4.14ubuntu2/debian/linux-base-sgx.postinst
--- 4.14/debian/linux-base-sgx.postinst	1970-01-01 00:00:00.000000000 +0000
+++ 4.14ubuntu2/debian/linux-base-sgx.postinst	2024-11-13 12:48:18.000000000 +0000
@@ -0,0 +1,19 @@
+#!/bin/sh
+# postinst script for linux-base-sgx
+
+set -e
+
+case "$1" in
+  configure)
+    # Add the sgx_prv group unless it's already there
+    addgroup --quiet --system sgx_prv || true
+    ;;
+  abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+  *)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 1
+  ;;
+esac
+
+#DEBHELPER#
diff -pruN 4.14/debian/linux-base-sgx.udev 4.14ubuntu2/debian/linux-base-sgx.udev
--- 4.14/debian/linux-base-sgx.udev	1970-01-01 00:00:00.000000000 +0000
+++ 4.14ubuntu2/debian/linux-base-sgx.udev	2024-11-13 12:48:18.000000000 +0000
@@ -0,0 +1,9 @@
+# SGX DCAP LD_1.22:
+SUBSYSTEM=="sgx",KERNEL=="sgx",MODE="0666"
+SUBSYSTEM=="sgx",KERNEL=="sgx_prv",GROUP="sgx_prv",MODE="0660"
+# SGX DCAP LD_1.33:
+SUBSYSTEM=="misc",KERNEL=="enclave",MODE="0666"
+SUBSYSTEM=="misc",KERNEL=="provision",GROUP="sgx_prv",MODE="0660"
+# SGX Linux >= 5.11
+SUBSYSTEM=="misc",KERNEL=="sgx_enclave",MODE="0666",SYMLINK+="sgx/enclave"
+SUBSYSTEM=="misc",KERNEL=="sgx_provision",GROUP="sgx_prv",MODE="0660",SYMLINK+="sgx/provision"
diff -pruN 4.14/debian/linux-base.install 4.14ubuntu2/debian/linux-base.install
--- 4.14/debian/linux-base.install	2025-07-11 11:19:18.000000000 +0000
+++ 4.14ubuntu2/debian/linux-base.install	2025-09-01 12:41:42.000000000 +0000
@@ -4,3 +4,5 @@ bin/linux-update-symlinks usr/bin
 bin/linux-version usr/bin
 lib/DebianLinux.pm usr/share/perl5
 kernel/postinst.d/touch-reboot-required usr/share/kernel/postinst.d
+etc/kernel/postinst.d/
+apport/source_linux.py usr/share/apport/package-hooks
diff -pruN 4.14/debian/linux-base.links 4.14ubuntu2/debian/linux-base.links
--- 4.14/debian/linux-base.links	1970-01-01 00:00:00.000000000 +0000
+++ 4.14ubuntu2/debian/linux-base.links	2025-09-01 12:41:42.000000000 +0000
@@ -0,0 +1,27 @@
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-aws.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-azure.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-firmware.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-gcp.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-aws.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-azure.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-gcp.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-oracle.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-raspi.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-realtime.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta-riscv.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-meta.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-oracle.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-raspi.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-realtime.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-restricted-modules-aws.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-restricted-modules-azure.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-restricted-modules-gcp.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-restricted-modules-oracle.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-restricted-modules.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-riscv.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-aws.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-azure.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-gcp.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-oracle.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed-realtime.py
+/usr/share/apport/package-hooks/source_linux.py /usr/share/apport/package-hooks/source_linux-signed.py
diff -pruN 4.14/debian/rules 4.14ubuntu2/debian/rules
--- 4.14/debian/rules	2022-05-19 01:09:12.000000000 +0000
+++ 4.14ubuntu2/debian/rules	2025-09-01 12:41:42.000000000 +0000
@@ -7,3 +7,8 @@ override_dh_auto_test:
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 	perl -Ilib -MTest::Harness -e 'runtests(@ARGV)' lib/t/*.t
 endif
+
+override_dh_install:
+	dh_install
+	chmod -v +x debian/linux-base/etc/kernel/postinst.d/*
+	chmod -v +x debian/linux-base-sgx/usr/lib/systemd/system-environment-generators/*
diff -pruN 4.14/etc/kernel/postinst.d/xx-update-initrd-links 4.14ubuntu2/etc/kernel/postinst.d/xx-update-initrd-links
--- 4.14/etc/kernel/postinst.d/xx-update-initrd-links	1970-01-01 00:00:00.000000000 +0000
+++ 4.14ubuntu2/etc/kernel/postinst.d/xx-update-initrd-links	2024-11-13 12:47:24.000000000 +0000
@@ -0,0 +1,24 @@
+#!/bin/sh
+set -e
+
+# installkernel script calls postinst.d without any DEB_MAINT_PARAMS set
+# linux-image-* postinst calls postinst.d with DEB_MAINT_PARAMS set
+# do nothing in case linux-image-* calls this, as it already calls `linux-update-symlinks`
+[ -z "$DEB_MAINT_PARAMS" ] || exit 0
+
+# installkernel must call postinst.d with two args, version & image_path
+version="$1"
+image_path="$2"
+
+[ -n "$version" ] || exit 0
+[ -n "$image_path" ] || exit 0
+
+# call linux-update-symlinks in install mode, which will correctly
+# update vmlinuz & initrd.img symlinks. Even if initrd.img does not
+# exist yet, or has already been created by the initramfs-update
+# postinst.d hook. It will also honor kernel_img.conf settings to
+# link_in_boot yes/no. Thus matching behaviour of linux-image-*
+# postinst call to linux-update-symlinks.
+linux-update-symlinks install $version $image_path
+
+exit 0
diff -pruN 4.14/lib/DebianLinux.pm 4.14ubuntu2/lib/DebianLinux.pm
--- 4.14/lib/DebianLinux.pm	2024-01-06 00:10:38.000000000 +0000
+++ 4.14ubuntu2/lib/DebianLinux.pm	2025-09-01 12:41:42.000000000 +0000
@@ -111,7 +111,7 @@ sub read_kernelimg_conf {
     my $conf = {
 	do_symlinks =>		1,
 	image_dest =>		'/',
-	link_in_boot =>		0,
+	link_in_boot =>		1,
 	no_symlinks =>		0,
     };
 
diff -pruN 4.14/lib/t/DebianLinux.t 4.14ubuntu2/lib/t/DebianLinux.t
--- 4.14/lib/t/DebianLinux.t	2022-05-19 01:38:04.000000000 +0000
+++ 4.14ubuntu2/lib/t/DebianLinux.t	2025-09-01 12:41:42.000000000 +0000
@@ -104,7 +104,7 @@ sub hash_equal {
 ok(hash_equal(read_kernelimg_conf_str(''),
 	      {
 		  do_symlinks =>	1,
-		  image_dest =>		'/',
+		  image_dest =>		'/boot',
 	      }));
 # Sample config
 ok(hash_equal(read_kernelimg_conf_str(<< 'EOT'),
@@ -167,24 +167,24 @@ do_symlinks = false
 EOT
 	      {
 		  do_symlinks =>	0,
-		  image_dest =>		'/',
+		  image_dest =>		'/boot',
 	      }));
 ok(hash_equal(read_kernelimg_conf_str(<< 'EOT'),
 do_symlinks = no
 EOT
 	      {
 		  do_symlinks =>	0,
-		  image_dest =>		'/',
+		  image_dest =>		'/boot',
 	      }));
 # Check that invalid values have no effect
 ok(hash_equal(read_kernelimg_conf_str(<< 'EOT'),
 do_symlinks=
-link_in_boot yes
-link_in_boot 1
+link_in_boot no
+link_in_boot 0
 EOT
 	      {
 		  do_symlinks =>	1,
-		  image_dest =>		'/',
+		  image_dest =>		'/boot',
 	      }));
 # Check link_in_boot dominates image_dest
 ok(hash_equal(read_kernelimg_conf_str(<< 'EOT'),
diff -pruN 4.14/profile.d/linux-base-sgx.sh 4.14ubuntu2/profile.d/linux-base-sgx.sh
--- 4.14/profile.d/linux-base-sgx.sh	1970-01-01 00:00:00.000000000 +0000
+++ 4.14ubuntu2/profile.d/linux-base-sgx.sh	2025-09-01 12:41:42.000000000 +0000
@@ -0,0 +1,2 @@
+# Default to "out-of-proc" attestation
+export SGX_AESM_ADDR=1
diff -pruN 4.14/system-environment-generators/linux-base-sgx 4.14ubuntu2/system-environment-generators/linux-base-sgx
--- 4.14/system-environment-generators/linux-base-sgx	1970-01-01 00:00:00.000000000 +0000
+++ 4.14ubuntu2/system-environment-generators/linux-base-sgx	2024-11-13 12:48:18.000000000 +0000
@@ -0,0 +1,3 @@
+#!/bin/sh
+# Default to "out-of-proc" attestation
+echo SGX_AESM_ADDR=1
