libraries[json2][download][type] = get
libraries[json2][download][url] = https://raw.github.com/douglascrockford/JSON-js/master/json2.js

Results in:
Executing: curl --fail -s -L --connect-timeout 30 -o /private/tmp/download_fileo2bzvV https://raw.github.com/douglascrockford/JSON-js/master/json2.js
Calling is_readable(/private/tmp/download_fileo2bzvV) [93.26 sec, 7.19 MB] [debug]
Calling is_writable(/tmp/make_tmp_1351513068_508e73ecd928b) [93.26 sec, 7.19 MB] [debug]
Calling rename(/private/tmp/download_fileo2bzvV, /tmp/make_tmp_1351513068_508e73ecd928b/json2.js) [93.26 sec, 7.19 MB] [debug]
json2 downloaded from https://raw.github.com/douglascrockford/JSON-js/master/json2.js. [93.26 sec, 7.18 MB] [ok]
No fileinfo or mime_magic support available. [93.26 sec, 7.19 MB] [debug]
Examining /tmp/make_tmp_1351513068_508e73ecd928b/json2.js headers. [93.26 sec, 7.19 MB] [debug]
Unable to determine mime type from header bytes 0x2a2f of /tmp/make_tmp_1351513068_508e73ecd928b/json2.js. [93.26 sec, [notice]
7.19 MB]
Examining /tmp/make_tmp_1351513068_508e73ecd928b/json2.js extension. [93.26 sec, 7.19 MB] [debug]
Mime type for json2.js is application/x-tar [93.26 sec, 7.19 MB] [notice]
No fileinfo or mime_magic support available. [93.26 sec, 7.19 MB] [debug]
Examining /tmp/make_tmp_1351513068_508e73ecd928b/json2.js headers. [93.26 sec, 7.19 MB] [debug]
Unable to determine mime type from header bytes 0x2a2f of /tmp/make_tmp_1351513068_508e73ecd928b/json2.js. [93.27 sec, [notice]
7.2 MB]
Examining /tmp/make_tmp_1351513068_508e73ecd928b/json2.js extension. [93.27 sec, 7.2 MB] [debug]
Mime type for json2.js is application/x-tar [93.27 sec, 7.2 MB] [notice]
Calling chdir(/tmp/make_tmp_1351513068_508e73ecd928b) [93.27 sec, 7.2 MB] [debug]
Executing: tar -C /tmp/drush_tmp_1351513161_508e7449bb50a -xf json2.js
tar: Unrecognized archive format
tar: Error exit delayed from previous errors.
Calling chdir(/my/build/dir) [93.31 sec, 7.2 MB] [debug]
Unable to untar /tmp/make_tmp_1351513068_508e73ecd928b/json2.js. [93.31 sec, 7.2 MB] [error]

on a mac with php 5.3.15

CommentFileSizeAuthor
#6 drush-1825946.patch539 bytesjonhattan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom’s picture

Status: Active » Postponed (maintainer needs more info)
joelcollinsdc’s picture

I believe that is due to github preventing people from hotlinking it.

Try curl -v https://raw.github.com/douglascrockford/JSON-js/master/json2.js

jhedstrom’s picture

Status: Postponed (maintainer needs more info) » Active

Ok, that makes sense. Will try to look into this.

jhedstrom’s picture

Status: Active » Postponed (maintainer needs more info)

Hmm, I'm unable to reproduce this:

foo.make:

core = 7.x
api = 2

