Fix parsing of /etc/kernel/cmdline
resolves: rhbz#2159282
This commit is contained in:
parent
b839415c5d
commit
7c881b1a3e
@ -1,7 +1,7 @@
|
||||
From 08101c754aafab4d0f79367839bbd0d6012c31cf Mon Sep 17 00:00:00 2001
|
||||
From: Miroslav Lichvar <mlichvar@redhat.com>
|
||||
Date: Wed, 2 Mar 2022 14:54:39 +0100
|
||||
Subject: [PATCH 1/4] Chrony: add new directives and options (#745)
|
||||
Subject: [PATCH 1/5] Chrony: add new directives and options (#745)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
@ -1,7 +1,7 @@
|
||||
From e0bce2e8c21ccc69729676e8dc6fa1e541aedee2 Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Ersek <lersek@users.noreply.github.com>
|
||||
Date: Wed, 20 Apr 2022 10:13:06 +0200
|
||||
Subject: [PATCH 2/4] Kdump: parse "auto_reset_crashkernel" (#754)
|
||||
Subject: [PATCH 2/5] Kdump: parse "auto_reset_crashkernel" (#754)
|
||||
|
||||
The "auto_reset_crashkernel" keyword was introduced in the following
|
||||
kexec-tools patch set:
|
||||
|
@ -1,7 +1,7 @@
|
||||
From aca3def462ab141c3991a2d27c44341b809cf970 Mon Sep 17 00:00:00 2001
|
||||
From: rwmjones <rjones@redhat.com>
|
||||
Date: Thu, 6 Oct 2022 12:15:56 +0100
|
||||
Subject: [PATCH 3/4] semanage: Fix parsing of ignoredirs (#758)
|
||||
Subject: [PATCH 3/5] semanage: Fix parsing of ignoredirs (#758)
|
||||
|
||||
From /etc/selinux/semanage.conf from a RHEL 9.1 system, this line
|
||||
caused problems:
|
||||
|
@ -1,7 +1,7 @@
|
||||
From 34749f9ea1af8e3fad9e60891beda0fe786cb0f2 Mon Sep 17 00:00:00 2001
|
||||
From: Pino Toscano <ptoscano@redhat.com>
|
||||
Date: Fri, 24 Mar 2023 11:26:46 +0100
|
||||
Subject: [PATCH 4/4] Tmpfiles: allow '=', '~', '^' for letter types, allow ":"
|
||||
Subject: [PATCH 4/5] Tmpfiles: allow '=', '~', '^' for letter types, allow ":"
|
||||
as prefix for the mode
|
||||
|
||||
* Tmpfiles: allow '=', '~', '^' for letter types
|
||||
|
@ -0,0 +1,44 @@
|
||||
From f4a9ca77e5dba3659cfadd9e12ba96b32befdaab Mon Sep 17 00:00:00 2001
|
||||
From: rwmjones <rjones@redhat.com>
|
||||
Date: Sun, 5 Mar 2023 10:30:43 +0000
|
||||
Subject: [PATCH 5/5] lenses: Allow whitespace at the end of kernel commnd line
|
||||
(#798)
|
||||
|
||||
Reported-by: Yongkui Guo
|
||||
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2159282
|
||||
|
||||
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
|
||||
(cherry picked from commit 801aa73db3c356378467622a7e02dea21ccf4332)
|
||||
---
|
||||
lenses/cmdline.aug | 2 +-
|
||||
lenses/tests/test_cmdline.aug | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lenses/cmdline.aug b/lenses/cmdline.aug
|
||||
index b8b5176d..30e9aac7 100644
|
||||
--- a/lenses/cmdline.aug
|
||||
+++ b/lenses/cmdline.aug
|
||||
@@ -13,7 +13,7 @@ module Cmdline =
|
||||
|
||||
let entry = [ key Rx.word . Util.del_str "=" . store Rx.no_spaces ] | [ key Rx.word ]
|
||||
|
||||
-let lns = (Build.opt_list entry Sep.space)? . del /\n?/ ""
|
||||
+let lns = (Build.opt_list entry Sep.space)? . del /[ \t]*\n?/ ""
|
||||
|
||||
let filter = incl "/etc/kernel/cmdline"
|
||||
. incl "/proc/cmdline"
|
||||
diff --git a/lenses/tests/test_cmdline.aug b/lenses/tests/test_cmdline.aug
|
||||
index 0624a0b2..77a429d8 100644
|
||||
--- a/lenses/tests/test_cmdline.aug
|
||||
+++ b/lenses/tests/test_cmdline.aug
|
||||
@@ -4,6 +4,7 @@ let lns = Cmdline.lns
|
||||
|
||||
test lns get "foo\nbar" = *
|
||||
test lns get "foo\n" = { "foo" }
|
||||
+test lns get "foo \n" = { "foo" }
|
||||
test lns get "foo" = { "foo" }
|
||||
test lns get "foo bar" = { "foo" } { "bar" }
|
||||
test lns get "foo bar" = { "foo" } { "bar" }
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: augeas
|
||||
Version: 1.13.0
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: A library for changing configuration files
|
||||
|
||||
License: LGPLv2+
|
||||
@ -30,6 +30,10 @@ Patch3: 0003-semanage-Fix-parsing-of-ignoredirs-758.patch
|
||||
# Upstream commit 41b2a33ff02687fa53d69a012a1d47141b196a86
|
||||
Patch4: 0004-Tmpfiles-allow-for-letter-types-allow-as-prefix-for-.patch
|
||||
|
||||
# Fix parsing of /etc/kernel/cmdline
|
||||
# Upstream commit 801aa73db3c356378467622a7e02dea21ccf4332
|
||||
Patch5: 0005-lenses-Allow-whitespace-at-the-end-of-kernel-commnd-.patch
|
||||
|
||||
Provides: bundled(gnulib)
|
||||
|
||||
BuildRequires: make
|
||||
@ -148,7 +152,8 @@ rm -f $RPM_BUILD_ROOT/usr/bin/dump
|
||||
%changelog
|
||||
* Tue Apr 04 2023 Richard W.M. Jones <rjones@redhat.com> - 1.13.0-4
|
||||
- Fix parsing of /usr/lib/tmpfiles.d/provision.conf
|
||||
resolves: rhbz#2155136
|
||||
- Fix parsing of /etc/kernel/cmdline
|
||||
resolves: rhbz#2155136, rhbz#2159282
|
||||
|
||||
* Thu Oct 06 2022 Richard W.M. Jones <rjones@redhat.com> - 1.13.0-3
|
||||
- Fix parsing of /etc/selinux/semanage.conf in RHEL 9
|
||||
|
Loading…
Reference in New Issue
Block a user