Skip to content
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

chore: Custom .tar.gz and .zip unarchive functions #1824

Conversation

dpaasman00
Copy link
Contributor

Proposed Change

Adds custom functions for unpacking .tar.gz and .zip packages to the updater. Doing so to remove the mholt/archiver/v3 dependency due to this issue.

Checklist
  • Changes are tested
  • CI has passed

@dpaasman00 dpaasman00 force-pushed the dakotapaasman/bpop-611-investigate-removing-mholtarchiverv3-dependency branch from 882eb54 to bbe51e3 Compare August 29, 2024 11:36
@dpaasman00 dpaasman00 marked this pull request as ready for review August 29, 2024 11:43
@BinaryFissionGames
Copy link
Contributor

BinaryFissionGames commented Aug 29, 2024

I'm getting this error when testing updating on my mac:

Package update failed: Failed to download and verify the supplied downloadable file: failed to extract file: extract tar.gz: create file: open tmp/latest/install/com.observiq.collector.plist: no such file or director

edit: Let me re-pull and try again, my branch might have been out of date

@BinaryFissionGames
Copy link
Contributor

OK, I repulled, slightly different error message but same basic issue:

Failed to download and verify the supplied downloadable file: failed to extract file: extract tar.gz: open output file: open tmp/latest/install/com.observiq.collector.plist: no such file or directory

Copy link
Contributor

@BinaryFissionGames BinaryFissionGames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested upgrades on mac, win, and linux, all working great.

@dpaasman00 dpaasman00 force-pushed the dakotapaasman/bpop-611-investigate-removing-mholtarchiverv3-dependency branch from fca4278 to 7567069 Compare August 30, 2024 13:56
@kuiperda kuiperda removed their request for review August 30, 2024 14:00
@dpaasman00 dpaasman00 merged commit 4ed4737 into release/v1.59.0 Aug 30, 2024
15 checks passed
@dpaasman00 dpaasman00 deleted the dakotapaasman/bpop-611-investigate-removing-mholtarchiverv3-dependency branch August 30, 2024 14:43
BinaryFissionGames pushed a commit that referenced this pull request Sep 3, 2024
* add new methods for extracting .tar.gz and .zip;

* gosec fixes

* ignore EOF err when writing to dst file

* use OpenFile for tar

* ensure archive file parent dir exists

* 0700 permission on files parent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants