Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-9514

Funtoo Metatools Feature Request: Zip artifact extraction

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • funtoo-metatools's funtoo/pkgtools/ebuild.py extract function does not support zip archives

      When trying to autogen mrl5's vulner tool. I ran into an issue: the upstream GitHub release source code artifact was a zip archive. Funtoo Metatools does not seem to support extraction of zip archives:

      [INFO 13:23:47] Fetched https://api.github.com/repos/mrl5/vulner/releases (cached)
      [INFO 13:23:47] Spidering https://github.com/mrl5/vulner/releases/download/v0.4.0/full-source.zip
      [ERROR 13:23:47] Command failure: tar -C /home/ssofos/repo_tmp/tmp/artifact_extract/vulner-0.4.0.zip -xf /home/ssofos/repo_tmp/stores/blos/4a/94/0d/4a940db7167ac9ef3f6e1d20494447f541f0994703fdb4d78658901550b8727f436bf74f15660a04c82e1414a950df933f1516b0b7cbf0aca47242b3f85170fa.blob
          Traceback (most recent call last):
            File "/usr/lib/python3.7/subpop/org.funtoo.metatools/pkgtools/autogen.py", line 315, in gen_wrapper
              await generate(AutoHub(autogen_id, pkgtools), **pkginfo)
            File "/home/ssofos/Repos/kit-fixups/security-kit/curated/app-admin/vulner/autogen.py", line 23, in generate
              artifacts = await hub.pkgtools.rust.generate_crates_from_artifact(src_artifact)
            File "/usr/lib/python3.7/subpop/org.funtoo.metatools/pkgtools/rust.py", line 38, in generate_crates_from_artifact
              src_artifact.extract()
            File "/usr/lib/python3.7/subpop/org.funtoo.metatools/pkgtools/ebuild.py", line 147, in extract
              raise pkgtools.ebuild.BreezyError("Command failure: %s" % cmd)
          dyne.org.funtoo.metatools.pkgtools.ebuild.BreezyError: Command failure: tar -C /home/ssofos/repo_tmp/tmp/artifact_extract/vulner-0.4.0.zip -xf /home/ssofos/repo_tmp/stores/blos/4a/94/0d/4a940db7167ac9ef3f6e1d20494447f541f0994703fdb4d78658901550b8727f436bf74f15660a04c82e1414a950df933f1516b0b7cbf0aca47242b3f85170fa.blob
      [ERROR 13:23:47] An error was encountered when processing /home/ssofos/Repos/kit-fixups/security-kit/curated/app-admin/vulner/autogen.py 

      As invakid404 mentioned in the Discord #dev-help channel: "while making vulner use a .tar.gz/.tar.xz archive instead of a .zip archive would do, metatools should provide some utility to handle arbitrary compression formats".

      The main feature request for funtoo-metatools is:

      • Add extraction support for zip compressed upstream artifacts

            drobbins drobbins
            siris siris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: