search for: debug_augeas_error

Displaying 20 results from an estimated 30 matches for "debug_augeas_error".

Did you mean: debug_augeas_errors
2020 Sep 23
6
[common PATCH 0/3] SELinux_relabel: relabel only if enforcing (RHBZ#1828952)
Continuation/rework of: https://www.redhat.com/archives/libguestfs/2020-May/msg00020.html This is my approach, as I explained here: https://bugzilla.redhat.com/show_bug.cgi?id=1828952#c4 https://www.redhat.com/archives/libguestfs/2020-May/msg00035.html IOW: do not attempt to relabel if the guest is not enforcing, as it is either useless or may fail; few words more are in the comments of patch #3.
2019 Jan 30
1
[PATCH v3] v2v: linux: use NEVR for querying RPM packages (RHBZ#1669395)
...ertions(+), 21 deletions(-) diff --git a/v2v/linux.ml b/v2v/linux.ml index 43449157b..99b0e0e7b 100644 --- a/v2v/linux.ml +++ b/v2v/linux.ml @@ -27,6 +27,8 @@ open Utils module G = Guestfs +let re_version = PCRE.compile "(\\d+)\\.(\\d+)" + let augeas_reload g = g#aug_load (); debug_augeas_errors g @@ -80,29 +82,44 @@ let file_list_of_package (g : Guestfs.guestfs) inspect app = | "rpm" -> (* Since RPM allows multiple packages installed with the same - * name, always check the full ENVR here (RHBZ#1161250). + * name, always check the full NEVR here (RHBZ#11612...
2018 Nov 06
2
Re: [PATCH 2/3] v2v: linux: install packages
...++++++++++++++ > v2v/linux.mli | 3 +++ > 2 files changed, 22 insertions(+) > > diff --git a/v2v/linux.ml b/v2v/linux.ml > index 177724e39..6a5cae512 100644 > --- a/v2v/linux.ml > +++ b/v2v/linux.ml > @@ -31,6 +31,25 @@ let augeas_reload g = > g#aug_load (); > debug_augeas_errors g > > +let rec install g inspect packages = > + if packages <> [] then ( > + do_install g inspect packages; > + (* Reload Augeas in case anything changed. *) > + augeas_reload g > + ) > + > +and do_install g { i_package_format = package_format } packag...
2019 Jan 30
1
[PATCH v2] v2v: linux: use NEVR for querying RPM packages (RHBZ#1669395)
...ertions(+), 21 deletions(-) diff --git a/v2v/linux.ml b/v2v/linux.ml index 43449157b..63489c334 100644 --- a/v2v/linux.ml +++ b/v2v/linux.ml @@ -27,6 +27,8 @@ open Utils module G = Guestfs +let re_version = PCRE.compile "(\\d+)\\.(\\d+)" + let augeas_reload g = g#aug_load (); debug_augeas_errors g @@ -80,29 +82,40 @@ let file_list_of_package (g : Guestfs.guestfs) inspect app = | "rpm" -> (* Since RPM allows multiple packages installed with the same - * name, always check the full ENVR here (RHBZ#1161250). + * name, always check the full NEVR here (RHBZ#11612...
2020 May 05
3
[PATCH libguestfs-common 1/2] mlcustomize: Refactor SELinux_relabel code.
..." (16+32) (* AUG_SAVE_NOOP | AUG_NO_LOAD *); - (* See: https://bugzilla.redhat.com/show_bug.cgi?id=975412#c0 *) - ignore (g#aug_rm "/augeas/load/*[\"/etc/selinux/config/\" !~ regexp('^') + glob(incl) + regexp('/.*')]"); - g#aug_load (); - debug_augeas_errors g; - - (* Get the SELinux policy name, eg. "targeted", "minimum". - * Use "targeted" if not specified, just like libselinux does. +let rec relabel (g : G.guestfs) = + (* Is the guest using SELinux? (Otherwise this is a no-op). *) + if is_selinux_guest g...
2018 Jan 31
1
[PATCH] customize: allow missing SELINUXTYPE in SELinux config
...\ $(settings_test_scripts) check-slow: diff --git a/customize/SELinux_relabel.ml b/customize/SELinux_relabel.ml index d404c35fa..e7d440c29 100644 --- a/customize/SELinux_relabel.ml +++ b/customize/SELinux_relabel.ml @@ -37,8 +37,18 @@ let relabel (g : G.guestfs) = g#aug_load (); debug_augeas_errors g; - (* Get the SELinux policy name, eg. "targeted", "minimum". *) - let policy = g#aug_get "/files/etc/selinux/config/SELINUXTYPE" in + (* Get the SELinux policy name, eg. "targeted", "minimum". + * Use "targeted"...
2020 Sep 24
3
Re: [common PATCH 3/3] mlcustomize: do not relabel if not enforcing (RHBZ#1828952)
...x_not_enforcing -> > + (* This means that SELinux was not configured to be in enforcing mode, > + * so silently accept this. > + *) > + () > ) > > and is_selinux_guest g = > @@ -59,6 +68,21 @@ and use_setfiles g = > g#aug_load (); > debug_augeas_errors g; > > + (* Get the SELinux enforcing mode, eg "enforcing", "permissive", > + * "disabled". > + * Use "disabled" if not specified, just like libselinux seems to do. > + *) > + let typ = read_selinux_config_key g "SELINUX&quot...
2018 Nov 06
0
[PATCH 2/3] v2v: linux: install packages
...lembi@redhat.com> --- v2v/linux.ml | 19 +++++++++++++++++++ v2v/linux.mli | 3 +++ 2 files changed, 22 insertions(+) diff --git a/v2v/linux.ml b/v2v/linux.ml index 177724e39..6a5cae512 100644 --- a/v2v/linux.ml +++ b/v2v/linux.ml @@ -31,6 +31,25 @@ let augeas_reload g = g#aug_load (); debug_augeas_errors g +let rec install g inspect packages = + if packages <> [] then ( + do_install g inspect packages; + (* Reload Augeas in case anything changed. *) + augeas_reload g + ) + +and do_install g { i_package_format = package_format } packages = + assert (List.length packages > 0);...
2018 Nov 07
0
[PATCH v3 2/3] v2v: linux: install packages
...t;tgolembi@redhat.com> --- v2v/linux.ml | 14 ++++++++++++++ v2v/linux.mli | 3 +++ 2 files changed, 17 insertions(+) diff --git a/v2v/linux.ml b/v2v/linux.ml index 177724e39..966170cdd 100644 --- a/v2v/linux.ml +++ b/v2v/linux.ml @@ -31,6 +31,20 @@ let augeas_reload g = g#aug_load (); debug_augeas_errors g +let rec install_local g { i_package_format = package_format } packages = + if packages <> [] then ( + match package_format with + | "rpm" -> + let cmd = [ "rpm"; "--upgrade"; "-v" ] @ packages in + let cmd = Array.of_list cmd i...
2018 Nov 13
0
[PATCH v4 2/3] v2v: linux: install packages
...t;tgolembi@redhat.com> --- v2v/linux.ml | 14 ++++++++++++++ v2v/linux.mli | 3 +++ 2 files changed, 17 insertions(+) diff --git a/v2v/linux.ml b/v2v/linux.ml index 177724e39..966170cdd 100644 --- a/v2v/linux.ml +++ b/v2v/linux.ml @@ -31,6 +31,20 @@ let augeas_reload g = g#aug_load (); debug_augeas_errors g +let rec install_local g { i_package_format = package_format } packages = + if packages <> [] then ( + match package_format with + | "rpm" -> + let cmd = [ "rpm"; "--upgrade"; "-v" ] @ packages in + let cmd = Array.of_list cmd i...
2020 Sep 23
0
[common PATCH 3/3] mlcustomize: do not relabel if not enforcing (RHBZ#1828952)
...g#touch "/.autorelabel" + | SELinux_not_enforcing -> + (* This means that SELinux was not configured to be in enforcing mode, + * so silently accept this. + *) + () ) and is_selinux_guest g = @@ -59,6 +68,21 @@ and use_setfiles g = g#aug_load (); debug_augeas_errors g; + (* Get the SELinux enforcing mode, eg "enforcing", "permissive", + * "disabled". + * Use "disabled" if not specified, just like libselinux seems to do. + *) + let typ = read_selinux_config_key g "SELINUX" "disabled" in + (...
2018 Nov 07
0
Re: [PATCH 2/3] v2v: linux: install packages
...gt; > 2 files changed, 22 insertions(+) > > > > diff --git a/v2v/linux.ml b/v2v/linux.ml > > index 177724e39..6a5cae512 100644 > > --- a/v2v/linux.ml > > +++ b/v2v/linux.ml > > @@ -31,6 +31,25 @@ let augeas_reload g = > > g#aug_load (); > > debug_augeas_errors g > > > > +let rec install g inspect packages = > > + if packages <> [] then ( > > + do_install g inspect packages; > > + (* Reload Augeas in case anything changed. *) > > + augeas_reload g > > + ) > > + > > +and do_install g...
2016 Jul 13
6
[PATCH 0/5] Fix SELinux
We can use the setfiles(8) command to relabel the guest filesystem, even though we don't have a policy loaded nor SELinux enabled in the appliance kernel. This also deprecates or removes the old and broken SELinux support. This patch isn't quite complete - I would like to add some tests to the new API. I'm posting here to garner early feedback. Rich.
2020 Sep 24
0
Re: [common PATCH 3/3] mlcustomize: do not relabel if not enforcing (RHBZ#1828952)
...ns that SELinux was not configured to be in enforcing mode, > > + * so silently accept this. > > + *) > > + () > > ) > > > > and is_selinux_guest g = > > @@ -59,6 +68,21 @@ and use_setfiles g = > > g#aug_load (); > > debug_augeas_errors g; > > > > + (* Get the SELinux enforcing mode, eg "enforcing", "permissive", > > + * "disabled". > > + * Use "disabled" if not specified, just like libselinux seems to do. > > + *) > > + let typ = read_selinux_c...
2016 Jul 14
10
[PATCH v2 0/7] Fix SELinux
v1 -> v2: - Add simple test of the setfiles API. - Use SELinux_relabel module in virt-v2v (instead of touch /.autorelabel). - Small fixes. Rich.
2018 Nov 06
7
[PATCH 0/3] Install QEMU-GA from oVirt guest tools ISO on Linux
This installs packages with QEMU Guest Agent when converting Linux machine. The packages should be available on guest tools ISO. The patches work "as-is" but probably deserve some more attention: - it is "abusing" Winows_virtio code but renaming/refactoring everything to remove "windows" from the name and use "guest tools" seems like a lot of unnecesary
2016 Jul 14
0
[PATCH v2 4/7] customize: Add module for doing SELinux relabel of filesystem.
...aug_init "/" (16+32) (* AUG_SAVE_NOOP | AUG_NO_LOAD *); + (* See: https://bugzilla.redhat.com/show_bug.cgi?id=975412#c0 *) + ignore (g#aug_rm "/augeas/load/*[\"/etc/selinux/config/\" !~ regexp('^') + glob(incl) + regexp('/.*')]"); + g#aug_load (); + debug_augeas_errors g; + + (* Get the SELinux policy name, eg. "targeted", "minimum". *) + let policy = g#aug_get "/files/etc/selinux/config/SELINUXTYPE" in + g#aug_close (); + + (* Get the spec file name. *) + let specfile = + sprintf "/etc/selinux/%s/contexts/files/file_co...
2018 Nov 07
3
[PATCH v2 0/3] Install QEMU-GA from oVirt guest tools ISO on Linux
changes in v2: - moved copy_drivers above copy_files - renamed copy_files to copy_from_virtio_win - renamed install to install_local - use rpm instead of yum This installs packages with QEMU Guest Agent when converting Linux machine. The packages should be available on guest tools ISO. The patches work "as-is" but probably deserve some more attention: - it is "abusing"
2018 Nov 07
10
[PATCH v3 0/3] Install QEMU-GA from oVirt guest tools ISO on Linux
changes in v3: - fix call to install_local changes in v2: - moved copy_drivers above copy_files - renamed copy_files to copy_from_virtio_win - renamed install to install_local - use rpm instead of yum This installs packages with QEMU Guest Agent when converting Linux machine. The packages should be available on guest tools ISO. The patches work "as-is" but probably deserve some more
2018 Nov 13
8
[PATCH v4 0/3] Install QEMU-GA from oVirt guest tools ISO on Linux
changes in v4: - fix call to install_local changes in v2: - moved copy_drivers above copy_files - renamed copy_files to copy_from_virtio_win - renamed install to install_local - use rpm instead of yum This installs packages with QEMU Guest Agent when converting Linux machine. The packages should be available on guest tools ISO. The patches work "as-is" but probably deserve some more