Ubuntu Open Week - Getting Started in Ubuntu Development - James Westby and Daniel Holbach - Thu, Nov 5, 2009

  • utc

(10:00:32 AM) dholbach: HELLO EVERYBODY!
(10:00:55 AM) dholbach: I'm here with a fantastic developer and a great friend: James "james_w" Westby
(10:01:09 AM) james_w: hello
(10:01:31 AM) dholbach: James and I will run a double-session block today
(10:01:49 AM) dholbach: the first part of it will get you started with Ubuntu Development - getting your development environment set up and everything
(10:02:04 AM) dholbach: in the second part we'll dive head-first in some real-life activity and fix some Ubuntu bugs
(10:02:23 AM) dholbach: if you could please prefix your questions with QUESTION: in #ubuntu-classroom-chat - that'd be nice
(10:02:45 AM) dholbach: ie: QUESTION: james_w: I heard you're a great DJ - is that true?
(10:02:51 AM) dholbach: thanks in advance. :-)
(10:02:57 AM) dholbach: james_w: ready? :)
(10:03:26 AM) dholbach: alright... one page you absolutely should bookmark is
(10:03:41 AM) dholbach: it talks about all the stuff we're going to cover today and much much more
(10:03:59 AM) dholbach: the Packaging Guide, how things in Ubuntu are done, where to find easy tasks to work on, etc. - it's all in there
(10:04:06 AM) dholbach: some MOTU Videos too :)
(10:04:34 AM) dholbach: one question we hear a lot is "if I want to do Ubuntu development - do I really need to run the development release?"
(10:04:38 AM) dholbach: and the answer is yes
(10:04:51 AM) dholbach: you need it to build packages, you need it to test packages, etc.
(10:05:07 AM) james_w: you don't have to run it as your main environment though
(10:05:14 AM) dholbach: luckily, you don't need to have a broken system all the time because explains various ways how to do that in a sane way :)
(10:05:32 AM) dholbach: (but that's linked from the Getting Started page too :))
(10:06:10 AM) dholbach: so even if you don't run lucid right now (I don't blame you), let's all enable "Sources" in System -> Administration -> Software Properties -> Software
(10:06:28 AM) dholbach: (please let me know in #ubuntu-classroom-chat if that takes you to the right place (I use the German version :-))
(10:06:51 AM) dholbach: that will give you easy access to the source of Ubuntu
(10:07:00 AM) dholbach: afterwards please run
(10:07:01 AM) dholbach: sudo apt-get install --no-install-recommends gnupg pbuilder devscripts build-essential debhelper fakeroot
(10:07:17 AM) dholbach: it will install a few tools we're going to need during our excercise here
(10:07:28 AM) dholbach: james_w: want to say anything about the tools there?
(10:07:37 AM) dholbach: or shall we talk about it later on?
(10:07:59 AM) james_w: I think we should cover those tools as they come up
(10:08:06 AM) dholbach: makes sense :)
(10:08:27 AM) dholbach: ok, let's talk about gpg keys
(10:08:52 AM) dholbach: as a developer you're going to need a GPG key in order to sign packages and indicate that it was really you who touched them last
(10:09:12 AM) dholbach: (you can generally use gpg to encrypt and/or sign files and messages)
(10:09:41 AM) dholbach: so whenever I upload a source package to Ubuntu, I sign it first, so the build daemons know they can trust me and let it pass :)
(10:10:04 AM) dholbach: has a lot of good information about how to use and set up gpg keys
(10:10:09 AM) dholbach: we'll do the short version here
(10:10:18 AM) dholbach: if you don't have a key yet(!), please run:
(10:10:37 AM) dholbach: gpg --gen-key
(10:10:51 AM) dholbach: james_w: want to talk about the values you best select in there?
(10:11:05 AM) james_w: the "comment" it asks for is optional
(10:11:10 AM) james_w: most people don't have one
(10:11:23 AM) james_w: and it can get confusing later if you put one in :-)
(10:12:01 AM) james_w: you don't have to use an email address or anything
(10:12:09 AM) dholbach: james_w: any advice for all the numbers? (I mostly stick to the default values :-))
(10:12:17 AM) james_w: me too
(10:12:22 AM) dholbach: ok
(10:12:27 AM) dholbach: let's crack on then
(10:12:51 AM) dholbach: you might get a message that it is waiting for entropy shortly after you agreed on defaults or picked different values
(10:13:20 AM) dholbach: in that case, let it run and do it's thing (it waits for more random numbers to generate the key, so some additional activity on the machine is what it's waiting for)
(10:13:40 AM) dholbach: now we'll set up pbuilder (which also takes a bit of time for its setup)
(10:13:55 AM) dholbach: please create a file called ~/.pbuilderrc
(10:14:09 AM) dholbach: and put          COMPONENTS="main universe multiverse restricted"          into it
(10:14:32 AM) dholbach: this will enable all components of Ubuntu as opposed to just "main"
(10:15:06 AM) dholbach: now just save it - that's all the configuration it needs right now
(10:15:19 AM) dholbach: talks about the more advanced options
(10:15:28 AM) dholbach: (a good read btw.)
(10:15:38 AM) dholbach: now please run
(10:15:40 AM) dholbach:   sudo pbuilder create
(10:16:07 AM) dholbach: this will set up the pbuilder (by downloading all the minimally required packages), which can take a bit on a slow connection
(10:16:12 AM) dholbach: so what's pbuilder
(10:16:28 AM) dholbach: it's a tool to build packages in a minimal and clean environment
(10:17:28 AM) dholbach: the great thing about it is, 1) you don't have to install millions of packages to build the package locally (and maybe remove them afterwards), but more importantly 2) you can afterwards guarantee that the package will build in a minimal environment with just the packages it specifies for building
(10:17:43 AM) dholbach: if some of you have heard of Build-Depends before - that's what I'm referring to
(10:17:51 AM) dholbach: <MsMaco> QUESTION: how can we tell pbuilder to include binary-package-mangler (or whatever that "test the translations" thing is)
(10:18:28 AM) dholbach: MsMaco: I think that's mentioned in the PbuilderHowto page - you can tell it to install additional packages and run arbitrary scripts in various hooks
(10:18:47 AM) dholbach: do we have some more questions up until now already?
(10:19:54 AM) dholbach: there's also a neat tool called pbuilder-dist (in the ubuntu-dev-tools package) that lets you build packages in various distro releases? (like: build supertux in dapper and hardy please)
(10:20:02 AM) dholbach: james_w: anything you'd like to add right now?
(10:20:12 AM) james_w: pbuilder rocks
(10:20:21 AM) dholbach: :-)
(10:20:31 AM) dholbach: short and precise - that's why we all like james_w
(10:20:34 AM) james_w: you will need to run "pbuilder update"
(10:20:38 AM) james_w: every few days
(10:20:48 AM) james_w: that will install updated packages and update the apt lists
(10:21:06 AM) dholbach: <Jesi-Idle> Question: What skills do we need to have, or should have, before we get involved in development,  are there any particular coding languages we should learn?
(10:21:15 AM) dholbach: Jesi-Idle: I have that on my list in a bit :)
(10:21:30 AM) dholbach: next we'll tell the packaging tools who we are
(10:21:45 AM) dholbach: for that please edit ~/.bashrc in your favourite editor
(10:21:53 AM) dholbach: (or .zshrc if you use zsh, etc.)
(10:22:18 AM) dholbach: I added something like this to the end of the file:
(10:22:19 AM) dholbach: export DEBFULLNAME='Daniel Holbach'
(10:22:19 AM) dholbach: export DEBEMAIL=''
(10:22:33 AM) dholbach: please use the name and the email address you used for your gpg key in there
(10:22:53 AM) dholbach: (although you can specify the key id somehow differently)
(10:23:14 AM) dholbach: this will speed up development as you don't have to write your name all the time in changelogs and stuff
(10:23:20 AM) dholbach: ....... unless you like doing that :)
(10:23:31 AM) dholbach: afterwards please save the file
(10:23:33 AM) dholbach: and run
(10:23:39 AM) dholbach:   source ~/.bashrc
(10:23:46 AM) dholbach: or restart your terminal
(10:24:10 AM) dholbach: <kalon33> QUESTION: Can we use pbuilder for setting something like an automated buildd when we are making batches of packages ?
(10:24:27 AM) dholbach: kalon33: you can use pbuilder in scripts to do something like that - I guess it depends on your use-case
(10:25:05 AM) dholbach: james_w: did we forget anything initial?
(10:26:39 AM) dholbach: ok... so while pbuilder and gpg are still doing their thing, let's talk a bit about Ubuntu Development more generally
(10:26:54 AM) dholbach: I really like Jesi-Idle's question
(10:27:19 AM) dholbach: because the task of doing Ubuntu Development sounds very daunting in the beginning
(10:27:52 AM) dholbach: if I was to think about important skills of new Ubuntu Developers, I personally wouldn't name "C, Python, C++, Makefiles, Shell scripting, etc." first
(10:28:00 AM) dholbach: but different things like:
(10:28:05 AM) dholbach:  - be a good team player
(10:28:22 AM) dholbach:  - liking to make things work again
(10:28:32 AM) dholbach:  - don't be afraid of documentation
(10:28:40 AM) dholbach:  - don't be afraid to ask when you're unsure
(10:28:47 AM) dholbach:  - like doing some detective work
(10:28:53 AM) dholbach: james_w: anything you'd add to the list?
(10:29:31 AM) james_w: that's certainly a good start
(10:30:10 AM) james_w: you need at least to be able to work a text editor
(10:30:29 AM) james_w: and knowing how to work the command line is a good idea
(10:31:12 AM) dholbach: yep, you're right
(10:31:28 AM) james_w: any programming knowledge is a bonus
(10:32:12 AM) dholbach: that's one good thing about working on Ubuntu - there's a lot to learn and we work on all packages together :)
(10:32:45 AM) dholbach: a good place to talk to people about packaging and ubuntu development is the #ubuntu-motu channel
(10:32:56 AM) dholbach: and
(10:33:29 AM) dholbach: there's a lot of friendly people who can help you getting up to speed with your first bug fixes
(10:33:36 AM) james_w: indeed
(10:33:36 AM) dholbach: and there's of course:
(10:33:41 AM) dholbach: (did I mention it already? :-))
(10:33:50 AM) dholbach: so go and bookmark it :)
(10:34:10 AM) dholbach: Ubuntu Development is a lot about integrating good software better into Ubuntu
(10:34:25 AM) dholbach: so packaging is your bread and butter every day
(10:35:01 AM) dholbach: do we have any more questions about that?
(10:35:04 AM) dholbach: Jesi-Idle: let us know if we answered your question well enough :)
(10:35:13 AM) james_w: <brettalton> secondly, I would like to know specifically how to get mentored. I've gone through the wiki pages, I've added myself to the mentor request list and no one has responded. I'm a web developer that would like to learn how to package programs written in PHP, such as phpMyAdmin, KohanaPHP and some others that I've requested.
(10:35:38 AM) dholbach: oh, I missed that one
(10:35:59 AM) dholbach: brettalton: there's the MOTU Mentoring programme, but I daresay it's under a lot of load right now
(10:36:11 AM) dholbach: if you didn't receive a reply yet, try again
(10:36:23 AM) dholbach: one thing should be clear: you don't need to have a mentor to participate
(10:36:43 AM) dholbach: reading the packaging guide, having a look at example packages and how they work are a GREAT way to get started
(10:37:14 AM) dholbach: and that's why you'll learn much quicker by working on existing packages, because there's a lot of knowledge of hundreds of maintainers already in them
(10:37:47 AM) dholbach: since you enabled "Sources" in the software properties above, a simple        apt-get source <pkgname>    will give you access to how they did it
(10:38:12 AM) dholbach: brettalton: the people in #ubuntu-server might know a bit more specifically about php packages and web apps in general
(10:38:17 AM) dholbach: (or the Debian PHP team)
(10:38:32 AM) dholbach: any more questions?
(10:39:21 AM) dholbach: seems we're good for now, but keep the questions coming! :)
(10:39:35 AM) dholbach: <openweek6_> Question : Is there a place for a noob to go - for mentoring, i would like to install, configure , modify my own system so that i can better give back to the system as well to others.
(10:39:59 AM) dholbach: openweek6_: I think I just answered the mentoring bit... but generally this session is a good start
(10:40:06 AM) dholbach: plus
(10:40:12 AM) dholbach: plus #ubuntu-motu on :-)
(10:40:18 AM) dholbach: let's crack on :)
(10:40:34 AM) dholbach: so... let's say you worked on some kind of bugfix and have a patch available
(10:40:42 AM) dholbach: james_w: how do I get that patch into Ubuntu?
(10:41:03 AM) james_w: sponsoring!
(10:41:19 AM) dholbach: yeehaw!
(10:41:21 AM) dholbach: how does it work?
(10:41:22 AM) james_w: this is the process by which you get an Ubuntu developer to review your changes and upload them for you
(10:41:45 AM) james_w: shows some of the patches that are waiting for review
(10:42:24 AM) dholbach: explains it in detail (also linked from the getting started pages)
(10:42:34 AM) james_w: beat me to it!
(10:42:41 AM) dholbach: generally, you will
(10:42:43 AM) dholbach:  - find a bug
(10:42:48 AM) dholbach:  - fix it (YAY!)
(10:42:55 AM) dholbach:  - attach the patch to the bug report
(10:43:01 AM) dholbach:  - subscribe the sponsors team
(10:43:04 AM) dholbach: done :)
(10:43:15 AM) dholbach: they'll review it and upload it for you once they're happy
(10:43:19 AM) james_w: act on any review comments if needed
(10:43:23 AM) james_w: hopefully not :-)
(10:43:28 AM) dholbach: :-)
(10:43:37 AM) dholbach: <Jesi-Idle> Question: I'm under the impression programs get re-packaged with each version of Ubuntu, even if the packaged program hasn't changed? is this so and why is it the case? because other than a few programs I've seen, it seems like everything is already packaged
(10:43:53 AM) dholbach: Jesi-Idle: it depends on what you mean by re-packaged
(10:44:05 AM) dholbach: if there's no new upstream version (no changed code by the authors of that software)
(10:44:33 AM) dholbach: we will often fix bugs by patching small things in the code, or add something useful to the packaging
(10:44:55 AM) dholbach: let's say I package frobnicator and I uploaded version 1.4-0ubuntu1 (more about version numbers later)
(10:45:15 AM) dholbach: if I decide that frobnicator isn't telling enough, I might want to add a manpage to the package
(10:45:22 AM) dholbach: in that case I'd upload a 1.4-0ubuntu2
(10:45:28 AM) dholbach: (I hope that makes it a bit clearer)
(10:46:06 AM) dholbach: alright, so much for the mechanics of getting fixes into Ubuntu in the beginning
(10:46:22 AM) dholbach: let's talk about becoming an Ubuntu developer and joining the uploaders team
(10:46:55 AM) dholbach: once you've heard "you're doing great work - you should be able to upload yourself" more often from your co-developers, you should consider applying
(10:47:22 AM) dholbach: the process for that is explained at and will change slightly in the next few months
(10:48:07 AM) dholbach: at the moment you are required to document your work a bit on your wiki page, ask for comments from developers you've worked with and attend a meeting in which a few questions will be asked
(10:48:17 AM) dholbach: if all goes well, you're part of the team afterwards :)
(10:48:39 AM) dholbach: <llua> question: where would i report a "bug" report of 9.10 x64 not booting on a dell xps630i computer?
(10:48:45 AM) dholbach: james_w: want to take this one? :)
(10:49:03 AM) james_w: hmm
(10:49:08 AM) james_w: I'm not entirely sure
(10:49:21 AM) dholbach: maybe more appropriate for #ubuntu-bugs?
(10:49:32 AM) james_w: you'd have to do a bit more investigation to find out the package
(10:49:56 AM) dholbach: maybe we have a debugging boot page?
(10:50:07 AM) dholbach: if so, it's linked from
(10:50:24 AM) james_w: and turn on debugging to get the messages that explain why it isn't working
(10:50:26 AM) james_w: (if any)
(10:50:54 AM) ***dholbach nods
(10:50:58 AM) dholbach: ok, next question
(10:51:00 AM) dholbach: <Jesi-Idle> Question: is a patch simply a documented change in code that you then apply or do you make a patch file that will run and edit another file, just wondering..
(10:51:04 AM) dholbach: Jesi-Idle: nice question
(10:51:13 AM) dholbach: we'll produce a bunch of patches later on
(10:51:49 AM) dholbach: generally it's a text file that contains well-structured instructions on how change file A to become file B
(10:52:03 AM) dholbach: james_w might be able to put it into cleverer words :)
(10:53:34 AM) james_w: I think that's a damn good description actually
(10:53:58 AM) dholbach: Jesi-Idle: generally "a documented change in code that you then apply" is what a patch is :)
(10:54:03 AM) dholbach: so all good :)
(10:54:06 AM) james_w: the "patch" command knows how to apply them, so we use that
(10:54:10 AM) james_w: you'll see later
(10:54:25 AM) dholbach: <openweek6_> QUESTION: bug fix, patch, develop,  What's the diff?
(10:54:43 AM) dholbach: openweek6_: I'd say they're all part of each other :)
(10:54:59 AM) dholbach: we'll concentrate on fixing bugs by creating patches in the second part of the session :)
(10:55:11 AM) dholbach: how about a 5 minute break before diving into Ubuntu bugs?
(10:55:35 AM) ***dholbach would get himself some new tea :)
(10:55:40 AM) james_w: good idea
(10:55:49 AM) dholbach: if you have questions, keep them coming and we'll back in a few :)

>> continued ...

MeetingLogs/openweekKarmic/IntroDeveloper (last edited 2009-11-05 19:34:54 by ausimage)