jacob-carlborg / orbit

A package manager for the D programming language
35 stars 2 forks source link

Specification/Packaging Standards Concerns #2

Open Llammissar opened 12 years ago

Llammissar commented 12 years ago

I think this is a great idea, but I'm getting a strong "rubygems" vibe from it and that scares me because unless there are rigourous standards in place, packages turn out like gems and are nearly impossible for distros to package. (cf. http://blog.flameeyes.eu/2011/12/21/gems-make-it-a-battle-between-the-developer-and-the-packager). This is not a fate I'm fond of dealing with, and I have zero good memories of our large-scale rvm deployment at work, so I would like to offer what assistance and advice I might so as to ensure orbit doesn't fall into a miserable state. I'm not sure where or how far you're willing to take this conversation, so for now, I'd implore you to consider this document: http://dev.gentoo.org/~ulm/pms/head/pms.html if not skim the whole thing.

I've used a lot of package managers at this point, but I am now and will remain a Gentoo user because package management is properly standardised and pleasant to deal with. It's a lot like BSD ports, if you've used that, only improved in pretty much every way possible. There are a number of ideas in there that I would love to see cribbed or strongly encourage the adoption of, but the real takeaway for now is probably that there need to be guarantees built into the system to prevent the sorts of issues Diego deals with. Thanks!

Cheers, Wyatt

PS: "I'll probably explore the possibility of having spec and orb files written in D." Why not use rdmd? (TDPL, pg 2)

jacob-carlborg commented 12 years ago

It's not strange you get a Rubygems vibe, I've basically copied Rubygems and adopted it for D.

I've read the blog post and I can say this:

  1. I don't understand why anyone would want to package a gem in the distro's package manager in the first place
  2. There's a lot of complains about gems not being maintained and not compatible with each other and different versions of Ruby. I don't see how this can be easily solved. There are only complain and no solutions.

Aren't most packages in the distro's package managers supported by the distro and managed by someone from the distro community and possibly hired and paid by some company? They're adding patches to make sure the packages work on their distro and so on. Rubygems doesn't have that luxury and I'm pretty sure we will neither.

I see you have had problems with Rubygems. I on the other hand have had problems with Portage. Packages that don't compile and when they don't you're completely lost (at least I am). I also had the problem of not updating my server often enough. It ended with dependencies that couldn't be met. Package B depends on a newer version of Portage, can't install newer version of Portage because a newer version of Portage is required. Older packages are not available in the repositories anymore. Problems like that.

BTW, RVM isn't really made for deploying, it's made for primary for development. This makes it a bit harder to adapt for a global installation for instance.

I would much more prefer that you tell me if there are any specific problems you see and if you have any solutions for them.

I don't know if you seen this already but I've written down my ideas for a package manager:

https://github.com/jacob-carlborg/orbit/wiki/Orbit-Package-Manager-for-D

This ideas started out just as ideas and I wrote them down so I didn't have to repeat myself on the newsgroup. But now I've started on this project the ideas can be considered the specification and will gradually become more detailed and complete.

I know about rdmd and use it all the time. If I decide D can be used for spec and orb files rdmd will most likely be used.

Llammissar commented 12 years ago

Oh wow, I'm sorry. I've been meaning to respond to this for a few weeks, but things haven't calmed down since I got back from my vacation (maintenance windows and migrations; ah, to have an intern!) Anyway, this is pretty long, so feel free to take it in chunks. First up, your initial response:

  1. Wow, really? It's because any software on the system that isn't managed by the system package manager is an administrative liability. They install themselves wherever they like, overwriting whatever they well please, not paying any mind to what they might be breaking, modifying system PATHs and generally polluting the environment. This is or has been true of gem, pear, cpan, pypi, makefiles, even RPM at times. Between Gentoo and Debian, I think it's pretty clear there's demand for this sort of thing. And considering the distro is packaging your software to help you (rooting out QA bugs is very important for production environments), it doesn't seem unreasonable to "...hav[e] tests around, a clear repository, the ability to rebuild documentation and tests without bringing in a whole lot of gem-building tools – jewelwer, hoe, and so on – and most importantly code that works and tests green...." Does it?
  2. Diego has been writing about just this for two years, now, and has explained his reasoning at every turn. http://blog.flameeyes.eu/2008/12/14/rubygems-cpan-and-other-languages sums up the idea pretty nicely and can be summarised as "Be like CPAN so we can wrap it with a PM module." If you don't want to get super-involved, would that be an acceptable middle ground?

I understand that you've had issues with Portage. I appreciate that; dependency resolution is a difficult problem and, depending on when you were using it, some kind-of-awful things might have happened (the libpng soname change was a particularly egregious example). But I don't think these experiences invalidate what we've learned about package management and what makes a good, even enjoyable, experience for working with it. More on this in a bit

