[Pkg-libvirt-commits] [libguestfs] 10/17: customize: Allow --selinux-relabel flag to work on cross-architecture builds (RHBZ#1212807).

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:12:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.29.43
in repository libguestfs.

commit a43e8405ef83786f72f507f1aea31977b2f4de91
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Fri May 15 10:03:42 2015 +0100

    customize: Allow --selinux-relabel flag to work on cross-architecture builds (RHBZ#1212807).
---
 customize/customize_run.ml | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/customize/customize_run.ml b/customize/customize_run.ml
index f3924c1..e44f198 100644
--- a/customize/customize_run.ml
+++ b/customize/customize_run.ml
@@ -331,15 +331,19 @@ exec >>%s 2>&1
 
   if ops.flags.selinux_relabel then (
     msg (f_"SELinux relabelling");
-    let cmd = sprintf "
-      if load_policy && fixfiles restore; then
-        rm -f /.autorelabel
-      else
-        touch /.autorelabel
-        echo '%s: SELinux relabelling failed, will relabel at boot instead.'
-      fi
-    " prog in
-    do_run ~display:"load_policy && fixfiles restore" cmd
+    if guest_arch_compatible then (
+      let cmd = sprintf "
+        if load_policy && fixfiles restore; then
+          rm -f /.autorelabel
+        else
+          touch /.autorelabel
+          echo '%s: SELinux relabelling failed, will relabel at boot instead.'
+        fi
+      " prog in
+      do_run ~display:"load_policy && fixfiles restore" cmd
+    ) else (
+      g#touch "/.autorelabel"
+    )
   );
 
   (* Clean up the log file:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list