Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When Downloaded file name is not as the bzip2 file #80

Open
shyperets opened this issue Jul 21, 2013 · 4 comments
Open

When Downloaded file name is not as the bzip2 file #80

shyperets opened this issue Jul 21, 2013 · 4 comments

Comments

@shyperets
Copy link

Please try run the following manifest :

include puppi

file { "/opt/local/":
ensure => "directory",
owner => "root",
group => "root",
mode => 755,
}

puppi::netinstall { 'wkhtmltoimage-amd64':
url => 'https://wkhtmltopdf.googlecode.com/files/wkhtmltoimage-0.11.0_rc1-static-amd64.tar.bz2',
destination_dir => '/opt/local',
postextract_command => '/bin/cp /opt/local/wkhtmltoimage-amd64 /usr/local/bin/wkhtmltopdf',
}

Looks like its looking to chown to file which is not exists and after manipulating that , Its not running the post extract command .

Please help ,

@alvagante
Copy link
Member

Going to fix this, for the moment check #70 and #64 for the extracted_dir parameter

@shyperets
Copy link
Author

Thanks for the comment ,

I try to see the input you send me and update my manifest according , its not looks like the problem solved :

file { "/opt/capriza":
ensure => "directory",
owner => "root",
group => "root",
mode => 755,
}

puppi::netinstall { 'wkhtmltoimage':
url => 'https://wkhtmltopdf.googlecode.com/files/wkhtmltoimage-0.11.0_rc1-static-amd64.tar.bz2',
destination_dir => '/opt/capriza', # Must Exist
extracted_dir => '.',
postextract_command => 'cp /opt/capriza/wkhtmltoimage-amd64 /usr/local/bin/wkhtmltopdf',
}

After running this one , I can not find the file he downloaded in my system , file name wkhtmltoimage-amd64

Is that what you mean by addressing me to the links ?

@alvagante
Copy link
Member

This is an edge case because the tarball actually contains a single file
(whose name can't be detected from the tarball name) and the current
netinstall implementation expects a directory as cwd when executing the
post_install command.
So basically you can have what you need with something like (ugly but
works):
puppi::netinstall { 'wkhtmltoimage':
url => '
https://wkhtmltopdf.googlecode.com/files/wkhtmltoimage-0.11.0_rc1-static-amd64.tar.bz2
',
destination_dir => '/opt/capriza', # The Parent Must Exist ( /opt )
extracted_dir => 'wkhtmltoimage-amd64',

postextract_command => 'cp /opt/capriza/wkhtmltoimage-amd64

/usr/local/bin/wkhtmltopdf', #
}
exec { 'post_netinstall':
command => 'cp /opt/capriza/wkhtmltoimage-amd64
/usr/local/bin/wkhtmltopdf',
subscribe => Puppi::Netinstall['wkhtmltoimage'],
path => '/bin:/sbin:/usr/bin:/usr/sbin',
refreshonly => true,
}

On Sun, Jul 21, 2013 at 3:40 PM, shyperets [email protected] wrote:

Thanks for the comment ,

I try to see the input you send me and update my manifest according , its
not looks like the problem solved :

file { "/opt/capriza":

ensure => "directory",
owner => "root",
group => "root",
mode => 755,
}

puppi::netinstall { 'wkhtmltoimage':

url => '
https://wkhtmltopdf.googlecode.com/files/wkhtmltoimage-0.11.0_rc1-static-amd64.tar.bz2
',
destination_dir => '/opt/capriza', # Must Exist
extracted_dir => '.',
postextract_command => 'cp /opt/capriza/wkhtmltoimage-amd64
/usr/local/bin/wkhtmltopdf',
}

After running this one , I can not find the file he downloaded in my
system , file name wkhtmltoimage-amd64

Is that what you mean by addressing me to the links ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/80#issuecomment-21310207
.

@shyperets
Copy link
Author

Thanks , Works !
Please update when bug was fixed ,
nice day 👍

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

No branches or pull requests

2 participants