calamares / calamares-extensions

Examples of Calamares branding
36 stars 19 forks source link

Enable support for tar option in unpackfsc module for all compression algorithms #19

Closed sravanpannala closed 2 years ago

sravanpannala commented 2 years ago

Currently the tar option in unpackfsc module only supports gunzip (.gz) compressed files because the -z option is hardcoded in the TarballRunner.cpp file. Removing this option will ensure that the untarring will work on tar files compressed with any compression algorithm including zstd, xz, etc. Also, -p option is added to the untarring command which is the option to preserve file permissions while untarring to the destination. This option is essential while untarring a root filesystem.

dalto8 commented 2 years ago

Also, -p option is added to the untarring command which is the option to preserve file permissions while untarring to the destination.

The change looks good to me but I wonder if this part shouldn't be an option. Is there a situation where you would want to uncompress a tarball and have it inherit permissions? i.e. Can this module be used for a purpose other than "untarring a root filesystem"?

We are essentially changing this module in a non-backwards compatible way otherwise. I am not sure how widely used this is or if that would be an issue or not.