From 78c0ed7054bf73e4a47b48d14eb9cecdd693ccef Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jan 13 2022 12:52:56 +0000 Subject: import augeas-1.12.0-7.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 index 7b60bff..dbeddc1 100644 --- 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 @@ -1,7 +1,8 @@ -From 800b8bb56b983e00f2c95183d0ff226172545d35 Mon Sep 17 00:00:00 2001 +From e666bf968071a9976bd44e1eb65645eb9d51b5cb 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) +Subject: [PATCH 1/8] 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. @@ -54,5 +55,5 @@ index 75657203..e50bdc4f 100644 test Grub.lns get "default=0\ncrud=no\n" = { "default" = "0" } -- -2.29.2 +2.31.1 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 index 1746c94..2c0de8b 100644 --- a/SOURCES/0002-Rsyslog-support-multiple-actions-in-filters-and-sele.patch +++ b/SOURCES/0002-Rsyslog-support-multiple-actions-in-filters-and-sele.patch @@ -1,8 +1,8 @@ -From 612010470f4217b447b5ed5fe964fce1d895566a Mon Sep 17 00:00:00 2001 +From eb2dc4ec0879290f42e35a7facc345ca1c70ba69 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) +Subject: [PATCH 2/8] Rsyslog: support multiple actions in filters and + selectors (#653) (cherry picked from commit 5181105bae84dc7819a00886f068ad0bb4e6d05a) --- @@ -90,5 +90,5 @@ index 9011a2b3..e83613a2 100644 + { } + -- -2.29.2 +2.31.1 diff --git a/SOURCES/0003-src-augrun.c-nexttoken-add-more-escape-characters.patch b/SOURCES/0003-src-augrun.c-nexttoken-add-more-escape-characters.patch index 892159e..5c275fd 100644 --- a/SOURCES/0003-src-augrun.c-nexttoken-add-more-escape-characters.patch +++ b/SOURCES/0003-src-augrun.c-nexttoken-add-more-escape-characters.patch @@ -1,7 +1,7 @@ -From d37c8aabc29c3989d5f961d8b742b246a5f64cdf Mon Sep 17 00:00:00 2001 +From 5218c2997b7b77752511ebc61ffa743fd2d8fcbf Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 17 May 2019 13:47:20 +0200 -Subject: [PATCH] * src/augrun.c (nexttoken): add more escape characters +Subject: [PATCH 3/8] * src/augrun.c (nexttoken): add more escape characters Synchonize the list of "pass-through" characters with the set in the 'name_follow' variable in pathx.c: as pathx_escape_name() escapes them, @@ -33,5 +33,5 @@ index 07f865a9..fd710c5f 100644 break; case 't': /* insert tab */ -- -2.29.2 +2.31.1 diff --git a/SOURCES/0004-src-augtool.c-hopefully-fix-readline-quoting-issues.patch b/SOURCES/0004-src-augtool.c-hopefully-fix-readline-quoting-issues.patch index a6c425b..8dcbba8 100644 --- a/SOURCES/0004-src-augtool.c-hopefully-fix-readline-quoting-issues.patch +++ b/SOURCES/0004-src-augtool.c-hopefully-fix-readline-quoting-issues.patch @@ -1,7 +1,7 @@ -From f224dd99c7dc4d2ce4340b2d16cae6b1e0ed7c8d Mon Sep 17 00:00:00 2001 +From fc2b84a2ecd9a403cb602d2de26d6c1804a3ceac Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 17 May 2019 15:18:50 +0200 -Subject: [PATCH] * src/augtool.c: hopefully fix readline quoting issues +Subject: [PATCH 4/8] * src/augtool.c: hopefully fix readline quoting issues Configure the quoting (also using a detector) and word break characters, so it is possible to autocomplete paths with special characters (like @@ -38,5 +38,5 @@ index b42ef630..31a991eb 100644 /* Set up persistent history */ char *home_dir = get_home_dir(getuid()); -- -2.29.2 +2.31.1 diff --git a/SOURCES/0005-Krb5-improve-dbmodules-and-includes-630.patch b/SOURCES/0005-Krb5-improve-dbmodules-and-includes-630.patch index b310c8b..4b42a62 100644 --- a/SOURCES/0005-Krb5-improve-dbmodules-and-includes-630.patch +++ b/SOURCES/0005-Krb5-improve-dbmodules-and-includes-630.patch @@ -1,7 +1,7 @@ -From 63786a83b2e4b14772ee8742fa95d70063ba7b6c Mon Sep 17 00:00:00 2001 +From 1b4d6a9918b8bcbc06af4ce99a48cd66fed97196 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 4 Feb 2020 17:54:22 +0100 -Subject: [PATCH] Krb5: improve [dbmodules] and includes (#630) +Subject: [PATCH 5/8] Krb5: improve [dbmodules] and includes (#630) * Krb5: fix/revamp parsing of [dbmodules] subsection @@ -129,5 +129,5 @@ index f746543b..10b87605 100644 + { "db_module_dir" = "/some/path" } + } -- -2.29.2 +2.31.1 diff --git a/SOURCES/0006-Systemd-fix-parsing-of-envvars-with-spaces-659.patch b/SOURCES/0006-Systemd-fix-parsing-of-envvars-with-spaces-659.patch index cfb0439..f45e50f 100644 --- a/SOURCES/0006-Systemd-fix-parsing-of-envvars-with-spaces-659.patch +++ b/SOURCES/0006-Systemd-fix-parsing-of-envvars-with-spaces-659.patch @@ -1,7 +1,7 @@ -From 472a143b427afc89ab2fd843cea1f1f97193ceef Mon Sep 17 00:00:00 2001 +From eb7c72cfffa5360a65be270c5554abf36739e382 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Tue, 4 Feb 2020 18:05:05 +0100 -Subject: [PATCH] Systemd: fix parsing of envvars with spaces (#659) +Subject: [PATCH 6/8] Systemd: fix parsing of envvars with spaces (#659) Allow spaces inside of values quoted with single or double quotes. @@ -55,5 +55,5 @@ index 3397456e..19c57075 100644 (* Variable: unit *) -- -2.29.2 +2.31.1 diff --git a/SOURCES/0007-Ssh-add-Match-keyword-support-695.patch b/SOURCES/0007-Ssh-add-Match-keyword-support-695.patch index cd6178f..8f2bc43 100644 --- a/SOURCES/0007-Ssh-add-Match-keyword-support-695.patch +++ b/SOURCES/0007-Ssh-add-Match-keyword-support-695.patch @@ -1,7 +1,7 @@ -From 0880cf38e5c9a6a9ddb3ce4cae372dec5ad34cbe Mon Sep 17 00:00:00 2001 +From efd61b77563489ca0fa21904cc1fecfc482afd06 Mon Sep 17 00:00:00 2001 From: granquet Date: Tue, 6 Oct 2020 23:03:18 +0200 -Subject: [PATCH] Ssh: add Match keyword support (#695) +Subject: [PATCH 7/8] Ssh: add Match keyword support (#695) Signed-off-by: Guillaume Ranquet --- @@ -81,5 +81,5 @@ index f5fca252..456624e4 100644 { "ForwardAgent" = "yes" } { "SendEnv" -- -2.29.2 +2.31.1 diff --git a/SOURCES/0008-Include-mke2fs-lens-and-test-from-upstream.patch b/SOURCES/0008-Include-mke2fs-lens-and-test-from-upstream.patch new file mode 100644 index 0000000..9ea417c --- /dev/null +++ b/SOURCES/0008-Include-mke2fs-lens-and-test-from-upstream.patch @@ -0,0 +1,251 @@ +From 59fb794a4c47b811998273323cd49cc91f9db7e2 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 12 Jan 2022 16:11:22 +0000 +Subject: [PATCH 8/8] Include mke2fs lens and test from upstream + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1807010 +--- + lenses/mke2fs.aug | 108 ++++++++++++++++++++++++++--------- + lenses/tests/test_mke2fs.aug | 46 ++++++++++++++- + 2 files changed, 124 insertions(+), 30 deletions(-) + +diff --git a/lenses/mke2fs.aug b/lenses/mke2fs.aug +index dc895490..46a7136e 100644 +--- a/lenses/mke2fs.aug ++++ b/lenses/mke2fs.aug +@@ -34,6 +34,14 @@ let sep = IniFile.sep /=[ \t]*/ "=" + (* View: empty *) + let empty = IniFile.empty + ++(* View: boolean ++ The configuration parser of e2fsprogs recognizes different values ++ for booleans, so list all the recognized values *) ++let boolean = ("y"|"yes"|"true"|"t"|"1"|"on"|"n"|"no"|"false"|"nil"|"0"|"off") ++ ++(* View: fspath *) ++let fspath = /[^ \t\n"]+/ ++ + + (************************************************************************ + * Group: RECORD TYPES +@@ -47,27 +55,59 @@ let entry (kw:regexp) (lns:lens) = Build.key_value_line kw sep lns + + (* View: list_sto + A list of values with given lens *) +-let list_sto (kw:regexp) (lns:lens) = counter "item" . +- entry kw +- (Build.opt_list +- [lns] +- Sep.comma) ++let list_sto (kw:regexp) (lns:lens) = ++ entry kw (Quote.do_dquote_opt_nil (Build.opt_list [lns] Sep.comma)) + + (* View: entry_sto + Store a regexp as entry value *) +-let entry_sto (kw:regexp) (val:regexp) = entry kw (store val) ++let entry_sto (kw:regexp) (val:regexp) = ++ entry kw (Quote.do_dquote_opt_nil (store val)) ++ | entry kw (Util.del_str "\"\"") + + + (************************************************************************ + * Group: COMMON ENTRIES + *************************************************************************) ++ ++(* View: common_entries_list ++ Entries with a list value *) ++let common_entries_list = ("base_features"|"default_features"|"default_mntopts") ++ ++(* View: common_entries_int ++ Entries with an integer value *) ++let common_entries_int = ("cluster_size"|"flex_bg_size"|"force_undo" ++ |"inode_ratio"|"inode_size"|"num_backup_sb") ++ ++(* View: common_entries_bool ++ Entries with a boolean value *) ++let common_entries_bool = ("auto_64-bit_support"|"discard" ++ |"enable_periodic_fsck"|"lazy_itable_init" ++ |"lazy_journal_init"|"packed_meta_blocks") ++ ++(* View: common_entries_string ++ Entries with a string value *) ++let common_entries_string = ("encoding"|"journal_location") ++ ++(* View: common_entries_double ++ Entries with a double value *) ++let common_entries_double = ("reserved_ratio") ++ + (* View: common_entry + Entries shared between and sections *) +-let common_entry = list_sto ("base_features"|"default_features") +- (key Rx.word) ++let common_entry = list_sto common_entries_list (key Rx.word) ++ | entry_sto common_entries_int Rx.integer ++ | entry_sto common_entries_bool boolean ++ | entry_sto common_entries_string Rx.word ++ | entry_sto common_entries_double Rx.decimal + | entry_sto "blocksize" ("-"? . Rx.integer) + | entry_sto "hash_alg" ("legacy"|"half_md4"|"tea") +- | entry_sto ("inode_ratio"|"inode_size") Rx.integer ++ | entry_sto "errors" ("continue"|"remount-ro"|"panic") ++ | list_sto "features" ++ ([del /\^/ "^" . label "disable"]? ++ . key Rx.word) ++ | list_sto "options" ++ (key Rx.word . Util.del_str "=" ++ . store Rx.word) + + (************************************************************************ + * Group: DEFAULTS SECTION +@@ -75,11 +115,8 @@ let common_entry = list_sto ("base_features"|"default_features") + + (* View: defaults_entry + Possible entries under the section *) +-let defaults_entry = entry_sto "force_undo" ("true"|"false") +- | entry_sto "fs_type" Rx.word +- | entry_sto "undo_dir" Rx.fspath +- | list_sto "default_mntopts" (key Rx.word) +- | entry_sto "enable_periodic_fsck" Rx.integer ++let defaults_entry = entry_sto "fs_type" Rx.word ++ | entry_sto "undo_dir" fspath + + (* View: defaults_title + Title for the section *) +@@ -95,24 +132,12 @@ let defaults = IniFile.record defaults_title + * Group: FS_TYPES SECTION + *************************************************************************) + +-(* View: fs_types_entry +- Possible entries under a group *) +-let fs_types_entry =list_sto "features" +- ([del /\^/ "^" . label "disable"]? +- . key Rx.word) +- | list_sto "options" +- (key Rx.word . Util.del_str "=" +- . store Rx.word) +- | entry_sto "lazy_itable_init" ("true"|"false") +- | entry_sto ("flex_bg_size"|"auto_64-bit_support") +- Rx.integer +- + (* View: fs_types_record + Fs group records under the section *) + let fs_types_record = [ label "filesystem" + . Util.indent . store Rx.word + . del /[ \t]*=[ \t]*\{[ \t]*\n/ " = {\n" +- . ((Util.indent . (fs_types_entry|common_entry)) | empty | comment)* ++ . ((Util.indent . common_entry) | empty | comment)* + . del /[ \t]*\}[ \t]*\n/ " }\n" ] + + (* View: fs_types_title +@@ -125,6 +150,33 @@ let fs_types = IniFile.record fs_types_title + (fs_types_record | comment) + + ++(************************************************************************ ++ * Group: OPTIONS SECTION ++ *************************************************************************) ++ ++(* View: options_entries_int ++ Entries with an integer value *) ++let options_entries_int = ("proceed_delay"|"sync_kludge") ++ ++(* View: options_entries_bool ++ Entries with a boolean value *) ++let options_entries_bool = ("old_bitmaps") ++ ++(* View: options_entry ++ Possible entries under the section *) ++let options_entry = entry_sto options_entries_int Rx.integer ++ | entry_sto options_entries_bool boolean ++ ++(* View: defaults_title ++ Title for the section *) ++let options_title = IniFile.title "options" ++ ++(* View: options ++ A options section *) ++let options = IniFile.record options_title ++ ((Util.indent . options_entry) | comment) ++ ++ + (************************************************************************ + * Group: LENS AND FILTER + *************************************************************************) +@@ -132,7 +184,7 @@ let fs_types = IniFile.record fs_types_title + (* View: lns + The mke2fs lens + *) +-let lns = (empty|comment)* . (defaults|fs_types)* ++let lns = (empty|comment)* . (defaults|fs_types|options)* + + (* Variable: filter *) + let filter = incl "/etc/mke2fs.conf" +diff --git a/lenses/tests/test_mke2fs.aug b/lenses/tests/test_mke2fs.aug +index f1ddbe9e..bcf2fe61 100644 +--- a/lenses/tests/test_mke2fs.aug ++++ b/lenses/tests/test_mke2fs.aug +@@ -33,6 +33,10 @@ module Test_mke2fs = + inode_ratio = 1048576 + blocksize = -1 + } ++ ++[options] ++ proceed_delay = 1 ++ sync_kludge = 1 + " + + test Mke2fs.lns get conf = +@@ -74,10 +78,48 @@ module Test_mke2fs = + { "inode_ratio" = "4096" } } + { "filesystem" = "largefile" + { "inode_ratio" = "1048576" } +- { "blocksize" = "-1" } } } ++ { "blocksize" = "-1" } } ++ {} } ++ { "options" ++ { "proceed_delay" = "1" } ++ { "sync_kludge" = "1" } } + + +-test Mke2fs.fs_types_entry ++ let quoted_conf = "[defaults] ++ base_features = \"sparse_super,filetype,resize_inode,dir_index,ext_attr\" ++ ++[fs_types] ++ ext4dev = { ++ features = \"has_journal,^extent\" ++ default_mntopts = \"user_xattr\" ++ encoding = \"utf8\" ++ encoding = \"\" ++ } ++" ++ ++ test Mke2fs.lns get quoted_conf = ++ { "defaults" ++ { "base_features" ++ { "sparse_super" } ++ { "filetype" } ++ { "resize_inode" } ++ { "dir_index" } ++ { "ext_attr" } } ++ {} } ++ { "fs_types" ++ { "filesystem" = "ext4dev" ++ { "features" ++ { "has_journal" } ++ { "extent" ++ { "disable" } } } ++ { "default_mntopts" ++ { "user_xattr" } } ++ { "encoding" = "utf8" } ++ { "encoding" } ++ } } ++ ++ ++test Mke2fs.common_entry + put "features = has_journal,^extent\n" + after set "/features/has_journal/disable" ""; + rm "/features/extent/disable" = "features = ^has_journal,extent\n" +-- +2.31.1 + diff --git a/SPECS/augeas.spec b/SPECS/augeas.spec index b8456a0..e39e080 100644 --- a/SPECS/augeas.spec +++ b/SPECS/augeas.spec @@ -1,12 +1,16 @@ Name: augeas Version: 1.12.0 -Release: 6%{?dist} +Release: 7%{?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 + +# Patches are stored here: +# https://github.com/rwmjones/augeas/tree/rhel-8.6 + Patch1: 0001-Grub-support-in-kernel-command-line-option-names-647.patch Patch2: 0002-Rsyslog-support-multiple-actions-in-filters-and-sele.patch Patch3: 0003-src-augrun.c-nexttoken-add-more-escape-characters.patch @@ -14,6 +18,7 @@ Patch4: 0004-src-augtool.c-hopefully-fix-readline-quoting-issues.patch Patch5: 0005-Krb5-improve-dbmodules-and-includes-630.patch Patch6: 0006-Systemd-fix-parsing-of-envvars-with-spaces-659.patch Patch7: 0007-Ssh-add-Match-keyword-support-695.patch +Patch8: 0008-Include-mke2fs-lens-and-test-from-upstream.patch BuildRequires: readline-devel libselinux-devel libxml2-devel BuildRequires: autoconf, automake @@ -120,6 +125,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/augeas.pc %changelog +* Wed Jan 12 2022 Richard W.M. Jones - 1.12.0-7 +- Fix parsing of mke2fs.conf files + resolves: rhbz#1807010 + * Tue Jan 05 2021 Pino Toscano - 1.12.0-6 - Ssh: parse Match options (RHBZ#1716359)