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

Error upgrading on Debian 11 #482

Open
dominic-p opened this issue Dec 15, 2022 · 33 comments · May be fixed by #495
Open

Error upgrading on Debian 11 #482

dominic-p opened this issue Dec 15, 2022 · 33 comments · May be fixed by #495
Labels
status: waiting for feedback waiting for feedback from the submitter type: community enhancement feature request not on Twilio's roadmap

Comments

@dominic-p
Copy link

Issue Summary

When I attempt to upgrade the Twilio CLI package via apt on Debian I get the following error:

dpkg-deb: error: archive '/var/cache/apt/archives/twilio_5.3.0-1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
Traceback (most recent call last):
  File "/usr/share/apt-listchanges/DebianFiles.py", line 124, in readdeb
    output = subprocess.check_output(command)
  File "/usr/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['dpkg-deb', '-f', '/var/cache/apt/archives/twilio_5.3.0-1_amd64.deb', 'Package', 'Source', 'Version', 'Architecture', 'Status']' returned non-zero exit status 2.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 323, in <module>
    main(config)
  File "/usr/bin/apt-listchanges", line 104, in main
    pkg = DebianFiles.Package(deb)
  File "/usr/share/apt-listchanges/DebianFiles.py", line 358, in __init__
    parser.readdeb(self.path)
  File "/usr/share/apt-listchanges/DebianFiles.py", line 127, in readdeb
    raise RuntimeError(_("Error processing '%(what)s': %(errmsg)s") %
RuntimeError: Error processing '/var/cache/apt/archives/twilio_5.3.0-1_amd64.deb': Command '['dpkg-deb', '-f', '/var/cache/apt/archives/twilio_5.3.0-1_amd64.deb', 'Package', 'Source', 'Version', 'Architecture', 'Status']' returned non-zero exit status 2.
Preconfiguring packages ...
dpkg-deb: error: archive '/tmp/apt-dpkg-install-cwYneZ/0-twilio_5.3.0-1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-cwYneZ/0-twilio_5.3.0-1_amd64.deb (--unpack):
 dpkg-deb --control subprocess returned error exit status 2

From this SE post, I gather that the package is using a compression format that Debian's version of dpkg doesn't understand.

Steps to Reproduce

  1. Run apt update && apt upgrade on Debian 11 Bullseye

Technical details:

  • twilio-cli version: Current: 5.2.2, Attempting to upgrade to: 5.3.0
  • node version: 16.18.0
@dominic-p
Copy link
Author

Friendly bump. Anyone else seeing Debian compatibility issues?

@mlncn
Copy link

mlncn commented Dec 26, 2022

Yeah, Twilio CLI is repeatedly blowing up my upgrades. Currently, same error as is reported here:

dpkg-deb: error: archive '/tmp/apt-dpkg-install-Od2MRa/0-twilio_5.3.0-1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up

Seems this compression method was added by Ubuntu, and Debian may be grudgingly adding support also, but has not yet:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892664

Therefore Twilio should avoid using it, at least for deb, for now.

Note: sudo apt install --fix-broken appears to repair the rest of Debian after the update bails due to Twilio, or maybe it was always fine except Twilio.

@AsabuHere AsabuHere added the status: help wanted requesting help from the community label Jan 5, 2023
@charan678
Copy link
Contributor

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

@charan678 charan678 added the type: bug bug in the library label Jan 6, 2023
@dominic-p
Copy link
Author

dominic-p commented Jan 8, 2023

I'd be happy to submit a pull request, but I could use some help getting oriented.

I searched the code base for zstd the other day and I came up empty. I'm guessing some default setting in a dependency got changed, but I couldn't find that either.

@AsabuHere
Copy link
Contributor

AsabuHere commented Jan 13, 2023

This error upon unpacking CLI is because zstd decompression was supported in ubuntu but not in debian. This issue is fixed in latest version of dpkg, where both zstd compression and decompression is supported. The version 1.21.18 has the fix for this issue. (https://packages.debian.org/sid/all/dpkg-dev/download)
After upgrading dpkg to the version 1.21.18, both install and upgrade steps are working fine for latest version of twilio-cli.
@dominic-p Can you please try upgrading dpkg to the latest version and try upgrading twilio-cli?

@AsabuHere AsabuHere added status: waiting for feedback waiting for feedback from the submitter and removed status: help wanted requesting help from the community labels Jan 13, 2023
@dominic-p
Copy link
Author

Thanks for the update! I downloaded the unstable 1.21.18 version of dpkg, and attempted to install it, but I ran into a dependency error. It looks like it depends on libc6 >=2.34 and my machine has 2.31. As this is a production machine it seems risky to start upgrading core components like libc, so I'm kind of stuck at the moment.

Any other ideas for workarounds we can try? Given the pace of Debian development, I'm guessing that dpkg 1.21.18 might take a while to reach stable. What can we do in the meantime? Is zstd compression a key feature? Can we just disable it until Debian catches up to Ubuntu?

Install command output for reference:

# dpkg --install dpkg_1.21.18_amd64.deb
dpkg: regarding dpkg_1.21.18_amd64.deb containing dpkg, pre-dependency problem:
 dpkg pre-depends on libc6 (>= 2.34)
  libc6:amd64 is installed, but is version 2.31-13+deb11u5.

dpkg: error processing archive dpkg_1.21.18_amd64.deb (--install):
 pre-dependency problem - not installing dpkg
Errors were encountered while processing:
 dpkg_1.21.18_amd64.deb

@shrutiburman
Copy link
Contributor

shrutiburman commented Jan 20, 2023

Well, we'd need dpkg 1.21.18 to support zStandard compression & decompression. As you might've already seen zstd is not a direct dependency of twilio-cli, but is internally referenced in one of our pack & build commands, so it's not something we can disable or remove (for the sake of deb users).
Please let me know, if there's anything else that I can help you with?

@shrutiburman shrutiburman added type: community enhancement feature request not on Twilio's roadmap and removed type: bug bug in the library labels Jan 20, 2023
@dominic-p
Copy link
Author

Thanks for the feedback. Could the pack & build commands be tweaked to not use zstd? Something changed a month or so ago in how the package was built. Could that change be reverted until Debian catches up to Ubuntu?

Again, I'd be happy to take a stab at it, but I'm new to the code base. Maybe someone could point me to where the Debian build is configured?

@shrutiburman
Copy link
Contributor

Dominic, the problem you're facing with dpkg's latest version is very specific to your environment. Please understand that we cannot afford not upgrading to the latest version unless it's an issue for a larger number of users.
However, we use dpkg --build command to build the binaries, without refactoring any process at our end.
You can take a look at our build script, and see if there's any possible tweak that could be done to unblock you, and which doesn't break anything.
Would be happy to help with that. :)

@dominic-p
Copy link
Author

Thanks for the help, I really appreciate it. I'll start looking into dpkg --build to see if there's anything that could be tweaked.

Also, maybe I'm misunderstanding something, but from this page it appears that dpkg 1.21.18 is still only available in the testing version of Debian. Since I'm running a fully patched version of Bullseye (stable), it seems odd to me that my issue could be specific to my environment. If Debian is meant to be a supported OS, wouldn't the current stable release need to be supported?

I don't mean to be confrontational; I'm just genuinely trying to understand if there's something weird about my setup that I'm not aware of.

dominic-p added a commit to dominic-p/twilio-cli that referenced this issue 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.

Fixes twilio#482
@dominic-p
Copy link
Author

Just checking in on this. Is anyone available to review the PR is submitted?

@AsabuHere
Copy link
Contributor

Hi @dominic-p Our team tested these changes and here's what we have got : Getting error:
dpkg: error: unknown option -Z

we have also updated the PR with this information. Can you please take a look?

@dominic-p
Copy link
Author

Thanks for the update. I pushed a change to the PR that should fix it, but again, I don't really have a good test system available for this. I apologize for the back and forth.

I was kind of hoping the CI system would automatically run on the PR, so I could use its output to test my changes, but it looks like it needs approval to run.

@github-actions
Copy link

github-actions bot commented Apr 7, 2023

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or comment or this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale label Apr 7, 2023
@dominic-p
Copy link
Author

Not stale for me. :) I'm sorry the PR hasn't been especially smooth, but I think the most recent version should do it. Again, I'm not really setup to test this currently, but I think I finally have it right.

