Skip to content

Fix binary ending in xz#27

Closed
mfontani wants to merge 2 commits intohouseabsolute:masterfrom
mfontani:fix_binary_ending_in_xz
Closed

Fix binary ending in xz#27
mfontani wants to merge 2 commits intohouseabsolute:masterfrom
mfontani:fix_binary_ending_in_xz

Conversation

@mfontani
Copy link
Copy Markdown
Contributor

@mfontani mfontani commented Jan 22, 2023

I previously submitted a patch for making .xz DWIM, but it wasn't enough.

On another project, I added a list of multi-arch binaries which are then xz'ed, but ubi didn't work:

$ cargo run -- --project mfontani/tstdin --tag v0.2.3
    Finished dev [unoptimized + debuginfo] target(s) in 0.11s
     Running `target/debug/ubi --project mfontani/tstdin --tag v0.2.3`
[ubi][ERROR] could not find a release for this OS and architecture from tstdin-darwin-amd64.xz, tstdin-linux-amd64.xz, tstdin.exe

The os (linux) matches; the arch (amd64) matches; it "just" chokes on the ".xz" ending, which it can totally handle.

So I'm adding ".xz" to the list of extensions it does, indeed, support.

... and the actual problem is now a test case, too.

... and is part of a list of binaries which also end in xz

i.e.:

    https://github.com/mfontani/tstdin/releases/tag/v0.2.3

... which ubi ought to be able to cope about, but can't.

I had to resort to making a release with ".gz" files, i.e.:

    https://github.com/mfontani/tstdin/releases/tag/v0.2.4

... which is exactly the same, but uses gzip instead of xzip.

Next patch will fix that.
... treating them the same as if they are .gz, basically.

This fixes the problem I was having with:

    https://github.com/mfontani/tstdin/releases/tag/v0.2.3

... which has been added as a test case to the test suite.
@mfontani mfontani force-pushed the fix_binary_ending_in_xz branch from 6f50ff2 to fd7e96e Compare January 22, 2023 15:41
@autarch
Copy link
Copy Markdown
Member

autarch commented Jan 22, 2023

Hi, thanks for your PR! I'm pretty finicky about my projects (see this blog post for details), so I rarely merge a PR as-is. I can move forward on your PR in one of two ways:

  1. I check it out locally, fiddle with it as needed, merge it locally, and simply close this PR. This will preserve at least one commit with your name on it, but the PR will show up as closed in your GitHub stats.
  2. If you enable me to push directly to your fork, I can do my fiddling, then force push to your fork and merge the resulting PR. Again, this will preserve at least one commit with your name on it, but you also get credit for the PR merge in your GitHub stats. The only downside is that I will be force pushing directly to your fork.

Please let me know which approach you'd prefer. If I don't hear from you before I get around to working on this PR I'll go with option #1.

Thanks again for your contribution!

(But I recently tried option #2 with someone on another project and I couldn't push to their PR branch even though they'd checked the box to do so, so I can't promise it will work.)

@mfontani
Copy link
Copy Markdown
Contributor Author

Option 1 is fine, thanks!

@autarch
Copy link
Copy Markdown
Member

autarch commented Jan 23, 2023

Merged from the CLI. Thanks!

@autarch autarch closed this Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants