plautrba pushed to libsemanage (private-master-2.4). "HEAD https://github.com/fedora-selinux/selinux/commit/2fa9bda56226ca7e66495b7c559d500ca4512afc (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue May 12 17:32:33 UTC 2015


From 0df50b80dd7b4385f3955e2abb52afca99222f6b Mon Sep 17 00:00:00 2001
From: Petr Lautrbach <plautrba at redhat.com>
Date: Tue, 12 May 2015 19:31:02 +0200
Subject: HEAD
 https://github.com/fedora-selinux/selinux/commit/2fa9bda56226ca7e66495b7c559d500ca4512afc

 - semanage_migrate_store: add -r <root> option for migrating inside chroots

diff --git a/libsemanage-rhat.patch b/libsemanage-rhat.patch
index ccb36d4..a18c90b 100644
--- a/libsemanage-rhat.patch
+++ b/libsemanage-rhat.patch
@@ -11,3 +11,45 @@ index 4d25b07..32cc33c 100644
  };
  int fd;
  FILE *fptr;
+diff --git libsemanage-2.4/utils/semanage_migrate_store libsemanage-2.4/utils/semanage_migrate_store
+index 03b492e..6584002 100755
+--- libsemanage-2.4/utils/semanage_migrate_store
++++ libsemanage-2.4/utils/semanage_migrate_store
+@@ -221,7 +221,7 @@ def rebuild_policy():
+ 
+ 
+ def oldroot_path():
+-	return "/etc/selinux"
++	return "%s/etc/selinux" % ROOT
+ 
+ def oldstore_path(store):
+ 	return "%s/%s/modules/active" % (oldroot_path(), store)
+@@ -233,7 +233,7 @@ def disabledmodules_path(store):
+ 	return "%s/disabled" % newmodules_path(store)
+ 
+ def newroot_path():
+-	return PATH
++	return "%s%s" % (ROOT, PATH)
+ 
+ def newstore_path(store):
+ 	return "%s/%s/active" % (newroot_path(), store)
+@@ -260,6 +260,8 @@ if __name__ == "__main__":
+ 			  help="Disable rebuilding policy after migration (default: no)")
+ 	parser.add_option("-P", "--path", dest="path",
+ 			  help="Set path for the policy store (default: /var/lib/selinux)")
++	parser.add_option("-r", "--root", dest="root",
++			  help="Set an alternative root for the migration (default: /)")
+ 
+ 	(options, args) = parser.parse_args()
+ 
+@@ -272,6 +274,10 @@ if __name__ == "__main__":
+ 	if PATH is None:
+ 		PATH = "/var/lib/selinux"
+ 
++	ROOT = options.root
++	if ROOT is None:
++		ROOT = ""
++
+ 	# List of paths that go in the active 'root'
+ 	TOPPATHS = [
+ 		"commit_num",
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/libsemanage.git/commit/?h=private-master-2.4&id=0df50b80dd7b4385f3955e2abb52afca99222f6b


More information about the scm-commits mailing list