opam2rpm currently assumes the archive uploaded to the OPAM repository is a tarball. This fails for e.g. camlzip where the author only uploaded a ZIP
opam2rpm
camlzip
$ opam2rpm camlzip tar: This does not look like a tar archive tar: Skipping to next header tar: Exiting with failure status due to previous errors Traceback (most recent call last): File "/home/michel/src/fedora/pagure/opam2rpm/.venv/bin/opam2rpm", line 33, in <module> sys.exit(load_entry_point('opam2rpm==1', 'console_scripts', 'opam2rpm')()) File "/home/michel/src/fedora/pagure/opam2rpm/.venv/lib64/python3.9/site-packages/opam2rpm-1-py3.9.egg/opam2rpm/__main__.py", line 291, in main dirname = unpack(download(url)) File "/home/michel/src/fedora/pagure/opam2rpm/.venv/lib64/python3.9/site-packages/opam2rpm-1-py3.9.egg/opam2rpm/__main__.py", line 184, in unpack subprocess.run(['tar', '-xf', filename, '-C', parent], check=True) File "/usr/lib64/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['tar', '-xf', '/home/michel/.cache/opam2rpm/src/camlzip-rel110.zip', '-C', '/home/michel/.cache/opam2rpm/src']' returned non-zero exit status 2.
Commit f9b4276 fixes this issue
Log in to comment on this ticket.