From fe20e29c1ea750d1a813ad7f48cd20354d44ea83 Mon Sep 17 00:00:00 2001 From: lejeune quentin Date: Tue, 7 Nov 2023 22:00:46 +0100 Subject: [PATCH] [FIX] point_of_sale: Fix package to be able to upgrade iot kernel in debian bookworm Installations from the current Debian Bookworm (12.0) on amd64 systems are experiencing problem that prevents the kernel from being upgraded (e.g. when trying to upgrade to kernel linux-image-6.1.0-10-amd64) closes odoo/odoo#141588 Signed-off-by: Quentin Lejeune (qle) --- .../dist-packages => lib/python3}/v4l2.py.iotpatch | 8 ++++---- .../posbox/overwrite_before_init/etc/init_posbox_image.sh | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) rename addons/point_of_sale/tools/posbox/overwrite_after_init/usr/{local/lib/python3.11/dist-packages => lib/python3}/v4l2.py.iotpatch (75%) diff --git a/addons/point_of_sale/tools/posbox/overwrite_after_init/usr/local/lib/python3.11/dist-packages/v4l2.py.iotpatch b/addons/point_of_sale/tools/posbox/overwrite_after_init/usr/lib/python3/v4l2.py.iotpatch similarity index 75% rename from addons/point_of_sale/tools/posbox/overwrite_after_init/usr/local/lib/python3.11/dist-packages/v4l2.py.iotpatch rename to addons/point_of_sale/tools/posbox/overwrite_after_init/usr/lib/python3/v4l2.py.iotpatch index 5cc87a78c88..f99a4a12a12 100644 --- a/addons/point_of_sale/tools/posbox/overwrite_after_init/usr/local/lib/python3.11/dist-packages/v4l2.py.iotpatch +++ b/addons/point_of_sale/tools/posbox/overwrite_after_init/usr/lib/python3/v4l2.py.iotpatch @@ -1,5 +1,5 @@ ---- v4l2_old.py 2019-01-23 12:49:01.081564000 +0100 -+++ v4l2_new.py 2019-01-23 12:50:32.369730171 +0100 +--- v4l2.py 2023-11-07 20:27:44.919031118 +0000 ++++ v4l2.py.old 2023-11-07 20:26:24.910749659 +0000 @@ -194,7 +194,7 @@ V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, @@ -7,9 +7,9 @@ -) = range(1, 9) + [0x80] +) = list(range(1, 9)) + [0x80] - v4l2_ctrl_type = enum -@@ -245,7 +245,7 @@ + ( +@@ -244,7 +244,7 @@ V4L2_PRIORITY_INTERACTIVE, V4L2_PRIORITY_RECORD, V4L2_PRIORITY_DEFAULT, diff --git a/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh b/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh index 54bbc62ca53..ad3c49ef024 100755 --- a/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh +++ b/addons/point_of_sale/tools/posbox/overwrite_before_init/etc/init_posbox_image.sh @@ -21,6 +21,10 @@ source ~/.bashrc # upgrade firmware-brcm80211 broke access point on rpi4 apt-mark hold firmware-brcm80211 +# Installations from the current Debian Bookworm (12.0) on amd64 systems are experiencing the problem that prevents +# the kernel from being upgraded (e.g. when trying to upgrade to kernel linux-image-6.1.0-10-amd64) +rm /etc/{initramfs/post-update.d/,kernel/{postinst.d/,postrm.d/}}z50-raspi-firmware +apt purge raspi-firmware apt-get update && apt-get -y upgrade # Do not be too fast to upgrade to more recent firmware and kernel than 4.38 # Firmware 4.44 seems to prevent the LED mechanism from working