Open Week -- Ubuntu Development I -- Daniel Holbach -- Fri, May 7

EDT -5

(11:01:38 AM) dholbach: I have the pleasure of talking a bit about Ubuntu Development today. I hope you're excited as I am and have a good bunch of questions. :-)
(11:02:39 AM) dholbach: My name is Daniel Holbach, live in Berlin, work for Canonical and was always excited about our fantastic community and how I was welcomed into it and how everybody helped me get started working on my first packages. :)
(11:03:02 AM) dholbach: for those of you who haven't been to Ubuntu Open Week yet: please make sure you join #ubuntu-classroom-chat too
(11:03:06 AM) dholbach: and ask your questions in there
(11:03:14 AM) dholbach: please prefix them with QUESTION:
(11:03:24 AM) dholbach: ie: QUESTION: What is jcastro's cat called?
(11:03:32 AM) dholbach: Alright, let's get cracking :)
(11:04:01 AM) ClassBot: Kusa14 asked: If we use lernid it's automatic?
(11:04:27 AM) dholbach: yes, if you use (a great way to follow Ubuntu Open Week and other events in here), it's all automatic :)
(11:04:49 AM) dholbach: let's start with a few myths I try to clear up regularly :)
(11:05:18 AM) dholbach: first one and probably most popular one: "you need to be a hardcore hacker"
(11:05:45 AM) dholbach: regularly people who want to get involved with Ubuntu Development ask which programming languages they need to know to help
(11:06:11 AM) dholbach: and if 5 years of C, C++, Perl, Python, C#, PHP, etc. was enough
(11:07:22 AM) dholbach: my answer is: if you do know how to program in a language, that's great and it'll help you a lot and we have lots of bugs you can help to fix, but we also have a lot of bugs that you can help out fixing if you have these skills:
(11:07:31 AM) dholbach:  - some patience
(11:07:37 AM) dholbach:  - unafraid of a bit of documentaiton
(11:07:45 AM) dholbach:  - be a team player
(11:07:48 AM) dholbach:  - knack for making things work again
(11:08:05 AM) dholbach: so if you don't know 10 programming languages for 5 years yet, don't despair :)
(11:08:20 AM) dholbach: next popular myth: "you need to own a package"
(11:08:22 AM) dholbach: untrue
(11:08:47 AM) dholbach: nobody owns packages in Ubuntu, we maintain all packages as a big team
(11:09:17 AM) dholbach: there will always be people who have more experience with a specific piece of software than others and they will be something like "de-facto maintainers"
(11:09:29 AM) dholbach: but they don't have a gigantic lock on the package and will stop you from contributing to it
(11:09:47 AM) dholbach: so if you don't "have a package" or "maintain a package", that's totally fine
(11:10:12 AM) dholbach: we have a lot of people who are all-rounders and enjoy fixing heaps of bugs that simply occur to them
(11:11:10 AM) dholbach: also you don't need to "package something new" first thing, it's a lot better to start working on an existing package, improve it slowly - you'll find a lot more instant gratification this way :)
(11:11:29 AM) ClassBot: yltsrc asked: some people complain that maintainers don't accept changes or working on the same bug, how we can improve this situation?
(11:11:48 AM) dholbach: yltsrc: good question - we have the sponsorship process which I'll take some time to explain in a bit
(11:12:10 AM) dholbach: yltsrc: basically the answer is: we have a "separate queue" where patches, branches, etc. go that is reviewed regularly by everybody
(11:12:22 AM) dholbach: I guess it could always be quicker, but it's working quite OK at the moment
(11:12:29 AM) dholbach: as I said - I'll definitely get back to it
(11:12:43 AM) dholbach: another myth I'd like to clear up is "you need a mentor"
(11:13:06 AM) dholbach: some new contributors are frantically looking for a mentor and think that they can't get started without one
(11:13:09 AM) dholbach: that's not true
(11:13:49 AM) dholbach: while there's some developers that have close bonds to new contributors and who mentor them, it's not as if the mentor allows you to do something which you otherwise couldn't do :)
(11:14:11 AM) Luuk58 is now known as Luuk
(11:14:13 AM) dholbach: you'll find a lot of very helpful people along the way who have been in a similar situation as you've been, and they'll be glad to help out
(11:14:30 AM) dholbach: it needs a bit of courage in the beginning, but it's totally worth it and I promise you a fun ride :)
(11:15:01 AM) dholbach: alright... that's the myths I heard recently - if you have any more questions or crazy stories you'd like to share about what you've heard is required, let me know in #ubuntu-classroom-chat :)
(11:15:21 AM) dholbach: there are a couple of requirements we do have though
(11:15:54 AM) dholbach: so the bad news is: you need to run the current development release (maverick now)
(11:16:10 AM) dholbach: the good news is: there is sane ways to do it, so you don't end up in break-o-rama
(11:16:18 AM) dholbach: explains how
(11:16:59 AM) dholbach: this page explains how you can use a virtual machine for example
(11:17:12 AM) dholbach: or how to set up a chroot, or ubuntu in a separate partition or something else
(11:17:34 AM) dholbach: it's important that if you work on the current development release, that you can test-build and test the packages you are working on
(11:17:38 AM) dholbach: there's no replacement for testing
(11:18:02 AM) dholbach: I said before that you can always get help easily
(11:18:14 AM) dholbach: is the only page you need to bookmark :)
(11:18:32 AM) dholbach: it links to all the pieces of documentation that make a good night-time read and explain what're doing over here
(11:18:59 AM) dholbach: #ubuntu-packaging and #ubuntu-motu on are full of incredibly helpful people who want to see you get involved and succeed in what you want to do
(11:19:15 AM) dholbach: so make sure you hang out there and ask your questions :)
(11:19:22 AM) dholbach: you'll also make a lot of friend there easily
(11:19:48 AM) dholbach: there's also the mailing list where you can ask questions "offline"
(11:20:22 AM) dholbach: any questions up until now?
(11:21:10 AM) dholbach: either everybody's sleeping or I didn't confuse everybody... yet
(11:21:14 AM) dholbach: hopefully the latter
(11:21:31 AM) dholbach: alright - let's get started setting up a development environment
(11:22:01 AM) dholbach: if you don't have a maverick vm or installation around, that's totally fine now - you can just repeat the steps in the vm later on
(11:22:27 AM) dholbach: first of all, we need to tell apt that we want to have access to source packages every now and then
(11:22:32 AM) dholbach: for that please do this:
(11:22:33 AM) dholbach:   System → Administration → Software Sources → Ubuntu Software → Enable "Sources"
(11:23:11 AM) dholbach: you can also edit  /etc/apt/sources.list  and add  deb-src  entries (mimicking the  deb  entries you have there)
(11:23:32 AM) dholbach: if you do it manually, make sure you run   sudo apt-get update   later on
(11:24:09 AM) dholbach: once you're done with that, please install a few packages we're going to need during this session
(11:24:13 AM) dholbach:    sudo apt-get install --no-install-recommends ubuntu-dev-tools build-essential pbuilder gnupg debhelper
(11:24:34 AM) dholbach: (if I go too quick or don't make sense or "it doesn't work", please let me know)
(11:24:43 AM) dholbach: ok... what are we installing right now?
(11:25:20 AM) dholbach:  - ubuntu-dev-tools: very useful set of scripts that help with ubuntu development (also this pulls in stuff like devscripts), these packages will be your bread-and-butter
(11:25:55 AM) dholbach:  - build-essential: will pull in the essential tools to build software in general (it will pull in the compiler and all kinds of other stuff)
(11:26:30 AM) dholbach:  - pbuilder: build tool that automatically sets up a minimal environment in which packages are compiled in a clean and sane manner
(11:26:44 AM) dholbach:  - gnupg: used to sign/encrypt messages and files
(11:27:28 AM) dholbach:  - debhelper: set of tools that automate common tasks during the build (like process manpages, compress files, etc.) of the package
(11:28:02 AM) dholbach: ok, with that done, let's set up a gpg key
(11:28:26 AM) dholbach: if you already have one set up, you can skip this step, lay back, relax and get another cup of tea :)
(11:28:36 AM) dholbach: please run
(11:28:37 AM) dholbach:   gpg --gen-key
(11:28:58 AM) dholbach: it will ask you a bunch of questions, and it's safe to go with the defaults
(11:29:10 AM) dholbach: (just hit enteR)
(11:29:21 AM) dholbach: what it needs is your name and at least one email address
(11:29:36 AM) dholbach: (the comment is not necessary)
(11:30:10 AM) ClassBot: optix asked: my gpg key is 12 years old at 1024 bit encryption -- is that still good?
(11:32:16 AM) dholbach: optix: I personally would keep it, but I'm sure there's others who disagree :)
(11:32:37 AM) dholbach: optix: I once saw a "gpg key transition" document somewhere, but I can't find it right now
(11:33:02 AM) dholbach: at least for us there is no strict requirement to have XYZ bit key
(11:33:39 AM) dholbach: has lots more information about how to set it up, get your mail program to make use of it, etc etc
(11:34:00 AM) dholbach: you will (at some stage) need it to upload packages
(11:34:18 AM) dholbach: Launchpad only accepts uploaded source packages if it can tell who uploaded them
(11:34:44 AM) dholbach: for that you will sign source packages with your gpg key (it happens semi-automatically with the tools we installed above)
(11:35:33 AM) dholbach: once you're done with the questions of gpg, it will sit there and do some computation and probably say that it will need more random numbers, so we'll leave it alone for now and give the machine something else to do :)
(11:35:42 AM) dholbach: please start another terminal - we'll set up pbuilder now
(11:35:58 AM) dholbach: please edit ~/.pbuilderrc
(11:36:13 AM) dholbach: (if the file does not exist, please create it)
(11:36:23 AM) dholbach: and add the following line to it
(11:36:25 AM) dholbach: COMPONENTS="main universe multiverse restricted"
(11:36:28 AM) dholbach: then save the file
(11:36:56 AM) dholbach: this will tell pbuilder that it can use packages from all components to satisfy build-time dependencies
(11:37:09 AM) dholbach: now please run
(11:37:10 AM) dholbach:   sudo pbuilder create
(11:37:28 AM) dholbach: and it will sit there and work a bit longer to get set up
(11:38:09 AM) dholbach: so while both tools are doing there job... what are we doing here?!?!?! how do those tools all work together?
(11:38:32 AM) dholbach: some of you might have downloaded software in source form before
(11:38:56 AM) dholbach: you usually run something like   ./configure --something; make; sudo make install   or   python ./ build   or something else
(11:39:17 AM) dholbach: this is exactly what happens when Debian/Ubuntu packages are built
(11:39:57 AM) dholbach: we just wrap another layer of build system and description to it, so it forms the goodness we know as .deb packages
(11:41:39 AM) dholbach: so you'd download a source package (which is software in source form with the added layer of debian/ubuntu packaging goodness), make changes to it, sign it, test-build it in pbuilder (pbuilder will pull in build-depencies in the chrooted, clean, minimal environment) and you get a .deb package you can test-install and test, before you upload the new source package to Launchpad
(11:41:57 AM) dholbach: that's the overview over what we're doing here :)
(11:42:57 AM) dholbach: now, let's configure some other tools and we should be ready to go
(11:43:00 AM) dholbach: please edit ~/.bashrc
(11:43:12 AM) dholbach: and add something like this to the bottom of it
(11:43:13 AM) dholbach:    export DEBFULLNAME='Daniel Holbach'
(11:43:13 AM) dholbach:    export DEBEMAIL=''
(11:43:23 AM) dholbach: please use YOUR NAME and YOUR EMAIL ADDRESS :)
(11:43:31 AM) dholbach: and please use the email address you gave gpg too
(11:44:00 AM) dholbach: if you don't use bash, but another shall, make sure you edit the right file (zsh → ~/.zshrc I believe)
(11:44:02 AM) dholbach: etc.
(11:44:07 AM) dholbach: when you saved the file, please run
(11:44:12 AM) dholbach:   source ~/.bashrc
(11:45:19 AM) jcastro_ is now known as jcastro
(11:45:31 AM) dholbach: ok... with that done the tools should know who we are and add our name and email to changelog entries automatically, etc
(11:45:40 AM) dholbach: which makes development a bit more straight-forward :-)
(11:46:26 AM) dholbach: ok, if gpg is done for you, it's a good time to find out what your key id is, you're going to need it every now and then
(11:46:42 AM) dholbach:   gpg --fingerprint <your email address>
(11:46:46 AM) dholbach: should give you that information
(11:47:00 AM) dholbach: the output for me is something like this:
(11:47:04 AM) dholbach: pub   1024D/059DD5EB 2007-09-29
(11:47:04 AM) dholbach:       Key fingerprint = 3E5C 0B3C ......
(11:47:13 AM) dholbach: "059DD5EB" is my key id
(11:47:56 AM) dholbach: now you can tell gpg to send your public key to key servers who will exchange it among themselves
(11:48:11 AM) dholbach:   gpg --send-keys <key id>
(11:48:18 AM) dholbach: ^ please run this command
(11:48:34 AM) dholbach: your "gpg key" is split up in a public and a private part
(11:49:06 AM) dholbach: it's only the public part that is sent to the keyservers and it's what others can use to identify that messages are really signed by you and nobody else, that the messages are intact, etc.
(11:49:23 AM) dholbach: please also make sure that Launchpad learns about your key too
(11:49:24 AM) dholbach:
(11:50:19 AM) dholbach: as I said before: once Launchpad knows about you and your GPG key, it can attribute uploaded source packages to you, but you can also drive the Launchpad Bugs interface by sending signed mails
(11:50:38 AM) dholbach: a quick note on uploading packages
(11:50:51 AM) dholbach: (and with that I get to Sponsoring as I promised earlier :-))
(11:51:21 AM) dholbach: ClassBot: 70 minutes, but I guess we can take a break at some stage. :-)
(11:51:36 AM) dholbach: if you now would take any source package, modify it and upload it to Launchpad, it wouldn't get into Ubuntu just like that
(11:51:58 AM) dholbach: you could set up a PPA (a Personal Package Archive) though, where you could host test packages you could share with others
(11:52:03 AM) dholbach: for that you'll need the gpg key too
(11:52:12 AM) dholbach: (more info on PPAs:
(11:52:16 AM) dholbach: now sponsoring:
(11:52:30 AM) dholbach: if you have a change you desperately want to get into Ubuntu here's how to get it there:
(11:52:51 AM) dholbach:  - attach the patch (or link to the new source package you built) to a bug report
(11:52:59 AM) dholbach:  - subscribe the 'ubuntu-sponsors' team to the bug report
(11:53:00 AM) dholbach: done
(11:53:27 AM) ClassBot: bencrisford asked: If I already have a GPG key, is it easy to set up so I can use it on another machine also?
(11:53:56 AM) dholbach: bencrisford: yes, you can basically just copy ~/.gnupg over
(11:54:04 AM) ClassBot: effie_jayx asked: I have an old version of my key with only one email address, I have added my address to it. Should I upload the new version of my key
(11:54:21 AM) dholbach: effie_jayx: yes, that way the world learns about your address :)
(11:54:57 AM) dholbach: sponsoring is the way to get fixes in... and the great thing about it is that you get a lot of different people reviewing your stuff
(11:55:09 AM) dholbach: that way you learn from a variety of people
(11:55:36 AM) dholbach: and your get to know a bunch of different developers, who can later on testify about your great work when you apply for upload privileges
(11:56:11 AM) dholbach: with that I think we know what the big scheme looks like
(11:56:18 AM) dholbach: let's take a 5 minute break
(11:56:39 AM) dholbach: then we'll take a look at a source package together :)
(11:56:52 AM) dholbach: I'll go and make some tea - see you in a bit

MeetingLogs/openweekLucid/Development1 (last edited 2010-05-07 17:48:51 by pool-71-123-16-225)