diff mbox series

[SRU,xenial/hwe,1/1] UBUNTU: [Packaging] HWE: disable CONFIG_MODVERSIONS

Message ID 20210408194932.2085604-2-kleber.souza@canonical.com
State New
Headers show
Series [SRU,xenial/hwe,1/1] UBUNTU: [Packaging] HWE: disable CONFIG_MODVERSIONS | expand

Commit Message

Kleber Sacilotto de Souza April 8, 2021, 7:49 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1922997

Enabling CONFIG_MODVERSIONS on Xenial is causing the modules to fail
loading on ppc64el systems. Disable it for now on all architectures via
the local-mangle file.

CONFIG_MODULE_REL_CRCS also needs to be removed from the configs as it
depends on CONFIG_MODVERSIONS.

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
---
 debian.hwe/scripts/helpers/local-mangle | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/debian.hwe/scripts/helpers/local-mangle b/debian.hwe/scripts/helpers/local-mangle
index 125c5b251bce..cd4b5e0d2bae 100755
--- a/debian.hwe/scripts/helpers/local-mangle
+++ b/debian.hwe/scripts/helpers/local-mangle
@@ -9,3 +9,10 @@  sed -i /snapdragon/d ${DEBIAN}/d-i/kernel-versions
 sed -i '/_snapdragon/d' ${DEBIAN}/rules.d/arm64.mk
 sed -i 's/^\(flavo.*\)\ssnapdragon\(.*\)$/\1\2/' ${DEBIAN}/rules.d/arm64.mk
 rm -f ${DEBIAN}/config/arm64/config.flavour.snapdragon
+
+# Disable CONFIG_MODVERSIONS for linux-hwe and update annotations
+# accordingly (LP: #1922997)
+sed -i 's/^CONFIG_MODVERSIONS=y/# CONFIG_MODVERSIONS is not set/' ${DEBIAN}/config/config.common.ubuntu
+sed -i '/^CONFIG_MODULE_REL_CRCS=y/d' ${DEBIAN}/config/config.common.ubuntu
+sed -i "s/^CONFIG_MODVERSIONS                              policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'i386': 'y', 'ppc64el': 'y', 's390x': 'y'}>/CONFIG_MODVERSIONS                              policy<{'amd64': 'n', 'arm64': 'n', 'armhf': 'n', 'i386': 'n', 'ppc64el': 'n', 's390x': 'n'}>/" ${DEBIAN}/config/annotations
+sed -i "/^CONFIG_MODVERSIONS                              mark<ENFORCED> note<LP:1898716 -- required as we have a livepatch\/drivers modules signing key>/d" ${DEBIAN}/config/annotations