-
Notifications
You must be signed in to change notification settings - Fork 88
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
Package depends #116
Package depends #116
Conversation
Can you show me an example recipe which shows the problem? Also, does the |
@bernd It fails on the fpm-cook - install-deps command because that tries to install both build and regular dependencies. I need the build dependencies to perform my build. |
Another option that might be less invasive would be to make a cli change, either a flag or new command, to only install build dependences. If you prefer that I can submit a PR. |
Thanks for the update! I need to find some time the next days to fiddle with this. |
I thought about this and all the other problems we have with Puppet and dependency installations and decided that it might be better to remove the automatic dependency installation. I prepared a PR in #122 to remove the feature. There is also a more detailed explanation of the reasons. Please have a look and let me know what you think in the comments of that PR. Thank you! |
It seems that PR #122 is heading towards not removing the dependency installation. I did have one historical design question. Why does fpm-cookery merge the build_depends and depends together during dependency verification for the package phase or even the install-deps phase? I understand why the build deps should be installed, but for the items I have worked on I didn't unerstand why the package deps also installed.. or if I wanted them installed why I wouldn't just set build_deps equal to depends. So assuming we don't want to extend the DSL as done in this PR and depending on the answer to the above question, I see a couple of paths forward. Let me know your thoughts.
@bernd let me know which you prefer, I would be happy to put together a PR for any of the above or other options that you come up with. |
Yes, after the feedback I got on that PR the feature seems valuable for you and others. That was also my hope to get some feedback so I can decide if I merge it or not. (I missed to communicate that...)
The idea was that Example: class Foo < FPM::Cookery::Recipe
build_depends 'libpng12-dev'
depends 'libpng12-0'
end Both, I agree that this can be confusing, especially because there is no documentation yet. Regarding the three options you suggested:
|
installing
i'm from |
I guess the |
you can use variables and use it for both lists, if you really need to define explictly runtime libraries, i still consider it packaging bug if all_depends = %w[libpng0 libjpeg6]
depends all_depends
build_depends all_depends, 'libpng-dev', 'libjpeg-dev' btw, in rpm world shared library depenencies are generated automatically based on library SONAME:
|
in pld all -dev packages require appropriate runtime packages bernd/fpm-cookery#123 bernd/fpm-cookery#116 (comment)
As said, the libpng example was not optimal and purely made up. In debian the |
imho if #126 is merged, default fpm-cookery run should be changed to install build deps only (that option 2). as how to run fpm-cookery without installing "runtime" deps? |
@glensc Can you clarify your comment a bit? Why is having the user specify --no-deps during the package phase insufficient? I don't have a long enough history w/ the project to understand all the user cases. |
@Brian-OConnell if i want to use fpm-cookery without installing runtime depends (the |
@Brian-OConnell but --no-deps would skip installing |
@Brian-OConnell but i need package as result, thus, i need to call
|
@glensc Correct, it would be a two step process at which point you would get a package at the end. |
i would prefer if it's one call, maybe add altho i would really preferred option 1 from #116 (comment) |
I think it would be good to just disable the automatic dependency installation for So my proposal is:
Any feedback on that? |
@bernd Your proposal is consistent with how I use FPM cookery. |
This makes sense, go for it. |
👍 |
- Remove --no-deps option. - Add --install-build-depends option to install build dependencies only. - Add --install-depends option to install all declared dependencies. - Disable automatic dependency installation on "fpm-cook package". Use the new --install-depends/--install-build-depends options to install dependencies and build the project with one command. Based on discussions in #116
I created a PR in #131. I am closing this PR now, please review and comment in there. Thank you! |
This PR adds support for explicitly setting package names to be passed to FPM without first trying to install them as either build or runtime dependencies. This is required when you need to specify the architecture of a dependency and your build target is an RPM. Without this PR if you specify the dependency with 'i686' puppet is happy but RPM can't resolve the dependency on install. If you specify the dependency as '(x86-32)' then RPM is happy but puppet fails.
If the PR is accepted, I will update the wiki accordingly.