Dev Week -- Getting Started with UbuntuDevelopment -- dholbach -- Mon, Jul 12th, 2010

(11:59:49 AM) dholbach: WELCOME TO UBUNTU DEVELOPER WEEK!
(11:59:54 AM) gnuovo: Buongiorno. Hello! Where is ubuntu-classroom-it ?
(12:00:05 PM) dholbach: gnuovo: just join the channel
(12:00:12 PM) dholbach: Ok, first things first:
(12:00:15 PM) gnuovo: i can't find it
(12:00:18 PM) dholbach: please all join #ubuntu-classroom-chat
(12:00:23 PM) dholbach: and please just speak in there
(12:00:30 PM) dholbach: this room is for session discussion only
(12:01:00 PM) dholbach: if you have questions, please ask them in #ubuntu-classroom-chat or any of the language-specific chat rooms listed at https://wiki.ubuntu.com/UbuntuDeveloperWeek
(12:01:19 PM) dholbach: we have lots of helpers here and other interested folks who are very happy to help you out when you run into trouble
(12:01:37 PM) dholbach: if you ask a question about anything specific to the session, please write something like this in the channel:
(12:01:51 PM) dholbach: QUESTION: What is Daniel's dog called?
(12:02:06 PM) dholbach: don't forget the "QUESTION:" so it stands out and is easier to see :)
(12:02:19 PM) dholbach: alright, with the organisational bits sorted out, let the fun begin :-D
(12:02:37 PM) sarhan left the room (quit: Quit: Quitte).
(12:02:54 PM) dholbach: My name is Daniel Holbach, I'm an Ubuntu Developer, have been hanging around here since 2004 and work for Canonical for a few years now
(12:03:13 PM) dholbach: I love the Ubuntu Developer community, so if you join at some stage, you'll make me very very happy
(12:03:27 PM) dholbach: everything of importance is on https://wiki.ubuntu.com/UbuntuDeveloperWeek
(12:03:47 PM) dholbach: that includes session details, the timetable, how to join in, a glossary and lots of other stuff
(12:04:06 PM) dholbach: I hope you'll have as great a time as I do, so let's kick this week of with "Getting Started with Ubuntu Development"
(12:04:35 PM) dholbach: in the first part of the session I'd like to practically help you get a couple of tools installed and an environment set up in which you can work on your first few bugs, etc :)
(12:04:46 PM) dholbach: in the second part we'll actively have a look at a few bugs and fix them together
(12:04:57 PM) sarhan [~sarhan@unaffiliated/sarhan] entered the room.
(12:05:01 PM) dholbach: in those sessions I'd love to resolve as many questions as possible
(12:05:15 PM) dholbach: so if I don't make sense, my instructions don't work, or I missed something, please let me know
(12:05:25 PM) dholbach: and please: if you like the event: tell your friends and blog about it
(12:05:28 PM) dholbach: alright
(12:05:31 PM) dholbach: let's get started :)
(12:05:32 PM) draco is now known as Guest71922
(12:05:56 PM) dholbach: first of all: please do me a favour and bookmark https://wiki.ubuntu.com/MOTU/GettingStarted because it links to all the important pages you'll need in your life
(12:06:10 PM) dholbach: one of them I'd like to highlight first: https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases
(12:06:21 PM) dholbach: if you work on Ubuntu, it's important that you run the latest development release
(12:06:44 PM) dholbach: you don't need to run it as your main system, but in a virtual machine, or a spare partition or a spare computer, that's cool
(12:06:45 PM) dholbach: why?
(12:07:07 PM) dholbach: simple: because this way you'll refer to all the current development libraries, modules and stuff and you can test packages better
(12:07:28 PM) dholbach: also do we want to fix all of our bugs first in the development release, then in other releases (if at all applicable, but more on that later)
(12:07:45 PM) dholbach: so if you don't have a virtual machine or chroot or anything set up, that's fine for now, but please do it later on
(12:07:54 PM) dholbach: the link I mentioned above has good instructions on this
(12:08:14 PM) dholbach: ok, so first of all please enable "Source code" and "universe" in System → Software Sources → Ubuntu Software
(12:08:43 PM) dholbach: (if you already have, you're fine :-))
(12:08:51 PM) dholbach: <tillux> QUESTION: wouldn't it make sense to do that now? because you need to download a lot of things/packages etc
(12:08:57 PM) dholbach: tillux: no, it'd take too much time
(12:09:09 PM) dholbach: tillux: and it's fine - you can just copy the instructions later on
(12:09:23 PM) dholbach: <umutuygar> QUESTION: What programming language r u going to be using?
(12:09:52 PM) dholbach: umutuygar: we'll see :-) I think for now I'll stick to packaging basics where we fix a couple of bugs
(12:10:02 PM) dholbach: <BeardyGnome13> QUESTION: will this be GNOME-centric?
(12:10:06 PM) dholbach: BeardyGnome13: no, not at all
(12:10:14 PM) dholbach: alright, next please
(12:10:24 PM) dholbach: sudo apt-get install --no-install-recommends bzr-builddeb ubuntu-dev-tools fakeroot build-essential gnupg pbuilder debhelper
(12:10:38 PM) dholbach: this will give you a bunch of tools that are going to be useful generally, not just in these examples
(12:10:58 PM) dholbach: somethinginteres: bzr-builddeb pulls in bzr which we'll use to get the source code for one or two examples
(12:11:22 PM) dholbach: ubuntu-dev-tools pulls in devscripts which both are incredibly helpful at making repetitive packaging tasks easy
(12:11:50 PM) dholbach: fakeroot is needed by debuild (in devscripts) to mimic root privileges when installing files into a package
(12:12:05 PM) dholbach: build-essential pulls in lots of useful very basic build tools like gcc, make, etc
(12:12:20 PM) dholbach: gnupg is used to sign files in our case (uploads in the future)
(12:12:37 PM) dholbach: pbuilder is a build tool that builds source in a sane, clean and minimal environment it sets up itself
(12:12:51 PM) dholbach: debhelper contains scripts that automate lots of the build process in a package
(12:13:24 PM) dholbach: let's first set up our gpg key
(12:13:36 PM) dholbach: as I said above we use it to sign files for upload
(12:13:55 PM) dholbach: but more generally it is used to sign and encrypt mails, files or text generally
(12:14:09 PM) dholbach: we use it to indicate that WE were the last to touch a file and not somebody else
(12:14:18 PM) dholbach: that ensures that only people who we know about get to upload packages
(12:14:27 PM) dholbach: please run
(12:14:29 PM) dholbach:   gpg --gen-key
(12:14:36 PM) dholbach: (if you have no gpg key yet)
(12:14:52 PM) dholbach: sticking to the defaults is totally fine, for example don't you need a comment
(12:15:05 PM) dholbach: if you need more info on gpg keys, head to https://help.ubuntu.com/community/GnuPrivacyGuardHowto which talks about everything in more detail
(12:15:27 PM) dholbach: enter your name, email address and just stick to the default values for now
(12:15:46 PM) dholbach: it could be that gpg is still sitting there and waiting for more random data to generate your key - that's expected and fine
(12:15:55 PM) dholbach: just open another terminal while we carry on, it'll finish on its own
(12:16:09 PM) dholbach: as I said: if you have a gpg key already, skip this step
(12:16:37 PM) dholbach: in the meantime we'll set up pbuilder
(12:17:13 PM) dholbach: please open an editor and edit the file ~/.pbuilderrc (create if you don't have it yet)
(12:17:35 PM) dholbach: please add the following content to the file
(12:17:37 PM) dholbach: COMPONENTS="main universe multiverse restricted"
(12:17:38 PM) dholbach: and save it
(12:17:47 PM) dholbach: once you're done, please run
(12:17:51 PM) dholbach:   sudo pbuilder create
(12:18:02 PM) dholbach: this will also take some time, so let's chat a bit about pbuilder
(12:18:04 PM) dholbach: what does it do?
(12:18:15 PM) dholbach: it builds packages in a clean and minimal environment
(12:18:39 PM) dholbach: it keeps your system "clean" (so you don't install millions of build dependencies on your own system)
(12:18:52 PM) dholbach: it makes sure the package builds in a minimal, unmodified environment
(12:19:15 PM) dholbach: so you ensure that the package does not just build because you made lots of changes on your system, but the build is reproducable
(12:19:30 PM) dholbach: you can update package lists (later on) with: sudo pbuilder update
(12:19:51 PM) dholbach: and to build packages you run: sudo pbuilder build package_version.dsc
(12:20:07 PM) dholbach: <BeardyGnome13> QUESTION: will the transcript of the classroom be available later?
(12:20:13 PM) dholbach: <leak-BebeChooCho> QUESTION: Will there be full log available?
(12:20:14 PM) dholbach: yes
(12:20:22 PM) dholbach: it will be linked from https://wiki.ubuntu.com/UbuntuDeveloperWeek
(12:20:30 PM) dholbach: for the impatient: http://irclogs.ubuntu.com
(12:21:33 PM) dholbach: ok, so how pbuilder works is like this: it first gets the minimal packages for a base system, stores them in a tarball, whenever you build a package it'll untar the base tarball, then install whatever your current build requires, then build it, then tear it all down again
(12:21:37 PM) dholbach: luckily it caches the packages :)
(12:21:47 PM) dholbach: <somethinginteres> QUESTION: To confirm, the install of pbuilder etc should be done -right now- on our main box?
(12:22:06 PM) dholbach: somethinginteres: it helps as you can perform the examples on your own machine and have it set up later on too
(12:22:41 PM) dholbach: ok, what's next while gpg and pbuilder are doing their thing
(12:22:50 PM) dholbach: we tell some other tools who we are
(12:23:08 PM) dholbach: if you use the bash shell, which is the default, please edit ~/.bashrc
(12:23:15 PM) dholbach: and at the end of it, please add something like
(12:23:25 PM) dholbach: DEBFULLNAME="Daniel Holbach"
(12:23:26 PM) dholbach: DEBEMAIL="daniel.holbach@ubuntu.com"
(12:23:30 PM) dholbach: and save it
(12:23:37 PM) dholbach: PLEASE USE YOUR OWN NAME, THANKS :-)
(12:23:53 PM) dholbach: <abhi_nav> QUESTION: I am doing everything in my main day to day usable machine. is it ok? I dont want anything to ruine my cute ubuntu. :)
(12:24:01 PM) dholbach: abhi_nav: yes, it'll be fine
(12:24:27 PM) dholbach: once you're done editing ~/.bashrc, please run   source ~/. bashrc  (it's only needed once)
(12:24:36 PM) dholbach: <tpw_rules87> QUESTION: Should these match the values we put into GPG?
(12:24:40 PM) dholbach: tpw_rules87: yes
(12:25:12 PM) dholbach: ok, with this out of the way, the packaging tools will know you by your name and you don't need to enter it, for example if you do changelog entries, etc.
(12:25:32 PM) dholbach: are there any more questions up until now?
(12:26:28 PM) dholbach: <augdawg> QUESTION: where is the .bashrc file located?
(12:26:35 PM) dholbach: augdawg:  ~/.bashrc
(12:26:45 PM) dholbach: so /home/<your user name>/.bashrc
(12:26:58 PM) dholbach: <abhi_nav> QUESTION do i need to write my that email which i was used to create gpgp key some months ago? now I have another email
(12:27:03 PM) Ara is now known as Guest81953
(12:27:12 PM) dholbach: abhi_nav: yes, it helps to have the same in there, but you can also add another user id to your gpg key later on
(12:27:22 PM) dholbach: refer to https://help.ubuntu.com/community/GnuPrivacyGuardHowto for that
(12:27:29 PM) dholbach: <malcolmci> QUESTION: is the preferred arch for dev'ing AMD64 or i386 ?
(12:27:42 PM) dholbach: malcolmci: every supported architecture of ubuntu will work fine
(12:27:53 PM) dholbach: <devildante> QUESTION: Will this session revolve around packaging bugs, or bugs in general?
(12:28:07 PM) dholbach: devildante: I picked a few packaging bugs, but maybe we'll do something else later on, let's see :)
(12:28:14 PM) dholbach: <augdawg> QUESTION: what does the ~ mean?
(12:28:23 PM) dholbach: my user name is "daniel"
(12:28:31 PM) dholbach: so ~ for me will be expanded to /home/daniel
(12:28:38 PM) dholbach: <tillux> QUESTION: for those running on lucid: should pbuilder have been triggered with "--distribution maverick" ?
(12:28:55 PM) dholbach: tillux: for now that's fine - if you set up a maverick chroot/virtual-machine/partition/machine later on, you can just repeat the steps
(12:29:00 PM) dholbach: for this sessions it's irrelevant
(12:29:05 PM) dholbach: <BeardyGnome13> QUESTION: is my gpg key machine-specific?
(12:29:10 PM) dholbach: BeardyGnome13: no, you can just copy it to another machine
(12:29:17 PM) dholbach: <somethinginteres> QUESTION: PBuilder is downloading for Lucid, should it be downloading for Mavrick or Lucid?
(12:29:23 PM) dholbach: somethinginteres: see what I just said to tillux above
(12:29:31 PM) dholbach: <theneoindian> QUESTION: i hate to ask , but will pbuilder create eat up my b/w .. i'm on a limited b/w connection ...
(12:29:41 PM) dholbach: theneoindian: you better stop it then and repeat later on on a different connection
(12:29:54 PM) dholbach: alright
(12:30:00 PM) dholbach: thanks for the great questions
(12:30:36 PM) dholbach: I don't know how quick your pbuilders and gpgs are, so I'll keep talking a bit about ubuntu development and how it all works, we'll make some good use of pbuilder and your shiny new gpg key later on :)
(12:31:21 PM) dholbach: first things first: ubuntu is very special in how it's produced and how we all work
(12:31:26 PM) dholbach: as you know it comes out every 6 months
(12:31:39 PM) dholbach: that means we have a tight release schedule and everything we do and work on is defined by that schedule
(12:31:57 PM) dholbach: check out https://wiki.ubuntu.com/MaverickReleaseSchedule for the current release schedule for maverick
(12:32:43 PM) dholbach: the quick version: green means: lots is allowed here, red means: almost nothing is allowed here :)
(12:32:58 PM) dholbach: long version:
(12:33:22 PM) dholbach:  - toolchain is uploaded for the new release (gcc, binutils, libc, etc.), so the most basic build tools are there
(12:33:37 PM) dholbach:  - new changes that happened in the meantime are synced or merged (more on that later on)
(12:33:47 PM) dholbach:  - ubuntu developer summit (uds) happens where features are defined and talked about
(12:34:01 PM) dholbach:  - up until debian import freeze we import source changes from debian semi-automatically
(12:34:13 PM) dholbach:  - up until feature freeze we get new stuff in, work on features, try to make it all work
(12:34:42 PM) dholbach:  - if a feature is not half-way there yet by feature freeze, it will likely get deferred to the next release
(12:35:07 PM) dholbach:  - from feature freeze on you can see that lots of freezes are added throughout the weeks and you'll need more and more freeze exceptions for big changes
(12:35:17 PM) dholbach: the focus is clearly: testing, testing, testing and fixing, fixing, fixing
(12:35:32 PM) dholbach: the more obvious fixes are (a huge 20 million line patch is not obvious) :)
(12:35:39 PM) dholbach: the more obvious the better
(12:36:17 PM) dholbach: the same goes for fixes that are introduced AFTER the release
(12:36:41 PM) dholbach: we just want to fix stuff in ...-updates if it's REALLY URGENT stuff with really simple fixes
(12:37:10 PM) dholbach: so as you can imagine, this means: introduce big changes early in the release cycle, so we can shake out problems over a longer time
(12:37:21 PM) dholbach: <devildante> dholbach: On the release schedule, I see a column named "Work Item Iteration"
(12:37:39 PM) dholbach: ah yes
(12:38:20 PM) dholbach: if you check out http://people.canonical.com/~pitti/workitems/maverick/all-ubuntu-10.10.html you will see a graph and loads of text
(12:38:32 PM) dholbach: this is a list of work items defined by specifications written at the ubuntu developer summit
(12:38:56 PM) dholbach: work items are specific pieces of work that somebody at UDS decided to work on during the cycle
(12:39:08 PM) dholbach: it's more a tool for the managers at Canonical to keep their people busy
(12:39:14 PM) dholbach: I mean… make sure we're on track ;-)
(12:39:25 PM) dholbach: <marceau> QUESTION: (I've asked this during the Userday as well but am wondering as to your input) Do you feel that the fast release cycle of Ubuntu might be hindering it's progress? It seems a lot of time is spent in freezing and testing rather than working out new features.
(12:39:43 PM) dholbach: marceau: not at all - I think it's a good thing - it forces us to stay focused and make sure that stuff gets done
(12:39:57 PM) dholbach: marceau: if we don't get a feature done this cycle, it'll be next cycle
(12:40:14 PM) dholbach: also it's important for everybody else who works with the project, as it's very easily predictable
(12:40:28 PM) dholbach: alright, enough cycle discussions :)
(12:40:53 PM) dholbach: another thing I'm keen to talk about is: how to get stuff in
(12:41:12 PM) dholbach: when I spoke about gpg you noticed that I said that only people who "we know" get to upload packages directly
(12:41:35 PM) dholbach: this means that as a new contributor you will have to work with sponsors who basically review your work and upload it for you
(12:42:11 PM) dholbach: once you did that a couple of times and they recognise you and your good work, you can apply for ubuntu developer membership
(12:42:21 PM) dholbach: and you can ask the people you've worked with for comments on your application
(12:42:55 PM) dholbach: it's really not very complicated, you basically set up a wiki page with your contributions, ask for comments and submit for an irc meeting of the developer membership board and you're done
(12:43:08 PM) dholbach: no need to learn a secret handshake, send me money or anything else
(12:43:13 PM) dholbach: it's contributions and good work that counts
(12:43:21 PM) dholbach: it helps if you're a team player :)
(12:43:37 PM) dholbach: <augdawg> QUESTION: what does an ubuntu developer membership get you?
(12:43:50 PM) dholbach: augdawg: https://wiki.ubuntu.com/UbuntuDevelopers will tell you :)
(12:43:59 PM) dholbach: the most obvious thing is that you can upload changes yourself
(12:44:05 PM) dholbach: <prayii> QUESTION: But will sending you money help the process? *wink*
(12:44:14 PM) dholbach: prayii: unfortunately I'm not on the Developer Membership Board :)
(12:44:22 PM) dholbach: <tech2077> QUESTION: so when your a member do you get the ability to fix bugs smewhat more indepedently, trying to word it right
(12:44:36 PM) dholbach: tech2077: it's a question of trust: once you demonstrated that you do good work, you can get upload rights
(12:44:40 PM) dholbach: tech2077: same goes for Ubuntu membership
(12:45:00 PM) dholbach: people get an @ubuntu.com email address when they can be recognised for their good work in Ubuntu
(12:45:07 PM) dholbach: <marceau> QUESTION: what is the expected knowledge level of people taking part in this week's sessions?
(12:45:29 PM) dholbach: marceau: I guess it will differ from session to session: in this session it's good enough to be curious and have played with a terminal before and have a knack for making things work again :)
(12:45:41 PM) dholbach: <somethinginteres> QUESTION: is it the case that being an Ubuntu dev means being a programming vet or are there plenty of opportunity for n00bs to learn and contribute something..?
(12:45:52 PM) dholbach: there are lots of opportunities to learn, which is why we're doing this whole thing :)
(12:46:00 PM) dholbach: <umang> QUESTION: If I'd like to contribute to both Ubuntu and Debian, which should I use?
(12:46:14 PM) dholbach: umang: you can contribute to Debian by using Ubuntu and collaborating with Debian developers
(12:46:22 PM) dholbach: umang: it totally depends on you what you use and what you work on
(12:46:26 PM) dholbach: alright
(12:46:30 PM) dholbach: let's take more questions later on again
(12:46:35 PM) dholbach: my fingers are hurting already
(12:46:38 PM) dholbach: just kidding
(12:46:56 PM) dholbach: I assume pbuilder is done setting up, if not, do this later on
(12:47:00 PM) dholbach: apt-get source hello
(12:47:10 PM) dholbach: (it will download the source of the hello package)
(12:47:19 PM) dholbach: now please run
(12:47:24 PM) dholbach: sudo pbuilder build hello_*.dsc
(12:47:37 PM) dholbach: this will kick off the build in the form I explained earlier
(12:47:56 PM) dholbach: <abhi_nav> QUESTION: what .dsc stands for?
(12:48:01 PM) dholbach: abhi_nav: great question
(12:48:11 PM) dholbach: what "apt-get source" downloads is:
(12:48:48 PM) dholbach: (in most cases) an .orig.tar.gz file, which contains the source code of the software in a tarball released by the software authors
(12:49:05 PM) dholbach: in some cases a .diff.gz file with changes that were applied to make the package build in the Ubuntu/Debian way
(12:49:19 PM) dholbach: and a .dsc file with metadata like checksums and the like
(12:49:23 PM) dholbach: it's really not that important right now
(12:49:41 PM) dholbach: once the build is done, you can check out the contents of /var/cache/pbuilder/result
(12:49:52 PM) dholbach: it will contain the built hello .deb file :)
(12:50:39 PM) dholbach: ok, let's deal with gpg (for those that have not set it up yet)
(12:50:46 PM) dholbach: if you run
(12:50:46 PM) dholbach:   gpg --fingerprint your.name@email.com
(12:50:55 PM) dholbach: it will print out something like:
(12:50:56 PM) dholbach: pub   1024D/059DD5EB 2007-09-29
(12:50:56 PM) dholbach:       Key fingerprint = 3E5C 0B3C 8987 79B9 A504  D7A5 463A E59D 059D D5EB
(12:50:56 PM) dholbach: uid                  Daniel Holbach <dh@mailempfang.de>
(12:50:56 PM) dholbach: ...
(12:51:15 PM) dholbach: in the example above, my KEY ID is 059DD5EB
(12:51:23 PM) dholbach: please run
(12:51:28 PM) dholbach:   gpg --send-keys <KEY ID>
(12:51:57 PM) dholbach: it will upload your _public_ portion of the key to keyservers which will sync the key among them
(12:52:39 PM) dholbach: once that's done, you can tell Launchpad, which we use for all development about your shiny new gpg key
(12:52:39 PM) dholbach: https://launchpad.net/people/+me/+editpgpkeys
(12:52:47 PM) dholbach: (you need a Launchpad account for this)
(12:53:05 PM) dholbach: https://help.launchpad.net/YourAccount/ImportingYourPGPKey should help you if you run into any trouble
(12:53:45 PM) dholbach: <omid_> QUESTION: gpg: no keyserver known (use option --keyserver)
(12:53:53 PM) dholbach: try:     gpg --keyserver keyserver.ubuntu.com --send-keys <KEY ID>
(12:54:47 PM) dholbach: alright, let's take a 5 minute break in which you can set up launchpad account and tell launchpad about your key, or get a cold beverage, or just relax for a bit
(12:55:00 PM) dholbach: in the next part of the session, we'll go and work on a few bugs together :)
---
(01:00:16 PM) dholbach: Alright, we're back for part 2!
(01:00:40 PM) dholbach: two things I'd like to get out again are:
(01:00:48 PM) dholbach:  - https://wiki.ubuntu.com/MOTU/GettingStarted (bookmark it, please)
(01:01:13 PM) dholbach:  - #ubuntu-motu and #ubuntu-packaging on irc.freenode.net are great channels with great people who can help you answer your questions - you'll find lots of friends there
(01:01:33 PM) dholbach: do we have any more questions about the session before or are we ready to roll and fix a few bugs?
(01:01:53 PM) dholbach: <augdawg> QUESTION: fingerprint authent. on lanchpad wont work
(01:01:59 PM) dholbach: please follow https://help.launchpad.net/YourAccount/ImportingYourPGPKey very closely
(01:02:04 PM) dholbach: and try again
(01:02:11 PM) dholbach: if it doesn't work, talk to the fine people in #launchpad
(01:02:14 PM) dholbach: they can sort you out
(01:02:21 PM) dholbach: <devildante> QUESTION: Will we fix real bugs?
(01:02:25 PM) dholbach: devildante: YES
(01:02:38 PM) dholbach: ready to go?
(01:03:12 PM) dholbach: ROCK ON, that's how we like it!
(01:03:24 PM) dholbach: ok, I'd like to introduce you to a very real sort of bugs, FBTFS bugs
(01:03:40 PM) dholbach: and with that a new acronym, FTBFS means Fails To Build From Source
(01:04:00 PM) dholbach: if a package doesn't build, it can be because all kinds of crazy things
(01:04:19 PM) dholbach: sometimes the source code is actually broken, sometimes it's because we lack the right version of some development library, etc etc etc
(01:04:46 PM) dholbach: it's something you'll probably struggle with a couple of times as an aspiring developer :)
(01:05:10 PM) dholbach: so let's head to http://qa.ubuntuwire.org/ftbfs/ - it shows a list of packages that FTBFS (yes it's used as a verb) right now
(01:05:31 PM) dholbach: let's first have a look at http://launchpadlibrarian.net/50406598/buildlog_ubuntu-maverick-i386.pykickstart_1.74-1_FAILEDTOBUILD.txt.gz
(01:05:43 PM) dholbach: it's the compressed log of the build on launchpad
(01:06:06 PM) dholbach: so what you just saw when you ran pbuilder, just on lots of machines in Launchpad :)
(01:06:32 PM) dholbach: first part is the installation of necessary packages, last part is the deinstallation of packages
(01:06:50 PM) dholbach: so close to the end of the log you'll find this
(01:06:50 PM) dholbach:    dh_usrlocal
(01:06:50 PM) dholbach: dh_usrlocal: debian/python-pykickstart/usr/local/bin/ksvalidator is not a directory
(01:06:50 PM) dholbach: dh_usrlocal: debian/python-pykickstart/usr/local/bin/ksflatten is not a directory
(01:06:50 PM) dholbach: dh_usrlocal: debian/python-pykickstart/usr/local/bin/ksverdiff is not a directory
(01:06:50 PM) dholbach: rmdir: failed to remove `debian/python-pykickstart/usr/local/bin': Directory not empty
(01:06:52 PM) dholbach: dh_usrlocal: rmdir debian/python-pykickstart/usr/local/bin returned exit code 1
(01:07:10 PM) dholbach: so something with files being installed in usr/local
(01:07:23 PM) dholbach: we, as packagers, don't do usr/local - it's against the rules :)
(01:07:53 PM) dholbach: usr/local is just for stuff the user installs manually
(01:08:11 PM) dholbach: you can find more about what goes where in the FHS (file hierarchy standard) and the debian policy document
(01:08:37 PM) dholbach: ok, remember how I said "be a team player" and "have a knack for making things work again" a couple of minutes before?
(01:08:50 PM) dholbach: it's important that when you work as a developer, you bear in mind the bigger picture
(01:09:48 PM) dholbach: "upstreams" are the software authors of packages included in ubuntu, they often release their "upstream source" on their own website, it often gets included in debian, where patches are added to make the packages build the debian (and ubuntu) way, and we often inherit the code just like that
(01:09:55 PM) dholbach: the more upstream and debian and ubuntu are in sync the better
(01:10:07 PM) dholbach: sometimes we make different decisions, but those should be for very good reasons
(01:10:25 PM) dholbach: because every deviation means additional work when merging changes later on again
(01:10:48 PM) dholbach: so, when I look at a bug like that I very often check "was it fixed in Debian or upstream already"?
(01:11:00 PM) dholbach: so the package is called pykickstart
(01:11:13 PM) dholbach: let's check out https://launchpad.net/ubuntu/+source/pykickstart
(01:11:29 PM) dholbach: as you can see, it was introduced in maverick and is at version 1.74-1 right now
(01:11:50 PM) dholbach: on the Debian side, we see similar information at http://packages.debian.org/src:pykickstart
(01:12:20 PM) dholbach: you can see that 'sid', the Debian development version, has 1.75-1 already
(01:12:27 PM) dholbach: click on the 'sid' link to get to http://packages.debian.org/source/sid/pykickstart
(01:12:43 PM) dholbach: on the right side it has a link to the debian changelog
(01:12:46 PM) dholbach: http://packages.debian.org/changelogs/pool/main/p/pykickstart/pykickstart_1.75-1/changelog
(01:13:02 PM) dholbach: so this is a regular debian/ubuntu changelog entry that states what in this package upload was changed
(01:13:18 PM) dholbach: as you can see, the maintainer wrote something about a new upstream version and
(01:13:20 PM) dholbach: "   * Update debian/rules: pass --buildsystem=python_distutils to avoid ftbfs."
(01:13:33 PM) dholbach: "avoid ftbfs" is like music to my ears - to yours too?
(01:13:52 PM) dholbach: I'd say we get the Debian source and try to build it and see if that works
(01:14:10 PM) dholbach: if you go back to http://packages.debian.org/source/sid/pykickstart - you'll see a link to a .dsc file
(01:14:21 PM) dholbach: http://ftp.de.debian.org/debian/pool/main/p/pykickstart/pykickstart_1.75-1.dsc
(01:14:40 PM) dholbach: when we installed the devscripts package earlier, we got a tool called dget
(01:14:47 PM) dholbach: we'll use that now to download the source from debian
(01:14:50 PM) dholbach: dget -xu http://ftp.de.debian.org/debian/pool/main/p/pykickstart/pykickstart_1.75-1.dsc
(01:15:24 PM) dholbach: to build it, you know already what to do:
(01:15:26 PM) dholbach:   sudo pbuilder build pykickstart_1.75-1.dsc
(01:15:48 PM) dholbach: this will take a little bit now, so let's all try to be patient and see how it works out ;-)
(01:15:51 PM) dholbach: questions up until now?
(01:16:22 PM) dholbach: <Noz3001> QUESTION: Why -"xu"?
(01:16:55 PM) dholbach: Noz3001: without -x dget will not unpack the source (you're right, we could have ignored that - usually it's very helpful to get the source unpacked immediately to dive right into it)
(01:17:37 PM) dholbach: Noz3001: without -u dget will complain about a missing gpg key, because it can't confirm the identity of the uploader (you probably won't have the debian maintainer's public key in your keyring)
(01:17:47 PM) dholbach: <umutuygar> QUESTION: umut@umut-laptop:~/code/ubuntu-classroom$ sudo pbuilder build pykickstart_1.75.dsc
(01:18:01 PM) dholbach: umutuygar: did you execute the dget command above in the same directory?
(01:18:10 PM) dholbach: <ElPasmo> QUESTION: How you get a sponsor?
(01:18:27 PM) dholbach: ElPasmo: we'll get to that in a bit, https://wiki.ubuntu.com/SponsorhipProcess if you're impatient :)
(01:18:33 PM) dholbach: <chilicuil> QUESTION: can I run 2 or more pbuilder instances at the same time?
(01:18:46 PM) dholbach: chilicuil: yes, you can use pbuilder-dist (in the ubuntu-dev-tools package) for that
(01:18:55 PM) dholbach: chilicuil: also there's https://wiki.ubuntu.com/PbuilderHowto
(01:19:07 PM) dholbach: <penguin42> QUESTION: We're past the point of pulling in debian packages for Maverick aren't we? But if a package ftbfs and the debian one fixes it what happens?
(01:19:14 PM) dholbach: penguin42: I'll get to that in a sec
(01:19:19 PM) dholbach: <Krysis> QUESTION: how to add gpg into keyring?
(01:19:47 PM) dholbach: Krysis: gpg --recv-keys <KEY ID>
(01:20:02 PM) dholbach: <umang> QUESTION: What's the easiest way to find a nice diff of the two source packages (1.74-1 from ubuntu and 1.75-1 from debian)?
(01:20:04 PM) dholbach: nice question
(01:20:21 PM) dholbach: you'd   apt-get source pykickstart   to get the ubuntu version too
(01:20:23 PM) dholbach: then run
(01:20:48 PM) dholbach: debdiff pykickstart_1.74-1.dsc pykickstart_1.75-1.dsc
(01:21:01 PM) dholbach: (probably pipe it through less, filterdiff, etc afterwards)
(01:21:29 PM) dholbach: rww just corrected me, the link earlier should have been https://wiki.ubuntu.com/SponsorshipProcess
(01:21:55 PM) dholbach: alright, pykickstart 1.75-1 from Debian succeeded to build on my end
(01:22:16 PM) dholbach: so what do we do
(01:22:39 PM) dholbach: let me explain a bit how Ubuntu and Debian fit in to the big picture of the release schedule I described earlier
(01:23:39 PM) dholbach: up until Debian Import Freeze, we automatically sync source packages from Debian and build them in Launchpad, if:
(01:24:17 PM) dholbach:  1. the package in Ubuntu is not modified (usually obvious by reading the version number, 1.74-1 vs. 1.74-1ubuntu1)
(01:24:31 PM) dholbach:  2. if the package is in Debian main (so free software)
(01:25:45 PM) dholbach: so how do we live in this world?
(01:26:08 PM) dholbach: if we introduce a change in Ubuntu, say we go from 1.74-1 to 1.74-1ubuntu1
(01:26:34 PM) dholbach: then Debian introduces 1.75-1
(01:26:35 PM) dholbach: we need to decide if we can overwrite our changes (we sync the source)
(01:26:46 PM) dholbach: or if we need to merge the source manually
(01:27:01 PM) dholbach: it's very tempting to say "ha, no we can sync from Debian"
(01:27:13 PM) dholbach: but it's INCREDIBLY IMPORTANT to READ THE DIFF
(01:27:20 PM) dholbach: just reading the changelog is not good enough
(01:27:23 PM) dholbach: READ THE DIFF
(01:27:24 PM) dholbach: and TEST
(01:27:37 PM) dholbach:  _____ _____ ____ _____ _
(01:27:37 PM) dholbach: |_   _| ____/ ___|_   _| |
(01:27:37 PM) dholbach:   | | |  _| \___ \ | | | |
(01:27:37 PM) dholbach:   | | | |___ ___) || | |_|
(01:27:37 PM) dholbach:   |_| |_____|____/ |_| (_)
(01:27:37 PM) dholbach:                           
(01:27:39 PM) dholbach: :-)
(01:28:43 PM) dholbach: <malcolmci> dholbach: who decides if we should sync with upstream debian or keep ubuntu modification, for example ?
(01:28:53 PM) dholbach: malcolmci: that's the best possible question
(01:29:15 PM) dholbach: that's the responsibility you have as a developer
(01:29:35 PM) dholbach: you need to make sure in the best way possible that the actual change can be implemented in the way you suggested
(01:29:48 PM) dholbach: if you're unsure, you can ask lots of other fine people in #ubuntu-devel or #ubuntu-motu or #ubuntu-packaging
(01:30:06 PM) dholbach: also the sponsoring process (somebody reviews your code or suggestion first) helps with that in the beginning
(01:30:16 PM) dholbach: it's just important that you do your best in making sure and testing
(01:30:29 PM) dholbach: <malcolmci> dholbach: ah, so the package maintainer decides?
(01:30:49 PM) dholbach: malcolmci: in Ubuntu we don't have dedicated package maintainers, so we maintain the packages as a big team
(01:30:57 PM) dholbach: <mickstephenson52> QUESTION: would the easiest way to test be toi just install the deb file from debian and see if it works?
(01:31:05 PM) dholbach: mickstephenson52: thanks for getting me back on track :)
(01:31:16 PM) dholbach: so, we have 1.74-1 in maverick
(01:31:24 PM) dholbach: and we have 1.75-1 in Debian sid
(01:31:44 PM) dholbach: which means that we did not introduce changes in Ubuntu, so we're sure that we don't have to merge things manually
(01:31:56 PM) dholbach: we just verified that the package builds again in the new version
(01:32:23 PM) dholbach: and we're still before feature freeze in maverick, so requesting a sync (https://wiki.ubuntu.com/SyncRequestProcess) should be fine, once we're sufficiently sure it's all good
(01:32:32 PM) dholbach: installing the .deb and see if it work is a great way
(01:32:40 PM) dholbach: <AudioFranky> QUESTION: I would expect that for very essential packages, like glibc, there is more than a single person to decide whether to keep or update?
(01:33:02 PM) dholbach: AudioFranky: yes, those decisions are made at UDS in a bigger group and usually there's agreement between people in Ubuntu and Debian who work on the package
(01:33:49 PM) dholbach: when I said that "we don't have dedicated maintainers" I meant that we have no "big maintainer lock" (somebody OWNS the package), but indeed we have people with a special area of expertise
(01:33:53 PM) dholbach: and that's respected
(01:34:27 PM) dholbach: alright, the path ahead seems clear: test the package, make sure it's alright, then engage with the sync request process
(01:34:49 PM) dholbach: here's some more food for though, you can try it out yourself:
(01:34:50 PM) dholbach: http://launchpadlibrarian.net/50981070/buildlog_ubuntu-maverick-i386.xdotool_1:2.20100602.2915-1_FAILEDTOBUILD.txt.gz
(01:34:50 PM) dholbach: http://launchpadlibrarian.net/50411959/buildlog_ubuntu-maverick-i386.weave_1.3-2_FAILEDTOBUILD.txt.gz
(01:35:08 PM) dholbach: but as I said: be careful and talk to people on #ubuntu-motu or #ubuntu-packaging if you're unsure
(01:35:26 PM) dholbach: being unsure is a good thing and knowing when to ask a sign of taking responsibility
(01:35:31 PM) dholbach: and that's valued
(01:35:53 PM) dholbach: alright, now I have another interesting case for us:
(01:35:54 PM) dholbach: http://launchpadlibrarian.net/49981844/buildlog_ubuntu-maverick-i386.xpad_4.0-5_MANUALDEPWAIT.txt.gz
(01:36:00 PM) dholbach: the xpad package fails to build too
(01:36:38 PM) dholbach: towards the bottom of the log you can see this:
(01:36:39 PM) dholbach: libmagickcore-extra: missing
(01:36:39 PM) dholbach: libmagickcore-extra: does not exist
(01:37:09 PM) dholbach: so this means that one of the packages that is specified as a requirement to build the xpad package is not there
(01:37:43 PM) dholbach: let's get the source code and let's try to fix it
(01:38:24 PM) dholbach: this time we'll do it differently:
(01:38:28 PM) dholbach:   bzr branch lp:ubuntu/xpad
(01:39:15 PM) dholbach: this will not get us the source package (remember the .dsc, .orig.tar.gz and .diff.gz file) but a bazaar branch (revision control system) with all revisions in Ubuntu and Debian
(01:39:39 PM) dholbach: this will take a little bit, but is worth it
(01:40:51 PM) dholbach: in the case of source packages you just get one revision, in a format that works with all the debian/ubuntu build tools, but we're slowly moving towards a world where we work with upstreams and debian and distributed version control is just what's easier to use
(01:41:01 PM) dholbach: I'd like to show you how easy to use it is
(01:41:13 PM) dholbach: alright, once bzr is done, run
(01:41:15 PM) dholbach:   cd xpad
(01:41:31 PM) dholbach: and
(01:41:35 PM) dholbach:   less debian/control
(01:42:16 PM) dholbach: let me explain a bit what this is about
(01:42:32 PM) dholbach: debian/control contains information about the source package and the resulting .deb (binary) packages
(01:42:47 PM) dholbach: in this case it's relatively simple, let's go through the source stanza first
(01:42:56 PM) dholbach: Source: specifies the nam
(01:42:57 PM) dholbach: e
(01:43:16 PM) dholbach: Section and Priority are used by the package management to have a bit of metadata
(01:43:24 PM) dholbach: Maintainer is the maintainer in Debian
(01:43:33 PM) dholbach: Build-Depends is just what we're looking for
(01:43:45 PM) dholbach: this is the minimal list of packages necessary to build the package
(01:44:28 PM) dholbach: Standards-Version is the version of the debian policy this complies with and homepage just more metadata
(01:44:37 PM) dholbach: this is all additional info regarding the source
(01:44:52 PM) dholbach: the resulting xpad package is defined in the next stanza
(01:44:56 PM) dholbach: Package: is the package name
(01:45:31 PM) dholbach: "Architecture: any" means that the package needs to get built on every individual architecture available separately
(01:45:43 PM) dholbach: somethinginteres: i386, amd64, powerpc, sparc, etc. etc.
(01:46:02 PM) dholbach: sorry somethinginteres - this was autocompleted, I meant "so"
(01:46:35 PM) dholbach: if you just put a bunch of python scripts into a package, or just some documentation that is architecture independent, you use "Architecture: all"
(01:46:54 PM) dholbach: Depends: is the list of dependencies of the resulting package
(01:47:13 PM) dholbach: these are all auto-generated
(01:47:34 PM) dholbach: shlibs:Depends is the list of library packages that contain libraries the binaries in the deb packages are linked against
(01:47:41 PM) dholbach: misc:Depends a few additional Depends that might be useful
(01:47:59 PM) dholbach: all of these complicated computations are done by scripts in the debhelper package
(01:48:16 PM) dholbach: Description too is used by the package management tools
(01:48:39 PM) dholbach: so debian/control is a file that contains lots of the definition of the package itself
(01:48:59 PM) dholbach: you can check out the other files in debian/ on your own later on, https://wiki.ubuntu.com/PackagingGuide will help you with that
(01:49:07 PM) dholbach: <bcurtiswx> QUESTION: will we ever mess with the bottom section?
(01:49:29 PM) dholbach: bcurtiswx: we could, for example if a user tells us that there's a dependency missing or there's a typo in the package description or something
(01:50:50 PM) dholbach: so to avoid confusion: this example will just work in maverick, it's a maverick build failure
(01:51:09 PM) dholbach: if you don't run maverick right now, that's no big deal, just trust me blindly then ;-)
(01:51:53 PM) dholbach: http://launchpadlibrarian.net/49981844/buildlog_ubuntu-maverick-i386.xpad_4.0-5_MANUALDEPWAIT.txt.gz mentioned that libmagickcore-extra was missing
(01:52:14 PM) dholbach: apt-cache search libmagickcore-extra (on maverick) will reveal that it's now called libmagickcore3-extra
(01:52:52 PM) dholbach: <BeardyGnome13> QUESTION: i guess it's best to run maverick on a separate machine / VM then?
(01:53:04 PM) dholbach: https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases has all that info
(01:53:37 PM) dholbach: ok, so we just change libmagickcore-extra to libmagickcore3-extra in debian/control
(01:53:42 PM) dholbach: and save the file
(01:54:11 PM) dholbach: if you exit your editor and run    bzr diff    you'll see your change
(01:54:45 PM) dholbach: now please run    update-maintainer    (script from ubuntu-dev-tools) to update the maintainer field which we were asked to do by our friends at debian to indicate that we made changes in the package)
(01:55:19 PM) dholbach: (sorry folks need to speed up a lil bit)
(01:55:24 PM) dholbach: now please run   dch -i
(01:55:39 PM) dholbach: also a devscripts tool which deals with all things related to debian/changelog
(01:55:47 PM) dholbach: it will automatically fill out some stuff for you
(01:55:57 PM) dholbach: you just need to enter a descriptive message for your changes
(01:56:26 PM) dholbach: I'd go for something like
(01:56:50 PM) dholbach:   * debian/control: updated build-depends from libmagickcore-extra to libmagickcore3-extra to fix FTBFS.
(01:56:55 PM) dholbach: (and wrap at 80 chars)
(01:57:05 PM) dholbach: it's important to note what you changed in which files
(01:57:27 PM) dholbach: and the more explicit you are about your changes, the easier it will be for you and others later on in understanding what you did
(01:57:57 PM) dholbach: if you close a bug with your fix, please add   (LP: #123456)
(01:58:08 PM) dholbach: this special syntax will automatically close the bug once it gets merged in
(01:58:12 PM) dholbach: now please save the file
(01:58:14 PM) dholbach: and run
(01:58:18 PM) dholbach:    bzr bd -- -S -us -uc
(01:58:42 PM) dholbach: this will build the source package from the branch
(01:58:56 PM) dholbach: (-S -us -uc are arguments for debuild which is used internally)
(01:59:15 PM) dholbach: then you move out of the directory and pbuilder the generated source package
(01:59:17 PM) dholbach: to test if that works now
(01:59:21 PM) dholbach: this will naturally take a bit
(01:59:30 PM) dholbach: once you're happy with all the  C A R E F U L   tests you did
(01:59:40 PM) dholbach: you can go back into the branch
(01:59:42 PM) dholbach: run debcommit
(02:00:02 PM) dholbach: and then push the changes to launchpad and request a merge
wiki.ubuntu.com/Bugs/HowToFix explains the last bits
(02:00:26 PM) dholbach: sorry for running out of time
(02:00:43 PM) dholbach: I hope you enjoyed the session
(02:00:51 PM) dholbach: please check out https://wiki.ubuntu.com/MOTU/GettingStarted
(02:00:55 PM) dholbach: and join #ubuntu-motu and #ubuntu-packaging

MeetingLogs/devweek1007/GetStarted (last edited 2010-07-12 18:02:40 by pool-71-123-28-183)