From b33a648acde33fbf501954729192653f64e72f23 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 21 2020 23:30:09 +0000 Subject: import augeas-1.12.0-4.el8 --- diff --git a/SOURCES/0001-Grub-support-in-kernel-command-line-option-names-647.patch b/SOURCES/0001-Grub-support-in-kernel-command-line-option-names-647.patch new file mode 100644 index 0000000..1e84d52 --- /dev/null +++ b/SOURCES/0001-Grub-support-in-kernel-command-line-option-names-647.patch @@ -0,0 +1,58 @@ +From 800b8bb56b983e00f2c95183d0ff226172545d35 Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Wed, 23 Oct 2019 11:35:57 +0200 +Subject: [PATCH] Grub: support '+' in kernel command line option names (#647) + +This way it is possible to parse files that pass options with '+' in the +name to the kernel. + +(cherry picked from commit 2ba77589baee1bf2d43d3a49f8e6f3eb522e5bba) +--- + lenses/grub.aug | 2 +- + lenses/tests/test_grub.aug | 17 +++++++++++++++++ + 2 files changed, 18 insertions(+), 1 deletion(-) + +diff --git a/lenses/grub.aug b/lenses/grub.aug +index 24ad39bc..82c1c37a 100644 +--- a/lenses/grub.aug ++++ b/lenses/grub.aug +@@ -196,7 +196,7 @@ module Grub = + (* View: kernel_args + Parse the file name and args on a kernel or module line. *) + let kernel_args = +- let arg = /[A-Za-z0-9_.$-]+/ - /type|no-mem-option/ in ++ let arg = /[A-Za-z0-9_.$\+-]+/ - /type|no-mem-option/ in + store /(\([a-z0-9,]+\))?\/[^ \t\n]*/ . + (spc . multiboot_arg)? . + (spc . [ key arg . (eq. store /([^ \t\n])*/)?])* . eol +diff --git a/lenses/tests/test_grub.aug b/lenses/tests/test_grub.aug +index 75657203..e50bdc4f 100644 +--- a/lenses/tests/test_grub.aug ++++ b/lenses/tests/test_grub.aug +@@ -258,6 +258,23 @@ password --encrypted ^9^32kwzzX./3WISQ0C /boot/grub/custom.lst + { "md5" } + } } + ++ (* Test kernel options with different special characters. *) ++ test Grub.lns get "title Fedora (2.6.24.4-64.fc8) ++ root (hd0,0) ++ kernel /vmlinuz-2.6.24.4-64.fc8 ro root=/dev/vg00/lv00 with.dot=1 with-dash=1 with_underscore=1 with+plus=1 ++ initrd /initrd-2.6.24.4-64.fc8.img\n" = ++ { "title" = "Fedora (2.6.24.4-64.fc8)" ++ { "root" = "(hd0,0)" } ++ { "kernel" = "/vmlinuz-2.6.24.4-64.fc8" ++ { "ro" } ++ { "root" = "/dev/vg00/lv00" } ++ { "with.dot" = "1" } ++ { "with-dash" = "1" } ++ { "with_underscore" = "1" } ++ { "with+plus" = "1" } ++ } ++ { "initrd" = "/initrd-2.6.24.4-64.fc8.img" } } ++ + (* Test parsing of invalid entries via menu_error *) + test Grub.lns get "default=0\ncrud=no\n" = + { "default" = "0" } +-- +2.21.0 + diff --git a/SOURCES/0002-Rsyslog-support-multiple-actions-in-filters-and-sele.patch b/SOURCES/0002-Rsyslog-support-multiple-actions-in-filters-and-sele.patch new file mode 100644 index 0000000..f75eca1 --- /dev/null +++ b/SOURCES/0002-Rsyslog-support-multiple-actions-in-filters-and-sele.patch @@ -0,0 +1,94 @@ +From 612010470f4217b447b5ed5fe964fce1d895566a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Pinson?= +Date: Tue, 12 Nov 2019 13:33:26 +0100 +Subject: [PATCH] Rsyslog: support multiple actions in filters and selectors + (#653) + +(cherry picked from commit 5181105bae84dc7819a00886f068ad0bb4e6d05a) +--- + lenses/rsyslog.aug | 11 ++++++++--- + lenses/tests/test_rsyslog.aug | 37 +++++++++++++++++++++++++++++++++++ + 2 files changed, 45 insertions(+), 3 deletions(-) + +diff --git a/lenses/rsyslog.aug b/lenses/rsyslog.aug +index 7b9f7dc9..29ff9b10 100644 +--- a/lenses/rsyslog.aug ++++ b/lenses/rsyslog.aug +@@ -65,11 +65,17 @@ let hostname = [ label "hostname" . + ( Syslog.plus | [ Build.xchgs "-" "reverse" ] ) . + Syslog.hostnames . Util.eol . Syslog.entries ] + ++(* View: actions *) ++let actions = ++ let prop_act = [ label "action" . action ] ++ in let act_sep = del /[ \t]*\n&[ \t]*/ "\n& " ++ in Build.opt_list prop_act act_sep ++ + (* View: entry + An entry contains selectors and an action + *) + let entry = [ label "entry" . Syslog.selectors . Syslog.sep_tab . +- [ label "action" . action ] . Util.eol ] ++ actions . Util.eol ] + + (* View: prop_filter + Parses property-based filters, which start with ":" and the property name *) +@@ -78,9 +84,8 @@ let prop_filter = + in let prop_name = [ Util.del_str ":" . label "property" . store Rx.word ] + in let prop_oper = [ label "operation" . store /[A-Za-z!-]+/ ] + in let prop_val = [ label "value" . Quote.do_dquote (store /[^\n"]*/) ] +- in let prop_act = [ label "action" . action ] + in [ label "filter" . prop_name . sep . prop_oper . sep . prop_val . +- Sep.space . prop_act . Util.eol ] ++ Sep.space . actions . Util.eol ] + + let entries = ( Syslog.empty | Util.comment | entry | macro | config_object | prop_filter )* + +diff --git a/lenses/tests/test_rsyslog.aug b/lenses/tests/test_rsyslog.aug +index 9011a2b3..e83613a2 100644 +--- a/lenses/tests/test_rsyslog.aug ++++ b/lenses/tests/test_rsyslog.aug +@@ -222,3 +222,40 @@ test Rsyslog.lns get "*.* ?DynamicFile\n" = + { "dynamic" = "DynamicFile" } + } + } ++ ++(* Multiple actions in filters and selectors *) ++test Rsyslog.lns get ":msg, startswith, \"iptables:\" -/var/log/iptables.log ++& ~ ++# Save boot messages also to boot.log ++local7.* /var/log/boot.log ++local3.err /var/log/nfsen/nfsenlog ++& /var/log/also.log ++\n" = ++ { "filter" ++ { "property" = "msg" } ++ { "operation" = "startswith" } ++ { "value" = "iptables:" } ++ { "action" ++ { "no_sync" } ++ { "file" = "/var/log/iptables.log" } } ++ { "action" ++ { "discard" } } ++ } ++ { "#comment" = "Save boot messages also to boot.log" } ++ { "entry" ++ { "selector" ++ { "facility" = "local7" } ++ { "level" = "*" } } ++ { "action" ++ { "file" = "/var/log/boot.log" } } ++ } ++ { "entry" ++ { "selector" ++ { "facility" = "local3" } ++ { "level" = "err" } } ++ { "action" ++ { "file" = "/var/log/nfsen/nfsenlog" } } ++ { "action" ++ { "file" = "/var/log/also.log" } } } ++ { } ++ +-- +2.21.0 + diff --git a/SPECS/augeas.spec b/SPECS/augeas.spec index c3bcd1a..7d57449 100644 --- a/SPECS/augeas.spec +++ b/SPECS/augeas.spec @@ -1,12 +1,14 @@ Name: augeas Version: 1.12.0 -Release: 2%{?dist} +Release: 4%{?dist} Summary: A library for changing configuration files Group: System Environment/Libraries License: LGPLv2+ URL: http://augeas.net/ Source0: http://download.augeas.net/%{name}-%{version}.tar.gz +Patch1: 0001-Grub-support-in-kernel-command-line-option-names-647.patch +Patch2: 0002-Rsyslog-support-multiple-actions-in-filters-and-sele.patch BuildRequires: readline-devel libselinux-devel libxml2-devel BuildRequires: autoconf, automake @@ -51,6 +53,8 @@ read files. %prep %setup -q +%patch1 -p1 +%patch2 -p1 %build %configure \ @@ -113,6 +117,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/augeas.pc %changelog +* Thu Nov 14 2019 Pino Toscano - 1.12.0-4 +- Rsyslog: support multiple actions in filters and selectors (RHBZ#1660884) + +* Thu Nov 07 2019 Pino Toscano - 1.12.0-3 +- Grub: handle '+' in kernel command line options (RHBZ#1769314) + * Mon Jun 03 2019 Pino Toscano - 1.12.0-2 - Disable static libraries, not needed in RHEL.