Friday, April 29, 2011

Lower the Barrier for Scratching Open Source Itches!

Ok, this is an idea I've had for some time now, I think it's time to put it out there and see what a large audience thinks. I'm a bit ignorant about how distributions are set up, maybe it's just impractical for some reason I'm unaware of.

I think there should be an easy way for users of a distro to jump right into development. This stuff is done for free, we need all the help we can get. It would help to eliminate any barriers to entry we can. My proposal is that it should be integrated into the package manager.

Here is the process I envision: I, the user with coding skills, have an itch with Program X. I issue one command, let's say "sudo apt-get --collab programx". Here's what it does:
  • It automatically creates a fork of the project on my account on Github (or equivalent)
  • It pulls, via Git (or equivalent), the very version of Program X that I am running currently. Now, this is important because I don't want to worry about different behavior in the program, I don't want to deal with a newer version of the program requiring different versions of libraries. I want the same thing I just ran, with the same bug, and I want the source code that generates it.
  • The build environment is all set up. I don't want to hunt for build dependencies, compiler options, etc. Enough said. "apt-get -b" Seems to do most of what I described thus far, minus the crutial Git part.
  • I fix my problem. I make my changes, commit, and push. It shows up on upstream's Github fork queue (or equivalent). They decide whether to accept it.
Github has already done a great part of this, compared to a few years ago, by lowering the barrier to entry with the fork queue. Install via source already exists in apt. Would it be a huge task to coordinate the two?

I think that I would probably have scratched a few itches by now if it were this straightforward. Instead, I have to look up the specific build setup for the project (on the project's site, not Ubuntu's site), figure out build dependencies, etc. Or, I can do apt-get -b, but then it's not ready to commit my changes back (afaik).

The limit of my patience, and free time, is reached much earlier in the process as things currently stand. Remember, this is for people who are perhaps a few levels less involved than the sort of user who would run the bleeding edge Ubuntu Beta. This is a regular user with some coding skills, who might be able to fix a problem or two if the setup were handed to them. They have a different mentality. This is about getting a new class of developers involved.

Again, I'm ignorant about the details of package management and open source project management, so I'm probably leaving holes in this idea that I don't know about. I'm just a developer with an idea. The question is, can these holes be ironed out, or does this have a fundamental problem because of package management, as it stands today?

Or does this already exist and I just never heard of it? (in which case, it should just be promoted more!)

5 comments:

Chris Pacejo said...

I believe the toolchain you're looking for is:

apt-get source *packagex*
apt-get build-dep *packagex*
tar xzf …
dpkg-buildpackage
diff -u … > patch.diff
bugreport -A patch.diff *packagex*

The functionality's all there; all that's really needed is a FAQ pointing it out.

Dan said...

Thanks Chris! I may have to make a project out of making a wrapper for this.

Ralf Ebert said...

Even more, I wish applications/operating system would have a secret "developer key" that takes you straight to the source code, checking out projects and setting up a development environment as needed along the way.

Eclipse IDE has such a key (Plug-in Spy, Alt + Shift + F1 / F2) and it has been an incentive to start fixing some bug many times for me:

http://www.vimeo.com/23065654

Unknown said...

I'm working on a distro that is based around this.

Dan said...

Luke, can you tell me about it? What base are you using? (or are you starting from scratch?)

I was originally thinking of putting into an already popular distro like Ubuntu to get more developer numbers. But if you're starting a new one, I think something based on the Nix package manager (google for NixOS) would be perfect. It guarantees you get all your dependencies, you can install and run concurrent versions of pretty much everything, and more. The point in this blog post aside, this sounds ideal for developers, though I've not tried it yet.