[00:53] * hggdh is away: walking the dogs === picard_p1ns_kirk is now known as picard_pwns_kirk === hggdh is now known as hggdh|away [05:00] date -u [05:02] Socceroos_work, in your terminal [05:03] :D [05:18] :) [05:20] . [06:08] date -u === dholbach changed the topic of #ubuntu-classroom to: Ubuntu Classroom || https://wiki.ubuntu.com/Classroom || https://lists.ubuntu.com/mailman/listinfo/Ubuntu-classroom || Next Event: Ubuntu Developer Week: https://wiki.ubuntu.com/UbuntuDeveloperWeek | Questions about the presentation in #ubuntu-classroom-chat (prefix with QUESTION: ...) | Run date -u (in a terminal) to find out what UTC time is right now [06:12] :) [06:58] date -me === persia_ is now known as persia === ALAY1 is now known as ALAYA [08:18] hello : ) === AdiB is now known as adibdimitri [09:25] -u [10:53] === dholbach_ is now known as dholbach === hggdh_ is now known as hggdh__ [15:09] sorry, wrong window :-) annd the pw is changed for sure. === hggdh__ is now known as hggdh === superm1 is now known as superm1|away [16:55] ~o~ \o/ ~o~ [16:56] Are you ready for Ubuntu Developer Week - Day 2? [16:56] no [16:56] yes! [16:57] huhu dholbach :D [16:57] come on... who's here for another day of Ubuntu Developer action? :-) [16:57] uh, well, then [16:57] yay! [16:57] \o [16:57] \o/ [16:57] hey [16:57] \o/ [16:57] * balachmar is here [16:57] o/ [16:58] I am [16:58] me too! can we have a beijing olympics opening ceremony style countdown :) [16:58] me too [16:58] * Volans I am too [16:58] me three? [16:58] woohoo, excellent - grab something drink a snack, lean back and enjoy === superm1|away is now known as superm1 === fabian23_ is now known as fabia1 [16:59] * takdir too === fabia1 is now known as fabian23_ [17:00] * mruiz waves [17:00] alright... let's get started - my name is Daniel Holbach, I've been working with the MOTU team since hoary and work for Canonical for quite a while, trying to make developing Ubuntu as fun as possible [17:01] together we're going to grab some low-hanging fruit and fix a bug together [17:01] questions please in #ubuntu-classroom-chat, prefixed with "QUESTION: ..." [17:02] for those of you who are participating can you please just mention which Ubuntu release you are on and if you have a fast/slow connection to the net? [17:02] in here is fine [17:02] 8.10 - 8meg [17:02] hardy - 8meg [17:02] just fast/slow is fine :-) [17:02] 8.04 fast [17:02] 8.10 , 10meg [17:02] 8.04 fast [17:02] fast :) [17:02] I don't want you to start measuring now :-) [17:02] 8.04 fast [17:02] hardy - medium [17:02] 8.04 fast [17:02] heh [17:02] intrepid, medium [17:02] 8.10 - slow [17:03] hardy - medium [17:03] 7.10 + pbuilder-intrepid - 7meg [17:03] 8.04 Medium (relative)// [17:03] 8.10 - slow [17:03] ok.. 8.04, 8.10 and 7.10 should be fine AFAIK - if you run into problems or have questions, please raise it on #ubuntu-classroom-chat [17:03] we need to do some preparations first [17:03] 8.10 16mbit :P [17:04] those of you who have a reasonably fast connection will install pbuilder [17:04] please do the following: [17:04] sudo apt-get install pbuilder devscripts [17:04] then edit ~/.pbuilderrc [17:04] hardy slow [17:04] and put [17:04] COMPONENTS="main universe multiverse restricted" [17:04] into it [17:04] then run [17:04] sudo pbuilder create [17:05] we'll let that run in the background as it will take some time [17:05] everybody else please just install devscripts [17:05] pbuilder is a tool with which we can test-build source packages in a minimal environment [17:06] what I just mentioned was the short cut, https://wiki.ubuntu.com/PbuilderHowto has more information [17:06] ok... while that's running, let's start looking for those low-hanging fruit :-) [17:07] a while ago I started an effort called Harvest - it's basically a webpage that pulls data from various sources and displays that information per package [17:07] http://daniel.holba.ch/harvest [17:07] QUESTION: which distro pbuilder should have created ? [17:07] tacone: the ones that were mentioned before should all be fine [17:08] if you click on the "Sourcepackage list" link it will present you with an awfully long list of "opportunities" [17:08] let's fast-forward to http://daniel.holba.ch/harvest/handler.py?pkg=djvulibre [17:08] QUESTION: how I can use local mirror server in pbuilder instead of archive.ubuntu.com [17:09] mazaalai: please check out https://wiki.ubuntu.com/PbuilderHowto - it should have that information [17:09] MIRRORSITE="http://us.archive.ubuntu.com/ubuntu" I think [17:10] ok, everybody at http://daniel.holba.ch/harvest/handler.py?pkg=djvulibre right now? [17:10] it shows three opportunities [17:10] 2 fedora patches [17:10] and one from the "opportunities" list [17:10] errr [17:10] and one from the "patches" list [17:10] please click on the 255695 link [17:10] patches means: this is a bug with a patch attached [17:11] as you can see, Harvest makes it easy to gather all that kind of information about packages that you're interested in [17:11] amont them are: patches in Launchpad, upgrade requests, fedora patches, if the package does not build from source right now, etc etc [17:12] sometimes it takes a bit to find something suitable to work on (because you don't know the package well enough or the bug is too complicated and so on), but Harvest is a good start to find those low hanging fruit [17:12] ok... the bug report says something's wrong with the manpage of c44 (which is included in the package) [17:13] let's see if that's true, please run [17:13] dget http://daniel.holba.ch/motu/djvulibre_3.5.20-7ubuntu1.dsc [17:13] for those of you who attended Packaging 101 yesterday, you already notice which files were downloaded and what they are their for [17:14] QUESTION: do I want to do dget in a seperate folder, or does it put it into the pbuilder stuff? [17:14] balachmar: as you like it, you can run it from a special directory if you like, no problemo [17:14] ls [17:14] it downloaded a .orig.tar.gz a .dsc and a .diff.gz file [17:15] short version: .orig.tar.gz is the unmodified tarball that the software authors released on their homepage, .diff.gz the compressed set of changes we need to apply to make it build "our way" and become a nice .deb package in the end, the .dsc file contains metadata like md5sum, etc [17:16] alright [17:16] please run dpkg-source -x djvulibre_3.5.20-7ubuntu1.dsc [17:16] this will extract the tarball, then apply the compressed patch [17:16] QUESTION: it says "dscverify: can't find any Debian keyrings "? [17:17] mitesh: it's a warning, you can safely ignore it [17:18] QUESTION: I get dpkg-source: error: File ./djvulibre_3.5.20.orig.tar.gz has size 1359872 instead of expected 2426487 ? [17:18] fluteflute: sorry for that, I'm just fixing the mistake [17:19] sorry for that everybody, please run the commands again [17:19] that is: [17:19] dget http://daniel.holba.ch/motu/djvulibre_3.5.20-7ubuntu1.dsc [17:20] dpkg-source -x djvulibre_3.5.20-7ubuntu1.dsc [17:20] thanks for bearing with me :) [17:20] OK [17:20] :) [17:21] :) [17:21] let's try to find out if the problem that Mr Ralph Corderoy describes is still valid [17:21] cd djvulibre-3.5.20/tools [17:21] nroff -man c44.1 | less [17:22] this will display the manpage [17:22] and since he alread mentions that it's around the "PPM" bit in the text, we can run: [17:22] ls [17:22] nroff -man c44.1 | grep -a1 -b1 PPM [17:22] you should see the ".SM" bit he is referring to in the bug report [17:23] everybody can see that? [17:23] let me rephrase: can you guys see that too? :) [17:23] yes [17:23] yes [17:23] yes [17:23] yes [17:23] yeehaw [17:24] yes [17:24] yes [17:24] great [17:24] I get troff: fatal error: can't open `c44.1': No such file or directory [17:24] just wanted to make sure I hadn't lost you on the way :) [17:24] tacone: are you in djvulibre-3.5-20/tools ? [17:24] djvulibre-3.5.20/tools [17:24] no ok, my fault, sorry [17:24] alright, let's go on [17:25] let's all download the patch that Ralph Corderoy is suggesting [17:25] I'll assume you put it into ~ for now :) [17:25] please run [17:25] patch -p0 < ~/c44.1.patch [17:26] in my case it safely applied [17:26] anybody got any problems? [17:26] it must be in djvulibre-3.5.20/tools, right? [17:26] mazaalai: no, it doesn't matter where you put the patch, it's just important that you are in the directory, when you run the patch command [17:27] dholbach, successful == .PM shouldn't be there? [17:27] techno_freak: I'm coming to that :) [17:27] QUESTION : it says bash: /home/mitesh/c44.1.patch: No such file or directory [17:27] mitesh: did you download the patch from the bug report to ~? [17:27] QUESTION: where can i download the patch from? [17:27] https://bugs.launchpad.net/ubuntu/+source/djvulibre/+bug/255695 [17:27] Launchpad bug 255695 in djvulibre "c44(1) man page outputs splurious `.SM' macro invocation" [Undecided,New] [17:28] the patch operation should take a second at best [17:28] wget -c http://launchpadlibrarian.net/16614829/c44.1.patch [17:28] ok... once you've applied the patch please run [17:28] nroff -man c44.1 | grep -a1 -b1 PPM [17:28] again [17:28] can you still the ".SM" bit there? [17:29] no [17:29] nope [17:29] no :D [17:29] done...no [17:29] nope [17:29] ok, it's gone [17:29] no [17:29] gone [17:29] excellent, seems that Ralph Corderoy has done good work :) [17:29] ok... now [17:30] as we want to fix the bug in Ubuntu we need to add a changelog entry to explain what we changed and why [17:30] this all happens in debian/changelog [17:30] so please run: [17:30] cd .. [17:30] dch -i [17:30] this will fire up an editor with a template changelog entry [17:31] I won't go through all the specifics in it, read the Packaging 101 log from yesterday or check out the videos on http://youtube.com/ubuntudevelopers [17:31] there's also https://wiki.ubuntu.com/PackagingGuide to find out more about it [17:32] just make sure that the top entry says "intrepid" in the first line and that your mail address and name is correct [17:32] QUESTION: how do you change the dhc template so it uses the correct email? [17:32] and for those running hardy and gutsy? [17:32] fabian23_: dch -i -D intrepid [17:33] Oli`` is right, I should have explained that before, for now just edit it manually, I'll tell you later how to fix it for the next times you're going to use the tool [17:33] fabian23_ asks an important question: why not hardy, why intrepid? [17:33] because we can just make changes in the current development release which is intrepid [17:33] all the other releases have been closed [17:34] there's the hardy-updates process which works differently, for now the link https://wiki.ubuntu.com/StableReleaseUpdates should be enough [17:34] ok, let's document our changes [17:34] that's the crucial step, because our fellow developers should not have to guess where our ideas came from [17:34] I'll put in something like this: [17:35] * tools/c44.1: applied patch from Ralph Corderoy to fix the manpage markup. (LP: #255695) [17:35] three things are worth noting: [17:35] 1) explicitly named the files that were changed in the upload [17:36] 2) I gave credit to the person who provided the fix [17:36] 3) I mentioned which bug report in Launchpad this is all about [17:36] in addition to that (LP: #) will automatically close the bug once it got uploaded to the build daemons [17:36] QUESTION: shouldn't we use a patch system ? [17:36] tacone: good question [17:37] there's going to be another session on Sep 3rd at 20:00 UTC about patch systems [17:37] this package does not use a patch system itself and directly applies changes to the source, so we'll do the same [17:38] once we're done with that, please save the file [17:38] and run debuild -S [17:39] this will rebuild the source package (not build the package itself) and refresh the .diff.gz [17:39] if you run [17:39] ls .. [17:39] you will notice that there are two .diff.gz files now [17:39] the one we downloaded and the second one we created ourselves [17:40] since the question about patch system comes up again in #ubuntu-classroom-chat: [17:40] if the Debian package we're attempting to fix does not add a patch system itself and patches the source inline (as opposed to adding patch files in debian/patches) we will do the same [17:40] dholbach: running debsign failed [17:40] QUESTION: why dosen't debuild -S find my private gpg key? [17:40] that's to be expected, I'll enlighten you about it in a bit - it's safe to ignore right now [17:40] QUESTION: /bin/bash: dh_testdir: command not found where can i find it? which package? [17:41] chombium: sorry..... sudo apt-get install debhelper [17:41] tx [17:41] ok [17:41] now please run: [17:42] cd ..; debdiff djvulibre_3.5.20-7ubuntu{1,2}.dsc > djvulibre.debdiff [17:42] debdiff is a great utility that will compare the two revisions of debian source packages and print out the diff [17:43] can you all please go to http://paste.ubuntu.com and paste the contents of your djvulibre.debdiff into it and give the link to your sourcepackage here? [17:44] fluteflute, ^^ [17:44] who managed to produce a djvulibre.debdiff ? [17:45] dholbach: http://paste.ubuntu.com/42746/ [17:45] can you please post the contents of that file on http://paste.ubuntu.com and give the link here? [17:45] dholbach: http://paste.ubuntu.com/42747/ [17:45] http://paste.ubuntu.com/42748/ [17:45] Coper: looks good! [17:45] http://paste.ubuntu.com/42752/ [17:45] tacone: looks good [17:45] http://paste.ubuntu.com/42749/ [17:46] http://paste.ubuntu.com/42750/ [17:46] http://paste.ubuntu.com/42754/ [17:46] riot_le: looks good too [17:46] http://paste.ubuntu.com/42753/ [17:46] http://paste.ubuntu.com/42755/ [17:46] http://paste.ubuntu.com/42756/ [17:46] http://paste.ubuntu.com/42757/ [17:46] vishr: looks good as well, I'd just indent the 2nd line of the changelog entry a bit [17:47] palango: the same goes for yours [17:47] ok [17:47] balachmar: yours is OK, I'd just wrap the line in the changelog entry [17:47] KennethVenken: same as balachmar [17:47] http://paste.ubuntu.com/42758/ [17:47] http://paste.ubuntu.com/42759/ [17:48] swingnjazz: please the contents of the file, not the command line output [17:48] Oli``: same as balachmar [17:48] @dholbach the famous 60 characters or something? [17:48] Bijoy: was that the whole file? [17:48] uuh, sorry for that [17:48] balachmar: yeah, editors like vi make it easier for you [17:48] techno_freak: same as balachmar's :) [17:49] takdir: your changelog entry is a bit short [17:49] chombium: your changelog entry is empty [17:49] dholbach, ok [17:49] other than that: W E L L D O N E [17:49] I mean... [17:49] _ _ _ [17:49] __ _____| | | __| | ___ _ __ ___ [17:49] \ \ /\ / / _ \ | | / _` |/ _ \| '_ \ / _ \ [17:49] \ V V / __/ | | | (_| | (_) | | | | __/ [17:49] \_/\_/ \___|_|_| \__,_|\___/|_| |_|\___| [17:49] [17:49] everybody! [17:49] QUESTION: I see that in the debdiff there are entries also for autogenerated files, we should leave them or use filterdiff? [17:50] Volans: good question [17:50] sorry, my bad, I'll paste again [17:50] config.guess and config.sub are build helpers that were automatically updated and can be filtered out - it makes reviewing a lot easier [17:50] QUESTION: Is there a reason why there's a ~200 line difference in diff size between some of ours? [17:50] Oli``: that's due to what I just said above [17:50] REMARK: But the command dch -i started nano not vi [17:50] balachmar: you're right [17:51] so let's fix all the GPG, Name, Email address, Editor issues you all saw before [17:51] if you all use bash as your shell (the default), then please edit ~/.bashrc [17:51] http://paste.ubuntu.com/42762/ [17:51] http://paste.ubuntu.com/42761/ [17:51] and add something like this at the end of it: [17:51] export DEBFULLNAME='Daniel Holbach' [17:51] export DEBEMAIL='daniel.holbach@ubuntu.com' [17:51] export EDITOR=vim [17:51] then save the file and run: [17:52] source ~/.bashrc [17:52] swingnjazz: better, I'd just wrap the line of the changelog entry [17:52] Bijoy: I'd indent the second line of the changelog entry a bit [17:52] other than that: GREAT [17:52] QUESTION: So what to do now we have patched it? [17:53] that's the good question :-) [17:53] let's build the package and see if after our changes it still builds [17:53] if your pbuilder command has finished, please run [17:53] sudo pbuilder build djvulibre_3.5.20-7ubuntu2.dsc [17:53] this is going to take a while [17:54] in the meantime, I'm going to explain once you've found that: [17:54] 1) the package still builds [17:54] 2) once you installed the new package, your system still works [17:54] 3) all is good [17:54] (testing is crucial, but we don't do it in the 6 remaining minutes) [17:55] what happens once all tests passed and you're happy with everything? [17:55] you'll follow the sponsoringship process [17:56] Sponsoring means: somebody who has upload privileges already will review your debdiff (you'll attach it to the bug in question) and if they're happy with what you've done, sign the source package with their GPG key and upload it [17:56] https://wiki.ubuntu.com/SponsorshipProcess has more information about that [17:56] (all the links I mentioned before are on https://wiki.ubuntu.com/MOTU/GettingStarted <- that's the one you should bookmark) [17:56] QUESTION: Is there a way to mark a bug as being worked upon? [17:56] very important question [17:56] yes, there is [17:57] you will click on the little arrow on the yellow bar in the middle of the bug report [17:57] and set yourself as the assignee and set it to in progress [17:58] as you can see: fixing Ubuntu is not always rocket science, but more a matter of detective skills and careful testing and asking questions [17:58] the door to #ubuntu-motu is always open and you can ask questions there [17:59] please read the sponsorship page carefully when asking for sponsorship [17:59] any more, maybe general questions? :) [17:59] we have a minute left :) [17:59] OK, we'll have a nother session on thursday [17:59] fixing bugs again :-) [18:00] thanks everybody, you really ROCK [18:00] do you publish this HowTo in the Wiki too? [18:00] but important ones since FF is here :P [18:00] thanks a lot dholbach :) [18:00] +1 [18:00] thanks! [18:00] thanks dholbach [18:00] \o/ [18:00] thanks a lot dholbach [18:00] I'll repeat what I said yesterday: I'd like to see your names connected to Ubuntu Development soon, so make me proud! :-) [18:00] thanks to you [18:00] I am going to find some fruit straight away! [18:01] Thank you Daniel! [18:01] next up is the unstoppable David Futcher (bobbo) who is going to introduce you to bzr [18:01] thanks everybody! [18:01] thx dholbach [18:01] bobbo: the stage is yours :-) [18:01] thanks dholbach ! [18:01] Hey! My name is David Futcher and today I'll be giving you a simple introduction to the Bazaar (BZR) Distributed Version Control system (dont worry if you dont know what that means, we'll get to that a bit later on). [18:02] I like to answer questions, so, if you have any, please do not hesitate to ask. Prefix your question with QUESTION: and ask it in #ubuntu-classroom-chat. [18:02] I have never done a UDW session before, so this session may be quite short or even run over, but we will cross that bridge when we come to it. If I am going too fast at any point, please shout and #-chat and I'll slow down :) [18:02] So who is all here? Raise your hand in #-chat so I can see it! [18:02] \o/ [18:03] o/ [18:03] wahey, we have some people! [18:03] * palango raises his hand [18:03] Before we get started we need to install some packages. Run sudo apt-get install bzr bzrtools to make sure you have everything we will need. It would also be handy if you have a Launchpad account (I guess most of you do), though its not absolutely necessary, but you might have to skip out some of the session later on. [18:03] shout when you have all this installed and we can get started :) [18:04] Awesome, everyone seems to be ready, lets get started! [18:05] ## What is BZR? [18:05] (This section is a bit heavy on reading, but we will get to some practical examples soon) [18:05] azaar is a tool for helping people collaborate on open-source software. It tracks the changes that you and other people make to a group of files - such as software source code - to give you snapshots of each stage of their evolution. [18:05] Using that information, Bazaar can effortlessly merge your work with other people's. [18:06] Tools like Bazaar are called version control systems (VCS) and have long been popular with software developers. [18:06] Bazaar's ease of use, flexibility and simple setup make it ideal not only for software developers but also for other groups who work together on files and documents, such as technical writers, web designers and translators. (I used Bzr when writing this session) [18:07] Many traditional VCS tools require a central server which provides the change history or repository for a tree of files. [18:07] To work on the files, users need to connect to the server and checkout the files. This gives them a directory or working tree in which a person can make changes. [18:07] To record or commit these changes, the user needs access to the central server and they need to ensure they have merged their work with the latest version stored before trying to commit. This approach is known as the centralized model and its not too great. [18:08] The centralized model has proven useful over time but it can have quite a few drawbacks. It makes it harder for new developer to come to the project and make more than a few small patches, while with Bzr, a developer can easily create a branch that adds large new features or massive code changes. [18:08] Distributed VCS tools (like bzr) let users and teams have multiple repositories rather than just a single central one. In Bazaar's case, the history is normally kept in the same place as the code that is being version controlled. [18:08] This allows the user to commit their changes whenever it makes sense, even when offline. Network access is only required when publishing changes or when accessing changes in another location. [18:08] Everyone with me so far? [18:09] yes [18:09] yup [18:09] yep [18:09] yep [18:09] yes [18:09] great! [18:09] ANSWER: Yep. [18:09] yes [18:09] Thats the end of the boring reading stuff, now onto some examples [18:10] OK, so now you what what BZR is, and what it allows us to do, lets try it out. We are going to create a branch of GNU Hello. We need to grab the programs tarball and extract it: [18:10] Open up a terminal and run: [18:10] wget http://bobbo.me.uk/ubuntu/udw/hello-2.3.tar.gz [18:10] tar -xvf hello-2.3.tar.gz [18:10] cd hello-2.3 [18:10] QUESTION: What are the differences between bzr and git? [18:11] nemphis: I am not too sure (I have never used Git), but reading http://bazaar-vcs.org/BzrVsGit should tell you all you need to know :) [18:11] Running 'ls' in your newly extracted hello-2.3 dir should show you the whole source tree for GNU Hello [18:12] now we need to tell bzr to look after this source for us [18:12] bzr init [18:12] (everything indented with 4 spaces should be run in a terminal :) [18:12] QUESTION: what does ubuntu/cannonical use bazaar for? [18:13] okar_: Ubuntu/Canonical use it for quite a few things [18:13] mainly just for storing source code to applications we maintain [18:13] but it is also used for storing documentation and for application packaging for the MOTU team [18:14] bzr init will create all the files and directories that bzr needs to be able to add revisions in ./.bzr. You normally wont need to touch anything in that directory, but its good to know it is there so you dont accidentally hose it and lose all your revision history, which isnt too awesome. === arkara is now known as wantilles [18:15] OK, now we have told Bzr to setup revision control in the directory, we need to tell it where all out files are: === wantilles is now known as arkara [18:16] bzr add [18:16] This should recurse through all the directories and add all the files it can find to bzr. [18:16] You will need to do this whenever you add a file to your source code (or whatever else you are making). [18:17] Now bzr knows where your files are, we are ready to make our first "commit" [18:18] This basically takes a 'snapshot' or 'version' (hence version control system) of the current code: [18:18] bzr commit -m "Initial commit of GNU Hello" [18:18] The -m flag supplies a little message that you should use to explain what you have changed in this revision. You will see a bit more about that in a second. [18:20] Now we are going to make a little edit to the GNU Hello source. [18:20] cd src [18:20] sed -i 's/world/universe/g' hello.c [18:20] cd .. [18:21] We can now use bzr to generate a diff of the changes we just made (note: we dont need to do this all the time, just generating a diff is really useful): [18:21] bzr diff [18:21] This is handy for creating a patch in order to fix a bug. Just pull the branch down, make the changes and attach the output of bzr diff to the bug. [18:22] Oli``: QUESTIONS: Do bzr commands always have to be in the same dir as you ran the init? Or can you run them from child dirs? [18:22] Oli``: They can be run from any child directory :) [18:23] Superawesome [18:23] Now we can commit our changes to the branch. We will use the -m flag to describe what we have done to the code: "Replace 'world' with 'universe' in hello.c" [18:23] bzr commit -m "Replace 'world' with 'universe' in hello.c" [18:25] Now we can look at our branches history: [18:25] bzr log [18:26] Each time you commit to a branch an entry is added to the log. This is handy so you can check back and see where and when you might have introduced a bug and what you changed to introduce it. This is obviously much easier than blindly hunting for a way to fix a bug. [18:27] Everyone ready to move on? [18:27] i am [18:27] me too [18:27] yes [18:27] ## Launchpad Integration [18:27] Bzr integrates with Launchpad.net quite easily (both Bzr and Launchpad are developed or at least sponsored by Canonical). Launchpad provides free code hosting for bazaar branches, which I am going to show you just now. [18:28] This bit will require you to have your LP account setup correctly with SSH keys, which can be fiddly, but I'll try to help you if you get any problems :) [18:29] Jump onto Launchpad.net and log into your account. [18:31] Now you should hit the "Code" tab, which will take you to a page showing all the branches that you have registered before or are watching etc. (If you havent used Launchpad code hosting at all before, this page will be pretty empty). [18:32] Hit the "Register Branch" button in the top right corner and it should take you to a form where we can setup hosting for a bzr branch. [18:32] You can skip the owners box as this branch is just for demonstration purposes, but in the future you can use this to register branches under team names etc. (Useful for when you need to give more than one person access to branch, you setup a team, get your fellow devs to join and they will automatically be able to push to branches hosted under that team name). [18:33] We dont need to give a project name (Launchpad puts any branch that doesnt belong to a project in a pseudo-project called '+junk'. See the branch location in bold at the very top of the form). [18:34] QUESTION: not really a question. But bzr seems to have svn import facility. How reliable is this? does it import all change histories and every other detail ? [18:35] I am not completely sure (I have never used SVN, jumped straight in with bzr), but http://bazaar-vcs.org/BzrForeignBranches/Subversion#limitations should tell you any problems you will have [18:35] The name is just a short name for the branch, so in this case we could use something like 'gnu-hello' or 'bzr-example'. [18:35] thanks bobbo [18:35] For branch type we want "Hosted", so that Launchpad does all the hosting for us (we dont need to setup our own servers to host the code, though this is perfectly possible and very handy if you are using Bzr at work, where you can have a server sitting, controlling your version control). [18:36] For title put something like "GNU Hello Branch to Demonstrate BZR's Awesomeness" and set the description to "UDW Demonstration branch to show how to use BZR". [18:36] Check it all looks ok and hit submit. We should now be on a summary page for your branch. [18:37] shout in #-chat when you are there! [18:37] In the right hand bar it will show you who owns the branch (in this case it is you) and who subscribes to the branch (it is possible to subscribe to a branch, so you get emailed everytime someone pushes some new revisions). [18:38] On the top it has the branch name and description you specified, but the really useful part of this page for us is the bit in bold underneath the description. The bzr command next to "Update this branch" (which should look something like "bzr push lp:~bobbo/+junk/bzr-example". This command can just be copied and pasted into a terminal and should upload all your new changes to the branch. [18:39] but dont paste it in just yet! [18:39] first of all we need to tell bzr we will be working with Launchpad [18:40] bzr launchpad-login [18:40] sorry: [18:40] bzr launchpad-login [18:41] *now* run the command Launchpad just generated for you [18:41] This should ask you for your Launchpad SSH key password and then upload your branch to launchpad. [18:43] sorry! [18:43] we need to push with the --use-existing-dir flag because this is the first push we are doing of this branch [18:43] bzr push --use-existing-dir [18:44] tuxmaniac> QUESTION: Is it because no project name was given and everybody is using the same branch or some such? [18:44] nope, I dont think so, Launchpad just has hissy fits if you dont do things the way it wants to :P [18:45] Right everyone managed to upload their branch? [18:46] worked for me [18:47] Great, seems to have worked for most people [18:47] Ok now to check on your Launchpad hosted branch. Refresh the page in your browser (or surf back to it if you closed the tab/window). [18:48] What is meant by  in the bzr launchpad-login? [18:48] swingnjazz: Just your normal launchpad username [18:49] Has everyone managed to get that to work? [18:50] Success everybody. Well done! [18:50] We have about ten minutes left, I was going to talk about the concept of branching and merging, but if I start now we will probably run out of time... [18:51] QUESTION: how would you go about maintainiing a package in bzr? [18:52] mok0: I havent personally done it yet, but james_w (Resident Ubuntu BZR Guru) is hosting a session on Thursday that will cover exactly that [18:52] Cool [18:52] Anyone that is interested in packaging with bzr, I would highly recommend you go along to that [18:53] Correction: I messed up, James_w's session is on Wednesday [18:53] QUESTION at one time I had the branch revision # in my prompt, how is that done? [18:53] ... tomorrow [18:54] you can view the current revision number by running "bzr revno" [18:54] QUESTION: how can I plug another abbreviation like lp: in bzr ? like work: or dev: or.. [18:54] I think this is all handled from within Bzr's codebase itself [18:55] but BZR is highly modular, so it probably wouldnt be impossible to plug in other prefixes [18:56] Has anyone got any more questions? [18:57] bobbo: you missed mine [18:57] tuxmaniac: sorry! [18:57] question: what if i want to use a hosting service other than LP? how do I indicate that to bzr. (like we do bzr launchpad-login ) [18:58] Bzr servers can be setup fairly easily, but of course (as I said above) you will lose out on being able to use the lp: quick prefixes [18:59] so instead of bzr push lp:name/project/branch it would be "bzr push bzr+ssh://server/branch_location" or something similar [18:59] ktenney> QUESTION can you run bzr commands from outside the checkout tree? [19:00] i think time is up on the last talk, bobbo could you wrap up so I would be able to get started? [19:00] No, you have to run bzr commands from within the directory you ran 'bzr init' in, or any of its child directories [19:00] superm1: sorry! [19:00] OK, I'll be happy to answer anymore questions in /msg [19:00] now for Kernel module packaging with DKMS -- MarioLimonciello (superm1) [19:01] thanks :) [19:01] Hi everyone, my name is Mario Limonciello. You may know me from things such as Mythbuntu & Ubuntu development. I'm here today to talk to you a little bit about a project that I maintain called DKMS. [19:01] I assume that most of the people here have heard about DKMS, so I'll try to be brief in my overview of it. DKMS stands for Dynamic Kernel Module System (http://linux.dell.com/dkms/). [19:01] It's original purpose was to allow the ability to ship updated versions of kernel modules without necessarily having to rebuild the kernel or needing to rebuild the kernel modules themselves again every time the kernel was upgraded. Timing of new kernel releases and seeing patches get upstream don't always mesh well with release schedules, so it was intended to be an interim solution, not a substitute for submitting things upstream.. [19:02] This original purpose has worked very well for Dell and the different distributions shipped on pre-installed laptops (RHEL, SuSE, & Ubuntu). Fortunately, the way the DKMS framework was assembled, it has gained several other very useful purposes. [19:02] Starting with Intrepid, all users of proprietary graphics kernel modules will be using DKMS to maintain the kernel module that ships with the driver. This means it will be significantly easier to add newer drivers to Ubuntu releases and less of a maintenance overhead for the kernel team that was previously maintaining linux-restricted-modules and it's 150MB+ source package. [19:03] Also, it ends up being a useful debug tool. DKMS allows the creation of packages with both the source and binary modules self contained. This means that users will be able to install a package and then be able to test it on a variety of kernels other than the original intended kernel. [19:03] So, now that you have a pretty basic idea of what DKMS has been used for thus far, I'll give you an example of how to use it. [19:04] The first example we're going to go into is the basic updated ethernet driver. As you may have heard, Dell is going to be shipping Ubuntu on it's Vostro line of laptops. [19:04] There unfortunately was a very bad bug that was encountered shortly after 8.04 was released preventing the ethernet adapter from working. A patch was developed that is now included in 8.04.1. Users will be able to upgrade to 8.04.1 after receiving their machines, but performing the upgrade without an ethernet driver is a little bit difficult. Here's an overview of how we got around that issue. [19:04] Ideally i'd like people to follow along [19:05] i'll try to give the steps as generically as possible so that you can try this on the last few ubuntu releases [19:05] 1) Install DKMS on your machine. The version in hardy is a little bit old, but the version in Intrepid is up to date. Until the backport is ready, I'd recommend grabbing the latest version from http://linux.dell.com/dkms/. This is the same package that is in Intrepid. [19:06] 2) Grab the realtek ethernet driver that shipped with 8.04 from http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy.git;a=blob_plain;f=drivers/net/r8169.c;hb=46d798f10f53bf6814cb6b429f45e660b0a9aee4 . Save this file as r8169.c [19:06] 3) Grab the patch(es) that needed to be applied to make the card function: http://pastebin.com/m5fed36a7 . Save this as r8169-8.04.1.patch [19:06] 4) Create two directories, /usr/src/r8169-2.2LK/ and /usr/src/r8169-2.2LK/patches. I'll explain a little bit later why this naming scheme was chosen. [19:07] 5) Copy r8169.c into /usr/src/r8169-2.2LK [19:07] 6) Copy r8169-8.04.1.patch into /usr/src/r8169-2.2LK/patches [19:07] 7) Create a basic kernel Makefile in /usr/src/r8169-2.2LK/Makefile. You can grab the one I've made from http://pastebin.com/f2ed728e2 . This Makefile just lists the different objects that get linked together. Some modules won't have very complex Makefile's (such as this one) [19:08] 6) Now, we'll craft a DKMS control file to explain what to do with these pieces. This file explains to DKMS exactly what we will be doing, what the packages is called, what the modules are named etc. Take a look at http://pastebin.com/f5bea78be [19:08] so, first the obvious ones: [19:08] a) The PACKAGE_NAME field describes the name of the DKMS package we are making [19:09] b) The PACKAGE_VERSION field describes the version of the package we are making. [19:09] c) the CLEAN line explains exactly what needs to be cleaned up and how to do it [19:09] you'll find these 3 in all packages dkms control files [19:09] d) BUILT_MODULE_NAME[0] is for the first kernel module we are creating. [19:10] this is listed as a vector because you can build many modules from a single dkms packages [19:10] *package [19:10] e) PATCH[0] lists the patches that get applied to the pristine module prior to the build [19:10] f) DEST_MODULE_LOCATION[0] describes where we will be installing the module to on the system. By default updates/ is higher priority than the normal kernel driver locations when module dependencies are calculated [19:11] g) AUTOINSTALL describes whether we will automatically rebuild and reinstall on newer kernel releases. I'll talk more about this later. [19:11] There are a lot of other very complicated things you can do with DKMS, so this is a very basic example only listing the above options. [19:11] so now that you have an idea of what's in the control file [19:11] 7) Place this DKMS control file in /usr/src/r8169-2.2LK/dkms.conf [19:13] well I suppose i should have asked for questions sooner, so i'll interrupt this and answer quickly before carrying on: [19:13] QUESTION: what are we doing precisely ? [19:14] so what this is doing is replaying how a DKMS package was created a few months ago in a real life situation [19:14] this example actually happened, so this is how we (Dell) got around it [19:15] okay i'll pick back up then - feel free to interject as necessary as i keep going [19:15] 8) Add the package to the DKMS build system. All the pieces are ready now, so this registers the package on the system. [19:15] sudo dkms -m r8169 -v 2.2LK add [19:15] 9) Install the headers for your current running kernel so that we can build against it. [19:16] sudo apt-get install linux-headers-`uname -r` [19:16] 9) Build the module. Once you've added a module, bash-completion will allow you to tab complete a lot of these fields. [19:16] sudo dkms -m r8169 -v 2.2LK build [19:17] the build process should complete without any error [19:17] this means that the kernel modules are "available" on your system, but not in use anywhere [19:17] 10) Now our module is built and ready to use. We can build for additional kernel versions by specifying the -k field. If we were looking for some widespread testing of this module, we may want to put it on our PPA. The latest version of DKMS has support to build debian source packages just for this purpose. [19:18] sudo dkms -m r8169 -v 2.2LK mkdsc [19:18] those familiar with packaging (or at least have attended recent talks), should know that this is the file that describes your package [19:18] 11) You will have a dsc and tar.gz. You will just need to create a .changes file that you can dput (outside the scope of this howto) and sign it with your GPG key. [19:19] 12) If you wanted to distribute this without a PPA, you could issue this command to build a binary deb for users to use: [19:19] sudo dkms -m r8169 -v 2.2LK mkdeb [19:19] similar functionality is available for creating driver disks, and packages for other distributions. of course this is an ubuntu centric talk, so I'll only talk about mkdeb/mkdsc [19:20] Either way, you will have files in /var/lib/dkms/r8169/2.2LK that can be distributed. Now the thing that I didn't talk about here was that AUTOINSTALL directive. [19:20] If you know that this is only necessary for a single kernel release, you may want it to not AUTOINSTALL. [19:20] If you know exactly when the support is available, there is functionality to indicate when the package is marked OBSOLETE_BY. This and other advanced features are discussed a bit more in detail on the man page. [19:21] For our case we knew that the support was available in the next kernel ABI, so we were able to define OBSOLETE_BY to be 2.6.24-18. This means that the DKMS package will remain on the system, just dormant. Users will be able to remove it themselves or let it sit around without doing any harm [19:21] Now, For some other examples of how DKMS is used, I'd recommend taking a look at the source for fglrx-installer, nvidia-drivers-*, lirc, and qemu. [19:22] the intrepid versions of each of these packages uses DKMS to rebuild kernel modules independently of the running kernel [19:22] hey each adapt DKMS into their packaging quite well. [19:22] *they [19:23] there is also a video and a thorough wiki page describing some more about DKMS usage at https://help.ubuntu.com/community/Kernel/DkmsDriverPackage and http://blog.phunnypharm.org/2008/07/dkms-presentation.html respectively. [19:24] That's about what I wanted to walk through. The biggest take away is that by using DKMS, the hardest part of delivering fixed modules should be coming up with the fixes, not necessarily figuring out the right way to package them and keep them maintained [19:24] so, does anyone have any questions? [19:26] well then i suppose i'll end up wrapping up a bit early :) Feel free to send any questions that you may come up with later to the DKMS mailing list or to poke me on IRC if it's something small/quick [19:27] thanks, superm1 [19:28] well since there was one more question, " giving a little overview on what dmks precisely is" [19:28] so i'll try to go a little more in detail [19:29] so it's a Dell developed framework for situations just like these. Before we were dealing with Ubuntu, getting some very large patches into RHEL kernels w/ stable ABIs was very difficult [19:30] often to enable things like audio, you would have very invasive patches that would be rolled into the next RHEL release, but the schedule for releases fit well outside the schedule for launching the workstation or laptop [19:31] working closely with Ubuntu, this is a lot easier and not necessary for those particular purposes. Ubuntu does have a stable release update policy, so rather than shipping a lot of DKMS'ified drivers, it's just when the corner cases come about that we really use it [19:32] in trying to be good netizens, this is one of the things that we try to contribute outside of simple hardware enablement [19:33] Q: what's the point of DKMS ? to compile a new driver against a new kernel release automatically ? [19:33] yeah, that's the biggest advantage that can get taken away with it [19:34] since it's an extendable framework, you can even include patches in your dkms package so that newer kernels that would normally prevent compiling due to ABI changes don't fail. [19:34] alberto added a patch to the nvidia-glx 177 package for this purpose on the 2.6.27 kernel [19:34] also to my knowledge, Sun has started to use it for virtualbox modules [19:35] Q: you can prevent a compile from failing ? vodoo ? [19:36] yes, and yes. well actually no. but if you know that this will be used with other kernels, and know where it will be breaking, you can include patches directly in the DKMS patch for those different kernels. This means that lets say RHEL had 2.6.18 and we had 2.6.24. If you wanted to use this same package on both systems, you could create a patch that allows it to compile against 2.6.18 that only gets applied when the user tries to u [19:36] se it on 2.6.18 [19:36] QUESTION: can I use DKMS to build an i386 deb on amd64? [19:37] Hum. That's an interesting question. I can't say I've experimented personally on doing this. I would think so, but you will have to modify your build line and/or Makefile to be sure to choose a 32 bit compiler [19:38] i'd be more confident of it finishing properly if you were to do it in an i386 chroot [19:38] Q: so DKMS allows you to distribute patches for different kernels into just 1 package, right ? [19:39] Yes. Of course if there is a newer kernel that was released needing a new patch, you can't predict the future in the package. You'll have to release a new package that includes that new patch. You don't have to worry about breaking earlier kernels though since it's conditionally applied [19:40] this is why there are systems like the PPA system available though. you'll just need to publish a newer source package with that patch included [19:40] in the cases of the more widespread use (like fglrx and nvidia), such patches would be done in formal stable release updates [19:41] OK, any more questions? [19:43] OK, well i'll wrap up once more then. Thanks again for everyone who listened in! [19:58] tap tap [19:58] apologies: my wife injured her foot over the weekend and i have to pick up my son from school. i'm going to miss the first 10-15 minutes of this class [20:00] we'll see you soon, barry === thekorn is now known as thekorn__ === thekorn_ is now known as thekorn [20:00] hi, everybody === thekorn__ is now known as thekorn_ === emgent`NL is now known as emgent`nl [20:00] My name is Leonard Richardson. I'm on the Launchpad Foundations team and I'm the co-author of the O'Reilly book "RESTful web Services". [20:01] I'm here to talk about the Launchpad web service API that we released a few weeks ago. [20:01] I'll do a slow infodump and then take some questions. if you have questions in the meantime just put them in #u-c-c [20:01] 1. Intro [20:02] First, we've got docs talking about the API here: https://help.launchpad.net/API [20:02] Put simply, we've created an easy way for you to integrate Launchpad into your own applications. [20:02] If you perform the same tasks on Launchpad over and over again, you can now write a script that automates the tasks for you. [20:02] You don't have to rely on fragile screen-scraping. [20:02] If you're a developer of an IDE, testing framework, or some other program that has something to do with software development, you can integrate Launchpad into the program to streamline the development processes. [20:03] If you run a website for a project hosted on Launchpad, you can get project data from Launchpad and publish it on your website. [20:03] And so on. You'll eventually be able to use the API to do most of the things you can do through the Launchpad web site. [20:03] 2. Tools [20:03] ls [20:04] The simplest way to integrate is to use launchpadlib, a Python library we've written. [20:04] (see https://help.launchpad.net/API/launchpadlib) [20:04] This gives you a Pythonic interface to the Launchpad API, so you don't have to know anything about HTTP client programming: [20:04] >>> launchpad.me.name [20:04] u'leonardr' [20:04] >>> launchpad.bugs[1].title [20:04] u'Microsoft has a majority market share' [20:04] But it's also easy to learn the API's HTTP-based protocol and write your own client in some other language. [20:05] (see https://help.launchpad.net/API/Hacking for that) [20:05] 3. Roadmap [20:05] Right now the web service publishes information about people, bugs, and the Launchpad registry (the projects, milestones, etc.). [20:05] We've divided up the remaining work by team. The bugs team is in charge of publishing bugs through the web service, the code team is in charge of publishing branches, and so on. [20:06] I got information from the team leads about where this, publication of their data through the web service, fits in their priorities for the next 3-4 months. [20:07] I think it's important to tell you this to set expectations--you might have a cool idea for a program but you won't be able to write it until we publish the objects you need [20:07] Bugs: A top priority. Bugs are almost completely published right now. The big thing missing is bug search, which should come online within a few days. [20:07] Registry (projects, milestones, etc.): A top priority. We're working on this in the Foundations team now. [20:07] Code: Branches will be published soon. [20:08] Soyuz: There will be some basic objects published to help with the Ubuntu workflow. [20:08] The translations, answers, and blueprints teams don't plan to work on this in the next 3-4 months. [20:08] That's my infodump, so i'll take questions now. [20:09] QUESTION: are there plans for 'official' bindings for other languages? [20:09] no, we're only writing an official client in Python [20:09] oh, actually [20:09] flacoste reminds me that we'll probably also write a javascript client for use in Ajax applications [20:10] and because we publish the capabilities of our web service in WADL documents, it'll be easier to write a client in some other language than if you were writing the whole client from scratch === mcas_away is now known as mcas [20:11] I couldn't find a good WADL library for PHP... [20:11] that's a good point. WADL support itself isn't very good in a lot of languages, because it's a new standard [20:16] leonardr: QUESTION: What is WADL ? [20:16] good question [20:16] first, here's the url [20:17] https://wadl.dev.java.net/ [20:17] it's an XML vocabulary, the name stands for Web Application Description Language [20:17] i think of it as a kind of super-enhanced version of HTML forms [20:18] when you get an HTML form in your browser, you know that you can send data to a certain URL, formatted a certain way, and something will happen [20:18] WADL is a way of talking about which HTTP requests you can send to URLs. it lets you specify what the data should look like, in more detail than HTML forms allow [20:19] and it also lets you specify what's likely to come back in response to the HTTP request [20:19] if you look at the reference documentation [20:19] https://edge.launchpad.net/+apidoc [20:19] (which is out of date, but that'll be fixed soon) [20:19] that document is generated from the WADL document using an XSLT transform [20:20] you can see that it talks about what kinds of objects there are on the web service, what data they contain, and what you can do to them [20:20] you can use that information to generate docs, or you can use it to go from your mental picture of what you want to do to launchpad, to an HTTP request that will have that effect [20:21] leonardr: QUESTION: How can i delete a branch over the web-api ? and can i delete a project over the web-api ? [20:21] i don't think the web service publishes branches yet [20:22] give me a minute to look into the project question [20:23] well, there's no way to delete projects right now, but it's likely that there will be something of that kind later, even if it's only to help admins delete unapproved spam projects [20:24] assuming we did publish branches now, and you could delete them [20:24] in launchpadlib, you would probably call a method on the branch object .delete() [20:24] this would translate into an HTTP request that invoked a POST operation on the branch object [20:25] i hope that answers your question--i can come back to it if now [20:25] QUESTION: Does an API request user more or less bandwidth? [20:25] it depends on what you're doing [20:25] if you want the details of your user account, or a bug, it'll be a lot less bandwidth [20:26] * leonardr runs a quick test [20:26] yeah, about 2-3k for a bug in the API versus 25k on the website [20:27] it's about the same size for a bug in the API as for the textual representation of a bug at /+bug/[number]/+text === leonel_ is now known as leonel [20:27] but if you get a huge list of bugs it's going to be 75 * the size of a bug [20:27] and you probably wouldn't make that kind of request on the website [20:28] so depending on usage, you could use a lot more, even though individual objects take less data [20:28] to represent [20:28] QUESTION: Is there a page (or trunk) where you can watch the new API changes in detail? [20:29] API changes land on Launchpad trunk, and sometimes on launchpadlib trunk. There's no page listing the changes in detail, but every week i write a summary of the week's progress on the launchpad news blog [20:29] http://news.launchpad.net/category/api [20:30] flacoste points out that you can also diff the wadl file to see what's new, because the wadl file gives a complete description of the web service [20:32] QUESTIONS: when will attachment sending be implemented ? [20:32] (this is attachments to a bug) [20:32] I'm pretty sure the bugs team is working on that now. I may change the way it works in the future because I think it's a little hacky. But if I'm right it should be in sometime this week. [20:33] QUESTION(2): is it possible to delete a comment from your project, using the api ? [20:34] In general, if it's possible in Launchpad, it's likely that we will eventually add it to the web service. [20:34] it's not possible in launchpad, or hidden :) [20:35] Nothing will show up in the web service that's not already present in Launchpad first. [20:35] It sounds like flacoste in #chat is saying that that's a feature the bugs team is working on. [20:35] They'll get it into Launchpad and then they'll export it through the web service. [20:36] QUESTION: What are some nifty things the API can do and everyone should know about? [20:36] Right now the coolest thing is probably the scriptable access to bugs [20:37] I think that's the most interesting part of Launchpad that's been exposed to far. [20:37] For me most of the excitement is behind the scenes. We have a design that makes it very easy for the bugs, code, etc. programmers to publish their objects through the web service without having to learn a lot about how the web service works. [20:38] And our design also makes it easy to write a loosely-coupled client like launchpadlib [20:38] QUESTION: to understand this right, the functionallity of the API will always be a sub-set of the functionallity provided by the web interface? [20:39] I never like to say "always", but it's pretty likely that we won't publish features through the web service that aren't present in the web site [20:39] Certainly not generally useful things like hiding spam comments. [20:39] But we do have _architectural_ features on the web service, like caching, that aren't on the website. [20:40] And in the future the line between the two might blur: we might have some special way of performing batch operations through the API that wouldn't make sense to expose through the website. [20:40] (that's just an example, we're not actually planning that) [20:40] QUESTION: What are things you should watch out for when using the API? [20:41] If you're using launchpadlib, make sure you have a cache directory that you reuse between runs of your program. This will save you a huge amount of time. [20:41] But also note that launchpadlib's cache is not thread-safe. If you're running multiple incarnations at once, you'll need to give each one a separate cache directory. [20:42] Be careful when iterating over lists, because the list might be enormous. [20:42] It's usually safer to slice a list and iterate over the slice [20:43] If you're writing your own client you'll need to follow some good HTTP practices so you don't waste time and bandwidth. I talk about most of those in the hacking document. [20:43] leonardr: isn't launchpadlib's cache based on httplib2? [20:43] hi, barry [20:43] yes, launchpadlib is based on httplib2, and httplib2's FileCache is also not thread-safe [20:44] thx [20:44] QUESTION: launchpadlib: why is the no default directory set for caching but a temp dir is used [20:44] If I understand your question correctly, it's because I didn't want to dictate a directory structure to launchpadlib users [20:44] QUESTION: how does one develop and test code without doing weird stuff to Launchpads bug database? [20:45] I believe you can make your code run against the staging server, which gets wiped every night. barry, is that right? [20:45] leonardr: right [20:45] and it's the default [20:45] You can specify which server to run against when you create a Launchpad object [20:45] thx [20:45] you also don't need to worry about spamming the world when testing against staging, since it doesn't send emails [20:46] The example in https://help.launchpad.net/API/launchpadlib shows how to run against staging [20:50] QUESTION: Why does running: ./setup.py install on lp:launchpadlib try to download and install a ton of stuff I have installed: http://paste.ubuntu.com/42817/ [20:51] jpds: that's the way setuptools works by default [20:51] QUESTION: How does launchpadlib relate to the older launchpadbugs module? [20:52] i think that's thekorn's module, and he's working on making it use launchpadlib [20:54] ok, any other last-minute questions? [20:56] leonardr: thanks, great lesson [20:56] mok0, my pleasure [20:57] Question: one quick one: is there any update on updating ubuntu's python-httplib2 [20:57] thanks leonardr great session, great API and launchpadlib [20:57] no, i don't know any more than you do on that [20:58] thekorn_, thanks for your support and your help [21:00] leonardr: thx for the sesion!! [21:03] Hi, I'm Brian Murray and Ubuntu's Bugmaster. [21:03] As a member of Ubuntu's QA team I tend to use Launchpad quite a lot and sometimes I want to perform actions or see things that aren't currently available in the user interface. === mcas is now known as mcas_away [21:04] Or maybe shouldn't be available. [21:04] Subsequently, I maintain a couple of projects, python-launchpad-bugs and launchpad-gm-scripts, for hacking Launchpad. [21:05] I want to start off talking about launchpad-gm-scripts as it is relatively new and there is some exciting stuff going on there. So much exciting stuff I might not make it to python-launchpad-bugs. [21:05] The launchapd-gm-scripts project, https://launchpad.net/launchpad-gm-scripts, is a collection of Greasemonkey scripts that modify the look and behavior of Launchpad. [21:06] In case you don't know greasemonkey is a Firefox extension that allows scripts to make changes to how HTML web pages are rendered. [21:06] In some cases you can actually see the changes happen as the page will load, the script will run and then the page will change. [21:06] Greasemonkey has been available as a package, firefox-greasemonkey, since Feisty. [21:07] The scripts in launchpad-gm-scripts are available via bzr, bzr branch lp:launchpad-gm-scripts, or it is possible to browse the project's code and install scripts without getting the whole project. [21:07] For example, going to http://bazaar.launchpad.net/~gm-dev-launchpad/launchpad-gm-scripts/master/files we can click on the green arrow on the far right of the lp_hide_tags.user.js row and be presented with a Greasemonkey dialog to install the script. [21:08] All the scripts end with 'user.js' and are written in javascript. [21:08] As you can see we have collected quite a few of these scripts! [21:08] Therefore, I'll just briefly go over their features. [21:08] More information is available in the README file of the bzr tree. [21:08] Are there any questions so far? [21:10] I recently added, well it was today, the lp_activity_comments script from Markus Korn. [21:10] This script is incredibly useful as it displays information from a bug's activity log directly on the bug report and avoids your having to click the "Activity log" link and wait for another page to load. [21:10] This allows you to view information about who changed a bug's status or importance and when they changed it. [21:11] The activity shows up either in the comment the change happened in or as a separate pseudo-comment. [21:11] A screenshot of the change is visiable at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_activity_comments.png. [21:11] Notice in the first comment that Markus changed the bug's status from Confirmed to In Progress and in the last one I changed it from In Progress to Fix Released. [21:12] For quite a while we've had the lp_button_tags script, written by Bryce Harrington, which allows you to add tags to a bug report without loading the "+edit" page for the bug report. [21:12] A screenshot is at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_buttontags.png near the cursor there is the text "Add tag:" followed by a list of tags. [21:12] These tags are statically set in the script itself, however they are in a section surrounded by a "User settable data" comment so they are easily modified. [21:13] Additionally, when you mouse over a tag you are presented with a tip regarding when to use the tag. [21:14] Does anyone want to know how to modify that the tags in that script? [21:14] QUESTION: Can the the tags be read/loaded from some global launchpad tag set? [21:15] if there is any [21:15] chombium: I haven't looked at that. We do have https://wiki.ubuntu.com/Bugs/Tags, however that list is quite long. [21:16] One thing we'd like to do with this script is have the tags be package specific, so if you were looking at an openoffice bug it would show openoffice tags. [21:17] that would be great [21:17] Okay, I'll look at that again [21:17] < stefanlsd> QUESTION: What would be the best way to watch bzr for updates to the scripts? [21:18] stefanlsd: It is possible to subscribe to the master branch https://code.launchpad.net/~gm-dev-launchpad/launchpad-gm-scripts/master. [21:18] So you'd get e-mail announcements when something is committed. [21:18] Additionally, I also try to blog about new scripts. [21:19] Moving on we have one of the first greasemonkey scripts in the project was lp_karma_suffix by Kees Cook. [21:19] With this script enabled three things are appened to a Launchpad user's name in various places. 1) Their launchpad id 2) Their current value of their karma and 3) The icons of select teams of which they are a member. [21:20] This infomration is appended to the reporter, assignee and commenters. [21:20] in a bug report. [21:20] It is particularly useful when viewing a bug report with lots of comments as guide to distinguish specific comments. [21:21] You can see what it looks like at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_karma_suffix.png. [21:21] In case you aren't intimately familiar with the team icons you can find out the team name by mousing over the icon. [21:22] Looking at the screenshot you'll notice Sebastien Bacher is a member of quite a few teams including ubuntu-dev. [21:22] This script is also modifiable and you can easily change which team's icons appear. [21:22] Another script that modifies bug comments is lp_reporter_comments written by me. [21:23] This script changes the heading of a comment to a light grey color if it is from the bug's reporter. [21:23] I also find this quite useful when looking at bug reports with lots of comments. [21:23] Screenshot - http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_reporter_comments.png. [21:23] Notice how David's comments have a grey header and mine is the standard color. [21:24] It's quite easy to change the color in that too if you want something more obvious. I went with subtle for the generic script. [21:24] A script I think you'll find useful as a developer or potential developer is the lp_patches script which I also wrote. [21:25] This script checks every attachment of a bug report to see whether it is flagged as an attachment. [21:25] Without this script you'd have to click on the "edit" link next to an attachment and look to see if the "This is attachment is a patch" is checked. [21:25] This script will do that for you and modify the icon next to the attachment, normally a green down arrow, to a star. [21:25] A screenshot of this change is at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_patches.png. [21:26] You can see both in the first comment and the attachments portlet on the right hand side that add_assignment_counting.diff is flagged as patch. [21:26] because it has the star icon. [21:27] Occasionally, people will mark attachments as patches when they are not. [21:27] If you find one of these please help by clicking the "edit" hyperlink next to the attachment and unset the flag. [21:28] Quite a few people and workflows rely on Launchpad's ability to search for patches and these false positives are disruptive. [21:28] < stefanlsd> QUESTION: I love alot of this functionality - but shouldnt some of it be offered by LP? Does LP plan on using some of these ideas? [21:29] Yes, some of these scripts have bug reports about Launchpad associated with them - for example lp_karma_suffix. [21:30] However, it is hard to determine which teams to display and in which context. We, the launchpad-gm-scripts developers, just made an arbitrary decision based off what was useful to us. [21:31] Some things like lp_reporter_comments haven't been submitted as bugs about Launchpad but probably should be. [21:31] The launchpad-gm-scripts can be a useful testing ground for some of these features and a way to gauge interest in them. [21:32] If there is a particular script you feel should be implemented in Launchpad please ping me and as I might know if there is already a bug about it. [21:33] Back to the scripts [21:33] The first greasemonkey script I'm aware of is lp_stockreplies originally written by Tollef Fog Heen. [21:33] The one in the current branch is Kees's and it provides a system for storing standard responses and actions to bug reports and reusing those responses. [21:34] You can add as many responses as you want (I think) and by clicking on a pseudo-url have the comment field prefilled, and modify the bug's status, importance, assignment or package. [21:34] You can see what it looks like at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_stockreplies.png. [21:34] This information is presented to you when you click on the downward cheveron next to a bug's package, status, importance or assignment. [21:35] If the bugs you deal with have some patterns to them (where certain actions are repeated) I can't recommend this enough - it is a phenomenal time saver. [21:36] Iif you look at all the Ubuntu bug reports (https://bugs.launchpad.net/ubuntu/) quite a lot have been used at one point in time or another by very few bugs. [21:36] Subsequently, the "Tags portlet" on the right hand side may not be that useful. I have good news though! [21:36] Markus wrote another greasemonkey script that sorts the list by quantity of appearances and limits the number of tags that appear in the portlet. [21:37] Again, this is configurable by directly editing the script and reinstalling it. [21:37] A screen shot of what the "Tags portlet" looks like with the script enabled is at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_hide_tags.png. [21:37] You can see the tags applet near my cursor. [21:38] With it enabled it is much easier to discover that 200! bugs are tagged likely-dup. [21:39] We even have a script that was contributed by a Launchpad developer (Gavin Panella) - lp_highlight_me. [21:39] This script helps you identify milestones that are assigned to you for a project which is quite useful when you have a project, like Ubuntu, with a lot of bugs milestoned. [21:39] Screenshot - http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_highlight_me.png. [21:40] Okay, that covers the majority of the scripts in the launchpad-gm-scripts project. Are there any questions? [21:41] In addition to subscribing to the bzr branch - I'll also try and use Launchpad's announcement feature, https://launchpad.net/launchpad-gm-scripts/+announcements, to talk about new scripts or features. [21:41] If you have any bugs with these scripts we use Launchpad as our bug tracker so please submit a bug via https://bugs.launchpad.net/launchpad-gm-scripts/+filebug. [21:41] Also feel free to submit a bug if you have an idea of a new greasemonkey script that'd be useful. [21:44] QUESTION: How do i add paragraphs to the stock-replies-script? Escape-Sequences don't seem to work. [21:44] from Ampelbein [21:44] Uh, well you caught me! I don't actually use that one but will find out for you. [21:45] You might try '\n' though [21:46] So I also work on python-launchpad-bugs. [21:46] python-launchpad-bugs is a collection of classes for reading and modifying bug reports in Launchpad, it predates the Launchpad API so currently utilizes screenscraping and can be somewhat fragile. [21:47] However, it has a large user base is quickly updated to deal with changes. [21:47] py-lp-b provides some features that don't currently exist in Launchpad. [21:47] The project is hosted on Launchpad, https://launchpad.net/python-launchpad-bugs/, and its code is availabe via a bzr tree and it is packaged for Ubuntu. There isn't enough time to cover everything you can do with it but I did want to share a couple of features. [21:48] I was on holiday the past four days and have a lot of e-mail to deal with, but let's say I'm interested in which xserver-xorg-video-ati bugs were recently set to a status of Confirmed or Triaged. [21:48] There happens to be a script in the examples directory of python-launchpad-bugs that searches for package bugs confirmed since a specific date. [21:49] Executing it via 'python dateconfirmed_filter.py xserver-xorg-video-ati 2008-08-28' I find out that bug 261929 was confirmed while I was away. [21:49] There is also a script for filtering on date triaged. [21:49] I think these are both quite handy as Launchpad doesn't provide a way of searching by date yet. [21:50] really handy indeed [21:51] QUESTION: when can we expect this functionality to be implemented in LP? [21:52] With python-launchpad-bugs you can do a phenomenal number things including filtering on bugs and modifying bugs quickly and easily. We've recently done some calls for testing via py-lp-b and commented on large quantities of bugs. [21:52] chombium: The Launchpad team is actively developing there list of goals for 3.0 and I'm not certain where date searching fits in exactly. [21:53] However, I do belive it is on the list. [21:53] Another project for hacking Launchpad is bughelper. [21:53] Bughelper uses python-launchpad-bugs and provides many other types of searches. [21:53] Using 'bugnumbers -p python-launchpad-bugs --branch --parsemode=html' I can find the bug numbers of the py-lp-b bug reports that have a branch attached to them, which can be quite handy. [21:54] For easily identifying bugs to fix and merges to make. [21:55] I'm running short on time though... [21:55] This is really just a small sampling of what you can do with bughelper and python-launchpad-bugs though and you can find out from the logs of the last class Markus and I gave on it at https://wiki.ubuntu.com/MeetingLogs/devweek0802/Bughelper. [21:56] I've covered some ways that Launchpad is currently being hacked and I hope that you find some of these hacks useful in your day to day usage of Launchpad. [21:56] Are there any more questions? [21:58] Well, thank you everyone for coming and happy hacking. [21:58] thanks brian [21:59] thanks!! [21:59] thanks bdmurray [21:59] thanks brian, very useful tips [22:32] Hi peeps. Where'd be a suitable place to find help with a screen resolution problem I'm having in Xubuntu? [22:46] Markopotamus: if its a bug: #ubuntu-x, otherwise #xubuntu