search for: side_effects

Displaying 20 results from an estimated 63 matches for "side_effects".

2016 Feb 03
0
Re: [PATCH 1/3] sysprep, get-kernel: explicit the Guestfs parameter
.../sysprep/sysprep_operation_abrt_data.ml > index d950270..0d94271 100644 > --- a/sysprep/sysprep_operation_abrt_data.ml > +++ b/sysprep/sysprep_operation_abrt_data.ml > @@ -21,7 +21,7 @@ open Common_gettext.Gettext > > module G = Guestfs > > -let abrt_data_perform g root side_effects = > +let abrt_data_perform (g : Guestfs.guestfs) root side_effects = > let typ = g#inspect_get_type root in > if typ <> "windows" then ( > let paths = g#glob_expand "/var/spool/abrt/*" in > diff --git a/sysprep/sysprep_operation_bash_history.ml b/...
2016 Feb 03
6
[PATCH 1/3] sysprep, get-kernel: explicit the Guestfs parameter
...sysprep/sysprep_operation_abrt_data.ml b/sysprep/sysprep_operation_abrt_data.ml index d950270..0d94271 100644 --- a/sysprep/sysprep_operation_abrt_data.ml +++ b/sysprep/sysprep_operation_abrt_data.ml @@ -21,7 +21,7 @@ open Common_gettext.Gettext module G = Guestfs -let abrt_data_perform g root side_effects = +let abrt_data_perform (g : Guestfs.guestfs) root side_effects = let typ = g#inspect_get_type root in if typ <> "windows" then ( let paths = g#glob_expand "/var/spool/abrt/*" in diff --git a/sysprep/sysprep_operation_bash_history.ml b/sysprep/sysprep_operation...
2014 Jan 21
1
[PATCH 1/2] sysprep: Update comments.
--- sysprep/sysprep_operation.mli | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysprep/sysprep_operation.mli b/sysprep/sysprep_operation.mli index 61dde72..eb89db4 100644 --- a/sysprep/sysprep_operation.mli +++ b/sysprep/sysprep_operation.mli @@ -16,14 +16,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -(** Structure used to describe sysprep
2015 May 15
0
[PATCH 3/4] ocaml tools: Use global variables to store trace (-x) and verbose (-v) flags.
..., mount_opts in (* Inspection. *) (match Array.to_list (g#inspect_os ()) with @@ -269,7 +265,7 @@ read the man page virt-sysprep(1). (* Perform the filesystem operations. *) Sysprep_operation.perform_operations_on_filesystems - ?operations ~verbose ~quiet g root side_effects; + ?operations ~quiet g root side_effects; (* Unmount everything in this guest. *) g#umount_all (); @@ -278,7 +274,7 @@ read the man page virt-sysprep(1). (* Perform the block device operations. *) Sysprep_operation.perform_operations_on_devices -...
2015 May 15
5
[PATCH 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
.. and a lot of refactoring. https://bugzilla.redhat.com/show_bug.cgi?id=1167623 Rich.
2015 May 15
6
[PATCH v2 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623
2015 Jul 29
2
[PATCH 1/2] sysprep: machine_id: simplify implementation
.../sysprep_operation_machine_id.ml b/sysprep/sysprep_operation_machine_id.ml index fbcc692..190ca5b 100644 --- a/sysprep/sysprep_operation_machine_id.ml +++ b/sysprep/sysprep_operation_machine_id.ml @@ -21,15 +21,12 @@ open Common_gettext.Gettext module G = Guestfs -let machine_id_perform g root side_effects = +let machine_id_perform (g : Guestfs.guestfs) root side_effects = let typ = g#inspect_get_type root in if typ <> "windows" then ( - let path = "/etc/machine-id" in - (try g#rm path with G.Error _ -> ()); - (try - g#touch path; - side_effects...
2015 Mar 27
2
[LLVMdev] `llvm.$op.with.overflow`, InstCombine and ScalarEvolution
> If we don't care about trying to optimize out overflow checks in > InstCombine, I'd go with moving the complexity to CGP. I think instcombine should optimize out overflow checks (as it does today) without introducing _with_overflow calls. Are there reasons why such an approach would not work? > However, I think > InstCombine is doing the right thing here by forming these.
2014 Sep 02
2
[PATCH] sysprep: user-account: remove the correct home
...tion(-) diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml index 3d88ffc..dc194f4 100644 --- a/sysprep/sysprep_operation_user_account.ml +++ b/sysprep/sysprep_operation_user_account.ml @@ -84,6 +84,8 @@ let user_account_perform ~verbose ~quiet g root side_effects = String.sub userpath (i+1) (String.length userpath -i-1) in if uid >= uid_min && uid <= uid_max && check_remove_user username then ( + (* Get the home before removing the passwd entry. *) + let home_dir = g#aug_get (userpath ^...
2014 Dec 05
0
[PATCH] sysprep: user-account: mark "changed file" if users were removed
...sprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml index bda6331..e53e5cc 100644 --- a/sysprep/sysprep_operation_user_account.ml +++ b/sysprep/sysprep_operation_user_account.ml @@ -55,6 +55,7 @@ let check_remove_user user = let user_account_perform ~verbose ~quiet g root side_effects = let typ = g#inspect_get_type root in + let changed = ref false in if typ <> "windows" then ( g#aug_init "/" 0; let uid_min = g#aug_get "/files/etc/login.defs/UID_MIN" in @@ -72,6 +73,7 @@ let user_account_perform ~verbose ~quiet g root side_eff...
2015 Mar 26
4
[LLVMdev] `llvm.$op.with.overflow`, InstCombine and ScalarEvolution
I've run into cases where, because not all of LLVM's optimizations understand the semantics of the `llvm.$op.with.overflow` intrinsics, canonicalizing compares to `llvm.$op.with.overflow` ends up preventing optimization. For instance, running the following snippet through `opt -indvars` optimizes `%to.optimize` to `true`, but running it through `opt -instcombine -indvars` does not. ```
2014 Dec 05
3
[PATCH] customize, sysprep: add a short SELinux note
Add a short paragraph about SELinux, mostly to point to the documentation about it provided in the documentation of virt-builder. --- customize/virt-customize.pod | 8 ++++++++ sysprep/virt-sysprep.pod | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/customize/virt-customize.pod b/customize/virt-customize.pod index a666be7..8dbdfef 100644 --- a/customize/virt-customize.pod +++
2020 May 04
7
[PATCH 0/4] sysprep: add FreeIPA offline unenrollment (RHBZ#1789592)
This patch series adds a new virt-sysprep operation to offline unenroll a guest from FreeIPA. It does so by removing some configuration files and certificates. It requires a change in libguestfs-common before the series is applied. Pino Toscano (4): customize: port do_run to run_in_guest_command sysprep: add a update_system_ca_store side effect sysprep: ca-certificates: request system CA
2014 Jul 07
2
Re: [PATCH] Use Mkdtemp.temp_dir instead of Mkdtemp.mkdtemp
...--git a/sysprep/sysprep_operation_script.ml b/sysprep/sysprep_operation_script.ml > index d486a88..06d4dfc 100644 > --- a/sysprep/sysprep_operation_script.ml > +++ b/sysprep/sysprep_operation_script.ml > @@ -44,7 +44,7 @@ let rec script_perform ~verbose ~quiet (g : Guestfs.guestfs) root side_effects = > match !scriptdir with > | Some dir -> dir, false > | None -> > - let tmpdir = Mkdtemp.mkdtemp (Filename.temp_dir_name // "virt-sysprep.XXXXXX") in > + let tmpdir = Mkdtemp.temp_dir "virt-sysprep." "" in >...
2020 May 07
3
[PATCH v2 0/2] add FreeIPA offline unenrollment (RHBZ#1789592)
This patch series adds a new virt-sysprep operation to offline unenroll a guest from FreeIPA. It does so by removing some configuration files and certificates. Changes from v1: - the other patches were pushed, as unrelated and approved - created a new kerberos-hostkeytab operation Pino Toscano (2): sysprep: add IPA offline unenrollment (RHBZ#1789592) sysprep: add Kerberos keytab file removal
2018 Feb 12
2
[PATCH] inspect: recognize the Kali Linux distribution (RHBZ#1544227)
Read the information from os-release, and make it behave like a Debian distribution (i.e. using dpkg, and apt). --- daemon/inspect_fs.ml | 2 ++ daemon/inspect_fs_unix.ml | 1 + daemon/inspect_types.ml | 2 ++ daemon/inspect_types.mli | 1 + generator/actions_inspection.ml | 4 ++++ 5 files changed, 10 insertions(+) diff --git a/daemon/inspect_fs.ml
2014 Oct 28
1
[PATCH] sysprep: remove /var/spool/mail/username
...tion(+) diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml index fda5547..bda6331 100644 --- a/sysprep/sysprep_operation_user_account.ml +++ b/sysprep/sysprep_operation_user_account.ml @@ -83,6 +83,7 @@ let user_account_perform ~verbose ~quiet g root side_effects = g#aug_rm userpath; g#aug_rm (sprintf "/files/etc/shadow/%s" username); g#aug_rm (sprintf "/files/etc/group/%s" username); + g#rm_rf ("/var/spool/mail/" ^ username); match home_dir with | None -> ()...
2020 May 04
0
[PATCH 4/4] sysprep: add FreeIPA offline unenrollment (RHBZ#1789592)
...blic License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +open Sysprep_operation +open Common_gettext.Gettext + +module G = Guestfs + +let unenroll_freeipa_perform (g : Guestfs.guestfs) root side_effects = + let typ = g#inspect_get_type root in + if typ = "linux" then ( + (* Simple paths with no side effects. *) + let paths = [ "/etc/ipa/ca.crt"; + "/etc/ipa/default.conf"; + "/var/lib/ipa-client/sysrestore/*"; +...
2015 Jul 01
4
[PATCH 1/2] mllib: add and use last_part_of
...specified separator. *) diff --git a/sysprep/sysprep_operation_user_account.ml b/sysprep/sysprep_operation_user_account.ml index 3f3b142..78c60d0 100644 --- a/sysprep/sysprep_operation_user_account.ml +++ b/sysprep/sysprep_operation_user_account.ml @@ -69,8 +69,9 @@ let user_account_perform g root side_effects = let uid = g#aug_get uid in let uid = int_of_string uid in let username = - let i = String.rindex userpath '/' in - String.sub userpath (i+1) (String.length userpath -i-1) in + match last_part_of userpath '/' with + | S...
2014 Jul 07
2
[PATCH] mllib: introduce Mkdtemp.temp_dir
Add a simple function to ease the usage of Mkdtemp.mkdtemp. --- mllib/mkdtemp.ml | 5 +++++ mllib/mkdtemp.mli | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/mllib/mkdtemp.ml b/mllib/mkdtemp.ml index 2e64862..353b04b 100644 --- a/mllib/mkdtemp.ml +++ b/mllib/mkdtemp.ml @@ -16,4 +16,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) +open Common_utils +