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

mintupgrade Fails to Upgrade when Tailscale is Installed #109

Open
tech31842 opened this issue Aug 20, 2024 · 0 comments
Open

mintupgrade Fails to Upgrade when Tailscale is Installed #109

tech31842 opened this issue Aug 20, 2024 · 0 comments

Comments

@tech31842
Copy link

This is a refile of linuxmint/linuxmint#666

This is still an issue with the upgrade to Mint 22.0.

Original text follows:

When trying to do a major Mint upgrade using mintupgrade, if Tailscale is installed, it fails with the error:

Package repositories
The following problems were found:
https://pkgs.tailscale.com/stable/ubuntu does not support jammy

I also found this forum post from July 2023 describing the same symptoms:
https://forums.linuxmint.com/viewtopic.php?t=400691

The current workaround requires deinstalling Tailscale and removing the apt repository, then reinstalling after the Mint upgrade.

Replication Steps

I did a fresh install of Mint 20.3 Cinnamon in a VirtualBox VM. For good measure I ran apt update/upgrade to catch up on packages, and rebooted.

I installed the Tailscale software using (as directed by the Tailscale web site): curl -fsSL https://tailscale.com/install.sh | sh It doesn't matter if Tailscale is actually configured or running, or even actually installed. The problem has to do with the Tailscale repository.

I installed mintupgrade version 2024.01.12 and ran it with sudo. After going through the process for a while, I eventually got the noted error.

Diagnosis

I was able to track down the problem to /usr/lib/linuxmint/mintupgrade/checks.py. In the APTRepoCheck class, method do_run(), section "Check the base repos can handle destination codename", it's checking that a particular URL exists by calling the get_url_last_modified() method and verifying that a timestamp was returned. The Python libraries in use take the timestamp from the Last-Modified: HTTP header.

But it turns out that the repos on tailscale.com don't serve the Last-Modified: header, so even though the URL that the script is trying to locate does exist, it gets a false negative because of the missing timestamp.

This is confirmed with either F12 tools in Firefox or using the last-modified.com site to check https://pkgs.tailscale.com/stable/ubuntu/dists/jammy/Release

This is technically a violation of RFC 2616, section 14.29:

HTTP/1.1 servers SHOULD send Last-Modified whenever feasible.

However, it does specify no-cache so the freshness shouldn't ever matter with this URL.

But in this case, the freshness is irrelevant: The code seems to be using this method only as a lazy shortcut to check for existence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant