GetStarted
Dev Week -- Getting Started with Ubuntu Development -- dholbach -- Mon, Jan 25
UTC
1 [16:00] <dholbach> HELLO EVERYBODY! WELCOME TO UBUNTU DEVELOPER WEEK!
2 [16:00] <dholbach> I'm very very happy you all made it here
3 [16:00] <dholbach> First I'll talk about a few organisational things before we dive into session 1 "Getting Started with Ubuntu Development"!
4 [16:01] <dholbach> first of all: for those of you who are not using lernid to connect to Ubuntu developer week:
5 [16:01] <dholbach> - #ubuntu-classroom is for the presentation only, so please keep chatter out of the channel
6 === Mcb is now known as Guest69733
7 [16:02] <dholbach> - #ubuntu-classroom-chat for discussion and for questions (please prefix with QUESTION:, ie: "QUESTION: What does xyz mean?")
8 [16:03] <dholbach> - I put up some slides at http://people.canonical.com/~dholbach/ubuntu-development-getting-started.pdf which should at least give you a nice link collection - lernid users will see those slides as we move on through the session
9 [16:03] <dholbach> if you have general questions about the schedule, you can find it at https://wiki.ubuntu.com/UbuntuDeveloperWeek
10 [16:03] <dholbach> [SLIDE 1]
11 [16:04] <Omar87> dholbach: nothing here.
12 [16:04] <dholbach> another organisational note:
13 [16:04] <dholbach> if you plan to be here the full week and speak more languages than just English, consider adding yourself to the bottom of https://wiki.ubuntu.com/UbuntuDeveloperWeek
14 [16:05] <thebwt> rmunn_: lernid only clients can't get to #lernid
15 [16:05] <BluesKaj> howdy
16 [16:06] <dholbach> so for example:
17 [16:06] <dholbach> Catalan: #ubuntu-cat
18 [16:06] <dholbach> Danish: #ubuntu-nordic-dev
19 [16:06] <dholbach> Finnish: #ubuntu-fi-devel
20 [16:06] <dholbach> German: #ubuntu-classroom-chat-de
21 [16:06] <dholbach> Spanish: #ubuntu-classroom-chat-es
22 [16:06] <dholbach> French: #u-classroom
23 [16:07] <dholbach> it'd be great if you would help out translating questions and answers for those who are not comfortable speaking in English yet :)
24 [16:07] <dholbach> (thanks in advance)
25 [16:07] <dholbach> [SLIDE 1]
26 [16:07] <qwebirc98256> when it will start?
27 [16:08] <dholbach> thanks a lot jussi01
28 [16:08] <dholbach> ok... let's get started :)
29 [16:09] <dholbach> so what we're going to cover during the session is the following:
30 [16:09] <dholbach> - get a basic development environment set up (gpg key, tell the packaging tools who we are, get pbuilder set up, etc.)
31 [16:09] <dholbach> - cover the basics of contributing
32 [16:09] <dholbach> - and hopefully answer lots of questions :)
33 [16:10] <dholbach> [SLIDE 2]
34 [16:10] <dholbach> so first of all, please run:
35 [16:10] <dholbach> sudo apt-get install --no-install-recommends ubuntu-dev-tools build-essential pbuilder dpkg-dev gnupg
36 [16:10] <dholbach> this will install a bunch of packages we are going to need
37 [16:11] <dholbach> build-essential will pull in compilers and general tools for building packages
38 [16:11] <dholbach> gnupg we will need to sign packages (or encrypt data generally)
39 [16:12] <dholbach> ubuntu-dev-tools itself contains a lot of useful tools and will pull in a few others we are going to need to packaging and every-day tasks
40 [16:12] <dholbach> also please enable "Source code" in System -> Software Sources -> Ubuntu Software
41 === zen is now known as Guest4939
42 [16:13] <dholbach> a question that is asked a lot of times is: "Do I really need to run the current development release? Won't that break my system?"
43 [16:13] <dholbach> The answer is "yes, for building and testing you need one form 'latest development release'"
44 [16:13] <dholbach> to do that in a sane way, you better check out https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases
45 [16:14] <dholbach> Also we do have these very fine sessions lined up for this week which talk about a similar topic:
46 [16:14] <dholbach> TODAY, 19.00 UTC - Working on the Bleeding Edge -- kees
47 [16:14] <dholbach> Wed 27th Jan, 19.00 UTC, Developing and Testing in KVM --kirkland
48 [16:15] <dholbach> <xteejx71> QUESTION: Do any of the classes cover how to use debhelper and CDBS?
49 [16:15] <dholbach> xteejx71: there is no explicit "debhelper and cdbs" session, but I'm sure that some sessions will cover it briefly
50 [16:15] <dholbach> in any case I can recommend https://wiki.ubuntu.com/PackagingGuide
51 [16:15] <dholbach> [SLIDE 3]
52 [16:16] <dholbach> ok, let's start with setting up a gpg key
53 [16:17] <dholbach> gnupg stands for GNU privacy guard and can be used to sign and encrypt data in general (you'll see it in use very often with emails, but also general files)
54 [16:17] <dholbach> we use it to prove that one person (and nobody else) made a particular change to a file
55 [16:18] <cjohnston> < LumpyCustard> Question: What is the command to show the current gpg keys on the system?
56 [16:19] <dholbach> thanks cjohnston
57 [16:19] <dholbach> LumpyCustard: gpg --list-keys <email address> should do that
58 [16:19] <cjohnston> < xteejx71> QUESTION: Do the gpg keys *have* to be registered with Launchpad?
59 [16:19] <dholbach> so if you already have a key set up, you can skip this step obviously
60 [16:20] <dholbach> xteejx71: it's necessary to use a PPA (Personal Package Archive) or to upload a package to Ubuntu (once you are part of any of the uploader teams)
61 [16:20] <dholbach> ok... so to generate a key you run the following
62 [16:21] <dholbach> gpg --gen-key
63 [16:21] <dholbach> it's generally safe to just stick to the defaults
64 [16:21] <dholbach> if you want to have more information on setting gpg up, check out https://help.ubuntu.com/community/GnuPrivacyGuardHowto
65 [16:22] <dholbach> now you tell gpg your name and your email address
66 [16:22] <dholbach> a comment is not necessary
67 [16:22] <dholbach> now it will create the key and that's likely going to take a bit longer
68 [16:23] <dholbach> (it will take random numbers from whatever your machine is doing right now to put that key together)
69 [16:23] <cjohnston> < Navaneeth> QUESTION: How can I upload a package to ubuntu repository? Where is that information documented?
70 [16:23] <dholbach> Navaneeth: we'll get to that later on
71 [16:23] <cjohnston> < bullgard> QUESTION I obtain: "public key not found." What should I do?
72 [16:24] <dholbach> bullgard: it likely means that you have no key set up yet?
73 [16:24] <dholbach> bullgard: I don't know what you just did, so can somebody please try to debug the problem with bullgard in #ubuntu-classroom-chat?
74 [16:24] <dholbach> cjohnston: next?
75 [16:24] <cjohnston> < bullgard> QUESTION I obtain: "public key not found." What should I do?
76 [16:24] <dholbach> cjohnston: next?
77 [16:25] <cjohnston> < Paddy_NI> QUESTION: What is the comment generally used for?
78 [16:25] <cjohnston> sorry
79 [16:25] <dholbach> Paddy_NI: gpg is used to create the key with which we sign data, files and emails or encrypt and decrypt them - you actually don't use the command itself very often, but there's other tools which rely on it
80 [16:26] <dholbach> alright, so let's move on to the next topic :)
81 [16:26] <dholbach> pbuilde
82 [16:26] <dholbach> pbuilder
83 [16:26] <dholbach> [SLIDE 4]
84 [16:26] <dholbach> pbuilder is a great tool to test-build packages in a clean and minimal environment
85 [16:27] <cjohnston> < fubarrrr44> QUESTION: Why do I need root permissions to (just) build a .deb package? (wi th rpm this is not needed)
86 [16:27] <dholbach> whenever you start a build it will set up a minimal environment, install the build-dependencies, start the build itself and remove the build-dependencies afterwards again (it will cache them though)
87 [16:27] <dholbach> fubarrrr44: pbuilder uses chroot internally
88 [16:28] <dholbach> fubarrrr44: if you use just "debuild" (and install the build-dependencies on your "live system"), you don't need root permissions either
89 [16:28] <dholbach> the maint points of pbuilder are:
90 [16:28] <dholbach> - keep your live system clean (you don't need to install 427697426246 build dependencies)
91 [16:29] <dholbach> - make sure the package builds in a minimal, unmodified environment
92 [16:29] <dholbach> there are other tools that do similar jobs, and there's pbuilder-dist (in the ubuntu-dev-tools package), which is great
93 [16:29] <dholbach> there's more info on https://wiki.ubuntu.com/PbuilderHowto
94 [16:30] <dholbach> please edit ~/.pbuilderrc in your favourite editor
95 [16:30] <dholbach> and add this to it:
96 [16:30] <dholbach> COMPONENTS="main universe multiverse restricted"
97 [16:30] <dholbach> then save the file
98 [16:30] <dholbach> then run
99 [16:30] <dholbach> sudo pbuilder create
100 [16:30] <dholbach> this, too, will take a while
101 [16:30] <dholbach> as it will create a minimal system "from scratch"
102 [16:31] <dholbach> ok, let's crack on
103 [16:31] <dholbach> [SLIDE 5]
104 [16:31] <dholbach> now we'll tell the development tools who we are
105 [16:31] <dholbach> please edit ~/.bashrc with your favourite editor
106 [16:32] <dholbach> and add something like this to the end of it:
107 [16:32] <dholbach> export DEBFULLNAME='Daniel Holbach'
108 [16:32] <dholbach> export DEBEMAIL='daniel.holbach@ubuntu.com'
109 [16:32] <dholbach> afterwards please save the file
110 [16:32] <dholbach> and run
111 [16:32] <dholbach> source ~/.bashrc
112 [16:32] <dholbach> (or restart your terminal)
113 [16:32] <dholbach> by setting DEBFULLNAME and DEBEMAIL:
114 [16:33] <dholbach> - you don't have to type in your email address
115 [16:33] <dholbach> - and name
116 [16:33] <cjohnston> < xteejx71> QUESTION: I never done the COMPONENTS bit before...does this make a difference when using pbuilder?
117 [16:33] <dholbach> - and gpg key id all the time
118 [16:33] <dholbach> and ... PLEASE ... use your own name and email address!
119 [16:33] <dholbach> :-)
120 [16:33] <dholbach> xteejx71: if you want to use universe and multiverse to build packages, then yes, you need it
121 [16:34] <dholbach> are there any more questions? please keep them coming in #ubuntu-classroom-chat
122 [16:34] <dholbach> if not, I'll keep on talking about a few things while pbuilder and gpg are doing their thing
123 [16:34] <cjohnston> < ulysses> QUESTIN: Can I use characters in DEBFULLNAME like 'ó' and 'á'?
124 [16:35] <dholbach> ulysses: yes, I'd be surprised if that wouldn't work :)
125 [16:35] <cjohnston> < xteejx71> QUESTION: Can pbuilder be used to create anything other the the Lucid environment?
126 [16:36] <dholbach> xteejx71: yes, have a look at https://wiki.ubuntu.com/PbuilderHowto - there's some variable you need to set, or use pbuilder-dist which can easily cope with multiple parallel pbuilders
127 [16:36] <dholbach> alright... let's talk about the release schedule for a bit
128 [16:36] <cjohnston> < xteejx71> QUESTION: If I already have run 'sudo pbuilder create' will this overwrite the old one or create a new one?
129 [16:36] <dholbach> xteejx71: I think I creates a new one
130 [16:36] <dholbach> xteejx71: might be best to check the manpage
131 [16:37] <dholbach> [SLIDE 6]
132 [16:37] <dholbach> https://wiki.ubuntu.com/LucidReleaseSchedule
133 [16:37] <dholbach> that's the current release schedule we have for this cycle
134 [16:37] <dholbach> you can see that we're in the "yellow phase" right now
135 [16:37] <dholbach> in every cycle we roughly do the following:
136 [16:38] <dholbach> - set up the toolchain (the core build tools)
137 [16:38] <dholbach> - discuss features at the Ubuntu Developer Summit
138 [16:38] <dholbach> - merge changes from Upstream and Debian
139 [16:38] <dholbach> - work on features
140 [16:38] <dholbach> - debug problems
141 [16:38] <dholbach> - polish
142 [16:38] <dholbach> - release
143 [16:39] <dholbach> it was just pointed out that we're in the orange phase... yeah, that's right :)
144 === dragon is now known as Guest85410
145 [16:39] <cjohnston> < kjele> Question: When I build with pbuilder it pulls down the required dependencies to compile the program. Is it possible to make sure it does not download each time I try to build?
146 [16:39] <dholbach> as you can easily see, the later it gets in the release cycle, the more conservative we get about changes
147 [16:39] <dholbach> towards the end we focus more on testing and obvious good bugfixes than on "crack of the day"
148 [16:40] <dholbach> kjele: it does cache those build-depends by default
149 [16:40] <dholbach> so if you ask the question "How can I help out?" or "What can I do?" it heavily depends on where we stand in the release cycle
150 [16:40] <cjohnston> < Navaneeth> QUESTION: I heard ubuntu is not contributing to upstream. is that correct? If yes, why?
151 [16:41] <dholbach> Navaneeth: that's not correct
152 [16:41] <dholbach> Navaneeth: if you have a look at https://wiki.ubuntu.com/Upstream you can see that we put a lot of energy in collaborating effectively with upstreams
153 [16:41] <dholbach> maybe I should clarify what "upstreams" are and how everything fits in one picture
154 [16:42] <dholbach> if you imagine millions of Ubuntu users on the one side
155 [16:42] <dholbach> and thousands of software projects like the kernel, like X, like GNOME, KDE, like Mozilla, like the authors of the crack-attack game and lots of others
156 [16:42] <dholbach> on the other side
157 [16:43] <dholbach> then Ubuntu (and other distributions) stand in the middle and try to make the conversation happen between the two of them
158 [16:43] <dholbach> those "software authors" on the other side are our upstreams
159 [16:44] <dholbach> here's a list of things we contribute to upstream projects:
160 [16:44] <dholbach> - exposure of their software (distributions are the best way to get great software without hassle)
161 [16:45] <dholbach> - well-researched bug reports: we get LOADS and LOADS of bug reports every day and we put a lot of work into making them top-notch reports by automatically getting debug stacktraces, etc etc - basically we filter "defect reports" for upstream project
162 [16:45] <dholbach> s
163 [16:45] <dholbach> - we test their software in lots of different scenarios
164 [16:45] <dholbach> - and we forward patches
165 [16:46] <dholbach> sure there's not a group of Ubuntu developers for every piece of software that exists
166 [16:46] <dholbach> but we put a lot of hard work into working with Upstream projects
167 [16:46] <cjohnston> < fubarrrr44> QUESTION: How do I prevent pbuilder from doing clean up after work (to look at the generated chroot environment)?
168 [16:46] <dholbach> check out "Adopt-an-Upstream" by jcastro and dholbach on Thursday
169 [16:47] <dholbach> fubarrrr44: you can use sudo pbuilder login or just chroot for testing
170 [16:47] <dholbach> https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases might be helpful oto
171 [16:47] <dholbach> too
172 [16:47] <cjohnston> < LumpyCustard> Qn: How do I register the gpg key I've just made with Launchpad?
173 [16:47] <dholbach> LumpyCustard: great question!
174 [16:48] <dholbach> so first of all to find out your gpg key id, do the following: run
175 [16:48] <dholbach> gpg --fingerprint your.name@email.com
176 [16:48] <dholbach> for me it displays the following:
177 [16:48] <dholbach> pub 1024D/059DD5EB 2007-09-29
178 [16:48] <dholbach> Schl.-Fingerabdruck = 3E5C 0B3C 8987 79B9 A504 D7A5 463A E59D 059D D5EB
179 [16:48] <dholbach> uid Daniel Holbach .......
180 [16:48] <dholbach> 059DD5EB is my "KEY ID"
181 [16:48] <dholbach> now to send you public key (your private key will always stay safe) to the keyservers so others can verify your signatures:
182 [16:49] <dholbach> gpg --send-keys KEYID
183 [16:49] <dholbach> and to register your key with Launchpad, head to https://launchpad.net/people/+me/+editpgpkeys
184 [16:50] <dholbach> Ok... if your pbuilder is set up, you might want to try the following:
185 [16:50] <dholbach> apt-get source hello
186 [16:50] <dholbach> sudo pbuilder build hello_*.dsc
187 [16:51] <dholbach> if you follow the output from pbuilder closely you will see how it first sets up the initial minimal environment, then download additional build dependencies, then build the package, then remove the build environment again
188 [16:51] <dholbach> depending on your net connection and the speed of your CPU and disk it might take a little bit
189 [16:52] <cjohnston> < IdleOne> QIESTION sorry if you covered this already but what if I already have a key uploaded to launchpad, how do I use it?
190 [16:52] <dholbach> IdleOne: just head to https://launchpad.net/people/+me/+editpgpkeys and use your existing key
191 [16:52] <dholbach> https://help.launchpad.net/YourAccount/ImportingYourPGPKey will help too
192 [16:53] <dholbach> something I forgot to mention when we were talking about the relase cycle
193 [16:53] <dholbach> really really important fixes we need after a release is "out there" are SRUs
194 [16:53] <dholbach> SRU is short for Stable Release Updates
195 [16:54] <dholbach> basically it's for REALLY IMPORTANT stuff, and the packages that you get through xyz-updates
196 [16:54] <dholbach> the procedure and criteria for SRUs are listed here: https://wiki.ubuntu.com/StableReleaseUpdates
197 [16:54] <cjohnston> < n3rd> Question : Is there a way to make a single deb out of multiple binaries, say for example i call it server.deb it must install few binaries ask per my tweaks like apache, tomcat, activemq so on
198 [16:55] <dholbach> also there's a small cheat-sheet regarding the release cycle over here: http://people.canonical.com/~dholbach/cheatsheet.pdf
199 [16:55] <dholbach> [SLIDE 7]
200 [16:55] <dholbach> n3rd: yes, you would create an empty binary package that has the following line in debian/control: "Depends: apache, tomcat, activemq"
201 [16:55] <dholbach> we'll talk a bit more about that in the next session
202 [16:56] <dholbach> there's two final things I'd like to mention in this session (before we start the next one):
203 [16:56] <dholbach> - head to #ubuntu-motu on irc.freenode.net if you have any problems - there's great people who are able to help and who will become friends after a while :-)
204 [16:56] <dholbach> - bookmark https://wiki.ubuntu.com/MOTU/GettingStarted - it links to everything that's important
205 [16:57] <dholbach> let's all take a few minutes break before move on to "Fixing small bugs in Ubuntu" :-)
MeetingLogs/devweek1001/GetStarted (last edited 2010-01-26 16:47:32 by i59F71233)