-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat add gzip compression option for tarball creation #468
base: master
Are you sure you want to change the base?
Conversation
This commit modifies the Tar class in BaseArchive to output gzip-compressed tar files instead of uncompressed tar files. This change improves the efficiency of the archive process by reducing the size of the output files. This change is backward compatible, as tar and gzip are standard on most systems and gzip decompression is automatically handled by tar when extracting the archive.
This commit introduces the option to create a gzip compressed tarball when the 'tar.gz' extension is selected. The open mode for the tarfile is determined based on the chosen extension. If the extension is 'tar.gz', a gzip compressed tarball will be created. Otherwise, a regular uncompressed tarball will be created. This allows for greater flexibility when creating tarballs, without breaking existing setups that do not use gzip compression.
@adrianschroeter |
I'd like to keep the compression handling in the compress service to avoid a double implementation. Is there any reason why we should duplicate the code? |
@adrianschroeter Hi, thank you very much for your reply. My project uses the During the use of debbuild, using the default TAR method to compress 'tar.gz', an error will be reported during decompression. This is my use example: <services>
<service name="tar_scm">
<param name="scm">git</param>
<param name="url">http://gitlab.xx.xx/xxx/xyz.git</param>
<param name="version">_none_</param>
<param name="revision">origin/dev</param>
<param name="filename">abc</param>
<param name="extension">tar.gz</param>
<param name="extract">abc.spec</param>
</service>
</services> |
|
This commit introduces the option to create a gzip compressed tarball when the 'tar.gz' extension is selected.
The open mode for the tarfile is determined based on the chosen extension.
If the extension is 'tar.gz', a gzip compressed tarball will be created.
Otherwise, a regular uncompressed tarball will be created.
This allows for greater flexibility when creating tarballs,
without breaking existing setups that do not use gzip compression.