autopkg / n8felton-recipes

Recipes for Autopkg
28 stars 35 forks source link

Weka recipe failing from shared processor - SourceForgeBestReleaseURLProvider #160

Closed stefanj135 closed 1 year ago

stefanj135 commented 2 years ago

Good day,

We are experiencing recent failures with your Weka download recipe. I think it looks like the shared processor SourceForgeBestReleaseURLProvider is downloading a zip file, however if you navigate to https://waikato.github.io/weka-wiki/downloading_weka/#mac-os-intel-processors_1 you can download a newer version of the dmg from sourceforge, which is odd. Failure below.

Thanks a lot!

URLDownloader: Storing new Last-Modified header: Thu, 27 Jan 2022 22:31:32 GMT
URLDownloader: Storing new ETag header: "61f31d44-38d038e"
URLDownloader: Downloaded /srv/autopkg/Cache/local.munki.Weka/downloads/weka-3-8-6.zip
{'Output': {'download_changed': True,
            'etag': '"61f31d44-38d038e"',
            'last_modified': 'Thu, 27 Jan 2022 22:31:32 GMT',
            'pathname': '/srv/autopkg/Cache/local.munki.Weka/downloads/weka-3-8-6.zip',
            'url_downloader_summary_result': {'data': {'download_path': '/srv/autopkg/Cache/local.munki.Weka/downloads/weka-3-8-6.zip'},
                                              'summary_text': 'The following '
                                                              'new items were '
                                                              'downloaded:'}}}
EndOfCheckPhase
{'Input': {}}
{'Output': {}}
com.github.n8felton.shared/MD5Checksum
{'Input': {'md5checksum': '2c0026d78089d09a62ba3fb4fd17e827',
           'pathname': '/srv/autopkg/Cache/local.munki.Weka/downloads/weka-3-8-6.zip'}}
MD5Checksum: 2c0026d78089d09a62ba3fb4fd17e827
MD5Checksum: MD5 Checksum Matches
{'Output': {'md5checksum': '2c0026d78089d09a62ba3fb4fd17e827'}}
Copier
{'Input': {'destination_path': '/srv/autopkg/Cache/local.munki.Weka/Weka/Weka.app',
           'overwrite': True,
           'source_path': '/srv/autopkg/Cache/local.munki.Weka/downloads/weka-3-8-6.zip/*.app'}}
Copier: Parsed dmg results: dmg_path: /srv/autopkg/Cache/local.munki.Weka/downloads/weka-3-8-6.zip/*.app, dmg: , dmg_source_path:
Traceback (most recent call last):
  File "/Library/AutoPkg/autopkglib/__init__.py", line 840, in process
    self.env = processor.process()
  File "/Library/AutoPkg/autopkglib/__init__.py", line 626, in process
    self.main()
  File "/Library/AutoPkg/autopkglib/Copier.py", line 98, in main
    f"Error processing path '{source_path}' with glob. "
autopkglib.ProcessorError: Error processing path '/srv/autopkg/Cache/local.munki.Weka/downloads/weka-3-8-6.zip/*.app' with glob.
  File "/Library/AutoPkg/autopkglib/__init__.py", line 840, in process
    self.env = processor.process()
Error processing path '/srv/autopkg/Cache/local.munki.Weka/downloads/weka-3-8-6.zip/*.app' with glob.
Failed.
Receipt written to /srv/autopkg/Cache/local.munki.Weka/receipts/Weka-receipt-20220208-094510.plist

The following recipes failed:
    Weka.munki
        Error in local.munki.Weka: Processor: Copier: Error: Error processing path '/srv/autopkg/Cache/local.munki.Weka/downloads/weka-3-8-6.zip/*.app' with glob.
n8felton commented 2 years ago

Unfortunately, the "best release" is something that is set by the developer on the Sourceforge site. For Weka, you can see it at https://sourceforge.net/projects/weka/best_release.json. It appears they're currently setting it to a zip archive of the project files, not the App bundle. My guess is it's due to there now being a x86_64 version and an arm64 version.

The best option is likely to switch to scraping the download site at https://waikato.github.io/weka-wiki/downloading_weka for the disk image download links.

LordShellby commented 2 years ago

I had a try at this and I've made a pull request. Hopefully it works as expected!

n8felton commented 1 year ago

This is being addressed in #166