GetStarted

Differences between revisions 3 and 4
Revision 3 as of 2009-08-31 18:19:45
Size: 37871
Editor: adsl190-2426041
Comment:
Revision 4 as of 2009-08-31 19:23:39
Size: 38565
Editor: pool-71-182-107-66
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
EagleScreen class start at 16:00 UTC, in 3 minutes 16:57
dholbach WELCOME EVERYBO
DY TO UBUNTU DEVELOPER WEEK! 17:00
dholbach Who's all here for Ubuntu Developer Week? 17:00
the-dude \o/ 17:00
andol o/ 17:00
* penguin42 raises a flipper 17:00
andi + 17:00
shwnj hello :) 17:00
* devin122 raises hand 17:00
msp301 me :) 17:00
Narodon <- 17:00
syedam hi 17:00
trothigar :) 17:00
raji hi 17:00
medi hi 17:00
EagleScreen me, hello 17:00
_Fauchi95_ + 17:00
juanje \o/ 17:00
papapep :D 17:00
slicingcake \o/ 17:00
Oreste
Hi all 17:00
norax hi 17:00
codeanu hello :-) 17:00
James147 hi :) 17:00
robbbb heyyy 17:00
rish o/ 17:00
anurag213 hy there 17:00
Karmic kudos! 17:00
ulysses \o/ 17:00
Ker__ Hey 17:00
d3tr01t sup 17:00
ahe hi 17:00
aalcazar hi 17:00
bptk421 hi 17:00
HobbleAlong hi 17:00
svij heyy 17:00
haveMercy hi 17:00
marvinlemos hi 17:00
Gvorr hi 17:00
* arualavi .-D 17:00
kamikalo hi 17:00
tdapple howdy 17:00
soyrochus hola 17:00
riot_ hi daniel 17:00
_Fauchi95_ hi 17:00
sligocki g'day 17:00
jcastro woo! 17:00
julian_sda hi 17:00
qwebirc16121 hi 17:00
jacob \o/ 17:00
czambran_ hi 17:00
randomaction hi 17:00
yo1991 hi 17:01
jango6 :D 17:01
ScottTesterman hi 17:01
mhall119|work wow 17:01
tordek-san hi 17:01
anurag213 so lets begin 17:01
=== benjamin_ is now known as claudius177
=== herbmann_ is now known as herbmann_work
syedam \ o / 17:01
rish class started!! good 17:01
anurag213 yup
... 17:01
Orphe
y hi 17:01
dholbach HELLO MY FRIENDS! 17:01
c_korn me
, too 17:01
* nealmcb \o/ 17:01
rubial :) 17:01
troxor \o 17:01
qwebirc47321 howdy 17:01
frandieguez_ hi to all! 17:01
jacob quite the turnout 17:01
shwnj hello everyone :) 17:01
danbhfive1 hi 17:02
thowland yo 17:02
ililias :) 17:02
dholbach My name is Daniel Holbach
... any questions after the session, ideas for improvement, pieces of advice, nice comments and cheques please to dholbach at ubuntu dot com. 17:02
dholbach
I'll be your host for the first two sessions which will be all about "Getting Started with Ubuntu Development". 17:02
credobyte & me 17:02
rish
ok, dholbach let's start 17:02
rubial dholbach: funny name 17:02
dholbach
so let's first dive into a bit of organisational stuff 17:02
rubial go go go 17:02
dholbach
I noticed a bunch of people I already know but there's a lot of new "faces" here too 17:03
codeanu ya 17
:03
=== riot_ is now known as riot_le
dholbach
We're around 300 people in here already, which is why ALL QUESTIONS and ALL CHATTER go to #ubuntu-classroom-chat instead of #ubuntu-classroom 17:03
dholbach
else the logs will be totally unreadable afterwards 17:03
Panikos and me + 17:04
the-dude will logs be saved? 17:04
tiax won
't you set +m? 17:04
dholbach the-dude:
yes 17:04
dholbach so if you're not in #ubuntu-classroom-chat yet, please join the channel now 17:04
* popey hugs dholbach 17:04
dholbach
in #ubuntu-classroom-chat please prefix your questions with "QUESTION: " 17:05
dholbach
ie: "QUESTION: Do you like doing Ubuntu Development?" 17:05
===
qwebirc16121 is now known as rico45
dholbach also for those not fluent in English, we have irc channels where you can ask questions in your language, they will be translated into English for you 17:05
dholbach
- Catalan: #ubuntu-classroom-chat-ca 17:05
dholbach
- Danish: #ubuntu-nordic-dev 17:05
dholbach
- Finnish: #ubuntu-fi-devel 17:05
dholbach
- German: #ubuntu-classroom-chat-de 17:05
dholbach
- Spanish: #ubuntu-classroom-chat-es 17:05
dholbach
- French: #u-classroom 17:05
dholbach
if there's other channels for other languages, please announce them in #ubuntu-classroom-chat 17:06
dholbach
Alright... another piece of advice: 17:06
dholbach
https://wiki.ubuntu.com/UbuntuDeveloperWeek lists the timetable and links to a beautiful brochure that has more information 17:06
dholbach
https://wiki.ubuntu.com/UbuntuDeveloperWeek/Sessions should tell you if you need to prepare for any session 17:07
dholbach
https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/glossary has some useful glossary for abbreviations and stuff 17:07
dholbach
alright... that should be everything organisational for now... just bookmark https://wiki.ubuntu.com/UbuntuDeveloperWeek and you'll be fine for this week :-) 17:08
dholbach so let's get the session started 17
:08
qwebirc71751 hey 17:08
qwebirc71751 lets get it started 17:08
dholbach
qwebirc71751: chatter and questions please in #ubuntu-classroom-chat 17:09
MaNU__ lets start 17:09
rish
will you all stop talking and let dholbach speak? 17:09
dholbach
my aim for the session is to get you from "How can I help out? I can't code in C/C++." (a question I get very often) to "Ah, I understand things much better now, I know where to look things up and who to ask." 17:09
rico45 pls start 17:09
zubin71 pls start 17:09
dholbach
so I'll cover a bunch of more general topics and help you set up a development environment 17:10
credobyte zubin
71: patiance :) 17:10
bptk421 /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS 17:10
diwanshuster hello everyone 17:10
zubin71 hello 17:10
===
rene is now known as Guest54172
rico45 no patiance impatient 17:10
bptk421 /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS 17:11
dholbach
so as a first step, please enable "Source code" in System -> Administration -> Software Sources -> Ubuntu Software 17:11
diwanshuster done 17:11
Nomads /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS 17:11
dholbach
Once that's done, you'll notice a lot of entries that start with deb-src in /etc/apt/sources.list 17:12
dholbach
I'll explain why we need it a bit later on 17:12
dholbach
afterwards, please run 17:12
dholbach
sudo apt-get install --no-install-recommends ubuntu-dev-tools build-essential pbuilder 17:12
dholbach it will install a bunch o
f very useful tools we're going to need for the session 17:12
dholbach
ubuntu-dev-tools contains scripts that are very useful for packaging and repetitive tasks (it also depends on devscripts which has even more useful stuff) 17:13
dholbach build
-essential is necessary to do the most common tasks having to do with compiling and building 17:13
dholbach pbuilder is the perfect tool to build pack
ages in a sane and reproducable way 17:14
dholbach
now please edit the file ~/.pbuilderrc (gedit, vi, emacs, whatever you like best) 17:15
dholbach add the following line to it: 17:15
dholbach
COMPONENTS="main universe multiverse restricted" 17:15
dholbach and save it 17:15
dholbach now please run: 17:15
dholbach sudo pbuilder create 17:15
dholbach it will set up a pbuilder instance for you which will take a while 17:16
dholbach I forgot, please install gnupg too: 17:16
dholbach sudo apt-get install gnupg 17:16
dholbach
<_Fauchi95_> QUESTION: Do I need to use pbuilder or is that optional? 17:17
dholbach
_Fauchi95_: pbuilder is a great tool to test-build a package in a separate and minimal environment - it's a great way to test the build 17:18
dholbach
it's by no means a must, but I'll get back to the topic of testing in a bit 17:18
dholbach
ok... while that's running, let's create a GPG Key - if you have one already you can lay back and relax 17:18
dholbach Please run 17:19
dholbach
gpg --gen-key 17:19
dholbach
we use GPG keys to sign packages to identify them as our own work and make sure they weren't tampered with 17:19
dholbach
you can also use it to encrypt and sign other files and emails 17:19
dholbach
https://help.ubuntu.com/community/GnuPrivacyGuardHowto has more info and I won't go into too much detail, using the defaults should be fine for now 17:20
dholbach
give it your name and your preferred email address, that should be fine for now 17:20
dholbach
once it's done, you can get your fingerprint and key id by running something like this: 17:22
dholbach
gpg --fingerprint your.name@email.com 17:22
dholbach
mine says something like: 17:22
dholbach
pub 1024D/059DD5EB 2007-09-29 17:22
dholbach
Schl.-Fingerabdruck = 3E5C 0B3C 8987 79B9 A504 D7A5 463A E59D 059D D5EB 17:22
dholbach
uid Daniel Holbach ....... 17:22
dholbach
059DD5EB is the key id 17:22
dholbach
Afterwards please run 17:24
dholbach
gpg --send-keys KEYID 17:24
dholbach
ie: gpg --send-keys 059DD5EB 17:24
dholbach
this will upload your gpg key to the servers, so other people can identify your files and your emails as yours 17:24
dholbach
as a next step, we need to upload it to Launchpad too 17:25
dholbach
(if you have no Launchpad account yet, please visit https://launchpad.net/+login) 17:25
dholbach
it seems like some people have a problem with gpg not having a default keyserver set, in that case, please add --keyserver keyserver.ubuntu.com 17:26
dholbach
you can add your GPG key to Launchpad by visiting: https://launchpad.net/people/+me/+editpgpkeys 17:27
dholbach
ok, that should be it for preparations right now 17:27
dholbach so what did we do 17
:28
dholbach
- install a bunch of tools 17:28
dholbach
- created a pbuilder instance (which might be still running for some of you) 17:28
dholbach
- created a GPG key 17:28
dholbach - uploaded the
key to keyservers and launchpad 17:28
dholbach
ok... so what do we do with Launchpad 17:29
dholbach
Launchpad is used for everything in Ubuntu - Translations of packages, Bug Reports for packages, Specifications of new Ubuntu features, Code branches, and packages are also built there 17:30
dholbach that plus our whole team organisation 17
:30
dholbach
the great thing about Launchpad is that it is written by awesome people and it is Open Source 17:30
dholbach
also... it's written in Python :) 17:30
dholbach
We'll have a bunch of interesting Launchpad sessions too this week: 17:31
dholbach
- Using the LP API for fun and profit -- leonardr (Tue 1st Sep, 19:00 UTC) 17:31
dholbach
- Getting started with Launchpad development -- gmb (Wed 2nd Sep, 16:00 UTC) 17:31
dholbach
- Being productive with bzr and LP code hosting - rockstar (Thu 3rd Sep, 19:00 UTC) 17:32
dholbach
- Hacking Soyuz to get your builds done -- noodles775, cprov and wgrant (Fri 4th Sep, 20:00 UTC) 17:32
dholbach
a lot of other sessions will probably briefly cover Launchpad too 17:32
dholbach
<anurag213> Question:Not enough random bytes available. Please do some oth 17:33
dholbach anurag213: just let it sit there for a while - gnupg is getting more entrophy and random numbers from your machine 17
:34
dholbach
ok, next we'll tell the development tools who we are 17:34
dholbach
just edit ~/.bashrc in your favourite editor 17:34
dholbach
and add something like this to the end of it: 17:34
dholbach
export DEBFULLNAME='Daniel Holbach' 17:35
dholbach
export DEBEMAIL='daniel.holbach@ubuntu.com' 17:35
dholbach then save it 17:35
dholbach
and run source ~/.bashrc 17:35
dholbach
alright... that should be it for now 17:35
dholbach
so what's next 17:36
dholbach
I'll talk a bit about source packages and what we do with them, how code gets changed, when we change which pieces of Ubuntu, who you can talk to, where you can find out more, etc. :) 17:36
dholbach
then we'll do some hands-on package building :-) 17:36
dholbach so first of all, here's where you find more information: 17
:37
dholbach
https://wiki.ubuntu.com/MOTU/GettingStarted 17:37
dholbach
bookmark the page! it links to all the important documents we have 17:37
dholbach among them: 17
:37
dholbach
- https://wiki.ubuntu.com/PackagingGuide 17:37
dholbach
which has a lot of information about packaging in general 17:38
dholbach
especially https://wiki.ubuntu.com/PackagingGuide/Recipes where you can find out how to use the tools easily 17:38
dholbach
there's also https://wiki.ubuntu.com/MOTU/Videos which has a bunch of videos which talk about packaging, updating packages, patching stuff, etc. 17:39
dholbach
- https://wiki.ubuntu.com/UbuntuDevelopment is important too because it explains how Ubuntu Development generally works, processes, who is responsible for what and so on 17:39
dholbach
- https://wiki.ubuntu.com/Packaging/Training invites you to Packaging Training IRC sessions which happen every Thursday 17:40
dholbach
the next one is going to be: Thursday 3rd September, 6:00 UTC, Ubuntu Development Q&A... with me :-) 17:40
dholbach
ok, now let's have a look at https://wiki.ubuntu.com/ReleaseSchedule 17:41
dholbach
it's a great way to understand more about Ubuntu Development if you know more about the different phases of the release 17:42
===
riot_le is now known as Guest50469
dholbach this is the schedule of the karmic release which we're working on right now - it's due for October 29th 17:42
dholbach in the first phase the new release is created in Launchpad and the toolchain is set up which means that the most important packages (like libc and gcc, the compiler collection) are bootstrapped 17
:43
dholbach
afterwards we start merging changes from Upstream and Debian (I'll go into more detail in a bit) 17:43
dholbach
and then UDS happens 17:43
dholbach
UDS is the Ubuntu Developer Summit where Ubuntu developers meet in real life to discuss and define new features 17:44
dholbach
these often result into specifications where we exactly describe why we want the feature, how it's going to work, its impact and its implementation strategy 17:44
dholbach
https://blueprints.launchpad.net/ubuntu should have a few you can take a look at 17:44
dholbach
<alourie|vm> dholbach: how can a person participate in UDS? 17:44
dholbach
alourie|vm: everybody is invited to attend UDS, so if you live close or are sponsored to go there you can participate locally 17:45
dholbach
if you can't, you can participate via VOIP and IRC 17:45
dholbach
<gotunandan> QUESTION : what do you mean by bootstrap ? 17:45
dholbach gotunandan: when the new toolchain is uploaded, you need to make sure the new gcc is built with the new libc6 and binutils, etc. - I unfortunately don't have much time to discuss it here, but #ubuntu-toolchain might be a good place to discuss it further 17
:46
dholbach once the new
features are all discussed and described in specifications people work on their features, upload new version of packages and we import a lot of packages from Debian 17:47
dholbach (more on that in a bit) 17
:47
dholbach
that all happens in the "green" part of https://wiki.ubuntu.com/ReleaseSchedule 17:48
dholbach
"green" doesn't mean "it's all great here and it all works"! 17:48
dholbach
it means that developers have a lot of freedom to work on things :) 17:48
dholbach
if you want to participate you need to run the new development release IN SOME FORM 17:48
dholbach
I say "in some form" because obviously you probably need your computer and can't have the kernel, libc, X or GNOME explode all the time :-) 17:49
dholbach
https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases describes how to safely and sanely use the current development release 17:49
dholbach
<trothigar> QUESTION: for packaging can you just run pbuilder for the development release? 17:49
dholbach
trothigar: good question - just what I wanted to talk about :) 17:49
dholbach the answer is no 1
7:50
dholbach test-building a pac
kage for karmic is a good start 17:50
dholbach but you definitely need to do this on karmic too: 17:50
dholbach
_____ _____ ____ _____ ___ _ _ ____ _ 17:50
dholbach
|_ _| ____/ ___|_ _|_ _| \ | |/ ___| | 17:50
dholbach
| | | _| \___ \ | | | || \| | | _| | 17:50
dholbach
| | | |___ ___) || | | || |\ | |_| |_| 17:50
dholbach
|_| |_____|____/ |_| |___|_| \_|\____(_) 17:50
dholbach
which is why just "test building on karmic" is not good enough 17:50
dholbach
https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases explains how to use a virtual machine, a chroot or a separate partition for your development work, so you don't hose the family computer :) 17:51
dholbach
ok, moving on in the release schedule: 17:51
dholbach
afterwards we have Feature Freeze (which we're in in karmic right now) where you need to get exceptions for uploading new upstream versions or other radical changes 17:52
dholbach
at this time of the release some things might still be broken but the features should at least be half-way there 17:52
dholbach
after that we introduce more and more freeze dates: UI, kernel, documentation, translations, etc. 17:53
dholbach
one gets frozen every week so we get a very stable release that can be safely documented, translated and tested 17:53
dholbach
<slacker_nl> QUESTION: are there automated testtools for package testing, eg tests for regression testing? or should that be provided by upstream? 17:53
dholbach
slacker_nl: great question 17:53
dholbach
there's a number of upstream developers (which means software authors) that provide us with test suites and very often they are run during the build to directly find out if things got broken in the new release 17:54
dholbach
there's tools like pbuilder for safe test-building and there's tools like lintian that can check your packaging for you 17:54
dholbach
ok... let's take a quick 5 minute break and we can get our hands dirty afterwards 17:56
dholbach for all of
you that need a new cup of tea or a drink or need to nip to the loo 17:56
dholbach see you
in just a bit :-) 17:56
dholbach
alright... let's kick off part 2 18:00
dholbach
for all of you who just arrived: you can ask questions in #ubuntu-classroom-chat (please prefix with QUESTION:), logs will be available afterwards on https://wiki.ubuntu.com/UbuntuDeveloperWeek 18:01
dholbach
Ok... now let's get some source package and let's try to test build it 18:01
dholbach please run 18:01
dholbach
apt-get source hello 18:01
dholbach
if you have "Sources" enabled in Software Sources this should work now 18:02
dholbach what it does it the
following 18:02
dholbach it will get the source package for the 'hello' package 18:02
dholbach there's the distinction between the source packages and the binary packages 18:03
dholbach what my Mom installs, the .deb files are the binary packages which are a result of the build 18:03
dholbach what we work on as Ubuntu developers is the source packages 18:03
dholbach in the case of hello (on karmic) this means the following files: 18:03
dholbach
hello_2.4-1.diff.gz hello_2.4-1.dsc hello_2.4.orig.tar.gz 18:04
dholbach
hello_2.4.orig.tar.gz means: the original source code that was released by the software authors of 'hello' in the version 2.4 18:04
dholbach
the 'orig' is important - it means: this tar.gz file didn't receive any changes at all, it's just as it was downloaded from the hello homepage 18:05
dholbach
(just renamed) 18:05
dholbach
hello_2.4-1.diff.gz is the compressed set of changes that were applied by Debian (and Ubuntu) developers to make the source package build the Debian/Ubuntu way 18:06
dholbach
so what does this mean "the debian/ubuntu way"? 18:07
dholbach
some of you might have compile source code already, where you manually build software by running: 18:07
dholbach
./configure make sudo make install 18:07
dholbach the pac
kaging process basically wraps around those build commands and enables us to apply the same build process to every kind of package 18:08
dholbach so it doesn't matter if it's a python program
, a set oh PHP modules, something written in C or something to do with Perl 18:08
dholbach also you add some meta information like the package name, a description,
etc. 18:08
dholbach
The session "Packaging from scratch" -- Laney on Friday will talk about that in more detail 18:09
dholbach
also "Learning from mistakes - REVU reviewing best practices" -- mok0 on Thursday will have useful tips 18:09
dholbach
<[BIOS]Dnivra> QUESTION: Why is dpkg-dev needed? I get an error it's not installed. isn't it available in the ubuntu repository? 18:09
dholbach
sorry, please run 18:09
dholbach sudo apt-get install dpkg-dev 18:09
dholbach it's needed too, I thought it would be pulled in 18:10
dholbach just run 18:10
dholbach
dpkg-source -x *.dsc 18:10
dholbach afterwards and you'll be fine 18:10
dholbach
I'll get to the purpose of it in just a bit 18:10
dholbach
<[BIOS]Goo> QUESTION:Could you elucidate "wraps around those build commands" 18:11
dholbach
[BIOS]Goo: ok, let's go into some more detail 18:11
dholbach
so a regular application written in C will often require you to run something like ./configure; make; make install; etc. 18:12
dholbach
a python application that uses distutils might need something like invocations of python ./setup.py .... 18:12
dholbach
sometimes for a package to work afterwards (some simple scripts) it will be enough to just copy them where they belong 18:13
dholbach
the package build process can be divided into steps like configuration, compilation, installation, something that happens post-installation and so on 18:13
dholbach
think of it as a "meta build process" 18:13
dholbach
that process is specified in the debian policy and we make use of that 18:14
dholbach
the great thing about this standardisation is: our tools all treat source packages the same way, no matter what weird way they work internally 18:14
dholbach
moving on :) 18:14
dholbach
hello_2.4-1.dsc just contains meta data of the package like md5sums and so on 18:15
dholbach
so what apt-get source (or more specifically dpkg-source -x *.dsc) did was: 18:16
dholbach
- unpack hello_2.4.orig.tar.gz 18:16
dholbach
- unpack and apply the patch with our changes hello_2.4-1.diff.gz 18:16
dholbach
so you should be able to see the hello-2.4 directory 18:16
dholbach
(or hello-2.3 if you're on an older version) 18:16
dholbach
this directory should contain a debian/ directory which basically contains all the packaging 18:17
dholbach
daniel@miyazaki:~$ ls hello-2.4/debian/ 18:17
dholbach
changelog control copyright postinst prerm rules watch 18:17
dholbach
daniel@miyazaki:~$ 18:17
dholbach I won't explain ever
y last detail now, just very quickly 18:17
dholbach - changelog: descriptions of all the packaging changes (one new entry per new version that was uploaded to the archive) 1
8:17
dholbach - control: information about the source package (who maintains it, where's the homepage, which packages are necessary to build it, etc.) and the resulting binary package(s) 18:18
dholbach - copyright: licensing and copyright information of the software 18:18
dholbach - rules: how is the package build, how does the meta build process work 18:18
dholbach we can safely ignore the others for now 18:18
dholbach
alright... now let's test-build the package 18:19
dholbach
if your pbuilder setup succeeded, you just run the following 18:19
dholbach
sudo pbuilder build hello_2.4-1.dsc 18:19
dholbach
if it works out, you should be able to have a look at /var/cache/pbuilder/result/hello_*.deb afterwards 18:20
dholbach
this should work 18:20
dholbach
less /var/cache/pbuilder/result/hello_*.deb 18:20
dholbach
this will show you the contents of the package, its size and dependencies, etc. 18:20
dholbach
if you have a look at the build log you will see what happened there: 18:21
dholbach
first the separate build environment was set up, then some additional packages installed 18:21
dholbach
then ./configure was run, then the actual compilation of the source code happened, then some files were installed and then they were all glued together in /var/cache/pbuilder/result/hello_*.deb, then the build environment torn down again 18:22
dholbach
the fine thing about pbuilder is that it will store all the packages that are necessary to build a package 18:22
dholbach
and you don't need to download them over and over again 18:23
dholbach
<alourie|vm> dholbach: QUESTION: what if packages need an update? 18:23
dholbach
alourie|vm: you run sudo pbuilder update (similar to apt-get update) 18:23
dholbach
<trothigar> QUESTION: presumably the build deps are downloaded as binaries. Does pbuilder share the same cache as apt? 18:24
dholbach trothigar: you can set it up that way 18:24
dholbach
https://wiki.ubuntu.com/PbuilderHowto should have more information on the topic 18:24
dholbach
it came up in -chat a couple of times, so here goes: 18:25
dholbach
<RainCT> penguin42: Yeah. Using pbuilder-dist (from ubuntu-dev-tools) is a great way to achieve that 18:25
dholbach
pbuilder-dist is a fine tool to test-build packages for various ubuntu and debian releases 18:25
dholbach
talk to RainCT to find out more about it :) 18:25
dholbach
ok... so how does Ubuntu Development work? what do people do with those .dsc .diff.gz and .orig.tar.gz files 18:26
dholbach
basically for every change that is done to a package a new source package must be uploaded to the Launchpad build servers 18:26
dholbach
that's where the gpg key comes in, if you're not part of the team (I'll get to that in a sec), it will reject your changes 18:27
dholbach
the same applies for Launchpad Personal Package Archives (https://help.launchpad.net/Packaging/PPA) 18:27
dholbach you can think of it as a primitive (sorry everybody) version control system 18:27
dholbach
Developer A makes a change and uploads version 2.4-2 of hello 18:28
dholbach and I can get it via apt-get source hello later on and improve it some more if I like 18:28
dholbach
there are efforts going on to make more use of distributed revision control (using Bazaar on Launchpad) and Mr James Westby will talk about that later in the week 18:29
dholbach
Friday 4th September, 18:00 UTC - Fixing an Ubuntu bug using Bazaar -- james_w 18:29
dholbach
so how would you go about sending in changes now that you're not part of the team yet 18:30
dholbach
easy: come to tomorrow's session "Fixing small bugs in Ubuntu" and learn how to produce patches 18:30
dholbach
once you have the patch, you attach it to a bug report and subscribe the reviewers team 18:30
dholbach
they'll give you a review and some advice and upload the change for you once it's all good 18:31
dholbach
basically they'll download the source package, apply your changes, sign it with they gpg key and upload it for you 18:31
dholbach
<msp301> QUESTION: what would happen in the case that two users happen to update at the same time on Launchpad?? 18:31
dholbach
msp301: those collisions happen every now and then, Launchpad will just use the one that was milliseconds before and throw away the other :) 18:31
dholbach
<alourie|vm> dholbach: QUESTION: how do we prepare patches? 18:32
dholbach
alourie|vm: tomorrow, 16:00 UTC, this place :-) 18:32
dholbach
find more detail about the reviewers team and how to get stuff uploaded at: https://wiki.ubuntu.com/SponsorshipProcess 18:32
dholbach
once the reviewers are happy with your general work and get tired of uploading and reviewing myriads of changes for you, they'll tell you that and you can send your application for upload rights :-) 18:33
dholbach
https://wiki.ubuntu.com/UbuntuDevelopers explains the process 18:33
dholbach
ok... that roughly explains how Ubuntu works 18:34
dholbach
there's the release schedule with freeze dates, there's people working with source packages, there's bug reports and people attaching patches to them 18:34
dholbach
there's packages getting built, downloaded and tested 18:34
dholbach
but that doesn't explain how developers interact 18:34
dholbach
there's mailing lists and IRC 18:34
dholbach
https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu and #ubuntu-motu should be interesting for you 18:35
dholbach
because these channels contain the most awesome and frienly people that can help you out 18:35
dholbach
there's lots more mailing lists: https://lists.ubuntu.com/ 18:35
dholbach
and there's lots more irc channels: https://help.ubuntu.com/community/InternetRelayChat 18:36
dholbach
but try to take one step at a time :-) 18:36
dholbach
it can be a bit overwhelming :) 18:36
dholbach
<bogor> QUESTION: Does building package in my pc will have it installed in my machine. If yes then how do i uninstall it if somethings goes wrong? 18:36
dholbach
bogor: no, you have to explicitly install the package, running sudo dpkg -i bla.deb 18:36
dholbach
that's why you probably best check out https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases 18:36
dholbach
which explains how to have a separate, up-to-date development environment 18:37
dholbach
<slacker_nl> QUESTION: you've talked about development releases, what about backports, how does that process work, when does a package get backported? 18:37
dholbach
slacker_nl: good one 18:37
dholbach
slacker_nl: so we all work on karmic now.... it's going to be released on October 29th 18:37
dholbach
afterwards the karmic will be frozen 18:37
dholbach
no uploads to karmic anymore 18:38
dholbach
afterwards only uploads to karmic-security karmic-updates and karmic-backports are accepted 18:38
dholbach
Effectively testing for regressions -- sbeattie on Thursday will have more information on that 18:38
dholbach
https://wiki.ubuntu.com/SRU also explains it in more detail 18:39
dholbach
<openweek0_> QUESTION: where do i join if i wanna participate in gnome desktop env development? 18:39
dholbach
openweek0_: check out https://wiki.ubuntu.com/Teams for more information on various teams within Ubuntu 18:39
dholbach
<msp301> QUESTION: is that the same with LTS releases ? retricted updates etc ?? 18:40
dholbach
msp301: no, what I just mentioned above concerns all releases, LTS or not 18:40
dholbach
LTS is just supported for longer than the "regular" 18 months, it's 3 years of support on the desktop and 5 on the server 18:40
dholbach
<c_korn> QUESTION: can I safely run "sudo rm -rf /var/cache/pbuilder/" to purge pbuilder ? 18:40
dholbach
c_korn: yes 18:40
dholbach
ok, now that we know how developers interact, one thing is VERY important 18:41
dholbach
always document changes you are about to make as good as you can 18:41
dholbach
we have people living in various parts on earth, speaking different languages and having different skill sets 18:41
dholbach
as we maintain all packages together as one big team it's important that other developers don't have to second guess what you might have meant 18:42
dholbach also in
6 months time you probably don't want to second guess your own patches or documentation :) 18:42
dholbach
ok... speaking of patches and developers: we're not alone in the open source world 18:43
dholbach
we inherit a great deal of good stuff from the Debian project and other projects 18:43
dholbach
if we make changes we want to make sure to contribute them back to Debian, so let's take a quick look back at the hello example 18:43
dholbach
2.4-1 is the version in karmic 18:44
dholbach this means: 18
:44
dholbach
- 2.4 is the release that was done by the authors of hello on their homepage 18:44
dholbach
- "-1" means that one revision of 2.4 was done in Debian and we inherited that 18:44
dholbach
debian/changelog has more information on what happened there 18:44
dholbach
if I was to do a change for Karmic, the new version string would be 18:45
dholbach
2.4-1ubuntu1 18:45
dholbach
meaning: still 2.4 upstream release, one (inherited) debian revision, one Ubuntu change 18:45
dholbach
this also means that in the new Ubuntu release (karmic+1) we can't just copy (we call it 'sync') the package from debian, as we might overwrite the changes that I did in 2.4-1ubuntu1 18:46
dholbach
if there was a 2.5-1 in Debian, we'd need to very closely check if we can just overwrite my changes or if I need to merge the manually into the 2.5-1 Debian version (and thus get 2.5-1ubuntu1) 18:47
dholbach
to be able to sync as much as possible and share the same codebase all over it's necessary to send patches upstream 18:47
dholbach
On Wednesday we'll have a session called " Bug lifecycle, Best practices, Workflow, Tags, Upstream, Big picture" by jcastro and pedro_ who will talk about that some more 18:47
dholbach
<aacool> QUESTION: what do I run to test hello after the pbuilder build completes? 18:48
dholbach
aacool: you'd run sudo dpkg -i /var/cache/pbuilder/result/hello*.deb to install the resulting package 18:48
dholbach and then run 18
:48
dholbach hello 18
:48
dholbach
in the command line :-) 18:48
dholbach
<penguin42> QUESTION: What happens with package numbering when ubuntu brings out a newer upstream version before debian does, then debian catches up? 18:48
dholbach penguin
42: nice one :) 18:48
dholbach
so let's say Debian is still on 2.4-1 and we discover there's a new release out by the hello upstream guys 18:49
dholbach
we'd call it 2.5-0ubuntu1 18:49
dholbach
to indicate: it's upstream 2.5, we didn't get a revision of it from Debian, but have the first revision of it in Ubuntu 18:49
dholbach
<[BIOS]Goo> QUESTION: Since Ubuntu is debian based, can i follow the same package building process for Debian as well?(using pbuild) 18:49
dholbach
[BIOS]Goo: essentially, yes 18:50
dholbach
https://wiki.ubuntu.com/UbuntuPackagingChanges explains what's different in the Ubuntu world 18:50
dholbach
<norax> QUESTION: What's the order? I mean hello.2.4-1 is before or after hello.2.10-1 ? If before, What goes after hello.2.10-1_ubuntu9? If after what happend if the upstream developer use a different notation? 18:50
dholbach
norax: first 2.4-1 then 2.10-1 18:50
dholbach
to be on the safe side, you can do this 18:50
dholbach
daniel@miyazaki:~$ dpkg --compare-versions 2.10-1 gt 2.4-1 && echo TRUE 18:51
dholbach
TRUE 18:51
dholbach
daniel@miyazaki:~$ 18:51
dholbach
dpkg is always authoritative on package versions 18:51
dholbach
the command above checks if 2.10-1 is greater than 2.4-1 and print TRUE if it's true :) 18:51
dholbach
<soyrochus> QUESTION: Probably for last; how to clean up a system after using pbuilder. Not just apt-get remove, but more importantly removing all remants of local repositories, build remnants etc. 18:52
dholbach
soyrochus: just deinstall the packages that we installed, remove ~/.pbuilderrc and /var/cache/pbuilder 18:52
dholbach
that should get you there 18:52
dholbach
but more practically: use a virtual machine 18:52
dholbach
https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases 18:52
dholbach
. o O { I didn't think that would be the most usef link today :-) } 18:53
dholbach
<playya> QUESTION: is it possibleto generate the debian/* file out of git TAGS, log,... and configure.ac? 18:53
dholbach
playya: yes, some people use distributed revision control for 1) the packaging itself and 2) packaging upstream snapshots from bzr/git/svn/cvs/etc 18:53
dholbach
<slacker_nl> QUESTION: regarding giving back: what is prefered, create a debian package and wait for Ubuntu to sync with debian or to create a ubuntu package directly? does debian sync with ubuntu? 18:54
dholbach
slacker_nl: that depends on the release schedule 18:54
dholbach slacker_nl: if we're a week away from release and the fix is critical we might ask somebody from upstream for advice, but we won't block on them if we know that we need that fix 18:5
4
dholbach
https://wiki.ubuntu.com/Upstream has more info on our collaboration with upstreams 18:54
dholbach
ok... as last tips I'd like to give you: 18:55
dholbach
https://wiki.ubuntu.com/MOTU/GettingStarted 18:55
dholbach
because it links to all the important stuff 18:55
dholbach
https://wiki.ubuntu.com/Packaging/Training 18:55
dholbach because of the session we'll have on thursday: general questions and answers about Ubuntu development, this place 18
:56
dholbach
also please join us in #ubuntu-motu on irc.freenode.net 18:56
dholbach
and on the ubuntu-motu mailing list 18:56
dholbach
I really hope to see all of you during the great sessions we have this week 18:56
dholbach
and hope to see you all as Ubuntu contributors really really soon 18:56
dholbach
make me proud! :-) 18:57
huats
thanks dholbach ! 18:57
dholbach
thanks everybody - have a great Ubuntu Developer Week! 18:57
alourie|vm dholbach: excellent lecture! 18:57
* dinxter claps 18:57
msp301 thanks :) 18:57
* alourie|vm cheers 18:57
zubin71 claps 18:57
michele_ Thank you for all the fish :) 18:57
dholbach 3 minutes break until rickspencer3 and didrocks talk about quickly! 18:57
* didrocks waves at dholbach 18:57
zubin71 thankx a lot 18:57
[BIOS]Goo :) thanx 18:57
bear24rw thanks 18:57
trothigar thank you 18:57
[BIOS]Goo zubin :P 18:57
shrinivasan1 thanks a lot 18:57
jango6 thx 18:57
alourie|vm thanks a lot 18:57
^arky^ thanks dholbach 18:57
aalcazar thanks 18:57
penguin42 Thanks dholbach 18:57
soyrochus great session; thanks 18:57
pothos it was also good in german 18:57
=== bennabi_ is now known as bennabi
raji thankx 18:58
* porthose claps 18:58
zubin71 [BIOS]Goo : haha... :-P 18:58
* sum-it thanks dholbach 18:58
pothos but a little bit different 18:58
fromme cheers 18:58
bennabi thanks a lot 18:58
[BIOS]Goo That was Amazin :) gonna contribute tonite itself :P 18:58
david_ ty 18:58
bogor dholbach, that was a awesome wonderful lecture 18:58
lau_ thx! 18:58
kboi thanks dholbach 18:58
c_korn thanks dholbach 18:58
Etilworg #ubuntu-classroom-talk 18:58
dtrich_ thanks you dholbach 18:58
* RainCT hugs dholbach :) 18:58
* alourie|vm joins 18:58
* nixternal hugs dholbach 18:59
shobhit cheers!! 18:59
credobyte dholbach: respect! thnx for the lecture :) 18:59
chiossif_ thanks a lot dholbach ! 18:59
* dholbach hugs you all back 18:59
arulalan thank you very much dholbach ! 18:59
dholbach ok... I'll quieten this channel down again :-) 18:59
dholbach ok everybody... let's kick of session number 2 (or 3 depending how you count it) 18:59
(12:02:03 PM) dholbach: My name is Daniel Holbach... any questions after the session, ideas for improvement, pieces of advice, nice comments and cheques please to dholbach at ubuntu dot com.
(12:02:21 PM) dholbach:
I'll be your host for the first two sessions which will be all about "Getting Started with Ubuntu Development".
(12:02:22 PM)
credobyte: & me
(12:02:30 PM) rish:
ok, dholbach let's start
(12:02:31 PM) rubial: dholbach: funny name
(12:02:3
7 PM) dholbach: so let's first dive into a bit of organisational stuff
(12:02:39 PM) rubial: go go go
(12:02:51 PM) dholbach:
I noticed a bunch of people I already know but there's a lot of new "faces" here too
(12:02:5
7 PM) codeanu: ya
(12
:03:11 PM) riot_ is now known as riot_le
(12
:03:24 PM) dholbach: We're around 300 people in here already, which is why ALL QUESTIONS and ALL CHATTER go to #ubuntu-classroom-chat instead of #ubuntu-classroom
(12
:03:33 PM) dholbach: else the logs will be totally unreadable afterwards
(12
:03:52 PM) Panikos: and me +
(12:03:5
4 PM) the-dude: will logs be saved?
(12:03:56 PM) tiax: won't you set +m?
(12
:04:00 PM) dholbach: the-dude: yes
(12:04:06 PM) dholbach: so if you
're not in #ubuntu-classroom-chat yet, please join the channel now
(12
:04:34 PM) robbbb left the room.
(12:04:35 PM) ***pope
y hugs dholbach
(12
:04:52 PM) dholbach: in #ubuntu-classroom-chat please prefix your questions with "QUESTION: "
(12
:05:08 PM) dholbach: ie: "QUESTION: Do you like doing Ubuntu Development?"
(12
:05:25 PM) qwebirc16121 is now known as rico45
(12:05:35 PM) dholbach: also for those not fluent in English, we have irc channels where you can ask questions in your language, they will be translated into English for you
(12
:05:40 PM) dholbach: - Catalan: #ubuntu-classroom-chat-ca
(12
:05:40 PM) dholbach: - Danish: #ubuntu-nordic-dev
(12
:05:40 PM) dholbach: - Finnish: #ubuntu-fi-devel
(12
:05:40 PM) dholbach: - German: #ubuntu-classroom-chat-de
(12
:05:40 PM) dholbach: - Spanish: #ubuntu-classroom-chat-es
(12
:05:41 PM) dholbach: - French: #u-classroom
(12
:05:54 PM) dholbach: if there's other channels for other languages, please announce them in #ubuntu-classroom-chat
(12
:06:21 PM) dholbach: Alright... another piece of advice:
(12
:06:22 PM) ScottTesterman left the room (quit: ).
(12:06:38 PM) dholbach:
https://wiki.ubuntu.com/UbuntuDeveloperWeek lists the timetable and links to a beautiful brochure that has more information
(12
:06:41 PM) raji left the room (quit: Read error: 104 (Connection reset by peer)).
(12:06:54 PM) dholbach:
https://wiki.ubuntu.com/UbuntuDeveloperWeek/Sessions should tell you if you need to prepare for any session
(12:06:56 PM) ScottTesterman [n=quassel@
74.235.4.36] entered the room.
(12
:07:10 PM) dholbach: https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/glossary has some useful glossary for abbreviations and stuff
(12:08:01 PM) dholbach:
alright... that should be everything organisational for now... just bookmark https://wiki.ubuntu.com/UbuntuDeveloperWeek and you'll be fine for this week :-)
(12:08:0
7 PM) dholbach: so let's get the session started
(12
:08:10 PM) frandieguez_ left the room (quit: "Ex-Chat").
(12
:08:29 PM) qwebirc71751: hey
(12
:08:44 PM) qwebirc71751: lets get it started
(12
:08:59 PM) dholbach: qwebirc71751: chatter and questions please in #ubuntu-classroom-chat
(12
:09:01 PM) MaNU__: lets start
(12
:09:09 PM) rish: will you all stop talking and let dholbach speak?
(12
:09:26 PM) dholbach: my aim for the session is to get you from "How can I help out? I can't code in C/C++." (a question I get very often) to "Ah, I understand things much better now, I know where to look things up and who to ask."
(12
:09:28 PM) rico45: pls start
(12:09:44 PM) zubin
71: pls start
(12
:09:50 PM) dholbach: so I'll cover a bunch of more general topics and help you set up a development environment
(12:10:00 PM) credobyte: zubin
71: patiance :)
(12:10:1
7 PM) bptk421: /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS
(12:10:18 PM) diwanshuster: hello everyone
(12:10:29 PM) zubin
71: hello
(12:10:29 PM)
rene is now known as Guest54172
(12:10:42 PM) rico45: no patiance impatient
(12:10:59 PM)
bptk421: /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS
(12:11:05 PM) dholbach:
so as a first step, please enable "Source code" in System -> Administration -> Software Sources -> Ubuntu Software
(12:11:14 PM) mode (+o dholbach ) by ChanServ
(12:11:16 PM) diwanshuster: done
(12:11:18 PM)
Nomads: /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS
(12:11:19 PM) mode (+m ) by dholbach
(12:11:34 PM) qwebirc
71751 left the room (quit: Client Quit).
(12:11:59 PM) dholbach:
Once that's done, you'll notice a lot of entries that start with deb-src in /etc/apt/sources.list
(12:12:19 PM) dholbach:
I'll explain why we need it a bit later on
(12:12:2
7 PM) dholbach: afterwards, please run
(12:12:29 PM) dholbach:
sudo apt-get install --no-install-recommends ubuntu-dev-tools build-essential pbuilder
(12:12:33 PM) MaNU__ le
ft the room (quit: Read error: 54 (Connection reset by peer)).
(12:12:45 PM) dholbach: it will install a bunch of
very useful tools we're going to need for the session
(12:13:15 PM) dholbach:
ubuntu-dev-tools contains scripts that are very useful for packaging and repetitive tasks (it also depends on devscripts which has even more useful stuff)
(12:13:41 PM) dholbach: build-essential is necessary to do the most common tasks having to do with compiling and building
(12:13:54 PM) mode (+o popey ) by ChanServ
(12:13:5
7 PM) mode (+m ) by popey
(12:14:01 PM) mode (
-o popey ) by popey
(12:14:15 PM) dholbach: pbuilder is the perfect tool to build pac
kages in a sane and reproducable way
(12:15:00 PM) dholbach:
now please edit the file ~/.pbuilderrc (gedit, vi, emacs, whatever you like best)
(12:15:16 PM) dholbach: add the following line to it:
(12:15:
17 PM) dholbach: COMPONENTS="main universe multiverse restricted"
(12:15:19 PM) dholbach: and save it
(12:15:28 PM) dholbach: now please run:
(12:15:29 PM) dholbach: sudo pbuilder create
(12:15:50 PM) dholbach: it will set up a pbuilder instance for you which will take a while
(12:16:06 PM) dholbach: I forgot, please install gnupg too:
(12:16:09 PM) dholbach: sudo apt-get install gnupg
(12:
17:10 PM) dholbach: <_Fauchi95_> QUESTION: Do I need to use pbuilder or is that optional?
(12:
17:57 PM) dholbach: _Fauchi95_: pbuilder is a great tool to test-build a package in a separate and minimal environment - it's a great way to test the build
(12
:18:15 PM) dholbach: it's by no means a must, but I'll get back to the topic of testing in a bit
(12
:18:43 PM) dholbach: ok... while that's running, let's create a GPG Key - if you have one already you can lay back and relax
(12
:18:50 PM) dholbach: Please run
(12:18:53 PM) dholbach:
gpg --gen-key
(12
:19:33 PM) dholbach: we use GPG keys to sign packages to identify them as our own work and make sure they weren't tampered with
(12
:19:46 PM) dholbach: you can also use it to encrypt and sign other files and emails
(12:20:02 PM) dholbach:
https://help.ubuntu.com/community/GnuPrivacyGuardHowto has more info and I won't go into too much detail, using the defaults should be fine for now
(12:20:41 PM) dholbach:
give it your name and your preferred email address, that should be fine for now
(12:21:59 PM) dholbach:
once it's done, you can get your fingerprint and key id by running something like this:
(12:22:08 PM) dholbach:
gpg --fingerprint your.name@email.com
(12:22:2
7 PM) dholbach: mine says something like:
(12:22:31 PM) dholbach:
pub 1024D/059DD5EB 2007-09-29
(12:22:31 PM) dholbach:
Schl.-Fingerabdruck = 3E5C 0B3C 8987 79B9 A504 D7A5 463A E59D 059D D5EB
(12:22:31 PM) dholbach:
uid Daniel Holbach .......
(12:22:40 PM) dholbach:
059DD5EB is the key id
(12:23:49 PM) dholbach:
Afterwards please run
(12:23:58 PM) dholbach:
gpg --send-keys KEYID
(12:24:0
7 PM) dholbach: ie: gpg --send-keys 059DD5EB
(12
:24:28 PM) dholbach: this will upload your gpg key to the servers, so other people can identify your files and your emails as yours
(12
:24:55 PM) dholbach: as a next step, we need to upload it to Launchpad too
(12
:25:05 PM) dholbach: (if you have no Launchpad account yet, please visit https://launchpad.net/+login)
(12:26:26 PM) dholbach:
it seems like some people have a problem with gpg not having a default keyserver set, in that case, please add --keyserver keyserver.ubuntu.com
(12
:26:54 PM) dholbach: you can add your GPG key to Launchpad by visiting: https://launchpad.net/people/+me/+editpgpkeys
(12:2
7:47 PM) dholbach: ok, that should be it for preparations right now
(12:2
7:54 PM) dholbach: so what did we do
(12:
27:59 PM) dholbach: - install a bunch of tools
(12
:28:11 PM) dholbach: - created a pbuilder instance (which might be still running for some of you)
(12
:28:15 PM) dholbach: - created a GPG key
(12
:28:29 PM) dholbach: - uploaded the key to keyservers and launchpad
(12:29:12 PM) dholbach:
ok... so what do we do with Launchpad
(12:30:05 PM) dholbach:
Launchpad is used for everything in Ubuntu - Translations of packages, Bug Reports for packages, Specifications of new Ubuntu features, Code branches, and packages are also built there
(12
:30:12 PM) dholbach: that plus our whole team organisation
(12
:30:32 PM) dholbach: the great thing about Launchpad is that it is written by awesome people and it is Open Source
(12
:30:36 PM) dholbach: also... it's written in Python :)
(12
:30:58 PM) dholbach: We'll have a bunch of interesting Launchpad sessions too this week:
(12
:31:13 PM) dholbach: - Using the LP API for fun and profit -- leonardr (Tue 1st Sep, 19:00 UTC)
(12
:31:29 PM) dholbach: - Getting started with Launchpad development -- gmb (Wed 2nd Sep, 16:00 UTC)
(12
:31:54 PM) dholbach: - Being productive with bzr and LP code hosting - rockstar (Thu 3rd Sep, 19:00 UTC)
(12
:32:08 PM) dholbach: - Hacking Soyuz to get your builds done -- noodles775, cprov and wgrant (Fri 4th Sep, 20:00 UTC)
(12
:32:22 PM) dholbach: a lot of other sessions will probably briefly cover Launchpad too
(12
:33:39 PM) dholbach: <anurag213> Question:Not enough random bytes available. Please do some oth
(12
:34:03 PM) dholbach: anurag213: just let it sit there for a while - gnupg is getting more entrophy and random numbers from your machine
(12:34:28 PM) dholbach:
ok, next we'll tell the development tools who we are
(12
:34:41 PM) dholbach: just edit ~/.bashrc in your favourite editor
(12
:34:46 PM) dholbach: and add something like this to the end of it:
(12
:34:52 PM) dholbach: export DEBFULLNAME='Daniel Holbach'
(12
:34:52 PM) dholbach: export DEBEMAIL='daniel.holbach@ubuntu.com'
(12:34:59 PM) dholbach: then save it
(12
:35:08 PM) dholbach: and run source ~/.bashrc
(12
:35:47 PM) dholbach: alright... that should be it for now
(12
:35:50 PM) dholbach: so what's next
(12
:36:27 PM) dholbach: I'll talk a bit about source packages and what we do with them, how code gets changed, when we change which pieces of Ubuntu, who you can talk to, where you can find out more, etc. :)
(12
:36:39 PM) dholbach: then we'll do some hands-on package building :-)
(12
:37:03 PM) dholbach: so first of all, here's where you find more information:
(12:37:04 PM) dholbach:
https://wiki.ubuntu.com/MOTU/GettingStarted
(12
:37:17 PM) dholbach: bookmark the page! it links to all the important documents we have
(12
:37:20 PM) dholbach: among them:
(12
:37:27 PM) dholbach: - https://wiki.ubuntu.com/PackagingGuide
(12
:37:50 PM) dholbach: which has a lot of information about packaging in general
(12
:38:17 PM) dholbach: especially https://wiki.ubuntu.com/PackagingGuide/Recipes where you can find out how to use the tools easily
(12
:38:55 PM) dholbach: there's also https://wiki.ubuntu.com/MOTU/Videos which has a bunch of videos which talk about packaging, updating packages, patching stuff, etc.
(12
:39:36 PM) dholbach: - https://wiki.ubuntu.com/UbuntuDevelopment is important too because it explains how Ubuntu Development generally works, processes, who is responsible for what and so on
(12:40:01 PM) dholbach:
- https://wiki.ubuntu.com/Packaging/Training invites you to Packaging Training IRC sessions which happen every Thursday
(12
:40:13 PM) dholbach: the next one is going to be: Thursday 3rd September, 6:00 UTC, Ubuntu Development Q&A... with me :-)
(12
:41:30 PM) dholbach: ok, now let's have a look at https://wiki.ubuntu.com/ReleaseSchedule
(12
:41:50 PM) dholbach: it's a great way to understand more about Ubuntu Development if you know more about the different phases of the release
(12
:42:11 PM) riot_le is now known as Guest50469
(12:42:13 PM) dholbach: this is the schedule of the karmic release which we're working on right now - it's due for October 29th
(12
:43:16 PM) dholbach: in the first phase the new release is created in Launchpad and the toolchain is set up which means that the most important packages (like libc and gcc, the compiler collection) are bootstrapped
(12:43:35 PM) dholbach:
afterwards we start merging changes from Upstream and Debian (I'll go into more detail in a bit)
(12
:43:40 PM) dholbach: and then UDS happens
(12
:43:58 PM) dholbach: UDS is the Ubuntu Developer Summit where Ubuntu developers meet in real life to discuss and define new features
(12
:44:27 PM) dholbach: these often result into specifications where we exactly describe why we want the feature, how it's going to work, its impact and its implementation strategy
(12
:44:39 PM) dholbach: https://blueprints.launchpad.net/ubuntu should have a few you can take a look at
(12
:44:46 PM) dholbach: <alourie|vm> dholbach: how can a person participate in UDS?
(12
:45:14 PM) dholbach: alourie|vm: everybody is invited to attend UDS, so if you live close or are sponsored to go there you can participate locally
(12
:45:22 PM) dholbach: if you can't, you can participate via VOIP and IRC
(12
:45:37 PM) dholbach: <gotunandan> QUESTION : what do you mean by bootstrap ?
(12
:46:40 PM) dholbach: gotunandan: when the new toolchain is uploaded, you need to make sure the new gcc is built with the new libc6 and binutils, etc. - I unfortunately don't have much time to discuss it here, but #ubuntu-toolchain might be a good place to discuss it further
(12
:47:28 PM) dholbach: once the new features are all discussed and described in specifications people work on their features, upload new version of packages and we import a lot of packages from Debian
(12
:47:33 PM) dholbach: (more on that in a bit)
(12:47:57 PM) dholbach:
that all happens in the "green" part of https://wiki.ubuntu.com/ReleaseSchedule
(12
:48:11 PM) dholbach: "green" doesn't mean "it's all great here and it all works"!
(12
:48:25 PM) dholbach: it means that developers have a lot of freedom to work on things :)
(12
:48:47 PM) dholbach: if you want to participate you need to run the new development release IN SOME FORM
(12
:49:08 PM) dholbach: I say "in some form" because obviously you probably need your computer and can't have the kernel, libc, X or GNOME explode all the time :-)
(12
:49:21 PM) dholbach: https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases describes how to safely and sanely use the current development release
(12
:49:38 PM) dholbach: <trothigar> QUESTION: for packaging can you just run pbuilder for the development release?
(12
:49:46 PM) dholbach: trothigar: good question - just what I wanted to talk about :)
(12
:49:54 PM) dholbach: the answer is no
(12:50:0
7 PM) dholbach: test-building a package for karmic is a good start
(12
:50:23 PM) dholbach: but you definitely need to do this on karmic too:
(12
:50:23 PM) dholbach: _____ _____ ____ _____ ___ _ _ ____ _
(12
:50:24 PM) dholbach: |_ _| ____/ ___|_ _|_ _| \ | |/ ___| |
(12
:50:24 PM) dholbach: | | | _| \___ \ | | | || \| | | _| |
(12
:50:24 PM) dholbach: | | | |___ ___) || | | || |\ | |_| |_|
(12
:50:24 PM) dholbach: |_| |_____|____/ |_| |___|_| \_|\____(_)
(12
:50:41 PM) dholbach: which is why just "test building on karmic" is not good enough
(12
:51:04 PM) dholbach: https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases explains how to use a virtual machine, a chroot or a separate partition for your development work, so you don't hose the family computer :)
(12
:51:24 PM) dholbach: ok, moving on in the release schedule:
(12
:51:53 PM) dholbach: afterwards we have Feature Freeze (which we're in in karmic right now) where you need to get exceptions for uploading new upstream versions or other radical changes
(12
:52:08 PM) dholbach: at this time of the release some things might still be broken but the features should at least be half-way there
(12
:52:54 PM) dholbach: after that we introduce more and more freeze dates: UI, kernel, documentation, translations, etc.
(12
:53:11 PM) dholbach: one gets frozen every week so we get a very stable release that can be safely documented, translated and tested
(12
:53:18 PM) dholbach: <slacker_nl> QUESTION: are there automated testtools for package testing, eg tests for regression testing? or should that be provided by upstream?
(12
:53:23 PM) dholbach: slacker_nl: great question
(12
:53:59 PM) dholbach: there's a number of upstream developers (which means software authors) that provide us with test suites and very often they are run during the build to directly find out if things got broken in the new release
(12
:54:33 PM) dholbach: there's tools like pbuilder for safe test-building and there's tools like lintian that can check your packaging for you
(12
:55:48 PM) dholbach: ok... let's take a quick 5 minute break and we can get our hands dirty afterwards
(12:55:58 PM) dholbach: for all of you that need a new cup of tea or a drink or need to nip to the loo
(12
:56:05 PM) dholbach: see you in just a bit :-)
(01:00:22 PM) dholbach:
alright... let's kick off part 2
(01:00:56 PM) dholbach:
for all of you who just arrived: you can ask questions in #ubuntu-classroom-chat (please prefix with QUESTION:), logs will be available afterwards on https://wiki.ubuntu.com/UbuntuDeveloperWeek
(01:01:39 PM) dholbach:
Ok... now let's get some source package and let's try to test build it
(01:01:42 PM) dholbach: please run
(01:01:43 PM) dholbach:
apt-get source hello
(01:02:00 PM) dholbach:
if you have "Sources" enabled in Software Sources this should work now
(01:02:05 PM) dholbach: what it does it the following
(01:02:46 PM) dholbach: it will get the source package for the 'hello' package
(01:02:5
8 PM) dholbach: there's the distinction between the source packages and the binary packages
(01:03:16 PM) dholbach: what my Mom installs, the .deb
files are the binary packages which are a result of the build
(01:03:24 PM) dholbach: what we work on as Ubuntu developers is the source packages
(01:03:46 PM) dholbach: in the case of hello (on karmic) this means the following files:
(01:03:4
8 PM) dholbach: hello_2.4-1.diff.gz hello_2.4-1.dsc hello_2.4.orig.tar.gz
(01
:04:46 PM) dholbach: hello_2.4.orig.tar.gz means: the original source code that was released by the software authors of 'hello' in the version 2.4
(01:05:12 PM) dholbach:
the 'orig' is important - it means: this tar.gz file didn't receive any changes at all, it's just as it was downloaded from the hello homepage
(01
:05:16 PM) dholbach: (just renamed)
(01
:05:56 PM) dholbach: hello_2.4-1.diff.gz is the compressed set of changes that were applied by Debian (and Ubuntu) developers to make the source package build the Debian/Ubuntu way
(01
:06:53 PM) dholbach: so what does this mean "the debian/ubuntu way"?
(01
:07:15 PM) dholbach: some of you might have compile source code already, where you manually build software by running:
(01
:07:25 PM) dholbach: ./configure make sudo make install
(01:07:57 PM) dholbach: the packaging process basically wraps around those build commands and enables us to apply the same build process to every kind of package
(01:0
8:17 PM) dholbach: so it doesn't matter if it's a python program, a set oh PHP modules, something written in C or something to do with Perl
(01:08:35 PM) dholbach: also you add some meta information li
ke the package name, a description, etc.
(01:09:06 PM) dholbach:
The session "Packaging from scratch" -- Laney on Friday will talk about that in more detail
(01
:09:23 PM) dholbach: also "Learning from mistakes - REVU reviewing best practices" -- mok0 on Thursday will have useful tips
(01
:09:40 PM) dholbach: <[BIOS]Dnivra> QUESTION: Why is dpkg-dev needed? I get an error it's not installed. isn't it available in the ubuntu repository?
(01
:09:43 PM) dholbach: sorry, please run
(01:09:47 PM) dholbach: sudo apt-get install dpkg-dev
(01:09:55 PM) dholbach: it's needed too, I thought it would be pulled in
(01:10:03 PM) dholbach: just run
(01:10:0
8 PM) dholbach: dpkg-source -x *.dsc
(01:10:12 PM) dholbach: afterwards and you'll be fine
(01:10:
18 PM) dholbach: I'll get to the purpose of it in just a bit
(01:11:09 PM) dholbach:
<[BIOS]Goo> QUESTION:Could you elucidate "wraps around those build commands"
(01:11:17 PM) dholbach:
[BIOS]Goo: ok, let's go into some more detail
(01:11:5
8 PM) dholbach: so a regular application written in C will often require you to run something like ./configure; make; make install; etc.
(01:12:30 PM) dholbach:
a python application that uses distutils might need something like invocations of python ./setup.py ....
(01:12:51 PM) dholbach:
sometimes for a package to work afterwards (some simple scripts) it will be enough to just copy them where they belong
(01
:13:30 PM) dholbach: the package build process can be divided into steps like configuration, compilation, installation, something that happens post-installation and so on
(01
:13:36 PM) dholbach: think of it as a "meta build process"
(01
:13:57 PM) dholbach: that process is specified in the debian policy and we make use of that
(01
:14:26 PM) dholbach: the great thing about this standardisation is: our tools all treat source packages the same way, no matter what weird way they work internally
(01
:14:41 PM) dholbach: moving on :)
(01:15:0
4 PM) dholbach: hello_2.4-1.dsc just contains meta data of the package like md5sums and so on
(01
:15:53 PM) dholbach: so what apt-get source (or more specifically dpkg-source -x *.dsc) did was:
(01
:16:02 PM) dholbach: - unpack hello_2.4.orig.tar.gz
(01
:16:15 PM) dholbach: - unpack and apply the patch with our changes hello_2.4-1.diff.gz
(01
:16:25 PM) dholbach: so you should be able to see the hello-2.4 directory
(01
:16:34 PM) dholbach: (or hello-2.3 if you're on an older version)
(01
:16:54 PM) dholbach: this directory should contain a debian/ directory which basically contains all the packaging
(01
:17:07 PM) dholbach: daniel@miyazaki:~$ ls hello-2.4/debian/
(01
:17:07 PM) dholbach: changelog control copyright postinst prerm rules watch
(01
:17:07 PM) dholbach: daniel@miyazaki:~$
(01:17:17 PM) dholbach: I won't explain every last detail now, just very quickly
(01:17:36 PM) dholbach: - changelog: descriptions of all the packaging changes (one new entry per new version that was uploaded to the archive)
(01:
18:01 PM) dholbach: - control: information about the source package (who maintains it, where's the homepage, which packages are necessary to build it, etc.) and the resulting binary package(s)
(01:18:14 PM) dholbach: - copyright: licensing and copyright information of the software
(01:18:2
7 PM) dholbach: - rules: how is the package build, how does the meta build process work
(01:18:32 PM) dholbach: we can safel
y ignore the others for now
(01:
18:58 PM) dholbach: alright... now let's test-build the package
(01
:19:07 PM) dholbach: if your pbuilder setup succeeded, you just run the following
(01
:19:14 PM) dholbach: sudo pbuilder build hello_2.4-1.dsc
(01
:19:53 PM) dholbach: if it works out, you should be able to have a look at /var/cache/pbuilder/result/hello_*.deb afterwards
(01:20:03 PM) dholbach:
this should work
(01:20:05 PM) dholbach:
less /var/cache/pbuilder/result/hello_*.deb
(01:20:43 PM) dholbach:
this will show you the contents of the package, its size and dependencies, etc.
(01:21:15 PM) dholbach:
if you have a look at the build log you will see what happened there:
(01:21:40 PM) dholbach:
first the separate build environment was set up, then some additional packages installed
(01:22:25 PM) dholbach:
then ./configure was run, then the actual compilation of the source code happened, then some files were installed and then they were all glued together in /var/cache/pbuilder/result/hello_*.deb, then the build environment torn down again
(01:22:41 PM) dholbach:
the fine thing about pbuilder is that it will store all the packages that are necessary to build a package
(01:22:49 PM) dholbach:
and you don't need to download them over and over again
(01
:23:33 PM) dholbach: <alourie|vm> dholbach: QUESTION: what if packages need an update?
(01
:23:46 PM) dholbach: alourie|vm: you run sudo pbuilder update (similar to apt-get update)
(01
:23:54 PM) dholbach: <trothigar> QUESTION: presumably the build deps are downloaded as binaries. Does pbuilder share the same cache as apt?
(01:23:59 PM) dholbach: trothigar: you can set it up that way
(01
:24:10 PM) dholbach: https://wiki.ubuntu.com/PbuilderHowto should have more information on the topic
(01:25:0
4 PM) dholbach: it came up in -chat a couple of times, so here goes:
(01
:25:06 PM) dholbach: <RainCT> penguin42: Yeah. Using pbuilder-dist (from ubuntu-dev-tools) is a great way to achieve that
(01
:25:22 PM) dholbach: pbuilder-dist is a fine tool to test-build packages for various ubuntu and debian releases
(01
:25:29 PM) dholbach: talk to RainCT to find out more about it :)
(01
:25:57 PM) dholbach: ok... so how does Ubuntu Development work? what do people do with those .dsc .diff.gz and .orig.tar.gz files
(01
:26:37 PM) dholbach: basically for every change that is done to a package a new source package must be uploaded to the Launchpad build servers
(01
:26:59 PM) dholbach: that's where the gpg key comes in, if you're not part of the team (I'll get to that in a sec), it will reject your changes
(01
:27:20 PM) dholbach: the same applies for Launchpad Personal Package Archives (https://help.launchpad.net/Packaging/PPA)
(01:27:45 PM) dholbach: you can think of it as a primitive (sorry everybody) version control system
(01:2
8:16 PM) dholbach: Developer A makes a change and uploads version 2.4-2 of hello
(01:2
8:33 PM) dholbach: and I can get it via apt-get source hello later on and improve it some more if I like
(01:29:0
8 PM) dholbach: there are efforts going on to make more use of distributed revision control (using Bazaar on Launchpad) and Mr James Westby will talk about that later in the week
(01
:29:09 PM) dholbach: Friday 4th September, 18:00 UTC - Fixing an Ubuntu bug using Bazaar -- james_w
(01
:29:51 PM) dholbach: so how would you go about sending in changes now that you're not part of the team yet
(01
:30:24 PM) dholbach: easy: come to tomorrow's session "Fixing small bugs in Ubuntu" and learn how to produce patches
(01
:30:40 PM) dholbach: once you have the patch, you attach it to a bug report and subscribe the reviewers team
(01
:31:01 PM) dholbach: they'll give you a review and some advice and upload the change for you once it's all good
(01
:31:17 PM) dholbach: basically they'll download the source package, apply your changes, sign it with they gpg key and upload it for you
(01
:31:26 PM) dholbach: <msp301> QUESTION: what would happen in the case that two users happen to update at the same time on Launchpad??
(01
:31:46 PM) dholbach: msp301: those collisions happen every now and then, Launchpad will just use the one that was milliseconds before and throw away the other :)
(01
:31:54 PM) dholbach: <alourie|vm> dholbach: QUESTION: how do we prepare patches?
(01
:32:09 PM) dholbach: alourie|vm: tomorrow, 16:00 UTC, this place :-)
(01:32:3
8 PM) dholbach: find more detail about the reviewers team and how to get stuff uploaded at: https://wiki.ubuntu.com/SponsorshipProcess
(01
:33:20 PM) dholbach: once the reviewers are happy with your general work and get tired of uploading and reviewing myriads of changes for you, they'll tell you that and you can send your application for upload rights :-)
(01
:33:31 PM) dholbach: https://wiki.ubuntu.com/UbuntuDevelopers explains the process
(01
:33:59 PM) dholbach: ok... that roughly explains how Ubuntu works
(01
:34:25 PM) dholbach: there's the release schedule with freeze dates, there's people working with source packages, there's bug reports and people attaching patches to them
(01
:34:33 PM) dholbach: there's packages getting built, downloaded and tested
(01
:34:42 PM) dholbach: but that doesn't explain how developers interact
(01
:34:47 PM) dholbach: there's mailing lists and IRC
(01:35:0
8 PM) dholbach: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu and #ubuntu-motu should be interesting for you
(01
:35:23 PM) dholbach: because these channels contain the most awesome and frienly people that can help you out
(01
:35:42 PM) dholbach: there's lots more mailing lists: https://lists.ubuntu.com/
(01
:35:56 PM) dholbach: and there's lots more irc channels: https://help.ubuntu.com/community/InternetRelayChat
(01
:36:02 PM) dholbach: but try to take one step at a time :-)
(01
:36:06 PM) dholbach: it can be a bit overwhelming :)
(01
:36:15 PM) dholbach: <bogor> QUESTION: Does building package in my pc will have it installed in my machine. If yes then how do i uninstall it if somethings goes wrong?
(01
:36:28 PM) dholbach: bogor: no, you have to explicitly install the package, running sudo dpkg -i bla.deb
(01
:36:44 PM) dholbach: that's why you probably best check out https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases
(01
:36:57 PM) dholbach: which explains how to have a separate, up-to-date development environment
(01
:37:05 PM) dholbach: <slacker_nl> QUESTION: you've talked about development releases, what about backports, how does that process work, when does a package get backported?
(01
:37:07 PM) dholbach: slacker_nl: good one
(01
:37:40 PM) dholbach: slacker_nl: so we all work on karmic now.... it's going to be released on October 29th
(01
:37:47 PM) dholbach: afterwards the karmic will be frozen
(01
:37:51 PM) dholbach: no uploads to karmic anymore
(01
:38:09 PM) dholbach: afterwards only uploads to karmic-security karmic-updates and karmic-backports are accepted
(01
:38:44 PM) dholbach: Effectively testing for regressions -- sbeattie on Thursday will have more information on that
(01
:38:54 PM) dholbach: https://wiki.ubuntu.com/SRU also explains it in more detail
(01
:39:06 PM) dholbach: <openweek0_> QUESTION: where do i join if i wanna participate in gnome desktop env development?
(01
:39:20 PM) dholbach: openweek0_: check out https://wiki.ubuntu.com/Teams for more information on various teams within Ubuntu
(01
:39:52 PM) dholbach: <msp301> QUESTION: is that the same with LTS releases ? retricted updates etc ??
(01
:40:06 PM) dholbach: msp301: no, what I just mentioned above concerns all releases, LTS or not
(01
:40:25 PM) dholbach: LTS is just supported for longer than the "regular" 18 months, it's 3 years of support on the desktop and 5 on the server
(01
:40:39 PM) dholbach: <c_korn> QUESTION: can I safely run "sudo rm -rf /var/cache/pbuilder/" to purge pbuilder ?
(01
:40:41 PM) dholbach: c_korn: yes
(01
:40:57 PM) dholbach: ok, now that we know how developers interact, one thing is VERY important
(01
:41:06 PM) dholbach: always document changes you are about to make as good as you can
(01
:41:32 PM) dholbach: we have people living in various parts on earth, speaking different languages and having different skill sets
(01
:41:56 PM) dholbach: as we maintain all packages together as one big team it's important that other developers don't have to second guess what you might have meant
(01
:42:16 PM) dholbach: also in 6 months time you probably don't want to second guess your own patches or documentation :)
(01
:43:04 PM) dholbach: ok... speaking of patches and developers: we're not alone in the open source world
(01
:43:24 PM) dholbach: we inherit a great deal of good stuff from the Debian project and other projects
(01
:43:47 PM) dholbach: if we make changes we want to make sure to contribute them back to Debian, so let's take a quick look back at the hello example
(01
:44:00 PM) dholbach: 2.4-1 is the version in karmic
(01
:44:02 PM) dholbach: this means:
(01
:44:25 PM) dholbach: - 2.4 is the release that was done by the authors of hello on their homepage
(01
:44:37 PM) dholbach: - "-1" means that one revision of 2.4 was done in Debian and we inherited that
(01
:44:45 PM) dholbach: debian/changelog has more information on what happened there
(01
:44:55 PM) dholbach: if I was to do a change for Karmic, the new version string would be
(01
:45:01 PM) dholbach: 2.4-1ubuntu1
(01
:45:19 PM) dholbach: meaning: still 2.4 upstream release, one (inherited) debian revision, one Ubuntu change
(01
:46:07 PM) dholbach: this also means that in the new Ubuntu release (karmic+1) we can't just copy (we call it 'sync') the package from debian, as we might overwrite the changes that I did in 2.4-1ubuntu1
(01
:46:50 PM) dholbach: if there was a 2.5-1 in Debian, we'd need to very closely check if we can just overwrite my changes or if I need to merge the manually into the 2.5-1 Debian version (and thus get 2.5-1ubuntu1)
(01
:47:15 PM) dholbach: to be able to sync as much as possible and share the same codebase all over it's necessary to send patches upstream
(01
:47:37 PM) dholbach: On Wednesday we'll have a session called " Bug lifecycle, Best practices, Workflow, Tags, Upstream, Big picture" by jcastro and pedro_ who will talk about that some more
(01:4
8:00 PM) dholbach: <aacool> QUESTION: what do I run to test hello after the pbuilder build completes?
(01
:48:23 PM) dholbach: aacool: you'd run sudo dpkg -i /var/cache/pbuilder/result/hello*.deb to install the resulting package
(01
:48:25 PM) dholbach: and then run
(01
:48:27 PM) dholbach: hello
(01
:48:33 PM) dholbach: in the command line :-)
(01
:48:41 PM) dholbach: <penguin42> QUESTION: What happens with package numbering when ubuntu brings out a newer upstream version before debian does, then debian catches up?
(01
:48:44 PM) dholbach: penguin42: nice one :)
(01:49:03 PM) dholbach:
so let's say Debian is still on 2.4-1 and we discover there's a new release out by the hello upstream guys
(01
:49:09 PM) dholbach: we'd call it 2.5-0ubuntu1
(01
:49:33 PM) dholbach: to indicate: it's upstream 2.5, we didn't get a revision of it from Debian, but have the first revision of it in Ubuntu
(01
:49:42 PM) dholbach: <[BIOS]Goo> QUESTION: Since Ubuntu is debian based, can i follow the same package building process for Debian as well?(using pbuild)
(01
:49:50 PM) dholbach: [BIOS]Goo: essentially, yes
(01
:50:07 PM) dholbach: https://wiki.ubuntu.com/UbuntuPackagingChanges explains what's different in the Ubuntu world
(01
:50:19 PM) dholbach: <norax> QUESTION: What's the order? I mean hello.2.4-1 is before or after hello.2.10-1 ? If before, What goes after hello.2.10-1_ubuntu9? If after what happend if the upstream developer use a different notation?
(01
:50:35 PM) dholbach: norax: first 2.4-1 then 2.10-1
(01
:50:46 PM) dholbach: to be on the safe side, you can do this
(01
:51:10 PM) dholbach: daniel@miyazaki:~$ dpkg --compare-versions 2.10-1 gt 2.4-1 && echo TRUE
(01
:51:10 PM) dholbach: TRUE
(01
:51:10 PM) dholbach: daniel@miyazaki:~$
(01
:51:23 PM) dholbach: dpkg is always authoritative on package versions
(01
:51:42 PM) dholbach: the command above checks if 2.10-1 is greater than 2.4-1 and print TRUE if it's true :)
(01
:51:55 PM) dholbach: <soyrochus> QUESTION: Probably for last; how to clean up a system after using pbuilder. Not just apt-get remove, but more importantly removing all remants of local repositories, build remnants etc.
(01
:52:10 PM) dholbach: soyrochus: just deinstall the packages that we installed, remove ~/.pbuilderrc and /var/cache/pbuilder
(01
:52:14 PM) dholbach: that should get you there
(01
:52:24 PM) dholbach: but more practically: use a virtual machine
(01
:52:37 PM) dholbach: https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases
(01
:52:47 PM) dholbach: . o O { I didn't think that would be the most usef link today :-) }
(01
:53:01 PM) dholbach: <playya> QUESTION: is it possibleto generate the debian/* file out of git TAGS, log,... and configure.ac?
(01
:53:37 PM) dholbach: playya: yes, some people use distributed revision control for 1) the packaging itself and 2) packaging upstream snapshots from bzr/git/svn/cvs/etc
(01
:53:49 PM) dholbach: <slacker_nl> QUESTION: regarding giving back: what is prefered, create a debian package and wait for Ubuntu to sync with debian or to create a ubuntu package directly? does debian sync with ubuntu?
(01:53:56 PM) dholbach: slacker_nl: that depends on the release schedule
(01
:54:28 PM) dholbach: slacker_nl: if we're a week away from release and the fix is critical we might ask somebody from upstream for advice, but we won't block on them if we know that we need that fix
(01
:54:44 PM) dholbach: https://wiki.ubuntu.com/Upstream has more info on our collaboration with upstreams
(01
:55:16 PM) dholbach: ok... as last tips I'd like to give you:
(01
:55:22 PM) dholbach: https://wiki.ubuntu.com/MOTU/GettingStarted
(01
:55:26 PM) dholbach: because it links to all the important stuff
(01
:55:39 PM) dholbach: https://wiki.ubuntu.com/Packaging/Training
(01
:56:04 PM) dholbach: because of the session we'll have on thursday: general questions and answers about Ubuntu development, this place
(01:56:19 PM) dholbach:
also please join us in #ubuntu-motu on irc.freenode.net
(01
:56:25 PM) dholbach: and on the ubuntu-motu mailing list
(01
:56:35 PM) dholbach: I really hope to see all of you during the great sessions we have this week
(01
:56:45 PM) dholbach: and hope to see you all as Ubuntu contributors really really soon
(01
:56:53 PM) dholbach: make me proud! :-)
(01:56:5
8 PM) mode (-m ) by dholbach
(01
:57:04 PM) huats: thanks dholbach !
(01
:57:07 PM) dholbach: thanks everybody - have a great Ubuntu Developer Week!

Dev Week -- Getting Started with UbuntuDevelopment -- dholbach -- Mon, Aug 31st, 2009

IRC Logs Transcript

(12:02:03 PM) dholbach: My name is Daniel Holbach... any questions after the session, ideas for improvement, pieces of advice, nice comments and cheques please to dholbach at ubuntu dot com.
(12:02:21 PM) dholbach: I'll be your host for the first two sessions which will be all about "Getting Started with Ubuntu Development".
(12:02:22 PM) credobyte: & me
(12:02:30 PM) rish: ok, dholbach let's start
(12:02:31 PM) rubial: dholbach: funny name
(12:02:37 PM) dholbach: so let's first dive into a bit of organisational stuff
(12:02:39 PM) rubial: go go go
(12:02:51 PM) dholbach: I noticed a bunch of people I already know but there's a lot of new "faces" here too
(12:02:57 PM) codeanu: ya
(12:03:11 PM) riot_ is now known as riot_le
(12:03:24 PM) dholbach: We're around 300 people in here already, which is why ALL QUESTIONS and ALL CHATTER go to #ubuntu-classroom-chat instead of #ubuntu-classroom
(12:03:33 PM) dholbach: else the logs will be totally unreadable afterwards
(12:03:52 PM) Panikos: and me +
(12:03:54 PM) the-dude: will logs be saved?
(12:03:56 PM) tiax: won't you set +m?
(12:04:00 PM) dholbach: the-dude: yes
(12:04:06 PM) dholbach: so if you're not in #ubuntu-classroom-chat yet, please join the channel now
(12:04:34 PM) robbbb left the room.
(12:04:35 PM) ***popey hugs dholbach 
(12:04:52 PM) dholbach: in #ubuntu-classroom-chat please prefix your questions with "QUESTION: "
(12:05:08 PM) dholbach: ie: "QUESTION: Do you like doing Ubuntu Development?"
(12:05:25 PM) qwebirc16121 is now known as rico45
(12:05:35 PM) dholbach: also for those not fluent in English, we have irc channels where you can ask questions in your language, they will be translated into English for you
(12:05:40 PM) dholbach:  - Catalan: #ubuntu-classroom-chat-ca
(12:05:40 PM) dholbach:  - Danish:  #ubuntu-nordic-dev
(12:05:40 PM) dholbach:  - Finnish: #ubuntu-fi-devel
(12:05:40 PM) dholbach:  - German:  #ubuntu-classroom-chat-de
(12:05:40 PM) dholbach:  - Spanish: #ubuntu-classroom-chat-es
(12:05:41 PM) dholbach:  - French:  #u-classroom
(12:05:54 PM) dholbach: if there's other channels for other languages, please announce them in #ubuntu-classroom-chat
(12:06:21 PM) dholbach: Alright... another piece of advice:
(12:06:22 PM) ScottTesterman left the room (quit: ).
(12:06:38 PM) dholbach: https://wiki.ubuntu.com/UbuntuDeveloperWeek lists the timetable and links to a beautiful brochure that has more information
(12:06:41 PM) raji left the room (quit: Read error: 104 (Connection reset by peer)).
(12:06:54 PM) dholbach: https://wiki.ubuntu.com/UbuntuDeveloperWeek/Sessions should tell you if you need to prepare for any session
(12:06:56 PM) ScottTesterman [n=quassel@74.235.4.36] entered the room.
(12:07:10 PM) dholbach: https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/glossary has some useful glossary for abbreviations and stuff
(12:08:01 PM) dholbach: alright... that should be everything organisational for now... just bookmark https://wiki.ubuntu.com/UbuntuDeveloperWeek and you'll be fine for this week :-)
(12:08:07 PM) dholbach: so let's get the session started
(12:08:10 PM) frandieguez_ left the room (quit: "Ex-Chat").
(12:08:29 PM) qwebirc71751: hey
(12:08:44 PM) qwebirc71751: lets get it started
(12:08:59 PM) dholbach: qwebirc71751: chatter and questions please in #ubuntu-classroom-chat
(12:09:01 PM) MaNU__: lets start
(12:09:09 PM) rish: will you all stop talking and let dholbach speak?
(12:09:26 PM) dholbach: my aim for the session is to get you from "How can I help out? I can't code in C/C++." (a question I get very often) to "Ah, I understand things much better now, I know where to look things up and who to ask."
(12:09:28 PM) rico45: pls start
(12:09:44 PM) zubin71: pls start
(12:09:50 PM) dholbach: so I'll cover a bunch of more general topics and help you set up a development environment
(12:10:00 PM) credobyte: zubin71: patiance :)
(12:10:17 PM) bptk421:  /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS
(12:10:18 PM) diwanshuster: hello everyone
(12:10:29 PM) zubin71: hello
(12:10:29 PM) rene is now known as Guest54172
(12:10:42 PM) rico45: no patiance impatient
(12:10:59 PM) bptk421:  /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS
(12:11:05 PM) dholbach: so as a first step, please enable "Source code" in System -> Administration -> Software Sources -> Ubuntu Software
(12:11:14 PM) mode (+o dholbach ) by ChanServ
(12:11:16 PM) diwanshuster: done
(12:11:18 PM) Nomads:  /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS
(12:11:19 PM) mode (+m ) by dholbach
(12:11:34 PM) qwebirc71751 left the room (quit: Client Quit).
(12:11:59 PM) dholbach: Once that's done, you'll notice a lot of entries that start with deb-src in /etc/apt/sources.list
(12:12:19 PM) dholbach: I'll explain why we need it a bit later on
(12:12:27 PM) dholbach: afterwards, please run
(12:12:29 PM) dholbach:    sudo apt-get install --no-install-recommends ubuntu-dev-tools build-essential pbuilder
(12:12:33 PM) MaNU__ left the room (quit: Read error: 54 (Connection reset by peer)).
(12:12:45 PM) dholbach: it will install a bunch of very useful tools we're going to need for the session
(12:13:15 PM) dholbach: ubuntu-dev-tools contains scripts that are very useful for packaging and repetitive tasks (it also depends on devscripts which has even more useful stuff)
(12:13:41 PM) dholbach: build-essential is necessary to do the most common tasks having to do with compiling and building
(12:13:54 PM) mode (+o popey ) by ChanServ
(12:13:57 PM) mode (+m ) by popey
(12:14:01 PM) mode (-o popey ) by popey
(12:14:15 PM) dholbach: pbuilder is the perfect tool to build packages in a sane and reproducable way
(12:15:00 PM) dholbach: now please edit the file    ~/.pbuilderrc    (gedit, vi, emacs, whatever you like best)
(12:15:16 PM) dholbach: add the following line to it:
(12:15:17 PM) dholbach: COMPONENTS="main universe multiverse restricted"
(12:15:19 PM) dholbach: and save it
(12:15:28 PM) dholbach: now please run:
(12:15:29 PM) dholbach:    sudo pbuilder create
(12:15:50 PM) dholbach: it will set up a pbuilder instance for you which will take a while
(12:16:06 PM) dholbach: I forgot, please install gnupg too:
(12:16:09 PM) dholbach:   sudo apt-get install gnupg
(12:17:10 PM) dholbach: <_Fauchi95_> QUESTION: Do I need to use pbuilder or is that optional?
(12:17:57 PM) dholbach: _Fauchi95_: pbuilder is a great tool to test-build a package in a separate and minimal environment - it's a great way to test the build
(12:18:15 PM) dholbach: it's by no means a must, but I'll get back to the topic of testing in a bit
(12:18:43 PM) dholbach: ok... while that's running, let's create a GPG Key - if you have one already you can lay back and relax
(12:18:50 PM) dholbach: Please run
(12:18:53 PM) dholbach:   gpg --gen-key
(12:19:33 PM) dholbach: we use GPG keys to sign packages to identify them as our own work and make sure they weren't tampered with
(12:19:46 PM) dholbach: you can also use it to encrypt and sign other files and emails
(12:20:02 PM) dholbach: https://help.ubuntu.com/community/GnuPrivacyGuardHowto has more info and I won't go into too much detail, using the defaults should be fine for now
(12:20:41 PM) dholbach: give it your name and your preferred email address, that should be fine for now
(12:21:59 PM) dholbach: once it's done, you can get your fingerprint and key id by running something like this:
(12:22:08 PM) dholbach:    gpg --fingerprint your.name@email.com
(12:22:27 PM) dholbach: mine says something like:
(12:22:31 PM) dholbach: pub   1024D/059DD5EB 2007-09-29
(12:22:31 PM) dholbach:       Schl.-Fingerabdruck = 3E5C 0B3C 8987 79B9 A504  D7A5 463A E59D 059D D5EB
(12:22:31 PM) dholbach: uid                  Daniel Holbach .......
(12:22:40 PM) dholbach: 059DD5EB is the key id
(12:23:49 PM) dholbach: Afterwards please run
(12:23:58 PM) dholbach:    gpg --send-keys KEYID
(12:24:07 PM) dholbach: ie: gpg --send-keys 059DD5EB
(12:24:28 PM) dholbach: this will upload your gpg key to the servers, so other people can identify your files and your emails as yours
(12:24:55 PM) dholbach: as a next step, we need to upload it to Launchpad too
(12:25:05 PM) dholbach: (if you have no Launchpad account yet, please visit https://launchpad.net/+login)
(12:26:26 PM) dholbach: it seems like some people have a problem with gpg not having a default keyserver set, in that case, please add  --keyserver keyserver.ubuntu.com
(12:26:54 PM) dholbach: you can add your GPG key to Launchpad by visiting: https://launchpad.net/people/+me/+editpgpkeys
(12:27:47 PM) dholbach: ok, that should be it for preparations right now
(12:27:54 PM) dholbach: so what did we do
(12:27:59 PM) dholbach:  - install a bunch of tools
(12:28:11 PM) dholbach:  - created a pbuilder instance (which might be still running for some of you)
(12:28:15 PM) dholbach:  - created a GPG key
(12:28:29 PM) dholbach:  - uploaded the key to keyservers and launchpad
(12:29:12 PM) dholbach: ok... so what do we do with Launchpad
(12:30:05 PM) dholbach: Launchpad is used for everything in Ubuntu - Translations of packages, Bug Reports for packages, Specifications of new Ubuntu features, Code branches, and packages are also built there
(12:30:12 PM) dholbach: that plus our whole team organisation
(12:30:32 PM) dholbach: the great thing about Launchpad is that it is written by awesome people and it is Open Source
(12:30:36 PM) dholbach: also... it's written in Python :)
(12:30:58 PM) dholbach: We'll have a bunch of interesting Launchpad sessions too this week:
(12:31:13 PM) dholbach:  -  Using the LP API for fun and profit -- leonardr (Tue 1st Sep, 19:00 UTC)
(12:31:29 PM) dholbach:  -  Getting started with Launchpad development -- gmb  (Wed 2nd Sep, 16:00 UTC)
(12:31:54 PM) dholbach:  -  Being productive with bzr and LP code hosting - rockstar (Thu 3rd Sep, 19:00 UTC)
(12:32:08 PM) dholbach:  -  Hacking Soyuz to get your builds done -- noodles775, cprov and wgrant (Fri 4th Sep, 20:00 UTC)
(12:32:22 PM) dholbach: a lot of other sessions will probably briefly cover Launchpad too
(12:33:39 PM) dholbach: <anurag213> Question:Not enough random bytes available.  Please do some oth
(12:34:03 PM) dholbach: anurag213: just let it sit there for a while - gnupg is getting more entrophy and random numbers from your machine
(12:34:28 PM) dholbach: ok, next we'll tell the development tools who we are
(12:34:41 PM) dholbach: just edit  ~/.bashrc  in your favourite editor
(12:34:46 PM) dholbach: and add something like this to the end of it:
(12:34:52 PM) dholbach:    export DEBFULLNAME='Daniel Holbach'
(12:34:52 PM) dholbach:    export DEBEMAIL='daniel.holbach@ubuntu.com'
(12:34:59 PM) dholbach: then save it
(12:35:08 PM) dholbach: and run    source ~/.bashrc
(12:35:47 PM) dholbach: alright... that should be it for now
(12:35:50 PM) dholbach: so what's next
(12:36:27 PM) dholbach: I'll talk a bit about source packages and what we do with them, how code gets changed, when we change which pieces of Ubuntu, who you can talk to, where you can find out more, etc. :)
(12:36:39 PM) dholbach: then we'll do some hands-on package building :-)
(12:37:03 PM) dholbach: so first of all, here's where you find more information:
(12:37:04 PM) dholbach:  https://wiki.ubuntu.com/MOTU/GettingStarted
(12:37:17 PM) dholbach: bookmark the page! it links to all the important documents we have
(12:37:20 PM) dholbach: among them:
(12:37:27 PM) dholbach:   - https://wiki.ubuntu.com/PackagingGuide
(12:37:50 PM) dholbach:      which has a lot of information about packaging in general
(12:38:17 PM) dholbach:      especially https://wiki.ubuntu.com/PackagingGuide/Recipes where you can find out how to use the tools easily
(12:38:55 PM) dholbach:      there's also https://wiki.ubuntu.com/MOTU/Videos which has a bunch of videos which talk about packaging, updating packages, patching stuff, etc.
(12:39:36 PM) dholbach:   -  https://wiki.ubuntu.com/UbuntuDevelopment is important too because it explains how Ubuntu Development generally works, processes, who is responsible for what and so on
(12:40:01 PM) dholbach:   - https://wiki.ubuntu.com/Packaging/Training invites you to Packaging Training IRC sessions which happen every Thursday
(12:40:13 PM) dholbach: the next one is going to be: Thursday 3rd September, 6:00 UTC, Ubuntu Development Q&A... with me :-)
(12:41:30 PM) dholbach: ok, now let's have a look at https://wiki.ubuntu.com/ReleaseSchedule
(12:41:50 PM) dholbach: it's a great way to understand more about Ubuntu Development if you know more about the different phases of the release
(12:42:11 PM) riot_le is now known as Guest50469
(12:42:13 PM) dholbach: this is the schedule of the karmic release which we're working on right now - it's due for October 29th
(12:43:16 PM) dholbach: in the first phase the new release is created in Launchpad and the toolchain is set up which means that the most important packages (like libc and gcc, the compiler collection) are bootstrapped
(12:43:35 PM) dholbach: afterwards we start merging changes from Upstream and Debian (I'll go into more detail in a bit)
(12:43:40 PM) dholbach: and then UDS happens
(12:43:58 PM) dholbach: UDS is the Ubuntu Developer Summit where Ubuntu developers meet in real life to discuss and define new features
(12:44:27 PM) dholbach: these often result into specifications where we exactly describe why we want the feature, how it's going to work, its impact and its implementation strategy
(12:44:39 PM) dholbach: https://blueprints.launchpad.net/ubuntu should have a few you can take a look at
(12:44:46 PM) dholbach: <alourie|vm> dholbach: how can a person participate in UDS?
(12:45:14 PM) dholbach: alourie|vm: everybody is invited to attend UDS, so if you live close or are sponsored to go there you can participate locally
(12:45:22 PM) dholbach: if you can't, you can participate via VOIP and IRC
(12:45:37 PM) dholbach: <gotunandan> QUESTION : what do you mean by bootstrap ?
(12:46:40 PM) dholbach: gotunandan: when the new toolchain is uploaded, you need to make sure the new gcc is built with the new libc6 and binutils, etc. - I unfortunately don't have much time to discuss it here, but #ubuntu-toolchain might be a good place to discuss it further
(12:47:28 PM) dholbach: once the new features are all discussed and described in specifications people work on their features, upload new version of packages and we import a lot of packages from Debian
(12:47:33 PM) dholbach: (more on that in a bit)
(12:47:57 PM) dholbach: that all happens in the "green" part of     https://wiki.ubuntu.com/ReleaseSchedule
(12:48:11 PM) dholbach: "green" doesn't mean "it's all great here and it all works"!
(12:48:25 PM) dholbach: it means that developers have a lot of freedom to work on things :)
(12:48:47 PM) dholbach: if you want to participate you need to run the new development release IN SOME FORM
(12:49:08 PM) dholbach: I say "in some form" because obviously you probably need your computer and can't have the kernel, libc, X or GNOME explode all the time :-)
(12:49:21 PM) dholbach: https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases describes how to safely and sanely use the current development release
(12:49:38 PM) dholbach: <trothigar> QUESTION: for packaging can you just run pbuilder for the development release?
(12:49:46 PM) dholbach: trothigar: good question - just what I wanted to talk about :)
(12:49:54 PM) dholbach: the answer is no
(12:50:07 PM) dholbach: test-building a package for karmic is a good start
(12:50:23 PM) dholbach: but you definitely need to do this on karmic too:
(12:50:23 PM) dholbach:   _____ _____ ____ _____ ___ _   _  ____ _
(12:50:24 PM) dholbach:  |_   _| ____/ ___|_   _|_ _| \ | |/ ___| |
(12:50:24 PM) dholbach:    | | |  _| \___ \ | |  | ||  \| | |  _| |
(12:50:24 PM) dholbach:    | | | |___ ___) || |  | || |\  | |_| |_|
(12:50:24 PM) dholbach:    |_| |_____|____/ |_| |___|_| \_|\____(_)
(12:50:41 PM) dholbach: which is why just "test building on karmic" is not good enough
(12:51:04 PM) dholbach: https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases explains how to use a virtual machine, a chroot or a separate partition for your development work, so you don't hose the family computer :)
(12:51:24 PM) dholbach: ok, moving on in the release schedule:
(12:51:53 PM) dholbach: afterwards we have Feature Freeze (which we're in in karmic right now) where you need to get exceptions for uploading new upstream versions or other radical changes
(12:52:08 PM) dholbach: at this time of the release some things might still be broken but the features should at least be half-way there
(12:52:54 PM) dholbach: after that we introduce more and more freeze dates: UI, kernel, documentation, translations, etc.
(12:53:11 PM) dholbach: one gets frozen every week so we get a very stable release that can be safely documented, translated and tested
(12:53:18 PM) dholbach: <slacker_nl> QUESTION: are there automated testtools for package testing, eg tests for regression testing? or should that be provided by upstream?
(12:53:23 PM) dholbach: slacker_nl: great question
(12:53:59 PM) dholbach: there's a number of upstream developers (which means software authors) that provide us with test suites and very often they are run during the build to directly find out if things got broken in the new release
(12:54:33 PM) dholbach: there's tools like pbuilder for safe test-building and there's tools like lintian that can check your packaging for you
(12:55:48 PM) dholbach: ok... let's take a quick 5 minute break and we can get our hands dirty afterwards
(12:55:58 PM) dholbach: for all of you that need a new cup of tea or a drink or need to nip to the loo
(12:56:05 PM) dholbach: see you in just a bit :-)
(01:00:22 PM) dholbach: alright... let's kick off part 2
(01:00:56 PM) dholbach: for all of you who just arrived: you can ask questions in #ubuntu-classroom-chat (please prefix with QUESTION:), logs will be available afterwards on https://wiki.ubuntu.com/UbuntuDeveloperWeek
(01:01:39 PM) dholbach: Ok... now let's get some source package and let's try to test build it
(01:01:42 PM) dholbach: please run
(01:01:43 PM) dholbach:    apt-get source hello
(01:02:00 PM) dholbach: if you have "Sources" enabled in Software Sources this should work now
(01:02:05 PM) dholbach: what it does it the following
(01:02:46 PM) dholbach: it will get the source package for the 'hello' package
(01:02:58 PM) dholbach: there's the distinction between the source packages and the binary packages
(01:03:16 PM) dholbach: what my Mom installs, the .deb files are the binary packages which are a result of the build
(01:03:24 PM) dholbach: what we work on as Ubuntu developers is the source packages
(01:03:46 PM) dholbach: in the case of hello (on karmic) this means the following files:
(01:03:48 PM) dholbach:    hello_2.4-1.diff.gz  hello_2.4-1.dsc  hello_2.4.orig.tar.gz
(01:04:46 PM) dholbach: hello_2.4.orig.tar.gz means: the original source code that was released by the software authors of 'hello' in the version 2.4
(01:05:12 PM) dholbach: the 'orig' is important - it means: this tar.gz file didn't receive any changes at all, it's just as it was downloaded from the hello homepage
(01:05:16 PM) dholbach: (just renamed)
(01:05:56 PM) dholbach: hello_2.4-1.diff.gz is the compressed set of changes that were applied by Debian (and Ubuntu) developers to make the source package build the Debian/Ubuntu way
(01:06:53 PM) dholbach: so what does this mean "the debian/ubuntu way"?
(01:07:15 PM) dholbach: some of you might have compile source code already, where you manually build software by running:
(01:07:25 PM) dholbach: ./configure    make     sudo make install
(01:07:57 PM) dholbach: the packaging process basically wraps around those build commands and enables us to apply the same build process to every kind of package
(01:08:17 PM) dholbach: so it doesn't matter if it's a python program, a set oh PHP modules, something written in C or something to do with Perl
(01:08:35 PM) dholbach: also you add some meta information like the package name, a description, etc.
(01:09:06 PM) dholbach: The session "Packaging from scratch" -- Laney on Friday will talk about that in more detail
(01:09:23 PM) dholbach: also "Learning from mistakes - REVU reviewing best practices" -- mok0  on Thursday  will have useful tips
(01:09:40 PM) dholbach: <[BIOS]Dnivra> QUESTION: Why is dpkg-dev needed? I get an error it's not installed. isn't it available in the ubuntu repository?
(01:09:43 PM) dholbach: sorry, please run
(01:09:47 PM) dholbach:    sudo apt-get install dpkg-dev
(01:09:55 PM) dholbach: it's needed too, I thought it would be pulled in
(01:10:03 PM) dholbach: just run
(01:10:08 PM) dholbach:      dpkg-source -x *.dsc
(01:10:12 PM) dholbach: afterwards and you'll be fine
(01:10:18 PM) dholbach: I'll get to the purpose of it in just a bit
(01:11:09 PM) dholbach: <[BIOS]Goo> QUESTION:Could you elucidate  "wraps around those build commands"
(01:11:17 PM) dholbach: [BIOS]Goo: ok, let's go into some more detail
(01:11:58 PM) dholbach: so a regular application written in C will often require you to run something like ./configure; make; make install; etc.
(01:12:30 PM) dholbach: a python application that uses distutils might need something like invocations of    python ./setup.py ....
(01:12:51 PM) dholbach: sometimes for a package to work afterwards (some simple scripts) it will be enough to just copy them where they belong
(01:13:30 PM) dholbach: the package build process can be divided into steps like configuration, compilation, installation, something that happens post-installation and so on
(01:13:36 PM) dholbach: think of it as a "meta build process"
(01:13:57 PM) dholbach: that process is specified in the debian policy and we make use of that
(01:14:26 PM) dholbach: the great thing about this standardisation is: our tools all treat source packages the same way, no matter what weird way they work internally
(01:14:41 PM) dholbach: moving on :)
(01:15:04 PM) dholbach: hello_2.4-1.dsc just contains meta data of the package like md5sums and so on
(01:15:53 PM) dholbach: so what apt-get source (or  more specifically dpkg-source -x *.dsc) did was:
(01:16:02 PM) dholbach:  - unpack hello_2.4.orig.tar.gz
(01:16:15 PM) dholbach:  - unpack and apply the patch with our changes hello_2.4-1.diff.gz
(01:16:25 PM) dholbach: so you should be able to see the hello-2.4 directory
(01:16:34 PM) dholbach: (or hello-2.3 if you're on an older version)
(01:16:54 PM) dholbach: this directory should contain a debian/ directory which basically contains all the packaging
(01:17:07 PM) dholbach: daniel@miyazaki:~$ ls hello-2.4/debian/
(01:17:07 PM) dholbach: changelog  control  copyright  postinst  prerm  rules  watch
(01:17:07 PM) dholbach: daniel@miyazaki:~$
(01:17:17 PM) dholbach: I won't explain every last detail now, just very quickly
(01:17:36 PM) dholbach:  - changelog: descriptions of all the packaging changes (one new entry per new version that was uploaded to the archive)
(01:18:01 PM) dholbach:  - control: information about the source package (who maintains it, where's the homepage, which packages are necessary to build it, etc.) and the resulting binary package(s)
(01:18:14 PM) dholbach:  - copyright: licensing and copyright information of the software
(01:18:27 PM) dholbach:  - rules: how is the package build, how does the meta build process work
(01:18:32 PM) dholbach: we can safely ignore the others for now
(01:18:58 PM) dholbach: alright... now let's test-build the package
(01:19:07 PM) dholbach: if your pbuilder setup succeeded, you just run the following
(01:19:14 PM) dholbach:     sudo pbuilder build hello_2.4-1.dsc
(01:19:53 PM) dholbach: if it works out, you should be able to have a look at /var/cache/pbuilder/result/hello_*.deb afterwards
(01:20:03 PM) dholbach: this should work
(01:20:05 PM) dholbach:    less /var/cache/pbuilder/result/hello_*.deb
(01:20:43 PM) dholbach: this will show you the contents of the package, its size and dependencies, etc.
(01:21:15 PM) dholbach: if you have a look at the build log you will see what happened there:
(01:21:40 PM) dholbach: first the separate build environment was set up, then some additional packages installed
(01:22:25 PM) dholbach: then ./configure was run, then the actual compilation of the source code happened, then some files were installed and then they were all glued together in /var/cache/pbuilder/result/hello_*.deb, then the build environment torn down again
(01:22:41 PM) dholbach: the fine thing about pbuilder is that it will store all the packages that are necessary to build a package
(01:22:49 PM) dholbach: and you don't need to download them over and over again
(01:23:33 PM) dholbach: <alourie|vm> dholbach: QUESTION: what if packages need an update?
(01:23:46 PM) dholbach: alourie|vm: you run    sudo pbuilder update   (similar to apt-get update)
(01:23:54 PM) dholbach: <trothigar> QUESTION: presumably the build deps are downloaded as binaries. Does pbuilder share the same cache as apt?
(01:23:59 PM) dholbach: trothigar: you can set it up that way
(01:24:10 PM) dholbach: https://wiki.ubuntu.com/PbuilderHowto should have more information on the topic
(01:25:04 PM) dholbach: it came up in -chat a couple of times, so here goes:
(01:25:06 PM) dholbach:   <RainCT> penguin42: Yeah. Using pbuilder-dist (from ubuntu-dev-tools) is a great way to achieve that
(01:25:22 PM) dholbach: pbuilder-dist is a fine tool to test-build packages for various ubuntu and debian releases
(01:25:29 PM) dholbach: talk to RainCT to find out more about it :)
(01:25:57 PM) dholbach: ok... so how does Ubuntu Development work? what do people do with those .dsc .diff.gz and .orig.tar.gz files
(01:26:37 PM) dholbach: basically for every change that is done to a package a new source package must be uploaded to the Launchpad build servers
(01:26:59 PM) dholbach: that's where the gpg key comes in, if you're not part of the team (I'll get to that in a sec), it will reject your changes
(01:27:20 PM) dholbach: the same applies for Launchpad Personal Package Archives (https://help.launchpad.net/Packaging/PPA)
(01:27:45 PM) dholbach: you can think of it as a primitive (sorry everybody) version control system
(01:28:16 PM) dholbach: Developer A makes a change and uploads version 2.4-2 of hello
(01:28:33 PM) dholbach: and I can get it via   apt-get source hello   later on and improve it some more if I like
(01:29:08 PM) dholbach: there are efforts going on to make more use of distributed revision control (using Bazaar on Launchpad) and Mr James Westby will talk about that later in the week
(01:29:09 PM) dholbach: Friday 4th September, 18:00 UTC - Fixing an Ubuntu bug using Bazaar -- james_w
(01:29:51 PM) dholbach: so how would you go about sending in changes now that you're not part of the team yet
(01:30:24 PM) dholbach: easy: come to tomorrow's session "Fixing small bugs in Ubuntu" and learn how to produce patches
(01:30:40 PM) dholbach: once you have the patch, you attach it to a bug report and subscribe the reviewers team
(01:31:01 PM) dholbach: they'll give you a review and some advice and upload the change for you once it's all good
(01:31:17 PM) dholbach: basically they'll download the source package, apply your changes, sign it with they gpg key and upload it for you
(01:31:26 PM) dholbach: <msp301> QUESTION: what would happen in the case that two users happen to update at the same time on Launchpad??
(01:31:46 PM) dholbach: msp301: those collisions happen every now and then, Launchpad will just use the one that was milliseconds before and throw away the other :)
(01:31:54 PM) dholbach: <alourie|vm> dholbach: QUESTION: how do we prepare patches?
(01:32:09 PM) dholbach: alourie|vm: tomorrow, 16:00 UTC, this place :-)
(01:32:38 PM) dholbach: find more detail about the reviewers team and how to get stuff uploaded at: https://wiki.ubuntu.com/SponsorshipProcess
(01:33:20 PM) dholbach: once the reviewers are happy with your general work and get tired of uploading and reviewing myriads of changes for you, they'll tell you that and you can send your application for upload rights :-)
(01:33:31 PM) dholbach: https://wiki.ubuntu.com/UbuntuDevelopers explains the process
(01:33:59 PM) dholbach: ok... that roughly explains how Ubuntu works
(01:34:25 PM) dholbach: there's the release schedule with freeze dates, there's people working with source packages, there's bug reports and people attaching patches to them
(01:34:33 PM) dholbach: there's packages getting built, downloaded and tested
(01:34:42 PM) dholbach: but that doesn't explain how developers interact
(01:34:47 PM) dholbach: there's mailing lists and IRC
(01:35:08 PM) dholbach: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu and #ubuntu-motu should be interesting for you
(01:35:23 PM) dholbach: because these channels contain the most awesome and frienly people that can help you out
(01:35:42 PM) dholbach: there's lots more mailing lists: https://lists.ubuntu.com/
(01:35:56 PM) dholbach: and there's lots more irc channels: https://help.ubuntu.com/community/InternetRelayChat
(01:36:02 PM) dholbach: but try to take one step at a time :-)
(01:36:06 PM) dholbach: it can be a bit overwhelming :)
(01:36:15 PM) dholbach: <bogor> QUESTION: Does building package in my pc will have it installed in my machine. If yes then how do i uninstall it if somethings goes wrong?
(01:36:28 PM) dholbach: bogor: no, you have to explicitly install the package, running   sudo dpkg -i bla.deb
(01:36:44 PM) dholbach: that's why you probably best check out https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases
(01:36:57 PM) dholbach: which explains how to have a separate, up-to-date development environment
(01:37:05 PM) dholbach: <slacker_nl> QUESTION: you've talked about development releases, what about backports, how does that process work, when does a package get backported?
(01:37:07 PM) dholbach: slacker_nl: good one
(01:37:40 PM) dholbach: slacker_nl: so we all work on karmic now.... it's going to be released on October 29th
(01:37:47 PM) dholbach: afterwards the karmic will be frozen
(01:37:51 PM) dholbach: no uploads to karmic anymore
(01:38:09 PM) dholbach: afterwards only uploads to karmic-security karmic-updates and karmic-backports are accepted
(01:38:44 PM) dholbach:  Effectively testing for regressions -- sbeattie  on Thursday will have more information on that
(01:38:54 PM) dholbach: https://wiki.ubuntu.com/SRU also explains it in more detail
(01:39:06 PM) dholbach: <openweek0_> QUESTION: where do i join if i wanna participate in gnome desktop env development?
(01:39:20 PM) dholbach: openweek0_: check out https://wiki.ubuntu.com/Teams for more information on various teams within Ubuntu
(01:39:52 PM) dholbach: <msp301> QUESTION: is that the same with LTS releases ? retricted updates etc ??
(01:40:06 PM) dholbach: msp301: no, what I just mentioned above concerns all releases, LTS or not
(01:40:25 PM) dholbach: LTS is just supported for longer than the "regular" 18 months, it's 3 years of support on the desktop and 5 on the server
(01:40:39 PM) dholbach: <c_korn> QUESTION: can I safely run "sudo rm -rf /var/cache/pbuilder/" to purge pbuilder ?
(01:40:41 PM) dholbach: c_korn: yes
(01:40:57 PM) dholbach: ok, now that we know how developers interact, one thing is VERY important
(01:41:06 PM) dholbach: always document changes you are about to make as good as you can
(01:41:32 PM) dholbach: we have people living in various parts on earth, speaking different languages and having different skill sets
(01:41:56 PM) dholbach: as we maintain all packages together as one big team it's important that other developers don't have to second guess what you might have meant
(01:42:16 PM) dholbach: also in 6 months time you probably don't want to second guess your own patches or documentation :)
(01:43:04 PM) dholbach: ok... speaking of patches and developers: we're not alone in the open source world
(01:43:24 PM) dholbach: we inherit a great deal of good stuff from the Debian project and other projects
(01:43:47 PM) dholbach: if we make changes we want to make sure to contribute them back to Debian, so let's take a quick look back at the hello example
(01:44:00 PM) dholbach: 2.4-1 is the version in karmic
(01:44:02 PM) dholbach: this means:
(01:44:25 PM) dholbach:  - 2.4 is the release that was done by the authors of hello on their homepage
(01:44:37 PM) dholbach:  - "-1" means that one revision of 2.4 was done in Debian and we inherited that
(01:44:45 PM) dholbach: debian/changelog has more information on what happened there
(01:44:55 PM) dholbach: if I was to do a change for Karmic, the new version string would be
(01:45:01 PM) dholbach:  2.4-1ubuntu1
(01:45:19 PM) dholbach: meaning: still 2.4 upstream release, one (inherited) debian revision, one Ubuntu change
(01:46:07 PM) dholbach: this also means that in the new Ubuntu release (karmic+1) we can't just copy (we call it 'sync') the package from debian, as we might overwrite the changes that I did in 2.4-1ubuntu1
(01:46:50 PM) dholbach: if there was a 2.5-1 in Debian, we'd need to very closely check if we can just overwrite my changes or if I need to merge the manually into the 2.5-1 Debian version (and thus get 2.5-1ubuntu1)
(01:47:15 PM) dholbach: to be able to sync as much as possible and share the same codebase all over it's necessary to send patches upstream
(01:47:37 PM) dholbach: On Wednesday we'll have a session called " Bug lifecycle, Best practices, Workflow, Tags, Upstream, Big picture" by jcastro and pedro_ who will talk about that some more
(01:48:00 PM) dholbach: <aacool> QUESTION: what do I run to test hello after the pbuilder build completes?
(01:48:23 PM) dholbach: aacool: you'd run    sudo dpkg -i /var/cache/pbuilder/result/hello*.deb    to install the resulting package
(01:48:25 PM) dholbach: and then run
(01:48:27 PM) dholbach:    hello
(01:48:33 PM) dholbach: in the command line :-)
(01:48:41 PM) dholbach: <penguin42> QUESTION: What happens with package numbering when ubuntu brings out a newer upstream version before debian does, then debian catches up?
(01:48:44 PM) dholbach: penguin42: nice one :)
(01:49:03 PM) dholbach: so let's say Debian is still on 2.4-1 and we discover there's a new release out by the hello upstream guys
(01:49:09 PM) dholbach: we'd call it 2.5-0ubuntu1
(01:49:33 PM) dholbach: to indicate: it's upstream 2.5, we didn't get a revision of it from Debian, but have the first revision of it in Ubuntu
(01:49:42 PM) dholbach: <[BIOS]Goo> QUESTION: Since Ubuntu is debian based, can i follow the same package building process for Debian as well?(using pbuild)
(01:49:50 PM) dholbach: [BIOS]Goo: essentially, yes
(01:50:07 PM) dholbach: https://wiki.ubuntu.com/UbuntuPackagingChanges explains what's different in the Ubuntu world
(01:50:19 PM) dholbach: <norax> QUESTION: What's the order? I mean hello.2.4-1 is before or after hello.2.10-1 ? If before, What goes after hello.2.10-1_ubuntu9? If after what happend if the upstream developer use a different notation?
(01:50:35 PM) dholbach: norax: first 2.4-1 then 2.10-1
(01:50:46 PM) dholbach: to be on the safe side, you can do this
(01:51:10 PM) dholbach: daniel@miyazaki:~$ dpkg --compare-versions 2.10-1 gt 2.4-1 && echo TRUE
(01:51:10 PM) dholbach: TRUE
(01:51:10 PM) dholbach: daniel@miyazaki:~$
(01:51:23 PM) dholbach: dpkg is always authoritative on package versions
(01:51:42 PM) dholbach: the command above checks if 2.10-1 is greater than 2.4-1 and print TRUE if it's true :)
(01:51:55 PM) dholbach: <soyrochus> QUESTION: Probably for last; how to clean up a system after using pbuilder. Not just apt-get remove, but more importantly removing all remants of local repositories, build remnants etc.
(01:52:10 PM) dholbach: soyrochus: just deinstall the packages that we installed, remove ~/.pbuilderrc and /var/cache/pbuilder
(01:52:14 PM) dholbach: that should get you there
(01:52:24 PM) dholbach: but more practically: use a virtual machine
(01:52:37 PM) dholbach: https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases
(01:52:47 PM) dholbach:  . o O { I didn't think that would be the most usef link today :-) }
(01:53:01 PM) dholbach: <playya> QUESTION: is it possibleto generate the debian/* file out of git TAGS, log,... and configure.ac?
(01:53:37 PM) dholbach: playya: yes, some people use distributed revision control for 1) the packaging itself and 2) packaging upstream snapshots from bzr/git/svn/cvs/etc
(01:53:49 PM) dholbach: <slacker_nl> QUESTION: regarding giving back: what is prefered, create a debian package and wait for Ubuntu to sync with debian or to create a ubuntu package directly? does debian sync with ubuntu?
(01:53:56 PM) dholbach: slacker_nl: that depends on the release schedule
(01:54:28 PM) dholbach: slacker_nl: if we're a week away from release and the fix is critical we might ask somebody from upstream for advice, but we won't block on them if we know that we need that fix
(01:54:44 PM) dholbach: https://wiki.ubuntu.com/Upstream has more info on our collaboration with upstreams
(01:55:16 PM) dholbach: ok... as last tips I'd like to give you:
(01:55:22 PM) dholbach:  https://wiki.ubuntu.com/MOTU/GettingStarted
(01:55:26 PM) dholbach: because it links to all the important stuff
(01:55:39 PM) dholbach:  https://wiki.ubuntu.com/Packaging/Training
(01:56:04 PM) dholbach: because of the session we'll have on thursday: general questions and answers about Ubuntu development, this place
(01:56:19 PM) dholbach: also please join us in #ubuntu-motu on irc.freenode.net
(01:56:25 PM) dholbach: and on the ubuntu-motu mailing list
(01:56:35 PM) dholbach: I really hope to see all of you during the great sessions we have this week
(01:56:45 PM) dholbach: and hope to see you all as Ubuntu contributors really really soon
(01:56:53 PM) dholbach: make me proud! :-)
(01:56:58 PM) mode (-m ) by dholbach
(01:57:04 PM) huats: thanks dholbach !
(01:57:07 PM) dholbach: thanks everybody - have a great Ubuntu Developer Week!

MeetingLogs/devweek0909/GetStarted (last edited 2009-09-01 17:54:02 by 67)