TheAssassin/appimagelint

No longer works on current Ubuntu LTS

Closed this issue · 2 comments

Packages in new Ubuntu release ("impish") use Zstd compression (.tar.zst). Compare these two packages:

The first one contains a data.tar.xz and the newer one contains a data.tar.zst. We try to extract the file in get_glibcxx_version_from_debian_package:

data_archive_name = glob.glob(os.path.join(d, "data.tar.*"))[0]
subprocess.check_call(["tar", "-xf", data_archive_name], cwd=out_path, stdout=subprocess.DEVNULL)

It requires the system's tar to support zstd. zstd support was added to GNU tar in 1.31. That means appimagelint no longer works on many older Linux releases, including Ubuntu 20.04 LTS (current stable) and Debian 10 "buster" (oldstable).


An example of error:

2021-10-19T17:48:19.0036881Z appimagelint.cache[19048] [INFO] Fetching glibcxx version data for ubuntu
2021-10-19T17:48:22.1998433Z tar: This does not look like a tar archive
2021-10-19T17:48:22.1999335Z tar: Skipping to next header
2021-10-19T17:48:22.2005394Z tar: Exiting with failure status due to previous errors
2021-10-19T17:48:22.2013817Z appimagelint.cache[19048] [WARNING] codebase changed since last update, but updating failed, using cached data
2021-10-19T17:48:22.2039927Z appimagelint.cache[19048] [ERROR] Command '['tar', '-xf', '/dev/shm/appimagelint-28zo_058.tmp/data.tar.zst']' returned non-zero exit status 2.
2021-10-19T17:48:22.2042361Z Traceback (most recent call last):
2021-10-19T17:48:22.2044859Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/site-packages/appimagelint/cache/json_cache_impl_base.py", line 101, in get_data
2021-10-19T17:48:22.2046088Z     new_data = cls._fetch_data()
2021-10-19T17:48:22.2047774Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/site-packages/appimagelint/cache/package_version_maps.py", line 17, in _fetch_data
2021-10-19T17:48:22.2048998Z     return get_map_callback()
2021-10-19T17:48:22.2050692Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/site-packages/appimagelint/cache/common.py", line 163, in get_ubuntu_glibcxx_versions_map
2021-10-19T17:48:22.2051905Z     versions = get_glibcxx_version_from_debian_package(url)
2021-10-19T17:48:22.2053193Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/site-packages/appimagelint/cache/common.py", line 117, in get_glibcxx_version_from_debian_package
2021-10-19T17:48:22.2055129Z     subprocess.check_call(["tar", "-xf", data_archive_name], cwd=out_path, stdout=subprocess.DEVNULL)
2021-10-19T17:48:22.2056423Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/subprocess.py", line 341, in check_call
2021-10-19T17:48:22.2057718Z     raise CalledProcessError(retcode, cmd)
2021-10-19T17:48:22.2060468Z subprocess.CalledProcessError: Command '['tar', '-xf', '/dev/shm/appimagelint-28zo_058.tmp/data.tar.zst']' returned non-zero exit status 2.
2021-10-19T17:48:22.2097869Z Traceback (most recent call last):
2021-10-19T17:48:22.2098958Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/runpy.py", line 193, in _run_module_as_main
2021-10-19T17:48:22.2100145Z     "__main__", mod_spec)
2021-10-19T17:48:22.2100865Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/runpy.py", line 85, in _run_code
2021-10-19T17:48:22.2101663Z     exec(code, run_globals)
2021-10-19T17:48:22.2103550Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/site-packages/appimagelint/__main__.py", line 4, in <module>
2021-10-19T17:48:22.2104408Z     run()
2021-10-19T17:48:22.2105415Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/site-packages/appimagelint/cli.py", line 142, in run
2021-10-19T17:48:22.2106259Z     for testres in check.run():
2021-10-19T17:48:22.2107385Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/site-packages/appimagelint/checks/gnu_abi_check_base.py", line 79, in run
2021-10-19T17:48:22.2108381Z     for result in self._check_ubuntu_compat(required_version):
2021-10-19T17:48:22.2109637Z   File "/tmp/.mount_appimaJ8Z0H5/usr/conda/lib/python3.7/site-packages/appimagelint/checks/gnu_abi_check_base.py", line 131, in _check_ubuntu_compat
2021-10-19T17:48:22.2110657Z     max_supported_version = versions_map[release]
2021-10-19T17:48:22.2111412Z KeyError: 'impish' 

Ubuntu is annoying because I have to maintain a list of distros, unfortunately. For Debian, the aliases stable, oldstable etc. just work. I'll fix that soon.

Hm, in fact for Ubuntu we fetch the names from their Launchpad API. I guess you were just hit by an outdated cache. I can't reproduce the issue. Closing therefore.