Having taken the time to sit down and actually go over it with a fine toothed comb, here are my specific impressions. This may seem nit-picky at times, but all points I raise are born of experience. If I seem negative, apologies in advance. Please consider it a function of my passion for the subject; I take package management very seriously. ;)

Integration:

Orb:

I hope that, with this examination it becomes clear that I'm not just trying to be contrarian. I strongly believe there is a lot to be learned from what Zac Medico and others have done with portage and its related tools while acknowledging that it has flaws and features that aren't necessarily going to apply to a language-specific PM. You've put yourself in an interesting place within the community because what you do could ultimately bring people scrambling to use D because it's enjoyable from end-to-end or ultimately hold many excellent programmers at bay because the tools don't encourage good community practice.

Best, Wyatt

On Sun, Dec 25, 2011 at 15:02, jacob-carlborg reply@reply.github.com wrote:

It's not strange you get a Rubygems vibe, I've basically copied Rubygems and adopted it for D.

I've read the blog post and I can say this:

  1. I don't understand why anyone would want to package a gem in the distro's package manager in the first place
  2. There's a lot of complains about gems not being maintained and not compatible with each other and different versions of Ruby. I don't see how this can be easily solved. There are only complain and no solutions.

Aren't most packages in the distro's package managers supported by the distro and managed by someone from the distro community and possibly hired and paid by some company? They're adding patches to make sure the packages work on their distro and so on. Rubygems doesn't have that luxury and I'm pretty sure we will neither.

I see you have had problems with Rubygems. I on the other hand have had problems with Portage. Packages that don't compile and when they don't you're completely lost (at least I am). I also had the problem of not updating my server often enough. It ended with dependencies that couldn't be met. Package B depends on a newer version of Portage, can't install newer version of Portage because a newer version of Portage is required. Older packages are not available in the repositories anymore. Problems like that.

BTW, RVM isn't really made for deploying, it's made for primary for development. This makes it a bit harder to adapt for a global installation for instance.

I would much more prefer that you tell me if there are any specific problems you see and if you have any solutions for them.

I don't know if you seen this already but I've written down my ideas for a package manager:

https://github.com/jacob-carlborg/orbit/wiki/Orbit-Package-Manager-for-D

This ideas started out just as ideas and I wrote them down so I didn't have to repeat myself on the newsgroup. But now I've started on this project the ideas can be considered the specification and will gradually become more detailed and complete.

I know about rdmd and use it all the time. If I decide D can be used for spec and orb files rdmd will most likely be used.


Reply to this email directly or view it on GitHub: https://github.com/jacob-carlborg/orbit/issues/2#issuecomment-3271534

jacob-carlborg commented 12 years ago

Ok, that might be true. But I still think the package manager provided by the OS is different from a package manager like Rubygems.

As far as I understand it Diego likes CPAN because it uses a well established archive format, tarball or zip and a specific page structure. That is just what Orbit does as well: https://github.com/jacob-carlborg/orbit/wiki/Orb-Package

About multiple versions of the same package. I would say that this is a key feature of a package manager. Installing a package, including its dependencies and supporting multiple versions of the same package are the key features of a package manager. Say, application A depends on library C, version 1. Application B depends on library C, version 2. How would that be solved if multiple versions of the same package can't be installed.

Orbs do contain metadata: https://github.com/jacob-carlborg/orbit/wiki/orb%20package

About binary packages. Yes Orbit will support binary packages. This is one of the top two complains people have had with Orbit. Again, if you actually read the wiki pages you will see this: https://github.com/jacob-carlborg/orbit/wiki/orb%20package

This was a very long post, thanks for all the comments.

apriori commented 12 years ago

@Wyatts :

Please consider taking a look at cabal for haskell to understand what goals of Orbit will be. Btw., as a former packager for multiple distros I can tell, the amount of work duplicated because proper package management is not an integrated part of the language and its toolchain is not even funny. Every distro packages its own stuff, and the wast majority want the very same results without actually being able to provide those same results. As a result many developers suffer from their applications getting bad reputation, which was not caused by them, but by packagers which have no clue about the application in question and how to build it properly. While its not really the goal of Orbit to change that situation, Orbit is meant to provide convenience to developers to escape the usual "buildsystem hell" we got everywhere. Cabal on haskell for example is extremely good and makes developing extremely convenient... its just a natural wish to have something similar for D. About fearing that libs, headers, etc. installed by Orbit would conflict with any versions installed by a systems package manager.. well, one would need to solve that with either 1) proper include orders or 2) sandboxing.

jacob-carlborg commented 12 years ago

I do not plan to install Orbit packages in standard locations. I plan to install them into its own directory. Then maybe create symlinks or solve it some other way.