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

fix: Use xz compression to restore Debian stable support #495

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dominic-p
Copy link

@dominic-p dominic-p commented Jan 23, 2023

The default compression on deb packages seems to have changed to zstd. Unfortunately, Debian does not support zstd (yet), so this specifies a friendlier format.

Note that I don't know a good way to test this at the moment. I'm open to suggestions though.

Fixes #482

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

The default compression on deb packages seems to have changed to zstd.
Unfortunately, Debian does not support zstd (yet), so this specifies a friendlier format.

Fixes twilio#482
@@ -81,7 +81,8 @@ PATH=$PATH:$PWD/bin eval $(PATH=$PATH:$PWD/bin node -p "require('./package').scr
await qq.chmod([workspace, 'usr/lib', config.dirname, 'bin', config.bin], 0o755);
await qq.chmod([workspace, 'DEBIAN/postinst'], 0o755);
await qq.x(`ln -s "../lib/${config.dirname}/bin/${config.bin}" "${workspace}/usr/bin/${pjson.oclif.bin}"`);
await qq.x(`dpkg --build "${workspace}" "${qq.join(dist, debArch(arch), `${versionedDebBase}.deb`)}"`);
// Use xz compression until Debian supports zstd (see issue #482)
await qq.x(`dpkg --build --compression=xz "${workspace}" "${qq.join(dist, debArch(arch), `${versionedDebBase}.deb`)}"`);
Copy link
Contributor

Choose a reason for hiding this comment

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

--compression does not seems to be a valid flag in dpkg, could you confirm that this command works.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for taking a look! You're right, that flag isn't valid. I saw it on a man page somewhere, but I must have been looking at the wrong command. I apologize for that.

I just pushed a commit that should fix it. As I said in the OP I don't really have a good environment to test this, but my understanding from here and here is that this should do the trick.

@sbansla
Copy link
Contributor

sbansla commented Mar 2, 2023

I am testing this fix. Will update soon.

.github/scripts/pack-debian-apt.js Outdated Show resolved Hide resolved
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.

Error upgrading on Debian 11
3 participants