diff --git a/SOURCES/1048-cryptsetup-generator-refactor-add_crypttab_devices.patch b/SOURCES/1048-cryptsetup-generator-refactor-add_crypttab_devices.patch new file mode 100644 index 0000000..262e893 --- /dev/null +++ b/SOURCES/1048-cryptsetup-generator-refactor-add_crypttab_devices.patch @@ -0,0 +1,110 @@ +From d2cd65067fc614367a4efe460de5006ad3cfdb91 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Thu, 30 May 2024 10:44:36 +0200 +Subject: [PATCH] cryptsetup-generator: refactor add_crypttab_devices() + +Move the processing of a crypttab entry to a separate function. + +No functional changes, just refactoring. + +(cherry picked from commit a07cb7d404582f9c0bfaedb9dd07f93848aa91c6) + +Related: RHEL-38859 +--- + src/cryptsetup/cryptsetup-generator.c | 63 ++++++++++++++++----------- + 1 file changed, 38 insertions(+), 25 deletions(-) + +diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c +index 4117930925..50c2a5093a 100644 +--- a/src/cryptsetup/cryptsetup-generator.c ++++ b/src/cryptsetup/cryptsetup-generator.c +@@ -525,10 +525,44 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat + return 0; + } + ++static int add_crypttab_device(const char *name, const char *device, const char *keyspec, const char *options) { ++ _cleanup_free_ char *keyfile = NULL, *keydev = NULL; ++ crypto_device *d = NULL; ++ char *uuid; ++ int r; ++ ++ uuid = startswith(device, "UUID="); ++ if (!uuid) ++ uuid = path_startswith(device, "/dev/disk/by-uuid/"); ++ if (!uuid) ++ uuid = startswith(name, "luks-"); ++ if (uuid) ++ d = hashmap_get(arg_disks, uuid); ++ ++ if (arg_whitelist && !d) { ++ log_info("Not creating device '%s' because it was not specified on the kernel command line.", name); ++ return 0; ++ } ++ ++ r = split_keyspec(keyspec, &keyfile, &keydev); ++ if (r < 0) ++ return r; ++ ++ r = create_disk(name, device, keyfile, keydev, (d && d->options) ? d->options : options); ++ if (r < 0) ++ return r; ++ ++ if (d) ++ d->create = false; ++ ++ return 0; ++} ++ + static int add_crypttab_devices(void) { + struct stat st; + unsigned crypttab_line = 0; + _cleanup_fclose_ FILE *f = NULL; ++ int r; + + if (!arg_read_crypttab) + return 0; +@@ -548,10 +582,9 @@ static int add_crypttab_devices(void) { + } + + for (;;) { +- int r, k; +- char line[LINE_MAX], *l, *uuid; +- crypto_device *d = NULL; +- _cleanup_free_ char *name = NULL, *device = NULL, *keydev = NULL, *keyfile = NULL, *keyspec = NULL, *options = NULL; ++ char line[LINE_MAX], *l; ++ _cleanup_free_ char *name = NULL, *device = NULL, *keyspec = NULL, *options = NULL; ++ int k; + + if (!fgets(line, sizeof(line), f)) + break; +@@ -568,29 +601,9 @@ static int add_crypttab_devices(void) { + continue; + } + +- uuid = startswith(device, "UUID="); +- if (!uuid) +- uuid = path_startswith(device, "/dev/disk/by-uuid/"); +- if (!uuid) +- uuid = startswith(name, "luks-"); +- if (uuid) +- d = hashmap_get(arg_disks, uuid); +- +- if (arg_whitelist && !d) { +- log_info("Not creating device '%s' because it was not specified on the kernel command line.", name); +- continue; +- } +- +- r = split_keyspec(keyspec, &keyfile, &keydev); ++ r = add_crypttab_device(name, device, keyspec, options); + if (r < 0) + return r; +- +- r = create_disk(name, device, keyfile, keydev, (d && d->options) ? d->options : options); +- if (r < 0) +- return r; +- +- if (d) +- d->create = false; + } + + return 0; diff --git a/SOURCES/1049-cryptsetup-generator-continue-parsing-after-error.patch b/SOURCES/1049-cryptsetup-generator-continue-parsing-after-error.patch new file mode 100644 index 0000000..5ce968d --- /dev/null +++ b/SOURCES/1049-cryptsetup-generator-continue-parsing-after-error.patch @@ -0,0 +1,43 @@ +From 19a8582024046a483f1631fd6be43126ea30b67c Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Thu, 30 May 2024 10:46:13 +0200 +Subject: [PATCH] cryptsetup-generator: continue parsing after error + +Let's make the crypttab parser more robust and continue even if parsing +of a line failed. + +(cherry picked from commit 83813bae7ae471862ff84b038b5e4eaefae41c98) + +Resolves: RHEL-38859 +--- + src/cryptsetup/cryptsetup-generator.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c +index 50c2a5093a..ae3e2282fd 100644 +--- a/src/cryptsetup/cryptsetup-generator.c ++++ b/src/cryptsetup/cryptsetup-generator.c +@@ -562,7 +562,7 @@ static int add_crypttab_devices(void) { + struct stat st; + unsigned crypttab_line = 0; + _cleanup_fclose_ FILE *f = NULL; +- int r; ++ int r, ret = 0; + + if (!arg_read_crypttab) + return 0; +@@ -602,11 +602,11 @@ static int add_crypttab_devices(void) { + } + + r = add_crypttab_device(name, device, keyspec, options); +- if (r < 0) +- return r; ++ if (r < 0 && ret >= 0) ++ ret = r; + } + +- return 0; ++ return ret; + } + + static int add_proc_cmdline_devices(void) { diff --git a/SOURCES/1050-hwdb-add-ACCEL_LOCATION-property-to-parse_hwdb.py.patch b/SOURCES/1050-hwdb-add-ACCEL_LOCATION-property-to-parse_hwdb.py.patch new file mode 100644 index 0000000..4d69f92 --- /dev/null +++ b/SOURCES/1050-hwdb-add-ACCEL_LOCATION-property-to-parse_hwdb.py.patch @@ -0,0 +1,48 @@ +From fea96208a7fbe748e2aefbf0c52dafcbf691f05f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lu=C3=ADs=20Ferreira?= +Date: Sat, 13 Apr 2019 19:12:51 +0100 +Subject: [PATCH] hwdb: add ACCEL_LOCATION property to parse_hwdb.py +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Luís Ferreira +(cherry picked from commit ccf478417455ab1191571923fa640363d4c4b7a6) + +Related: RHEL-130979 +--- + hwdb/parse_hwdb.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py +index 4900a25778..6943c688eb 100755 +--- a/hwdb/parse_hwdb.py ++++ b/hwdb/parse_hwdb.py +@@ -128,6 +128,7 @@ def property_grammar(): + ('KEYBOARD_LED_NUMLOCK', Literal('0')), + ('KEYBOARD_LED_CAPSLOCK', Literal('0')), + ('ACCEL_MOUNT_MATRIX', mount_matrix), ++ ('ACCEL_LOCATION', STRING), + ) + fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE') + for name, val in props] +@@ -179,6 +180,10 @@ def check_one_default(prop, settings): + if len(defaults) > 1: + error('More than one star entry: {!r}', prop) + ++def check_one_accel_location(prop, value): ++ if value not in ['base', 'display']: ++ error('Wrong accel location: {!r}', prop) ++ + def check_one_mount_matrix(prop, value): + numbers = [s for s in value if s not in {';', ','}] + if len(numbers) != 9: +@@ -221,6 +226,8 @@ def check_properties(groups): + check_one_default(prop, parsed.VALUE.SETTINGS) + elif parsed.NAME == 'ACCEL_MOUNT_MATRIX': + check_one_mount_matrix(prop, parsed.VALUE) ++ elif parsed.NAME == 'ACCEL_LOCATION': ++ check_one_accel_location(prop, parsed.VALUE) + elif parsed.NAME.startswith('KEYBOARD_KEY_'): + check_one_keycode(prop, parsed.VALUE) + diff --git a/SOURCES/1051-hwdb-update-ACCEL_LOCATION-property-to-use-Or-instea.patch b/SOURCES/1051-hwdb-update-ACCEL_LOCATION-property-to-use-Or-instea.patch new file mode 100644 index 0000000..9292114 --- /dev/null +++ b/SOURCES/1051-hwdb-update-ACCEL_LOCATION-property-to-use-Or-instea.patch @@ -0,0 +1,46 @@ +From 36167a7b6617b0c8e1e15a91eccf5cdb19f0ee1b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lu=C3=ADs=20Ferreira?= +Date: Sun, 19 May 2019 19:22:41 +0100 +Subject: [PATCH] hwdb: update ACCEL_LOCATION property to use Or instead of + QuotedString + +(cherry picked from commit 331e34fe1db427127aefa3b5ca6d5b568ecf86d2) + +Related: RHEL-130979 +--- + hwdb/parse_hwdb.py | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py +index 6943c688eb..99fb5b1438 100755 +--- a/hwdb/parse_hwdb.py ++++ b/hwdb/parse_hwdb.py +@@ -128,7 +128,7 @@ def property_grammar(): + ('KEYBOARD_LED_NUMLOCK', Literal('0')), + ('KEYBOARD_LED_CAPSLOCK', Literal('0')), + ('ACCEL_MOUNT_MATRIX', mount_matrix), +- ('ACCEL_LOCATION', STRING), ++ ('ACCEL_LOCATION', Or(('display', 'base'))), + ) + fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE') + for name, val in props] +@@ -180,10 +180,6 @@ def check_one_default(prop, settings): + if len(defaults) > 1: + error('More than one star entry: {!r}', prop) + +-def check_one_accel_location(prop, value): +- if value not in ['base', 'display']: +- error('Wrong accel location: {!r}', prop) +- + def check_one_mount_matrix(prop, value): + numbers = [s for s in value if s not in {';', ','}] + if len(numbers) != 9: +@@ -226,8 +222,6 @@ def check_properties(groups): + check_one_default(prop, parsed.VALUE.SETTINGS) + elif parsed.NAME == 'ACCEL_MOUNT_MATRIX': + check_one_mount_matrix(prop, parsed.VALUE) +- elif parsed.NAME == 'ACCEL_LOCATION': +- check_one_accel_location(prop, parsed.VALUE) + elif parsed.NAME.startswith('KEYBOARD_KEY_'): + check_one_keycode(prop, parsed.VALUE) + diff --git a/SOURCES/1052-test-support-general-properties-in-hwdb-files.patch b/SOURCES/1052-test-support-general-properties-in-hwdb-files.patch new file mode 100644 index 0000000..592555a --- /dev/null +++ b/SOURCES/1052-test-support-general-properties-in-hwdb-files.patch @@ -0,0 +1,55 @@ +From 1c772da6f3e7a588e8a73af4e26947d25c3053a8 Mon Sep 17 00:00:00 2001 +From: Frantisek Sumsal +Date: Tue, 25 Nov 2025 17:45:27 +0100 +Subject: [PATCH] test: support general properties in hwdb files + +Loosely cherry-picked from aa549ff3972b067c4225db0a845f5c638842fba3. + +rhel-only +Related: RHEL-130979 +--- + hwdb/parse_hwdb.py | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py +index 99fb5b1438..c94ad9bea6 100755 +--- a/hwdb/parse_hwdb.py ++++ b/hwdb/parse_hwdb.py +@@ -70,13 +70,28 @@ TYPES = {'mouse': ('usb', 'bluetooth', 'ps2', '*'), + 'sensor': ('modalias', ), + } + ++# Patterns that are used to set general properties on a device ++GENERAL_MATCHES = {'acpi', ++ 'bluetooth', ++ 'usb', ++ 'pci', ++ 'sdio', ++ 'vmbus', ++ 'OUI', ++ } ++ ++ + @lru_cache() + def hwdb_grammar(): + ParserElement.setDefaultWhitespaceChars('') + + prefix = Or(category + ':' + Or(conn) + ':' + for category, conn in TYPES.items()) +- matchline = Combine(prefix + Word(printables + ' ' + '®')) + EOL ++ ++ matchline_typed = Combine(prefix + Word(printables + ' ' + '®')) ++ matchline_general = Combine(Or(GENERAL_MATCHES) + ':' + Word(printables)) ++ matchline = (matchline_typed | matchline_general) + EOL ++ + propertyline = (White(' ', exact=1).suppress() + + Combine(UDEV_TAG - '=' - Word(alphanums + '_=:@*.!-;, "') - Optional(pythonStyleComment)) + + EOL) +@@ -104,6 +119,7 @@ def property_grammar(): + ('MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL', INTEGER), + ('MOUSE_WHEEL_CLICK_COUNT', INTEGER), + ('MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL', INTEGER), ++ ('ID_AUTOSUSPEND', Literal('1')), + ('ID_INPUT', Literal('1')), + ('ID_INPUT_ACCELEROMETER', Literal('1')), + ('ID_INPUT_JOYSTICK', Literal('1')), diff --git a/SOURCES/1053-hwdb-Relax-parsing-script-to-allow-0-and-1-for-all-I.patch b/SOURCES/1053-hwdb-Relax-parsing-script-to-allow-0-and-1-for-all-I.patch new file mode 100644 index 0000000..78971fc --- /dev/null +++ b/SOURCES/1053-hwdb-Relax-parsing-script-to-allow-0-and-1-for-all-I.patch @@ -0,0 +1,56 @@ +From 77fec6b9de7ae11fe69d0ff48cfd4406345be3f9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Daase?= +Date: Fri, 8 Jan 2021 10:32:36 +0100 +Subject: [PATCH] hwdb: Relax parsing script to allow 0 and 1 for all ID_* + properties + +(cherry picked from commit ad0d9c0109d45c12c6517684d84ea033cf8d54a7) + +Related: RHEL-130979 +--- + hwdb/parse_hwdb.py | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py +index c94ad9bea6..d15ae0470c 100755 +--- a/hwdb/parse_hwdb.py ++++ b/hwdb/parse_hwdb.py +@@ -119,22 +119,22 @@ def property_grammar(): + ('MOUSE_WHEEL_CLICK_ANGLE_HORIZONTAL', INTEGER), + ('MOUSE_WHEEL_CLICK_COUNT', INTEGER), + ('MOUSE_WHEEL_CLICK_COUNT_HORIZONTAL', INTEGER), +- ('ID_AUTOSUSPEND', Literal('1')), +- ('ID_INPUT', Literal('1')), +- ('ID_INPUT_ACCELEROMETER', Literal('1')), +- ('ID_INPUT_JOYSTICK', Literal('1')), +- ('ID_INPUT_KEY', Literal('1')), +- ('ID_INPUT_KEYBOARD', Literal('1')), +- ('ID_INPUT_MOUSE', Literal('1')), +- ('ID_INPUT_POINTINGSTICK', Literal('1')), +- ('ID_INPUT_SWITCH', Literal('1')), +- ('ID_INPUT_TABLET', Literal('1')), +- ('ID_INPUT_TABLET_PAD', Literal('1')), +- ('ID_INPUT_TOUCHPAD', Literal('1')), +- ('ID_INPUT_TOUCHSCREEN', Literal('1')), +- ('ID_INPUT_TRACKBALL', Literal('1')), +- ('MOUSE_WHEEL_TILT_HORIZONTAL', Literal('1')), +- ('MOUSE_WHEEL_TILT_VERTICAL', Literal('1')), ++ ('ID_AUTOSUSPEND', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_ACCELEROMETER', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_JOYSTICK', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_KEY', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_KEYBOARD', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_MOUSE', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_POINTINGSTICK', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_SWITCH', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_TABLET', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_TABLET_PAD', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_TOUCHPAD', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_TOUCHSCREEN', Or((Literal('0'), Literal('1')))), ++ ('ID_INPUT_TRACKBALL', Or((Literal('0'), Literal('1')))), ++ ('MOUSE_WHEEL_TILT_HORIZONTAL', Or((Literal('0'), Literal('1')))), ++ ('MOUSE_WHEEL_TILT_VERTICAL', Or((Literal('0'), Literal('1')))), + ('POINTINGSTICK_SENSITIVITY', INTEGER), + ('POINTINGSTICK_CONST_ACCEL', REAL), + ('ID_INPUT_JOYSTICK_INTEGRATION', Or(('internal', 'external'))), diff --git a/SOURCES/1054-hwdb-allow-spaces-in-usb-matches-and-similar-pattern.patch b/SOURCES/1054-hwdb-allow-spaces-in-usb-matches-and-similar-pattern.patch new file mode 100644 index 0000000..3945954 --- /dev/null +++ b/SOURCES/1054-hwdb-allow-spaces-in-usb-matches-and-similar-pattern.patch @@ -0,0 +1,28 @@ +From 6c95b29117469a5ecb22655fb561dceee04106e8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Fri, 17 Jul 2020 07:44:10 +0200 +Subject: [PATCH] hwdb: allow spaces in usb: matches and similar patterns + +In the past we didn't have any matches like that, so the parser was stricter +than necessary, but now we have, so allow that. + +(cherry picked from commit 457763aa0393a9f11e30071bb3794caf1a4f2f64) + +Related: RHEL-130979 +--- + hwdb/parse_hwdb.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py +index d15ae0470c..db26a5e4d4 100755 +--- a/hwdb/parse_hwdb.py ++++ b/hwdb/parse_hwdb.py +@@ -89,7 +89,7 @@ def hwdb_grammar(): + for category, conn in TYPES.items()) + + matchline_typed = Combine(prefix + Word(printables + ' ' + '®')) +- matchline_general = Combine(Or(GENERAL_MATCHES) + ':' + Word(printables)) ++ matchline_general = Combine(Or(GENERAL_MATCHES) + ':' + Word(printables + ' ' + '®')) + matchline = (matchline_typed | matchline_general) + EOL + + propertyline = (White(' ', exact=1).suppress() + diff --git a/SOURCES/1055-test-fix-parsing-of-60-seat.hwdb-and-60-keyboard.hwd.patch b/SOURCES/1055-test-fix-parsing-of-60-seat.hwdb-and-60-keyboard.hwd.patch new file mode 100644 index 0000000..125daeb --- /dev/null +++ b/SOURCES/1055-test-fix-parsing-of-60-seat.hwdb-and-60-keyboard.hwd.patch @@ -0,0 +1,83 @@ +From aa5ed0d813964222dfe337c0733d4586d7a4f647 Mon Sep 17 00:00:00 2001 +From: Frantisek Sumsal +Date: Tue, 25 Nov 2025 17:56:16 +0100 +Subject: [PATCH] test: fix parsing of 60-seat.hwdb and 60-keyboard.hwdb + +This includes changes for hwdb/parse_hwdb.py from commits: + - c0b2e69f8815881d51b68b4f73e6c7f8cc2417a1 + - d7d31692bf7cde5dce7f4ed3cae429a5b302a9f0 + - a136c2cdd84c93c2fa5e1cedb20f5acac80df5be + - and possibly others + +The hwdb changes from these commits were backported as part of +793dc4d9e32baba27eac1f37283a7485b0889803. + +rhel-only +Related: RHEL-130979 +--- + hwdb/parse_hwdb.py | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py +index db26a5e4d4..956b206b00 100755 +--- a/hwdb/parse_hwdb.py ++++ b/hwdb/parse_hwdb.py +@@ -34,7 +34,7 @@ try: + LineStart, LineEnd, + OneOrMore, Combine, Or, Optional, Suppress, Group, + nums, alphanums, printables, +- stringEnd, pythonStyleComment, QuotedString, ++ stringEnd, pythonStyleComment, + ParseBaseException) + except ImportError: + print('pyparsing is not available') +@@ -56,13 +56,13 @@ EOL = LineEnd().suppress() + EMPTYLINE = LineEnd() + COMMENTLINE = pythonStyleComment + EOL + INTEGER = Word(nums) +-STRING = QuotedString('"') + REAL = Combine((INTEGER + Optional('.' + Optional(INTEGER))) ^ ('.' + INTEGER)) + SIGNED_REAL = Combine(Optional(Word('-+')) + REAL) + UDEV_TAG = Word(string.ascii_uppercase, alphanums + '_') + + TYPES = {'mouse': ('usb', 'bluetooth', 'ps2', '*'), + 'evdev': ('name', 'atkbd', 'input'), ++ 'fb': ('pci'), + 'id-input': ('modalias'), + 'touchpad': ('i8042', 'rmi', 'bluetooth', 'usb'), + 'joystick': ('i8042', 'rmi', 'bluetooth', 'usb'), +@@ -93,7 +93,8 @@ def hwdb_grammar(): + matchline = (matchline_typed | matchline_general) + EOL + + propertyline = (White(' ', exact=1).suppress() + +- Combine(UDEV_TAG - '=' - Word(alphanums + '_=:@*.!-;, "') - Optional(pythonStyleComment)) + ++ Combine(UDEV_TAG - '=' - Optional(Word(alphanums + '_=:@*.!-;, "')) ++ - Optional(pythonStyleComment)) + + EOL) + propertycomment = White(' ', exact=1) + pythonStyleComment + EOL + +@@ -113,6 +114,7 @@ def property_grammar(): + dpi_setting = (Optional('*')('DEFAULT') + INTEGER('DPI') + Suppress('@') + INTEGER('HZ'))('SETTINGS*') + mount_matrix_row = SIGNED_REAL + ',' + SIGNED_REAL + ',' + SIGNED_REAL + mount_matrix = (mount_matrix_row + ';' + mount_matrix_row + ';' + mount_matrix_row)('MOUNT_MATRIX') ++ xkb_setting = Optional(Word(alphanums + '+-/@._')) + + props = (('MOUSE_DPI', Group(OneOrMore(dpi_setting))), + ('MOUSE_WHEEL_CLICK_ANGLE', INTEGER), +@@ -139,12 +141,14 @@ def property_grammar(): + ('POINTINGSTICK_CONST_ACCEL', REAL), + ('ID_INPUT_JOYSTICK_INTEGRATION', Or(('internal', 'external'))), + ('ID_INPUT_TOUCHPAD_INTEGRATION', Or(('internal', 'external'))), +- ('XKB_FIXED_LAYOUT', STRING), +- ('XKB_FIXED_VARIANT', STRING), ++ ('XKB_FIXED_LAYOUT', xkb_setting), ++ ('XKB_FIXED_VARIANT', xkb_setting), ++ ('XKB_FIXED_MODEL', xkb_setting), + ('KEYBOARD_LED_NUMLOCK', Literal('0')), + ('KEYBOARD_LED_CAPSLOCK', Literal('0')), + ('ACCEL_MOUNT_MATRIX', mount_matrix), + ('ACCEL_LOCATION', Or(('display', 'base'))), ++ ('ID_TAG_MASTER_OF_SEAT', Literal('1')), + ) + fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE') + for name, val in props] diff --git a/SOURCES/1056-parse_hwdb-fix-compatibility-with-pyparsing-2.4.patch b/SOURCES/1056-parse_hwdb-fix-compatibility-with-pyparsing-2.4.patch new file mode 100644 index 0000000..6d0c462 --- /dev/null +++ b/SOURCES/1056-parse_hwdb-fix-compatibility-with-pyparsing-2.4.patch @@ -0,0 +1,54 @@ +From c85ce044e87038724cc1095d86ebd15b2da4564f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 8 Oct 2019 14:44:35 +0200 +Subject: [PATCH] parse_hwdb: fix compatibility with pyparsing 2.4.* + +pyparsing 2.3.1/2.4.0 had some changes to grouping of And matches, and as a +result we'd report 0 properties and 0 matches, and not really do any checks. + +With this change we get identical behaviour for pyparsing 2.3.1, 2.4.0, 2.4.2: + +$ hwdb/parse_hwdb.py +hwdb/60-evdev.hwdb: 72 match groups, 94 matches, 262 properties +hwdb/60-input-id.hwdb: 3 match groups, 3 matches, 4 properties +hwdb/60-keyboard.hwdb: 173 match groups, 256 matches, 872 properties +Keycode KBD_LCD_MENU1 unknown +Keycode KBD_LCD_MENU4 unknown +Keycode KBD_LCD_MENU2 unknown +Keycode KBD_LCD_MENU3 unknown +hwdb/60-sensor.hwdb: 101 match groups, 120 matches, 105 properties +hwdb/70-joystick.hwdb: 2 match groups, 3 matches, 2 properties +hwdb/70-mouse.hwdb: 104 match groups, 119 matches, 123 properties +hwdb/70-pointingstick.hwdb: 8 match groups, 30 matches, 11 properties +hwdb/70-touchpad.hwdb: 6 match groups, 9 matches, 6 properties + +(cherry picked from commit 2382a2e32b6076fa4603c958f84b46d5a5b13dfa) + +Related: RHEL-130979 +--- + hwdb/parse_hwdb.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py +index 956b206b00..8118ad4e3a 100755 +--- a/hwdb/parse_hwdb.py ++++ b/hwdb/parse_hwdb.py +@@ -103,7 +103,7 @@ def hwdb_grammar(): + (EMPTYLINE ^ stringEnd()).suppress()) + commentgroup = OneOrMore(COMMENTLINE).suppress() - EMPTYLINE.suppress() + +- grammar = OneOrMore(group('GROUPS*') ^ commentgroup) + stringEnd() ++ grammar = OneOrMore(Group(group)('GROUPS*') ^ commentgroup) + stringEnd() + + return grammar + +@@ -243,7 +243,8 @@ def check_properties(groups): + elif parsed.NAME == 'ACCEL_MOUNT_MATRIX': + check_one_mount_matrix(prop, parsed.VALUE) + elif parsed.NAME.startswith('KEYBOARD_KEY_'): +- check_one_keycode(prop, parsed.VALUE) ++ val = parsed.VALUE if isinstance(parsed.VALUE, str) else parsed.VALUE[0] ++ check_one_keycode(prop, val) + + def print_summary(fname, groups): + print('{}: {} match groups, {} matches, {} properties' diff --git a/SOURCES/1057-login-use-parse_uid-when-unmounting-user-runtime-dir.patch b/SOURCES/1057-login-use-parse_uid-when-unmounting-user-runtime-dir.patch new file mode 100644 index 0000000..acfead7 --- /dev/null +++ b/SOURCES/1057-login-use-parse_uid-when-unmounting-user-runtime-dir.patch @@ -0,0 +1,109 @@ +From 3d7dd494cd2c6cfe51f76de4fd0c8d2c6a80f0e4 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Mon, 9 Jul 2018 14:05:20 +0900 +Subject: [PATCH] login: use parse_uid() when unmounting user runtime directory + +When unmounting user runtime directory, only UID is necessary, +and the corresponding user may not exist anymore. +This makes first try to parse the input by parse_uid(), and only if it +fails, prase the input by get_user_creds(). + +Fixes #9541. + +(cherry picked from commit 86d18f3b09ec984ef3732567af992adb2dc77a8a) + +Resolves: RHEL-132175 +--- + src/login/user-runtime-dir.c | 57 +++++++++++++++++++++++------------- + 1 file changed, 36 insertions(+), 21 deletions(-) + +diff --git a/src/login/user-runtime-dir.c b/src/login/user-runtime-dir.c +index 9693821990..51b864c9f8 100644 +--- a/src/login/user-runtime-dir.c ++++ b/src/login/user-runtime-dir.c +@@ -110,8 +110,22 @@ static int user_remove_runtime_path(const char *runtime_path) { + return 0; + } + +-static int do_mount(const char *runtime_path, uid_t uid, gid_t gid) { ++static int do_mount(const char *user) { ++ char runtime_path[sizeof("/run/user") + DECIMAL_STR_MAX(uid_t)]; + size_t runtime_dir_size; ++ uid_t uid; ++ gid_t gid; ++ int r; ++ ++ r = get_user_creds(&user, &uid, &gid, NULL, NULL); ++ if (r < 0) ++ return log_error_errno(r, ++ r == -ESRCH ? "No such user \"%s\"" : ++ r == -ENOMSG ? "UID \"%s\" is invalid or has an invalid main group" ++ : "Failed to look up user \"%s\": %m", ++ user); ++ ++ xsprintf(runtime_path, "/run/user/" UID_FMT, uid); + + assert_se(gather_configuration(&runtime_dir_size) == 0); + +@@ -119,16 +133,30 @@ static int do_mount(const char *runtime_path, uid_t uid, gid_t gid) { + return user_mkdir_runtime_path(runtime_path, uid, gid, runtime_dir_size); + } + +-static int do_umount(const char *runtime_path) { ++static int do_umount(const char *user) { ++ char runtime_path[sizeof("/run/user") + DECIMAL_STR_MAX(uid_t)]; ++ uid_t uid; ++ int r; ++ ++ /* The user may be already removed. So, first try to parse the string by parse_uid(), ++ * and if it fails, fallback to get_user_creds().*/ ++ if (parse_uid(user, &uid) < 0) { ++ r = get_user_creds(&user, &uid, NULL, NULL, NULL); ++ if (r < 0) ++ return log_error_errno(r, ++ r == -ESRCH ? "No such user \"%s\"" : ++ r == -ENOMSG ? "UID \"%s\" is invalid or has an invalid main group" ++ : "Failed to look up user \"%s\": %m", ++ user); ++ } ++ ++ xsprintf(runtime_path, "/run/user/" UID_FMT, uid); ++ + log_debug("Will remove %s", runtime_path); + return user_remove_runtime_path(runtime_path); + } + + int main(int argc, char *argv[]) { +- const char *user; +- uid_t uid; +- gid_t gid; +- char runtime_path[sizeof("/run/user") + DECIMAL_STR_MAX(uid_t)]; + int r; + + log_parse_environment(); +@@ -145,23 +173,10 @@ int main(int argc, char *argv[]) { + + umask(0022); + +- user = argv[2]; +- r = get_user_creds(&user, &uid, &gid, NULL, NULL); +- if (r < 0) { +- log_error_errno(r, +- r == -ESRCH ? "No such user \"%s\"" : +- r == -ENOMSG ? "UID \"%s\" is invalid or has an invalid main group" +- : "Failed to look up user \"%s\": %m", +- user); +- return EXIT_FAILURE; +- } +- +- xsprintf(runtime_path, "/run/user/" UID_FMT, uid); +- + if (streq(argv[1], "start")) +- r = do_mount(runtime_path, uid, gid); ++ r = do_mount(argv[2]); + else if (streq(argv[1], "stop")) +- r = do_umount(runtime_path); ++ r = do_umount(argv[2]); + else + assert_not_reached("Unknown verb!"); + diff --git a/SOURCES/1058-pid1-do-not-use-generated-strings-as-format-strings-.patch b/SOURCES/1058-pid1-do-not-use-generated-strings-as-format-strings-.patch new file mode 100644 index 0000000..afbce05 --- /dev/null +++ b/SOURCES/1058-pid1-do-not-use-generated-strings-as-format-strings-.patch @@ -0,0 +1,49 @@ +From 2b0d33678cbd86d87691d044a5c11aa981a2316e Mon Sep 17 00:00:00 2001 +From: Lincoln Ramsay +Date: Wed, 24 Mar 2021 17:37:25 +1000 +Subject: [PATCH] pid1: do not use generated strings as format strings (#19098) + +The generated string may include %, which will confuse both the +xprintf call, and the VA_FORMAT_ADVANCE macro. + +Pass the generated string as an argument to a "%s" format string +instead. + +(cherry picked from commit 7325a2b2d15af09a9389723d6153050130c0bd36) + +Resolves: RHEL-132317 +--- + src/core/transaction.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/core/transaction.c b/src/core/transaction.c +index 8196aba927..4d6cb01fa4 100644 +--- a/src/core/transaction.c ++++ b/src/core/transaction.c +@@ -395,7 +395,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi + j->unit->id, + unit_id == array ? "ordering cycle" : "dependency", + *unit_id, *job_type, +- unit_ids); ++ "%s", unit_ids); + + if (delete) { + const char *status; +@@ -404,7 +404,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi + "MESSAGE=%s: Job %s/%s deleted to break ordering cycle starting with %s/%s", + j->unit->id, delete->unit->id, job_type_to_string(delete->type), + j->unit->id, job_type_to_string(j->type), +- unit_ids); ++ "%s", unit_ids); + + if (log_get_show_color()) + status = ANSI_HIGHLIGHT_RED " SKIP " ANSI_NORMAL; +@@ -420,7 +420,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi + log_struct(LOG_ERR, + "MESSAGE=%s: Unable to break cycle starting with %s/%s", + j->unit->id, j->unit->id, job_type_to_string(j->type), +- unit_ids); ++ "%s", unit_ids); + + return sd_bus_error_setf(e, BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC, + "Transaction order is cyclic. See system logs for details."); diff --git a/SOURCES/1059-core-transaction-make-merge_unit_ids-always-return-N.patch b/SOURCES/1059-core-transaction-make-merge_unit_ids-always-return-N.patch new file mode 100644 index 0000000..044c124 --- /dev/null +++ b/SOURCES/1059-core-transaction-make-merge_unit_ids-always-return-N.patch @@ -0,0 +1,57 @@ +From 1f6175b1b397293fe363f2c192dd2f994cbfe43d Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Sat, 18 Mar 2023 12:12:01 +0900 +Subject: [PATCH] core/transaction: make merge_unit_ids() always return + NUL-terminated string + +Follow-up for 924775e8ce49817f96df19c2b06356c12ecfc754. + +The loop run with `STRV_FOREACH_PAIR()`, hence `if (*(unit_id+1))` is +not a good way to detect if there exist a next entry. + +Fixes #26872. + +(cherry picked from commit 366eced4c81a15a25b9225347fa203aa67798b02) + +Resolves: RHEL-132317 +--- + src/core/transaction.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +diff --git a/src/core/transaction.c b/src/core/transaction.c +index 4d6cb01fa4..89cc1d0a4c 100644 +--- a/src/core/transaction.c ++++ b/src/core/transaction.c +@@ -322,22 +322,26 @@ _pure_ static bool unit_matters_to_anchor(Unit *u, Job *j) { + } + + static char* merge_unit_ids(const char* unit_log_field, char **pairs) { +- char **unit_id, **job_type, *ans = NULL; +- size_t alloc = 0, size = 0, next; ++ _cleanup_free_ char *ans = NULL; ++ char **unit_id, **job_type; ++ size_t alloc = 0, size = 0; + + STRV_FOREACH_PAIR(unit_id, job_type, pairs) { ++ size_t next; ++ ++ if (size > 0) ++ ans[size - 1] = '\n'; ++ + next = strlen(unit_log_field) + strlen(*unit_id); + if (!GREEDY_REALLOC(ans, alloc, size + next + 1)) { +- return mfree(ans); ++ return NULL; + } + + sprintf(ans + size, "%s%s", unit_log_field, *unit_id); +- if (*(unit_id+1)) +- ans[size + next] = '\n'; + size += next + 1; + } + +- return ans; ++ return TAKE_PTR(ans); + } + + static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsigned generation, sd_bus_error *e) { diff --git a/SOURCES/1060-core-transaction-make-merge_unit_ids-return-non-NULL.patch b/SOURCES/1060-core-transaction-make-merge_unit_ids-return-non-NULL.patch new file mode 100644 index 0000000..840c9b2 --- /dev/null +++ b/SOURCES/1060-core-transaction-make-merge_unit_ids-return-non-NULL.patch @@ -0,0 +1,27 @@ +From dc0b680699ec67ace0825724087487c3f5f82886 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Sat, 18 Mar 2023 12:17:54 +0900 +Subject: [PATCH] core/transaction: make merge_unit_ids() return non-NULL on + success + +(cherry picked from commit 999f16514367224cbc50cb3ccc1e4392e43f6811) + +Related: RHEL-132317 +--- + src/core/transaction.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/core/transaction.c b/src/core/transaction.c +index 89cc1d0a4c..cd80e7e111 100644 +--- a/src/core/transaction.c ++++ b/src/core/transaction.c +@@ -341,6 +341,9 @@ static char* merge_unit_ids(const char* unit_log_field, char **pairs) { + size += next + 1; + } + ++ if (!ans) ++ return strdup(""); ++ + return TAKE_PTR(ans); + } + diff --git a/SOURCES/1061-core-transaction-do-not-log-null.patch b/SOURCES/1061-core-transaction-do-not-log-null.patch new file mode 100644 index 0000000..e8af287 --- /dev/null +++ b/SOURCES/1061-core-transaction-do-not-log-null.patch @@ -0,0 +1,53 @@ +From 231be769332d2b699b9add3f8add7b8941c3a7aa Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Sat, 18 Mar 2023 12:15:10 +0900 +Subject: [PATCH] core/transaction: do not log "(null)" + +As we ignores the failure in merge_unit_ids(), so unit_ids may be NULL. + +(cherry picked from commit 5803c24da5cf543a55c4fce9009a9c5f2b18519a) + +Related: RHEL-132317 +--- + src/core/transaction.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/core/transaction.c b/src/core/transaction.c +index cd80e7e111..159c10c7c8 100644 +--- a/src/core/transaction.c ++++ b/src/core/transaction.c +@@ -6,6 +6,7 @@ + #include "alloc-util.h" + #include "bus-common-errors.h" + #include "bus-error.h" ++#include "string-util.h" + #include "terminal-util.h" + #include "transaction.h" + #include "dbus-unit.h" +@@ -402,7 +403,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi + j->unit->id, + unit_id == array ? "ordering cycle" : "dependency", + *unit_id, *job_type, +- "%s", unit_ids); ++ "%s", strna(unit_ids)); + + if (delete) { + const char *status; +@@ -411,7 +412,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi + "MESSAGE=%s: Job %s/%s deleted to break ordering cycle starting with %s/%s", + j->unit->id, delete->unit->id, job_type_to_string(delete->type), + j->unit->id, job_type_to_string(j->type), +- "%s", unit_ids); ++ "%s", strna(unit_ids)); + + if (log_get_show_color()) + status = ANSI_HIGHLIGHT_RED " SKIP " ANSI_NORMAL; +@@ -427,7 +428,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi + log_struct(LOG_ERR, + "MESSAGE=%s: Unable to break cycle starting with %s/%s", + j->unit->id, j->unit->id, job_type_to_string(j->type), +- "%s", unit_ids); ++ "%s", strna(unit_ids)); + + return sd_bus_error_setf(e, BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC, + "Transaction order is cyclic. See system logs for details."); diff --git a/SOURCES/1062-run-update-checks-to-allow-running-with-a-user-s-bus.patch b/SOURCES/1062-run-update-checks-to-allow-running-with-a-user-s-bus.patch new file mode 100644 index 0000000..e1beb8e --- /dev/null +++ b/SOURCES/1062-run-update-checks-to-allow-running-with-a-user-s-bus.patch @@ -0,0 +1,47 @@ +From b3d8c010014f19b8c563d3e13819620d2d068332 Mon Sep 17 00:00:00 2001 +From: Anita Zhang +Date: Thu, 13 May 2021 01:17:51 -0700 +Subject: [PATCH] run: update checks to allow running with a user's bus + +systemd-run is documented to as being able to connect and run on a +specific user bus with "--user --machine=lennart@.host" arguments. +This PR updates some logic that prevented this from working. + +(cherry picked from commit cbdc29492097e24ef3320280bc2a8dedbce02d9a) + +Resolves: RHEL-118835 +--- + src/run/run.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/run/run.c b/src/run/run.c +index 9ad44e7b57..b1d2d6fa4a 100644 +--- a/src/run/run.c ++++ b/src/run/run.c +@@ -415,13 +415,13 @@ static int parse_argv(int argc, char *argv[]) { + return -EINVAL; + } + +- if (arg_user && arg_transport != BUS_TRANSPORT_LOCAL) { +- log_error("Execution in user context is not supported on non-local systems."); ++ if (arg_user && arg_transport == BUS_TRANSPORT_REMOTE) { ++ log_error("Execution in user context is not supported on remote systems."); + return -EINVAL; + } + +- if (arg_scope && arg_transport != BUS_TRANSPORT_LOCAL) { +- log_error("Scope execution is not supported on non-local systems."); ++ if (arg_scope && arg_transport == BUS_TRANSPORT_REMOTE) { ++ log_error("Scope execution is not supported on remote systems."); + return -EINVAL; + } + +@@ -1495,7 +1495,7 @@ int main(int argc, char* argv[]) { + + /* If --wait is used connect via the bus, unconditionally, as ref/unref is not supported via the limited direct + * connection */ +- if (arg_wait || arg_stdio != ARG_STDIO_NONE) ++ if (arg_wait || arg_stdio != ARG_STDIO_NONE || (arg_user && arg_transport != BUS_TRANSPORT_LOCAL)) + r = bus_connect_transport(arg_transport, arg_host, arg_user, &bus); + else + r = bus_connect_transport_systemd(arg_transport, arg_host, arg_user, &bus); diff --git a/SOURCES/1063-Revert-run-update-checks-to-allow-running-with-a-use.patch b/SOURCES/1063-Revert-run-update-checks-to-allow-running-with-a-use.patch new file mode 100644 index 0000000..98ae2f7 --- /dev/null +++ b/SOURCES/1063-Revert-run-update-checks-to-allow-running-with-a-use.patch @@ -0,0 +1,44 @@ +From c3767a4460b41af817e01160e4bc201871f3bedd Mon Sep 17 00:00:00 2001 +From: Jan Macku +Date: Thu, 4 Dec 2025 15:18:22 +0100 +Subject: [PATCH] Revert "run: update checks to allow running with a user's + bus" + +This reverts commit b3d8c010014f19b8c563d3e13819620d2d068332. + +Related: RHEL-118835 +--- + src/run/run.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/run/run.c b/src/run/run.c +index b1d2d6fa4a..9ad44e7b57 100644 +--- a/src/run/run.c ++++ b/src/run/run.c +@@ -415,13 +415,13 @@ static int parse_argv(int argc, char *argv[]) { + return -EINVAL; + } + +- if (arg_user && arg_transport == BUS_TRANSPORT_REMOTE) { +- log_error("Execution in user context is not supported on remote systems."); ++ if (arg_user && arg_transport != BUS_TRANSPORT_LOCAL) { ++ log_error("Execution in user context is not supported on non-local systems."); + return -EINVAL; + } + +- if (arg_scope && arg_transport == BUS_TRANSPORT_REMOTE) { +- log_error("Scope execution is not supported on remote systems."); ++ if (arg_scope && arg_transport != BUS_TRANSPORT_LOCAL) { ++ log_error("Scope execution is not supported on non-local systems."); + return -EINVAL; + } + +@@ -1495,7 +1495,7 @@ int main(int argc, char* argv[]) { + + /* If --wait is used connect via the bus, unconditionally, as ref/unref is not supported via the limited direct + * connection */ +- if (arg_wait || arg_stdio != ARG_STDIO_NONE || (arg_user && arg_transport != BUS_TRANSPORT_LOCAL)) ++ if (arg_wait || arg_stdio != ARG_STDIO_NONE) + r = bus_connect_transport(arg_transport, arg_host, arg_user, &bus); + else + r = bus_connect_transport_systemd(arg_transport, arg_host, arg_user, &bus); diff --git a/SOURCES/1064-logind-fix-crash-in-logind-on-user-specified-message.patch b/SOURCES/1064-logind-fix-crash-in-logind-on-user-specified-message.patch new file mode 100644 index 0000000..8cf3da9 --- /dev/null +++ b/SOURCES/1064-logind-fix-crash-in-logind-on-user-specified-message.patch @@ -0,0 +1,74 @@ +From ed784c6dccf4e7b7d4628e02cf28b0d5725bab34 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 8 May 2022 17:21:09 +0200 +Subject: [PATCH] logind: fix crash in logind on user-specified message string + +This is trivially exploitable (in the sense of causing a crash from SEGV) e.g. +by 'shutdown now "Message %s %s %n"'. The message is settable through polkit, +but is limited to auth_admin: + + + Set a wall message + Authentication is required to set a wall message + + auth_admin_keep + auth_admin_keep + auth_admin_keep + + + +Bug introduced in 9ef15026c0e7e6600372056c43442c99ec53746e +('logind/systemctl: introduce SetWallMessage and --message', 2015-09-15). + +(cherry picked from commit 0cb09bcb825ab86ba4ca70be4e6322eaf9baee95) + +Related: RHEL-132317 +--- + src/login/logind-dbus.c | 21 ++++++++++----------- + 1 file changed, 10 insertions(+), 11 deletions(-) + +diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c +index 61fd47999d..ffa6af8d49 100644 +--- a/src/login/logind-dbus.c ++++ b/src/login/logind-dbus.c +@@ -1414,30 +1414,29 @@ static int bus_manager_log_shutdown( + assert(unit_name); + + if (streq(unit_name, SPECIAL_POWEROFF_TARGET)) { +- p = "MESSAGE=System is powering down"; ++ p = "System is powering down"; + q = "SHUTDOWN=power-off"; + } else if (streq(unit_name, SPECIAL_REBOOT_TARGET)) { +- p = "MESSAGE=System is rebooting"; ++ p = "System is rebooting"; + q = "SHUTDOWN=reboot"; + } else if (streq(unit_name, SPECIAL_HALT_TARGET)) { +- p = "MESSAGE=System is halting"; ++ p = "System is halting"; + q = "SHUTDOWN=halt"; + } else if (streq(unit_name, SPECIAL_KEXEC_TARGET)) { +- p = "MESSAGE=System is rebooting with kexec"; ++ p = "System is rebooting with kexec"; + q = "SHUTDOWN=kexec"; + } else { +- p = "MESSAGE=System is shutting down"; ++ p = "System is shutting down"; + q = NULL; + } + +- if (isempty(m->wall_message)) +- p = strjoina(p, "."); +- else +- p = strjoina(p, " (", m->wall_message, ")."); +- + return log_struct(LOG_NOTICE, + "MESSAGE_ID=" SD_MESSAGE_SHUTDOWN_STR, +- p, ++ LOG_MESSAGE("%s%s%s%s.", ++ p, ++ m->wall_message ? " (" : "", ++ strempty(m->wall_message), ++ m->wall_message ? ")" : ""), + q); + } + diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index ea8ce28..4c34539 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec @@ -13,7 +13,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 239 -Release: 82%{?dist}.8 +Release: 82%{?dist}.13 # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -1097,6 +1097,23 @@ Patch1044: 1044-test-restarting-elapsed-timer-shouldn-t-trigger-the-.patch Patch1045: 1045-test-check-the-next-elapse-timer-timestamp-after-des.patch Patch1046: 1046-timer-don-t-run-service-immediately-after-restart-of.patch Patch1047: 1047-Revert-test-extend-testcase-to-ensure-controller-mem.patch +Patch1048: 1048-cryptsetup-generator-refactor-add_crypttab_devices.patch +Patch1049: 1049-cryptsetup-generator-continue-parsing-after-error.patch +Patch1050: 1050-hwdb-add-ACCEL_LOCATION-property-to-parse_hwdb.py.patch +Patch1051: 1051-hwdb-update-ACCEL_LOCATION-property-to-use-Or-instea.patch +Patch1052: 1052-test-support-general-properties-in-hwdb-files.patch +Patch1053: 1053-hwdb-Relax-parsing-script-to-allow-0-and-1-for-all-I.patch +Patch1054: 1054-hwdb-allow-spaces-in-usb-matches-and-similar-pattern.patch +Patch1055: 1055-test-fix-parsing-of-60-seat.hwdb-and-60-keyboard.hwd.patch +Patch1056: 1056-parse_hwdb-fix-compatibility-with-pyparsing-2.4.patch +Patch1057: 1057-login-use-parse_uid-when-unmounting-user-runtime-dir.patch +Patch1058: 1058-pid1-do-not-use-generated-strings-as-format-strings-.patch +Patch1059: 1059-core-transaction-make-merge_unit_ids-always-return-N.patch +Patch1060: 1060-core-transaction-make-merge_unit_ids-return-non-NULL.patch +Patch1061: 1061-core-transaction-do-not-log-null.patch +Patch1062: 1062-run-update-checks-to-allow-running-with-a-user-s-bus.patch +Patch1063: 1063-Revert-run-update-checks-to-allow-running-with-a-use.patch +Patch1064: 1064-logind-fix-crash-in-logind-on-user-specified-message.patch %ifarch %{ix86} x86_64 aarch64 %global have_gnu_efi 1 @@ -1723,6 +1740,33 @@ fi %files tests -f .file-list-tests %changelog +* Mon Dec 08 2025 systemd maintenance team - 239-82.13 +- logind: fix crash in logind on user-specified message string (RHEL-132317) + +* Fri Dec 05 2025 systemd maintenance team - 239-82.12 +- Revert "run: update checks to allow running with a user's bus" (RHEL-118835) + +* Tue Dec 02 2025 systemd maintenance team - 239-82.11 +- run: update checks to allow running with a user's bus (RHEL-118835) + +* Tue Dec 02 2025 systemd maintenance team - 239-82.10 +- hwdb: add ACCEL_LOCATION property to parse_hwdb.py (RHEL-130979) +- hwdb: update ACCEL_LOCATION property to use Or instead of QuotedString (RHEL-130979) +- test: support general properties in hwdb files (RHEL-130979) +- hwdb: Relax parsing script to allow 0 and 1 for all ID_* properties (RHEL-130979) +- hwdb: allow spaces in usb: matches and similar patterns (RHEL-130979) +- test: fix parsing of 60-seat.hwdb and 60-keyboard.hwdb (RHEL-130979) +- parse_hwdb: fix compatibility with pyparsing 2.4.* (RHEL-130979) +- login: use parse_uid() when unmounting user runtime directory (RHEL-132175) +- pid1: do not use generated strings as format strings (#19098) (RHEL-132317) +- core/transaction: make merge_unit_ids() always return NUL-terminated string (RHEL-132317) +- core/transaction: make merge_unit_ids() return non-NULL on success (RHEL-132317) +- core/transaction: do not log "(null)" (RHEL-132317) + +* Wed Nov 05 2025 systemd maintenance team - 239-82.9 +- cryptsetup-generator: refactor add_crypttab_devices() (RHEL-38859) +- cryptsetup-generator: continue parsing after error (RHEL-38859) + * Thu Oct 02 2025 systemd maintenance team - 239-82.8 - test-execute: let's ignore the difference between CLD_KILLED and CLD_DUMPED (RHEL-108744) - test-execute: turn off coredump generation in test services (RHEL-108744)