GetStarted

Dev Week -- Getting Started with Ubuntu Development -- dholbach -- Mon, Jul 11th, 2011

   1 [16:00] <dholbach> HELLO EVERYBODY!
   2 [16:01] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/07/11/%23ubuntu-classroom.html following the conclusion of the session.
   3 [16:01] <dholbach> Welcome to another fantastic and exciting Ubuntu Developer Week!
   4 [16:01] <dholbach> a few organisational things first
   5 [16:01] <dholbach> please make sure you also join #ubuntu-classroom-chat because that's the place where we chat and where you can ask questions while the sessions are going on
   6 [16:02] <dholbach> if you want to ask a question please prefix it with QUESTION, ie:
   7 [16:02] <dholbach> QUESTION: What's the name of dholbach's dog?
   8 [16:02] <dholbach> another thing: if you can't make it to a particular session: no problem, we'll upload logs and link to them at https://wiki.ubuntu.com/UbuntuDeveloperWeek
   9 [16:03] <dholbach> and another thing: if you work on a project that you would like to demo or present, the last session of UDW (Friday, last slot) is all about 5 minute lightning talks where you can present your project
  10 [16:03] <dholbach> talk to nigelb about it
  11 [16:04] <dholbach> that should be the organisational bits for now, but if you have any questions, either about the content of the sessions or the general event, please do ask
  12 [16:05] <ClassBot> LibertyZero asked: What's the name of dholbach's dog?
  13 [16:06] <dholbach> LibertyZero, my dog is called Murphy :)
  14 [16:06] <dholbach> ok, questions queue cleared up, awesome! :)
  15 [16:06] <dholbach> let's get to the first session of UDW
  16 [16:07] <dholbach> my name is Daniel Holbach, I've been part of this community since the hoary release and work for Canonical for a few years now, taking care of the developer community
  17 [16:07] <dholbach> it's my privilege to do the "Introduction to Ubuntu Development" sessions today
  18 [16:07] <dholbach> in the first half I'll try to give a rough overview over Ubuntu Development, how it works, when we do what, who we interact with and which tools and infrastructure we use
  19 [16:08] <dholbach> in the second half, I'll explain how to set up your development environment and let's see how much time we have at the end - we might even toy around with a few packages at the end :)
  20 [16:08] <dholbach> Ubuntu is made up of thousands of different components, written in many different programming languages. Every component - be it a software library, a tool or a graphical application - is available as a source package. Source packages in most cases consist of two parts: the actual source code and metadata. Metadata includes the dependencies of the package, copyright and licensing information, and instructions on how to build the package
  21 [16:08] <dholbach> . Once this source package is compiled, the build process provides binary packages, which are the .deb files users can install.
  22 [16:09] <dholbach> This means that the actual .deb files are nothing we copy around or upload somewhere, we as developers always just deal with the source.
  23 [16:09] <dholbach> Every time a new version of an application is released, or when someone makes a change to the source code that goes into Ubuntu, the source package must be uploaded to the build machines to be compiled.
  24 [16:10] <dholbach> The resulting binary packages then are distributed to the archive and its mirrors in different countries. The URLs in your /etc/apt/sources.list file(s) point to an archive or mirror.
  25 [16:10] <ClassBot> limivanb asked: what is the meaning of "deb" in .deb extension files?
  26 [16:11] <dholbach> limivanb, I think it stands for "Debian binary package" - because Debian is the distribution we inherit a lot of the technical foundation  and source code from, more about our relationship to Debian later on
  27 [16:12] <dholbach> Every day CD images are built for a selection of different Ubuntu flavours. Ubuntu Desktop, Ubuntu Server, Kubuntu and others specify a list of required packages that get on the CD. These CD images are then used for installation tests and provide the feedback for further release planning.
  28 [16:12] <dholbach> Ubuntu's development is very much dependent on the current stage of the release cycle. We release a new version of Ubuntu every six months, which is only possible because we have established strict freeze dates.
  29 [16:13] <dholbach> If you have a look at https://wiki.ubuntu.com/OneiricReleaseSchedule you can get a nice overview of the Oneiric cycle, which will have Ubuntu 11.10 as its end product.
  30 [16:13] <dholbach> With every freeze date that is reached developers are expected to make fewer, less intrusive changes.
  31 [16:14] <dholbach> The green and red colours on the page are meant as indicators for developers: green means "anything goes", red means "be super super careful".
  32 [16:15] <dholbach> It's no indicator of how well the current development release works on your computer. :-)
  33 [16:15] <dholbach> Feature Freeze is the first big freeze date after the first half of the cycle has passed. At this stage features must be largely implemented.
  34 [16:16] <dholbach> After that the user interface, then the documentation, the kernel, etc. are frozen, then the beta release is put out which receives a lot of testing. From the beta release onwards, only critical bugs get fixed and a release candidate release is made and if it does not contain any serious problems, it becomes the final release.
  35 [16:16] <dholbach> I think it's clear that most of the first half of the release is about feature development and bringing new versions of all kinds of software in and that the second half is more about ironing out bugs.
  36 [16:17] <ClassBot> raju asked: if we make some small .deb files (for personal usage), is there any need to send them to ubuntu repo's to install them in my PC?
  37 [16:17] <dholbach> raju, It's not strictly required, but if you want others to be able to use your software, it might indeed be helpful to share them.
  38 [16:17] <dholbach> Also might you find people who are interested in helping you out fixing things, etc.
  39 [16:18] <dholbach> I realise that I zipped through a lot of stuff quickly now, are there any more questions about this?
  40 [16:19] <dholbach> And also let me know if I'm too quick or don't make sense. :-)
  41 [16:19] <dholbach> Ok, seems we're all fine... for now.
  42 [16:19] <ClassBot> robinparriath asked: Is the feature freeze applicable for LTS too?  or do features get added after release?
  43 [16:20] <dholbach> robinparriath, yes, it's applicable for LTS releases too
  44 [16:20] <dholbach> as a measure of caution we strictly try to keep changes that go into a released version of Ubuntu to the very minimum
  45 [16:21] <dholbach> security fixes and other important fixes naturally should be fixed after the release, but with a couple of million users it's a very risky thing to change too much in the code
  46 [16:22] <dholbach> I'll talk a bit more about that later on. I hope for now it suffices to say that 1) there's an Ubuntu release every 6 months and 2) there's the Ubuntu Backports project which tries to give updated versions of software to users of released versions of Ubuntu
  47 [16:22] <ClassBot> ishan asked: What is LTS?
  48 [16:23] <dholbach> ishan, It's "Long term support" releases.
  49 [16:23] <dholbach> Instead of 18 months of support, it's 3 years on the desktop and 5 years on the server.
  50 [16:23] <ClassBot> ben72 asked: are there some kind of checks for quality/malware of personal PPA:s?
  51 [16:24] <dholbach> ben72x, for getting packages into Ubuntu, yes, there is checks that make sure that we don't get software into the archive that is problematic
  52 [16:24] <dholbach> Undistributable software for example
  53 [16:24] <dholbach> for PPAs (Personal Package Archives) the restrictions are less drastic
  54 [16:24] <ClassBot> ThomasB2k asked: How many releases back does this Ubuntu Backports project support, or is it just the standard 18 months?
  55 [16:25] <dholbach> ThomasB2k, as far as I know it supports the currently supported releases
  56 [16:25] <dholbach> https://launchpad.net/ubuntu lists the currently supported releases
  57 [16:25] <ClassBot> limivanb asked: During development, how can ubuntu supports most of the drivers like video (ATI,GeForce),printers, etc?
  58 [16:26] <dholbach> limivanb, it's only possible because the developer of Ubuntu work closely with the Kernel and X.org upstream development communities and make sure that all the good fixes go into Ubuntu
  59 [16:27] <dholbach> also is there Certification efforts going on, where a lot of different machines are regularly tested if they work on a range of Ubuntu releases
  60 [16:27] <ClassBot> subrahmanyam asked: Does ubuntu test and check the code that we developers have send.i.e,can we trust the code done by others??And if yes upto what extent
  61 [16:28] <dholbach> subrahmanyam, I'll dive into that into more detail later on, but for now: extensive code review for old releases, new packages, packages that go into main plus code review of all changes that new contributors (who don't have upload access yet) bring in
  62 [16:28] <dholbach> I hope that suffices for now
  63 [16:28] <ClassBot> Kvrmurthy asked: What system configuration is necessary to do most of development and testing stuff? You can name any specific laptop or desktop model
  64 [16:29] <dholbach> Kvrmurthy, there's no specific machine necessary - if it's fast enough for your daily work and you have a reasonable internet connection you should be all set
  65 [16:29] <dholbach> how to set up your development environment we'll cover a bit later on
  66 [16:29] <ClassBot> valleyIIT asked: why unity 2D is provided if it cannot work properly on systems without graphics card
  67 [16:29] <dholbach> valleyIIT, at 18:00 UTC (after my session) you should ask the Desktop engineers about that
  68 [16:29] <ClassBot> ben72 asked: should I avoid using personal PPA:s as much as possible. on different sites out there you can find a lot of links to different PPA:s.
  69 [16:30] <dholbach> ben72x, not necessarily - if there's one or two packages you want to try, I guess it's fine - if you have 156 different PPAs installed, which pull in all kinds of different libraries, I guess you might get into trouble
  70 [16:30] <dholbach> so no "avoid PPAs" from me :)
  71 [16:30] <ClassBot> dell asked: I heard you use debian packages. So do you compile it in some old ubuntu computer or do you download it from debian
  72 [16:31] <dholbach> dell, I mentioned it earlier actually: we don't download .deb packages from anywhere, we always just use the source and build it on Launchpad build machines for Ubuntu
  73 [16:31] <dholbach> but more about the interaction between Ubuntu and Debian later on
  74 [16:31] <ClassBot> enes asked: Does the 6 months cycle make releases a bit a work of compulsion? Does the developers try to make changes for the cycle but unnecessary?
  75 [16:32] <dholbach> a hard question - as I see it, the 6 month release cycle forces us to work on features, but also make sure we get something out there, and something that works
  76 [16:32] <ClassBot> awanti asked: After developing/building the OS how could you tell that its powerfull os, i mean how you test the OSing
  77 [16:33] <dholbach> I'm not sure how to answer the question - there's a lot of testing going on, a variety of testing and QA initiatives
  78 [16:33] <dholbach> it's certainly powerful enough for me, I never longed for anything else :)
  79 [16:33] <ClassBot> limivanb asked: The ubuntu developers are using the drivers/API provided by the manufacturer of graphics adapter (for example), or printers, and other hardware?
  80 [16:34] <dholbach> limivanb, there'll be a kernel session later on this week which might be just the right place
  81 [16:34] <dholbach> most of the foundational libraries and the kernel define APIs and lots of hardware manufacturers work in those communities
  82 [16:34] <dholbach> so it's a bit of both, I guess :)
  83 [16:35] <ClassBot> jykae asked: I have programs in PPA, how to get them to Ubuntu Software Center?
  84 [16:35] <dholbach> jykae, I'll answer that question in more detail later on
  85 [16:35] <ClassBot> Kvrmurthy asked: On what platform Ubuntu was first developed? For that matter with what and on what the code for os in its initial stages is developed and compiled, run and tested??
  86 [16:36] <dholbach> Kvrmurthy, Ubuntu is a derivative of Debian, so all the developers of Ubuntu in the warty (4.10) release had a Debian machine they were working on :)
  87 [16:36] <dholbach> maybe somebody in #ubuntu-classroom-chat can find a link of the very first announcement of the Ubuntu project
  88 [16:36] <dholbach> ... and I go back to the Introduction to Ubuntu Development? :)
  89 [16:37] <ClassBot> zimio asked: If upstream fixes a bug, how important must it be so that it will be also fixed in the ubuntu package?
  90 [16:37] <dholbach> zimio, I briefly mentioned it earlier: it always depends where we are in the release cycle
  91 [16:37] <dholbach> in the beginning it's very easy to get it in, no matter how critical the bug fix is
  92 [16:38] <dholbach> towards the end of the release cycle we try to minimise the amount of new code going in
  93 [16:38] <dholbach> alright, end of the question queue - let's crack on :)
  94 [16:39] <dholbach> Let's talk a bit about planning the release.
  95 [16:39] <dholbach> Thousands of source packages, billions of lines of code, hundreds of contributors require a lot of communication and planning to maintain high standards of quality. At the beginning of each release cycle we have the Ubuntu Developer Summit where developers and contributors come together to plan the features of the next releases.
  96 [16:39] <dholbach> Every feature is discussed by its stakeholders and a specification is written that contains detailed information about its assumptions, implementation, the necessary changes in other places, how to test it and so on.
  97 [16:40] <dholbach> This is all done in an open and transparent fashion, so even if you can not attend the event in person, you can participate remotely and listen to a streamcast, chat with attendants and subscribe to changes of specifications, so you are always up to date.
  98 [16:40] <dholbach> Not every single change can be discussed in a meeting though, particularly because Ubuntu relies on changes that are done in other projects. That is why contributors to Ubuntu constantly stay in touch.
  99 [16:40] <dholbach> Most teams or projects use dedicated mailing lists to avoid too much unrelated noise. For more immediate coordination, developers and contributers use Internet Relay Chat (IRC). All discussions are open and public.
 100 [16:41] <dholbach> Another important tool regarding communication is bug reports. Whenever a defect is found in a package or piece of infrastructure, a bug report is filed in Launchpad (https://launchpad.net/).
 101 [16:41] <dholbach> All information is collected in that report and its importance, status and assignee updated when necessary. This makes it an effective tool to stay on top of bugs in a package or project and organise the workload.
 102 [16:42] <dholbach> Any questions about bugs, communication or planning the release?
 103 [16:43] <dholbach> Somebody asked earlier, where the first Ubuntu release was developed on. rww dug out this historical web page: http://web.archive.org/web/20040731032313/http://www.no-name-yet.com/ :)
 104 [16:43] <dholbach> thanks rww
 105 [16:43] <ClassBot> Shock45 asked: Why do some bugs stay unfixed for such a long time after they've been confirmed?
 106 [16:44] <dholbach> Shock45, that's a good question
 107 [16:44] <dholbach> Sometimes it's because the problem is hard to fix, sometimes it's because there's too much work to be done and not enough hands on deck.
 108 [16:44] <dholbach> In a few minutes I'll talk a bit more about how we interact with other projects which should help with bringing each other up to date and fixing problems together.
 109 [16:45] <ClassBot> Abhijit asked: What to do about the bugs I have reported so many days ago and since they are not critical they still have not fixed yet?
 110 [16:45] <dholbach> Abhijit, I hope the reply to Shock45's question answered this.
 111 [16:45] <dholbach> Ok, let's talk about Ubuntu and other projects.
 112 [16:45] <dholbach> Most of the software available through Ubuntu is not written by Ubuntu developers themselves. Most of it is written by developers of other Open Source projects and then integrated into Ubuntu. These projects are called "Upstreams", because their source code flows into Ubuntu, where we "just" integrate it.
 113 [16:46] <dholbach> The relationship to Upstreams is critically important to Ubuntu. It is not just code that Ubuntu gets from Upstreams, but it is also that Upstreams get users, bug reports and patches from Ubuntu (and other distributions).
 114 [16:46] <dholbach> You might have guessed it already: Debian, which we derive from, is one of those Upstreams that is critically important to us. :)
 115 [16:46] <dholbach> Debian is the distribution that Ubuntu is based on and many of the design decisions regarding the packaging infrastructure are made there. Traditionally, Debian has always had dedicated maintainers for every single package or dedicated maintenance teams.
 116 [16:47] <dholbach> In Ubuntu there are teams that have an interest in a subset of packages too, and naturally every developer has a special area of expertise, but participation (and upload rights) generally is open to everyone who demonstrates ability and willingness.
 117 [16:47] <ClassBot> ben72 asked: how can I wish for a specific software to be added to ubuntu so I don't have to add extra sources to install it?
 118 [16:47] <dholbach> ben72x, https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages should answer the question in great detail, but I'll talk about specific parts of it later on as well.
 119 [16:48] <ClassBot> dell asked: Does ubuntu team use code from other teams like fedora etc
 120 [16:48] <dholbach> dell, yes. In a lot of cases maintainers and engineers from various distributions know each other and work together in those upstream communities, which is why issues are often identified together (and depending on their release schedule) integrated where they fit in well.
 121 [16:49] <ClassBot> coalitians asked: How does community prevent duplicate bug reports or dependent ones
 122 [16:49] <dholbach> coalitians, There will be a dedicated session about this later in the week.
 123 [16:49] <dholbach> We have some automatic tools that help figuring this out, but in some cases we have to manually find out duplicates and mark them as such in the Launchpad bug tracker.
 124 [16:50] <ClassBot> limivanb asked: Why Ubuntu requires more memory compare to windows OS?
 125 [16:50] <dholbach> limivanb, no idea. I luckily haven't Windows in a very very very very long time.
 126 [16:50] <ClassBot> ashams asked: is there any one tracks non-bitsize User experience bugs, and fix them? and hwhere to report *big* UE bugs?
 127 [16:50] <dholbach> ashams, great question - would you mind asking them when we have the Desktop team here at 18:00 UTC? :)
 128 [16:50] <ClassBot> naveen_ asked: How to know if its a new bug or the issue is happening only to me?
 129 [16:51] <dholbach> naveen, in some cases a google search or a search in launchpad.net will let you know, also if you try to report a bug in Launchpad it will try to find bugs that match your description
 130 [16:52] <dholbach> if in doubt: file the bug, somebody might mark it as duplicate if it really is, in the other case it will be super helpful to have your input
 131 [16:52] <dholbach> ok, let's crack on :)
 132 [16:52] <dholbach> Many of you asked how you can get something into Ubuntu. I'll answer this in more detail now:
 133 [16:52] <dholbach> Getting a change into Ubuntu as a new contributor is not as daunting as it seems and can be a very rewarding experience. It is not only about learning something new and exciting, but also about sharing the solution and solving a problem for millions of users out there.
 134 [16:53] <dholbach> Open Source Development happens in a distributed world with different goals and different areas of focus. For example there might be the case that a particular Upstream might be interested in working on a new big feature while Ubuntu, because of the tight release schedule, might be interested in shipping a solid version with just an additional bug fix.
 135 [16:53] <dholbach> That is why we make use of "Distributed Development", where code is being worked on in various branches that are merged with each other after code reviews and sufficient discussion.
 136 [16:54] <dholbach> In some cases it would make sense to ship Ubuntu with the existing (old) version of the project, just add a specific bugfix, forward the patch to Upstream for their next release and ship that (if suitable) in the next Ubuntu release. It would be the best possible compromise and a situation where everybody wins.
 137 [16:54] <dholbach> http://people.canonical.com/~dholbach/packaging-guide/html/_images/cycle-branching.png might illustrate what I just talked about
 138 [16:55] <dholbach> To fix a bug in Ubuntu, you would first get the source code for the package, then work on the fix, document it so it is easy to understand for other developers and users, then build the package to test it.
 139 [16:55] <dholbach> After you have tested it, you can easily propose the change to be included in the current Ubuntu development release. A developer with upload rights will review it for you and then get it integrated into Ubuntu.
 140 [16:55] <dholbach> Does that make sense so far?
 141 [16:56] <dholbach> When trying to find a solution it is usually a good idea to check with Upstream and see if the problem (or a possible solution) is known already and, if not, do your best to make the solution a concerted effort.
 142 [16:56] <ClassBot> ben72 asked: does it matter if it's Ubuntu developed software or if the package is entirely from an upstream?
 143 [16:57] <dholbach> ben72x, not all - the only thing that changes might be the number of people you interact with when making sure that your fix is accepted and integrated everywhere
 144 [16:57] <dholbach> sorry, I mean "not at all"
 145 [16:58] <dholbach> the pattern is the same: share your fix, make sure everybody benefits, keep the differences between Ubuntu and its upstreams as low as you can
 146 [16:58] <ClassBot> ankurgel asked: In 'Distributed Development', will each and every participant in code will be updated with related bug report as it happens in all Upstreams?
 147 [16:59] <dholbach> ankurgel, the session about Bug Triage will answer this in a broader sense, but Launchpad was designed so you can keep track of the same problem in various projects and various bug trackers - it's super helpful when you are trying to figure out who has fixed the problem already or if there are open questions
 148 [16:59] <ClassBot> ice asked: how to become a good ubuntu developer?
 149 [17:00] <dholbach> ice, enjoy "making things work again", be a good team player, don't be afraid of reading documentation and asking a few questions, get your bug fixes submitted for review, work with others to improve them :)
 150 [17:00] <ClassBot> ice asked: can we view the seesions later?
 151 [17:00] <dholbach> ice, sure you can - just hang out in here or read the session logs on https://wiki.ubuntu.com/UbuntuDeveloperWeek later on
 152 [17:00] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/07/11/%23ubuntu-classroom.html following the conclusion of the session.
 153 [17:01] <dholbach> ok, I have a few closing remarks for the Introduction to Ubuntu development, then let's take a 2-3 minute break so everybody can relax a bit and get a new coffee, tea, or whatever else :)
 154 [17:02] <dholbach> When you work on a fix, additional steps might involve getting the change backported to an older, still supported version of Ubuntu and forwarding it to Upstream.
 155 [17:02] <dholbach> As I said earlier: The most important requirements for success in Ubuntu development are: having a knack for "making things work again," not being afraid to read documentation and ask questions, being a team player and enjoying some detective work. :)
 156 [17:02] <dholbach> ^ This last point is important to me, that's why I keep saying it. :-)
 157 [17:02] <dholbach> Good places to ask your questions are ubuntu-motu-mentors@lists.ubuntu.com and #ubuntu-motu on irc.freenode.net. You will easily find a lot of new friends and people with the same passion that you have: making the world a better place by making better Open Source software.
 158 [17:03] <dholbach> Let's take a quick break, I'll be back in 2-3 minutes.
 159 [17:06] <dholbach> Are there any questions from the first part of the session?
 160 [17:07] <ClassBot> ben72 asked: is it enough for me to upload the fix to launchpad? will upstream monitor and pick it up by themselves?
 161 [17:07] <dholbach> ben72x, some will, but the majority won't because they have their own bug tracker
 162 [17:08] <dholbach> as I said earlier, we'll have a session about working with Debian later on this week - this one should definitely be interesting
 163 [17:08] <ClassBot> grungekid_ asked: Does ubuntu provide any good coding tutorials for languages such as python etc?
 164 [17:08] <dholbach> there are a lot of great coding tutorials out there, if you google for them, some of them are packaged in Ubuntu already
 165 [17:09] <dholbach> the diveintopython package for example is a great example for learning Python
 166 [17:09] <dholbach> alright - let's get started with setting up our development environment
 167 [17:10] <dholbach> a few important notes:
 168 [17:10] <dholbach>  - let us know in #ubuntu-classroom-chat if something doesn't work as expected, we'll do our best to help
 169 [17:11] <dholbach>  - if your internet is slow or you don't have a current ubuntu release running right now: don't worry - you can always just follow the instructions when you read the log of this session later on and ask in #ubuntu-motu
 170 [17:11] <dholbach> It is advisable to do packaging work using the current development version of Ubuntu. Doing so will allow you to test changes in the same environment where those changes will actually be applied and used.
 171 [17:11] <dholbach> Don't worry, though, the Ubuntu development release wiki page shows a variety of ways to safely use the development release: https://wiki.ubuntu.com/UsingDevelopmentReleases
 172 [17:12] <dholbach> As I said earlier: if you don't run oneiric now (you'd be very brave if you did), that's fine - just check out the wiki page above later on. The same steps are applicable there. :)
 173 [17:12] <dholbach> There are a number of tools that will make your life as an Ubuntu developer much easier. You will encounter these tools later in this guide.
 174 [17:12] <dholbach> To install most of the tools you will need, run this command:
 175 [17:12] <dholbach>     sudo apt-get install gnupg pbuilder ubuntu-dev-tools bzr-builddeb apt-file
 176 [17:13] <dholbach> to get just the bare minimum, run
 177 [17:13] <dholbach>     sudo apt-get install --no-install-recommends gnupg pbuilder ubuntu-dev-tools bzr-builddeb apt-file
 178 [17:13] <dholbach> (if you run oneiric or have Backports enabled, you can install the 'packaging-dev' package, which gives you a little bit more)
 179 [17:14] <dholbach> What we get is this:
 180 [17:14] <dholbach>  - gnupg – GNU Privacy Guard contains tools you will need to create a cryptographic key with which you will sign files you want to upload to Launchpad.
 181 [17:14] <dholbach>  - pbuilder – a tool to do a reproducible builds of a package in a clean and isolated environment.
 182 [17:14] <dholbach>  - ubuntu-dev-tools (and devscripts, a direct dependency) – a collection of tools that make many packaging tasks easier.
 183 [17:14] <dholbach>  - bzr-builddeb (and bzr, a dependency) – distributed version control tools that makes it easy for many developers to collaborate and work on the same code while keeping it trivial to merge each others work.
 184 [17:14] <dholbach>  - apt-file provides an easy way to find the binary package that contains a given file.
 185 [17:15] <dholbach>  - apt-cache (part of the apt package) provides even more information about packages on Ubuntu.
 186 [17:15] <dholbach> If what I said doesn't make a lot of sense yet, don't despair. We'll get there.
 187 [17:15] <dholbach> Let's dive into questions while we wait for the installations to end.
 188 [17:15] <ClassBot> _Dreamer_ asked: Which languages do I need to know to get involved in Ubuntu development?
 189 [17:16] <dholbach> _Dreamer_, There are no prerequisites. A lot of the simple bugs can be fixed by reading the code, trying to understand it and fixing small bits here and there. Typos are good examples of this category.
 190 [17:17] <dholbach> A great thing about Ubuntu development is that you can work on all the packages you like and they are written in different languages and different styles - you learn a lot.
 191 [17:17] <dholbach> C, Python, Perl, C++ are good examples of what you will probably come across.
 192 [17:17] <ClassBot> Abhijit asked: I want to develop my software for all ubuntu versions but I don not want the latest ubuntu version. I am happy with Lucicd. Will that cause any problem?
 193 [17:18] <dholbach> Abhijit, You can run Oneiric in a virtual machine - the link I gave above should help you with setting that up.
 194 [17:18] <dholbach> https://wiki.ubuntu.com/UsingDevelopmentReleases
 195 [17:18] <ClassBot> mustafajnr asked: I'm running Lubuntu, which have been officially picked-up by Ubuntu as an official derivative as soon as the NEXT release, will it be sufficient?
 196 [17:18] <dholbach> mustafajnr, yes! :)
 197 [17:18] <dholbach> All Ubuntu derivatives share the same package base, so it's easy to be a developer, no matter if you run Kubuntu, Ubuntu, Ubuntu Server, Lubuntu, Edubuntu or whatever else
 198 [17:19] <ClassBot> Kvrmurthy asked: Any good starting books?
 199 [17:19] <dholbach> Kvrmurthy, if it's about learning programming languages, I'd recommend googling and following recommended tutorials
 200 [17:19] <dholbach> if it's about Ubuntu development, I'd recommend https://wiki.ubuntu.com/MOTU/GettingStarted
 201 [17:19] <ClassBot> dell asked: will the minimum file later have dependency issue
 202 [17:19] <dholbach> dell, no - you should be fine
 203 [17:20] <ClassBot> coalwater asked: whats -no-install-recommends for ?
 204 [17:20] <dholbach> coalwater, Packages cann depend on other packages (hard sort-of-unbreakable (yeah, I know....) dependencies), softer dependencies, which are called recommends
 205 [17:20] <dholbach> and suggests, which are not considered by default
 206 [17:20] <dholbach> recommends are installed by default, but can be ignored or removed without problems
 207 [17:21] <ClassBot> Kvrmurthy asked: Two things how we can run oneric in 11.04? and what is backport?
 208 [17:21] <dholbach> https://wiki.ubuntu.com/UsingDevelopmentReleases should help with running oneiric
 209 [17:21] <dholbach> backports is an additional repository where updated version of packages or new packages are added after the release got out
 210 [17:21] <ClassBot> saimanoj60 asked: Which version of Python(2.7 or 3.0) is used in development?
 211 [17:22] <dholbach> saimanoj60, for oneiric it will be both (just not sure which of the Python3 versions it will be - 3.1???)
 212 [17:22] <dholbach> with the long term aim of moving to 3.x, but not for oneiric
 213 [17:22] <ClassBot> mgarrido asked: what's the recommended development system? testdrive?  a full install in another vm?
 214 [17:23] <dholbach> mgarrido, any option mentioned on https://wiki.ubuntu.com/UsingDevelopmentReleases should work - try doing a straw poll in #ubuntu-classroom-chat and see what others recommend :)
 215 [17:23] <dholbach> I use a virtual machine in kvm right now
 216 [17:23] <dholbach> ok, let's crack on - I hope the packages installed alright for you :)
 217 [17:24] <dholbach> Let's start of with your GPG key.
 218 [17:24] <dholbach> If you have one, you of course don't need to follow the instructions here.
 219 [17:24] <dholbach> GPG stands for GNU Privacy Guard and it implements the OpenPGP standard which allows you to sign and encrypt messages and files. This is useful for a number of purposes. In our case it is important that you can sign files with your key so they can be identified as something that you worked on. If you upload a source package to Launchpad, it will only accept the package if it can absolutely determine who uploaded the package.
 220 [17:24] <dholbach> To generate a new GPG key, run:
 221 [17:25] <dholbach>     gpg --gen-key
 222 [17:25] <dholbach> GPG will first ask you which kind of key you want to generate. Choosing the default (RSA and DSA) is fine. Next it will ask you about the keysize. The default (currently 2048) is fine, but 4096 is more secure.
 223 [17:25] <dholbach> Afterward, it will ask you if you want it to expire the key at some stage. It is safe to say "0", which means the key will never expire.
 224 [17:25] <dholbach> The last questions will be about your name and email address. Just pick the ones you are going to use for Ubuntu development here, you can add additional email addresses later on. Adding a comment is not necessary.
 225 [17:25] <dholbach> Then you will have to set a passphrase. Choose a safe one.
 226 [17:26] <dholbach> Now GPG will create a key for you, which can take a little bit of time; it needs random bytes, so if you give the system some work to do it will be just fine. Move the cursor around!
 227 [17:26] <dholbach> Or just sit here in this session and enjoy the company of 284 others. :)
 228 [17:27] <dholbach> Once this is done (and it might take a while - that's fine), you will get a message similar to this one:
 229 [17:27] <dholbach> pub   4096R/43CDE61D 2010-12-06
 230 [17:27] <dholbach>       Key fingerprint = 5C28 0144 FB08 91C0 2CF3  37AC 6F0B F90F 43CD E61D
 231 [17:27] <dholbach> uid                  Daniel Holbach <dh ... fang.de>
 232 [17:27] <dholbach> sub   4096R/51FBE68C 2010-12-06
 233 [17:27] <dholbach> In this case 43CDE61D is the key ID.
 234 [17:28] <dholbach> Once this is done, you need to upload the key to a gpg keyserver. Remind me of telling you how to do that later on. ;-)
 235 [17:28] <ClassBot> acklee asked: whether to run Ubuntu using Wubi reliable for development?
 236 [17:28] <dholbach> acklee, I have never used it, but I guess that'd work
 237 [17:29] <ClassBot> Semih asked: Can we use this key from another machine ?
 238 [17:29] <dholbach> Semih, yes, as far as I know, it should be fine to just copy it over (it's in ~/.gnupg)
 239 [17:29] <ClassBot> dell asked: For frequent formatting, how can we save that file for later use. Can we make another gpg key
 240 [17:29] <dholbach> dell, it's better to re-use your existing one or you end up updating it in all kinds of places
 241 [17:30] <dholbach> ok, let us let gpg do its thing and move over to our SSH keys
 242 [17:30] <dholbach> SSH stands for Secure Shell, and it is a protocol that allows you to exchange data in a secure way over a network. It is common to use SSH to access and open a shell on another computer, and to use it to securely transfer files. For our purposes, we will mainly be using SSH to securely communicate with Launchpad.
 243 [17:30] <dholbach> To generate a SSH key, enter:
 244 [17:30] <dholbach>     ssh-keygen -t rsa
 245 [17:30] <dholbach> (you can use another terminal for doing this)
 246 [17:31] <dholbach> The default file name usually makes sense, so you can just leave it as it is. For security purposes, it is highly recommended that you use a passphrase.
 247 [17:31] <ClassBot> RWINZ asked: hello everybody, can someone tell me how to install my cdma modem on my ubuntu natty?
 248 [17:31] <dholbach> RWINZ, I would suggest you join #ubuntu and ask the question there - we're currently focused on "Introduction to Ubuntu Development"
 249 [17:32] <dholbach> with GPG and SSH keys done, let's have a look at our build environment
 250 [17:32] <dholbach> In this example, we'll make use pbuilder - there's other alternatives as well
 251 [17:32] <dholbach> pbuilder allows you to build packages locally on your machine. It serves a couple of purposes:
 252 [17:32] <dholbach>  - The build will be done in a minimal and clean environment. This helps you make sure your builds succeed in a reproducible way, but without modifying your local system
 253 [17:33] <dholbach>  - There is no need to install all necessary build dependencies locally
 254 [17:33] <dholbach>  - You can set up multiple instances for various Ubuntu and Debian releases
 255 [17:33] <dholbach> Setting pbuilder up is very easy. Edit ~/.pbuilderrc with your favourite editor and add the following line to it:
 256 [17:33] <dholbach> COMPONENTS="main universe multiverse restricted"
 257 [17:33] <dholbach> Save it.
 258 [17:33] <dholbach> This will ensure that build dependencies are satisfied using all Ubuntu components.
 259 [17:34] <dholbach> Then run:
 260 [17:34] <dholbach>     pbuilder-dist <release> create
 261 [17:34] <dholbach> where <release> is for example natty, maverick, lucid or in the case of Debian maybe sid. This will take a while as it will download all the necessary packages for a "minimal installation". These will be cached though.
 262 [17:34] <dholbach> in our case, let's try this:
 263 [17:34] <dholbach>     pbuilder-dist natty create
 264 [17:35] <dholbach> The reason I don't suggest oneiric is https://launchpad.net/bugs/807974 - it's currently not possible.
 265 [17:35] <dholbach> If you want a notification of when it works again, please subscribe to the bug report and try again when the issue is fixed.
 266 [17:35] <dholbach> As mentioned above: setting up pbuilder will take quite a while, particularly if you're on a slow internet connection. The good news is: packages will be cached. :)
 267 [17:36] <ClassBot> Cuzzie asked: Is the ~/.pbuilderrc file already there after we installed pbuilder, or do we have to make one?
 268 [17:36] <dholbach> Cuzzie, no, if you don't have it, just create it
 269 [17:36] <ClassBot> alucardni asked: it's possible to have a Debian pbuilder environment in ubuntu?
 270 [17:37] <dholbach> alucardni, yes - "pbuilder-dist sid create" would create a pbuilder instance for Debian unstable
 271 [17:37] <ClassBot> ankurgel asked: all this has to be done on latest Ubuntu release or will previous version work fine?
 272 [17:37] <dholbach> ankurgel, previous releases should work fine
 273 [17:38] <dholbach> you should be able to go back and use the log to set up all of this in an updated virtual machine later on if you like
 274 [17:38] <dholbach> let's talk a bit about Launchpad
 275 [17:39] <dholbach> With a basic local configuration in place, your next step will be to configure your system to work with Launchpad. Now we will focus on the following topics:
 276 [17:39] <dholbach>  - What Launchpad is, and creating a Launchpad account
 277 [17:39] <dholbach>  - Uploading your GPG and SSH keys to Launchpad
 278 [17:39] <dholbach>  - Configuring Bazaar to work with Launchpad
 279 [17:39] <dholbach>  - Configuring Bash to work with Bazaar
 280 [17:39] <dholbach> Launchpad is the central piece of infrastructure we use in Ubuntu. It not only stores our packages and our code, but also things like translations, bug reports, and information about the people who work on Ubuntu and their team memberships.
 281 [17:39] <dholbach> You will also use Launchpad to publish your proposed fixes, and get other Ubuntu developers to review and sponsor them.
 282 [17:40] <dholbach> You will need to register with Launchpad and provide a minimal amount of information. This will allow you to download and upload code, submit bug reports, and more.
 283 [17:40] <dholbach> If you don't already have a Launchpad account, you can easily create one: https://launchpad.net/+login
 284 [17:40] <dholbach> If you have a Launchpad account but cannot remember your Launchpad id, you can find this out by going to https://launchpad.net/people/+me and looking for the part after the ~ in the URL.
 285 [17:40] <dholbach> Launchpad's registration process will ask you to choose a display name. It is encouraged for you to use your real name here so that your Ubuntu developer colleagues will be able to get to know you better.
 286 [17:41] <dholbach> When you register a new account, Launchpad will send you an email with a link you need to open in your browser in order to verify your email address. If you don't receive it, check in your spam folder.
 287 [17:41] <dholbach> The new account help page on Launchpad has more information about the process and additional settings you can change: https://help.launchpad.net/YourAccount/NewAccount
 288 [17:41] <ClassBot> ben72 asked: you now assume we're on oneiric right?
 289 [17:42] <dholbach> ben72x, no - a supported ubuntu release should be fine - if you read the log of this session later on again, you can easily either copy your settings to a virtual machine or repeat the steps
 290 [17:42] <ClassBot> ankurgel asked: ~/.pbuilderr doesn't exist. Should I create a new file and save it with that mentioned line in it?
 291 [17:42] <dholbach> ankurgel, yes, create a new ~/.pbuilderrc and save it
 292 [17:43] <dholbach> also if you should run out of time following all the instructions: having a look at the log later on should help you find your way afterwards (or ask in #ubuntu-motu :))
 293 [17:44] <dholbach> Open https://launchpad.net/people/+me/+editsshkeys in a web browser, also open ~/.ssh/id_rsa.pub in a text editor. This is the public part of your SSH key, so it is safe to share it with Launchpad. Copy the contents of the file and paste them into the text box on the web page that says "Add an SSH key". Now click "Import Public Key".
 294 [17:44] <dholbach> For more information on this process, visit https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair
 295 [17:45] <ClassBot> dell asked: It asked me to create system wide cache directory.  I started to download that.
 296 [17:45] <dholbach> dell, I'm not quite sure which part of the instructions you are referring to. Can somebody in #ubuntu-classroom-chat answer this?
 297 [17:45] <ClassBot> coalwater asked: is there a difference between ubuntu devs and motu devs? or are they the same ?
 298 [17:46] <dholbach> coalwater, they all are Ubuntu developers - MOTU is the group of Ubuntu Developers that has upload rights for Universe and Multiverse only
 299 [17:46] <dholbach> also does the MOTU team do a lot of training of new developers - it's great to hang out with the team - they're a friendly bunch
 300 [17:47] <dholbach> but generally it doesn't matter which upload rights you have if you care about Ubuntu and help improving it - it just makes getting changes into Ubuntu easier because you proved your abilities before and don't have to go through the review process every single time
 301 [17:47] <ClassBot> kermit6667485 asked: How much space will pbuilder take to create a new development environment? Same as a fresh Ubuntu install? How can we delete this environment later on in case we want to move to a virtual machine?
 302 [17:48] <dholbach> kermit6667485, much less than a default install,
 303 [17:48] <dholbach> daniel@miyazaki:~$ ls -la pbuilder/natty-base.tgz
 304 [17:48] <dholbach> -rw-r--r-- 1 root root 100385624 2011-06-09 12:17 pbuilder/natty-base.tgz
 305 [17:48] <dholbach> daniel@miyazaki:~$
 306 [17:48] <dholbach> You can just remove the ~/pbuilder directory later on if you decide you don't like it/need it
 307 [17:48] <dholbach> We have 12 minutes left and I fear we might run out of time - let's talk about Bazaar a bit
 308 [17:49] <dholbach> Bazaar is the tool we use to store code changes in a logical way, to exchange proposed changes and merge them, even if development is done concurrently.
 309 [17:49] <dholbach> To tell Bazaar who you are, simply run:
 310 [17:49] <dholbach>      bzr whoami "Bob Dobbs <subgenius@example.com>"
 311 [17:49] <dholbach>     bzr launchpad-login subgenius
 312 [17:49] <dholbach> whoami will tell Bazaar which name and email address it should use for your commit messages. With launchpad-login you set your Launchpad ID. This way code that you publish in Launchpad will be associated with you.
 313 [17:49] <dholbach> Note: If you can not remember the ID, go to https://launchpad.net/people/+me and see where it redirects you. The part after the "~" in the URL is your Launchpad ID.)
 314 [17:50] <dholbach> We need to follow similar steps to tell the Debian/Ubuntu packaging tools about who we are.
 315 [17:50] <dholbach> It's quite easy though. Simply open your ~/.bashrc in a text editor and add something like this to the bottom of it:
 316 [17:50] <dholbach> export DEBFULLNAME="Bob Dobbs"
 317 [17:50] <dholbach> export DEBEMAIL="subgenius@example.com"
 318 [17:50] <dholbach> Now save the file and either restart your terminal or run:
 319 [17:50] <dholbach>     source ~/.bashrc
 320 [17:50] <ClassBot> There are 10 minutes remaining in the current session.
 321 [17:51] <dholbach> (If you do not use the default shell, which is bash, please edit the configuration file for that shell accordingly.)
 322 [17:51] <dholbach> I hope that by now your GPG key was successfully generated.
 323 [17:51] <dholbach> You should see a message like this:
 324 [17:52] <dholbach> pub   4096R/43CDE61D 2010-12-06
 325 [17:52] <dholbach>       Key fingerprint = 5C28 0144 FB08 91C0 2CF3  37AC 6F0B F90F 43CD E61D
 326 [17:52] <dholbach> uid                  Daniel Holbach <dh .... pfang.de>
 327 [17:52] <dholbach> sub   4096R/51FBE68C 2010-12-06
 328 [17:52] <dholbach> In the case above 43CDE61D is the key ID.
 329 [17:52] <dholbach> If you run this command, the key should be uploaded to a keyserver
 330 [17:52] <dholbach>     gpg --send-keys <KEY ID>
 331 [17:53] <dholbach> This will send your public key (this is safe!) to one keyserver, but a network of keyservers will automatically sync the key between themselves. Once this syncing is complete, your signed public key will be ready to verify your your contributions around the world.
 332 [17:53] <ClassBot> ankurgel asked: And then use environment variables like: bzr whoami $DEBFULLNAme <$DEBMAIL> each time?
 333 [17:53] <dholbach> ankurgel, no, the tools will assume they know you and auto-fill in that data :)
 334 [17:53] <dholbach> so no need for variables or spelling your name all the time :)
 335 [17:54] <dholbach> https://help.launchpad.net/YourAccount/ImportingYourPGPKey will tell you how to upload your GPG key to Launchpad
 336 [17:54] <dholbach> and with that you should be fully set up and ready to go!
 337 [17:54] <dholbach> As I said earlier https://wiki.ubuntu.com/UbuntuDeveloperWeek will have links to logs by the end of each day, so make you visit that page again - best bookmark it :)
 338 [17:55] <dholbach> there's a variety of things we talked about and there's a variety of sessions still coming up that will give you much broader insight into how things work.
 339 [17:55] <ClassBot> ankurgel asked: But, bzr command will be needed to commit each time. Willn't it? That's why thought to use env. var. with command.
 340 [17:55] <ClassBot> There are 5 minutes remaining in the current session.
 341 [17:56] <dholbach> ankurgel, after you've run "bzr whoami" it will store the information about you in its own config files and you won't have to type it in again
 342 [17:56] <dholbach> commit messages will automatically have your name and email associated with them
 343 [17:57] <dholbach> for further reading I'd like to recommend https://wiki.ubuntu.com/MOTU/GettingStarted
 344 [17:57] <dholbach> also http://people.canonical.com/~dholbach/packaging-guide/html/ might look very much familiar after you sat through the two first sessions
 345 [17:57] <dholbach> To ask questions, check out #ubuntu-motu and https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu-mentors
 346 [17:58] <dholbach> and if you use any social media, check out (and follow if you like) http://twitter.com/ubuntudev http://identi.ca/ubuntudev http://facebook.com/ubuntudev to find out more about what's going on next
 347 [17:58] <dholbach> with that, I'd like to hand over to Sébastien "seb128" Bacher and the Desktop team, who will answer all the questions you might have!
 348 [17:59] <dholbach> Thanks a lot everybody - you ROCK!

MeetingLogs/devweek1107/GetStarted (last edited 2011-07-12 07:49:53 by dholbach)