From 1175109149296397932ffdfad74d7c3e336b78639d57a273f40be506b277ffa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 5 Apr 2016 16:44:10 +0000 Subject: [PATCH] Accepting request 384528 from home:cbosdonnat:branches:devel:libraries:c_c++ - Fix errors showing up in guestfs tools. Add upstreamed patches: 27d8457-inputrc-lens-support-mapping-like.patch 2d12670-inputrc-lens-support-else.patch 49bcfbe-Exclude-network-if-up.d-SuSEfirewall2-in-shellvars-l.patch 7558c12-host_conf-lens-spaces-between-list-items-support.patch OBS-URL: https://build.opensuse.org/request/show/384528 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/augeas?expand=0&rev=60 --- ...57-inputrc-lens-support-mapping-like.patch | 50 +++++++++++++++++ 2d12670-inputrc-lens-support-else.patch | 53 +++++++++++++++++++ ...if-up.d-SuSEfirewall2-in-shellvars-l.patch | 26 +++++++++ ...ns-spaces-between-list-items-support.patch | 41 ++++++++++++++ augeas.changes | 10 ++++ augeas.spec | 10 +++- 6 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 27d8457-inputrc-lens-support-mapping-like.patch create mode 100644 2d12670-inputrc-lens-support-else.patch create mode 100644 49bcfbe-Exclude-network-if-up.d-SuSEfirewall2-in-shellvars-l.patch create mode 100644 7558c12-host_conf-lens-spaces-between-list-items-support.patch diff --git a/27d8457-inputrc-lens-support-mapping-like.patch b/27d8457-inputrc-lens-support-mapping-like.patch new file mode 100644 index 0000000..d3848d4 --- /dev/null +++ b/27d8457-inputrc-lens-support-mapping-like.patch @@ -0,0 +1,50 @@ +From 27d845714d16aa0fcdc08f28623a6119ac4f0e6a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= +Date: Tue, 8 Mar 2016 11:04:28 +0100 +Subject: [PATCH] inputrc lens: support mapping like "," + +The mapping values aren't always words. They can also be quoted values +containing characters like [,+/*-] +--- + lenses/inputrc.aug | 2 +- + lenses/tests/test_inputrc.aug | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lenses/inputrc.aug b/lenses/inputrc.aug +index 67032ac..15bf96e 100644 +--- a/lenses/inputrc.aug ++++ b/lenses/inputrc.aug +@@ -27,7 +27,7 @@ autoload xfm + (* View: entry + An inputrc mapping entry *) + let entry = +- let mapping = [ label "mapping" . store Rx.word ] ++ let mapping = [ label "mapping" . store /[A-Za-z0-9_."\*\/+\,\\-]+/ ] + in [ label "entry" + . Util.del_str "\"" . store /[^" \t\n]+/ + . Util.del_str "\":" . Sep.space +diff --git a/lenses/tests/test_inputrc.aug b/lenses/tests/test_inputrc.aug +index e269fd5..ff475f2 100644 +--- a/lenses/tests/test_inputrc.aug ++++ b/lenses/tests/test_inputrc.aug +@@ -61,6 +61,7 @@ $if term=rxvt + \"\\e[8~\": end-of-line + \"\\eOc\": forward-word + \"\\eOd\": backward-word ++\"\\e[G\": \",\" + $endif + + # for non RH/Debian xterm, can't hurt for RH/Debian xterm +@@ -157,6 +158,9 @@ test Inputrc.lns get conf = + { "entry" = "\\eOd" + { "mapping" = "backward-word" } + } ++ { "entry" = "\\e[G" ++ { "mapping" = "\",\"" } ++ } + } + { } + { "#comment" = "for non RH/Debian xterm, can't hurt for RH/Debian xterm" } +-- +2.6.2 + diff --git a/2d12670-inputrc-lens-support-else.patch b/2d12670-inputrc-lens-support-else.patch new file mode 100644 index 0000000..0511d25 --- /dev/null +++ b/2d12670-inputrc-lens-support-else.patch @@ -0,0 +1,53 @@ +From 2d12670d15cacb279ec4045acbd296b02ce49be9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= +Date: Tue, 8 Mar 2016 11:07:21 +0100 +Subject: [PATCH] inputrc lens: support @else + +@if structures can also have an @else, let's read them into another +subtree. +--- + lenses/inputrc.aug | 2 ++ + lenses/tests/test_inputrc.aug | 7 +++++-- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/lenses/inputrc.aug b/lenses/inputrc.aug +index 15bf96e..3902528 100644 +--- a/lenses/inputrc.aug ++++ b/lenses/inputrc.aug +@@ -45,6 +45,8 @@ let variable = [ Util.del_str "set" . Sep.space + let rec condition = [ Util.del_str "$if" . label "@if" + . Sep.space . store Rx.space_in . Util.eol + . (Util.empty | Util.comment | condition | variable | entry)* ++ . [ Util.del_str "$else" . label "@else" . Util.eol ++ . (Util.empty | Util.comment | condition | variable | entry)* ] ? + . Util.del_str "$endif" . Util.eol ] + + (* View: lns +diff --git a/lenses/tests/test_inputrc.aug b/lenses/tests/test_inputrc.aug +index ff475f2..1535697 100644 +--- a/lenses/tests/test_inputrc.aug ++++ b/lenses/tests/test_inputrc.aug +@@ -61,6 +61,7 @@ $if term=rxvt + \"\\e[8~\": end-of-line + \"\\eOc\": forward-word + \"\\eOd\": backward-word ++$else + \"\\e[G\": \",\" + $endif + +@@ -158,8 +159,10 @@ test Inputrc.lns get conf = + { "entry" = "\\eOd" + { "mapping" = "backward-word" } + } +- { "entry" = "\\e[G" +- { "mapping" = "\",\"" } ++ { "@else" ++ { "entry" = "\\e[G" ++ { "mapping" = "\",\"" } ++ } + } + } + { } +-- +2.6.2 + diff --git a/49bcfbe-Exclude-network-if-up.d-SuSEfirewall2-in-shellvars-l.patch b/49bcfbe-Exclude-network-if-up.d-SuSEfirewall2-in-shellvars-l.patch new file mode 100644 index 0000000..ec2a3ff --- /dev/null +++ b/49bcfbe-Exclude-network-if-up.d-SuSEfirewall2-in-shellvars-l.patch @@ -0,0 +1,26 @@ +From 49bcfbeba1f4a2992a21720e97ac6e882064eea8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= +Date: Tue, 8 Mar 2016 10:31:50 +0100 +Subject: [PATCH] Exclude network/if-up.d/SuSEfirewall2 in shellvars lens + +openSUSE has /etc/sysconfig/network/if-up.d/SuSEfirewall2 that is not a +shell variable script, exclude it to avoid errors. +--- + lenses/shellvars.aug | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug +index 9bc3c9d..0f36c01 100644 +--- a/lenses/shellvars.aug ++++ b/lenses/shellvars.aug +@@ -270,6 +270,7 @@ module Shellvars = + sc_incl "network/if-down.d/*" . + sc_incl "network/ifroute-*" . + sc_incl "network/if-up.d/*" . ++ sc_excl "network/if-up.d/SuSEfirewall2" . + sc_incl "network/providers/*" . + sc_excl "network-scripts" . + sc_incl "network-scripts/ifcfg-*" . +-- +2.6.2 + diff --git a/7558c12-host_conf-lens-spaces-between-list-items-support.patch b/7558c12-host_conf-lens-spaces-between-list-items-support.patch new file mode 100644 index 0000000..37114c6 --- /dev/null +++ b/7558c12-host_conf-lens-spaces-between-list-items-support.patch @@ -0,0 +1,41 @@ +From 7558c12259d0c46cace7c8635e25281296337ea9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= +Date: Tue, 8 Mar 2016 11:09:28 +0100 +Subject: [PATCH] host_conf lens: spaces between list items support + +List items are separated by commas in host.conf, but we may find spaces +on top of the comma. +--- + lenses/host_conf.aug | 2 +- + lenses/tests/test_host_conf.aug | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lenses/host_conf.aug b/lenses/host_conf.aug +index 00a3492..294975b 100644 +--- a/lenses/host_conf.aug ++++ b/lenses/host_conf.aug +@@ -44,7 +44,7 @@ let bool_warn (kw:regexp) = Build.key_value_line kw Sep.space sto_bool_warn + (* View: list + A list of items *) + let list (kw:regexp) (elem:string) = +- let list_elems = Build.opt_list [seq elem . store Rx.word] (Sep.comma) in ++ let list_elems = Build.opt_list [seq elem . store Rx.word] (Sep.comma . Sep.opt_space) in + Build.key_value_line kw Sep.space list_elems + + (* View: trim *) +diff --git a/lenses/tests/test_host_conf.aug b/lenses/tests/test_host_conf.aug +index 146abde..f0df5ab 100644 +--- a/lenses/tests/test_host_conf.aug ++++ b/lenses/tests/test_host_conf.aug +@@ -3,7 +3,7 @@ module Test_Host_Conf = + let conf = " + # /etc/host.conf + # We have named running, but no NIS (yet) +-order bind,hosts ++order bind, hosts + # Allow multiple addrs + multi on + # Guard against spoof attempts +-- +2.6.2 + diff --git a/augeas.changes b/augeas.changes index e0913ba..b6005f9 100644 --- a/augeas.changes +++ b/augeas.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Apr 5 13:17:30 UTC 2016 - cbosdonnat@suse.com + +- Fix errors showing up in guestfs tools. + Add upstreamed patches: + 27d8457-inputrc-lens-support-mapping-like.patch + 2d12670-inputrc-lens-support-else.patch + 49bcfbe-Exclude-network-if-up.d-SuSEfirewall2-in-shellvars-l.patch + 7558c12-host_conf-lens-spaces-between-list-items-support.patch + ------------------------------------------------------------------- Thu Jul 16 13:06:40 UTC 2015 - tchvatal@suse.com diff --git a/augeas.spec b/augeas.spec index f69b4f9..dfeeda0 100644 --- a/augeas.spec +++ b/augeas.spec @@ -1,7 +1,7 @@ # # spec file for package augeas # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,6 +29,10 @@ Source1: http://download.augeas.net/augeas-%{version}.tar.gz.sig Source2: %{name}.keyring Source3: baselibs.conf Patch0: augeas-modprobe-lense.patch +Patch1: 27d8457-inputrc-lens-support-mapping-like.patch +Patch2: 2d12670-inputrc-lens-support-else.patch +Patch3: 49bcfbe-Exclude-network-if-up.d-SuSEfirewall2-in-shellvars-l.patch +Patch4: 7558c12-host_conf-lens-spaces-between-list-items-support.patch BuildRequires: glib2-devel BuildRequires: libxml2-devel BuildRequires: readline-devel @@ -97,6 +101,10 @@ modifying the official lenses, or when creating new ones. %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build export CFLAGS="-Wno-error %{optflags}"