libraries[json2][download][type] = get
libraries[json2][download][url] = https://raw.github.com/douglascrockford/JSON-js/master/json2.js
jhedstrom@hyperion:/tmp/foo (@hf)☠ drush make --no-core --debug -y foo.make .
Bootstrap to phase 0. [0 sec, 2.16 MB]                               [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 2.3 MB]  [bootstrap]
Loading drushrc "/home/jhedstrom/dev-env/.drush/drushrc.php" into "home.drush" scope. [0.01 sec, 2.3[bootstrap]
MB]
Loaded alias @hf from file /home/jhedstrom/.drush/aliases.drushrc.php [0.03 sec, 2.32 MB]              [notice]
Cache HIT cid: 5.0-dev-commandfiles-0-69947f855751b02caa061b11fd7b748b [0.03 sec, 2.33 MB]              [debug]
Bootstrap to phase 0. [0.06 sec, 5.34 MB]                                                           [bootstrap]
Bootstrap to phase 0. [0.08 sec, 5.35 MB]                                                           [bootstrap]
Found command: make (commandfile=make) [0.08 sec, 5.35 MB]                                          [bootstrap]
Loading release_info engine. [0.1 sec, 5.36 MB]                                                        [notice]
Executing: which wget
  /usr/bin/wget
Executing: wget -q --timeout=30 -O /tmp/download_filehiAlzA https://raw.github.com/douglascrockford/JSON-js/master/json2.js
Calling is_readable(/tmp/download_filehiAlzA) [0.78 sec, 5.52 MB]                                       [debug]
Calling is_writable(/tmp/make_tmp_1351812165_50930445392e4) [0.78 sec, 5.52 MB]                         [debug]
Calling rename(/tmp/download_filehiAlzA, /tmp/make_tmp_1351812165_50930445392e4/json2.js) [0.78 sec,    [debug]
5.52 MB]
json2 downloaded from https://raw.github.com/douglascrockford/JSON-js/master/json2.js. [0.78 sec,   [ok]
5.52 MB]
Fileinfo extension available. [0.78 sec, 5.53 MB]                                                       [debug]
Mime type for /tmp/make_tmp_1351812165_50930445392e4/json2.js is text/plain [0.8 sec, 5.53 MB]         [notice]
Calling is_readable(/tmp/make_tmp_1351812165_50930445392e4/json2.js) [0.8 sec, 5.53 MB]                 [debug]
Calling is_writable(/tmp/make_tmp_1351812165_50930445392e4/__build__/sites/all/libraries/json2) [0.8    [debug]
sec, 5.53 MB]
Calling rename(/tmp/make_tmp_1351812165_50930445392e4/json2.js,                                         [debug]
/tmp/make_tmp_1351812165_50930445392e4/__build__/sites/all/libraries/json2/json2.js) [0.8 sec, 5.53
MB]
Calling _drush_recursive_copy(/tmp/make_tmp_1351812165_50930445392e4/__build__/sites, ./sites) [0.8     [debug]
sec, 5.54 MB]
Command dispatch complete [0.8 sec, 5.49 MB]                                                           [notice]
Peak memory usage was 6.43 MB [0.8 sec, 5.49 MB]                                                       [memory]
jhedstrom’s picture

Component: Make » Base system (internal API)
Status: Postponed (maintainer needs more info) » Active

Moving back to active for others to chime in. I'm running php 5.4.6 on ubuntu 12.10, so there may be others that can reproduce this. Looking at the initial report, for whatever reason, the js file is being seen as a tar archive, and that logic happens here: http://drupalcode.org/project/drush.git/blob/refs/heads/7.x-5.x:/include.... The mime type detection is highly dependent on local environment, and which packages are enabled for PHP, etc.

jonhattan’s picture

Title: Make fails to identify mime type of json2.js (identified as .tar) » Make fails to identify mime type of json2.js
FileSize
539 bytes

There's a bug in the logic that causes the file to be considered .tar

Other than that, it seems the OP has a poor php:

No fileinfo or mime_magic support available. [93.26 sec, 7.19 MB] [debug]

Committed attached patch.

jonhattan’s picture

- duplicate -

jonhattan’s picture

Title: Make fails to identify mime type of json2.js » Make fails to identify mime type of json2.js (identified as .tar)
jonhattan’s picture

Title: Make fails to identify mime type of json2.js » Make fails to identify mime type of json2.js (identified as .tar)
Status: Active » Fixed

Not much more to say here. Once the bug is corrected drush should work even without fileinfo.

@joelcollinsdc check that you have fileinfo enabled in your php.ini file:

extension=fileinfo.so

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.