autopkg / n8felton-recipes

Recipes for Autopkg
28 stars 35 forks source link

Neo4j-CE download URL not working and add/or replace with Neo4j Desktop #97

Open jps3 opened 5 years ago

jps3 commented 5 years ago

The current download URL for Neo4j-CE is no longer working. After manually clicking through the site, and filling out an annoying form, the actual download URL is via CloudFront, and the filepath pattern has changed a bit as well.

The following is not intended as the actual patch or pull request, but rather just to illustrate the differences noticed:

          <string>URLDownloader</string>
          <key>Arguments</key>
          <dict>
                  <key>url</key>
 -                <string>https://neo4j.com/artifact.php?name=neo4j-community_macos_%output_string%.dmg</string>
 +                <string>https://dls2gnud23o1w.cloudfront.net/artifact.php?name=neo4j-desktop-offline-%version%.dmg</string>
                  <key>filename</key>
                  <string>%NAME%.dmg</string>
          </dict>

(The changed pattern also removes the need for the "FindAndReplace" processor step.)

I think a bigger question is whether to rename these or add new recipes named Neo4j-Desktop. I am new to Neo4j so I am currently unclear as to whether "Neo4j Desktop" is a new product per se or a rebranding/repackaging. There is still a Neo4j CE server (basically a JAR).

I do not at the moment see a way to script or automate getting the download URL programmatically because of the @#$(*#$ javascript-based form, in case the cloudfront.net hostname changes at a future time. Although the recipe could just be updated at that point, perhaps?


I have noted in a test install that there is a promising file Neo4j Desktop.app/Contents/Resources/app-update.yml with a key/value url: 'https://dist.neo4j.org/neo4j-desktop/mac. An initial attempt with curl returned some angry AmazonS3 XML.

...to be continued...

n8felton commented 5 years ago

Haven't had time to fully investigate this yet either, however, this might be worth a read https://blog.igovsol.com/2017/11/14/Neo4j-330-is-out-but-where-are-the-open-source-enterprise-binaries.html (via https://stackoverflow.com/a/47664573/2233241)