@AsabuHere AsabuHere removed the Stale label Apr 11, 2023
@AsabuHere
Copy link
Contributor

I'm testing the code changes in this PR. Testing on amd64 arch of debian is completed and is working fine. Trying to figure out if this is working well on armel arch of debian. Will provide an update soon

@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or comment or this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale label May 11, 2023
@dominic-p
Copy link
Author

Not stale for me. Have you been able to test on ARM yet?

@github-actions github-actions bot added the Stale label Jun 12, 2023
@kridai kridai removed the Stale label Jun 12, 2023
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or comment or this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale label Jul 13, 2023
@dominic-p
Copy link
Author

Still not stale for me. :) Is there anything I can do to help move this forward at this point?

@github-actions github-actions bot removed the Stale label Jul 14, 2023
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or comment or this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale label Aug 14, 2023
@dominic-p
Copy link
Author

Not stale for me.

@github-actions github-actions bot removed the Stale label Aug 15, 2023
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or comment or this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale label Sep 15, 2023
@dominic-p
Copy link
Author

Still not stale for me. I would love to be able to upgrade twilio on my Debian 11 machines.

@github-actions github-actions bot removed the Stale label Sep 19, 2023
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or comment or this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale label Oct 24, 2023
@dominic-p
Copy link
Author

Not stale for me.

@github-actions github-actions bot removed the Stale label Oct 25, 2023
Copy link

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or comment or this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale label Jan 18, 2024
@dominic-p
Copy link
Author

Still not stale for me.

@github-actions github-actions bot removed the Stale label Jan 19, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or comment or this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale label Feb 19, 2024
@dominic-p
Copy link
Author

Still not stale for me.

@github-actions github-actions bot removed the Stale label Feb 20, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity. Please remove stale label or comment or this issue will be closed in 30 days.

@github-actions github-actions bot added the Stale label Mar 22, 2024
@dominic-p
Copy link
Author

Still not stale for me.

@github-actions github-actions bot removed the Stale label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting for feedback waiting for feedback from the submitter type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
6 participants