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

Fail to upload ssmtp cookbook to local chef server, due to yum-epel dependency #19

Closed
dennyzhang opened this issue Jan 24, 2015 · 7 comments
Labels

Comments

@dennyzhang
Copy link

ssmtp cookbook depends on yum-epel cookbook.

I'm trying ssmtp in my local chef env with local chef server.
Thus I first uploaded yum-epel to my chef server. It was fine.
Then I tried to upload ssmtp cookbook, it fails like below.

My workstation is Mac OSX, with knife 12.0.1.
Chef server is Ubuntu 12.04, with ruby 1.9.1 + chef 11.6.0

,-----------
| bash-3.2$ knife cookbook upload yum-epel
| Uploading yum-epel [0.6.0]
| Uploaded 1 cookbook.
|
| bash-3.2$ knife cookbook upload ssmtp
| Uploading ssmtp [0.4.0]
| ERROR: Cookbook ssmtp depends on cookbooks which are not currently
| ERROR: being uploaded and cannot be found on the server.
| ERROR: The missing cookbook(s) are: 'yum-epel' version '~> 0.5.2'
`-----------

If I change to L11 of metadata.rb, the upload upload would be fine.
https://github.com/svanzoest/ssmtp-cookbook/blob/master/metadata.rb#L11

From:
"depends 'yum-epel', '~> 0.5.2'"
to
"depends 'yum-epel', '>= 0.5.2'"

@svanzoest
Copy link
Contributor

Hi,

Thank you for using the ssmtp cookbook. You are correct. It has only been
tested with yum-epel 5.2 and therefore depends on that version.

I would recommend you try berkshelf as part of chefdk. It will help upload
the right dependencies.

@dennyzhang
Copy link
Author

@svanzoest

Would you mind fix this by changing that line?
Also thanks for your recommend of bershelf. I've heard of that several times. Time to have a try.

@svanzoest
Copy link
Contributor

That line is there because we have not tested yum-epel 6. Once that has be
done and passes I can adjust the requirement. I am not in a place to do
that right now.

You can upload version 5.2 yum-epel to your chef server and you should be
good to go.

@chewi
Copy link
Contributor

chewi commented Apr 10, 2015

While I appreciate that you want to be sure it works and that Berkshelf can generally resolve this for you, I think you're being a little heavy-handed. You're not doing anything special with yum-epel, just including the default recipe. It has one simple task to do, enable EPEL, so I doubt they'd ever put out a release where that doesn't work. More likely an older release would stop working at some point. If this cookbook is left unmaintained for a time, which can happen even with the best intentions, holding back a dependency like this can be source of frustration.

@martinb3
Copy link

I think it's unreasonable to (a) manually manage your dependencies, (2) manually download an incompatible version of a dependency, and then (c) upload it to your chef server, and expect it to work. +1 for keeping the pins. It's a best practice.

@svanzoest
Copy link
Contributor

Updating the pin is just a round of tests with test kitchen and a PR away.
I just have not gotten around to test a minor release update yet. Feel free
to do it and share a successful test kitchen run and we will accept the PR.
It just needs to be confirmed we do not break anyone else.

@svanzoest
Copy link
Contributor

Updated dependency in #20

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

No branches or pull requests

4 participants