=== openweek6 is now known as bikedog1 [01:50] pleia2: cna you update the -chat channel topic, it says UDW is over [01:50] which is why some people are confused, I believe [01:52] That better greg-g ? And it said Ubuntu *Open* Week is over ;) [01:52] nhandler: whatever :) [01:52] but yes, thanks buddy [03:20] date -u [06:27] date -u [06:35] hello please, what is time of the ubuntu developer week?? [06:37] 16:00 UTC [06:38] http://timeanddate.com/worldclock/fixedtime.html?month=8&day=31&year=2009&hour=16&min=0&sec=0&p1=0 [06:58] Good mornin folks! [06:59] good morning Rish [07:00] ulysses__: hows' your day? ubuntu dev week starting from today eh? [07:00] yes [07:00] i'm exited :) [07:01] also:) i want to contribute more in Ubuntu [07:01] it's my dream to be an ubuntu developer! I wish the day would come one day!! [07:01] :) [07:01] btw, where r u from? [07:01] Hungary [07:01] great! what's the local time there? [07:02] 08.02 [07:02] me from India, it's 11.32 here! [07:02] great:) [07:02] what u do? a developer? [07:03] no, i write hungarian documentations, and translate kubuntu docs to hungarian [07:03] well, you already contributing by translating ubuntu docs! God bless you! [07:04] thanks:) [07:04] ok, gotta go for college now. Nice talking. will see you in dev class today! byee [07:04] bye:) === qwebirc68975 is now known as tester123 [07:38] so developers week is starting from 16:00 [07:38] ? [07:38] I read in browser [07:39] yes [07:39] http://timeanddate.com/worldclock/fixedtime.html?month=8&day=31&year=2009&hour=16&min=0&sec=0&p1=0 [07:39] ulysses__: but topic has time 21:00 [07:40] hackoo: that's a different session [07:40] hang on [07:40] ulysses__: so is there some other channels too for the developers week? [07:41] hackoo: https://wiki.ubuntu.com/UbuntuDeveloperWeek/JoiningIn [07:41] hackoo: https://wiki.ubuntu.com/UbuntuDeveloperWeek/Rules [07:41] so there's #ubuntu-classroom (for the session itself) and #ubuntu-classroom-chat (for asking questions and chatting) [07:41] dholbach: thanks [07:41] no worries :) [07:43] dholbach: ok its good arrangement, I am so excited to learn things, I have never worked for development and using linux for only 4-5 months [07:43] awesome - UDW is going to be fantastic [07:43] just writing up a blog entry about today [07:43] hi [07:44] that's other [07:45] http://daniel.holba.ch/blog/?p=491 [07:48] what is this? [07:49] openweek2: did you read https://wiki.ubuntu.com/UbuntuDeveloperWeek ? [07:49] or the brochure linked from there? [07:49] yeah [07:49] some sort of classes are going on here tomorrow [07:50] which specific questions do you have? :) [07:50] well im new using ubuntu [07:50] i want to learn more about it [07:51] it'll be a great opportunity :) [07:51] yeah [07:51] i wont miss it [07:51] only around 9 more hours to go :) [07:51] so how would it be like? [07:51] is it chat [07:51] or [07:51] video [07:51] chat [07:52] the session will be on #ubuntu-classroom [07:52] questions can be asked and general chat can happen on #ubuntu-classroom-chat [07:52] thats cool [07:53] you can follow the links on https://wiki.ubuntu.com/UbuntuDeveloperWeek/Previous to see what those sessions have been like [07:54] thanks [08:18] dev`: hello [08:19] hackoo: hi how are you === qwebirc87824 is now known as TGrigsby [10:05] 'till 1700 === HaRDi is now known as HaRDi437 === dholbach_ is now known as dholbach [10:55] so this should start after 5 minutes right? [12:04] hi [12:04] hi === ulysses__ is now known as ulysses [12:30] hello [12:31] some person know about the problem with splashy [13:14] hi... anyone home === rmcbride_ is now known as rmcbride === qwebirc37654 is now known as Gvorr [14:00] 3 hours to go! [14:00] i cant wait! [14:00] :-) [14:01] will the channel be logged on irclogs.ubuntu.com [14:02] tavish: yes [14:03] thats good [14:04] hey pleia2 [14:04] dholbach: g'day dholbach! [14:04] how's life? :) [14:04] going good :) and you? [14:05] very good - thanks :) [14:05] Hello [14:05] I'm very excited :) [14:05] hi dholbach [14:06] I decided to join to your lecture :-) [14:06] alourie|vm: there's going to be a bunch of great sessions today :) [14:06] dholbach: I know, but it will be too late for me. And yours really interests me [14:07] :-) [14:07] good thing is they'll all be logged [14:07] so you can dive into what happened tomorrow :) [14:21] any problem following sessions with karmic? [14:21] EagleScreen: not at all [14:56] hi everybody! are u ready for a noob question? [14:57] is that the noob the noob question? [14:57] andi: just ask [14:57] i see o ne is ready^^, sry [14:57] ? === ikt_ is now known as ikt [14:58] andi: you really should be asking in #ubuntu [14:58] is this the channel where the ubuntu-dev session will be? [14:58] andi: yes [14:58] kicking off in ~2h [14:58] how many hours till the first one? [14:58] rah [14:59] sry i'm using irc the 1st time [14:59] no worries [14:59] 2am~ est [14:59] ah, ok [14:59] I go through the logs so cheers in advance dholbach and other teachers/mentors :) [15:00] ikt: it's great to have you here! [15:00] i read about the developers week but it took me a while to realize thats an irc-session^^ [15:00] :) [15:00] The instructions for the chat say there is a second channel for talking!? [15:00] hi daniel! [15:01] NutCobbler: yes, #ubuntu-classroom-chat [15:01] later on I expect this channel to be a lot more quiet [15:02] so the logs of the session are more readable [15:02] ubuntu-classroom-chat is for disscussion i think [15:02] i am pretty sure that the workshop is in here, in like 2 hours [15:02] questions and chatter will go into #ubuntu-classroom-chat [15:02] yes [15:02] Odd. [15:02] NutCobbler: mh? === rugby471 is now known as rugby471|bikerid === qwebirc1168 is now known as Gvorr === qwebirc77249 is now known as TGrigsby [15:46] hello [15:48] hi [15:48] good, veru good, preparative ready for ubuntu developed :D [15:49] 11 minutes to go [15:49] tis not for another hour :( [15:50] but #ubuntu-classroom-chat is meant to be for general talk [15:50] 1 hour and 10 minutes :) [15:54] yep [15:57] date -u [15:58] what time does this start? === trothigar is now known as fhoward [15:58] Mon Aug 31 14:58:17 UTC 2009 ... at 16:00 UTC [15:59] msp301, thanks mate === fhoward is now known as trewa [15:59] tis alright :) === trewa is now known as troth [15:59] 11am eastern time === troth is now known as trothigar === herbmann is now known as herbmann_work === VictorL is now known as vertis === MaCkeR is now known as aamod === aamod is now known as aa === aa is now known as aab === rugby471|bikerid is now known as rugby471 === dconnolly is now known as neried7 === qwebirc15880 is now known as robbbb [16:36] hey [16:36] is it going to start at 9:30 IST [16:36] ? [16:36] 16:00 UTC [16:36] rubial: yes [16:37] dholbach: thnks [16:37] letme bring some ciggiartes then [16:37] i have time [16:37] ;) [16:38] after how many hours this will start? [16:38] AnxiousNut: 22 minutes. [16:38] this is the first one? "getting started"? [16:39] AnxiousNut: yes === tavish_ is now known as tavish [16:43] * nealmcb gets a head start by learning about couchdb - http://couchdb.apache.org/docs/intro.html - coming to the desktop via ubuntu one, and used in quickly [16:43] I like the idea of a "RESTful" database - programming for fun on the couch :) [16:44] nealmcb: I think it's also going to be used by gwibber 2.0 [16:44] im on my couch right now. So i can wath the chat on my 52" [16:44] *watch [16:44] lol [16:44] https://launchpad.net/gwibber [16:44] so much to learn :) [16:45] does anyone know of any good docs on the hibernate process and how things hook it ? [16:45] it hasn't started right? [16:45] 15 more mins [16:45] naresh: not yet, 15 minutes [16:45] 15 minutes [16:45] * jacob grabs breakfast [16:45] cool [16:46] mhall119|work: so what would gwibber do with couchdb? contacts? synced with something else? [16:47] nealmcb: it looks like they'll use it to store account settings instead of gconf [16:47] ahh [16:47] I only just installed 2.0 a couple days ago, so I'm not really sure [16:48] interesting, but not quite today's topic :) [16:49] kblin: Live and let live! [16:49] kblin: this is the unconference, preceeding the conference :) [16:49] yep [16:50] leverage the great minds here.... [16:50] questions are gonna be held on #ubuntu-classroom-chat === denizen is now known as deniz [16:50] Karmic: notice the smiley up there :) [16:51] msp301: good point - don't get used to just barging in like this after we get officially started === deniz is now known as Guest16151 === qwebirc10834 is now known as Gvorr [16:51] 9 minutes to go === Anxious is now known as AnxiousNut [16:51] oh the anticipation :P [16:52] nealmcb: I'm genuinely interested in that couchdb thing. it might make syncing data across a couple of systems easier :) [16:52] kblin: thanks to didrocks in #quickly :) === Guest16151 is now known as deniz9 [16:55] hi, class started? [16:55] what exactly is today's topic? [16:55] * mhall119|work lurks in here 24/7 [16:55] mhall119|work: https://wiki.ubuntu.com/UbuntuDeveloperWeek === deniz9 is now known as dennis [16:55] mhall119|work: an introduction to ubuntu development === dennis is now known as denniz === riot_le is now known as Guest71455 [16:57] class start at 16:00 UTC, in 3 minutes [17:00] WELCOME EVERYBODY TO UBUNTU DEVELOPER WEEK! [17:00] Who's all here for Ubuntu Developer Week? [17:00] \o/ [17:00] o/ [17:00] * penguin42 raises a flipper [17:00] + [17:00] hello :) [17:00] * devin122 raises hand [17:00] me :) [17:00] <- [17:00] hi [17:00] :) [17:00] hi [17:00] hi [17:00] me, hello [17:00] <_Fauchi95_> + [17:00] \o/ [17:00] :D [17:00] \o/ [17:00] Hi all [17:00] hi [17:00] hello :-) [17:00] hi :) [17:00] heyyy [17:00] o/ [17:00] hy there [17:00] kudos! [17:00] \o/ [17:00] Hey [17:00] sup [17:00] hi [17:00] hi [17:00] hi [17:00] hi [17:00] heyy [17:00] hi [17:00] hi [17:00] hi [17:00] * arualavi .-D [17:00] hi [17:00] howdy [17:00] hola [17:00] hi daniel [17:00] <_Fauchi95_> hi [17:00] g'day [17:00] woo! [17:00] hi [17:00] hi [17:00] \o/ [17:00] hi [17:00] hi [17:01] hi [17:01] :D [17:01] hi [17:01] wow [17:01] hi [17:01] so lets begin === benjamin_ is now known as claudius177 === herbmann_ is now known as herbmann_work [17:01] \ o / [17:01] class started!! good [17:01] yup... [17:01] hi [17:01] HELLO MY FRIENDS! [17:01] me, too [17:01] * nealmcb \o/ [17:01] :) [17:01] \o [17:01] howdy [17:01] hi to all! [17:01] quite the turnout [17:01] hello everyone :) [17:02] hi [17:02] yo [17:02] :) [17:02] My name is Daniel Holbach... any questions after the session, ideas for improvement, pieces of advice, nice comments and cheques please to dholbach at ubuntu dot com. [17:02] I'll be your host for the first two sessions which will be all about "Getting Started with Ubuntu Development". [17:02] & me [17:02] ok, dholbach let's start [17:02] dholbach: funny name [17:02] so let's first dive into a bit of organisational stuff [17:02] go go go [17:03] I noticed a bunch of people I already know but there's a lot of new "faces" here too [17:03] ya === riot_ is now known as riot_le [17:03] We're around 300 people in here already, which is why ALL QUESTIONS and ALL CHATTER go to #ubuntu-classroom-chat instead of #ubuntu-classroom [17:03] else the logs will be totally unreadable afterwards [17:04] and me + [17:04] will logs be saved? [17:04] won't you set +m? [17:04] the-dude: yes [17:04] so if you're not in #ubuntu-classroom-chat yet, please join the channel now [17:04] * popey hugs dholbach [17:05] in #ubuntu-classroom-chat please prefix your questions with "QUESTION: " [17:05] ie: "QUESTION: Do you like doing Ubuntu Development?" === qwebirc16121 is now known as rico45 [17:05] also for those not fluent in English, we have irc channels where you can ask questions in your language, they will be translated into English for you [17:05] - Catalan: #ubuntu-classroom-chat-ca [17:05] - Danish: #ubuntu-nordic-dev [17:05] - Finnish: #ubuntu-fi-devel [17:05] - German: #ubuntu-classroom-chat-de [17:05] - Spanish: #ubuntu-classroom-chat-es [17:05] - French: #u-classroom [17:06] if there's other channels for other languages, please announce them in #ubuntu-classroom-chat [17:06] Alright... another piece of advice: [17:06] https://wiki.ubuntu.com/UbuntuDeveloperWeek lists the timetable and links to a beautiful brochure that has more information [17:07] https://wiki.ubuntu.com/UbuntuDeveloperWeek/Sessions should tell you if you need to prepare for any session [17:07] https://wiki.ubuntu.com/UbuntuWeeklyNewsletter/glossary has some useful glossary for abbreviations and stuff [17:08] alright... that should be everything organisational for now... just bookmark https://wiki.ubuntu.com/UbuntuDeveloperWeek and you'll be fine for this week :-) [17:08] so let's get the session started [17:08] hey [17:08] lets get it started [17:09] qwebirc71751: chatter and questions please in #ubuntu-classroom-chat [17:09] lets start [17:09] will you all stop talking and let dholbach speak? [17:09] my aim for the session is to get you from "How can I help out? I can't code in C/C++." (a question I get very often) to "Ah, I understand things much better now, I know where to look things up and who to ask." [17:09] pls start [17:09] pls start [17:10] so I'll cover a bunch of more general topics and help you set up a development environment [17:10] zubin71: patiance :) [17:10] /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS [17:10] hello everyone [17:10] hello === rene is now known as Guest54172 [17:10] no patiance impatient [17:11] /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS [17:11] so as a first step, please enable "Source code" in System -> Administration -> Software Sources -> Ubuntu Software [17:11] done [17:11] /ignore #ubuntu-classroom JOINS PARTS NICKS QUITS [17:12] Once that's done, you'll notice a lot of entries that start with deb-src in /etc/apt/sources.list [17:12] I'll explain why we need it a bit later on [17:12] afterwards, please run [17:12] sudo apt-get install --no-install-recommends ubuntu-dev-tools build-essential pbuilder [17:12] it will install a bunch of very useful tools we're going to need for the session [17:13] ubuntu-dev-tools contains scripts that are very useful for packaging and repetitive tasks (it also depends on devscripts which has even more useful stuff) [17:13] build-essential is necessary to do the most common tasks having to do with compiling and building [17:14] pbuilder is the perfect tool to build packages in a sane and reproducable way [17:15] now please edit the file ~/.pbuilderrc (gedit, vi, emacs, whatever you like best) [17:15] add the following line to it: [17:15] COMPONENTS="main universe multiverse restricted" [17:15] and save it [17:15] now please run: [17:15] sudo pbuilder create [17:16] it will set up a pbuilder instance for you which will take a while [17:16] I forgot, please install gnupg too: [17:16] sudo apt-get install gnupg [17:17] <_Fauchi95_> QUESTION: Do I need to use pbuilder or is that optional? [17:18] _Fauchi95_: pbuilder is a great tool to test-build a package in a separate and minimal environment - it's a great way to test the build [17:18] it's by no means a must, but I'll get back to the topic of testing in a bit [17:18] ok... while that's running, let's create a GPG Key - if you have one already you can lay back and relax [17:19] Please run [17:19] gpg --gen-key [17:19] we use GPG keys to sign packages to identify them as our own work and make sure they weren't tampered with [17:19] you can also use it to encrypt and sign other files and emails [17:20] https://help.ubuntu.com/community/GnuPrivacyGuardHowto has more info and I won't go into too much detail, using the defaults should be fine for now [17:20] give it your name and your preferred email address, that should be fine for now [17:22] once it's done, you can get your fingerprint and key id by running something like this: [17:22] gpg --fingerprint your.name@email.com [17:22] mine says something like: [17:22] pub 1024D/059DD5EB 2007-09-29 [17:22] Schl.-Fingerabdruck = 3E5C 0B3C 8987 79B9 A504 D7A5 463A E59D 059D D5EB [17:22] uid Daniel Holbach ....... [17:22] 059DD5EB is the key id [17:24] Afterwards please run [17:24] gpg --send-keys KEYID [17:24] ie: gpg --send-keys 059DD5EB [17:24] this will upload your gpg key to the servers, so other people can identify your files and your emails as yours [17:25] as a next step, we need to upload it to Launchpad too [17:25] (if you have no Launchpad account yet, please visit https://launchpad.net/+login) [17:26] it seems like some people have a problem with gpg not having a default keyserver set, in that case, please add --keyserver keyserver.ubuntu.com [17:27] you can add your GPG key to Launchpad by visiting: https://launchpad.net/people/+me/+editpgpkeys [17:27] ok, that should be it for preparations right now [17:28] so what did we do [17:28] - install a bunch of tools [17:28] - created a pbuilder instance (which might be still running for some of you) [17:28] - created a GPG key [17:28] - uploaded the key to keyservers and launchpad [17:29] ok... so what do we do with Launchpad [17:30] Launchpad is used for everything in Ubuntu - Translations of packages, Bug Reports for packages, Specifications of new Ubuntu features, Code branches, and packages are also built there [17:30] that plus our whole team organisation [17:30] the great thing about Launchpad is that it is written by awesome people and it is Open Source [17:30] also... it's written in Python :) [17:31] We'll have a bunch of interesting Launchpad sessions too this week: [17:31] - Using the LP API for fun and profit -- leonardr (Tue 1st Sep, 19:00 UTC) [17:31] - Getting started with Launchpad development -- gmb (Wed 2nd Sep, 16:00 UTC) [17:32] - Being productive with bzr and LP code hosting - rockstar (Thu 3rd Sep, 19:00 UTC) [17:32] - Hacking Soyuz to get your builds done -- noodles775, cprov and wgrant (Fri 4th Sep, 20:00 UTC) [17:32] a lot of other sessions will probably briefly cover Launchpad too [17:33] Question:Not enough random bytes available. Please do some oth [17:34] anurag213: just let it sit there for a while - gnupg is getting more entrophy and random numbers from your machine [17:34] ok, next we'll tell the development tools who we are [17:34] just edit ~/.bashrc in your favourite editor [17:34] and add something like this to the end of it: [17:35] export DEBFULLNAME='Daniel Holbach' [17:35] export DEBEMAIL='daniel.holbach@ubuntu.com' [17:35] then save it [17:35] and run source ~/.bashrc [17:35] alright... that should be it for now [17:36] so what's next [17:36] I'll talk a bit about source packages and what we do with them, how code gets changed, when we change which pieces of Ubuntu, who you can talk to, where you can find out more, etc. :) [17:36] then we'll do some hands-on package building :-) [17:37] so first of all, here's where you find more information: [17:37] https://wiki.ubuntu.com/MOTU/GettingStarted [17:37] bookmark the page! it links to all the important documents we have [17:37] among them: [17:37] - https://wiki.ubuntu.com/PackagingGuide [17:38] which has a lot of information about packaging in general [17:38] especially https://wiki.ubuntu.com/PackagingGuide/Recipes where you can find out how to use the tools easily [17:39] there's also https://wiki.ubuntu.com/MOTU/Videos which has a bunch of videos which talk about packaging, updating packages, patching stuff, etc. [17:39] - https://wiki.ubuntu.com/UbuntuDevelopment is important too because it explains how Ubuntu Development generally works, processes, who is responsible for what and so on [17:40] - https://wiki.ubuntu.com/Packaging/Training invites you to Packaging Training IRC sessions which happen every Thursday [17:40] the next one is going to be: Thursday 3rd September, 6:00 UTC, Ubuntu Development Q&A... with me :-) [17:41] ok, now let's have a look at https://wiki.ubuntu.com/ReleaseSchedule [17:42] it's a great way to understand more about Ubuntu Development if you know more about the different phases of the release === riot_le is now known as Guest50469 [17:42] this is the schedule of the karmic release which we're working on right now - it's due for October 29th [17:43] in the first phase the new release is created in Launchpad and the toolchain is set up which means that the most important packages (like libc and gcc, the compiler collection) are bootstrapped [17:43] afterwards we start merging changes from Upstream and Debian (I'll go into more detail in a bit) [17:43] and then UDS happens [17:44] UDS is the Ubuntu Developer Summit where Ubuntu developers meet in real life to discuss and define new features [17:44] these often result into specifications where we exactly describe why we want the feature, how it's going to work, its impact and its implementation strategy [17:44] https://blueprints.launchpad.net/ubuntu should have a few you can take a look at [17:44] dholbach: how can a person participate in UDS? [17:45] alourie|vm: everybody is invited to attend UDS, so if you live close or are sponsored to go there you can participate locally [17:45] if you can't, you can participate via VOIP and IRC [17:45] QUESTION : what do you mean by bootstrap ? [17:46] gotunandan: when the new toolchain is uploaded, you need to make sure the new gcc is built with the new libc6 and binutils, etc. - I unfortunately don't have much time to discuss it here, but #ubuntu-toolchain might be a good place to discuss it further [17:47] once the new features are all discussed and described in specifications people work on their features, upload new version of packages and we import a lot of packages from Debian [17:47] (more on that in a bit) [17:48] that all happens in the "green" part of https://wiki.ubuntu.com/ReleaseSchedule [17:48] "green" doesn't mean "it's all great here and it all works"! [17:48] it means that developers have a lot of freedom to work on things :) [17:48] if you want to participate you need to run the new development release IN SOME FORM [17:49] I say "in some form" because obviously you probably need your computer and can't have the kernel, libc, X or GNOME explode all the time :-) [17:49] https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases describes how to safely and sanely use the current development release [17:49] QUESTION: for packaging can you just run pbuilder for the development release? [17:49] trothigar: good question - just what I wanted to talk about :) [17:50] the answer is no [17:50] test-building a package for karmic is a good start [17:50] but you definitely need to do this on karmic too: [17:50] _____ _____ ____ _____ ___ _ _ ____ _ [17:50] |_ _| ____/ ___|_ _|_ _| \ | |/ ___| | [17:50] | | | _| \___ \ | | | || \| | | _| | [17:50] | | | |___ ___) || | | || |\ | |_| |_| [17:50] |_| |_____|____/ |_| |___|_| \_|\____(_) [17:50] which is why just "test building on karmic" is not good enough [17:51] https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases explains how to use a virtual machine, a chroot or a separate partition for your development work, so you don't hose the family computer :) [17:51] ok, moving on in the release schedule: [17:52] afterwards we have Feature Freeze (which we're in in karmic right now) where you need to get exceptions for uploading new upstream versions or other radical changes [17:52] at this time of the release some things might still be broken but the features should at least be half-way there [17:53] after that we introduce more and more freeze dates: UI, kernel, documentation, translations, etc. [17:53] one gets frozen every week so we get a very stable release that can be safely documented, translated and tested [17:53] QUESTION: are there automated testtools for package testing, eg tests for regression testing? or should that be provided by upstream? [17:53] slacker_nl: great question [17:54] there's a number of upstream developers (which means software authors) that provide us with test suites and very often they are run during the build to directly find out if things got broken in the new release [17:54] there's tools like pbuilder for safe test-building and there's tools like lintian that can check your packaging for you [17:56] ok... let's take a quick 5 minute break and we can get our hands dirty afterwards [17:56] for all of you that need a new cup of tea or a drink or need to nip to the loo [17:56] see you in just a bit :-) [18:00] alright... let's kick off part 2 [18:01] for all of you who just arrived: you can ask questions in #ubuntu-classroom-chat (please prefix with QUESTION:), logs will be available afterwards on https://wiki.ubuntu.com/UbuntuDeveloperWeek [18:01] Ok... now let's get some source package and let's try to test build it [18:01] please run [18:01] apt-get source hello [18:02] if you have "Sources" enabled in Software Sources this should work now [18:02] what it does it the following [18:02] it will get the source package for the 'hello' package [18:03] there's the distinction between the source packages and the binary packages [18:03] what my Mom installs, the .deb files are the binary packages which are a result of the build [18:03] what we work on as Ubuntu developers is the source packages [18:03] in the case of hello (on karmic) this means the following files: [18:04] hello_2.4-1.diff.gz hello_2.4-1.dsc hello_2.4.orig.tar.gz [18:04] hello_2.4.orig.tar.gz means: the original source code that was released by the software authors of 'hello' in the version 2.4 [18:05] the 'orig' is important - it means: this tar.gz file didn't receive any changes at all, it's just as it was downloaded from the hello homepage [18:05] (just renamed) [18:06] hello_2.4-1.diff.gz is the compressed set of changes that were applied by Debian (and Ubuntu) developers to make the source package build the Debian/Ubuntu way [18:07] so what does this mean "the debian/ubuntu way"? [18:07] some of you might have compile source code already, where you manually build software by running: [18:07] ./configure make sudo make install [18:08] the packaging process basically wraps around those build commands and enables us to apply the same build process to every kind of package [18:08] so it doesn't matter if it's a python program, a set oh PHP modules, something written in C or something to do with Perl [18:08] also you add some meta information like the package name, a description, etc. [18:09] The session "Packaging from scratch" -- Laney on Friday will talk about that in more detail [18:09] also "Learning from mistakes - REVU reviewing best practices" -- mok0 on Thursday will have useful tips [18:09] <[BIOS]Dnivra> QUESTION: Why is dpkg-dev needed? I get an error it's not installed. isn't it available in the ubuntu repository? [18:09] sorry, please run [18:09] sudo apt-get install dpkg-dev [18:10] it's needed too, I thought it would be pulled in [18:10] just run [18:10] dpkg-source -x *.dsc [18:10] afterwards and you'll be fine [18:10] I'll get to the purpose of it in just a bit [18:11] <[BIOS]Goo> QUESTION:Could you elucidate "wraps around those build commands" [18:11] [BIOS]Goo: ok, let's go into some more detail [18:12] so a regular application written in C will often require you to run something like ./configure; make; make install; etc. [18:12] a python application that uses distutils might need something like invocations of python ./setup.py .... [18:13] sometimes for a package to work afterwards (some simple scripts) it will be enough to just copy them where they belong [18:13] the package build process can be divided into steps like configuration, compilation, installation, something that happens post-installation and so on [18:13] think of it as a "meta build process" [18:14] that process is specified in the debian policy and we make use of that [18:14] the great thing about this standardisation is: our tools all treat source packages the same way, no matter what weird way they work internally [18:14] moving on :) [18:15] hello_2.4-1.dsc just contains meta data of the package like md5sums and so on [18:16] so what apt-get source (or more specifically dpkg-source -x *.dsc) did was: [18:16] - unpack hello_2.4.orig.tar.gz [18:16] - unpack and apply the patch with our changes hello_2.4-1.diff.gz [18:16] so you should be able to see the hello-2.4 directory [18:16] (or hello-2.3 if you're on an older version) [18:17] this directory should contain a debian/ directory which basically contains all the packaging [18:17] daniel@miyazaki:~$ ls hello-2.4/debian/ [18:17] changelog control copyright postinst prerm rules watch [18:17] daniel@miyazaki:~$ [18:17] I won't explain every last detail now, just very quickly [18:17] - changelog: descriptions of all the packaging changes (one new entry per new version that was uploaded to the archive) [18:18] - control: information about the source package (who maintains it, where's the homepage, which packages are necessary to build it, etc.) and the resulting binary package(s) [18:18] - copyright: licensing and copyright information of the software [18:18] - rules: how is the package build, how does the meta build process work [18:18] we can safely ignore the others for now [18:19] alright... now let's test-build the package [18:19] if your pbuilder setup succeeded, you just run the following [18:19] sudo pbuilder build hello_2.4-1.dsc [18:20] if it works out, you should be able to have a look at /var/cache/pbuilder/result/hello_*.deb afterwards [18:20] this should work [18:20] less /var/cache/pbuilder/result/hello_*.deb [18:20] this will show you the contents of the package, its size and dependencies, etc. [18:21] if you have a look at the build log you will see what happened there: [18:21] first the separate build environment was set up, then some additional packages installed [18:22] then ./configure was run, then the actual compilation of the source code happened, then some files were installed and then they were all glued together in /var/cache/pbuilder/result/hello_*.deb, then the build environment torn down again [18:22] the fine thing about pbuilder is that it will store all the packages that are necessary to build a package [18:23] and you don't need to download them over and over again [18:23] dholbach: QUESTION: what if packages need an update? [18:23] alourie|vm: you run sudo pbuilder update (similar to apt-get update) [18:24] QUESTION: presumably the build deps are downloaded as binaries. Does pbuilder share the same cache as apt? [18:24] trothigar: you can set it up that way [18:24] https://wiki.ubuntu.com/PbuilderHowto should have more information on the topic [18:25] it came up in -chat a couple of times, so here goes: [18:25] penguin42: Yeah. Using pbuilder-dist (from ubuntu-dev-tools) is a great way to achieve that [18:25] pbuilder-dist is a fine tool to test-build packages for various ubuntu and debian releases [18:25] talk to RainCT to find out more about it :) [18:26] ok... so how does Ubuntu Development work? what do people do with those .dsc .diff.gz and .orig.tar.gz files [18:26] basically for every change that is done to a package a new source package must be uploaded to the Launchpad build servers [18:27] that's where the gpg key comes in, if you're not part of the team (I'll get to that in a sec), it will reject your changes [18:27] the same applies for Launchpad Personal Package Archives (https://help.launchpad.net/Packaging/PPA) [18:27] you can think of it as a primitive (sorry everybody) version control system [18:28] Developer A makes a change and uploads version 2.4-2 of hello [18:28] and I can get it via apt-get source hello later on and improve it some more if I like [18:29] there are efforts going on to make more use of distributed revision control (using Bazaar on Launchpad) and Mr James Westby will talk about that later in the week [18:29] Friday 4th September, 18:00 UTC - Fixing an Ubuntu bug using Bazaar -- james_w [18:30] so how would you go about sending in changes now that you're not part of the team yet [18:30] easy: come to tomorrow's session "Fixing small bugs in Ubuntu" and learn how to produce patches [18:30] once you have the patch, you attach it to a bug report and subscribe the reviewers team [18:31] they'll give you a review and some advice and upload the change for you once it's all good [18:31] basically they'll download the source package, apply your changes, sign it with they gpg key and upload it for you [18:31] QUESTION: what would happen in the case that two users happen to update at the same time on Launchpad?? [18:31] msp301: those collisions happen every now and then, Launchpad will just use the one that was milliseconds before and throw away the other :) [18:32] dholbach: QUESTION: how do we prepare patches? [18:32] alourie|vm: tomorrow, 16:00 UTC, this place :-) [18:32] find more detail about the reviewers team and how to get stuff uploaded at: https://wiki.ubuntu.com/SponsorshipProcess [18:33] once the reviewers are happy with your general work and get tired of uploading and reviewing myriads of changes for you, they'll tell you that and you can send your application for upload rights :-) [18:33] https://wiki.ubuntu.com/UbuntuDevelopers explains the process [18:34] ok... that roughly explains how Ubuntu works [18:34] there's the release schedule with freeze dates, there's people working with source packages, there's bug reports and people attaching patches to them [18:34] there's packages getting built, downloaded and tested [18:34] but that doesn't explain how developers interact [18:34] there's mailing lists and IRC [18:35] https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu and #ubuntu-motu should be interesting for you [18:35] because these channels contain the most awesome and frienly people that can help you out [18:35] there's lots more mailing lists: https://lists.ubuntu.com/ [18:36] and there's lots more irc channels: https://help.ubuntu.com/community/InternetRelayChat [18:36] but try to take one step at a time :-) [18:36] it can be a bit overwhelming :) [18:36] QUESTION: Does building package in my pc will have it installed in my machine. If yes then how do i uninstall it if somethings goes wrong? [18:36] bogor: no, you have to explicitly install the package, running sudo dpkg -i bla.deb [18:36] that's why you probably best check out https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases [18:37] which explains how to have a separate, up-to-date development environment [18:37] QUESTION: you've talked about development releases, what about backports, how does that process work, when does a package get backported? [18:37] slacker_nl: good one [18:37] slacker_nl: so we all work on karmic now.... it's going to be released on October 29th [18:37] afterwards the karmic will be frozen [18:38] no uploads to karmic anymore [18:38] afterwards only uploads to karmic-security karmic-updates and karmic-backports are accepted [18:38] Effectively testing for regressions -- sbeattie on Thursday will have more information on that [18:39] https://wiki.ubuntu.com/SRU also explains it in more detail [18:39] QUESTION: where do i join if i wanna participate in gnome desktop env development? [18:39] openweek0_: check out https://wiki.ubuntu.com/Teams for more information on various teams within Ubuntu [18:40] QUESTION: is that the same with LTS releases ? retricted updates etc ?? [18:40] msp301: no, what I just mentioned above concerns all releases, LTS or not [18:40] LTS is just supported for longer than the "regular" 18 months, it's 3 years of support on the desktop and 5 on the server [18:40] QUESTION: can I safely run "sudo rm -rf /var/cache/pbuilder/" to purge pbuilder ? [18:40] c_korn: yes [18:41] ok, now that we know how developers interact, one thing is VERY important [18:41] always document changes you are about to make as good as you can [18:41] we have people living in various parts on earth, speaking different languages and having different skill sets [18:42] as we maintain all packages together as one big team it's important that other developers don't have to second guess what you might have meant [18:42] also in 6 months time you probably don't want to second guess your own patches or documentation :) [18:43] ok... speaking of patches and developers: we're not alone in the open source world [18:43] we inherit a great deal of good stuff from the Debian project and other projects [18:43] if we make changes we want to make sure to contribute them back to Debian, so let's take a quick look back at the hello example [18:44] 2.4-1 is the version in karmic [18:44] this means: [18:44] - 2.4 is the release that was done by the authors of hello on their homepage [18:44] - "-1" means that one revision of 2.4 was done in Debian and we inherited that [18:44] debian/changelog has more information on what happened there [18:45] if I was to do a change for Karmic, the new version string would be [18:45] 2.4-1ubuntu1 [18:45] meaning: still 2.4 upstream release, one (inherited) debian revision, one Ubuntu change [18:46] this also means that in the new Ubuntu release (karmic+1) we can't just copy (we call it 'sync') the package from debian, as we might overwrite the changes that I did in 2.4-1ubuntu1 [18:47] if there was a 2.5-1 in Debian, we'd need to very closely check if we can just overwrite my changes or if I need to merge the manually into the 2.5-1 Debian version (and thus get 2.5-1ubuntu1) [18:47] to be able to sync as much as possible and share the same codebase all over it's necessary to send patches upstream [18:47] On Wednesday we'll have a session called " Bug lifecycle, Best practices, Workflow, Tags, Upstream, Big picture" by jcastro and pedro_ who will talk about that some more [18:48] QUESTION: what do I run to test hello after the pbuilder build completes? [18:48] aacool: you'd run sudo dpkg -i /var/cache/pbuilder/result/hello*.deb to install the resulting package [18:48] and then run [18:48] hello [18:48] in the command line :-) [18:48] QUESTION: What happens with package numbering when ubuntu brings out a newer upstream version before debian does, then debian catches up? [18:48] penguin42: nice one :) [18:49] so let's say Debian is still on 2.4-1 and we discover there's a new release out by the hello upstream guys [18:49] we'd call it 2.5-0ubuntu1 [18:49] to indicate: it's upstream 2.5, we didn't get a revision of it from Debian, but have the first revision of it in Ubuntu [18:49] <[BIOS]Goo> QUESTION: Since Ubuntu is debian based, can i follow the same package building process for Debian as well?(using pbuild) [18:50] [BIOS]Goo: essentially, yes [18:50] https://wiki.ubuntu.com/UbuntuPackagingChanges explains what's different in the Ubuntu world [18:50] QUESTION: What's the order? I mean hello.2.4-1 is before or after hello.2.10-1 ? If before, What goes after hello.2.10-1_ubuntu9? If after what happend if the upstream developer use a different notation? [18:50] norax: first 2.4-1 then 2.10-1 [18:50] to be on the safe side, you can do this [18:51] daniel@miyazaki:~$ dpkg --compare-versions 2.10-1 gt 2.4-1 && echo TRUE [18:51] TRUE [18:51] daniel@miyazaki:~$ [18:51] dpkg is always authoritative on package versions [18:51] the command above checks if 2.10-1 is greater than 2.4-1 and print TRUE if it's true :) [18:52] QUESTION: Probably for last; how to clean up a system after using pbuilder. Not just apt-get remove, but more importantly removing all remants of local repositories, build remnants etc. [18:52] soyrochus: just deinstall the packages that we installed, remove ~/.pbuilderrc and /var/cache/pbuilder [18:52] that should get you there [18:52] but more practically: use a virtual machine [18:52] https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases [18:53] . o O { I didn't think that would be the most usef link today :-) } [18:53] QUESTION: is it possibleto generate the debian/* file out of git TAGS, log,... and configure.ac? [18:53] playya: yes, some people use distributed revision control for 1) the packaging itself and 2) packaging upstream snapshots from bzr/git/svn/cvs/etc [18:54] QUESTION: regarding giving back: what is prefered, create a debian package and wait for Ubuntu to sync with debian or to create a ubuntu package directly? does debian sync with ubuntu? [18:54] slacker_nl: that depends on the release schedule [18:54] slacker_nl: if we're a week away from release and the fix is critical we might ask somebody from upstream for advice, but we won't block on them if we know that we need that fix [18:54] https://wiki.ubuntu.com/Upstream has more info on our collaboration with upstreams [18:55] ok... as last tips I'd like to give you: [18:55] https://wiki.ubuntu.com/MOTU/GettingStarted [18:55] because it links to all the important stuff [18:55] https://wiki.ubuntu.com/Packaging/Training [18:56] because of the session we'll have on thursday: general questions and answers about Ubuntu development, this place [18:56] also please join us in #ubuntu-motu on irc.freenode.net [18:56] and on the ubuntu-motu mailing list [18:56] I really hope to see all of you during the great sessions we have this week [18:56] and hope to see you all as Ubuntu contributors really really soon [18:57] make me proud! :-) [18:57] thanks dholbach ! [18:57] thanks everybody - have a great Ubuntu Developer Week! [18:57] dholbach: excellent lecture! [18:57] * dinxter claps [18:57] thanks :) [18:57] * alourie|vm cheers [18:57] claps [18:57] Thank you for all the fish :) [18:57] 3 minutes break until rickspencer3 and didrocks talk about quickly! [18:57] * didrocks waves at dholbach [18:57] thankx a lot [18:57] <[BIOS]Goo> :) thanx [18:57] thanks [18:57] thank you [18:57] <[BIOS]Goo> zubin :P [18:57] thanks a lot [18:57] thx [18:57] thanks a lot [18:57] <^arky^> thanks dholbach [18:57] thanks [18:57] Thanks dholbach [18:57] great session; thanks [18:57] it was also good in german === bennabi_ is now known as bennabi [18:58] thankx [18:58] * porthose claps [18:58] [BIOS]Goo : haha... :-P [18:58] * sum-it thanks dholbach [18:58] but a little bit different [18:58] cheers [18:58] thanks a lot [18:58] <[BIOS]Goo> That was Amazin :) gonna contribute tonite itself :P [18:58] ty [18:58] dholbach, that was a awesome wonderful lecture [18:58] thx! [18:58] thanks dholbach [18:58] thanks dholbach [18:58] #ubuntu-classroom-talk [18:58] thanks you dholbach [18:58] * RainCT hugs dholbach :) [18:58] * alourie|vm joins [18:59] * nixternal hugs dholbach [18:59] cheers!! [18:59] dholbach: respect! thnx for the lecture :) [18:59] thanks a lot dholbach ! [18:59] * dholbach hugs you all back [18:59] thank you very much dholbach ! [18:59] ok... I'll quieten this channel down again :-) [18:59] ok everybody... let's kick of session number 2 (or 3 depending how you count it) [19:00] next up are rickspencer3 and didrocks [19:00] hi [19:00] hey o/ [19:00] thanks for having us [19:00] they are members of Ubuntu's Desktop team, they are fantastic and know a lot about hacking on Desktop stuff [19:00] short: they definitely kick arse [19:00] this is the first time I've done one of these [19:01] so please be patient if I don't certain things correctly ;) [19:01] please ask all your questions in #ubuntu-classroom-chat [19:01] and prefix them with "QUESTION: " so they stick out [19:01] didrocks, promised to help me though :) and he'll channel your questions [19:01] rickspencer3, didrocks: the floor is yours [19:01] rickspencer3: we trust you :) I will relay question [19:01] lol [19:01] so, here we go ... [19:01] in a nutshell ... quickly makes it easy and fun to write apps [19:01] Let's start with installing [19:02] While it's installing, I can provide some background [19:02] Quickly works with Karmic only, atm [19:02] sudo apt-get install quickly python-desktopcouch-records [19:02] Note that this may take a while to download everything if you don't have it installed already, as it brings in lots of developer tools, like Glade, and dpkg-dev. [19:02] After Quickly is installed, close the terminal and open a new one so that statement completion works. [19:03] so while you are all watching it install, a little background [19:03] Quickly has two parts so far [19:03] A command line parser that parses your input and directs commands to "templates" [19:03] and a template for writing an app for Ubuntu [19:03] # [19:03] Templates are sets of commands and code generators that are designed to work together in an end to end fashion to help developers write a certain kind of application. [19:04] There is only on Quickly template so far, and it's for a Ubuntu project. [19:04] we'll be using that one in this session [19:04] Quickly is in on version 0.2 in Karmic universe repository [19:04] Quickly templates should make programming *easy and fun* [19:04] the easy and fun part is important! [19:05] to make it easy and fun ... we've made some opinionated choices about what tools, apis, etc.. to use === evil is now known as Guest82994 [19:05] *very* opinionated ;) [19:05] Python for the language [19:05] pygtk for the UI framework [19:05] Glade for the UI editor [19:06] Gedit for the code editor (though this is easy for yuo to change) [19:06] bzr for version control [19:06] Launchpad for code hosting [19:06] desktopcouch for storage/database (!) [19:06] A terminal for the interface ... yes Quickly is a CL tool [19:07] so, the command line nature, plus the opinionated choices has brought some comparisons to Rails [19:07] *there is no quickly runtime or base class library* [19:07] Using the Ubuntu Project won't bring in any dependencies on Quickly itself [19:08] rickspencer3: there are some questions now. Ok to take them? [19:08] so ... assuming quickly has installed, or is close to installing for you ... [19:08] didrocks, sure [19:08] go ahead [19:08] QUESTION: Can we get quickly to work with Jaunty? [19:08] rickspencer3: I let you this one :) [19:08] well [19:08] I don't see technically why it couldn't [19:08] but we have't done any work for this atm [19:09] I think there are desktopcouch builds for Jaunty [19:09] so ... yes ... if someone does it :) [19:09] other questions? [19:09] in a nutshell, if desktopcouch is working for Jaunty, there is no blocker on quickly's side [19:09] QUESTION: does quickly also work with qt (for KDE users)? [19:09] ah [19:09] well ... there is no QT template atm [19:10] I would love to see one get created though [19:10] I think though, that Kubuntu is a bit farther ahead than Ubuntu wrt developer tools [19:11] more questions? [19:11] rickspencer3: Qt template:I'm planning to do one, that is why I'm here [19:11] good news \o/ [19:11] yeah! [19:11] that's all for the questions, atm :) [19:11] k [19:11] let's move on [19:11] we can discuss new template in more depth if we have time at the end [19:12] Probably the best way to see what Quickly is all about is to follow along as I build and release an app. [19:12] We'll use the following commands to build the app: [19:12] $quickly create ubuntu-project searchy [19:12] $quickly glade [19:12] $quickly edit [19:12] $quickly run [19:12] $quickly package [19:12] $quickly release [19:13] note that the "$" is just a little thing I do to show a command line input [19:13] it's not part of the command ;) [19:13] We'll build an app that directs a search to http://linuxsearch.org (kirkland's custom search page). [19:13] Get started by creating an application from the ubuntu-project template. [19:14] I'm calling it "searchy" [19:14] Note that I've already claimed "searchy" on launchpad, so you'll need to choose a different name if you want to try to release your code. [19:14] (best name ever) ;) [19:14] Also note that there is currently a limitation in Quickly that means that your application has to have only a one word name. We hope to fix this in a future release. [19:15] so once again, to generate the search app, I do: [19:15] $quickly create ubuntu-project searchy [19:15] this tells quickly to use the ubuntu-project template, and to call what is created "searchy" [19:15] This causes a bunch of info to be dumped to the command line, but ends with the application being run [19:16] Note that it's called "Searchy", but otherwise, it's just a stock application [19:16] what quickly did was to copy over basically a sample application, and do some text switcheroos to customize the app [19:16] with the name provided [19:17] If you've closed the application and want to run it again, change to the searchy directory, and use: [19:17] $quickly run [19:17] note that you get a preferences dialog that currently doesn't work due to a small bug :( [19:17] and also an about dialog [19:18] let's look at editing the UI [19:18] The UI I am envisioning is just a text box, and when I hit enter, it does the search. So I need to edit the default UI. [19:18] First, go to the directory that quickly created for the app: $cd searchy [19:18] then: $quickly glade [19:18] Glade is the program that to edit the UI [19:18] If I just run Glade from the Applicatons menu IT WON'T WORK with quickly [19:19] so Glade should open with the generated UI files ready to edit [19:19] Under the Projects menu, switch to SearchyWindow. This is the main window for your application. [19:19] Delete the image and the label (image1 and label1) to clear out space in the UI. [19:20] In the pallette, under Control and Display, click on the Text Entry control. Then click on the space where the label used to be. [19:20] that should add a textentry for you [19:20] and call it "entry1" [19:20] Also, turn off the size request for the window. [19:21] otherwise, the window will be a funny size when it runs [19:21] Do this by selecting searchy_window in the inspector (the treeview at the top right) [19:21] then in properties (the window right below) ... [19:21] click Common tab, and unselect Width Request and Height Request checkboxes. [19:22] so the UI is edited, but we need to tell the ui file to tell our python code to do something when the user hits the enter key in the edit field [19:22] we do this by defining a "signal handler" in glade, and then writing handler code in python [19:22] so to define the handler [19:22] In Glade, click on the text entry (entry1) to select it [19:22] Switch to the Signals tab [19:23] Click in the Hanlder column in the activate row, and type "do_search". Hit Enter. [19:23] Make sure that you save, or your changes won't show up when you run the app! [19:23] so that's editing the UI [19:23] didrocks, shall I pause to answer questions before we go on to write a little code? [19:23] yes, there is a question on the glade side before we begin to write some code [19:23] QUESTION: Why does launching Glade from Applications > Programming won't work with quickly? What does quickly do differently? [19:24] what quickly does is assumes that there is one UI file for each Python class for each window type [19:24] instead of a single big ui file taht defines all of the UI for the whole project [19:25] this allows each class to derive from window, and most importantly from Dialog [19:26] quickly needs to generate some xml files to tell Glade about these classes [19:26] and if you just load Glade from the Applications menu, Glade doesn't get to see those UI files [19:26] and won't load the UI files rather than risk corrupting them [19:26] so, I'd love to make this easier and more fun in a later version [19:27] other questions? [19:27] rickspencer3: no, that's all. But there are a lot of people trying quickly :) [19:27] you can go on ^^ [19:27] * rickspencer3 sweats a little at the brow line [19:27] Now we just need to write a little code to make the search happen [19:27] Go back to the terminal and type: $quickly edit [19:28] make sure that you are in the searchy directory [19:28] This will open your editor (most likey Gedit) with all of the python files for your project [19:28] apparently there is a bug that is keeping this form working well for VIM users atm :( [19:28] Before you start, make sure your editor is set up for Python programming [19:28] !!! [19:28] this part is important [19:28] or you will get weird errors and generally not have fun [19:29] Python uses spaces and tabs very differently, and it can cause your program not to run, and can be very confusing if you don't set up Gedit properly. [19:29] Go to Edit -> Preferences [19:29] Go to Editor tab [19:29] Turn on Use spaces instead of tabs [19:29] Set Tab width to 4 [19:29] This will set up Gedit to follow Python standards while coding [19:29] if you haven't programmed python before ... [19:29] just a quick note [19:29] python uses indentations level to indicate scope [19:30] so indentations are very critical [19:30] ok ... so back to the code [19:30] in gedit click on the tab for "searchy" [19:30] Hit Cntrl-S to make the syntax coloring work [19:30] "searchy" is the main python file for your application. It runs the code for the main window, and is the first file that gets run when you start your app. [19:31] basically, to make the window do stuff, you'll add methods and member varaibles to the SeachyWindow class [19:32] remember when we added do_search to edit1? [19:32] All we need to do is to add a function in the SearchyWindow class called do_search [19:32] this will be called when the user hits enter on entry1 [19:32] The function will just read what is in the text entry field, construct a url string, and use webbrowser to do a web search. Searchy will then close itself. [19:32] Add urllib by adding "import urllib" at line 10. [19:32] Add urllib by adding "import webbrowser" at line 11. [19:33] Then at line 82, hit enter a couple of times to add a new function at line 84. [19:33] I put the edited file into pastebin here: http://paste.ubuntu.com/262082/ [19:33] def do_search(self, widget, daata=None): [19:33] search_words = self.builder.get_object("entry1").get_text() [19:33] q = urllib.urlencode({'q':search_words}) [19:33] url = "http://linuxsearch.org/?cof=FORID%3A9&cx=003883529982892832976%3At4dsysmshjs&" [19:33] url += q [19:33] url += "&sa=Search" [19:33] webbrowser.open(url) [19:33] self.destroy() [19:33] that's the function that I wrote to respond to do_search [19:34] Notice around line 86, the code uses "self.builder" to get a reference to the text entry that was added in Glade. [19:34] Where does self.builder come from? [19:34] Well, the ubuntu-project template sets up a relationship between .ui files generated by Glade, and Python *classes* that use those files. [19:34] In order for this to work, the generated Python files have special functions that get generated that set up the objects for you. [19:34] You can see this around line 94 of the searchy file. A function called NewSearchWindow. [19:34] This special function knows how to set up SearchyWindow object. And then calls "finish_initializing" on the newly created object. [19:35] This means a few things: [19:35] 1. never try to create a searchy window in code like this: [19:35] wind = SearchyWindow() [19:35] because then the ui file won't be set up correctly, and "finish_initializing" won't be called. [19:35] 2. Use "finish_initializing" to add any set up code, as that will be called *after* the UI is loaded. [19:35] (stuff you may have put in an __init__() function before [19:35] 3. Do this to create a new window: [19:36] wind = SearchyWindow.NewSearchyWindow() [19:36] and all will be well. [19:36] so back to the do_search function [19:36] this function pulls out the text from text entry on line 86 [19:36] Uses urllib to create a url parameter in line 87 [19:36] line 88 - 90 build a url string [19:36] line 91 opens the web browser [19:37] then line 92 closes the SearchyWindow [19:37] when you are done coding ... [19:37] use $quickly run [19:37] to run it [19:37] so that's the coding section [19:37] didrocks, any questions before we discuss packaging or releasing? [19:38] rickspencer3: there are two questions, but it's related to what you will discuss later, so, I'm queuing them [19:38] Question: Any special things to do if we want to add or own modules? [19:38] ok [19:38] for packaging will discuss later [19:38] QUESTION: Does Quickly handle translations? [19:38] for coding, right now you just create new files and pull them in [19:39] for translations there are a couple of pieces [19:39] first, since the ubuntu-project template uses glade by default, the UI is tranlatably by default [19:40] for using strings in code, you would need to do the get_text trick, which quickly doesn;t handle natively, but perhaps it should [19:40] I'll log a bug on that [19:40] then for doing the translations, quickly assumes you will use launchpad for your code hosting [19:41] so translations get supported there in the launchpad way [19:41] maybe go on to packaging? [19:41] (maybe a "$quickly addfile" command) [19:41] one more question [19:41] * rickspencer3 nods [19:41] QUESTION: does quickly use gtkbuilder or libglade? [19:41] gtkbuilder!! [19:41] libglade is deprecated [19:41] :) [19:41] phew ^^ [19:42] rickspencer3: you can go on :) [19:42] that's one of the reasons I wanted to do quickly, I wrote weeks of libglade code before I discovered it was deprecated [19:42] I don't want that to happen to other people [19:42] so's ... packaging [19:42] ok .. here's the thing [19:43] personally, I find packaging very persincety [19:43] and complicated, and time consuming [19:43] especially compared to say, using ftp to but files on a web site [19:43] with quickly, though, it goes waaay easier [19:44] Typically, you'll want to share your software in a PPA, but we'll cover that next ... but we can cover that next [19:44] To make a package with quickly, you'll want to start by licensing your software [19:44] To do this, start by editing the generated file called "Copyright". [19:44] Change the top line to have the current year and your name and your email. [19:44] So I would make the top line look like this: [19:44] # Copyright (C) 2009 Rick Spencer rick.spencer@canonical.com [19:44] then ... [19:44] $quickly license [19:44] The ubuntu-project template is going to use this to apply the GPL V3 (as no license is given in the command arg) to Searchy python files [19:45] You can use other well-known license with $quickly license (shell completion is your friend) or use your personal license. [19:45] (thanks didrocks) [19:45] Now if I reload my files, I can see that the license has been added to the top [19:45] Note that if you didn't license before building the package on LP, it will be automatically licensed to GPL V3 with your LP user name for copyright [19:45] so, easy to license, what about to package? [19:45] Now I need to provide just a little info to quickly so that it knows enough about my project to make a good package. [19:46] This info is provided in the setup.py file, also generated for you [19:46] Open setup.py. [19:46] Scroll down to the part that says: [19:46] ###################### YOU SHOULD MODIFY ONLY WHAT IS BELOW ###################### [19:47] Obviously, you only want to edit what is below that. [19:47] You can see how I set that up here: [19:47] http://paste.ubuntu.com/262183/ [19:47] DistUtilsExtra.auto.setup( [19:47] name='searchy', [19:47] version='0.1', [19:47] license='GPL-3', [19:47] author='Rick Spencer', [19:47] author_email='rick.spencer@canonical.com', [19:47] description='Quickly do Linux Searches', [19:47] long_description='A simple text entry field in a window that directs searches to http://linuxsearch.org', [19:47] url='https://launchpad.net/searchy', [19:47] cmdclass={'install': InstallAndUpdateDataDirectory} [19:47] ) [19:47] this is going to tell python-distutils-extra a little about me and my app [19:48] You can also change the info in the desktop file to change the category and other stuff. [19:48] For Searchy, it's called searchy.desktop.in [19:48] Another good thing to do is to change the icon to your own. [19:48] You can do that by editing the file "logo.svg" and the file "icon.png" [19:48] but let's skip that for now [19:48] Once you've licensed it and personalized it, to create a package, just use the command: [19:48] $quickly package [19:49] This will do a few things for you. [19:49] First, it will search through your project for dependencies. [19:49] !! [19:49] thanks to pitti for this bit of magic! [19:49] python-distutils-extra will infer dependencies from your code [19:49] Then quickly package does a bunch of deb magic. [19:50] This spits out a zipped up version of your project [19:50] But more importantly, a .deb file [19:50] You can find these files at the peer level of your project directory. [19:50] If you double click on the .deb file, you can install your app [19:50] or you can send the .deb file around, etc... [19:50] didrocks, given that we have only a few minutes .. shall I touch on releasing, or just answer questions? [19:51] rickspencer3: there are not so many questions you didn't answer, just drop some word on releasing and we will give the 5 latest minutes for questions [19:51] k [19:51] let's rock it! [19:51] Before you can use quickly release, though, you need to set up launchpad. [19:52] I think this was all covered in the last session, but here are some links [19:52] and you can drop into #quickly if you want some more help [19:52] create an account and set up ssh keys: [19:52] https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair [19:52] In your launchpad account, you will need a "personal package archive", or PPA [19:52] But first, you'll need a pgp key for your ppa. [19:52] Follow the instructions here: https://help.launchpad.net/YourAccount/ImportingYourPGPKey [19:53] when you make you pgp key, don't add a comment to it! [19:55] ok, rickspencer3 seems to have some trouble with his connection [19:56] going on [19:56] If there is a comment in it, quickly won't be able to find it. [19:56] Now you have to setup a ppa to publish your code. You can come on #quickly and we will help you :) [19:56] then, create a launchpad project [19:56] use the command: [19:56] $quickly release [19:56] You will have to interact a little with command to make it work [19:57] (the first time, to say who you are, what lp project you want to be binded to) [19:57] When this is all done, quickly will churn for a while building and signing packages [19:57] Then it will upload the package to your ppa. [19:57] Once it's in your ppa, you can share that link with your users [19:57] they can install by adding the deb line to their sofware sources [19:57] and after that, if you update the software, they will get the changes. [19:58] here we are for the short story, now, going to answer to some questions in the last 3 minutes :) [19:58] Question: is quickly python only or can I use a different coding language; C for instance? [19:58] Question: (for later) are there template translation capabilities ex: move from Pyqt to PySide? [19:58] today, we only have one template, which is ubuntu-project template [19:58] the idea is to enable user to create a bunch of them [19:58] quickly already support this, we have to blog on how to create a proper template [19:59] QUESTION: How do you create new templates for quickly & what format are they in (briefly) [19:59] so, for answering this question, wait for a week, I'm writing a "dive into quickly" blog post suit and you will hopefully have all your answers :) [19:59] so, a ubuntu-C-project will be awesome [20:00] ubuntu-game template, that uses pygame too [20:00] and a gedit-plugin that makes it easy to add functions to gedit [20:00] also, LaTeX template, etc. the sky is the limit :) [20:00] Question: What are u using couchdb for? Can our apps interact with your records using desktopcouch [20:01] well, no time to descript desktopcouch, but it's a good piece of software [20:01] in short, it enables to store preferences locally or remotely :) [20:01] rickspencer3: try to speak again === ryan52 is now known as Ryan52 [20:02] sorry [20:02] my computer froze :( [20:02] he's back \o/ [20:02] but didrocks knows all [20:03] I'll hop into #quickly in like 30 minutes [20:03] and can discuss other questions there [20:03] great, thanks rickspencer3_ for the session [20:03] thank you didrocks [20:03] thanks rickspencer3_ and didrocks and all that participated by asking questions in the chat channel :-) [20:03] hope to see all you guys using quickly :) [20:04] now it's the turn of jawnsy for packaging perl [20:04] jawnsy: you can do a perl template ;) [20:04] (for quickly of course ^^) [20:04] I'll introduce myself and a few of the people that are joining me today for this session [20:04] my name is Jonathan Yu, I'm a new(ish) member joining the pkg-perl team, and I'm not a Debian Developer [20:05] I have with me today some other members of the team: gregoa, jackyf, mogaal, Ryan52 [20:06] gregoa is a Debian Developer and is up near the top rankings in terms of number of packages maintained :-) If you've ever used a Perl package on Debian, it's likely gregoa's had a hand in it at some point or another [20:07] mogaal and jackyf are both newer members to the team, so they will be giving some more insight into what it's like to begin packaging Perl modules [20:07] Ryan52 is almost a Debian Developer himself, and also contributes significantly to the group, and has also worked on the pkg-ruby-extras team to package Ruby libraries, so he can speak to the difference between the two worlds === rickspencer3_ is now known as rickspencer3-afk [20:08] in order to follow along, I'll ask that everyone who wishes to participate (follow along with a simple module we'll build) to install the following packages: devscripts lintian dh-make-perl [20:08] as usual, please ask questions in #ubuntu-classroom-chat, please hilight jawnsy-home and/or prefix it with QUESTION so I can see it easily [20:09] to begin with, we'll look at a CPAN module called Locale::Msgfmt, because it's simple and relatively easy to package [20:10] to begin every package, we use a tool called dh-make-perl [20:10] its purpose is to download a module and set up the skeleton framework for getting it built [20:11] Perl/CPAN developers have agreed upon a standardized toolchain which makes building, testing and installing packages a more-or-less consistent affair -- most packages, and all of the popular packages, build in the same manner [20:11] this makes it easy for us to build these modules in Debian [20:11] so to begin, type a line like this in a shell, after having installed the aforementioned prerequisite modules (that is, devscripts, lintian and dh-make-perl) [20:12] you might want to do this in a temporary folder, as the build process installs stuff in your current working directory [20:12] so I've done: [20:12] mkdir tmp [20:12] cd tmp [20:12] dh-make-perl --cpan Locale::Msgfmt [20:12] now, what that does is simply retrieve the Locale::Msgfmt package from CPAN and set up the main framework for it [20:13] so after seeing lots of text scroll by on your screen, you should end up with a .tar.gz and a directory named Locale-Msgfmt-0.14 [20:13] the tarball is the upstream source, and the directory contains the upstream source plus some debhelper and other Debian-related metadata files, which are used during the build process [20:14] let's look at the anatomy of this package. taking a file listing in the Locale-Msgfmt-0.14 directory, we get this output: [20:14] bin Build.PL Changes debian dev lib Makefile.PL MANIFEST META.yml README t [20:14] all of those files come from the upstream source, with the exception of the debian/ subdirectory, which, as mentioned, contains all of the files that do the magic of building the module [20:15] now... I'll digress a bit from the main topic to mention that you can build these CPAN modules and install them via dpkg by using some command line parameters to dh-make-perl; namely: dh-make-perl --install --cpan Locale::Msgfmt [20:16] this is great if you are just doing some small packages which you'd otherwise have installed via CPAN anyway, but when making them for Debian, there are a few more things we need to look through to ensure good Quality Assurance [20:17] take note that while this installs the package, it won't be able to update it, so you'll be stuck at that version indefinitely. thus, for packages you're likely to use a lot, a better solution is to file a Request For Package bug, and have that package officially supported in Debian [20:17] Okay, so let's look at some of the files in debian/: [20:18] changelog compat control copyright liblocale-msgfmt-perl.docs liblocale-msgfmt-perl.examples rules watch [20:18] these files all have a little bit of magic to them -- we'll come back to this later [20:19] let's first get our Perl module to build into a familiar-looking .deb [20:19] so, change back to the Locale-Msgfmt-0.14 root directory [20:19] the packages we've installed so far should include the "debuild" program, so from the main tree, simply type that on your command line: [20:19] $ debuild [20:20] you'll notice it outputs a lot of stuff, including the familiar (if you've ever installed a package via CPAN) test output [20:20] if we look a directory above us (this is why I said it's useful to create a temporary directory first).. we see a bunch of files now [20:20] so let's look at what each of these files are [20:21] liblocale-msgfmt-perl_0.14-1_all.deb liblocale-msgfmt-perl_0.14-1.dsc liblocale-msgfmt-perl_0.14.orig.tar.gz [20:21] liblocale-msgfmt-perl_0.14-1.diff.gz liblocale-msgfmt-perl_0.14-1_i386.changes Locale-Msgfmt-0.14 [20:21] as Daniel Holbach (dholbach) mentioned earlier... the .deb is the binary that you actually install [20:21] so if you would like to install the package now, you can simply type: sudo dpkg --install *.deb [20:22] then there is the upload description (dsc) file, and also the original tarball, and the gzipped diff which indicates what changes have been made for Debian (notably, the inclusion of all the debian/ files) [20:22] okay, so now let's look into what the .deb would actually install in our system [20:23] thankfully, dpkg has a flag that lets us do this easily. simply: [20:23] $ dpkg --contents *deb [20:23] please, do let me know if I'm going too quickly or if there is anything unclear. do so in #ubuntu-classroom-chat. [20:23] so now we see a file listing, which includes exactly where everything will be installed on your system (if you do dpkg --install) on that package [20:24] now, in Debian we don't want to waste users' space [20:24] so we look at things like the examples and the documentation to make sure they are really useful, before installing them in /usr/share/doc [20:25] so for example in this case, the README file doesn't tell us anything useful [20:25] this is a good time to bring up what some of those magic files are [20:26] the README file is installed because it is listed in this file: liblocale-msgfmt-perl.docs [20:26] similarly all the examples listed in liblocale-msgfmt-perl.examples are installed [20:26] so if there is ever documentation or examples you don't think should be installed, you can remove them here [20:26] so let's look inside the *.docs file [20:26] we find a single line, README, which is the name of the file that is installed, that we don't want [20:27] if we simply remove that line, then the debhelper installation mechanism will not install the file [20:27] now, since an empty file is useless, we can just remove the file altogether [20:27] changing back to the main Locale-Msgfmt-0.14 root directory, let's try rebuilding this package [20:27] by running `debuild' again [20:28] so again, the same hubbub of text scrolling by [20:28] and we can examine the contents once again (dpkg --contents *deb), noticing this time that the README is no longer installed [20:29] so we'll look briefly at the function of the other files [20:29] and then I'll open the floor for some questions and answers [20:29] Perl packaging really isn't difficult, and being a Perl user/developer myself, I got into it initially to get some packages I needed into Debian [20:30] I should mention a great thing about the pkg-perl group is that we have 10+ members, including gregoa, who are prolific Debian Developers [20:30] and it's often a matter of days or weeks to get a package uploaded, compared to months as you'd have with the normal mentors process [20:31] in the context of Ubuntu, we also handle our modules which have been sync'd to Ubuntu, and we have two important liasions to the Ubuntu community (many more are welcome!) [20:31] nhandler aka Nathan Handler, and Iulian Udrea are both members of the team [20:31] everything that benefits Debian or Ubuntu, beenefits both -- the changes flow both ways, and that is really the magic of open source [20:31] anyway, back to the meaning of the rest of the debian/ files [20:32] after building I've now got something like this in debian/: [20:32] changelog control files liblocale-msgfmt-perl.debhelper.log liblocale-msgfmt-perl.substvars watch [20:32] compat copyright liblocale-msgfmt-perl liblocale-msgfmt-perl.examples rules [20:32] the .log file, liblocale-msgfmt-perl and the .substvars are just leftover files from the build, and aren't necessary [20:33] if they bother you, you can have the package build cleaned up by changing to: Locale-Msgfmt-0.14 again, and issuing: [20:33] $ fakeroot debian/rules clean [20:33] (though you'll need to install fakeroot for that) [20:33] (that command might work as debian/rules clean, without fakeroot, I'm not sure) [20:33] oh, heh, I'm learning new things every day. Ryan52 mentions to me out of band that "debclean" also accomplishes this task [20:34] okay, so the remaining files-- [20:35] changelog is the Debian changelog file, which lists things that have been done in the Debian package only (upstream packages generally, but not always, also include their own changelog for the purpose of CPAN users) [20:35] from the dpkg contents listing we had before, recall that we saw these files: [20:35] -rw-r--r-- root/root 1063 2009-07-09 05:16 ./usr/share/doc/liblocale-msgfmt-perl/changelog.gz [20:35] -rw-r--r-- root/root 163 2009-08-31 11:09 ./usr/share/doc/liblocale-msgfmt-perl/changelog.Debian.gz [20:35] the changelog.gz is the upstream package changelog [20:35] the .Debian file is the one we know as debian/changelog [20:36] the changelog is also the source of our version number tracking for packages [20:36] you'll notice in the changelog two lines; the first and the last: [20:36] liblocale-msgfmt-perl (0.14-1) unstable; urgency=low [20:36] -- Jonathan Yu Mon, 31 Aug 2009 11:09:19 -0400 [20:36] which are notable [20:37] now, the first one is the package name + version number; unstable is the release name in Debian, where all new packages go [20:37] the trailer has, importantly, my name and e-mail address [20:37] this is what gets recorded as the "uploader" of a given version of a package, even though you won't be uploading packages directly -- a Sponsor does that on your behalf [20:38] though if you're a Ubuntu Developer then you'd be the uploader and wouldn't need a sponsor (but you already know that) [20:38] the next file, control, is where most of the magic happens [20:39] its purpose is to specify things like what the package is (ie a description), and other things like the dependencies the package needs [20:39] importantly, Build-* things [note: the first paragraph relates to the Source package, from which binaries are built] [20:39] the Build-* relationships tells us what we need to install in order to build something, though that is separate from what we need to use the module [20:40] so, for example, while I might need Test::Exception to run tests during building, I don't need that in the binary package [20:40] this explains why some packages will show: libtest-exception-perl in Build-Depends, but not in Depends [20:40] I'll leave the exact meaning of the rest of the fields as an exercise for you, but the Debian Policy Manual describes them all at length [20:41] the copyright file contains information relating to the copyright of all our packages, which is important in Debian and Ubuntu because that is how we protect free software [20:41] the Debian Free Software Guidelines are a central part of the Debian Social Contract, and I imagine that to a great extent the Ubuntu community agrees [20:42] so moving along, the *.examples file is just like *.docs (which we removed).. and it contains a list of places to find examples [20:42] in this one, we find one line: t/samples/* [20:42] which does what you'd expect with a shell glob, it just gets all the files in that directory and installs them (explaining much of what you saw in the dpkg contents listing) [20:43] now there are two more files left to explain === Ryan52 is now known as |Ryan52_ [20:43] the watch file is autogenerated and most often doesn't need to be modified === |Ryan52_ is now known as |Ryan52 [20:43] the purpose of this file is to scan the upstream for new releases, and given that most Perl-related things are released via CPAN, you probably won't need to touch this file [20:43] the rules file is an important part of the build process [20:44] currently the format is just a simple makefile, but it calls the debhelper build system to get everything done [20:44] Locale-Msgfmt happens to be a simple module as I mentioned before [20:44] so the rules file just contains: [20:44] %: [20:44] dh $@ [20:45] and debhelper does the other magic :-) [20:45] there are some other features of debhelper which we use from time to time, but this gives you a basic idea of how to build Perl modules, and what each file is for [20:46] before I open the floor up to some questions, do you guys from the pkg-perl team have any other comments to make? [20:47] ...? :-) [20:47] I guess they're happy with my treatment of this :P [20:47] I could go into a more complicated example, or rant about why the pkg-perl team is cool, or answer other questions [20:48] I hope that this session (finished mostly in under 40 minutes) shows you how easy it is to participate in the team [20:48] as I mentioned, I'm not a Debian Developer nor Ubuntu Developer [20:49] yet I can contribute to both projects through the group and with the help of the many DDs that sponsor my uploads [20:49] dinxter asks: [20:49] QUESTION: Is there somewhere i can look for a reference for what all those magic debelper files like .example are for and how they work, .install, etc [20:49] <|Ryan52> the debhelper manpages are good. "man dh", "man dh_installexamples", etc. [20:50] you'll notice to when you run debuild, you'll get a list of a bunch of debhelper commands that are being executed [20:50] and for the big picture: man debhelper [20:50] the scripts are usually named according to what they do, so it's not too difficult [20:50] dh_installman [20:50] dh_installcatalogs [20:50] dh_installcron [20:50] ^ some example output [20:51] so if one is curious about what those do, you can take a look at their manpages [20:51] there aren't too many, and if you join the group (as we hope you will), it's easy to ask for help [20:52] I myself have only really packaged Perl modules, but many of the concepts are the same -- what the meta-files do, getting familiarzed with Debian and Ubuntu's social policies, etc [20:53] so that means it is a great way to begin contributing to Debian or Ubuntu, prior to even becoming a * Developer :-) [20:53] alexm mentions that even though I've gotten everyone to install lintian, I haven't explained what it does, or what the warnings mean [20:53] <|Ryan52> [20:54] lintian is Debian's package checking system. it's a Perl program with many plugins and checks that looks at your code to figure out possible places you might have done something incorrectly [20:54] this is another tool which ensures Debian and Ubuntu's quality assurance [20:54] we can run this manually from the main directory (where our .deb file is) [20:55] so I get this output: [20:55] aven'jon(~/tmp)> lintian *changes [20:55] W: liblocale-msgfmt-perl: script-with-language-extension usr/bin/msgfmt.pl [20:55] E: liblocale-msgfmt-perl: description-synopsis-is-duplicated [20:55] W: liblocale-msgfmt-perl: description-contains-dh-make-perl-template [20:55] there are flags you can use to get more descriptive output, which also includes what the issue is and a proposed way of fixing it [20:56] lintian is usually very good at doing this, though it is no substitute for experience (and this is where mentors and the sponsors come in) [20:56] first off is the script being installed with a language extension. Debian policy does not like .pl files being installed in /usr/bin [20:56] which is where that warning comes from. we can fix this by providing an override during the install process [20:57] let me mention a bit about how that works [20:57] I always run lintian as "lintian -iI --pedantic --color=auto .changes" get also get the informational and pedantic messages and the nice informations jawnsy mentioned [20:57] when you're building the package, by default it puts it somewhere like your home directory or in debian/ [20:57] in our case, that's what produced the debian/liblocale-msgfmt-perl folder [20:57] prior to us cleaning it [20:57] that is the "staging area" where things are installed, before being rolled into the debian binary [20:58] so, in an override we'd be able to rename the script in this staging area, which thus changes the name that it's installed as, so as to comply with policy [20:58] overrides are just a way for us to change the default behaviour of debhelper, and it's part of what makes it so flexible and great :-) [20:58] this is all probably a bit complicated for the beginner, but that's how that issue is tackled [20:59] we only have a minute or two left so I'll mention the other two warnings [20:59] one of them comes from what dh-make-perl inserts in your files, to make sure you actually edit them [20:59] you'll see the boilerplate text when looking at the files and remove them, so you won't get that warning [20:59] the synopsis being duplicated has to do with a bad description in the description field [20:59] notably, the first line of the Description field (which is our synopsis or short description of the module) is the same as our long description [21:00] so usually this is where a packager would need to describe what the package does in a few lines (a paragraph or two at minimum) so that users know what it is :-) [21:00] so this about concludes our talk about Debian/Ubuntu Perl Packaging [21:01] I do hope you learned something from this, and that you consider joining the group, or even just visiting to see if it's something you might be interested in [21:01] we are on irc.debian.org (OFTC) in #debian-perl [21:01] aven'jon(~/tmp)> lintian *changes [21:01] W: liblocale-msgfmt-perl: script-with-language-extension usr/bin/msgfmt.pl [21:01] E: liblocale-msgfmt-perl: description-synopsis-is-duplicated [21:01] oops wrong paste [21:01] err [21:01] this page welcomes new members, and provides lots of useful information: http://wiki.debian.org/Teams/DebianPerlGroup/Welcome [21:01] thank you all for your [21:01] time [21:01] as a sort of newscomer, I can add that the atmosphere of pkg-perl IRC discussion channel, where is significant part of collaboration is done, is very warm and, so, easy to join :) [21:02] thanks jawnsy. In a couple of minutes me and agateau will be doing an introduction to Plasmoid with Python [21:02] now I shall surrender the floor to agateau and Riddel for "Fun with Python Plasmoids" :-) [21:02] Shall we start now? [21:02] *round of applause for Riddell and agateau* :-) [21:02] thanks jawnsy :) [21:03] Riddell and myself are now going to introduce you to plasmoid developments in Python [21:03] and we want you to follow along at home! [21:03] I'll do a short intro of Plasma and Python, then Riddell will take you through your first plasmoid [21:04] and I'll come back with more widgetry for your plasmoids [21:04] First things first, [21:04] What is Plasma? [21:04] It's the new implementation of the desktop [21:04] in KDE4 [21:05] Riddell reminds me I should tell you what packages you need to install while I talk: [21:05] apt-get install kdebase-workspace-bin plasma-scriptengine-python [21:05] and you should be all set [21:06] so, Plasma is based on Qt Graphics View framework, which is, quoting Qt doc: [21:06] "Graphics View provides a surface for managing and interacting with a large [21:06] number of custom-made 2D graphical items, and a view widget for visualizing the [21:06] items, with support for zooming and rotation." [21:06] it can use hardward acceleration, and be themed with SVG files [21:06] what are plasmoid? [21:07] plasmoids are little gadgets you can put on your desktop [21:07] the whole KDE4 desktop is made of plasmoids [21:07] (taskbar, pager, K menu, clock, systray...) [21:07] some examples: [21:07] http://kde.org/announcements/4.2/screenshots/plasma-other-widgets.png [21:07] http://kde.org/announcements/4.3/screenshots/desktop.png [21:08] Plasmoids can be developed in C++, JavaScript, Ruby... [21:08] and Python [21:08] our beloved language [21:08] Python is an interpreted, dynamic programming language [21:09] it's simple yet powerful, [21:09] and very versatile [21:09] it can be used for throw away scripts, desktop applications, web servers... [21:09] and plasmoids [21:09] as Riddell is now going to show you... [21:09] we had some questions first [21:09] 21:05 < wizz_> is plasmoid available for ubuntu 9.04 and python2.6? [21:10] yes, you need to install python-plasma in jaunty [21:10] as well as kdebase-workspace-bin [21:10] 21:06 < msp301> will plasma work under gnome?? [21:10] yes, you can use the plasmoidviewer app [21:10] or you can try running plasma-desktop on top of gnome, goodness knows how that will end up [21:11] so let's get coding! [21:11] a basic plasmoid is made up of a metadata file [21:11] which tells plasma the name and other vital information about the plasmoid [21:11] and some code [21:12] that all gets zipped up [21:12] and finally you install the zip file so you can run the plasmoid [21:12] so start off in a new directory [21:12] and make the directories needed for our "hello-python" plasmoid [21:13] mkdir -p hello-python/contents/code [21:13] cd hello-python [21:13] here we'll put our metadata which is in .desktop format [21:13] [Desktop Entry] [21:13] Encoding=UTF-8 [21:13] Name=Hello Python [21:13] Type=Service [21:13] ServiceTypes=Plasma/Applet [21:13] Icon=chronometer [21:14] is the top, that gives it a name and tells plasma that it's an applet, also gives it an icon to use for the Add Applet dialogue [21:14] next some vital plasma info lines [21:14] X-Plasma-API=python [21:14] X-Plasma-MainScript=code/main.py [21:15] so plasma knows it's looking for Python and it knows what code it's looking for [21:15] finally some plugin info lines [21:15] X-KDE-PluginInfo-Author=Simon Edwards [21:15] X-KDE-PluginInfo-Email=simon@simonzone.com [21:15] X-KDE-PluginInfo-Name=hello-python [21:15] X-KDE-PluginInfo-Version=1.0 [21:15] X-KDE-PluginInfo-Website=http://plasma.kde.org/ [21:15] X-KDE-PluginInfo-Category=Examples [21:15] X-KDE-PluginInfo-Depends= [21:15] X-KDE-PluginInfo-License=GPL [21:15] X-KDE-PluginInfo-EnabledByDefault=true [21:15] 21:15 < keffie_jayx> Riddell: what is the file name .Desktop? [21:16] this all goes in a file called "metadata.desktop" [21:16] and here's the full thing [21:16] http://people.canonical.com/~jriddell/plasma-python/hello-python/metadata.desktop [21:16] so if you were following closely, you'll have worked out that code/main.py will be where the real code is [21:17] cd contents/code and emacs code.py [21:17] we all use emacs don't we? :) [21:17] sorry emacs main.py [21:18] python always starts with importing the relevant libraries [21:18] in this case it's PyQt and PyKDE [21:18] from PyQt4.QtCore import * [21:18] from PyQt4.QtGui import * [21:18] from PyKDE4.plasma import Plasma [21:18] from PyKDE4 import plasmascript [21:19] we want to make a class inheriting from the plasma Applet base class [21:19] if you know object orientated programming, python is very simple [21:19] class HelloPython(plasmascript.Applet): [21:19] def __init__(self,parent,args=None): [21:19] plasmascript.Applet.__init__(self,parent) [21:20] that's the class header and the constructor, which just calls the parent constructor [21:20] we want an init() method to do some basic setup [21:20] def init(self): [21:20] self.setHasConfigurationInterface(False) [21:20] self.resize(125, 125) [21:20] self.setAspectRatioMode(Plasma.Square) [21:21] Plasma prefers we don't do the basic setup in the constructor so it gives us this separate init() method instead [21:21] the code should be pretty self readable because KDE APIs are like that, and Python is clean as programming languages come [21:22] the main body we're interested in is the paint method which will paint our hello message [21:22] def paintInterface(self, painter, option, rect): [21:22] painter.save() [21:22] painter.setPen(Qt.white) [21:22] painter.drawText(rect, Qt.AlignVCenter | Qt.AlignHCenter, "Hello Kubuntu!") [21:22] painter.restore() [21:22] which is also pretty self explanatory, it uses the painting object to put some text on the screen [21:23] finally plasma needs us to create the applet object from our class [21:23] def CreateApplet(parent): return HelloPython(parent) [21:23] the whole code can be found here http://people.canonical.com/~jriddell/plasma-python/hello-python/contents/code/main.py [21:24] next we need to package it [21:24] go back to your top level directory and put it into a zip file [21:24] zip -r hello-python hello-python [21:25] finally install it with plasmapkg [21:25] plasmapkg -i hello-python.zip [21:25] it will say if it installed correctly or not [21:25] if it's installed correctly you should be able to add it as a widget to your plasma desktop [21:25] or if you're not using KDE you can use plasmoidviewer [21:26] plasmoidviewer hello-python [21:26] with any luck it'll look a bit like this http://people.canonical.com/~jriddell/plasma-python/hello-python.png [21:27] you can get the zip file from http://people.canonical.com/~jriddell/plasma-python/hello-python.zip incase you didn't get all the code [21:27] whoever manages that successfully first gets a free beer [21:27] agateau: want to take them to the next level? [21:28] Riddell: yup! [21:28] So, [21:28] We will continue with widgets [21:29] So far the created plasmoid draws text itself in the paintInterface() method [21:29] This is quite powerful because you get a very fine control over what you want to draw [21:29] but it can also lead to inconsistency if every plasmoid draw things their way [21:30] To help with this, plasma comes with a quite complete set of widgets [21:30] You can use regular Qt widgets in a Plasmoid, [21:31] but using Plasma widgets is a better idea because they will match the plasma theme [21:31] and you will get fancy effects for the same price [21:31] A good example of a plasmoid which uses Plasma widgets is powerdevil [21:31] http://people.canonical.com/~agateau/udw/powerdevil.png [21:32] as you can see, we can use labels, slidesrs, comboboxes, buttons... [21:32] quite a few things [21:32] let's modify the previous example to use widgets instead of custom painting [21:33] I suggest you make a copy of the hello-python dir [21:33] just make sure you rename the plasmoid [21:33] - edit metadata.desktop [21:34] - change X-KDE-PluginInfo-Name value to hello-widget [21:34] now go to our new copy of main.py [21:35] We no longer need paintInterface() so we can remove it [21:35] instead we are going to add some lines to the init() method [21:35] First we create a label: [21:35] label = Plasma.Label(self.applet) [21:36] And define some text in it: [21:36] label.setText("Hello world!") [21:36] Notice that we used self.applet, not self when we created the label [21:37] This is little Python Plasma quirk, just remember to use self.applet as a parent for your widgets and all will be fine [21:37] If you try it like this, your plasmoid won't behave very well when resized [21:38] We need to assign a layout to the plasmoid and add our label to it [21:38] a layout is like an organizer: it ensure widgets are correctly aligned and resized when the plasmoid gets resized [21:38] self.layout = QGraphicsLinearLayout(Qt.Horizontal, self.applet) [21:39] Here it is, an horizontal layout [21:39] now we add our label to it [21:39] self.layout.addItem(label) [21:39] And it should be good [21:39] You can give it a try in the same way Riddell shown you with the first plasmoid [21:40] cd to the hello-widget/ dir [21:40] zip -r ../hello-widget.zip . [21:40] plasmoidviewer hello-widget [21:40] oups... [21:40] forgot the install step [21:41] plasmapkg -i ../hello-widget.zip [21:41] then plasmoidviewer hello-widget [21:41] (actually, you can install from the dir directly, "plasmapkg -i ." will work fine) [21:42] Did you get a widget-powered "Hello world" plasmoid? [21:42] If you want to try more widgets, you can have a look at the list of Plasma classes: [21:43] http://api.kde.org/4.2-api/kdelibs-apidocs/plasma/html/annotated.html [21:43] (It's C++, but the doc is usable in Python with no changes) [21:43] Since KDE 4.3, there is even a VideoWidget! [21:44] With this, I am going to leave you in the expert hands of Riddell [21:44] we had some questions over in -chat [21:44] 21:28 < NamShub> Question: I would like to learn how to add a configuration dialog and read/write settings from this dialog [21:44] which was well answered by fliegenderfrosch [21:44] 21:31 < fliegenderfrosch> NamShub: setHasConfigInterface(True), then you reimplement the functions showConfigurationInterface(self) and createConfigurationInterface(self, parent) [21:44] 21:31 < fliegenderfrosch> showConfigurationInterface(self) basically just creates a KPageDialog and calls createConfigureInterface with it as argument [21:45] as I said KDE APIs are designed to be easy to read so just read the docs [21:45] I also pointed NamShub to plasma-widget-googlecalendar as a larger example which has recently been added to karmic [21:45] fliegenderfrosch wanted to know when the apidocs for PyKDE 4.3 are available? [21:46] that'll happen when Sime gets some spare time, he maintains PyKDE single handed and is quite the hero [21:46] in the mean time the 4.2 API is pretty good http://api.kde.org/pykde-4.2-api/plasma/index.html [21:46] and you can always use the C++ API docs and convert them easily enough http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/index.html [21:47] I'll quickly take you through a more complete example [21:48] copy your hello-widget directory to powerchart [21:48] and edit metadata.desktop to give it a Name=Power Chart and X-KDE-PluginInfo-Name=powerchart [21:48] I'll not paste the whole of the code but you can find it here http://people.canonical.com/~jriddell/plasma-python/powerchart/contents/code/main.py [21:49] this example is a battery monitor [21:49] it uses a powerful tool in Plasma, the data engine [21:49] data engines are plugins which provide some useful data, could be about the network status or could be about a blog feed [21:50] the engine can be used by several applets if they have a need for it [21:50] Plasma's API is full of useful GUI widgets as agateau said earlier [21:50] and this example uses a widget called a SignalPlotter: self.chart = Plasma.SignalPlotter(self.applet) [21:51] which draws a chart for us [21:51] the connectToEngine() method creates a dataengine of type 'soliddevice' [21:51] Solid is the KDE library which gives us information about all sorts of hardware [21:52] it's cross platform so it'll work on Linux, BSD, Windows and more [21:52] with a simple self.engine.connectSource(battery, self) our applet will get called whenever the solidengine reports a change in the battery [21:52] dataUpdated() will get called and that grabs the battery value and puts it into the SignalPlotter widget [21:53] it looks like this http://people.canonical.com/~jriddell/plasma-python/powerchart.png [21:54] as you can tell, the power of KDE is in its libraries and APIs, you can do a lot with a little code [21:54] http://people.canonical.com/~jriddell/plasma-python/powerchart.zip is the final code [21:55] we're almost out of time [21:55] any questions? [21:55] RainCT rightly noted that Encoded= isn't needed in .desktop files any more, so that's one less line of code needed :) [21:55] we have lots of plasmoid packaged in karmic now [21:56] and you can get loads more from the Get New Stuff button in Plasma which downloads them from kde-look.org [21:56] if you have an interesting applet written do put it on kde-look.org [21:56] and if you find an interesting applet that a lot of people would be interested in, we probably want it packaged up into a .deb, which is pretty easy [21:57] join us in #kubuntu-devel if you want to help or ask developer questions [21:57] or #plasma for more detailed plasma knowledge [21:57] these tutorials came from techbase.kde.org [21:57] http://techbase.kde.org/Development/Tutorials/Plasma [21:58] you can find loads of useful information on techbase (and if it's not there, it's a wiki so edit!) [21:58] 21:56 < keffie_jayx_> QUESTION: is there a guide for packaging these plasmoids to keep in a PPA or something? [21:58] there's the normal packaging guide on the ubuntu wiki [21:59] for examples of Python Plasmoid packaging you can look at plasma-widget-facebook say in karmic [21:59] an interesting alternative distribution channel is kde-look, [21:59] as agateau said you can upload it to kde-look.org so others can download it with Get New Stuff [21:59] :) [22:00] and if you want the package in the main Ubuntu archive put it on Revu and ping us on #kubuntu-devel to review it [22:00] time up, anything to add agateau? [22:00] no, except that we are waiting for your plasmoids! [22:01] thanks for coming everyone [22:02] logs are online already at http://irclogs.ubuntu.com/2009/08/31/%23ubuntu-classroom.html [22:03] We should give appropriate credits: [22:04] Oh, actually Riddell did :) [22:05] thanks to Simon Edwards for the tutorial and for PyKDE :) [22:05] the logs are also at https://wiki.kubuntu.org/MeetingLogs says ausimage