Comments (11)
@randradas would you like to provide us with a patch for this?
from puppet-archive.
yes!, I would. I've just push it on pull requests.
from puppet-archive.
Odd the original spec 4c469d3 had the extra double quote, wonder how it was working originally. Is this fixed by #143?
from puppet-archive.
as far as I know and according with wget man page, only double quotes before '--header=' and the final one are needed. https://www.gnu.org/software/wget/manual/wget.html. #143 removes this extra double quote that should not be there according with wget documentation. this issue can be closed.
from puppet-archive.
When I'm testing with the following resource, I'm only getting an html page:
archive { '/tmp/jdk-7u80-linux-x64.tar.gz':
source => 'http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz',
cookie => 'oraclelicense=accept-securebackup-cookie',
provider => 'wget',
}
$ file /tmp/jdk-7u80-linux-x64.tar.gz
/tmp/jdk-7u80-linux-x64.tar.gz: HTML document text
$ head /tmp/jdk-7u80-linux-x64.tar.gz
<html>
<head>
<title>Unauthorized Request</title>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link rel="stylesheet" type="text/css" href="/errors/us/assets/hp-styles.css" />
<link rel="stylesheet" type="text/css" href="/errors/us/assets/master-master.css" />
<body style="margin: 0px" bgcolor=#ffffff>
<div id="banner">
Do you have an working example?
from puppet-archive.
After some testing the following works:
command = "wget #{params.join(' ')}"
Puppet::Util::Execution.execute(command)
and this does not:
wget(params)
I suspect there was an extra double qoute because something with puppet metaprogrammed wget method is not handling the quotes correctly.
from puppet-archive.
Even with extra double quote you will obtain that page, this is what lead me to find that double quote. However jdk downloading works with curl.
So maybe receiving that web is not related with the "extra double quote" and should be managed like another issue.
from puppet-archive.
Ok, it's a problem with Puppet::Util::Execution.execute:
cmd = ["wget",
"http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz",
"-O",
"/tmp/jdk-7u80-linux-x64.tar.gz_20160317-16253-1m9avpd",
"--max-redirect=5",
"--header=\"Cookie: oraclelicense=accept-securebackup-cookie\""]
This fails: Puppet::Util::Execution.execute(cmd)
, but this works Puppet::Util::Execution.execute(cmd.join(' '))
. This is why wget(params) does not work, but my work around did. I'll put in a fix. Puppet::Util::Execution is not happy with the " escape double quote. In curl, the commands is something like:
["curl",
"http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz",
"--cookie",
"oraclelicense=accept-securebackup-cookie"]
Since curl does not have ", it does not trigger this problem.
from puppet-archive.
What puppet version? That sounds like a puppet bug.
from puppet-archive.
It's at least affecting PE 3.8. Hard to say what other versions since I can't just do git bisect and run spec tests. However looking at the history of puppet::util::execution, there are few recent changes. @randradas, what's your puppet version?
from puppet-archive.
Puppet Open Source 3.8.4 in my case. Running on master and agents.
from puppet-archive.
Related Issues (20)
- Do not add auth and cookie header when redirecting HOT 2
- Example in README doesn't make sense.
- uninitialized constant PuppetX::Bodeco::PUPPET HOT 4
- add support for Ubuntu 22.04
- Changing back and forth between different version of an archive does not re-extract HOT 1
- Enhancement: allow multiple sources
- curl provider: array of multiple headers does not work HOT 2
- Checksum not being verified HOT 1
- Files unpacked in `/tmp` HOT 2
- Missing gem with ruby 3.1 HOT 13
- Artifactory has no authentication for latest url and checksum
- Allow passwords to be deferred
- archive does not enforce `owner:group` HOT 2
- archive has stopped working for us HOT 4
- weird issue with the proxy settings if 'proxy_server' seems to be set not fully correct
- archive module reveals sensitive information
- Provider curl to wget
- archive extraction fails
- Add support for Azure Blob Storage HOT 1
- Feature request: Add support for username|password to be passed as Sensitive[String]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-archive.