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

Puppet-Chocolatey can't install from custom source (source => exe file) #102

Closed
cbuff18 opened this issue Nov 25, 2015 · 3 comments
Closed

Comments

@cbuff18
Copy link

cbuff18 commented Nov 25, 2015

Hi
I have a local file server for my package to install (msi, exe...)

This is the code of my class chocotest for testing:

class chocotest {

package { 'notepadplusplus.install':
provider => 'chocolatey'
ensure => 'installed',
source => "https://choco.cauca.ca/notepad/npp.6.8.6.Installer.exe",
}
}

I would like to know why it doesn't work. It's not an file access issue, it tells me that the package is not available error 404.

Thanks!

@ferventcoder
Copy link
Contributor

Hello @cbuff18! Unfortunately you are trying to use Chocolatey in a manner that is not correct.

If you are looking to provide a source to an installer file, add the silent arguments and change the provider over to the built-in provider for Puppet. See http://docs.puppetlabs.com/puppet/latest/reference/resources_package_windows.html for more details.

However if you want to use Chocolatey, Chocolatey _only_ works on packages (glorified zip files) that are *.nupkg files. These packages contain a nuspec, executables/files, and/or scripts that are installation/uninstallation instructions for Chocolatey (written in PowerShell).

Source is a folder/CIFS share containing these nupkg files, a Url (to a NuGet OData feed), or in some rare cases a pointer directly to a nupkg file. We have pretty comprehensive documentation regarding what you can provide for source https://forge.puppetlabs.com/chocolatey/chocolatey#package-provider-chocolatey and https://github.com/chocolatey/puppet-chocolatey#source. Please let us know if this needs a bit more details to reduce confusion in the future.

Also you may want to explore our documentation on creating a Chocolatey package - https://github.com/chocolatey/choco/wiki/CreatePackages (the tl;dr is choco new pkgname - and you can create your own custom templates as well to speed up the process).

Since you will probably now also be interested in hosting your own custom internal repository, you can see https://github.com/chocolatey/choco/wiki/How-To-Host-Feed (it includes non-Windows hosting options) and further, we already have a Puppet provider that will set up the Chocolatey Simple Server for you at https://forge.puppetlabs.com/chocolatey/chocolatey_server.

@cbuff18
Copy link
Author

cbuff18 commented Feb 24, 2016

Hi,
Thanks for your answer. I've read a lot and I successfuly created some chocolatey package.

My ps1 file tell the package to install a .exe on a local server example: //the.local.server/package.install.nupkg *will install * //the.local.server/installer/package.exe

But when I tried that command: choco install package.install -s "http://the.local.server/" it give me an error that the package was not found.

Do I need something special on the apache server?

thanks.

@ferventcoder
Copy link
Contributor

@ferventcoder ferventcoder changed the title Puppet-Chocolatey can't install from custom source Puppet-Chocolatey can't install from custom source (source => exe file) Mar 23, 2016
DavidS pushed a commit to DavidS/puppetlabs-chocolatey that referenced this issue Nov 15, 2019
(MODULES-4271) Add Server 2016 to metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants