=== kermiac is now known as Wile | ||
=== Wile is now known as Wile-E-Coyote | ||
=== Wile-E-Coyote is now known as kermiac | ||
=== lag is now known as Guest33319 | ||
dholbach | good morning everyone! | 07:00 |
---|---|---|
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Current Session: Packaging Training: Fixing Small Bugs In Ubuntu - Instructor: dholbach | ||
dholbach | who do we have here for the Packaging Training session? | 07:00 |
dholbach | … come on, don't be shy :) | 07:01 |
* micahg will be in and out | 07:03 | |
dholbach | hey micahg :) | 07:03 |
dholbach | ok, who else do we have here? | 07:03 |
chilicuil | o/ | 07:03 |
sbronsted | +1 | 07:04 |
dholbach | awesome, seems like not everyone of the 119 folks in here are sleeping :) | 07:04 |
dholbach | Ok… | 07:05 |
dholbach | I had a quick look into Launchpad and found a few easy to solve bugs and I'll show you how to do it | 07:05 |
dholbach | this isn't so much about the exact fix, but the proper way to do it and get it included into Ubuntu | 07:06 |
dholbach | (or at least one way to get it in) | 07:06 |
dholbach | Do you guys have your SSH keys already set up in Launchpad? | 07:06 |
chilicuil | yep | 07:06 |
sbronsted | yep | 07:07 |
dholbach | awesome | 07:07 |
dholbach | for those who read the logs afterwards: | 07:07 |
dholbach | check if you have ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub | 07:07 |
dholbach | if not, run: ssh-keygen -t rsa | 07:07 |
dholbach | (you might need to install openssh-client first) | 07:07 |
dholbach | afterwards, head to https://launchpad.net/people/+me/+editsshkeys and add your ssh key there | 07:07 |
dholbach | alright… with that out of the way, let the real fun begin | 07:08 |
dholbach | please run: | 07:08 |
dholbach | sudo apt-get install --no-install-recommends bzr bzr-builddeb pbuilder ubuntu-dev-tools build-essential debhelper | 07:08 |
dholbach | this will install a couple of tools we'll need in our endeavours | 07:08 |
dholbach | bzr is a distributed version control system that's very well integrated into Launchpad | 07:09 |
dholbach | bzr-builddeb is a bzr plugin that helps with building packages from bzr branches | 07:09 |
dholbach | pbuilder is a tool with which you can build packages locally, in a sane and clean way (kind of what happens in a PPA, when packages get built there) | 07:09 |
dholbach | ubuntu-dev-tools (and devscripts which it pulls in) gives you a set of scripts that are incredibly useful for package maintenance, especially repetitive tasks like updating the changelog, etc. become very pain-free | 07:10 |
dholbach | build-essential pulls in make, gcc and other bits for very basic compilation bits | 07:11 |
dholbach | and debhelper is used in almost every package as a build-dependency - it's very useful to have it around, it automates lots of things in the actual build process | 07:12 |
dholbach | do you have any questions already? | 07:12 |
sbronsted | no | 07:12 |
chilicuil | nop =) | 07:12 |
dholbach | if you do, please ask, or I'll be typing my fingers off and probably bore you to death :) | 07:12 |
dholbach | alright, let's crack on then | 07:12 |
dholbach | to tell bzr who you are and how things work, I did the following | 07:13 |
dholbach | bzr launchpad-login dholbach | 07:13 |
dholbach | bzr whoami "Daniel Holbach <daniel.holbach@canonical.com> | 07:13 |
dholbach | launchpad-login is your personal Launchpad ID (if you're unsure, head to https://launchpad.net/people/+me and see where it redirects you, it's the bit after the "~" in the URL) | 07:14 |
dholbach | and please use your own email and not mine :-P | 07:14 |
micahg | otherwise bzr blame doesn't work right :) | 07:14 |
dholbach | haha | 07:14 |
dholbach | alright, job done, next we edit ~/.bashrc (if you use another shell, please edit whatever file else you need) | 07:15 |
dholbach | and add something like this to the bottom of it: | 07:15 |
dholbach | export DEBFULLNAME='Daniel Holbach' | 07:15 |
dholbach | export DEBEMAIL='daniel.holbach@ubuntu.com' | 07:15 |
dholbach | afterwards, you can just run source ~/.bashrc (or restart the session) and you should be sorted out | 07:16 |
dholbach | now the packaging tools and the distributed development tools should know who you are and will make use of that information in commits and all the rest of it | 07:16 |
dholbach | woohoo | 07:16 |
dholbach | next, please edit ~/.pbuilderrc | 07:17 |
dholbach | and add this to it | 07:17 |
dholbach | COMPONENTS="main universe multiverse restricted" | 07:17 |
dholbach | MIRRORSITE=http://archive.ubuntu.com/ubuntu/ | 07:17 |
dholbach | it will basically make use of all components (instead of just 'main') and default to the standard archive | 07:17 |
dholbach | save the file and run | 07:18 |
dholbach | sudo pbuilder create | 07:18 |
dholbach | … which will take a bit of time | 07:18 |
dholbach | it will set up the initial, minimal build environment which will be re-used for all the local test builds that you do | 07:18 |
dholbach | --- now we're done with preparations --- | 07:19 |
dholbach | just one more word on your development environment | 07:19 |
dholbach | you need to run the latest development release, in our case maverick | 07:19 |
dholbach | it doesn't need to be your main system | 07:20 |
dholbach | you can have it on a spare partition or in a virtual machine or on a separate computer | 07:20 |
dholbach | but you need to be able to test all the stuff in the development release that is currently being worked on | 07:20 |
dholbach | https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases has a lot of information about how to do it and stay sane | 07:20 |
dholbach | are there any questions up until now? | 07:21 |
chilicuil | in the last udw u've told me that I should look at pbuilder-dist if I wanted to create diff chroots, I've done it but it doesnt seem to use the ~/.pbuilderrc, which file should I edit? | 07:21 |
dholbach | hum | 07:21 |
dholbach | let me find out | 07:21 |
dholbach | why doesn't it use ~/.pbuilderrc? | 07:22 |
dholbach | or: how did you notice it didn't? | 07:22 |
chilicuil | coz I've set some vars there and it doesnt use them , for example the place where it puts the results | 07:22 |
dholbach | aha, let me have a quick look at the code | 07:23 |
chilicuil | if u want u can help me to find it out after the classroom I dont want to bother all the nice ppl here | 07:24 |
dholbach | I suggest you have a chat with Laney or RainCT in #ubuntu-motu - they wrote the tool | 07:25 |
dholbach | maybe it's a bug, it's hard for me to tell right now | 07:25 |
chilicuil | I'll do | 07:25 |
dholbach | awesome | 07:25 |
dholbach | any more questions? | 07:25 |
dholbach | alright | 07:26 |
dholbach | on to bugs :) | 07:26 |
dholbach | https://bugs.launchpad.net/ubuntu/+source/phpldapadmin/+bug/609403 is the first one I picked | 07:27 |
ubot2 | Ubuntu bug 609403 in phpldapadmin (Ubuntu) (and 1 other project) "Call to undefined function spritnf() in /usr/share/phpldapadmin/lib/functions.php on line 2180 (affects: 1) (heat: 565)" [Undecided,New] | 07:27 |
dholbach | the analysis of the bug is quite good, so let's see how easy it is to fix | 07:27 |
dholbach | let's get the source code first, so please run | 07:28 |
dholbach | bzr branch lp:ubuntu/phpldapadmin | 07:28 |
dholbach | lp:ubuntu/<packagename> will always get you the source of the latest development release | 07:28 |
dholbach | so at the moment it's identical to | 07:28 |
dholbach | bzr branch lp:ubuntu/maverick/phpldapadmin | 07:28 |
dholbach | first we should check and see if the bug still exists | 07:29 |
dholbach | I had a quick look and it seems to be still there | 07:29 |
dholbach | daniel@miyazaki:~/phpldapadmin$ grep -r spritnf . | 07:29 |
dholbach | ./lib/functions.php:$new_value = spritnf('{SMD5}%s',base64_encode(mhash(MHASH_MD5,$password_clear.$salt).$salt)); | 07:29 |
dholbach | daniel@miyazaki:~/phpldapadmin$ | 07:29 |
dholbach | so let's go and edit lib/functions.php | 07:29 |
dholbach | just search for spritnf and replace with sprintf | 07:30 |
dholbach | depending on what editor you use if will show you visually how it recognises sprintf as a function name (as opposed to spritnf) | 07:31 |
dholbach | at least vi did that for me | 07:31 |
dholbach | ok, now save the file - bug should be fixed | 07:31 |
dholbach | next we should go and document it | 07:31 |
dholbach | for that dch -i should do the job | 07:31 |
dholbach | it'll automatically start the editor with debian/changelog (which is the changelog for the debian/ubuntu releases of the package) | 07:32 |
dholbach | and add a boilerplate entry for us | 07:32 |
dholbach | ok, let's go through the first line one by one | 07:32 |
dholbach | phpldapadmin (1.2.0.5-1.1ubuntu2) maverick; urgency=low | 07:32 |
=== mdeslaur-afk is now known as mdeslaur | ||
dholbach | first up is the package name | 07:33 |
dholbach | in parentheses we have the version number of the package | 07:33 |
dholbach | or in our case of our suggested revision later on | 07:33 |
dholbach | 1.2.0.5 is the upstream version number, so what the phpldapadmin authors released on their web page | 07:34 |
dholbach | the part after the '-' is the package revision | 07:34 |
dholbach | if we split up 1.1ubuntu2, '1.1' is the debian revision we inherited from debian and '2' the revision in Ubuntu | 07:35 |
dholbach | so: upstream released 1.2.0.5, there was revision 1, then 1.1 in Debian and we introduced 2 changes to it | 07:35 |
dholbach | if you review debian/changelog you can see at least the history of what happened in debian and ubuntu regarding the package | 07:36 |
dholbach | ok, moving on: maverick is just the name of the release where you want to upload your package to (current development release always is the default) | 07:36 |
dholbach | urgency=low is the default and rarely changed | 07:37 |
chilicuil | question: can ubuntu revisions have point in between as debian ones? | 07:37 |
dholbach | yes | 07:37 |
dholbach | I think it's mostly used for stable release updates and security updates | 07:37 |
dholbach | normally we just increment by one | 07:37 |
dholbach | in Debian I think it's done similarly, also NMUs (non maintainer uploads, which is a concept we don't have) use those | 07:38 |
dholbach | pretty safe to ignore for now :) | 07:38 |
chilicuil | ok, great =) | 07:38 |
dholbach | let's document our changes now | 07:38 |
dholbach | I just put something in there like this: | 07:39 |
dholbach | * lib/functions.php: fixed typo: spritnf() → sprintf. (LP: #609403) | 07:39 |
dholbach | so first of all I mention which file I changed | 07:39 |
dholbach | then I try to explain what I did there | 07:39 |
dholbach | that's the most important thing: you really don't want others to have to guess why you made a weird change somewhere | 07:40 |
dholbach | or you don't want to have to guess 2 months later yourself :) | 07:40 |
dholbach | we maintain all packages as one big team, so that somebody has a look at your changes later on is not unlikely :) | 07:40 |
dholbach | in our case it should be pretty obvious though | 07:40 |
ansgar | Does Ubuntu introduce patch systems such as quilt in d/rules or switch to source 3.0 (quilt) when they introduce changes to packages that had none before? | 07:41 |
dholbach | ansgar: I wouldn't recommend it - I'd use whatever the package itself uses | 07:41 |
dholbach | ansgar: but I've seen it happen | 07:41 |
dholbach | just to explain: patch systems are used to store patches on top of upstream source code in packages | 07:42 |
dholbach | in this case the package doesn't use any | 07:42 |
dholbach | ok, with '(LP: #609403)' I document where the discussion of the bug happened | 07:43 |
dholbach | or rather discussion of the change | 07:43 |
dholbach | in our case it's very obvious and simple | 07:43 |
dholbach | but you might have to change something and somebody might question later on where the decision and idea came from - in that case it's good to reference a bug report, an upstream commit or a mailing list discussion | 07:43 |
dholbach | also by using the specific format like in '(LP: #609403)' the bug will get closed automatically once it gets uploaded to Ubuntu | 07:44 |
dholbach | with that done, most of our work is done :-) | 07:44 |
dholbach | can you save the file, run bzr diff and paste the output to paste.ubuntu.com and give the link here? | 07:44 |
chilicuil | http://paste.ubuntu.com/473408/ | 07:45 |
sbronsted | http://paste.ubuntu.com/473409/ | 07:46 |
dholbach | chilicuil: not sure if "chilicuil <chilicuil@i.am>" is what you want in there, I'll leave that to you, maybe you need to edit the values in ~/.bashrc again :) | 07:47 |
dholbach | apart from that it looks great | 07:47 |
dholbach | sbronsted: seems you added an additional changelog entry (just edit debian/changelog and remove it) | 07:47 |
dholbach | also does sb@sb-laptop.casalogic.lan not look like a real email address :) | 07:48 |
dholbach | you might want to change it in ~/.bashrc too | 07:48 |
dholbach | apart from that: good work! | 07:48 |
dholbach | awesome | 07:48 |
dholbach | now please run | 07:48 |
dholbach | debcommit | 07:48 |
dholbach | this will commit your changes locally | 07:48 |
dholbach | using information from the changelog entry we just wrote | 07:49 |
dholbach | so it'll automatically pass on info like that it fixes bug#609403, etc | 07:49 |
dholbach | next please run | 07:49 |
dholbach | bzr push lp:~<launchpad id>/ubuntu/maverick/phpldapadmin/fix-609403 | 07:50 |
dholbach | I'd run | 07:50 |
ClassBot | There are are 10 minutes remaining in the current session. | 07:50 |
dholbach | bzr push lp:~dholbach/ubuntu/maverick/phpldapadmin/fix-609403 | 07:50 |
dholbach | '~dholbach' means: use my personal namespace | 07:50 |
dholbach | 'ubuntu' is the distro we're working on | 07:50 |
dholbach | 'maverick' the development release we're working on | 07:51 |
dholbach | 'phpldapadmin' the package in question | 07:51 |
dholbach | 'fix-609403' just a name for the branch | 07:51 |
dholbach | now we need to test our package | 07:51 |
dholbach | please run | 07:51 |
dholbach | bzr bd -- -S -us -uc | 07:51 |
dholbach | this will build a source package from your local branch (so the original upstream tarball, plus the debian/ubuntu changes, plus some descriptional file) | 07:52 |
dholbach | -us -uc will just avoid signing it, it's not necessary | 07:52 |
dholbach | now please run | 07:53 |
dholbach | sudo pbuilder build ../phpldapadmin_1.2.0.5-1.1ubuntu2.dsc | 07:53 |
chilicuil | question: can I run there $ debuild -S -uc -us instaed? | 07:53 |
dholbach | chilicuil: the arguments after 'bzr bd --' are passed to debuild | 07:54 |
micahg | dholbach: good question ^^ ;) | 07:54 |
dholbach | chilicuil: but it will ignore .bzr for example, etc. | 07:54 |
dholbach | 'bzr bd --' is a cleaner way to do it | 07:54 |
ClassBot | There are are 5 minutes remaining in the current session. | 07:55 |
dholbach | alright, for me the build passed | 07:55 |
dholbach | now I would try to install the package, make sure it works and all the rest of it, but we can't cover that here | 07:55 |
dholbach | (the resulting package is in /var/cache/pbuilder/result) | 07:56 |
dholbach | once you're happy with all your testing, you'd run | 07:56 |
dholbach | bzr lp-lopen | 07:56 |
dholbach | in your branch | 07:56 |
dholbach | and it will open the branch's Launchpad page and there you can click 'Propose for merging' | 07:56 |
dholbach | which will give Ubuntu Reviewers the opportunity to review your code changes and merge them into Ubuntu | 07:57 |
dholbach | so to sum up what you need to do to work on a fix is: | 07:57 |
dholbach | - bzr branch lp:ubuntu/<pkg> | 07:57 |
dholbach | - cd <pkg> | 07:57 |
dholbach | # work on the fix | 07:57 |
dholbach | - dch -i (to document it) | 07:57 |
dholbach | - debcommit (to commit locally) | 07:58 |
dholbach | - bzr bd -- -S -us -uc (to build a source package which you can then pass to pbuilder and other tools) | 07:58 |
dholbach | # test-build the package and test it locally | 07:58 |
dholbach | - bzr push lp:<lpid>/ubuntu/<release>/<pkg>/<branchname> | 07:59 |
dholbach | - bzr lp-open | 07:59 |
dholbach | # click 'propose for merging' | 07:59 |
dholbach | DONE | 07:59 |
dholbach | that's not too bad, is it? | 07:59 |
ajmitch | dholbach: thanks :) | 07:59 |
sbronsted | dholbach: thanks :) | 07:59 |
dholbach | do you have any last questions, before I take the dog for a walk and you can ask even more questions in #ubuntu-motu and #ubuntu-packaging? | 08:00 |
dholbach | :-) | 08:00 |
ansgar | And remember to forward the patch upstream after this (if relevant to upstream) ;-) | 08:00 |
dholbach | ansgar! | 08:00 |
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi | ||
dholbach | very important point | 08:00 |
chilicuil | awesome, thx dholbach =) | 08:00 |
dholbach | https://wiki.ubuntu.com/Bugs/HowToFix has more info on when to send stuff upstream and the like | 08:00 |
dholbach | https://wiki.ubuntu.com/MOTU/GettingStarted links to a lot of other important stuff like the packaging guide, ubuntu development procedures and all the rest of it | 08:01 |
dholbach | unfortunately we only got one bug done, but we at least covered a bunch of details in there | 08:01 |
dholbach | https://bugs.edge.launchpad.net/ubuntu/+source/sbackup/+bug/384334 was the other one I picked earlier today | 08:01 |
ubot2 | Ubuntu bug 384334 in sbackup (Ubuntu) "Bad grammar in "Backup Now!" tooltip (affects: 1) (heat: 8)" [Undecided,New] | 08:01 |
dholbach | if there are no more questions right now, I'll leave you be | 08:02 |
dholbach | and thanks a lot for your interest | 08:02 |
kermiac | thanks for the great session dholbach :) | 08:02 |
dholbach | hope you enjoyed it and will enjoy it even more to make Ubuntu even better :) | 08:02 |
sbronsted | dholbach: How often is http://qa.ubuntuwire.org/ftbfs/ updated? | 08:02 |
dholbach | sbronsted: maybe wgrant in #ubuntu-motu knows - I'm afraid I don't know | 08:03 |
* chilicuil is gonna fix 384334 if nobody stop him | 08:03 | |
dholbach | alright my friends - thanks again, all further questions can go into one of the other channels | 08:05 |
dholbach | I'll put up logs later on | 08:05 |
dholbach | byeeeeeeeeeeee | 08:05 |
JoeMaverickSett | was there any session earlier? | 09:04 |
mpounta | yeap | 09:05 |
=== lag is now known as Guest71543 | ||
JoeMaverickSett | where is the log for that? | 09:05 |
mpounta | i don't know, first time i attend here. and i was a bit late too. so i am searching for the log too | 09:06 |
JoeMaverickSett | oh! okie! i'll also try to find it. | 09:06 |
JoeMaverickSett | could someone give me the link of the log for the today's session? | 09:33 |
qwebirc32079 | http://irclogs.ubuntu.com/2010/08/05/%23ubuntu-classroom.txt | 09:33 |
JoeMaverickSett | thank you! qwebirc32079. | 09:34 |
=== lag is now known as Guest27899 | ||
=== yofel_ is now known as yofel | ||
=== Esquire_ is now known as Esquire | ||
=== lag is now known as Guest6225 | ||
=== Guest6225 is now known as lag_ | ||
=== nigelbabu is now known as nigelb | ||
=== lag_ is now known as lag | ||
=== lag is now known as Guest46722 | ||
=== Guest46722 is now known as lag | ||
kosaidpo | hello people | 19:44 |
kosaidpo | is it gmt +1h ight ?? | 19:44 |
pleia2 | @now | 19:44 |
pleia2 | hmm | 19:44 |
pleia2 | Thu Aug 5 18:45:07 UTC 2010 | 19:45 |
pleia2 | the next class is on saturday | 19:45 |
kosaidpo | ohh | 19:45 |
kosaidpo | okies | 19:45 |
kosaidpo | good | 19:45 |
kosaidpo | pleia2: tnx : ) | 19:45 |
pleia2 | sure thing | 19:45 |
kosaidpo | this is my first time : ) | 19:45 |
kosaidpo | i missed those past clases : ( | 19:46 |
pleia2 | logs are online here: https://wiki.ubuntu.com/Classroom | 19:47 |
pleia2 | and if we haven't gotten around to updating that page, they're updated every hour at irclogs.ubuntu.com | 19:48 |
kosaidpo | uhmm its ;07 minutes over here or my pc is wrong | 20:08 |
pleia2 | kosaidpo: the only class today was at 06:00 UTC | 20:08 |
pleia2 | the next one isn't until saturday | 20:09 |
kosaidpo | oh oh oh meanin i missed it already ?? | 20:10 |
kosaidpo | well utc = gmt-1 | 20:10 |
kosaidpo | ami wong | 20:10 |
pleia2 | as far as I know, UTC and GMT are the same | 20:11 |
pleia2 | at the class was at 6AM | 20:11 |
pleia2 | s/at/and | 20:11 |
kosaidpo | ohh | 20:11 |
kosaidpo | okies pleia2 | 20:11 |
kosaidpo | txn | 20:11 |
kosaidpo | have fun people | 20:11 |
kosaidpo | peace out | 20:11 |
=== Roman is now known as Guest29172 | ||
=== ZachK_ is now known as Guest47446 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!