On 01/11/2013 02:09 PM, Adam Spiers wrote:
Ralf Haferkamp (rhafer@suse.de) wrote:
This is probably getting a little off-topic here now. Should we switch to somewhere else?
Yeah, this probably belongs in the ruby-devel internal list, since it's more oriented around SUSE products. I doubt many Rails developers in the openSUSE community rely on gem rpms (but if anyone does, now would be a really good time to speak up!)
Well, the OBS developers do at least. Also, openSUSE has countless (generic) tools that build upon those RPMs (like vagrant, chef, puppet). Even as an administrator of a Rails app I can benefit. Instead of constantly checking all upstream gems and see if they fixed a security issue (happened twice recently with Rails), potentially applying patches by hand and having to bundle new gems if that happens plus running "zypper ref" + "zypper up" all the time, I only have to do the latter an be done. Admins appreciate this. As a developer I'm usually fine to create my dev env as messy as I want it. But if I'm sloppy with that, the big hammer will hit once I try to deploy something.
Cross-posting with Reply-To set ...
On Thu, Jan 10, 2013 at 06:55:47PM +0000, Adam Spiers wrote:
Ralf Haferkamp (rhafer@suse.de) wrote:
On Thu, Jan 10, 2013 at 11:52:24AM +0000, Adam Spiers wrote:
Ralf Haferkamp (rhafer@suse.de) wrote:
On Thu, Jan 10, 2013 at 10:34:19AM +0000, Adam Spiers wrote: [..] I stopped adding all the gems to BuildRequires, as they are not needed for building the package. As Josef noted bundle install does not need to be called during the build. (It will be implicitly called, when starting the app for the first time though.)
Yeah, but doesn't that break the guarantee described above? which slightly worries me.
Don't we run our tests based on the packages from the ISO (+ probably the update channels). I think that provides a similar guarantee, right?
Only if we did every single bit of development and testing against packages from ISOs. Enforcing that sounds like a bad idea to me. I'm pretty sure James would agree, at least :)
Not from the ISOs, but probably from the systemsmanagement:crowbar:2.0 channels.
I don't like that either - it should be possible to develop and test from source without using packages at all. (If it wasn't, then none of the great work James is currently doing would be possible.) Sure, this limits what you can work on, but it's still important IMHO.
It should however be possible to create "-devel" and "-test" subpackages that just add the dependencies for the respective Gemfile groups. BTW, I created rpm for most of the devel and test dependencies in home:rhafer:branches:systemsmanagement:crowbar:2.0 while experimenting with the packaging.
Cool, I like that subpackage idea a lot. If it's not a lot of work to finish packaging all the dev/test gems, then Gemfile.lock could be created at build-time and we could preserve the bundler guarantee, which IMHO would be better.
That would bring back a pretty long list of BuildRequires, with all it's drawbacks. (much larger buildroot, longer build times, more rebuilts).
... but only for a single package: crowbar-barclamp-crowbar, which is already a pretty lightweight.
But as Ladislav and Josef already mentioned we'd have to regenerate Gemfile.lock on the installed system everytime a dependency get's updated. So generating it during buildtime is pretty much a wasted effort.
If a dependency gets updated then OBS should automatically rebuild the barclamp anyway, surely? And that would automatically regenerate Gemfile.lock at build-time, assuming that the updated dependency didn't break any of the constraints in Gemfile. And if it did, then we would find out at build-time not install-time, which is good.
IMO the only real alternative would be to go down the "bundle package" path.
This looks more and more appealing for every extra minute I spend on this debate :-/ I have a feeling it might eliminate most of the problems we are currently having to worry about.
You'll get different ones, ask Jordi :-) -- With kind regards, Sascha Peilicke SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 16746 (AG Nürnberg)