[01:03] hello i need help in ubntu plz [01:10] Matr|X: Ask in #ubuntu, not in here, #ubuntu-classroom is for classes at specific times. [01:11] thx [01:11] sorry [01:15] I'm having a bit of trouble getting the right performance from all but one SATA drives. instead of around 110 mb/s with hdparm -t i get around 50-60 mb/s . Help anyone ? [01:15] Ask in #ubuntu, not in here, #ubuntu-classroom is for classes at specific times. (c) jmarsden|work === fabrice_sp_ is now known as fabrice_sp [07:02] i'm looking for someone who have knowledges of sed [07:21] somaunn, #bash [07:47] techno_freak: thank you === asac_ is now known as asac === lan3y is now known as Laney [13:28] Does anyone have the getting started talk from Monday? It is not on http://wiki.ubuntu.com/MeetingNotes [13:29] CrownAmbassador: the one on this channel? [13:30] istaz: yeah [13:30] (the link you gave doesnt exist) [13:30] CrownAmbassador: I can send you my log if you want [13:30] There it is https://wiki.ubuntu.com/MeetingLogs/devweek0901/GettingStartedEN [13:30] istaz: oops! Should be MeetingLogs [13:32] MarkoKaa: Thanks. Seems like the link to it on the https://wiki.ubuntu.com/MeetingLogs does not work. [13:32] and also you can go to the logs by clicking the topic on https://wiki.ubuntu.com/UbuntuDeveloperWeek [13:34] MarkoKaa: Thanks. [13:34] No problem [13:36] Does anyone know when Pitti will be doing his deleted talk? [15:05] I just packaged my first package. It's 0.6.5 version of typespeed. There is 0.6.4 available on the Ubuntu repos. [15:05] https://launchpad.net/~ape3000/+archive [15:05] It says that it needs building. [15:06] cool :-) [15:06] do you know the process for getting it updated in jaunty? [15:07] Not perfectly [15:08] k [15:08] I think I could send to Debian, since it has also only 0.6.4 [15:08] is there already a bug open on the package about there being a new upstream release? [15:08] that would be great [15:08] I didn't find any bug reports [15:09] ok, the first step is to file one [15:09] I just wanted to practice building and I knew that the version of typespeed isn't the newest upstream version. [15:09] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499133 is the Debian bug about it [15:10] so you can link the reports in launchpad once you have filed the Ubuntu bug [15:12] So what is the package where I file the bug? [15:12] Is it the typespeed source package or Ubuntu? [15:12] the former [15:13] https://bugs.launchpad.net/ubuntu/+source/typespeed/+filebug [15:16] https://bugs.launchpad.net/ubuntu/+source/typespeed/+bug/320484 [15:16] So how do I link the debian bug? [15:22] Ape3000: click on "Also affects Distribution", select Debian, and enter the url I gave [15:59] HELLO EVERYBODY! [15:59] Hi :) [15:59] Who's here for the last day of the week of awesome? [15:59] Who's excited? :-) [15:59] COME ON! :) [15:59] * liw cracks knuckles [15:59] i hope all 144 here are! [16:00] liw: seems like you have a bit of a shy audience today :-) [16:00] Ok... welcome everybody! [16:00] We have the amazing Lars Wirzenius here today and I promise he won't bite [16:00] * weboide is ready for it! [16:00] instead, he'll talk about the fantastic things you can do with piuparts and I hope you enjoy the ride [16:01] questions, as always, go into #ubuntu-classroom-chat please [16:01] and please prefix them with QUESTION: [16:01] if someone wants to volunteer to paste questions to this channel, that would be fabulous! [16:01] ie: QUESTION: liw: why don't Finns hug? [16:01] enjoy the session, liw: the floor is yours :) [16:01] dholbach, thank you, thank you [16:02] :-)( [16:03] so, I'm going to talk about piuparts. Questions are welcome at any time. I've structured this into sections: What is piuparts; basic usage; interpreting the results; speeding it up; testing for newer releasees; gotchas [16:03] if I'm going too fast, or too slow, don't hesitate to tell me [16:03] first section: What is piuparts? [16:03] Piuparts is a tool to test that a .deb package can be installed and removed, and installed, upgraded, and removed. [16:04] It is primarily meant for people who maintain and upload packages. [16:04] It works by constructing a chroot with a minimal Debian or Ubuntu installation, and then installing the package being tested into the chroot. It also installs the dependencies. [16:04] After this is done, it removes and then purges the package, and any other packages that got installed. [16:04] Finally, it compares the state of the chroot before the package and its dependencies were installed, and after they got purged. [16:04] It checks that all files are still there, and haven't been changed, and that there are no new files. [16:04] Obviously, some things will always change, such as log files. Piuparts ignores those. [16:04] any questions so far? anyone getting this at all? [16:05] QUESTION: is this like pbuilder ? [16:05] zerwas, thanks (I was just fighting my irc client to do that :) [16:06] weboide, pbuilder uses a chroot to build a package in a clean environment; piuparts uses a chroot to test that a package installs into a clean environment, so there are similarities, but they are solving different problems with chroots [16:07] I will get back to pbuilder in a bit [16:07] any other questions? if not, I'll continue on to the next section [16:07] second section: Basic usage [16:07] The very basic way of using piuparts is as follows: [16:08] piuparts foo.deb [16:08] where foo.deb is a .deb package you have built. [16:08] Note that this can take a long time, and can produce quite a lot of output. [16:08] You probably don't want to run the command just now. [16:08] Because piuparts builds a chroot, it must run as root. [16:08] Prefix the command with sudo. (But not yet) [16:08] To avoid people accidentally copypasting commands when they shouldn't, I'm not prefixing it in examples. [16:09] The above command will run the install/remove/purge test. [16:09] If the package is already in the archive, it will also test that the package can be upgraded from the archive to the .deb you give. [16:09] The other way of running piuparts is as follows: [16:09] piuparts -a foo [16:09] Here foo is the name of a package, not of a .deb. [16:09] Piuparts will fetch the package from the archive and test it. [16:09] This will, obviously, not test upgrades since there is no newer package. [16:09] If you feel like being evil, you can spend your time worse than running piuparts on all sorts of random packages and filing bugs for serious problems. [16:10] any questions so far? [16:10] continuin... [16:10] You can also test upgrading from release to release: [16:10] piuparts -a -d dapper -d hardy -d intrepid -d jaunty foo [16:10] This will take even longer. [16:11] it will first construct a chroot with dapper, install the package into that, then upgrade the whole chroot to hardy, then to intrepid, then to jaunty, and then remove and purge the package and its dependencies [16:11] QUESTION: can piuparts use pbuilder's tgz chroot images (so to don't create for each tool each set of chroots)? [16:11] ia, yes; I'll show an example in a while [16:12] QUESTION: what version of piuparts should be we use? repos version? dev version? [16:12] weboide, you should use the version in current development version of Ubuntu, by preference, unless that breaks [16:13] piuparts development has not been very fast in the past couple of years, so there are not a lot of versions to choose from that are easily available [16:14] third section: Interpreting the results [16:14] Piuparts outputs quite a lot of text when it runs. [16:14] This is because when I was developing it, it was quite useful to me to see what was going on and figure out when things broke. [16:14] I never got around to fixing things so that it was nice to use for other people. [16:14] (sorry) [16:14] Since the output can be pretty large, up to several hundred kilobytes, it is best to capture it in a file: [16:14] piuparts -l foo.log foo.deb [16:14] The output will go to the named file, and also to the screen. [16:14] Every line of output piuparts outputs is prefixed with a relative timestamp (minutes and seconds since piuparts started), and a log level: DUMP, DEBUG, INFO, WARNING, ERROR, FATAL. [16:15] DUMP and DEBUG you can mostly ignore; unfortunately there is no switch to let you do that at the moment. [16:15] (sorry) [16:15] The useful stuff is in INFO, and in ERROR if it is there. [16:15] Therefore, the way to read a piuparts log file is to grep for INFO and ERROR. [16:15] Then, if those don't make any sense, read DUMP and DEBUG as well. [16:15] When piuparts finishes, it outputs one of two things: either a PASS or a FAIL message. [16:15] They look like these: [16:15] 2m11.0s INFO: PASS: All tests. [16:15] 5m33.8s ERROR: Broken symlinks: [16:15] Obviously these were from different runs. You only get one of them per run. [16:16] I should pastebin some actual log output, just a minute. [16:17] http://paste.ubuntu.com/108624/ and http://paste.ubuntu.com/108625/ are two snippets of an actual log file [16:18] just to give you a taste of what they look like. the beginning and the end. [16:18] QUESTION: How much time does the basic test usually take? [16:19] Ape3000, the second pastebin answers that for the hello package: almost 7 minutes (but that was running inside kvm) [16:19] any questions about interpreting those log files? they're long, but hopefully not too obscure [16:20] next section (is this 12765 already?): Speeding it up [16:20] (everyone's favorite topic) [16:20] It can take a long time to construct the chroot. [16:21] Since most package maintainers use pbuilder, and it constructs a chroot too, piuparts provides the --pbuilder (-p) option to use the pbuiler tarball to create the chroot. [16:21] This makes things much faster. [16:21] QUESTION: Does the chroot have to be created every time? [16:21] On the server I used to use to run piuparts on all packages in Debian, a couple of years ago, piuparts took only a few seconds per typical small package, when using a pre-built chroot tarball. [16:21] Laney, so yeah, some kind of chroot gets created every time. When it is created by unpacking a tarball, it is pretty fast, just a couple of seconds [16:22] except on a netbook, perhaps === smarter_ is now known as smarter [16:22] In addition to -p, piuparts can create its own tarballs. Or you can construct one by hand. But let's stick to pbuilder ones, they're easiest for most people. [16:23] QUESTION: (by Laney) piuparts understands debian and ubuntu releases, right? [16:23] Laney, yes; piuparts just uses apt-get to do stuff, so it is fine with anything that apt understands [16:23] next+1 section: Testing packages for newer releases [16:24] Piuparts can test packages for newer releases of Ubuntu, on older release of Ubuntu, if you use the debootstrap package from backports. [16:24] This way, if your machine runs intrepid, but you want to test that your package works in jaunty, you can. [16:24] okay, I have one final section to go through (Gotchas), and after that you're all ready to actually start running things without ruining things :) [16:25] last section: Gotchas [16:25] Piuparts works on a chroot. [16:25] This means that it does not properly protect the host system. [16:25] A malicious package, or a really unfortunately buggy package, may ruin the host system. [16:25] In the three years since I wrote piuparts, I have had that happen, but it's possible. [16:25] The solution, of course, is to fix piuparts to use KVM. (Volunteers welcome.) Or to run piuparts in a virtual machine (that's what I do now). [16:26] Piuparts can use a lot of CPU, RAM, disk I/O, and network bandwidth. [16:26] Be prepared for that. It's nowhere near as fast to use as, say, lintian. [16:26] Some of the checks piuparts does often fail, but they don't matter much in real life. [16:26] The manual page has lists all options, so you can look there if something annoys you. [16:26] For example, piuparts checks that all symlinks point somewhere that actually exist. [16:26] For some reason, this is triggered fairly often, so you can disable it with the --no-symlinks (-N) option. [16:26] piuparts in Ubuntu defaults to gutsy, since it hasn't been updated since the hardy release to a better default. You can blame me for that. [16:27] Actually, don't blame me, file a bug in Launchpad, and subscribe me to it (liw on Launchpad). [16:27] (Yes, everyone reading this can do that. I can take it.) [16:27] You can work around this by specifying the distribution manually with the -d option: [16:27] piuparts -d jaunty foo [16:27] OK. Go run piuparts now. I want questions. [16:29] So what's the command to test upgradability from the current stable release? I guess -d intrepid -d jaunty foo.deb? [16:30] yep, unless I forget something [16:30] \o/ [16:30] it's possible piuparts can only test upgrades between releases for packages already in the archive, in which case you need to specify "-a foo" instead of "foo.deb" [16:30] I just had this error: E: Couldn't find package debfoster [16:31] weboide, hmm, let me check [16:31] ah, I think we're hitting the difference between "main" in Debian and Ubuntu here [16:32] let me check something [16:34] the problem is that debfoster is in main in Debian (almost everything is), but in universe in Ubuntu, and piuparts was written before I really knew about Ubuntu, so it assumes it's enough to just use main [16:35] so the solution is to tell piuparts to use universe as well as main [16:36] except for some reason, for me the debfoster thing works, so I have a hard time testing, hmm [16:37] oh, I forgot -p [16:37] no wonder it was slow :) [16:37] debugging under public scrutiny does wonders for my humility muscles [16:40] weboide, anyway, the solution should be to specify the mirror for piuparts: -m 'http://your.mirrorhere/ubuntu main universe' [16:40] weboide, could you test that? [16:40] liw: sure [16:43] liw: It just passed the debfoster installation. so it helped :) [16:43] weboide, yay [16:47] any further questions? is everyone busy waiting for their machines to stop churning? [16:48] yep ;) === bac is now known as bac_lunch [16:57] liw: i thought "Thou shalt not paste Unix commands from Finns on IRC into thy shell," was one of the new commandments. [16:58] I think we're just about out of time. Thank you, everyone. If you have further questions about piuparts, I'm often available on #ubuntu-devel and other IRC channels. [16:59] cheers liw! [17:00] I just got it working :D [17:00] Ape3000, yeay [17:01] THANKS for all this liw! [17:03] hello [17:04] I think I'm next :) [17:05] the next topic is "fun with python-apt" [17:05] is there anyone interessted in montioring #ubuntu-classroom-chat for questions while I talk and paste them there ? [17:06] yep... oops :) [17:06] aha, cool. I will just start then - you can ask questions anytime :) [17:06] python-apt exposes most of the functionatliy that apt-get/libapt [17:06] provide via python. [17:06] so everything that apt-get/synaptic and friends can do can be done via python-apt [17:07] lets start with a example to see how scary it really is :) [17:07] Here is a simple example: [17:07] #!/usr/bin/python [17:07] import apt [17:07] cache = apt.Cache() [17:07] pkg = cache["apt"] [17:07] print "name: ", pkg.name [17:07] print "installed version: ", pkg.installedVersion [17:07] (feel free to copy/paste that into a text file and run to see what it outputs) [17:08] This example illustrates the central piece of the libapt system. The [17:08] package cache (availalbe as apt.Cache()). It is a fast representation [17:08] of the data available in /var/lib/apt/lists and is created as a [17:08] mmap-able binary file in /var/cache/apt/pkgcache.bin. It contains [17:08] information about all the available binary packages and [17:08] dependencies. In the python version it behaves like a dict. [17:08] The other piece is the package object. It contains general information [17:08] like name and description, version information and information about [17:08] the status (installed, downloadable, ..). It can also be used to [17:08] manipulate the state of the package. [17:09] Documentation is available via: "pydoc apt", "pydoc apt.Cache", "pydoc [17:09] apt.Package", etc. There is also a (very new and good) website [17:09] available here: [17:09] http://apt.alioth.debian.org/python-apt-doc/ [17:10] any questions so far? [17:11] package can be in a lot of different states [17:11] Here is a example to inspect package states: [17:11] #!/usr/bin/python [17:11] import apt [17:11] cache = apt.Cache() [17:11] print "available packages: ", len(cache) [17:11] for pkg in cache: [17:11] if pkg.isInstalled: [17:11] print "installed: ", pkg.name [17:11] print "num installed: ", len([pkg for pkg in cache if pkg.isInstalled]) [17:12] If I'm going too fast (or too slow) please shout :) [17:12] This shows that the cache can be manipulated in a similar way like a [17:12] regular dict, it should feel "python-ish" :) [17:14] this example again shows that the cache is the central structure, it contains all the package object that can be used to get information about the system [17:15] QUESTION: what is the difference between Package.installedSize and Package.installedPackageSize? [17:15] the package size is the size of the download (the compressed package itself) [17:16] the installedSize is the actual size on disk [17:16] of the unpacked thing [17:16] it may be not 100% accurate because the package may create files in its postinst or other scripts [17:16] but generally its good enough [17:17] Lets do anohter example: [17:17] #!/usr/bin/python [17:17] import apt [17:17] progress = apt.progress.OpTextProgress() [17:17] cache = apt.Cache(progress) [17:17] print "summary: ", cache["apt"].summary [17:17] This shows another important concept. Progress objects. Everytime apt [17:17] does something that takes a long time (like building the caches, [17:17] fetching stuff from the network or installing packages) it can use [17:17] progress objects to give user feedback. There are some text based [17:17] progress objects available that can be readily used. [17:19] those progress object are regular python classes so they can be used as the basis to make fanncier progress information available [17:19] gtk or qt progress would be a example [17:19] currently there is text based progress available in the lib, but the jaunty version already has some gtk based progress widgets available as well [17:19] that should make intergration even easier [17:20] Here is a example how to create your own progress objects: [17:20] #!/usr/bin/python [17:20] import apt [17:20] class MyOpProgress(apt.progress.OpProgress): [17:20] " example class that demonstrates how a progress can be subclassed " [17:20] def update(self, percent): [17:20] print "update: ", percent [17:20] def done(self): [17:20] print "done!" [17:20] progress = MyOpProgress() [17:20] cache = apt.Cache(progress) [17:20] print "summary: ", cache["apt"].summary [17:20] This creates a new class based on the normal progress class that [17:20] overwrites the the functions called by apt. [17:21] information about the methods in the progress code is avialable via "pydoc apt.progress" [17:21] there is also a lot of example code in update-manager or gdebi (big users of pyhton-apt :) [17:22] all good so far? examples working :) ? [17:24] The python-apt system is not limited to querrying but it can also [17:24] perform actions. Here is a example (that needs to run as root) of a [17:24] apt-get update like call: [17:24] #!/usr/bin/python [17:24] import apt [17:24] fetchprogress = apt.progress.TextFetchProgress() [17:24] cache = apt.Cache() [17:24] cache.update(fetchprogress) [17:24] cache.open(apt.cache.OpProgress()) [17:24] Its important to re-open the cache after it was updated (this will [17:24] eventually become part of update() api I think so that it happens [17:24] automatically). [17:25] while the api is pretty solid there are some small warts still (like this open() is required after update()) [17:25] we are working on it :) [17:26] fetchprogress can again be your own class, it just has some more methods that can be overwriten [17:26] We can of course install stuff too: [17:26] #!/usr/bin/python [17:26] import apt [17:26] fetchprogress = apt.progress.TextFetchProgress() [17:26] installprogress = apt.progress.InstallProgress() [17:26] cache = apt.Cache() [17:27] cache["2vcard"].markInstall() [17:27] cache.commit(fetchprogress, installprogress) [17:27] cache.open(apt.cache.OpProgress()) [17:28] the open() is important again so that apt knows about the chanages. you could omit it and save time is the cache is not needed afterwards [17:28] e.g. because your applicaiton exists after it installed something [17:29] (the last line should be cache.open(apt.progress.OpProgress()) - thanks to maxb) [17:30] any change done in the cache is just "simulated" until commit() is called [17:31] by default python-apt will ensure that everything is consistent, i.e. if you install a package in the cache that requires dependencies, it will automatically mark them for install in the cache as well [17:31] This lets us do multiple install/removes too, it will commit [17:31] whatever is currently set in the cache. So its a good idea to inspect [17:31] the cache before we commit changes. This is done like this: [17:31] #!/usr/bin/python [17:31] import apt [17:31] cache = apt.Cache() [17:31] cache["4g8"].markInstall() [17:31] for pkg in cache.getChanges(): [17:31] if pkg.markedInstall: [17:31] print "installing: ", pkg.name [17:31] elif pkg.markedUpgrade: [17:32] print "upgrade: ", pkg.name [17:32] elif pkg.markedDelete: [17:32] print "removing: ", pkg.name [17:32] See the "pydoc apt.package" documentation for all the available [17:32] states. [17:33] python-apt gives you full control over the consistency if you want, you can e.g. prevent it from automatically fixing problem and do that yourself, but its recommended to let it run in autoFix mode :) [17:34] states like automatic dependencies (for apt-get autoremove) will also be done correctly and a commit() will do the right thing and write them out [17:35] Each package has two versions. The installed version (if any) and the [17:35] candidate version. Those can be querried via: [17:35] #!/usr/bin/python [17:35] import apt [17:35] cache = apt.Cache() [17:35] for pkg in cache: [17:35] if pkg.isUpgradable: [17:35] print "pkg '%s': now '%s' candidate: '%s'" % (pkg.name, pkg.installedVersion, pkg.candidateVersion) [17:35] Each package can of course have multiple versions, but apt will show you two by default [17:35] the candidate is the one that you can install [17:35] and the installed is self explaining :) [17:36] the candidate version can be manipulated with the apt policy and by setting it directly, but that again is not recommended, usually its doing the right thing when it calculates the candidate [17:36] usually the candidate is just the higest available downloadable version [17:37] One nice feature of python-apt is that you can give it a alternative [17:37] rootdir to look for status file and sources.list. If you want to know [17:37] what warty loooked like (back in the days) you could do: [17:37] #!/usr/bin/python [17:37] import apt [17:37] import os [17:37] import os.path [17:37] alt_root = "/tmp/warty" [17:37] for d in ["/etc/apt/", [17:37] "/var/lib/apt/lists/partial", [17:37] "/var/lib/dpkg", [17:37] "/var/cache/apt/archives/partial"]: [17:37] os.makedirs(alt_root+d) [17:38] open(alt_root+"/var/lib/dpkg/status","w") [17:38] open(alt_root+"/etc/apt/sources.list","w").write("deb http://old-releases.ubuntu.com/ubuntu warty main") [17:38] c=apt.Cache(rootdir=alt_root) [17:38] c.update(apt.progress.TextFetchProgress()) [17:38] c.open(apt.progress.OpProgress()) [17:38] print "warty apt version: ", c["apt"].candidateVersion [17:38] in this example first a bit of directory structure is created (that should probably go into the lib itself) and then the alternative rootdir is created [17:38] the cache then reads the information from there instead of the main system [17:39] this is handy in some situations, e.g. to debug stuff or to calculate differences in the packages between multiple version or for history interesst or or .) [17:41] you could do e.g. a daily "whats new available in jaunty" thing with it while still runing hardy etc [17:41] you may have noticed that the apt.package.Package object does not expose everything there is in a package record [17:42] (the package record is the stuff that is output via apt-cache show package) [17:42] e.g. apt-cache show apt has a task field [17:42] that is not exposed there [17:42] or the bugs field [17:42] the reason is that in the mmap struture only the most important information is represented [17:42] for performance reasons [17:43] but the information is still available, its just a little bit slower when checked :) [17:43] (and a lot slower if you querry every package with the full record instead of the mmap-ed struture) [17:43] The package object does not expose all fields of a package, just the [17:43] most important ones. To access the others, there is the package [17:43] "Record". It contains the full content of the Packages entry for the [17:43] particular package. It can be accessed as a dict or as a string. Here [17:43] is a example: [17:43] #!/usr/bin/python [17:43] import apt [17:43] cache = apt.Cache() [17:44] pkg = cache["synaptic"] [17:44] print "Bugs entry: ", pkg.candidateRecord["Bugs"] [17:44] print "Full record: ", str(pkg.candidateRecord) [17:45] This covers the most important aspects of the python-apt high level [17:45] interface. [17:45] more examples (of mixed quality :P are availalbe in the python-apt examples folder: [17:45] /usr/share/doc/python-apt/examples/ [17:45] There is also the aptsources interface to manipulate the sources.list [17:45] and the low level apt_pkg and apt_inst interfaces that provide a [17:45] direct mapping of the underlaying C++ interface of libapt to python [17:45] (and its not very python-ish :). apt_pkg/apt_inst is used to implement [17:45] the higher level apt interface. [17:46] apt_pkg is nowdays no longer needed for most tasks, the apt interface covers most of it [17:46] apt_pkg does not follow PEP08 (the python code style guidelines) and is generally a bit "rough" [17:46] so only use it if you really need it :) [17:46] otherwise use "import apt" [17:47] Developement power is always welcome! Projects that use python-apt are [17:47] update-manager, gnome-app-install, gdebi, software-properties and [17:47] more. If you are interessted in hacking on python-apt (or any of the [17:47] tools that use it) you are very welcome to do so. The code is [17:47] maintained in bzr. [17:47] that was my overview about python-apt - any questions? [17:47] or suggestions? [17:50] if there are none, thank you very much for your attention and I hope you have enjoyed it :) [17:52] thanks alot, very helpful [17:52] let me answer the packagekit question first [17:53] packagekit is currently in universe, we plan to move it to main for jaunty, but we can not use it for everything [17:53] the problem is basicly that packagekit does not allow anything like debconf during installation [17:53] that is fine most of the time [17:53] but there are packages that require some form of interaction, otherwise they fail to install [17:54] thing of virtualbox (at least that used to need it) [17:54] or java [17:54] or stuff like this [17:54] so we will use it for some stuff were we know its save to use [17:54] but not for e.g. update-manager where it maybe any package (including those that require debconf) [17:55] but packagekit is really something on top of python-apt, its a layer higher [17:55] (in fact, the packagekit backend for apt is implemented using python-apt :) [17:55] QUESTION: i take it getting the apt.Cache() locks the cache file? if so how do i release it for other apps [17:56] threre are the "apt_pkg.PkgSystemLock() and apt_pkg.PkgSystemUnLock()" calls for this [17:56] if python-apt is used as non-root then no locking is needed, that is the safest option :) [17:57] gdebi for example only switches to root for the actual installing, everything else is done as the user [18:01] a last note. a pretty nice overview over the apt system is here: http://algebraicthunk.net/~dburrows/blog/entry/images/apt-diagram-simple.png [18:05] Next up is rockstar and beuno with "Bazaar and Launchpad - How to do it". [18:05] Rock on guys! [18:05] Hi everyone. My name is Paul Hummer, and I work on the Launchpad Code team. Also with me is my cow orker, Martin Albisetti, who is awesome in his own rite. [18:06] Today we're going to be talking about some good principles and practices for using bzr with Launchpad. Most of these things are only suggestions, but I would say that they are very STRONG suggestions. [18:06] First, some pre-requisites... [18:06] * beuno waves [18:07] If you're not using bzr from the bzr ppa, you REALLY should be. [18:07] It can be found here: https://edge.launchpad.net/~bzr/+archive/ppa [18:07] This will make sure you're getting the best out of Bazaar, and in effect, the best out of Launchpad. [18:08] I'm not sure if emmajane covered this in her session, but I can't stress enough the importance of setting your name in bzr. [18:08] You can do this at the terminal by typing `bzr whoami` first. [18:09] If I were to type that on this system without configuring it, it would return , as my system user is rockstar, and my system name is megatron. [18:10] If it returns a to you, you need to configure it. [18:11] So you'll need to type `bzr whoami "Paul Hummer ...apply [18:11] Now bzr will know who attribute your revisions to. [18:12] sorry for the interrupt, you mean `bzr whoami "Paul Hummer ` ? [18:12] `bzr whoami "Paul Hummer "` [18:12] Thanks for the clarification beuno [18:12] holloway, please head over to #ubuntu-classroom-chat for questions [18:13] apw, asked: QUESTION: is bzr whoami global or per checkout? [18:13] Er, holloway, thanks. [18:13] yeah sorry [18:13] answer: global, although you can specify it per branch additionally [18:14] apw, yes, what beuno said. ~/.bazaar/locations.conf is where you'd set it per banch. [18:14] s/banch/branch [18:14] It's important that the email address you set here is one that Launchpad knows about (and it's confirmed). [18:15] Launchpad will then look at those revisions, and say "I know this email address! It belongs to X user!" [18:15] Then, when you look at a branch's revisions, the ones that belong to you will be linked to your account. [18:16] And, for those who are karma happy, you'll get karma for the revisions that belong to you. [18:16] So, let's get on to the Launchpad part. [18:16] You've got your project all set up, with it's accompanying branding bling, and now you're ready to make it host some code. [18:17] For the next few examples, I'm going to use my username and a project I work on called Entertainer. [18:17] So I have a branch that I'd like to be considered THE entertainer branch. It's the one that releases will be cut from. [18:17] Inside that branch I'll type `bzr push lp:~rockstar/entertainer/trunk` [18:17] This will push up a branch of entertainer called trunk [18:18] Now I need to make launchpad reflect that this is the Entertainer "trunk" [18:18] I do that by setting it as the "Development Focus" [18:18] This has a few side effects. [18:19] The first is that I can now branch that same branch by typing `bzr branch lp:entertainer` [18:19] Launchpad knows the development focus branch is lp:~rockstar/entertainer/trunk and so that's the branch I end up with. [18:20] < apw> QUESTION: how did you tell it that it was the Development Focus, was that a ticky somewhere in LP ? [18:20] Also, when new users come to hack on my project (because that's Launchpad's best thing about it), they'll know where to focus their efforts. [18:21] apw, if you go to https://edge.launchpad.net/entertainer you'll see a link that says trunk (focus of development) [18:22] Click on that, and you'll see a link to the "trunk" branch. [18:23] On the right hand side, you'll see a Link to branch link. [18:23] That's how you would set it. [18:24] I need to add a caveat here. It's best to have you trunk branch owned by a team (this will require creating a team). [18:24] This way, you don't block development landings when you go on vacation for two months. Other members can merge branches into trunk while you're gone. [18:26] Alright, moving on... [18:26] Now we have the "trunk" set up. [18:27] I'm going to context switch to act as a user named cthulu on Launchpad. [18:27] I come to the entertainer project and I want to hack on it. [18:27] The first thing I want to do is to get a local mirror of trunk. [18:28] I'm late [18:28] The benefit of a local mirror of trunk is that it doesn't require internet connections to create a new branch. [18:29] So I `bzr branch lp:entertainer` and now have a local branch called entertainer. [18:29] So I branch from that one to fix bug 1234567 by doing `bzr branch entertainer bug-1234567` [18:30] I can then go into the bug-1234567 branch, and push it to Launchpad by doing `bzr push lp:~cthulu/entertainer/bug-1234567` [18:30] 16:25 < DoruHush> QUESTION: How a sub-branch of a main branch of a project get registred. What steps a user should to register a sub-branch (his working bzr [18:30] branch in Launchpad, not localy ) ? [18:30] 16:26 < DoruHush> like another branch in a team project [18:31] I blogged about some configuration settings that I use to make pushing simpler here : http://theironlion.net/blog/2009/01/13/using-bazaar-launchpad-making-pushing-easy/ [18:31] DoruHush, I think what you're asking is what I just went over. Do you have other questions? === bac_lunch is now known as bac [18:32] The branch for bug-1234567 is now registered with Launchpad as a hosted branch (notice I didn't have to use the Web UI at all. Launchpad is so s-m-a-r-t) [18:32] < postalchris> Is the bug-XXXX branch name magically recognized by Launchpad, or are you using that as a personal convention? [18:32] Personal convention really. [18:33] However, this would be a good time to note a cool way to link your branch to a bug. [18:33] So I (as cthulu) hack and commit a few times, and finally get the code that fixes bug 1234567. [18:34] So when I commit, I'll type `bzr commit --fixes=lp:1234567` [18:34] When that revision gets pushed, it'll automatically link the branch to the bug. [18:35] newz2000> QUESTION: is there a convention you use when working on new features not driven by bugs? [18:35] newz2000, not really. [18:35] newz2000, for instance, I just created a branch called "do-some-important-things-with-unicode" [18:36] Branch names are only limited by your own creativity. [18:36] I suggest leaving out cursewords unless the branch absolutely warrants it. :) [18:37] james_w also notes "for the packagers amongst you if you use changelog bug closing and debcommit then (from intrepid onwards) the links will happen magically" [18:37] Alright, moving on. [18:38] So now cthulu has his branch all completed, with tests (because he wrote his tests first, right?), and he wants to see his work land in mainline. [18:38] Mainline being "trunk" [18:39] cthulu, however, doesn't have write privileges to trunk, and, frankly, teh Entertainer dev process is a little less "Wild west" with their commits. [18:39] We require code reviews and all that. [18:40] Looking at his branch page on Launchpad, cthulu then clicks "Propose for merging into another branch" [18:41] He then follows the form through, setting it to land on trunk, and, since the Default Reviewer is set to Entertainer-Releases, he doesn't have to mess with that. [18:41] Although, when I have a Launchpad branch that introduces new ui, I usually will request beuno to look at. He's awesomer than me at that stuff. [18:42] So now there's a new merge proposal showing cthulu's bug-1234567 branch as the "source branch" and lp:entertainer as the "target branch" [18:43] < apw> QUESTION: if i commited something --fixes=lp:123456 how can i see that in bzr on my branch? [18:43] apw, on Launchpad, when you view either that branch or that bug, you'll see a link to the other. [18:44] nothing on my local branch copy? [18:44] apw, not sure actually. I've never had to do that. beuno? [18:44] apw, I don't think we expose that through the command line [18:45] it's hidden meta-data that you can get out through the API [18:45] apw, I think I could probably whip together a plugin for that data later. [18:46] Alright, moving on to the review process. [18:46] I (as myself again) get an email that there's a branch proposed for merging. [18:47] First I get really excited to see a new contributor. [18:48] Then I'll look at the branch, and usually look at a patch by doing `bzr merge lp:~cthulu/entertainer/bug-1234567` in my trunk mirror, and then `bzr diff` to look at the diff. [18:48] Soon, Launchpad will generate that diff for you. [18:49] I'll make comments and suggestions, and then I'll give it a vote. For this example I'll vote "Needs Fixing" [18:50] cthulu will then respond with justifications on why he did things the way he did, and fix the code to follow the Entertainer coding conventions. [18:50] After I look at it again, I see the changes made, and I change my review vote to "Approve" [18:51] At this point, the branch is ready to be merged. [18:51] However, my band had an emergency tour to go on with my favorite band ever, so I disappear off the face of the planet for 6 months. [18:52] Not to worry though, because there are other members of entertainer-releases that can merge (or "land") cthulu's changes into trunk. [18:54] They do this by merging his branch into their local mirror copy, committing it (with a detailed commit message), and then pushing it up. [18:54] Any questions? [18:55] I should also mention that if you're prototyping something, and it doesn't have a project in LP, you can push what we call a "junk branch". [18:56] We don't call it "junk" as a judgment of your coding skills, but because it's either going to become a project, or just scratch your itch. [18:56] < ia> QUESTION: how to create project at launchpad, so anyone else could download source via "bzr branch lp:", not via "bzr branch [18:56] lp:~/+junk/"? [18:56] You can push a junk branch by doing "bzr push lp:~rockstar/+junk/total-hack" [18:57] ia, creating a project is a pretty easy process. https://edge.launchpad.net/projects/+new [18:58] Then just pick up where I started in this session. [18:58] Any other questions? [18:59] Also, if a project you like is using CVS or Subversion, but won't give you access to their repo, you can set up an import branch. [19:00] Import branches sync a CVS or SVN trunk to a bzr branch that you can branch from and hack on. [19:01] This way, when you submit a patch to upstream, you also have a versioned path to creating that patch, instead of just having an svn checkout or something. [19:01] < LaserJock> QUESTION: so do you do all the code review via email? [19:02] * beuno doesn't [19:02] LaserJock, I do most of my code reviews via email, because I like to use Vim as I review a patch. [19:02] < LaserJock> QUESTION: is there any real advantage to using a vcs-import instead of bzr-svn? [19:03] LaserJock, but I sometimes use the web interface. [19:03] LaserJock, well, the real advantage is that a vcs-import will stay synced for you, instead of you having to sync it yourself. [19:04] rockstar: assuming the vcs-import stays in sync, right [19:04] LaserJock, they usually do once the initial import is over. [19:05] There is some work being done to the import system to make it even more robust. [19:05] .. I'll leave that one alone then ;-) [19:06] The import system uses cscvs (https://edge.launchpad.net/launchpad-cscvs) to import. Patches welcome. [19:07] QUESTION: In terms of migrating a project to bzr/launchpad, is it possible to import the code from git and preserve all commit history? [19:07] I know there is some work being done on bzr-git (/me looks at jelmer), but currently, the only way to import is using fastexport/fastimport [19:08] Launchpad is planning on supporting git imports this year. [19:10] Alright, thanks everyone! [19:10] thanks! [19:11] Anybody know anything about the time of "Debugging program crashes by pitti"? [19:11] * BenC wonders if there is a moderator, or should I just jump in [19:11] Thank you rockstar, beuno! [19:11] We now have BenC with "Packaging Kernel modules with DKMS." [19:11] The stage is yours, Ben. [19:12] iulian: Thanks [19:12] * Arc applauds for BenC [19:12] was this discussion logged anywhere? [19:12] crashsystems: It can be soon fount here: https://wiki.ubuntu.com/MeetingLogs/devweek0901/BzrAndLp [19:12] I have to start off by saying that because of last minute schedule changes, I'm going to have to keep this short and sweet :) [19:13] So this sessions is about DKMS, and using it to package kernel modules... [19:13] thank you [19:14] DKMS is a program that allows you to easily manage sources for modules, and have them automatically build against the kernel you are running/installing [19:14] Generally it's used by users so they can have third party modules, and have those modules stay in sync with the kernel provided by your distro [19:15] But we also use it for modules provided by vendors, especially those where there is a binary blob or other closed source portion (e.g. broadcom, fglrx, nvidia) [19:15] http://kernel.ubuntu.com/~bcollins/dkms-presentation/ [19:16] At the above URL, you can find a presentation I did awhile back, and an example dkms package created for the presentation [19:16] * BenC pauses for questions... [19:18] Ok, I guess I'll go into some details of the package itself [19:18] The source is always installed as /usr/src/- [19:19] the package registers this with dkms during postinst [19:19] in the above directory is a dkms.conf file that describes the module and how it needs to be built [19:20] When the kernel is upgraded (or specifically, when the headers are upgraded) a script installed by dkms is triggered, and checks if any of the modules need to be rebuilt [19:22] * BenC is assuming people interested in the kernel are already out drinking right now [19:24] Great, that will let me wrap things up quick so I can take care of some other things... [19:24] Last chance for questions... [19:25] Ok, thanks for having me...have a great weekend everyone [19:26] BenC, you should write this up in a text file somewhere, so people can read it later... [19:26] it is a join/part mess now [19:26] thanks BenC [19:48] . [20:01] Hello Folks :) [20:01] hi [20:02] A coworker of mine is just showing me Xubuntu running on some ARM hardware. :) Pretty neat. [20:03] Anyhow, today I'm here to chat about Xubuntu === kahrn_ is now known as kahrn [20:04] I'm going to cover some of the upcoming changes in Jaunty, how you can take part in making those changes, and then I'm going to hand things off to charlie-tca [20:04] * charlie-tca waves [20:04] charlie-tca will talk to you about how to get involved in Xubuntu via testing and QA efforts [20:05] So, first, lets start off with what I'm sure most Xubuntu users would like to hear about... Xfce 4.6. [20:05] We currently have Xfce 4.4.3 uploaded to Jaunty and backported to Intrepid. We're currently working on preparing and uploading the third beta of Xfce 4.6. [20:05] Xfce 4.6 will be the next major release of the Xfce desktop [20:05] environment. The previous release was 4.4 with the last bugfix release [20:05] being 4.4.3. [20:06] Xfce 4.6 comes with a lot of new components, some of them replacing old [20:06] code and some of them being completely new. [20:06] [20:06] Replaced components: [20:06] * libxfce4mcs => xfconf [20:06] * xfce-mcs-manager => xfconf, xfce4-settings [20:06] * xfce-mcs-plugins => xfce4-settings [20:06] * xfce4-mixer => xfce4-mixer (rewrite) [20:06] * xfce4-appfinder => xfce4-appfinder (rewrite) [20:06] [20:06] New components: [20:06] * libxfce4menu (used by xfdesktop and xfce4-appfinder) [20:07] Lets take a quick look at some of the changes: [20:07] While Xfce 4.4 shipped a centralized settings storage system with [20:07] dynamically loaded plugins, 4.6 features a D-Bus based settings [20:07] daemon (xfconfd). All settings dialogs are just standalone [20:07] applications now which makes the whole platform more flexible. You [20:07] can now much easier write a settings dialog and remove/add [20:07] components from/to Xfce. [20:08] In addition to xfconf and the settings dialogs being ported to [20:08] xfconf, there will also be tools addressed to users who would you [20:08] like to have direct access to the settings. There is a shell [20:08] application xfconf-query which allows to list/get/set properties [20:08] and a graphical settings editor is in development and will most [20:08] likely be part of 4.6 as well. [20:08] So scripting your desktop will become super-duper easy in Xubuntu. [20:09] One major complaint I hear is about keyboard shortcuts in Xubuntu, luckily Xfce4 developers have addressed that too. Xfce4 developers have tried to make the keyboard shortcuts settings more [20:09] transparent to the user. Shortcut themes have been completely [20:09] dropped and there are dialogs now which help resolving conflicting [20:09] shortcuts between xfce4-settings (command shortcuts) and xfwm4 [20:09] (window manager shortcuts). [20:09] Any questions thus far? [20:09] Okay, awesome. [20:10] Another major complaint was the menu! [20:10] In 4.4 xfdesktop used a pseudo-fd.o-compliant menu system. In 4.6 [20:10] this is replaced by libxfce4menu which aims at implementing the [20:10] fd.o menu spec. It's still in development but covers enough of the [20:10] specification already to replace the old code. [20:10] The volume control (xfce4-mixer) has also been replaced with a [20:10] completely new mixer based on GStreamer 0.10. This removes the need [20:10] to maintain support code for different sound architectures and also [20:10] provides some new features. [20:12] QUESTION:will xubuntu continue to be supported by low machines (~192 RAM)even though applications are growing? [20:14] This is a difficult question to answer. I'd certainly like to see Xubuntu attempt to maintain a lightweight, responsive feeling. Unfortunately, performance degradation in Xubuntu often has to do with low-level components such as X and the kernel. [20:14] However, there has been changes made in Jaunty that will hopefully see a faster login to desktop time. [20:15] QUESTION: What "different sound architectures" did you have in mind? [20:15] bullgard4, since the new xfce4-mixer uses gstreamer, it no longer has to maintain code for different sound architectures like alsa, esd, etc. Gstreamer takes care of it. [20:16] Anyhow, if you'd like to see some videos of Xfce 4.6 in action, an Xfce4 Developer has posted some here:http://lunar-linux.org/~jannis/videos/xfce/ [20:16] Some other enhancements that we're making to Jaunty include: [20:16] * Samba browsing via Thunar [20:16] You can take a look at a screenshot here: http://cody.zapto.org/screenshots/xubuntu_delivers_samba.jpg [20:17] * GIO Mount Manager [20:17] * And other improvements to thunar such as a meta-data pane [20:18] You can take a look at a screenshot here:http://cody.zapto.org/screenshots/Screenshot%20-%20thunar4.png [20:18] * Search in Thunar [20:18] You can take a look at a screnshot here: http://cody.zapto.org/screenshots/Screenshot%20-%20thunar2.png [20:18] QUESTION: Will old plugins to Thunar and Panel work? [20:18] TheSheep, yes [20:19] The next item on my list of things to discuss with you guys today is getting involved. [20:19] Getting involved in Xubuntu is easy and fun! :) [20:19] To start, simply sign up on our xubuntu-devel mailing list and join #xubuntu-devel on Freenode [20:20] We're a friendly bunch and enjoy helping folks learn the ropes :) [20:20] There are tons of opportunity to take initiative and make your mark. [20:21] Packaging, artwork, evangelism, coding, web design, documentation writing, etc. you name it. [20:21] :) [20:21] Not to mention bug triage and testing! [20:21] charlie-tca, :) [20:21] Thank you, cody-somerville [20:22] I am the lead for Xubuntu QA, Testing and Bug Triage. [20:22] Xubuntu is an ideal candidate for old or low-end machines, thin-client networks, or those who would like to get more performance out of their hardware. [20:23] Also, Xubuntu is the Xfce-based distribution with a native 64-bit architecture. We produce both a 32-bit and 64-bit versions. [20:23] We also produce ports for the Mac PowerPC and Sony PlayStation 3. [20:23] Along with producing those versions comes testing to make sure the distribution actually works. [20:24] The goal is to have each image tested thoroughly before release. Being a small group, that becomes difficult at times. [20:24] To accomplish this testing, almost any hardware will work. I personnally favor a PIII myself. [20:25] I do not use any restricted drivers, and normally get 1400x900 resolution out of these machines. The cpu is only 866MHz. [20:25] We have information on the xubuntu developers wiki at https://wiki.ubuntu.com/Xubuntu/Testing/TestingInfo for testing Xubuntu. [20:25] Since it is Xfce-based, many of the tests are unique to Xubuntu. We also use Thunar for the file manager and Listen for music. [20:26] We maintain a short test case for daily images, to allow a quick test to be done. This test is also used for the liveCD testing and shouldn't take more than about 5 minutes to complete. [20:26] We also maintain a longer, more involved test for milestone releases. This allows more thorough testing before the users get the image. [20:27] When testing the images, results are reported on the qa tracker. This allows the Ubuntu QA team to know the images are good or bad, also. [20:28] Most of the bugs we find in Xfce are forwarded upstream to http://bugzilla.xfce.org/ [20:29] OpenOffice.org is not included as a default in Xubuntu, so we handle most of the Gnumeric and AbiWord bugs too, since those are the default applications. They are both very powerful for the user, yet lightweight. [20:29] We have provided procedures for forwarding Xfce and AbiWord bugs upstream. These procedures help to smooth the processes greatly. [20:30] We work very close with xfce, abiword and gnumeric bug teams to help resolve the bugs found. [20:31] We have some really exciting things happening, with Xfce 4.6 coming! We will be the first distribution running this, and will be doing extensive tests to make sure it works. [20:31] we welcome anyone who would like to assist in development, testing, and bug triage! [20:32] Any questions? [20:34] QUESTION: What do I do when I find a bug? [20:35] I did leave that out, didn't I. There is information on https://wiki.ubuntu.com/Xubuntu/Bugs for filing bugs found in Xubuntu testing. [20:35] We do report bugs found through launchpad. [20:36] We also try to make sure the bugs are forwarded upstream when needed. [20:36] QUESTION: Is XFCE 4.6 planned for Jaunty, then? [20:37] At this time, we are planning to include it in Jaunty. [20:38] The beta 3 is being packaged for us at this time. Hopefully, I get to test it before the Alpha4 release. [20:41] charlie-tca: GNOME is there because many users like it.Why don't they choose to take XFCE instead? [20:42] Great question! I used Gnome and Ubuntu desktop in the past. I found that on my older equipment, Gnome would react much [20:43] too slow for my uses. I could firerox by itself, with at most 4-5 tabs. [20:43] I had to replace OpenOffice.org apps with AbiWord and Gnumeric. [20:44] Xubuntu comes ready for me to use on that same equipment. I can now use the system without replacing many of the applications. [20:45] Xubuntu's lower memory requirement and use of light weight applications fit the older hardware very well. [20:47] Any more questions? [20:47] I think that for anyone trying it, you will find that Xubuntu gives excellent performance with no loss of applications. [20:49] We maintain the same release schedule as Ubuntu, and did release Hardy Heron 8.04 as an LTS. [20:50] Since we are using the same repositories as Ubuntu, Xubuntu is as up to date as Ubuntu. [20:50] QUESTION: when will be xubuntu 8.04.2 available ? [20:51] Due to the packaging requirements, Xubuntu will not be releases as .2 ; however, if you update your system, it is automatic. [20:52] The .2 release is simply Ubuntu 8.04 with the latest updates to the point of the .2 release. [20:53] charlie-tca: ok. so the last spin was xubuntu 8.04.1 [20:53] Yes, the last 8.04 spin was .1 [20:54] And, it will probably stay as the 8.04.1 through it's lifetime. Our images are built by the same team, and do use most of the same software. [20:58] I would like to thank everyone for participating! Have a great day! [21:00] Thank you cody-somerville, charlie-tca. That was very interesting. [21:01] OK, so I'm afraid I will have to say that this is the end of Ubuntu Developer Week. [21:01] I would like to thank you all for participating and have a wonderful weekend! [21:01] I am sure you all had a great time! [21:31] iulian: multsumesc!