Skip to content

Commit

Permalink
Merge pull request #6243 from jkonecny12/main-fix-update-iso-permissions
Browse files Browse the repository at this point in the history
infra: Fix permissions of ISO from update_iso
  • Loading branch information
jkonecny12 authored Mar 7, 2025
2 parents e09f8f0 + 6027475 commit dfcc09a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/testing/update_iso
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ def generate_image_timestamp_option():
print("** using time stamp option: %s" % timestamp)
return timestamp

def fix_permission():
"""Fix permissions of the created iso.
The iso has root permissions because mkksiso is created as root.
Set the permission of the ISO to be the same as the current directory.
"""
os.system(f"sudo chown -v --reference='.' '{UPDATED_ISO}'")

def generate_updated_iso(ks_file, custom_boot_options):
"""Generate an updated boot ISO with an optional kickstart file and custom boot options.
Expand Down Expand Up @@ -308,6 +317,9 @@ def main():
# Check the updated ISO has been generated
check_updated_iso_available()

# Fix permissions
fix_permission()

# check if we should run the image in virt-install
if args.virt_install:
run_updated_iso_with_virt_install()
Expand Down

0 comments on commit dfcc09a

Please sign in to comment.