am 9016d0ae
: Merge "Fix signing process for SELinux file_contexts" into jb-mr2-dev
* commit '9016d0aef415e00df636b6407a05e5e08e430ed8': Fix signing process for SELinux file_contexts
This commit is contained in:
commit
a422266b1c
2 changed files with 17 additions and 0 deletions
|
@ -229,6 +229,14 @@ def main(argv):
|
||||||
OPTIONS.input_tmp, input_zip = common.UnzipTemp(args[0])
|
OPTIONS.input_tmp, input_zip = common.UnzipTemp(args[0])
|
||||||
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
|
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
|
||||||
|
|
||||||
|
# If this image was originally labelled with SELinux contexts, make sure we
|
||||||
|
# also apply the labels in our new image. During building, the "file_contexts"
|
||||||
|
# is in the out/ directory tree, but for repacking from target-files.zip it's
|
||||||
|
# in the root directory of the ramdisk.
|
||||||
|
if "selinux_fc" in OPTIONS.info_dict:
|
||||||
|
OPTIONS.info_dict["selinux_fc"] = os.path.join(OPTIONS.input_tmp, "BOOT", "RAMDISK",
|
||||||
|
"file_contexts")
|
||||||
|
|
||||||
output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED)
|
output_zip = zipfile.ZipFile(args[1], "w", compression=zipfile.ZIP_DEFLATED)
|
||||||
|
|
||||||
common.GetBootableImage(
|
common.GetBootableImage(
|
||||||
|
|
|
@ -789,6 +789,15 @@ def main(argv):
|
||||||
|
|
||||||
OPTIONS.target_tmp = OPTIONS.input_tmp
|
OPTIONS.target_tmp = OPTIONS.input_tmp
|
||||||
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
|
OPTIONS.info_dict = common.LoadInfoDict(input_zip)
|
||||||
|
|
||||||
|
# If this image was originally labelled with SELinux contexts, make sure we
|
||||||
|
# also apply the labels in our new image. During building, the "file_contexts"
|
||||||
|
# is in the out/ directory tree, but for repacking from target-files.zip it's
|
||||||
|
# in the root directory of the ramdisk.
|
||||||
|
if "selinux_fc" in OPTIONS.info_dict:
|
||||||
|
OPTIONS.info_dict["selinux_fc"] = os.path.join(OPTIONS.input_tmp, "BOOT", "RAMDISK",
|
||||||
|
"file_contexts")
|
||||||
|
|
||||||
if OPTIONS.verbose:
|
if OPTIONS.verbose:
|
||||||
print "--- target info ---"
|
print "--- target info ---"
|
||||||
common.DumpInfoDict(OPTIONS.info_dict)
|
common.DumpInfoDict(OPTIONS.info_dict)
|
||||||
|
|
Loading…
Reference in a new issue