Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Doesn't seem to work when the file name doesn't match uri #58

Open
bearrito opened this issue Aug 25, 2015 · 2 comments
Open

Doesn't seem to work when the file name doesn't match uri #58

bearrito opened this issue Aug 25, 2015 · 2 comments

Comments

@bearrito
Copy link

I have two examples. One which works and another which doesn't. The only difference I can see is that in once case the name of the archive which is downloaded matches the url.

Does work

archive { 'kibana-3.1.2':
    checksum => false,
    ensure => present,
    url    => 'https://download.elasticsearch.org/kibana/kibana/kibana-3.1.2.tar.gz',
    target => '/opt',
  }

Doesn't work ( The file that is downloaded is pguri-master.tar.gz)

  archive { 'pguri-master':
    checksum => false,
    ensure => present,
    url    => 'http://github.com/petere/pguri/archive/master.tar.gz',
    target => '/opt',
  }
@bearrito bearrito reopened this Aug 25, 2015
@bearrito
Copy link
Author

On looking at this closer it seems related to the way the archive donwloads the file. If I wget the file and manually run tar -xvf .... then I don't have any issues. On the other hand if I let archive download the file (and fail) and then run tar -xvf I get the following

[root@host src]# tar -xvzf 1.20150415.tar.gz 

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

The file sizes differ dramatically from when I wget the file and when archive downloads it.

@antaflos
Copy link

@bearrito You should probably specify follow_redirects => true, because http://github.com/petere/pguri/archive/master.tar.gz redirects quite a few times.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants