diff -Nru ipmitool-1.8.18/debian/changelog ipmitool-1.8.18/debian/changelog --- ipmitool-1.8.18/debian/changelog 2021-11-24 04:36:15.000000000 +1300 +++ ipmitool-1.8.18/debian/changelog 2023-07-13 15:16:17.000000000 +1200 @@ -1,3 +1,13 @@ +ipmitool (1.8.18-11ubuntu2.1) jammy; urgency=medium + + * Fix persistent boot options when multiple options are set. Previously + flags were wiped out due to a logic error, leaving only the final flag + set. This set of patches ensures that all flags are set correctly. + (LP: #2017701) + - d/p/lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch + + -- Matthew Ruffell Thu, 13 Jul 2023 15:16:17 +1200 + ipmitool (1.8.18-11ubuntu2) jammy; urgency=medium * No-change rebuild against openssl3 diff -Nru ipmitool-1.8.18/debian/patches/lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch ipmitool-1.8.18/debian/patches/lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch --- ipmitool-1.8.18/debian/patches/lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch 1970-01-01 12:00:00.000000000 +1200 +++ ipmitool-1.8.18/debian/patches/lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch 2023-07-13 15:15:35.000000000 +1200 @@ -0,0 +1,31 @@ +Author: Alexander Amelkin +Author: Matthew Ruffell +Date: Wed, 6 Nov 2019 11:40:15 +0300 +Subject: chassis: bootparam/bootdev: Refactor for less magic + Fix resetting of all other boot flags in the data byte when + setting any of the bits in the same byte. This fixes inability + to set both 'efiboot' and 'persistent' bits at the same time, + and other similar cases. + + Resolves ipmitool/ipmitool#163 + [mruffell: backport only the logic change to fix the actual issue + where all flags were being clobbered instead of clearing the bit + being set.] +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2017701 +Bug: https://github.com/ipmitool/ipmitool/issues/163 +Origin: backport, https://github.com/ipmitool/ipmitool/commit/4b89f1b42d94a9bb96093d5e5237c7f1cfd84580 +Last-Update: 2023-07-13 + +Index: ipmitool-1.8.18/lib/ipmi_chassis.c +=================================================================== +--- ipmitool-1.8.18.orig/lib/ipmi_chassis.c 2023-07-13 15:15:29.339317980 +1200 ++++ ipmitool-1.8.18/lib/ipmi_chassis.c 2023-07-13 15:15:29.335317939 +1200 +@@ -1354,7 +1354,7 @@ + } + for (op = options; op->name != NULL; ++op) { + if (strcmp(token, op->name) == 0) { +- flags[op->i] &= op->mask; ++ flags[op->i] &= ~(op->mask); + flags[op->i] |= op->value; + break; + } diff -Nru ipmitool-1.8.18/debian/patches/series ipmitool-1.8.18/debian/patches/series --- ipmitool-1.8.18/debian/patches/series 2021-09-08 11:37:41.000000000 +1200 +++ ipmitool-1.8.18/debian/patches/series 2023-07-13 15:15:25.000000000 +1200 @@ -17,3 +17,4 @@ CVE-2020-5208_5_lanp-Fix-buffer-overflows-in-get_lan_param_select.patch CVE-2020-5208_6-fru-sdr-Fix-id_string-buffer-overflows.patch add_basic_support_for_quanta.patch +lp2017701-chassis-bootparam-bootdev-Refactor-for-less-magic.patch