Flanneljono: Please test03:49
jonothanks Flannel03:50
jonoworks :)03:50
nigel_nbgreat :)03:50
jonowhy is it set like this at the moment?03:50
nigel_nbeither someone forgot or spam03:50
jonoI am just testing some Lernid fixes03:50
jonoeverything seems to be working pretty well03:51
nhainesThat one was a doozy.  ;)03:51
jonolol nha03:51
jonoit now has a more native IRC pane03:51
jonoapp indicator support03:51
jonoand a bunch of fixes, ready for dev week03:51
nhainesOoh!  Just in time.  :)03:51
nigel_nboh great :)03:51
jonojust want to fix up some last bits and then release a package03:51
nigel_nbjono, you got rid of webchat? (native irc?)03:53
jononigel_nb, yep03:53
nigel_nbawesome! looking forward to UDW03:53
paultagjono, did you fix the IRC backend to fragment the window viewer, so it does not use two nicks?03:56
nigel_nbpaultag, hm, I think so, I only see jonobacon and not lernid_jonobacon ;)03:57
paultagawesome :)03:57
paultagThen again I was not in -chat03:57
paultagAh, there it is. Well done jono03:57
jonojust finalizing some fixes03:58
jonoand then will pump out a release03:58
persiaCan lernid point at a proxy for client multiplexing, or does it always connect here?04:01
nhainesI don't understand how to get session information into Lernid.  :)04:06
paultagPerhaps lernid can ship with bindings for Firefox. So we can send lernid:// URLs to new users04:06
paultagand tweet the hell out of it :)04:07
jonoanyone on Karmic here?04:13
paultagjono, yo04:13
jonopaultag, are you on Karmic?04:13
paultagjono, yes04:13
jonopaultag, could you check out Lernid and test it?04:13
paultagjono, sure thing, off your PPA?04:13
jonobzr branch lp:lernid04:14
jonoand then:04:14
jonoquickly run04:14
jonomake sure you have it's dependenices04:14
paultagjono, sure thing. Let me give it a go04:14
jonothanks paultag!04:14
paultagsure thing04:14
jonopaultag, any luck?04:21
paultagjono, working on getting EventManager in place04:22
paultagjono, is it in the repos?04:22
jonopaultag, EventManager in place?04:22
jonono, like I say, I just want you to check out the code and run it04:22
jono<jono> bzr branch lp:lernid04:22
jono and then:04:22
jono quickly run04:22
paultagjono, oh, I was doing setup. Gimme a sec to grab quickly04:23
jonoI just want someone to test it on Karmic04:24
jonoI am running Lucid04:24
nhainesjono: I can test it after the Ubuntu California meeting.04:25
paultagJeez, quickly is huge04:25
jononhaines, can you test, would be awesome04:25
paultagnhaines, oh christ. I'm glad I'm not there ;)04:25
paultagjono, another minute or so04:25
nhainesjono: I'd be happy to.  :)04:25
jonothanks paultag04:26
jonocheers nha04:26
jonocheers nhaines04:26
paultagjono, it's up. Let me hammer on her04:29
jonopaultag, cool, join Ubuntu Example Week04:30
paultagjono, I did, it bombed out. No IRC connection04:30
paultagOh, there I am04:30
paultagjono, looking good so far04:33
jonopaultag, cool, check Lernid04:34
paultagjono, I have it up :)04:34
nhainesHeh, longest. LoCo meeting. ever.04:40
nhainesI'm really looking forward to seeing Bazaar Explorer.  Sounds awesome.04:49
nhandler QUESTION: Will I get an error in lernid with this?04:53
paultagalready tried nhandler :)04:54
paultagnight nhandler, nhandler_lernid :)04:54
nhandlerANSWER: Nope. But it might be a good idea to add an anchor at the start of the UDW schedule so that lernid can display the timetable portion of the page (which is the most interesting part)04:54
nhainesLooks like I'm missing gtkmozembed04:59
nhandlernhaines: If you are running the bzr version, it won't pull in the dependencies. Install lernid from a ppa first, and then run it from bzr04:59
nhainesHehe, let me do that.05:01
nhainesHm, seems to be working.05:14
nhainesMaybe.  :)05:14
nhainesQuickly is so awesome.05:31
Omar87__Hi all08:23
=== qwebirc51456 is now known as Hammerhard
Omar87__I wanted to ask, the times of the classes are based on what timezone?08:23
Hammerhardthey are based on the UTC timezone08:24
Omar87__Hammerhard: So, there's going to be a Django class today?08:25
Hammerhardmaybe this can help you, but it's in german08:26
Omar87__Hammerhard: thank you very much. I will do my best to attend as many of the classes as possible.08:26
=== deegee_1 is now known as deegee
nhainesOmar8714: this might help: https://wiki.ubuntu.com/Lernid08:47
=== ulysses__ is now known as Guest84713
=== amik is now known as amichair
Omar87For some reason, when I open lernid, I automatically get connected to a an Ubuntu chatroom in Spannish.09:44
Omar87How do I fix that?09:44
jpdsjono: ^--.09:44
Omar87ahh.. no that was nothing. Sorry. :)09:47
=== tobias is now known as Guest7679
jonoOmar87, np :)09:48
=== tobias is now known as Guest85872
ubottuHere I am, brain the size of a planet and you expect me to respond to a ping? How depressing.09:53
ubot2Here I am, brain the size of a planet and you expect me to respond to a ping? How depressing.09:53
AlanBelland this is the classroom where the instructor will speak10:08
netritiousHas the classroom event been canceled?10:23
persiaNo.  It hasn't started yet.10:23
persiaCheck the wiki, but I think it starts around 15:00 UTC.10:23
persiaRight now, it's about half past ten.10:23
netritiouspersia: thank you for clearing that up...I had no idea why I thought it was at 10 UTC10:24
netritious*have no idea why10:24
AlanBellfirst is at 16:00 utc10:27
ubottuCurrent time in Etc/UTC: January 25 2010, 10:27:1510:27
netritiousI seem to know why now..somehow when I imported the iCal available at the wiki into thunderbird everything starts at "10 a.m."..not sure why that happened10:28
netritiousI must be losing it..that is exactly when the classes start in my timezone..10 a.m. CST10:31
persiaThen you better sleep fast :)10:32
netritiousheading that way now :)10:32
push_ebx_or get some coffee ;)10:32
netritiousnah, think I'll opt for sleep..won't retain much after being awake 24+ hours :D10:34
gudvinhi all11:10
gudvinесь кто живой?11:12
=== Yos is now known as Yos_
=== Yos_ is now known as Yos
=== openweek3 is now known as dave
=== dave is now known as emdave
=== zen is now known as Guest58025
Omar87Hi all.12:58
AlanBellgood afternoon everyone, todays sessions will begin at 16:00 UTC13:21
ubottuCurrent time in Etc/UTC: January 25 2010, 13:21:0613:21
ubottuCurrent time in Etc/UTC: January 25 2010, 13:55:4613:55
ubottuCurrent time in Etc/UTC: January 25 2010, 14:55:2214:55
bulldog98übrigens ist tiledqt in meinem PPA nun nutzbar14:57
=== dholbach_ is now known as dholbach
=== Mcb is now known as Guest86349
thetofucubedate -u15:13
nigel_nbthetofucube, in your terminal15:14
ubottuCurrent time in Etc/UTC: January 25 2010, 15:14:3615:14
thetofucubeopps wrong window15:16
ubottuCurrent time in Etc/UTC: January 25 2010, 15:16:1715:16
=== nigelbabu is now known as Guest32940
xteejxHi all!15:49
* thebwt waves at xteejx15:49
thebwtI think chatter is supposed to go to #ubuntu-classroom-chat15:50
cjohnstonthebwt: yes.. it is :-)15:52
xteejxHi thebtw :)15:55
dholbach[SLIDE 1]15:56
dholbachI'm very very happy you all made it here16:00
dholbachFirst I'll talk about a few organisational things before we dive into session 1 "Getting Started with Ubuntu Development"!16:00
dholbachfirst of all: for those of you who are not using lernid to connect to Ubuntu developer week:16:01
dholbach - #ubuntu-classroom is for the presentation only, so please keep chatter out of the channel16:01
=== Mcb is now known as Guest69733
dholbach - #ubuntu-classroom-chat for discussion and for questions (please prefix with QUESTION:, ie: "QUESTION: What does xyz mean?")16:02
dholbach - I put up some slides at http://people.canonical.com/~dholbach/ubuntu-development-getting-started.pdf which should at least give you a nice link collection - lernid users will see those slides as we move on through the session16:03
dholbachif you have general questions about the schedule, you can find it at https://wiki.ubuntu.com/UbuntuDeveloperWeek16:03
dholbach[SLIDE 1]16:03
Omar87dholbach: nothing here.16:04
dholbachanother organisational note:16:04
dholbachif you plan to be here the full week and speak more languages than just English, consider adding yourself to the bottom of https://wiki.ubuntu.com/UbuntuDeveloperWeek16:04
thebwtrmunn_: lernid only clients can't get to #lernid16:05
dholbachso for example:16:06
dholbachCatalan: #ubuntu-cat16:06
dholbachDanish: #ubuntu-nordic-dev16:06
dholbachFinnish: #ubuntu-fi-devel16:06
dholbachGerman: #ubuntu-classroom-chat-de16:06
dholbachSpanish: #ubuntu-classroom-chat-es16:06
dholbachFrench: #u-classroom16:06
dholbachit'd be great if you would help out translating questions and answers for those who are not comfortable speaking in English yet :)16:07
dholbach(thanks in advance)16:07
dholbach[SLIDE 1]16:07
qwebirc98256when it will start?16:07
dholbachthanks a lot jussi0116:08
dholbachok... let's get started :)16:08
dholbachso what we're going to cover during the session is the following:16:09
dholbach - get a basic development environment set up (gpg key, tell the packaging tools who we are, get pbuilder set up, etc.)16:09
dholbach - cover the basics of contributing16:09
dholbach - and hopefully answer lots of questions :)16:09
dholbach[SLIDE 2]16:10
dholbachso first of all, please run:16:10
dholbach sudo apt-get install --no-install-recommends ubuntu-dev-tools build-essential pbuilder dpkg-dev gnupg16:10
dholbachthis will install a bunch of packages we are going to need16:10
dholbachbuild-essential will pull in compilers and general tools for building packages16:11
dholbachgnupg we will need to sign packages (or encrypt data generally)16:11
dholbachubuntu-dev-tools itself contains a lot of useful tools and will pull in a few others we are going to need to packaging and every-day tasks16:12
dholbachalso please enable "Source code" in System -> Software Sources -> Ubuntu Software16:12
=== zen is now known as Guest4939
dholbacha question that is asked a lot of times is: "Do I really need to run the current development release? Won't that break my system?"16:13
dholbachThe answer is "yes, for building and testing you need one form 'latest development release'"16:13
dholbachto do that in a sane way, you better check out https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases16:13
dholbachAlso we do have these very fine sessions lined up for this week which talk about a similar topic:16:14
dholbach   TODAY, 19.00 UTC - Working on the Bleeding Edge -- kees16:14
dholbach   Wed 27th Jan, 19.00 UTC, Developing and Testing in KVM --kirkland16:14
dholbach<xteejx71> QUESTION: Do any of the classes cover how to use debhelper and CDBS?16:15
dholbachxteejx71: there is no explicit "debhelper and cdbs" session, but I'm sure that some sessions will cover it briefly16:15
dholbachin any case I can recommend https://wiki.ubuntu.com/PackagingGuide16:15
dholbach[SLIDE 3]16:15
dholbachok, let's start with setting up a gpg key16:16
dholbachgnupg stands for GNU privacy guard and can be used to sign and encrypt data in general (you'll see it in use very often with emails, but also general files)16:17
dholbachwe use it to prove that one person (and nobody else) made a particular change to a file16:17
cjohnston< LumpyCustard> Question: What is the command to show the current gpg keys on the system?16:18
dholbachthanks cjohnston16:19
dholbachLumpyCustard: gpg --list-keys <email address>         should do that16:19
cjohnston< xteejx71> QUESTION: Do the gpg keys *have* to be registered with Launchpad?16:19
dholbachso if you already have a key set up, you can skip this step obviously16:19
dholbachxteejx71: it's necessary to use a PPA (Personal Package Archive) or to upload a package to Ubuntu (once you are part of any of the uploader teams)16:20
dholbachok... so to generate a key you run the following16:20
dholbach  gpg --gen-key16:21
dholbachit's generally safe to just stick to the defaults16:21
dholbachif you want to have more information on setting gpg up, check out https://help.ubuntu.com/community/GnuPrivacyGuardHowto16:21
dholbachnow you tell gpg your name and your email address16:22
dholbacha comment is not necessary16:22
dholbachnow it will create the key and that's likely going to take a bit longer16:22
dholbach(it will take random numbers from whatever your machine is doing right now to put that key together)16:23
cjohnston< Navaneeth> QUESTION: How can I upload a package to ubuntu repository? Where is that information documented?16:23
dholbachNavaneeth: we'll get to that later on16:23
cjohnston< bullgard> QUESTION I obtain: "public key not found." What should I do?16:23
dholbachbullgard: it likely means that you have no key set up yet?16:24
dholbachbullgard: I don't know what you just did, so can somebody please try to debug the problem with bullgard in #ubuntu-classroom-chat?16:24
dholbachcjohnston: next?16:24
cjohnston< bullgard> QUESTION I obtain: "public key not found." What should I do?16:24
dholbachcjohnston: next?16:24
cjohnston< Paddy_NI> QUESTION: What is the comment generally used for?16:25
dholbachPaddy_NI: gpg is used to create the key with which we sign data, files and emails or encrypt and decrypt them - you actually don't use the command itself very often, but there's other tools which rely on it16:25
dholbachalright, so let's move on to the next topic :)16:26
dholbach[SLIDE 4]16:26
dholbachpbuilder is a great tool to test-build packages in a clean and minimal environment16:26
cjohnston< fubarrrr44> QUESTION: Why do I need root permissions to (just) build a .deb package? (wi    th rpm this is not needed)16:27
dholbachwhenever you start a build it will set up a minimal environment, install the build-dependencies, start the build itself and remove the build-dependencies afterwards again (it will cache them though)16:27
dholbachfubarrrr44: pbuilder uses chroot internally16:27
dholbachfubarrrr44: if you use just "debuild" (and install the build-dependencies on your "live system"), you don't need root permissions either16:28
dholbachthe maint points of pbuilder are:16:28
dholbach - keep your live system clean (you don't need to install 427697426246 build dependencies)16:28
dholbach - make sure the package builds in a minimal, unmodified environment16:29
dholbachthere are other tools that do similar jobs, and there's pbuilder-dist (in the ubuntu-dev-tools package), which is great16:29
dholbachthere's more info on https://wiki.ubuntu.com/PbuilderHowto16:29
dholbachplease edit ~/.pbuilderrc in your favourite editor16:30
dholbachand add this to it:16:30
dholbachCOMPONENTS="main universe multiverse restricted"16:30
dholbachthen save the file16:30
dholbachthen run16:30
dholbach   sudo pbuilder create16:30
dholbachthis, too, will take a while16:30
dholbachas it will create a minimal system "from scratch"16:30
dholbachok, let's crack on16:31
dholbach[SLIDE 5]16:31
dholbachnow we'll tell the development tools who we are16:31
dholbachplease edit ~/.bashrc with your favourite editor16:31
dholbachand add something like this to the end of it:16:32
dholbach export DEBFULLNAME='Daniel Holbach'16:32
dholbach export DEBEMAIL='daniel.holbach@ubuntu.com'16:32
dholbachafterwards please save the file16:32
dholbachand run16:32
dholbach  source ~/.bashrc16:32
dholbach(or restart your terminal)16:32
dholbachby setting DEBFULLNAME and DEBEMAIL:16:32
dholbach - you don't have to type in your email address16:33
dholbach - and name16:33
cjohnston< xteejx71> QUESTION: I never done the COMPONENTS bit before...does this make a difference when using pbuilder?16:33
dholbach - and gpg key id all the time16:33
dholbachand ... PLEASE ... use your own name and email address!16:33
dholbachxteejx71: if you want to use universe and multiverse to build packages, then yes, you need it16:33
dholbachare there any more questions? please keep them coming in #ubuntu-classroom-chat16:34
dholbachif not, I'll keep on talking about a few things while pbuilder and gpg are doing their thing16:34
cjohnston< ulysses> QUESTIN: Can I use characters in DEBFULLNAME like 'ó' and 'á'?16:34
dholbachulysses: yes, I'd be surprised if that wouldn't work :)16:35
cjohnston< xteejx71> QUESTION: Can pbuilder be used to create anything other the the Lucid environment?16:35
dholbachxteejx71: yes, have a look at https://wiki.ubuntu.com/PbuilderHowto - there's some variable you need to set, or use pbuilder-dist which can easily cope with multiple parallel pbuilders16:36
dholbachalright... let's talk about the release schedule for a bit16:36
cjohnston< xteejx71> QUESTION: If I already have run 'sudo pbuilder create' will this overwrite the old one or create a new one?16:36
dholbachxteejx71: I think I creates a new one16:36
dholbachxteejx71: might be best to check the manpage16:36
dholbach[SLIDE 6]16:37
dholbachthat's the current release schedule we have for this cycle16:37
dholbachyou can see that we're in the "yellow phase" right now16:37
dholbachin every cycle we roughly do the following:16:37
dholbach - set up the toolchain (the core build tools)16:38
dholbach - discuss features at the Ubuntu Developer Summit16:38
dholbach - merge changes from Upstream and Debian16:38
dholbach - work on features16:38
dholbach - debug problems16:38
dholbach - polish16:38
dholbach - release16:38
dholbachit was just pointed out that we're in the orange phase... yeah, that's right :)16:39
=== dragon is now known as Guest85410
cjohnston< kjele> Question: When I build with pbuilder it pulls down the required dependencies to compile the program. Is it possible to make sure it does not download each time I try to build?16:39
dholbachas you can easily see, the later it gets in the release cycle, the more conservative we get about changes16:39
dholbachtowards the end we focus more on testing and obvious good bugfixes than on "crack of the day"16:39
dholbachkjele: it does cache those build-depends by default16:40
dholbachso if you ask the question "How can I help out?" or "What can I do?" it heavily depends on where we stand in the release cycle16:40
cjohnston< Navaneeth> QUESTION: I heard ubuntu is not contributing to upstream. is that correct? If yes, why?16:40
dholbachNavaneeth: that's not correct16:41
dholbachNavaneeth: if you have a look at https://wiki.ubuntu.com/Upstream you can see that we put a lot of energy in collaborating effectively with upstreams16:41
dholbachmaybe I should clarify what "upstreams" are and how everything fits in one picture16:41
dholbachif you imagine millions of Ubuntu users on the one side16:42
dholbachand thousands of software projects like the kernel, like X, like GNOME, KDE, like Mozilla, like the authors of the crack-attack game and lots of others16:42
dholbachon the other side16:42
dholbachthen Ubuntu (and other distributions) stand in the middle and try to make the conversation happen between the two of them16:43
dholbachthose "software authors" on the other side are our upstreams16:43
dholbachhere's a list of things we contribute to upstream projects:16:44
dholbach - exposure of their software (distributions are the best way to get great software without hassle)16:44
dholbach - well-researched bug reports: we get LOADS and LOADS of bug reports every day and we put a lot of work into making them top-notch reports by automatically getting debug stacktraces, etc etc - basically we filter "defect reports" for upstream project16:45
dholbach - we test their software in lots of different scenarios16:45
dholbach - and we forward patches16:45
dholbachsure there's not a group of Ubuntu developers for every piece of software that exists16:46
dholbachbut we put a lot of hard work into working with Upstream projects16:46
cjohnston< fubarrrr44> QUESTION: How do I prevent pbuilder from doing clean up after work (to look at the generated chroot environment)?16:46
dholbachcheck out "Adopt-an-Upstream" by jcastro and dholbach on Thursday16:46
dholbachfubarrrr44: you can use    sudo pbuilder login   or just chroot for testing16:47
dholbachhttps://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases might be helpful oto16:47
cjohnston< LumpyCustard> Qn: How do I register the gpg key I've just made with Launchpad?16:47
dholbachLumpyCustard: great question!16:47
dholbachso first of all to find out your gpg key id, do the following: run16:48
dholbach   gpg --fingerprint your.name@email.com16:48
dholbachfor me it displays the following:16:48
dholbach pub   1024D/059DD5EB 2007-09-2916:48
dholbach       Schl.-Fingerabdruck = 3E5C 0B3C 8987 79B9 A504  D7A5 463A E59D 059D D5EB16:48
dholbach uid                  Daniel Holbach .......16:48
dholbach059DD5EB is my "KEY ID"16:48
dholbachnow to send you public key (your private key will always stay safe) to the keyservers so others can verify your signatures:16:48
dholbachgpg --send-keys KEYID16:49
dholbachand to register your key with Launchpad, head to https://launchpad.net/people/+me/+editpgpkeys16:49
dholbachOk... if your pbuilder is set up, you might want to try the following:16:50
dholbach apt-get source hello16:50
dholbach sudo pbuilder build hello_*.dsc16:50
dholbachif you follow the output from pbuilder closely you will see how it first sets up the initial minimal environment, then download additional build dependencies, then build the package, then remove the build environment again16:51
dholbachdepending on your net connection and the speed of your CPU and disk it might take a little bit16:51
cjohnston< IdleOne> QIESTION sorry if you covered this already but what if I already have a key uploaded to launchpad, how do I use it?16:52
dholbachIdleOne: just head to https://launchpad.net/people/+me/+editpgpkeys and use your existing key16:52
dholbachhttps://help.launchpad.net/YourAccount/ImportingYourPGPKey will help too16:52
dholbachsomething I forgot to mention when we were talking about the relase cycle16:53
dholbachreally really important fixes we need after a release is "out there" are SRUs16:53
dholbachSRU is short for Stable Release Updates16:53
dholbachbasically it's for REALLY IMPORTANT stuff, and the packages that you get through xyz-updates16:54
dholbachthe procedure and criteria for SRUs are listed here: https://wiki.ubuntu.com/StableReleaseUpdates16:54
cjohnston< n3rd> Question : Is there a way to make a single deb out of multiple binaries, say for example i call it server.deb it must install few binaries ask per my tweaks like apache, tomcat, activemq so on16:54
dholbachalso there's a small cheat-sheet regarding the release cycle over here: http://people.canonical.com/~dholbach/cheatsheet.pdf16:55
dholbach[SLIDE 7]16:55
dholbachn3rd: yes, you would create an empty binary package that has the following line in debian/control: "Depends: apache, tomcat, activemq"16:55
dholbachwe'll talk a bit more about that in the next session16:55
dholbachthere's two final things I'd like to mention in this session (before we start the next one):16:56
dholbach - head to #ubuntu-motu on irc.freenode.net if you have any problems - there's great people who are able to help and who will become friends after a while :-)16:56
dholbach - bookmark https://wiki.ubuntu.com/MOTU/GettingStarted - it links to everything that's important16:56
dholbachlet's all take a few minutes break before move on to "Fixing small bugs in Ubuntu" :-)16:57
dholbachAlrighty... welcome back to Ubuntu Developer Week - this time it's "Fixing small bugs in Ubuntu" :-)17:02
dholbachI picked a few small bugs and I hope a few things will be clearer:17:02
dholbach - how to use basic tools in every day situations later on17:03
dholbach - learn the process of fixing something, how to propose the fix to get accepted, etc.17:03
dholbachso we're not going to cover kernel hacks, crazy C++ stuff or anything else in here :-)17:03
dholbachok... the first bug I want us to have a look at is: https://bugs.launchpad.net/ubuntu/+source/fsniper/+bug/48661217:04
dholbachif you check it out, you'll see that indeed it is a small bug, it's about a typo in the package description of fsniper17:05
dholbachto confirm it, just run17:05
dholbach  apt-cache show fsniper17:05
dholbachand it says this towards the end:17:05
dholbach This packages comes with no generic rules, so you must write17:05
dholbach them yourself.17:05
dholbachso... we're going to fix it!17:05
dholbachfirst of all, let's get the package source:17:06
dholbach  apt-get source fsniper17:06
dholbachif you run  ls   you will see that it downloaded a .orig.tar.gz, a .diff.gz and a .dsc file17:06
dholbachand that it created a directory called fsniper-1.3.117:06
dholbachok, here's how it all fits together:17:07
cjohnston< vishalrao_dsktop> QUESTION: where does apt-get source store source files?17:07
dholbach - orig.tar.gz is the file that the upstream authors released on their website as the source code17:07
dholbach - .diff.gz is the compressed set of changes we make to make the package build the "debian or ubuntu way"17:07
dholbach - .dsc is just meta-data like md5sums etc17:08
dholbachapt-get downloaded the source from the archive, checked the md5sum, untarred the .orig.tar.gz file and applied the .diff.gz changes17:08
dholbachok... let's fix this bug now :)17:09
dholbach  cd fsniper-1.3.1/17:09
dholbach  cat debian/control17:09
dholbachdebian/control was added (among other things) by the Debian/Ubuntu maintainers of the package17:09
dholbachand it describes the source and the resulting binary package (in this simple case just one binary package)17:10
cjohnston< michae> QUESTION : no fsniper dir . Normal?17:10
dholbachthe description at the bottom is what we need to fix17:10
dholbachthis call ought to fix it for us:17:10
dholbach  sed -i 's/packages/package/g' debian/control17:10
dholbachmichae: I'm sorry, I don't understand your question... can somebody help michae debug the problem in #ubuntu-classroom-chat please?17:11
cjohnston< thebwt-lernid> QUESTION: couldn't we just open our favorite editor and fix it as well? Why use sed?17:11
dholbachthebwt-lernid: yes, that'd work too and we'll make more use of the editor in due course :)17:12
dholbachok... some folks said they ran into trouble because dpkg-dev was not installed - please make sure you have it17:12
dholbachso now that we fixed the problem, we need to document the changes we did17:13
dholbachplease run17:13
dholbach  dch -i17:13
dholbach(you need devscripts installed for that - session 1)17:13
dholbachif you attended the first session, you will see your name and email address now, if you weren't here or did something wrong, you need to type it in manually17:14
dholbachok, let's go through the changelog entry one by one17:15
dholbachthe first line looks like the following over here:17:15
dholbachfsniper (1.3.1-0ubuntu3) lucid; urgency=low17:15
dholbachfirst the name of the source package, next the version, then the version of Ubuntu where we want to fix it in and an urgency setting which we can ignore for now17:15
dholbachlet's have another look at the version name17:16
dholbach1.3.1-0ubuntu3 means: 1.3.1 release by upstream, package was not in Ubuntu yet, 3 revisions in Ubuntu17:16
dholbachoops, sorry make that "package was not in Debian yet"17:17
dholbach0.6-4 would mean: 0.6 release by upstream, 4 revisions in Debian, no changes in Ubuntu17:17
dholbach1.2.3-4ubuntu5 would mean: 1.2.3 as released by upstream, 4 revisions in Debian, 5 changes following changes in Ubuntu17:17
dholbachI hope it gets clearer as we work our way through a few examples17:18
dholbachnext up is the description... dch leaves it empty for us, but I put something like this in there:17:18
dholbach  * debian/control: replaced "This packages" with "This package" (LP: #486612)17:18
dholbachwhen I write a changelog entry, I usually try to:17:18
dholbach - mention which files I changes17:18
dholbach - mention which files I changed17:18
cjohnston< SoftwareExplorer> QUESTION:Do the numbers after ubuntu reset when debian releases a new version?17:18
dholbach - mention what I changed17:18
dholbach - mention where the change was discussed (bug report, mailing list post, etc.)17:19
dholbach - and as (LP: #486612) means "Launchpad bug 4855112", in this special notation the bug will get automatically closed on upload :)17:19
dholbachSoftwareExplorer: no, if we introduce changes in Ubuntu, we need to either manually merge our changes with Debian changes or we need to decide to drop our changes altogehter and overwrite our package with that from Debian - in the latter case, yes, the version is "reset"17:20
dholbachhttps://wiki.ubuntu.com/UbuntuDevelopment/Merging has more info17:21
cjohnston< venuz> QUESTION:how do we resolve cyclic dependency?17:21
dholbachand on Friday, 17 UTC we will have a dedicated session about that17:21
dholbachvenuz: that's a more complicated subject and nothing we can discuss in this session, can you please head to #ubuntu-devel and ask there?17:21
dholbachok, let's move on17:21
cjohnston< strycore74> QUESTION: Is there a way to quickly view all the changes I made in the source code while I'm writing the source code ? Should I keep an intact verison of the source to diff with my17:22
cjohnston                    version ?17:22
dholbachso once you wrote something nice into the changelog entry, please save the file17:22
dholbachand run17:22
dholbach  debuild -S17:22
dholbachstrycore74: I'm going to mention that in just a sec :)17:22
cjohnston< xteejx71> QUESTION: what is the difference between the -S and the -S -sa commands?17:23
dholbachxteejx71: -S will build the source package, -sa is something we can ignore for now - it's just relevant if you want to upload the package somewhere (-sa will also upload the .orig.tar.gz tarball) - please refer to the debuild or dpkg-buildpackage manpage :)17:23
=== swoody__ is now known as Guest6758
dholbachplease run17:24
dholbach  sudo apt-get install quilt17:24
dholbachif   "debuild -S"   gave you an error message17:24
dholbachand try again17:24
dholbachthanks dbell17:24
dholbachplease let me know in #ubuntu-classroom-chat if that worked out for you :)17:25
dholbachok, some of you seem to have got a debsign error. we can ignore that for now.17:25
dholbachit likely means that you either didn't set up your gpg key correctly, or you gave a different name and email address in your gpg set up and in DEBEMAIL/DEBFULLNAME in ~/.bashrc17:26
dholbachwe don't need to sign it now, so please ignore it for now :)17:26
dholbachsome of you might also need to run:17:26
dholbach  sudo apt-get install debhelper17:26
dholbachsorry :)17:26
dholbachthanks vishalrao_dsktop17:27
dholbachyou can run all these commands as regular user, 'sudo' should just be required for pbuilder17:27
dholbachalright, let's crack on, please rerun "debuild -S" once you install debhelper and quilt17:28
dholbachthen please run17:28
dholbach cd ..17:28
dholbachnow please run17:28
dholbach  debdiff fsniper_1.3.1-0ubuntu2.dsc fsniper_1.3.1-0ubuntu3.dsc > fsniper.debdiff17:28
cjohnston< mhall119|work> QUESTION: I get a gpg error saying "secret key not available"17:28
dholbachmhall119|work: very likely whatever you have in DEBEMAIL / DEBFULLNAME in ~/.bashrc and in your gpg key set up don't match - please ignore it for now or try to debug it in #ubuntu-classroom-chat17:29
dholbachyou might also need the  patchutils  package, so please install that too17:30
dholbachonce you have all that sorted out, please copy the content of fsniper.debdiff to http://paste.ubuntu.com17:31
dholbachand say something like          MY-PATCH: http://paste.ubuntu.com/......      in #ubuntu-classroom-chat and I'll take a look at it17:31
dholbachif we did everything right, we might all have a nice patch ready now :)17:32
dholbachxteejx71: http://paste.ubuntu.com/362732/ looks great17:32
dholbachalastair: http://paste.ubuntu.com/362734/ looks good, just replace "karmic" with "lucid", karmic is release already - apart from that: great work!17:33
dholbachstrycore74: http://paste.ubuntu.com/362731/ looks great17:33
dholbachvishalrao_dsktop: http://paste.ubuntu.com/362735/ looks great (just karmic -> lucid)17:34
dholbachnetritious: http://pastebin.com/f28cffa07 looks good (karmic -> lucid too and maybe your realname :-))17:35
cjohnston< Ravm> QUESTION: So, if I made a mistake, do I just alter the patch, or redo the sequence?17:35
dholbachrmunn: http://paste.ubuntu.com/362740/ looks good, karmic->lucid too and I'd mention which file you changed :)17:35
dholbachRavm: re-do the sequence in almost all circumstances17:36
dholbachRavm: it's very easy to botch up the patch file and whoever is reviewing the patch later on can't apply it17:36
dholbachI'm proud of you guys! Awesome work! First patch done! YEEEEEEHAW! :-)17:37
dholbachok, let's do another one... we have 23 minutes left :-D17:37
cjohnston< dbell> QUESTION: do we need to go through the whole process again to change karmic to lucid, do we need to run lucid, or can we just edit the debdiff and change it there?17:37
dholbachdbell: just update karmic to lucid, then run "debuild -S" again17:37
dholbach(and run "debdiff ...")17:38
dholbachthe next bug I found it a bit more complicated :-)17:38
cjohnston < mhall119|work> QUESTION you wouldn't have to re-do the dch part unless it's been uploaded, right?17:38
dholbachmhall119|work: yes, you'd just run edit debian/changelog instead17:38
dholbachok... here's the next bug:  https://bugs.launchpad.net/ubuntu/+source/meld/+bug/41736917:39
dholbachsomebody requests the meld package to be updated17:39
cjohnston < Navaneeth> QUESTION: Is this the same procedure to fix defects even if they are in code (C or C++)? If yes, Once they are fixed, will it goto original projects source repository?17:39
dholbachNavaneeth: the procedure can change somewhat, and the change needs to be forwarded to upstream authors by you manually17:40
dholbachok... let's fix up meld now17:40
dholbachthe bug requests 1.3.117:41
dholbachin lucid I get the following:17:41
dholbachdaniel@miyazaki:~$ apt-cache showsrc meld | grep ^V17:41
dholbachVersion: 1.3.0-217:41
cjohnston< xteejx71> QUESTION: Should we now remove all the old build files for hello and fsniper?17:41
dholbachxteejx71: as you like it17:41
dholbachok, so we indeed have to fix meld17:41
dholbach  apt-get source meld17:41
dholbach  cd meld-1.3.017:41
cjohnston< lbrinkma> QESTION: Should this upgrade performed upstream(debian)?17:42
dholbachnow you need devscripts installed17:42
dholbachlbrinkma: in theory, yes, as much in Debian as possible17:42
dholbachlbrinkma: sometimes you will find that Debian is in a freeze period or that we need a fix urgently - in that case we upload to Ubuntu directly17:42
dholbachor if the Debian maintainer is on holidays, etc :)17:42
dholbachnow please run:17:43
dholbach  uscan17:43
dholbachif you run17:43
dholbach  ls ..17:43
cjohnston< xteejx71> QUESTION: Does it make a difference if we update an Ubuntu package, since Ubuntu and Debian sync each other right?17:43
dholbachit will show you that it downloaded meld-1.3.1.tar.gz from the upstream website - cool, eh?17:43
dholbach(debian/watch does thaT)17:44
dholbachxteejx71: check out https://wiki.ubuntu.com/SyncRequestProcess and https://wiki.ubuntu.com/UbuntuDevelopment/Merging - Jorge and I will cover that explicitly in Adopt-An-Upstream :)17:44
dholbachnext we use that tarball to "update the package"17:45
dholbachplease run17:45
dholbach  uupdate ../meld_1.3.1.orig.tar.gz17:45
dholbachwhat it does it the following:17:46
dholbach - untar the mentioned tarball17:46
dholbach - apply the current set of changes (1.3.0 .diff.gz)17:46
dholbach - add a template changelog entry17:46
dholbachnice, eh? :-)17:46
dholbachnow please:17:46
dholbach  cd ../17:46
dholbach  diff -u meld-1.3.{0,1}/INSTALL17:46
dholbachwhat that command does is show you the differences between the INSTALL file (a document provided by upstream) between the two releases17:47
dholbachthe important information we filter out now is:17:48
dholbach-##  * pygtk-2.6.017:48
dholbach-##  * gnome-python-2.6.017:48
dholbach+##  * pygtk-2.8.017:48
dholbach+##  * gnome-python-2.8.017:48
dholbach(it tells us that new versions of gnome-python and pygtk are required)17:48
dholbachif you intend to take care of a package update, be sure to check what changed internally so your users aren't confused afterwards :-)17:48
dholbach  cd meld-1.3.117:48
dholbachand edit debian/control.in17:48
dholbach(in this case it's debian/control.in and not debian/control because of specialties in the Debian GNOME team)17:49
dholbachI'll now change this line          python-gtk2 (>= 2.4),            to use 2.817:50
dholbachalso I'll update                python-gnome2,              to have (>= 2.8)17:50
dholbachnow save the file17:50
dholbachand run17:50
dholbach  rm debian/patches/pythonpath.patch17:50
dholbach(this is a patch that is not required any more... I'm just saying it now as we only have 9 minutes left - I tested this before :-))17:51
dholbachnow please edit debian/changelog and document your changes :)17:52
=== mike is now known as Guest50550
dholbachnow please run17:53
dholbach  update-maintainer17:53
dholbach(from the ubuntu-dev-tools package)17:53
dholbachrationale: the Debian maintainers asked us to set an ubuntu.com email address as the Maintainer whenever we introduce a change over Debian so they don't get email for it :-)17:53
dholbachalso please edit debian/rules17:54
dholbachand remove the following line17:54
dholbach   DEB_INSTALL_CHANGELOGS_ALL += changelog17:54
dholbachsave the file17:54
dholbachand run17:54
dholbach  debuild -S -sa17:54
dholbachyou might need gnome-pkg-tools installed17:55
dholbachonce you're done with this, you can build the package by running the following17:55
dholbach  sudo pbuilder build meld_1.3.1-0ubuntu1.dsc17:55
dholbachor rather:17:55
dholbach cd ..17:55
dholbach sudo pbuilder build meld_1.3.1-0ubuntu1.dsc17:55
dholbachsorry for ploughing through this like this but we were running out of time17:56
cjohnston< Navaneeth> QUESTION: If I submitted a patch to launch pad and didn't send that to original authors. So does that lead into multiple versions of package? And what happens if the patch submitted to launch pad is not the one the real authors like to include? How ubuntu handles such scenarios?17:56
dholbachnormally we would have fixed the bugs one by one17:56
dholbachNavaneeth: first of all the patch is not automatically sent upstream17:56
dholbachhttps://wiki.ubuntu.com/SponsorshipProcess explains how to get a patch reviewed for inclusion by Ubuntu developers17:57
dholbachsometimes they are going to ask you to get in touch with upstream developers and forward the patch there first (if it's not obvious)17:57
dholbachgenerally we prefer to stay in sync with upstream17:57
dholbachand want good reasons to deviate17:57
dholbachcjohnston: next17:57
cjohnston< Quintasan> QUESTION: what is the Build-Depends-Indep line?17:57
dholbachQuintasan: Build-Depends and Build-Depends-Indep are packages that are necessary to build packages17:59
dholbachif a package is Architecture: all, you list under Build-Depends all the packages that are necessary to run the clean target and the rest under build-depends-indep (sorry it's a bit short, but we#re out of time, sorry)17:59
dholbachhave a look at https://wiki.ubuntu.com/PackagingGuide for more info18:00
dholbachhttps://wiki.ubuntu.com/MOTU/GettingStarted is what you need to bookmark :)18:00
dholbachand THANKS EVERYBODY18:00
dholbachthis session was awesome! :-)18:00
Davieythank you sir18:01
dholbachnext up is Dave Walker who will talk about a fantastic piece of software to write (web) software: Django!18:01
DavieyHello everyone, and thanks for being here!18:01
DavieyI'm happy to have questions as they come, so if you have a question - please feel free to interupt me18:01
Davieyvia QUESTION: Some question ---> in #ubuntu-classroom-chat18:02
Daviey(hope that makes sense)18:02
DavieyI'll start.18:02
DavieyDjango is a "Web Framework".. I'm sure many of you have an idea what this is18:02
* dholbach hugs Daviey18:02
DavieyHowever, some people (including myself) were totally baffled when we first tried to start with it18:03
DavieyIn this session, i hope to give a good introduction and allow everyone to make thier first app18:03
DavieyDjango has a slogan of "The Webframework for perfectionists with deadlines"18:03
DavieyThis is kinda catchy :)18:04
DavieyIf we try to start a project, hopefully people can follow.18:04
DavieyI'll explain what each part is inside the "project"18:04
Davieymany people install django from the repositories via "sudo apt-get install python-django"18:04
DavieyHowever, many people feel that it doesn't provide a new enough version - so they install it other ways18:05
DavieyI'll get more onto that later.18:05
DavieyOnce it is installed, we have an extra app that we can run.18:05
DavieyIf you installed via the repositories it is called django-admin18:05
DavieyIf you installed via source it is called django-admin.py18:05
DavieyIf we try and create a very simple blog i wold od18:06
Davieydave@boogie:~/django$ django-admin startproject blogsite18:06
Davieythis then creates the following:18:07
Davieydave@boogie:~/django/blogsite$ ls18:07
Daviey__init__.py  manage.py  settings.py  urls.py18:07
DavieyThis is the basis of our application18:07
Davieymanage.py is our application we use to RUN certain commands18:07
Davieyso it's the only executable we will use from now on18:07
DavieyThe default settings file called, settings.py is here http://pastebin.com/f4533df0f18:08
DavieyAs you can see it's very well documented.18:08
DavieyThe database backends provide abstraction, so we really don't care what the actual database type is18:09
Davieyit could be sqlite3, mysql, postgres (my fav.) or oracle18:09
DavieyWe won't need to care about SQL commands, that are normally associated with web applications18:09
Davieyurls.py is here, http://pastebin.com/f6411065318:09
DavieyIt allos us to describe via a regex where to direct http requests18:10
DavieyEveryone following ok?18:10
Pendulum < Navaneeth> QUESTION: If we don't care about SQL statements, how specific optimizations on SQL can be applied?18:10
DavieyNavaneeth: Good question..  Because everything is an object, if we code our applications in a sane way it should be quite optimal in the SQL queries18:11
Davieyyou can manually run sql commands, but you often don't need to18:11
Pendulum< n3rd> Question:manage.py is our application we use to RUN certain commands..like?18:11
Davieydjango can also cache the requests to mean that it doesn't need to do the same query multiple times18:12
Davieyn3rd: that comes next :)18:12
Davieydave@boogie:~/django/blogsite$ ./manage.py startapp blog18:12
DavieySo what we have done now is create a app inside our project called blog18:13
Davieydave@boogie:~/django/blogsite/blog$ ls18:13
Daviey__init__.py  models.py  tests.py  views.py18:13
DavieyThat stuff was all included automatically18:13
Davieybut before i explain what each of those does, i would like to show you all the admin interface18:13
Davieydave@boogie:~/django/blogsite$ ./manage.py syncdb18:14
DavieyThis will create all our database tables that we require18:14
DavieyAs i've only enabled the admin, via adding "django.contrib.admin" to the INSTALLED_APPS section of settings.py18:14
Davieyit will only create that18:14
Davieydave@boogie:~/django/blogsite$ ./manage.py syncdb18:15
DavieyCreating table django_admin_log18:15
DavieyCreating table auth_permission18:15
DavieyCreating table auth_group18:15
DavieyCreating table auth_user18:15
DavieyCreating table auth_message18:15
PendulumQuestion : got this error : django.core.exceptions.ImproperlyConfigured: You haven't set the database ENGINE setting yet.18:15
DavieyCreating table django_content_type18:15
DavieyCreating table django_session18:15
DavieyCreating table django_site18:15
DavieyYou just installed Django's auth system, which means you don't have any superusers defined.18:15
DavieyWould you like to create one now? (yes/no): yes18:15
DavieyUsername (Leave blank to use 'dave'):18:15
DavieyE-mail address: davewalker@ubuntu.com18:15
DavieyPassword (again):18:15
DavieySuperuser created successfully.18:15
DavieyInstalling index for admin.LogEntry model18:15
DavieyInstalling index for auth.Permission model18:15
DavieyInstalling index for auth.Message model18:15
DavieyAs you can see, manage.py created the database tables18:16
DavieyOkay, i did add one more change18:16
Davieyin settings.py add:18:16
DavieyDATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.18:16
DavieyDATABASE_NAME = 'database.sql3'             # Or path to database file if using sqlite3.18:16
DavieyThat will mean it will use sqlite3, and a file called database.sql318:16
Davieyso whoever that was, now run syncdb18:17
Davieynow if i do:18:17
Daviey./manage.py runserver18:17
DavieyI get an development webserver built in for free!18:17
DavieyHowever, there isn't a whole lot going on there (yet)18:18
Davieyfeel free to have a look18:18
DavieyOkay, now back to the blog app we started18:18
Davieydave@boogie:~/django/blogsite/blog$ ls18:19
Daviey__init__.py  models.py  tests.py  views.py18:19
Daviey__init__.py - runs when the app is loaded18:19
Davieyit's empty by default, and tends to stay that way18:19
Davieymodels.py - This is where we describe our database structure.  You can do much more18:19
DavieyBut for this, we will limit it to simply describing your database as objects18:20
Davieyhttp://pastebin.com/f295abd14 <-- pretty much empty18:20
DavieyWe have our views.py - http://pastebin.com/f50aad6cb18:20
DavieyThis is how we describe how our data is shown to the user.18:21
Davieylets start putting some content in there18:21
Davieyhttp://pastebin.com/f5d4145da <-- that is the contents of my models.py18:22
DavieyNow, we need to tell the project we are actually using it.18:22
DavieyIf everyone doing ok so far?18:22
Davieydave@boogie:~/django/blogsite$ nano settings.py18:23
DavieyI'm adding "    'blogsite.blog',18:23
Davieyinside the INSTALLED_APPS section.18:23
cjohnston< tiemonster> QUESTION: the admin.site.register doesn't necessarily have to go in an admin.py?18:23
Davieytiemonster: hmm, you could put it in __init__.py18:24
Davieybut it makes sense to put it in the admin.py18:24
Davieyadmin.py is a fairly new feature that was introduced in 1.0 iirc..18:24
Davieyanyway, we don't need to cover that atm18:24
DavieyKISS :)18:25
cjohnston < tiemonster> QUESTION: So it doesn't matter where you declare the admin.site.register?18:25
DavieyI'll wait for the netsplit to finish before continuing18:25
DavieyOkay, i think i will continue18:26
Davieytiemonster: technically it doesn't matter where you register it18:27
DavieyAll it's doing is telling the admin interface to be aware of these objects18:27
Davieyi tend to do it in models.py i think18:27
Davieybut you could put it anywhere that is aware of the model18:27
Davieydave@boogie:~/django/blogsite$ ./manage.py syncdb18:27
DavieyCreating table blog_blogpost18:27
DavieyInstalling index for blog.Blogpost model18:27
DavieyAs you can see, the blog object has been created in the database18:28
Davieyyou can't see this at the moment, so i'll open up the web interface18:28
Davieyin order to enable the worst kept secret of django.. we need to open urls.py18:28
Davieywe need to uncomment:18:28
Daviey# from django.contrib import admin18:29
Daviey# admin.autodiscover()18:29
Daviey(remove the #)18:29
Davieyand also from the     # (r'^admin/', include(admin.site.urls)),18:29
Davieyhttp://pastebin.com/f24559b5f <-- like so18:29
Davieynow, if people want to log into the admin interface and have a look - log in here18:29
DavieyI might add, that i hope i can trust you all not to abuse this :)18:30
Davieythe username is: dave18:30
Davieyand the password is: password18:30
Daviey(secure huh?)18:30
cjohnston< SmartSsa> Question: I'm seeing some differences in what my django is creating vs. what you're showing. What version are you using and how can I find out what version I'm using?18:30
Davieyi set that when i first sync'db18:30
DavieySmartSsa: What differences are you seeing?18:31
Davieydave@boogie:~/django/blogsite$ apt-cache show python-django | grep Version18:31
DavieyVersion: 1.1.1-1ubuntu118:31
DavieyThat is the one i have installed on this box18:31
DavieySmartSsa: if you can list your differences, we'll come back to it if that is ok?18:32
cjohnston < SmartSsa> Daviey, I don't have tests.py or the line with 'admin.site.urls' .. i have 'admin.site.root in my urls.py file.18:32
Davieycjohnston: Ah, that was a change with 1.1 i believe18:32
cjohnston< Navaneeth> QUESTION: Django has support for running on a server farm? Like sharing session etc..18:33
DavieyAre people seeing the webinterface?18:33
DavieyOkay, i'm running that under the dev server which isn't designed for large use.. so perhaps it may be falling over slightly18:35
DavieyHowever, you will see the "Blog" application listed there18:36
Davieyfeel free to "Add blogpost"18:36
Davieythat luiX_18:36
Davieyokay.. hopefully everyone can see the potential of the admin interface18:37
DavieyNow we need a way to show that to a user, who isn't authenticated18:38
Davieywe do this via a "view"18:38
Davieyso in "blogsite/blog/views.py"18:38
DavieyI'm going to put in a function18:38
cjohnston< luiX_> QUESTION: Can you filter what apps are showed up to each user or profile in the admin page?18:39
DavieyluiX_: yes, you can18:39
Davieyso as you can see, if the function posts() gets called18:40
Davieyposts = Blogpost.objects.all()18:40
DavieyWhich under the wrappers does a SELECT * FROM blogpost, for example18:40
Davieyit then pushes the data to a html file that is created called posts.html18:40
DavieyHowever, first we need to let the app know how to send a HTTP request there18:41
Davieynano blogsite/blog/urls.py18:41
Davieyhttp://pastebin.com/f34534c6d <---18:42
DavieyEveryone following ok?18:42
Davieyso, posts.html is a "template"18:43
Davieyso lets create a template folder18:43
Davieydave@boogie:~/django/blogsite$ mkdir templates18:43
Davieyand we need to tell the settings where this is18:43
DavieyTEMPLATE_DIRS needs to have something added18:44
Davieyto keep things simple:18:44
DavieyTEMPLATE_DIRS = (18:44
Daviey    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".18:44
Daviey    # Always use forward slashes, even on Windows.18:44
Daviey    # Don't forget to use absolute paths, not relative paths.18:44
Daviey   '/home/dave/django/blogsite/templates/',18:44
Daviey(you can do clever things such as working from current postion + 'templates'18:44
Davieybut for this we'll keep it simple18:44
Davieyadjust the following to what suites your dir layout18:44
Davieydave@boogie:~/django/blogsite$ nano templates/posts.html18:46
Davieyokay, everyone following ok?18:46
DavieyNow, lets add an entry to "blogsite/urls.py18:47
Daviey(r'^', include('blogsite.blog.urls')), <--18:47
Davieyadd it above or below the admin one:18:47
Daviey(r'^admin/', include(admin.site.urls)),18:47
Daviey^^ urls.py18:48
DavieyNow, if we do our runserver again18:48
Daviey./manage.py runserver18:48
Davieywe should see: http://ubuntu.dev.week.daviey.com:8000/18:48
DavieyWe have made a simple blog \o/18:49
Davieywe can add and remove these via http://ubuntu.dev.week.daviey.com:8000/admin/blog/blogpost/18:49
DavieyI hope everyone is keeping up okay18:49
DavieyI won't touch on theming today, or any other stuff like that..18:50
Davieyif we look at our templates/posts.html18:50
Davieywe can see there is a mini language in itself18:50
Daviey{% for post in posts %}18:50
Davieyfor loop18:50
Davieypost.title , post.content <-- this is the models.py we described earlier18:51
DavieyEverything is an object!18:51
DavieySome of the things that makes django particualry cool for us ubuntu folk, is some of the awesome apps we already have18:51
DavieyIt is VERY easy to add openid auth support that uses launchpad for signing in.18:52
DavieyYou can see examples of this in UbuntuOne web interface, UDS planner, and the community created project of http://loco.ubuntu.com18:52
DavieyOther things that are exciting to us, is that it's python - so we can tie into bzr and things like the launchpad api18:53
Davieymenaing oru web applicationc an do real time cool stuff.18:53
DavieyI was going to cover django-auth-openid, but i somehow feel that adding things like that right now, might cause people to explode :)18:53
DavieyOther cool things are deployment methods, such as using fabric, virtualenv and pip18:54
DavieyOther ways of installing django include pip, this is like easy_install or for the perl types cpan18:54
DavieyIt installs python things, but not necessarily in a clean place18:55
cjohnston< strycore66> QUESTION : Any good book on Django to suggest ?18:55
Davieystrycore66: THE best book i would recommend is http://docs.djangoproject.com/en/1.1/18:55
Davieythe documentation is updated so regulary and there are many tutorials18:56
Davieyhttp://www.djangobook.com/ <-- is another good source18:56
cjohnston< SmartSsa> Question: What's the "Sites" section for in the admin?18:56
Daviey^^ that is a real print book, avaliable for no cost online18:56
DavieySmartSsa: We can tie projects to a specific site and use that to make a difference.18:57
DavieyIe, we could have had 15 different blog sites going there18:57
Davieyin this instance, we didn't use it18:57
DavieyShall i just fall back to questions now, and perhaps have a more advance session another time?18:57
cjohnston< n3rd> QUESTION :How can we use web2.0 like features with this framework18:58
Davieyn3rd: Django won't make an app look web2.0-y on it's own, you do still need css and javascript.. django can help, but it does help if you have an arty influcence18:58
Daviey(i odn't)18:58
Davieythings like plugging into twitter are also easy!18:59
cjohnstonThat's all that I have for now Daviey18:59
Davieyokay, i'll end it there18:59
Davieyloco directory (loco.ubuntu.com) is open source18:59
DavieyIf you want to come and help, the water is warm19:00
Davieyjump in a #ubuntu-locoteam19:00
DavieyThanks all for listening19:00
DavieyNext we have kees_lernid for an exciting, and cool subject!19:00
cjohnstonDaviey: #ubuntu-locoteams ?19:00
Davieycjohnston: my mistake, yes19:00
keeswell, just me, not kees_lernid, that's just me following along19:01
keesHello!  I'm Kees Cook, an Ubuntu Developer, Security Team member, and Canonical employee.19:01
keesI'm trying to figure out how to get my slides into lernid...19:01
keesThis presentation is about how to run the development version of Ubuntu (currently Lucid) and how to get yourself out of jams.19:02
keesThe slides I'll be using to keep me on topic come from 2007, and I'll update a few links as I go.19:02
keesNearly everything still applies, but just mentally swap in "Lucid" when you see "Gutsy".  :)19:02
keesThey are here: http://outflux.net/ul07/bleeding-edge.pdf (or .odp if you want the raw slides)19:03
* kees attempts to trigger lernid somehow...19:03
kees[SLIDES: http://outflux.net/ul07/bleeding-edge.pdf]19:03
keesone moment, trying to get the slides into iCal...19:04
kees[SLIDE 1]19:04
keesokay... so, this should work, or reload lernid:  wget -O $HOME/.cache/lernid/slides.pdf http://outflux.net/ul07/bleeding-edge.pdf19:06
keesanyway, no more delays.  :)19:06
kees[SLIDE 1]19:06
keesThe bulk of this content was written by cjwatson; I just cleaned them up.  Blame me for any mistakes, though.  :)19:06
kees[SLIDE 2]19:06
keesso, people like running the devel release, but there are a lot of reasons not to19:07
keesin particular, if you need a new package, and there is no PPA for it, you can just build it on a stable release19:07
keesthe only thing you need to find generally is the ".dsc" file, and "dget" will do the work of fetching it all19:07
keesin this slide, I show the commands to do a package build; it's a few steps, but it gets it done, and gives you a working package usually.19:08
kees[SLIDE 3]19:08
keesnow, there are reasons TO run the devel release; and I love having people helping with it.19:08
keesthe biggest reason is helping with development and testing.19:08
keesit's very hard to do testing without actually running the software you're working on.  :)19:09
keesgenerally, though, if you're interested in this topic, you should be running the devel release.  :)19:09
keesoh! before I forget, please feel free to ask questions with [QUESTION] in the #ubuntu-classroom-chat channel as I go.19:10
kees[SLIDE 4]19:10
keesso, we're working on Lucid now, so you'll want https://wiki.ubuntu.com/LucidReleaseSchedule19:10
keesprior to import freeze, we're pulling in new software versions from Debian daily.19:11
keesand people are, of course, working on all kinds of fixes and changes.19:11
keesthat said, we stop for regular milestones and release bootable and installable "alpha" liveCDs.19:11
keesafter feature freeze, we try to focus on bug fixing.  with Lucid being an LTS, we're actually trying to focus more on bug fixing than features too.19:12
keesit's really important to get testing in before the end of this schedule, usually before beta because it's very hard to fix some bugs without enough time to test them.19:12
kees[SLIDE 5]19:12
=== nathan is now known as Guest75246
keesgiven how much the release changes from day to day, it's important to stay updated.  I try to update twice a week.  Others do it multiple times a day.  I would recommend at least once a week.  I find Wed the best time so that if things have gone weird, there are a weekdays left before the weekend to try to get help with fixing stuff.19:14
keesfollowing that rule, I don't update on fridays.  ;)19:14
keesplease help out with the testing and liveCD testing.  the included links in the slides are good starting points.19:14
kees[SLIDE 6]19:14
keesso, the liveCDs are important.  they're the best indicator of what the ubuntu install experience is going to be.19:15
keesyou can also build bootable USB disks from liveCD isos19:15
keesor, with a VM, you can boot isos for testing.19:15
keesmy favorite for this is testdrive: http://blog.dustinkirkland.com/2009/11/introducing-testdrive.html19:15
keesit lets you trivially try out an ubuntu image if you don't want to install it or be running the devel release19:16
keesthe USB live disk details are probably best described here: http://en.wikipedia.org/wiki/Ubuntu_Live_USB_creator19:17
kees[SLIDE 7]19:17
keesanother option is dual-booting, a separate system, etc.19:17
kees[SLIDE 8]19:18
keesI'm personally a fan of using VMs.  libvirt and "virt-manager" is my friend.  All my VMs are there, though it does start taking up a fair bit of disk space.19:18
kees$ du -sh /vm-images/19:18
keesthat said, I have amd64 and i386 of every stable release.  :)19:18
kees[SLIDE 9]19:19
keesnow, with all the focus on install testing, upgrade testing is sometimes overlooked19:19
keesupgrading a VM from the prior stable release to the devel release needs to be tested often, since there are library changes, package relationship changes, etc, that might need to be manually tweaked by update-manager.19:19
keesfiling bugs about this area is very important.19:20
kees[SLIDE 10]19:20
keesthe "right" way to do upgrades is with update-manager.19:20
keesit has additional logic that apt-get and aptitude do not contain.19:20
cjohnston< strycore66> QUESTION : Is it good practice to keep a pristine VM for bug testing (updated but with no additonal packages or data) ?19:21
keesif you get into a jam, you may need to using apt-get manually.  After a dist-upgrade, I also usually try an "apt-get install ubuntu-desktop" in case the manual upgrade missed anything19:21
keesstrycore66: so, I try to do both.  A pristine VM is good for being able to compare between version of Ubuntu, for example, but a "messy" VM is good for finding corner-cases, etc.19:22
keesdoing testing on your real system is best because you've customized it, and that's usually where bugs come from.19:22
keesthat said, it's good to start from the same pristine VM when you're trying to reproduce problems, etc.19:22
cjohnston< alvarezp> QUESTION : What is that additional logic that update-manager provides? What do we miss if we use plain APT tools?19:22
keesthe "virt-clone" command is handy for this.19:22
keesalvarezp: there are sometimes transititions or file clean ups that are hard to handle strictly in apt.  things I'm thinking of off the top of my head are: old kernel version cleanups, the open-office version bump a while back, stuff like that.19:24
keesI don't have very good examples, but if you want more, find "mvo" online in #ubuntu-devel later and ask him, he tends to be the person handling those things for update-manager.19:24
kees[SLIDE 11]19:24
keesthere's a lot that can break...19:25
keeshopefully the rest of this presentation can help you with those issues19:25
kees[SLIDE 12]19:25
cjohnston< n3rd> QUESTION: What if i want to take a tgz of "/" and restore it ?19:25
keesn3rd: let me answer that in a moment19:25
keesso, if mirrors blow up, there can be checksum failures.  don't ignore these issues; they're real problems.19:26
keeswait for the next update push (about an hour usually) and try again19:26
keesor switch to the non-mirror briefly.19:26
keesn3rd: you can take tarball snapshots of / if you want.  the main areas of package management are in /var/lib/dpkg and /var/lib/apt19:27
keesI'll mention those in a moment19:27
kees[SLIDE 13]19:27
keessometimes there are mistakes made when packages take over files from older packages.  all of these glitches need to be reported so they can be fixed.19:27
kees[SLIDE 14]19:27
keesyou can force installations anyway, but if maintainer scripts misbehave, you'll likely need to debug and edit them by hand19:28
keesthe important bit is /var/lig/dpkg/info/ which contains all the maintainer scripts.19:28
keesmy favorite reference for how maintainer scripts are calls is here: http://women.debian.org/wiki/English/MaintainerScripts19:29
keesthe "Upgrading" diagram is extremely helpful in understanding when/how the scripts are run19:29
kees[SLIDE 15]19:29
keesafter unpack and install, the postinst runs, and if it blows up, it'll leave the package unconfigured.  you may need to edit it and re-configure.19:30
kees(again, always file a bug if you run into this kind of thing)19:30
kees[SLIDE 16]19:30
keessometimes debugging maintainer scripts is a pain.19:30
keesadding a "set -x" to maintainer scripts can help you see what it's trying to do.  some fail very silently, and this is probably the simplest way to get insight into how they're working19:31
kees[SLIDE 17]19:31
keeswhen something goes wrong during interactive questions (debconf), you can enable debugging to see what debconf is up to.19:32
keessoemtimes a debconf item is misnamed, or wasn't created yet.19:32
keesthese things are also in /var/lib/dpkg/info, with the .config and .template extensions19:32
kees[SLIDE 18]19:32
keesin the worst-case situation, maybe dpkg itself is doing something wrong.  in that case, break out the big guns and run dpkg under strace to see all the syscalls.19:33
keesI like adding "-s 1024" to strace so I can see some more details on "exec" and "open" calls.19:33
keesdpkg has debugging options too, but they're really only for dpkg itself.19:34
kees[SLIDE 19]19:34
keesif you're prompted to remove stuff, just be careful.  :)19:34
keesif you ever see "essential packages will be removed" just say no.  :)19:34
keesyou will almost always wreck your system and need extensive rescue CD help if you drop essential packages.19:35
keesI really like "apt-cache policy [packagename]" to tell me about where a package came from, what versions are available, etc19:36
keesreally handy for debugging issues with software from other PPAs, etc19:36
keesit only looks at your apt sources, which is handy.19:36
keesanother tool I like for undoing insanity is downgrade-all: http://bazaar.launchpad.net/~ubuntu-security/ubuntu-security-tools/trunk/annotate/head%3A/utilities/downgrade-all19:37
keesthis will remove all the third party versions of everything.19:37
keesuse it carefully, but I love it for restoring a system back to a known-good state.  read the downgrade/removal list _carefully_ if you use it.19:37
kees[SLIDE 20]19:38
keesif you need to force a removal, you can do that, but it's best to tell apt-get to attempt to get things back to normal afterwards (apt-get -f install)19:38
keessometimes 3rd party software can get in the way of an upgrade.  or in the way of a normally operating system.19:39
keesrecently I saw someone trying to run the Debian experimental ifupdown package.  if lacked the needed Ubuntu modifications, so it rendered their networking unusable.19:39
keesdowngrade-all fixed that.  :)19:39
kees[SLIDE 21]19:39
mhall119|work< Omar87> [QUESTION] Why do I always get partial upgrades only?19:40
keesso, if you lose power in the middle of an install, or the system hangs, you'll need to try to get dpkg and apt to finish the job once you're booted back up.19:40
keesdpkg --configure -a  is the first step to handle any unconfigured packages19:40
keesand then apt-get -f install  to finish any installations19:41
keesOmar87: partial upgrades?  if that's from update-manager, it's been conservative about doing package upgrades.  (it was mostly made to handle stable release updates and full-distro-upgrades).  For day-to-day use of the devel release, I recommend just "apt-get dist-upgrade"19:41
keesif a package is really hosed, you can manually install it with dpkg19:42
keesif the package _database_ gets hosed, you need to examine /var/lib/dpkg/ and /var/backups19:42
keesthe status and status-old files are imporant.19:42
keesif "status" is corrupted, try using prior versions in its place (status-old, then stuff in /var/backups)19:43
keesI've had to manually repair my status file before when XFS tried to eat my harddrive.  it's a bit crazy, but once you have something mostly sane in "status" again, you can just reinstall any weird or missing packages19:43
kees[SLIDE 22]19:43
keesif your status file is out of date with what actually got installed, you can look at /var/log/dpkg.log and find the package that were installed since your last good status file.19:44
keesthen you can just do an  apt-get install --reinstall $package   for the stuff that got missed.19:44
keeswhen I was trying to restore sanity to a particularly busted machine, I repairs the status file, used downgrade-all, and then did a --reinstall on all the package on the system.19:45
keestook a while, but it was mostly ok after that.19:45
keesdpkg-reconfigure is handy too if a question gets missed or corrupted.19:46
kees[SLIDE 23]19:46
keesin the case of hardware-specific breakage, it gets harder to have people helping you because they likely don't have your hardware19:46
keesvideo and network are the trouble-areas here.19:47
keesI tend to boot older kernels or try earlier Xorg versions.  sometimes you'll need to help find the problem by "bisecting" a source branch and building several versions of a package.19:47
keeshaving a good bug report with all the hardware details helps a great deal.19:47
kees[SLIDE 24]19:48
keeswhen the ABI of a kernel changes, you'll have the older one still installed.  handy to boot from that when a newer kernel breaks something19:48
cjohnston< rmunn> QUESTION: Any advice on how best to report hardware-related bugs? Specifically, which log file(s) would likely be useful to put in the bug report?19:48
kees"apport" and the "ubuntu-bug" tools are very handy for reporting all kinds issues, but especially good for the kernel.19:49
keesrmunn_: answering that now.  :)19:49
keesrunning "ubuntu-bug linux" will gather dmesg output, lspci output, etc.19:49
keesthe "ubuntu-bug" tool tries to include everything that is mentioned on the various wiki pages for Debuging____19:50
keesdmesg and lspci tends to be the most important pieces19:50
keeswe also have the kerneloops handler too.19:50
kees[SLIDE 25]19:50
keeswhen X breaks, it's time to start including all sorts of logs.  again. ubuntu-bug is your friend.  :)  "ubuntu-bug xorg-server" will tend to collect many of the needed pieces19:51
keesfalling back to VESA can help get you back up and running in the meantime.  /var/log/gdm may have clues19:51
cjohnston< n3rd> QUESTION:xorg.conf why no such file in Karmic ? And is there any open drivers for ATI Technologies Inc Radeon HD 3200 Graphics?19:52
kees[SLIDE 26]19:52
keesthis slide is out of date.  NetworkManager is in /etc/init now, so "service network-manager stop" is the way to disable it19:52
keesconfiguration in /etc/networking/interfaces is used by the "networking", "networkinger-interface", and "network-manager" services, so it's the best place to start.19:53
keesalso, network names are remembered in /etc/udev/rules.d/70-persistent-net.rules19:53
keesn3rd: xorg.conf isn't really needed any more because X can autodetect almost everything now.19:54
keeshaving an xorg.conf almost always causes X to misdetect stuff, so instead, it's just been removed.19:54
kees[SLIDE 27]19:54
cjohnston< rmunn> QUESTION: I've had a hard time finding good documentation on network-manager and how it relates to (say) /etc/network/interfaces and the like. Any recommended reading?19:54
keesin a really tight pinch, you can get into your system by changing the grub boot line to init=/bin/sh or by adding "break=mount" to land in the initramfs to debug issues with booting19:55
keesI got very familiar with this while debugging RAID and LVM support :)19:55
keesrmunn: the problem with network-manager is that its integration with Debian-like systems has always been troublesome.  each release it behaves slightly differently, which makes good documentation hard to find.  :(19:56
keesI recommend asking "asac" in #ubuntu-devel, but hopefully it's mostly settled now.  I _think_ n-m will only manage stuff that is "auto" in /etc/network/interfaces19:57
kees(or missing from interfaces)19:57
kees[SLIDE 28]19:57
keesif you're running devel on a remote machine, you're in for a world of hurt if it doesn't boot :)  be careful, get a console server, etc.19:57
kees[SLIDE 29]19:57
keeshere's where to report bugs.  start with "ubuntu-bug $Package" first, and go from there.19:58
kees[SLIDE 30]19:58
keesthat's it from me!19:58
cjohnston< Guillo> QUESTION: What hapen with python-xml this librari don't install?19:58
keesI've only got 2 minutes left, but I'll try to answer that19:58
keesGuillo: I'd start my investigations by looking at what apt-cache has to say.  here's a quick demo:19:59
kees$ apt-cache madison python-xml19:59
keesand I see it's missing.19:59
keesthen I go to launchpad and look for it:19:59
keesI see it's missing since karmic20:00
keesthen I check Debian for it:20:00
keesI see it was removed.20:00
keesand then I read the Debian reasoning for it.20:01
keesgotta go!  thanks everyone!20:01
mathiazallright - let's keep the ball rolling20:02
mathiazkees: thanks for your presentation20:02
mathiazHello everyone!20:03
mathiazMy name is Mathias Gug and am part of the Ubuntu Server team:20:03
mathiazDuring the next (and final) hour of today's Ubuntu Developer week I'll talk about Server related packages.20:03
mathiazThese are packages that usually provide services running in the background as daemon. They should be operating smoothly unattended by the system administrator.20:04
mathiazI'll cover different topics relevant to server packages. I'll answer any questio20:04
mathiazns on the topic after I've covered it before moving on to the next one.20:04
mathiazlet's get started with the first topic:20:05
mathiazLog files20:05
mathiazThe location of log files should be /var/log/package.log or /var/log/package/.20:06
mathiazThe latter version is more frequent for daemons as log files are essential for these programs and multiple logs files are usually created.20:06
mathiazFor example the apache2 package stores all its log files in /var/log/apache2/:20:07
mathiazThe access logs are available in one file while the error log is stored in another one.20:07
mathiazThe Filesystem Hierarchy Standard is followed by Debian and Ubuntu and has a section about the location about log files:20:08
mathiazSince daemons can generate a lot of information while running rotating the logs are important.20:08
mathiazThe package maintainer should provide a default log rotation policy during package installation.20:09
mathiazSome daemons will take care of rotating their logs automatically. Most of them won't though.20:09
mathiazThe recommended way is to include a configuration file for logrorate.20:10
mathiazLet's have a look at the apache2 default logrotate configuration:20:10
mathiazNote that apache2 is reloaded once log files have been rotated. This is a common operation for daemons as they tend to keep their log files opened and need to be told to reopen their log files once logrotate has rotated them.20:11
mathiazThe logrotate configuration file should be installed as /etc/logrotate.d/package-name:20:12
mathiazThere is a debhelper command that can help automate this: dh_installlogrotate20:12
mathiazThe logrotate man page has more information about the options for log rotation.20:12
mathiazLog directories are usually included in the package themselves.20:13
mathiazFor example, /var/log/apache2/ is part of the apache2-common package:20:13
=== test is now known as Guest65958
mathiazHowever they often need to be changed by maintainer scripts:20:14
mathiazIn the postinst, ownership and permissions are updated since daemons usually run as a non-root user:20:14
mathiazLog files should also be deleted with the package is purged:20:14
mathiazMore information about log files can be found in the relevant section of the Debian policy:20:15
mathiazAny questions related to log files?20:15
cjohnston< toabctl_> mathiaz, QUESTION: but the apache2 package does not use the dh_installlogrotate command, right?20:16
mathiaztoabctl_: yes - that is correct20:16
cjohnston< n3rd> QUESTION: Is there a mechanism to replicate server configurations from one machine to another, helps in avoiding reinstalling and setting up all the parameters, for example a machine had20:16
mathiaztoabctl_: if it would, it would be done in the debian/rules file20:16
cjohnston              apache configured with bug tracking system, SCM etc, the same needs to be setup in another machine so it would be easy if we could just replicate the same.20:16
mathiazn3rd: this is a more generic question - related to configuration management system20:17
mathiazn3rd: I'd look into things like puppet, chef or cfengine20:17
mathiazcjohnston: next20:17
cjohnston< toabctl_> QUESTION: does debhelper provide more function to take care for logfile handling? for example package purge..20:17
mathiaztoabctl_: I don't think so20:18
mathiazanything other questions related to log files before we move on?20:18
cjohnstonThat looks like it. :-)20:19
mathiaznope - let's move on to the next topic then:20:19
mathiazConfiguration files20:19
mathiazDealing with configuration files should be guided by the following principles:20:19
mathiaz1. Keep the user modification during upgrades20:19
mathiaz2. Have a default working configuration after package install20:20
mathiazPer the Debian Policy:20:20
mathiazA configuration file """affects the operation of a program, or provides site- or host-specific information, or otherwise customizes the behavior of a program. Typically, configuration files are intended to be modified by the system administrator (if needed or desired) to conform to local policy or to provide more useful site-specific behavior."""20:20
mathiazAll configuration files must reside in /etc/.20:21
mathiazConfiguration files must only be removed on package *purge*, not on package *removal*.20:21
mathiazPackages should not modify configuration files belonging to other packages.20:21
mathiazIn order to have a working configuration file by default the package can either ship a default configuration file or generate one during installation by asking questions to the user.20:22
mathiazThe first option should be used if possible. Shipping a default configuration file as part of the package itself under /etc/ is the easiest way.20:22
mathiazFiles will be considered as conffile by dpkg which will handle them for you during package upgrades.20:22
mathiazThis is appropriate only if it is possible to distribute a default version that will work for most installations, although some system administrators may choose to modify it.20:23
mathiazThis implies that the default version will be part of the package distribution, and must not be modified by the maintainer scripts during installation (or at any other time).20:23
mathiazFor example /etc/apache2/apache2.conf is a conffile:20:23
mathiazIt's installed during the package build via a rule:20:24
mathiazThe other solution to provide a default working configuration file is to generate a valid one during package installation.20:24
mathiazVarious maintainer scripts are used to ask questions to the end user (optional) and then create a configuration file.20:25
mathiazThey will also handle all configuration changes during package upgrade.20:25
mathiazOne option is to generate the configuration file directly in the postinst script as done by the openssh-server package:20:25
mathiazQuite often this is combined with debconf questions.20:26
mathiazThe user is asked for information by the package .config script. The postinst script generates the configuration file according to the user answers.20:26
mathiazAnother great practice for configuration is the use of /etc/package.d/ include directories.20:27
mathiazIf the program supports configuration file inclusion I strongly recommend to ship a default file that include a /etc/package.d/ directory.20:27
mathiazThat often helps other packages to integrate with your program by dropping their own configuration file in the /etc/package.d/ directory.20:27
mathiazFor example apache2 includes a configuration directory in its default configuration file:20:27
mathiazThe apache2 package actually provides multiple .d directories:20:28
mathiazA conf.d for generic options:20:28
mathiazA modules.d (called mods-available) to enable specific modules:20:28
mathiazThanks to this directory packages providing a specific apache2 modules can just ship a configuration file in /etc/apache2/mods-available/. There is no need to edit a configuration file.20:29
mathiazA sites.d (called sites-available) to manage virtual hosts:20:29
mathiazThis is more targeted at sysadmin rather than package maintainers.20:29
mathiazThe apache2 package is a great example to look at how a package can provide the infrastructure to help other packages integrated with it.20:30
mathiazMore detailed about configuration files handling can be found in the Debian policy:20:30
mathiazFor more information about Debconf:20:30
mathiazAny questions related to configuration files?20:30
mathiazQUESTION: how to handle a file which is needed in the directory /usr/share/pyshared/testprogram/settings.py ? just add a symlink from /usr/share/pyshared/testprogram to /etc/testprogram/settings.py ?20:31
mathiaztoabctl_: yes - that usually how things should be done20:32
mathiaztoabctl_: all configuration files should be in /etc/20:32
cjohnston< n3rd> Q: how can i avoid trailing slashes in conf files20:32
mathiaztoabctl_: if programs are not able to handle, that it's advised to use symlink from /etc/ to the expected location20:33
mathiazn3rd: I'm not sure I understand your question20:33
cjohnston< n3rd> Q: why some refer to httpd.conf and some to apache.conf, how exactly they work?20:33
mathiazn3rd: this is specific to how apache2 is working20:34
mathiazn3rd: IIRC httpd.conf is around for historical reasons20:34
mathiazn3rd: apache.conf should include httpd.conf20:34
cjohnston< n3rd> Question : instead of localhost/test, how can i configure apache2 to point localhost:port to test dir in /var/www20:35
mathiazn3rd: that's a support question for apache2 - I won't address it here20:35
mathiazn3rd: I'd suggest to ask the question in #ubuntu-server20:35
mathiazI think that's all for this topic - let'sm ove on20:36
mathiaznext topic: Upstart job20:36
mathiazThe init script subsystem in Ubuntu has seen a lot of activity in the past releases as we're moving more and more to upstart jobs.20:36
mathiazI'll give an overview on some features from upstart that are very helpful in managing daemons.20:36
mathiazUpstart is able to supervise services: if a process dies Upstart can be configured to restart it.20:37
mathiazFor example, the openssh-server upstart job:20:37
mathiazUsing the respawn keywork instructs upstart to restart the sshd process if it disappears:20:37
mathiazUpstart also supports forking daemons and will supervise them correctly:20:38
mathiazSome daemons could also be run in the foreground by upstart:20:38
mathiazAnother strength of Upstart is its dependency system. If a service is restarted other daemons may need to be restarted as well.20:38
mathiazFor example if the portmap service is restarted, gssd and statd will automatically be restarted by upstart as well:20:39
mathiazUpstart has built-in support for oom handling:20:39
mathiazOther features include nicing  and setting limits. See init(5) manpage for more information.20:39
mathiazTraditionally daemon init scripts would source /etc/default/servicename. The default file provides an easy way to customize major options for the system administrator.20:40
mathiazIn Upstart it's suggested to modify directly the upstart job instead.20:40
mathiazUpstart jobs should be defined in debian/package.upstart. They will be automatically handled by the relevant debhelper scripts (such dh_installinit).20:40
mathiazMore information can be found in the init(5) manpage  and the Debian policy.20:41
mathiazAnd don't forget the upstart website at:20:41
mathiazAny question related to upstart?20:42
cjohnston< bullgard> QUESTION: What do you mean by "service" here?20:43
mathiazbullgard: I think this has already been well answered in -chat20:43
cjohnstonThat's all I see20:44
mathiazrmunn_: thanks20:44
cjohnston< zul> QUESTION: when would you use fork and when would you use daemon?20:44
mathiazzul: not sure20:44
cjohnston< rmunn> QUESTION re upstart: How difficult is a typical init-to-upstart conversion? E.g., if I have a package using init scripts, is it usually worth the effort of rewriting its init scripts to use20:45
cjohnston               upstart instead? How much is gained to offset the cost of the rewrite?20:45
mathiazrmunn_: it depends on complex the init script is20:45
mathiazrmunn_: usually it's worth the effort - as there is bunch of new features that upstart handles automatically for you20:46
mathiazrmunn_: and if you do a lot of funky stuff in the init script (like modify configuration files), you can just use the same code in the pre/post-script stanzy in the upstart job20:46
mathiazrmunn_: so quite often you can just copy and paste the code20:46
mathiazall right - let's move on20:47
mathiazNext topic: UFW profile20:47
mathiazThe security team wrote a simple host-based firewall tool named UFW:20:47
mathiazPackage integration is now available by dropping a file in /etc/ufw/applications.d/ to tell ufw how to configure firewalling rules for the services.20:47
mathiazFor example here is openssh-server ufw profile:20:47
mathiazAnd how to install it during the package build:20:48
mathiazFor more information see the ufw wiki page at:20:48
mathiazany question related to UFW?20:49
cjohnstonNone seen20:50
mathiazallright then - let's move on20:50
mathiazNext topic: AppArmor profile20:50
mathiazAnother tool that the security team is maintaining and the proves to be useful for services is AppArmor.20:50
mathiazIt can be seen as an alternative to chroots for daemons.20:50
mathiazFor example here is the ntp apparmor profile:20:51
mathiazIt should be installed in /etc/apparmor.d/path.to.daemon.binary:20:51
mathiazSome care needs to be taken during package upgrade especially when a new profile is introduced as we don't want to break existing systems.20:51
mathiazMore information about migrating a profile can be found on the wiki page:20:52
mathiazAnd you can find more info on the AppArmor wiki page:20:52
mathiazany question related to AppArmor profiles?20:53
cjohnstonNone seen20:53
mathiazok - let's move on20:54
mathiaznext topic: system users20:54
mathiazOne of the Ubuntu goal is to try to run as many daemons as possible as non-root users.20:54
mathiazThat brings the need to create system users. The best practice is to not delete users on package purge. Otherwise the uid could be reallocated, potentially giving access to files from the previous package to the new program.20:54
mathiazFor example the openssh-server postinst creates the ssshd user if the user doesn't already exists:20:55
mathiazIf the daemon requires to be run as root try to write an AppArmor profile for it.20:55
mathiazMore information about system users can be found in the Debian policy:20:56
mathiazAny question related to system users?20:56
mathiaznope - let's move on then20:57
mathiazNext topic: Cron jobs20:57
mathiazCron jobs should installed in /etc/cron.d/ or any of the regular cron directory (ex: /etc/cron.daily/).20:57
mathiazThere is a debhelper script available for packager: dh_installcron.20:58
mathiazThe Debian policy has more information:20:58
mathiazAny questions related to cron jobs?20:58
cjohnstonNone seen...20:59
mathiazallrigh then20:59
mathiazthat's all for now then20:59
mathiazyou can find more information in the following guides:20:59
mathiaz * Debian policy: - http://www.debian.org/doc/debian-policy/ - debian-policy package20:59
mathiaz * Debian Developer's Reference: - http://www.debian.org/doc/manuals/developers-reference/index.en.html20:59
mathiaz * Debian New Maintainers' Guide: - http://www.debian.org/doc/manuals/maint-guide/index.en.html20:59
mathiaz * Ubuntu Policy: - ubuntu-policy package20:59
mathiaz * Ubuntu Package Guide: - https://wiki.ubuntu.com/PackagingGuide/21:00
mathiaz * Mailing lists and IRC channels: - ubuntu-devel@, ubuntu-server@ - #ubuntu-devel, #ubuntu-server21:00
mathiaz * Ubuntu wiki: - https://wiki.ubuntu.com21:00
mathiazAnd one last page that I often use when I have my packager hat:21:00
mathiazthis one outlines the sequence in which maintainer scripts are called21:00
mathiazand with that the first day of the Ubuntu Developer Week is ending21:01
mathiazcome back for more tomorrow, same place at 16:00 UTC21:01
mathiazyou'll learn about java libraries, ubuntu one support, automated server testing and other things21:02
mathiazthanks all and bye!21:02
=== rmunn_ is now known as rmunn
davidboy 21:37
=== vizz is now known as rwx
rzanebr10já começou a aula22:43
rzanebr10alguem sabe das aulas do ubuntu???22:46
ubottuPor favor, use #ubuntu-br para ajuda em português. Obrigado.22:46
rzanebr10IdleOne: There is no problem if I need to talk in english22:48
rzanebr10ubottu: it is ok if it is talking in english22:48
IdleOnerzanebr10: this channel is not fir support22:50
rzanebr10não entendi/22:50
IdleOnepor eso que te dijo de usar #ubuntu-br22:51
rzanebr10mas as aulas são neste canal, sim ou não?22:52
rzanebr10IdleOne: então veja: http://www.ubuntu-sp.org/22:52
rzanebr10e no me deixes olvidar22:54
IdleOnerzanebr10: I don't speak portuguese please type /join #ubuntu-br for more help22:55
IdleOnethank you :)22:55
rzanebr10no problem, we can share ideas about ubuntu in english22:55
rzanebr10or in spanish!!!22:56
IdleOnerzanebr10: I am going to have dinner but if you would like to chat there is also #ubuntu-offtopic (english only )22:56
mercutio22rzanebr10: E ae, oque tá acontecendo?23:03
paultaghowdy mhall11923:14
mhall119not this time!23:14
mhall119hiya pak33m23:14
mhall119I really wish I could use lernid at work, there's gotta be a way...23:15
=== rwx is now known as vizz

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!