/srv/irclogs.ubuntu.com/2008/09/05/#ubuntu-classroom.txt

=== hggdh is now known as hggdh|away
spiritssightany one recommend a good Dynamic DNS provider for website that uses gmail for the mail and a desktop for the webserver with a dynimic IP and also has ssl cert also has more then one subdomain I want to use and have show in the address by our own domain02:15
zhaowmhello02:45
krazy_linux_guyQUESTION: hi! Any idea when the logs for the previous sessions would be available?05:07
=== thekorn_ is now known as thekorn
Wiebren';08:23
=== dholbach_ is now known as dholbach
=== hggdh|away is now known as hggdh
=== david is now known as davfigue
=== daubers_ is now known as daubers
jcastroHi, everyone ready for today's sessions?17:00
mdzI am :-)17:00
flutefluteMe too!17:00
rick_h_wooooo17:01
krokosjabliko/17:01
lagawhat is today's session?17:01
geserlaga: ask mdz17:01
mdzhttps://wiki.ubuntu.com/UbuntuDeveloperWeek17:01
jcastroOk, today we're starting off with "Ask Matt" ... Matt will introduce himself and explain what he does17:01
lagaah, right.17:01
jcastroplease ask your questions in #ubuntu-classroom-chat17:01
mdzhello, everyone17:01
jcastroprefixed with QUESTION: and I will paste them here17:01
jcastrotake it away mdz!17:01
mdzmy name is Matt Zimmerman17:02
mdzI've been involved with Ubuntu since its inception, and currently serve as the chairman of the Technical Board and as Ubuntu CTO for Canonical, Ubuntu's corporate sponsor17:02
mdzI'm happy to take questions about Ubuntu itself, its development, or Canonical17:03
jcastro< krokosjablik> QUESTION: What are the current plans to provide more stability in the LTS releases  (http://brainstorm.ubuntu.com/idea/7862/)? In reletaion to this, what do you think about the idea  "LTS releases should be built upon the stable core of the previous release"  (http://brainstorm.ubuntu.com/idea/11387/)?17:03
mdzthis is an interesting topic, one where we're attempting something quite different from most distributions17:04
mdzsince we continue to make full-fledged releases every six months, and don't have a separate branch of development, we work from the same code base to produce LTS as we do everything else17:04
mdzthe primary difference, of course, is what we do *after* release: namely continue to maintain and support them for a longer term17:05
mdzwe also make certain adjustments to our development plans to especially emphasize stability in those releases17:06
mdzfor 6.06 LTS (dapper), we actually extended our release cycle to give us more time to work on shoring up some key subsystems17:06
mdzfor 8.04, we produced a normal release on time, and followed it up with a very intensive point release effort, leading to 8.04.117:06
mdzthis is a difficult tradeoff, as we want to provide the kind of predictability and stability that users want for the long term, but we also need to continue to keep up with the latest software for the benefit of everyday users who want that17:08
mdzsuggestions like "skipping" a release and doing only stabilization work would mean disappointing a lot of people who want the latest GNOME, Firefox, etc. and are accustomed to coming to Ubuntu for that for years now17:09
mdzwe are hearing the feedback, though, and will continue to make adjustments to how we do our releases in order to find the best balance17:10
mdzincluding some more ambitious plans which span multiple release cycles, about which I'll talk more in the future, once they're a bit more baked17:10
jcastro < stefanlsd> QUESTION: What is Canonicals plan regarding getting more big name vendors to support their product on17:11
jcastro                   Ubuntu. Most of our clients today are running RH or SLES because Oracle, DB2, SAP, Websphere etc is17:11
jcastro                   supported on them.17:11
jcastrowhoops17:11
mdzjcastro: it's fine17:11
mdzthis is an area we're very active in at Canonical, but it's also a very large ecosystem, so it will take time for Ubuntu to settle into a strong position there17:12
mdzlarge ISVs like the ones you mention don't take decisions like this lightly, and they're more comfortable working with companies and technologies which have been around for a longer time17:12
=== RainCT is now known as RainCT_
mdzwith Ubuntu, which hasn't yet turned four, we still have some way to go before we have the same standing as distributions which are more established with ISVs17:13
mdzDB2 has been certified on Ubuntu for some time, and a complete appliance is available for sale from Canonical17:14
mdzwe have a very positive relationship with IBM and I expect more good things in the future17:14
mdzsimilarly, just a little while ago, we made a joint announcement with IBM to bundle their Open Collaboration Client (which includes Notes, Symphony etc.)17:15
mdzthe trick is that for a given organization, there are a specific set of boxes to tick, and until we tick them all, there are some enterprises where it will be difficult to use Ubuntu17:16
mdze.g. if we have DB2 but not SAP, someone who needs both may need to go elsewhere for now17:16
mdzbut meanwhile, there are lots of places where Ubuntu is a great choice, even in those same companies but in different usage scenarios17:16
mdzmost of our work in this area is with server ISVs at the moment, though there are some good things happening on the desktop side as well17:17
jcastro< rick_h_> QUESTION: I see that intrepid is bumping the kernel to sync up with promises of RH/SuSE, has there been much reaction/action to the idea of syncing the major distros and is this a first step in showing Ubuntu's willingness to do some of the work involved?17:18
mdzthe final decision hasn't been taken yet, but it looks increasingly like we'll stick with 2.6.27 for Intrepid17:18
mdzthere were a variety of reasons for this, most of which have more to do with the kernel itself and how it meets our needs for Ubuntu than what other distributions are doing17:19
mdzhowever, it will be a great bonus if being in sync with them makes it easier for us to exchange patches, and means that the base kernel we use receives even more testing17:19
mdzwe have had positive discussions with major open source projects about synchronization, but it's a very difficult proposition for the community as a whole, and it will take a long time to see whether the idea takes hold17:20
mdzit's a large community with a lot of momentum, and large-scale changes are necessarily slow17:20
mdzwe are, generally speaking, agreeable to adapting our plans to fit into a synchronized scheme; Mark has said publicly that we would be willing to change the date of our next LTS release if it meant we could benefit from synchronization17:21
mdzas an early step, we're working in some cross-distribution forums to at least gather information about what everyone's plans are, and use that as a starting point to discuss how we could coordinate17:22
=== zachr_ is now known as zmrow
jcastro(that mailing list is "distributions" on freedesktop.org if people want to follow along)17:23
mdzironically, some of the early effects may be in DEsynchronization before we do more synchronization; mirror operators have complained about major distributions releasing very close together and overloading their links17:23
mdzso we'll try to make sure that we don't step on each other's toes, and continue to look for opportunities to get mutual benefit from a manageable level of change to our schedules17:23
jcastro< fluteflute> QUESTION: Is there any chance of gaining work experience at Canonical? If so, who should I contact? (My message to webmaster@canonical.com has gone unanswered.)17:24
mdzCanonical is a fast-growing company, and we have quite a few job openings posted on http://webapps.ubuntu.com/employment/17:24
mdzplease note that webmaster@canonical.com is who you contact if you have job _openings_ you'd like to post which are related to Ubuntu: read the page carefully17:25
mdzthere is a link to apply on each page for a specific job17:25
jcastro< krokosjablik> QUESTION: Do you speak with Gnome/KDE (and another upstream) projects, so they also release _LTS_ versions in time with Ubuntu LTS? Are there any plans for this?17:25
mdzquite coincidentally, the next major GNOME release "3.0" falls around the same time as our next projected LTS17:26
mdzso that may be a good time for us to coordinate something, particularly if it takes longer than six months for GNOME to go through a round of extensive changes17:27
mdzmany open source projects don't make plans more than 6-12 months in advance, if that, which makes it difficult to project that far in the future17:28
mdzI think we'll start to get more clarity on these possibilities next year17:28
jcastro< Kurt> QUESTION: Just a curiosity, but will 9.04 be announced soon? I noticed that 8.04 was announced around this time last year.17:28
mdzyes, in fact an announcement is planned for early next week17:29
mdzthe ever-popular question of what the code name will be will be answered at that time as well :-)17:29
mdzif you have ideas which you'd like to put forth for the 9.04 cycle, please put them into brainstorm17:30
mdzand review the items in there to help rank them17:30
mdzwe will review the top items and use them to help set our direction for the release17:31
jcastro< hggdh> QUESTION: although sort of answered, any more hard data on integration with major suppliers (like Oracle, etc)17:31
mdzany such discussions in progress with partners or potential partners would be confidential17:32
mdzI would not be able to discuss such information which is not already public about our activities with those companies17:32
mdzapologies17:32
hggdhmdz, fair. I understand.17:33
jcastroQUESTION: artwork discussions are always heated and opinionated, can you discuss what the artwork plans are for intrepid?17:33
mdzwe experimented with a fairly radical change in the theme earlier in the cycle (the darker theme)17:34
mdzhowever, we decided to work on that concept more before moving away from the basic 8.04 look17:35
mdzthere's a lot of activity over on ubuntu-art if you want to follow it more closely17:35
mdzand it's true, things get pretty heated over there during development17:35
mdzone interesting change is that we've moved to a different theme engine to provide the technical foundations for the current theme17:36
mdzwhich should be more stable and maintainable in the long term17:36
jcastro< hggdh> QUESTION: how are plans to base some upstreams in bzr? for example, Evolution ;-)17:37
jcastro(I think this would be a great opportunity to talk about DistributedDevelopment)17:37
mdzopen source projects have understandably strong opinions about which tools they choose to use17:37
mdzpeople get invested in a particular toolset which they have learned well and built their own custom tools on17:38
mdzit can be a lot of work to change17:38
taconeQuestion: any news about opensourcing launchpad ?17:38
* tacone ducks17:38
mdzthe GNOME project tries to standardize their tools to some extent, and most of its components use the same revision control system17:39
mdzthere was quite a bit of discussion at GUADEC about moving to a distributed system, but as far as I know, this hasn't been decided yet, so we'll see what happens there17:39
jcastro(Questions in #ubuntu-classroom-chat please)17:39
mdzit would be very good for Ubuntu if GNOME and other upstream projects move to distributed revision control17:40
mdzand I personally think Bazaar is a great choice, but there are a number of good ones out there17:40
mdzthe more projects go distributed, the better the tools we can build to help us package and deliver their work to users efficiently17:41
mdzI'm very excited about the distributed development plan17:41
mdzit's something that many of us have wanted to build for a long time now17:41
mdzit's somewhat hard to believe that projects as large as Debian and Ubuntu use revision control only in limited ways17:42
mdzwriting just a single software program without using revision control is considered strange17:42
mdzbut creating a whole distribution out of thousands, without revision control, is a bit crazy :-)17:42
mdzwe have a well developed toolset for the way we work today, though, and we hope to make the transition pretty seamless for developers who want to work in revision control17:43
mdzfurthermore my hope is that putting all of Ubuntu in Bazaar will make it very easy for people to get started on contributing to the project17:43
mdzif you have a patch, you'll be able to commit it to your own branch, work on it there and get feedback, build it and put it into a PPA, and when it gets reviewed, it will be very easy for a MOTU or core developer to push it into Ubuntu17:44
mdzI find it much simpler than emailing patches around and filing a lot of bug reports17:44
mdzin the places where we're using revision control today, there is a lower barrier for contribution and it's less work for the maintainer of the package17:45
mdzas to your original question, I think we're making good progress, and our goal is to start to realize some concrete benefits from the work during the 9.04 development cycle17:45
jcastro< mcisternas> QUESTION: How journalists can work in Ubuntu? Will there be more spaces for journalists in the community?17:45
mdzone of the great community success stories in Ubuntu is Ubuntu Weekly News, which recently passed its 100th issue17:46
mdzI'm very grateful to the folks who contribute to that publication and fill it with good content week after week17:47
mdzFull Circle magazine is a newer publication with a somewhat different audience and more of a print style17:47
mdzand I'm also very impressed with their work17:47
mdzjournalists looking to get involved should probably talk to the Ubuntu News Team17:48
mdzwhose mailing list is https://lists.ubuntu.com/mailman/listinfo/Ubuntu-news-team17:48
mdzthey'll be able to give the most up to date and accurate information about what's happening and the opportunities to contribute17:49
jcastro< hggdh> QUESTION: let's suppose my company uses, commercially, Ubuntu. Will the bugs we open be viewable by all, or would we have a restricted "Malone"? This is a question I have been asked when I proposed Ubuntu elsewhere...17:49
mdzUbuntu itself, as you know, is an open community project, and so information about what we're doing, including the bugs we have, is publicly available17:50
mdzthis is a bit scary sometimes for companies who are used to working in more closed environments, and they wonder whether using Ubuntu requires that they give up their privacy17:51
mdzcompanies who want to participate in the Ubuntu community are very welcome, but sometimes it's hard for them to understand where they fit in17:51
mdzthey're used to dealing with other companies in the normal sorts of ways, and open development may not fit into their business or culture very easily17:52
mdzfor example, many large companies need to go through extensive approval processes in order to release information into the public17:52
mdzI think it's important that companies who adopt open source learn about how it works and how to get involved in the usual ways17:53
mdzbecause the ability to get involved, influence the direction of the project, and follow development closely, are key benefits of using open source17:53
mdzand without them, companies won't get the full value that open source has to offer17:53
mdzhowever, for companies where this just isn't an option for whatever reason, Canonical can act as a sort of bridge17:54
mdzwe can work with companies on standard commercial terms, sign non-disclosure agreements, etc.17:54
mdzand help them to open up the things that they can open17:54
mdzfor example, if a commercial customer of ours is working on a particular bug with us, we can track the bug simultaneously in a private fashion and in the public Launchpad17:55
mdzso that anything we *can* put into the open system goes there, but we still have the ability to work with them and preserve confidentiality where they need it17:56
mdzwith regard to your specific question, we do have the capability to offer private bug hosting for our commercial customers to help them do things like this17:56
jcastroOk we're running out of time, we have time for 2 more questions17:57
jcastro< krokosjablik> QUESTION: Would you like consider more consolidation between Gnome and KDE like using only one platform - GTK or Qt? Is it realistic?17:57
hggdhmdz, THANKS! This is a most important point for some of the companies I do contract work!17:57
mdzI think that consolidation is valuable where it makes development easier17:58
mdzsometimes, if one component is dominant, it will get more "love" from developers, and thus get better than if attention were divided among competing tools17:59
mdzhowever, it doesn't always work that way, and if everyone is working the same way, things don't get better because it's harder to create something new to displace it17:59
mdzso I think a certain amount of diversity is healthy17:59
mdzboth systems have their merits, and where it's possible and sensible for the projects to collaborate on them, I think they will, and we've already seen evidence of that17:59
mdzthere would be no point in trying to standardize by fiat; these things need to work themselves out organically in the community18:00
mdzKDE and GNOME are both strong communities capable of doing that18:00
jcastrook that's it folks.18:00
mdzI think that's all the time we have, there's another session starting  now18:01
krokosjablikthanks!18:01
jcastroThanks matt for hosting the session, and thanks everyone for their questions!18:01
mdzthanks very much for your questions18:01
jcastroliw: you sir, are up next!18:01
mdzif you have more, take them to the ubuntu-devel-discuss mailing list and I and others will answer as we can18:01
liwjcastro, yay!18:01
liwjcastro, how do you want to work this, shall I wait a bit or just start now?18:02
jcastroup to you, it's your hour. :)18:02
jcastroThough a few minutes so everyone can go to the bathroom or something is always appreciated. :D18:02
liwI'll wait for 180 seconds, then18:02
liwin the mean while: jcastro, will you or someone be around to relay questions from -chat?18:03
liwok, let's start18:06
liwWelcome, everyone. The goal of this session is to introduce the Python unittest library and the coverage.py code coverage measurement tool.18:06
liwI will do this by walking through the development of a simple command line program to compute md5 checksums for programs.18:07
liwI assume everyone in the audience has a basic understanding of Python.18:07
liwIf you have questions, please ask them in #ubuntu-classrom-chat, prefixed with "QUESTION".18:07
liwI would also appreciate if someone volunteered to feed the questions to me one by one.18:07
liw(now breathe a bit and read that :)18:07
liwThe exaple program I will develop will be similar to the md5sum program.18:08
liwIt gets some filenames on the command line and writes out their MD5 checksum.18:08
liwFor example: checksum foo.txt bar.txt18:08
liwThis might output something like this:18:08
liwd3b07384d113edec49eaa6238ad5ff00  foo.txt18:08
liwc157a79031e1c40f85931829bc5fc552  bar.txt18:08
liwis anyone following this or am I going too fast?18:09
MyrttiI volunteer for relaying18:09
liwMyrtti, thank you18:09
liwI will develop this program using "test driven development", which means that you write the tests first.18:09
liw'http://en.wikipedia.org/wiki/Test_Driven_Development gives an overview of TDD for those who want to learn more.18:10
liwFor this tutorial, we will merely assume that writing tests first is good because it is easier to write tests for all parts of your code.18:10
liwFor the checksumming application, we will need to compute the checksum for some file, so let's start with that.18:10
liwhttp://paste.ubuntu.com/43675/18:10
liwThat has the unit test module.18:10
liwIn the real program, we will have a class called FileChecksummer, which will be given an open file when it is created.18:11
liwIt will have a method "compute", which computes the checksum.18:11
liwThe checksum will be stored in the "checksum" attribute.18:11
liwTo start with, the "checksum" attribute will be None, since we have not yet computed the checksum.18:11
liwThe "compute" method will set the "checksum" attribute when it has computed the checksum.18:11
liw(This is not necessarily a great design, for which I apologize, but this is an example of writing tests, not of writing great code)18:11
liwIn the unit test, we check that this is true: that "checksum" is None at the start.18:11
Myrtti< geser> QUESTION: there are several unittest frameworks for Python out there. What are the most important differences between them?18:12
liwI'll answer the question in a minute18:12
liwThe Python unittest module is inspired by the Java JUnit framework.18:12
liwJUnit has inspired implementations in many languages, and these frameworks are collectively known as xUnit.18:12
liwSee http://en.wikipedia.org/wiki/XUnit for more information.18:12
liwthere are at least two other modules for automated testing in the Python standard library: doctest and test.18:13
liwunittest is the only one I have any real experience in. back when I started writing unit tests with Python, doctest scared me, and I don't know if test even existed then18:13
liwas far as I understand, the choice between doctest and unittest is mostly a matter of taste: it depends on how you want to write the tests18:14
liwI like unittest's object oriented approach; doctest has an approach where you paste a Python command prompt session into a docstring and doctest runs the code and checks that the output is identical18:15
liwso it's good to look at both and pick the one that you prefer; sorry I can't give a more definite answer18:15
liwThe example above (see the paste.ubuntu.com URL I pasted) shows all the important parts of unittest.18:16
liwThe tests are collected into classes that are derived from the unittest.TestCase class.18:16
liwEach test is a method whose name starts with "test".18:16
liwThere can be some setup work done before each test, and this is put into the "setUp" method.18:16
liwIn this example, we create a FileChecksummer object.18:16
Myrtti< Salze> QUESTION: is that a convention that the testclass is the original classname plus "tests"?18:16
liwSalze, yes, that is one convention; that naming is not enforced, but lots of people seem to use it18:16
liwcontinuing18:17
liwSimilarly, there can be work done after each test, and this is put into the "tearDown" method, but we don't need that in this example.18:17
liw"setUp" is called before each test method, and "tearDown" after each test method.18:17
liwThere can be any number of test methods in a TestCase class.18:17
liwThe final bit in the example calls unittest.run to run all tests.18:17
liwunittest.run automatically finds all tests.18:17
liwthat's all about the test module. any questions on that? take a minute (and tell me if you need more time), it's good to understand it before we continue18:17
liwno questions? let's continue then18:19
liwhttp://paste.ubuntu.com/43676/18:19
liwThat's the actual code.18:19
liwAs you can see, it is very short.18:20
liwThat is how test driven development works: first you write a test, or a small number of tests, and then you write the shortes possible code to make those tests pass.18:20
liwLet's see if they do.18:20
liwTo run the tests do this: pyhon checksum_tests.py18:20
liwYou should get the following output:18:20
liw liw@dorfl$ python checksum_tests.py18:20
liw .18:20
liw ----------------------------------------------------------------------18:20
liw Ran 1 test in 0.000s18:20
liw 18:20
liw OK18:20
liwEveryone please try that, while I continue slowly.18:20
liwThe next step is to make FileChecksummer to actually compute a checksum.18:21
liwFirst we write the test.18:21
liwhttp://paste.ubuntu.com/43677/18:21
liwthat's the new version of the test module18:21
liwit adds the testComputesAChecksum method18:21
liwThen we run the test.18:21
liw liw@dorfl$ python checksum_tests.py18:22
liw F.18:22
liw ======================================================================18:22
liw FAIL: testComputesAChecksum (__main__.FileChecksummerTests)18:22
liw ----------------------------------------------------------------------18:22
liw Traceback (most recent call last):18:22
liw   File "checksum_tests.py", line 18, in testComputesAChecksum18:22
liw     self.assertNotEqual(self.fc.checksum, None)18:22
liw AssertionError: None == None18:22
liw 18:22
liw ----------------------------------------------------------------------18:22
liwThat's not so good.18:22
liwThe test does not pass.18:22
liwThat's because we only wrote the test, not the code.18:22
liwThis, too, is how test driven development works.18:22
liwWe write the test, and then we run the test.18:22
liwAnd now check that the test fails in the right way.18:22
liwAnd it does: it fails because the checksum attribute is None.18:22
liwThe test might have failed because we did not have a compute method, or because we misspelt the checksum attribute.18:22
liwSince we did not, the test is OK, and we write the code next.18:22
liwhttp://paste.ubuntu.com/43679/18:22
liwthat's the new code, it modifies the compute() method18:23
liwPlease run the test and see that it works.18:23
Myrtti< davfigue> QUESTION: what is the package for cheksum module ?18:23
liwdavfigue, the checksum module comes from http://paste.ubuntu.com/43679/ -- save that to a file called checksum.py18:24
liwand update the file with newer versions as I get to them18:24
liwdid anyone run the modifed code successfully through the tests?18:24
Myrtti< thekorn> QUESTION: what's your experience, where should I put the test code, in the module itself or in a seperate tests/ sub-directory?18:24
liwthekorn, in my experience, because of the way I run my tests, it is best to keep a module foo.py and its tests in foo_tests.py in the same directory; while I haven't tried nose (python-nose), I use another similar tool and it benefits from keeping them together18:25
liwthekorn, I also find that as  aprogrammer it's easier to have things together18:26
liwI'm going to hope the code passes through tests for others, and continue18:26
liwIf you look at the code, you see how I cheated: I only wrote as much code as was necessary to pass the test.18:26
liwIn this case, it was enough to assign any non-None value to checksum.18:26
liwThat's OK, that's part of how test driven development works.18:27
liwYou write a test and then a little code and then you start again.18:27
liwThis way, you do very, very small iterations, and it turns out that for many people, including me, that means the total development speed is higher than if you skip writing the tests, or write a lot of code  at a time.18:27
liwThat's because if you write a lot of code before you test it, it's harder to figure out where the problem is.18:27
liwIf you only write one line at a time, and it breaks, you know where to look.18:27
liwSo the next step is to write a new test, something to verify that compute() computes the right checksum.18:27
liwSince we know the input, we can pre-compute the correct answer with the md5sum utility.18:27
liwliw@dorfl$ echo -n hello, world | md5sum -18:27
liwe4d7f1b4ed2e42d15898f4b27b019da4  -18:27
liwChanging the test give this:18:27
liwhttp://paste.ubuntu.com/43680/18:28
liwAgain, tests fail.18:28
liwIt's time to fix the code.18:28
liwhttp://paste.ubuntu.com/43681/18:28
Myrtti< Salze> QUESTIONS: writing all the tests (one can think of) at once would be a "valid" approach to TDD, too? Or not?18:28
liwSalze, it's a valid approach, if it works for you :) I find that writing a large number of tests at once results in me writing a lot of code at once, and a lot of bugs18:29
liwbut sometimes it's ok to write a lot of tests, to test all the aspects of a small amount of tricky code18:29
liwfor example, if the function checks that a URL well-formed, it's ok to write all tests at once, adn then write the one-line regular expression18:30
liwNext we will write a main program to let us compute checksums for any files we may want.18:30
liwSometimes it feels like a lot of work to write tests all the time, so I'm going pretend I'm lazy and skip writing the tests now.18:30
liw(note: _pretend_ :)18:30
liwAfter all, the checksumming is the crucial part of the program, and we've alredy written tests for that.18:30
liwThe rest is boilerplate code that is very easy to get right.18:30
liwhttp://paste.ubuntu.com/43682/18:30
liwThat's the finished application.18:30
liwAll tests pass, and everything is good.18:31
liwOops, no it isn't.18:31
liwIf you try to actually run the application, you get the wrong output:18:31
liwliw@dorfl$ python checksum.py foo.txt bar.txt18:31
liwNone foo.txt18:31
liwNone bar.txt18:31
liwI forgot to call compute!18:31
liwSee, this is what happens when I am lazy.18:31
liwI make bugs.18:31
liwFixing...18:31
liwStill too lazy to write a test.18:31
liwhttp://paste.ubuntu.com/43683/18:31
liwthat's really the finaly checksum.py I hope18:32
liwTo test it, I compare its output with md5sum's.18:32
liwliw@dorfl$ python checksum.py foo.txt bar.txt18:32
liwd3b07384d113edec49eaa6238ad5ff00 foo.txt18:32
liwc157a79031e1c40f85931829bc5fc552 bar.txt18:32
liwliw@dorfl$ md5sum foo.txt bar.txt18:32
liwd3b07384d113edec49eaa6238ad5ff00  foo.txt18:32
liwc157a79031e1c40f85931829bc5fc552  bar.txt18:32
liwBoth programs give the same output, so everything is OK.18:32
* liw makes a significant pause, because this is an important moment18:32
liwSee what happened there?18:32
liwI stopped writing automated tests, so now I have to test things by hand.18:32
liwIn a big project, how often can I be bothered to test things by hand?18:32
liwNot very often, because I'm lazy.18:32
liwBy writing automated tests, I can be more lazy.18:33
liwThis is why it's good for programmers to be lazy: they will work their asses off to only do something once.18:33
liweveryone with me so far?18:33
liwSuppose we come back to this checksumming program later.18:34
liwWe see that there is some automated testing, but we can't remember how complete it is.18:34
liw(side note: the md5 module is going to be deprecated in future python versions, the hashlib module is the real module to use)18:34
liwIn this example, it is obvious that it isn't very complete, but for a big program, it is not so obvious.18:34
liwcoverage.py is a tool for measuring that.18:35
liwIt is packaged in the python-coverage package.18:35
liwTo use it, you run the test with it, like this:18:35
liw liw@dorfl$ python -m coverage -x checksum_tests.py18:35
liw ..18:35
liw ----------------------------------------------------------------------18:35
liw Ran 2 tests in 0.001s18:35
liw 18:35
liw OK18:35
liwSee, there is no change in the output.18:35
liwHowever, there is a new file, .coverage, which contains the coverage data.18:35
liwTo get a report, run this:18:35
liw liw@dorfl$ python -m coverage -r18:35
liw Name                                         Stmts   Exec  Cover18:35
liw ----------------------------------------------------------------18:35
liw /usr/lib/python2.5/StringIO                    175     37    21%18:35
liw /usr/lib/python2.5/atexit                       33      5    15%18:35
liw /usr/lib/python2.5/getopt                      103      5     4%18:35
liw /usr/lib/python2.5/hashlib                      55     15    27%18:35
liw /usr/lib/python2.5/md5                           4      4   100%18:35
liw /usr/lib/python2.5/posixpath                   219      6     2%18:35
liw /usr/lib/python2.5/threading                   562      1     0%18:35
liw /usr/lib/python2.5/unittest                    430    238    55%18:36
liw /var/lib/python-support/python2.5/coverage     522      3     0%18:36
liw <string>                                    <class '__main__.CoverageException'>: File '/home/liw/Canonical/udw-python-unittest-coverage-tutorial/<string>' not Python source.18:36
liw checksum                                        20     13    65%18:36
liw checksum_tests                                  14     14   100%18:36
liw ----------------------------------------------------------------18:36
liw TOTAL                                         2137    341    15%18:36
liwoops, that was long18:36
liwStmts is the total number of statements in each module, Exec is how many we have executed, and Cover is how many percent of all statements we have covered18:36
liwThis contains all the Python standard library stuff as well.18:36
liwWe can exclude that:18:36
liwliw@dorfl$ python -m coverage -r -o /usr,/var18:36
liw(skipping long output)18:36
liwTOTAL               34     27    79%18:36
liwThis shows that only 27 statements of a total of 34 are covered by the testing.18:37
liwThe line with "class '__main__.CoverageException'>" is a bug in the hardy version of coverage.py, please ignore it.18:37
liwTo get a list of the lines that are missing, add the -m option:18:37
liw liw@dorfl$ python -m coverage -rm -o /usr,/var18:37
liw Name             Stmts   Exec  Cover   Missing18:37
liw ----------------------------------------------18:37
liw <string>        <class '__main__.CoverageException'>: File '/home/liw/Canonical/udw-python-unittest-coverage-tutorial/<string>' not Python source.18:37
liw checksum            20     13    65%   22-27, 3118:37
liw checksum_tests      14     14   100%18:37
liw ----------------------------------------------18:37
liw TOTAL               34     27    79%18:37
liwWe're missing lines 22-27 and 31 from checksum.py.18:37
liwThat's the ChecksumApplication class (it's run method) and the main program.18:37
liwNow, if we wanted to, we could add more tests, and get 100% coverage.18:38
liwAnd that would be good.18:38
liwHowever, sometimes it is not worth it to write the tests.18:38
liwIn that case, you can mark the code as being outside coverage testing.18:38
liwhttp://paste.ubuntu.com/43684/18:38
liwSee the "#pragma: no cover" comments? That's the magic marker.18:38
liwWe now have 100% statement coverage.18:38
liwExperience will tell you what things it's worthwhile to write tests for.18:38
liwA test that never fails for anyone is a waste of time.18:38
liwFor the past year or so, I have tried to get to 100% statement coverage for all my new projects.18:38
liwIt is sometimes a lot of work, but it gives me confidence when I'm making big changes: if tests pass, I am pretty sure the code still works as intended.18:38
liwHowever, that is by no means guaranteed: it's easy enough to write tests at 100% coverage without actually testing every aspect of the code, so that even though all tests pass, the code fails when used for real.18:39
liwThat is unavoidable, but as you write more tests, you learn what things to test for.18:39
liwAs an example, since coverage.py on tests _statement_ coverage, it does not check that all parts of a conditional or expression get tested:18:39
liw"if a or b or c" might get 100% statement coverage because a is true, but nothing is known about b and c.18:39
liwThey might even be undefined variables.18:39
liwThen, when the code is run for real, you get an ugly exception.18:39
liwIn this tutorial I've shown how it is like to write tests before the code.18:39
liwOne of the results from this is that code written like this tends to be easier to test.18:40
liwAdding tests for code that has already been written often requires jumping through more hoops to get decent test coverage.18:40
liw<rick_h_> also check out figleaf http://darcs.idyll.org/~t/projects/figleaf/doc/18:40
liw<rick_h_> skips some coverage stuff in stdlib and such18:40
liwI didn't know about figleaf, cool. thanks rick_h_18:40
liwI've also only touched the very basics of both unittest and automated testing in general.18:41
liwFor example, there are tools to make using coverage.py less work, and approaches to writing tests that make it easier to write good tests.18:41
liwFor this session, they are too big topics, so I advise those interested in this to read up on xUnit, test driven development, and more.18:41
liwThere's lots of material about this on the net.18:41
liwThis finishes my monologue.18:41
liwQuestions, anyone?18:41
Myrttido you want them here or -chat?18:42
liwhere is fine, unless it becomes chaos, in which case I'll say so18:42
liwwhile I continue to be astonished at having pre-answered every possible question, I'll note that I have heard good things about python-nose, but I haven't had time to look at it myself18:45
liwI wrote a test runner (the program to find and run tests) myself, since that was easy, but I hope to replace that with nose one of these days18:46
Myrtti< davfigue> QUESTION: do you have any advice or approach to simplify regression testing on python?18:46
Myrtti< tacone> QUESTION: which lib do you suggest for mockups ?18:47
liwdavfigue, sorry, no; I try write some kind of automatic test for each bug fix (be it a unittest.TestCase method or something else), and then use that for regression testing18:47
liwI haven't studied libraries for mockups; mostly I have written small custom mockup classes18:48
liw(I am not the world's greatest expert on unit testing, as should now be clear :)18:48
liwI have wanted to find a mockup class for filesystem operations (much of the os module), both to more easily write tests and to speed things up18:49
liwbut I haven't found anything yet18:49
liw<davfigue> QUESTION: do you know any other tool for gathering statistics on python tests ?18:50
liwnope, coverage.py is the only working one I've found; there was another one that I couldn't get to work, but I forgot its name18:50
Myrtti< davfigue> QUESTION: would you point us to more resources on tdd for python ?18:53
liw<davfigue> QUESTION: would you point us to more resources on tdd for python ?18:53
liwI don't have a handy list of Python specific TDD stuff, I*m afraid18:53
liwapart from the wikipedia page I pasted early one, http://c2.com/cgi/wiki?TestDrivenDevelopment might be a good place to start reading18:54
liwmost stuff about TDD is language agnostic18:54
liwthe c2 wiki (the _original_ wiki, unless I'm mistaken) is a pretty good resource for overview material on lots of software develompent stuff, actually18:55
liw<rick_h_> http://www.amazon.com/Test-Driven-Development-Addison-Wesley-Signature/dp/0321146530/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1220637200&sr=8-118:55
liw<rick_h_> that book is half java and half python if I recall18:55
liw(for the record)18:55
liw<rick_h_> jason gave a talk at pycon using nose: http://us.pycon.org/2008/conference/schedule/event/79/18:56
* liw is learning more than his audience, at this rate :)18:56
liwok, our hour is ending in a couple of minutes18:57
Myrttithank you liw18:57
liwthank you for listening and participating18:57
liwif anyone wants to discuss these things further, I'll be around during the weekend and next week on irc, though not necessarily on these two channels18:58
liwMyrtti, and thank you for relaying18:58
Myrttigot bored learning packaging ;-)18:58
Myrtti*cough*18:59
evandright, do I have a volunteer to field questions from #ubuntu-classroom-chat?19:00
evandok, I'll try my best to catch questions in #ubuntu-classroom-chat.  Please keep discussion there to avoid making the log of this session difficult to read through.19:03
evandSo allow me to first introduce myself.  My name is Evan Dandrea.  I've been working on the installer since about 2006, originally as part of Google's Summer of Code where I wrote migration-assistant.19:04
evandI now work for Canonical full time on the installer.19:04
evandI'd also like to give a basic overview of the various components that the Installer Team looks after before going any further.19:05
evandUbiquity is what you're probably most familiar with.  This is Ubuntu's graphical installer.19:05
evandSome of you may also be familiar with the Alternate CD installer, otherwise known as debian-installer.  Which just as it sounds is the installer Debian has been using for quite some time.  They're also the source of upstream development on it.19:06
evandIn order to reduce duplication of effort, especially as it pertains to partitioning, Ubiquity is designed to use parts of debian-installer as a base.19:07
evandThat is, when you're on the "Who am I?" page of the graphical installer, it's really running the user-setup component of the alternate installer in the background.19:08
hggdh evand, I will forward the questions19:08
evandWhen you finish filling out this page, ubiquity takes your responses, properly formats them, and feeds them back into the debian-installer component.19:08
evandthanks hggdh19:08
evandIt does this through debconf questions, which are the heart of debian-installer19:09
evandevery time d-i is asking you something, it's asking it through a debconf question.  This goes for errors and any other kind of message as well.19:09
evandMore details on the integration between d-i and ubiquity can be found in the latter's README document, found here:19:10
evandhttp://bazaar.launchpad.net/~ubuntu-core-dev/ubiquity/trunk/annotate/2781?file_id=README-20051205083553-550dab3cb68ad62219:10
evandThere's also oem-config19:10
=== crd1b is now known as crdlb
evandThis piece of software allows OEMs to defer the work of setting the language, timezone, and username to when the customer boots their computer for the first time19:11
evand(OEMs, if you are not aware, are companies like Dell, HP, Sony, etc)19:11
evandoem-config reuses a lot of code from ubiquity and operates in much the same way, secretly running d-i components in the background19:12
evandIn fact, since there's so similar, one of the future projects we may undertake is merging oem-config into the ubiquity tree (but more on future projects later)19:12
evandthese projects are all on launchpad, usually in http://launchpad.net/PROJECT, for example: http://launchpad.net/ubiquity19:13
evandhowever, with the exception of wubi (to be discussed later), we always file bugs on these projects on the version that exists in Ubuntu:19:14
evandhttp://launchpad.net/ubuntu/+source/PACKAGE/+bugs or http://launchpad.net/ubuntu/+source/ubiquity/+bugs for example19:14
evandI forgot to note that d-i is a mixture of posix shell code and C.  Ubiquity and oem-config are mostly written in python, with a very small amount of shell code to help with d-i interactions.19:15
evandthere are two additional projects currently ongoing as part of the Installer Team work, but I'll delve into them later.  They are wubi and usb-creator.19:16
evandso now I'd like to briefly introduce the team19:16
evandhttps://wiki.ubuntu.com/InstallerTeam19:16
evandColin Watson is really the center of the team.  He's been working on ubiquity since development was taken over from the Guadalinex team.19:17
evandHe's also very involved in Debian, and works on d-i upstream there as well.19:18
evandJonathan Riddell has done a lot of work on the KDE frontend to ubiquity and we often consult with him for such work.19:18
evandoh, IRC names would probably help19:18
evandcjwatson is Colin, riddell is Jonathan19:18
* Riddell waves19:20
evandMario Limonciello works on Mythbuntu, specifically the Ubiquity Mythbuntu frontend (they have some additional pages for Mythbuntu specific questions)19:20
evandthough he also works for Dell and has a vested interest in a lot of the automation work that goes into the installer.19:21
evandhe's also hopefully going to be approved for core-dev soon19:21
evandLuke Yelavich has done a lot of the accessibility work in Ubuntu, specifically the a11y options you see on the install CD bootloader19:22
evandhe's also working on getting dm-raid working this cycle.19:22
evandI should note that there is one more piece to this puzzle, casper.  It is the initramfs environment that handles taking the options passed by the install CD bootloader and acting upon them with the mounted filesystem for the live environment19:23
evandfor example, Luke's accessibility options are read from the kernel command line in casper and then casper sets the right gconf keys and modifies the right files to enable them19:24
evandAgostino Russo works on Wubi, the Windows Ubuntu installer that was introduced in 8.0419:25
evandand I work on Ubiquity as mentioned, some bits of d-i, and most recently help with Wubi and develop usb-creator, which is a tool to take an Ubuntu CD or ISO and write it properly to a USB disk.19:26
evandwe also have a number of people who contribute small patches here and there.19:26
evandthere are also two people who are not on the team, but play a role in our work.19:27
evandMatthew Paul Thomas (mpt) is our local usability expert.  He is extremely helpful in getting UI designs right.19:27
evand(I forgot about IRC names again, Luke is TheMuso, Mario is superm1, and Agostino is ago)19:28
evandDustin Kirkland (kirkland) is also working on getting iscsi support in the alternate CD installer (d-i) this cycle.19:28
kirklandevand: trying to :-)19:29
evandheh19:29
kirklandevand: hits some road blocks, not sure if enough was accomplished by Feature Freeze19:29
evandfair enough19:30
evandbest of luck going forward on that work19:30
evandso some of the things we're currently working on...19:31
hggdhgQuigs> QUESTION: usb creator, how is development going/when good enough for inclusion?19:31
evandperfect timing19:31
evandI was just going to talk about that19:31
evanddevelopment has hit a few road blocks, but it made it into the archive in time for FeatureFreeze19:31
evandit can be found in the archive as usb-creator, but I hope to import it into bzr today and create a proper project page for it.19:32
hggdhQUESTION: how's LVM and mutiple filesystems going on Ubiquity?19:32
evandLVM> not well.  We don't have anyone tasked to it at the moment and unfortunately it's a large project that requires a fairly good understanding of d-i, ubiquity, and partman.19:33
evandLVM as part of encrypted by default filesystems will probably land before proper LVM support as the former can just be a checkbox while the latter requires working it into the advanced partitioning page19:34
evandthis was a deferred specification from 8.04, if I recall correctly, that we just have not had time for.19:34
evand(feel free to pick up any of these specifications, but fair warning, that one is pretty daunting)19:35
hggdh:-) I know...19:35
evandhrm, wiki links would probably help for some of these19:35
evandhttp://wiki.ubuntu.com/USBInstallationImages19:36
evandis usb-creator19:36
evandI'll have to dig for the encryption one19:37
evandhttps://wiki.ubuntu.com/UbiquityVisualRefresh19:37
evandubiquity visual refresh was a fairly large specification that we worked this cycle, though unfortunately only the partition bar code landed in time and the rest is still in development and will have to be deferred19:38
hggdhevand, https://wiki.ubuntu.com/EncryptedFilesystemsInstaller ?19:38
hggdh<gQuigs> QUESTION: difference between usb-creator and liveusb (https://launchpad.net/liveusb)?19:39
evandyes! thanks19:39
evandliveusb is another project that does roughly the same thing, but after looking over the code they had, I found it would be quicker to develop from scratch given some of the design goals than modify that project to suit our needs19:40
evandhopefully we can collaborate in the future and perhaps merge the two19:40
evandFedora also has a tool that does a similar thing19:41
evandBut it was written in PyQt, and we explicitly wanted this to be frontend neutral (though first in GTK)19:41
evandThere will eventually be KDE and Windows frontends19:41
evandhttps://wiki.ubuntu.com/DVDPerformanceHacks19:42
evandCurrently on the DVD the installer copies over all the files for language packs, then removes each language pack package later on19:42
evandThis is horribly slow19:42
evandSo we reworked the code to filter out the files while copying.19:43
evandspeed and memory usage are a constant concern for us19:43
evandhttps://wiki.ubuntu.com/WubiIntrepid19:44
hggdh<fluteflute> QUESTION: You said usb-creator was in the 'archive'. I can't find it in there: http://packages.ubuntu.com/search?suite=default&section=all&arch=any&searchon=names&keywords=usb-creator19:44
evandWubi is possibly getting rewritten this cycle as it was previously written in NSIS which is horribly buggy.19:44
evandah, my mistake and entirely my fault.19:45
evandIt failed to build and is requiring another upload.  It should appear later today.19:45
evandthe source package is in http://archive.ubuntu.com/ubuntu/pool/universe/u/usb-creator/ for the impatient19:46
evandand finally as mentioned, Dustin is working on iscsi and Luke is working on dm-raid.19:46
evandSome future things we'll be working on:19:46
evandFinishing up the slideshow and timezone map redesign work as part of ubiquity-visual-refresh19:47
evandthe former it mostly a task for the artwork and documentation teams19:47
evandas there is really very little code that needs to be written for ubiquity to display a slideshow19:47
evandthe latter is a fairly detailed design, so in the interest of time, I refer you to the ubiquity-visual-refresh specification for its details19:48
evandWe planned out a tool to properly migrate wubi installs to dedicated partitions but did not have the resources to implement it this cycle, but hopefully that will get picked up for 9.0419:49
evandthe notes from that are also in https://wiki.ubuntu.com/WubiIntrepid19:49
evandit's a fairly large project, unfortunately19:50
evandwe are constantly looking at the usability of the installer and are fortunate to have a few usability studies to work with (see the ubuntu-devel mailing list archives for details of them)19:50
evandthere's also a number of old specifications to pick up from previous releases19:51
evandI'm going to work on getting those added to our team wiki page in case anyone is interested in working on them19:51
evandI'm going to stop and field questions before I go on to the next part as we're getting close to the end19:52
evandany questions?19:52
hggdhguess not, evand.19:53
evandok19:53
evandso if you have an idea for a project as part of the installer, the best thing you can do is write up your thoughts, come up with a design and plan to implement it and come into #ubuntu-installer to talk about it19:54
evandif you don't get a response, take it to ubuntu-installer@lists.ubuntu.com19:54
evandif you can afford the time, propose the idea for UDS19:54
evandhttps://wiki.ubuntu.com/UDS19:54
evandthat way it gets the benefit of input from the entire development team19:55
evandyou don't have to physically at UDS to participate either, you can VoIP call in19:55
evandbut please keep in contact with us as you develop things so we don't overlap efforts and we have an idea of how soon your work can be merged in19:56
evandbug traiging also helps us quite a bit, but I'm afraid I don't have time to go into the details of that19:56
evandI'd suggest first getting involved in the BugSquad for that19:56
evandIf you're interested in the work we're doing, we don't have team meetings, but Luke, Colin, and myself are part of the Ubuntu Foundations Team and discuss our work there, Dustin is part of the Server Team, and Jonathan is part of the Desktop Team19:57
evandWe encourage code to be managed using bzr as all of our existing work is in bzr and it makes it significantly easier to merge your code in if its in the same VCS19:58
evandbut it's not a requirement19:58
evandfinally, come lurk in #ubuntu-installer to get a feel for the team if you're interested in helping19:59
evandwe don't bite19:59
evandok, thanks for your time and questions19:59
evandenjoy the rest of the Developer Week!19:59
hggdhthank you Evan19:59
Descenti1nthank you evand and friends!19:59
gQuigsthanks!19:59
fluteflutethanks, that was very interesting!19:59
hasnext1thanks20:00
hggdhkees, I guess you are on now ;-)20:00
keeshggdh: thanks!20:00
hggdhkees, will you give us some 2 minutes for pit stops & similar?20:01
keeshggdh: sure, we'll get started at 19:04?20:01
hggdhdeal ;-)20:01
=== mcas is now known as mcas_away
keesI'll go ahead and get started.  As usual, please ask questions in the -chat room, and we'll answer them as we see them.  :)20:04
keesHello!  I'm Kees Cook, and I'm the technical lead of the Ubuntu Security Team (and employed by Canonical).20:04
keesThis is going to be an introduction to the Security Team, and things we're working on.20:04
keesI'm here with Jamie Strangeboge and William Grant.  We're going to trade off talking about various topics.20:05
jdstrandStrageboge?20:05
keesgah20:05
jdstrandStrangeboge?20:05
jdstrandStrandboge :P20:05
keesStrandboge.  apologies.  I swear I can type.  :)20:05
* jdstrand guesses he knows what kees thinks of him!20:06
* kees hangs his head in shame20:06
keesThe Ubuntu Security Team is made up of the teams handling main, universe, and those working on pro-active hardening, as well as security auditing.  (See https://wiki.ubuntu.com/SecurityTeam/GettingInvolved)20:06
jdstrandheh, np20:06
keesFirst, I'm going to cover the "life cycle" of a security issue.  This is useful to understand for a developer, so it's obvious where things fit together.20:07
keesA security issue starts either with a bug reported to Launchpad, or as a "CVE" (http://cve.mitre.org/).20:07
keesFor anyone unfamiliar with CVEs, it is maybe easiest to think of them as "global" bug reports.  :)20:08
=== mcas_away is now known as mcas
keesOnce the bug is understood, we try to coordinate with upstreams or other distros to develop a patch.20:08
keesThis is the first major bit of work -- actually _fixing_ the problem.20:09
keesAs with SRUs, we try to produce a minimal change that fixes the problem.20:09
keesThe patch is tested, and we then follow the "Security Update Procedures" and get it published.  (https://wiki.ubuntu.com/SecurityUpdateProcedures)20:09
keesThis works much like a Stable Release Update (https://wiki.ubuntu.com/StableReleaseUpdates), and involves potentially even more careful testing.20:10
keeswhen doing these tests, the people involve will try to test out anything changed in the code, and make sure it both fixes the problems and doesn't break anything that used to work.20:10
keeswhen security updates are published for packages in main (and restricted), an Ubuntu Security Notice is published, outlining what was fixed.20:12
keesThose are seen here: http://www.ubuntu.com/usn/20:12
keesFor anyone interested in getting these updates, there is a mailing list (ubuntu-security-announce) linked from the above page.20:12
keesThe primary place where issues are tracked is in the Ubuntu CVE Tracker (https://launchpad.net/ubuntu-cve-tracker)20:13
keesIt contains information about all the CVEs that impact Ubuntu, past and present.20:14
keesSince not everyone is interested in digging into a bzr repo just to see how things look, it is also published: http://people.ubuntu.com/~ubuntu-security/cve/main.html20:14
keesand for individual CVEs, those can be examined too: http://people.ubuntu.com/~ubuntu-security/cve/CVE-2008-232720:16
ubot5kees: Multiple buffer underflows in the (1) LZWDecode and (2) LZWDecodeCompat functions in tif_lzw.c in the LZW decoder in LibTIFF 3.8.2 and earlier allow context-dependent attackers to execute arbitrary code via a crafted TIFF file.  NOTE: some of these details are obtained from third party information. (http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-2327)20:16
kees(thanks ubot5)20:16
keesIn addition to fixing security issues as they come up, we're also doing pro-active work to make security issues less of a problem when they happen.20:17
keesThese mitigation techniques are wide-ranging including memory protections, mandatory access control (AppArmor and SELinux), firewalls (ufw), etc.20:18
keesthe toolchain hardening options can be seen here: https://wiki.ubuntu.com/CompilerFlags20:18
keesmany are new for Intrepid, but Edgy and later has had the stack protector.20:19
keesAppArmor and SELinux are available (AppArmor by default), and I'll let jdstrand talk about ufw shortly.20:19
keesQUESTION: how about security issues in universe and multiverse? it seems that security team is not issue announcements about it20:19
keesThe Universe Security Team (motu-swat) handles updates for universe and multiverse20:20
kees(see http://people.ubuntu.com/~ubuntu-security/cve/universe.html)20:20
keesas of now, no one has stepped up to handle writing a "Universe USN" for updates that get published.20:21
keesI can let wgrant discuss this -- he is (hopefully) coming for the end of this class.20:21
keesHelp with universe updates is greatly appreciated -- the above link shows which packages need work.20:22
keesI'll let jdstrand take over now....  :)20:22
jdstrandthanks kees!20:22
jdstrandHi! My name is Jamie Strandboge, and I am a member of the Ubuntu Security Team, a Canonical employee, author of UFW, contributor to qa-regression-testing, and a whole bunch of other stuff noone probably cares about. :)20:22
jdstrandI'm giong to talk about qa-regression-testing and ufw20:23
jdstrandWhen performing a security update, it is of utmost importance to make sure that the update does not introduce any regressions and verify that the package works as intended after an update.20:23
jdstrandThis is where the QA Regression Testing bzr branch (https://code.launchpad.net/~ubuntu-bugcontrol/qa-regression-testing/master) can help. qa-regression-testing was started by Martin Pitt (pitti), and continued by me, kees and others.20:23
jdstrandqa-regression-testing is used extensively by the Ubuntu Security team, as well as the Ubuntu QA Team, Ubuntu Server Team and others. They are also used in the SRU (Stable Release Update) process and when testing Apparmor profiles.20:24
jdstrandThe bzr branch contains a lot of information to help with an update. I highly recommend reading README.testing, which talks about things to look out for in an update, best practices, checklists and more.20:24
jdstrandAlso, the build_testing/ and notes_testing/ have notes and instructions on how to enable build testing, use testing frameworks for a particular application and any other notes pertinent to testing.20:25
jdstrandThe scripts/ directory contains scripts for testing various programs. The main idea behind these scripts not build/compile testing, but rather application testing for default and non-default configurations of packages.20:25
jdstrandFor example, the test-openldap.py script will test slapd for various configurations like ldap://, ldapi://, ldaps://, sasl, overlays, different backends and even kerberos integration.20:25
jdstrand*IMPORTANT* the scripts in the scripts/ directory are destructive, and should NOT be run on a production machine. We typically run these in a virtual machine, but often a chroot is sufficient.20:25
jdstrandMost of the scripts use python-unit. At the top of each script are instructions for how to use it, caveats, etc. There is also a skeleton.py script along with libraries (testlib*.py) that can be used when developing new scripts.20:26
jdstrandThe scripts in qa-regression-testing typically are written when there is a new security update, and specifically tests the functionality that pertained to a given patch. As such, the scripts are in varying states of completeness, and any help in creating and extending these is most welcome. :)20:26
jdstrandBy following the checklists, best practices, developing new scripts and using existing scripts for qa-regression-testing, we all can go a long way in helping to ensure as few regressions as possible.20:26
jdstrandI'm going to continue on with ufw now. if there are any questions, they can also be asked at the end of the session20:27
jdstrandufw is Ubuntu's default firewall application, and as of Ubuntu 8.04 LTS (Hardy Heron), it is installed by default, but not enabled.20:27
jdstrandufw stands for 'Uncomplicated Firewall', and strives to make configuration of an iptables firewall easier for users while not getting in the way of administrators with advanced needs.20:28
jdstrandCurrently, it works very well as a host-based/bastion host firewall, particularly for desktop, laptop and single-homed servers.20:28
jdstrandSome of its features include:20:28
jdstrand* easy to disable and enable20:28
jdstrand* status and logging commands20:28
jdstrand* simple and extended rule syntax for allowing and denying traffic20:28
jdstrand* ipv4 and ipv6 support20:28
jdstrand* boot integration20:28
jdstrand* sysctl/proc integration20:28
jdstrand* reasonable defaults20:28
jdstrand* can add/delete/modify rules before enabling the firewall20:28
jdstrand* supports default DROP and default ACCEPT20:28
jdstrand* checks /etc/services for non-numeric ports20:29
jdstrandand as of Ubuntu 8.10 (Intrepid Ibex), ufw adds:20:29
jdstrand* connection rate limiting via the 'limit' command20:29
jdstrand* localization support20:29
jdstrand* port ranges (aka multiport) support20:29
jdstrand* dotted netmask support20:29
jdstrand* modularized code for better integration and downstream support (eg gui-ufw)20:29
jdstrand* application integration (aka package integration)20:29
jdstrandQUESTION: how about NAT in ufw?20:30
jdstrandI'm going to address that a little later on. the short answer is that the 'ufw' cli command doesn't do NAT, but that ufw framework allows you to do whatever iptables can do20:30
jdstrandUsing ufw is pretty straightforward, and for the casual laptop or desktop user, it is simply a matter of running:20:31
jdstrand$ sudo ufw enable20:31
jdstrandThis will drop incoming connections and allow all outgoing with connection tracking. It also makes sure that things like dhcp and avahi work, as well as load different connection tracking helper modules for ftp and irc. It also prevents logging of particularly noisy services (like CIFS)20:31
jdstrandYou then can add new rules via the command line:20:31
jdstrand$ sudo ufw allow http20:31
jdstrand$ sudo ufw limit from 192.168.0.0/16 port 22 proto tcp20:31
jdstrandoops20:31
jdstrand$ sudo ufw limit from 192.168.0.0/16 to any port 22 proto tcp20:32
jdstrandand delete rules with:20:32
jdstrand$ sudo ufw delete allow http20:32
jdstrand$ sudo ufw delete limit from 192.168.0.0/16 to any port 22 proto tcp20:32
jdstrandYou can also see the status of the ufw added rules in the running firewall20:32
jdstrandwith:20:32
jdstrand$ sudo ufw status20:32
jdstrandStatus: loaded20:32
jdstrandTo                         Action  From20:32
jdstrand--                         ------  ----20:32
jdstrand22/tcp                     ALLOW   192.168.2.0/2420:32
jdstrandQUESTION: why ufw is adding both TCP and UDP if not specified?20:33
jdstrandwell, it doesn't know which you want unless you specify it20:33
jdstrandhowever, ufw has integration with /etc/services, so you can do something like:20:34
jdstrand$ sudo ufw allow http20:34
jdstrandbecause /etc/services only defines tcp for port 80, ufw will only open tcp port 8020:34
jdstrandQUESTION: is there any shortcut to delete rules, instead of  writing entire rule?20:35
jdstrandno20:35
jdstrandWhat is interesting about adding rules via the ufw command is that they are added t the running firewall as well as saved to configuration files.20:35
jdstrandAs such, adding and deleting rules typically does not require reloading of the firewall (but where a reload is needed, ufw handles it for you automatically).20:35
jdstrandNew in the Intrepid Ibex is application integration. This allows packages to add profiles to ufw, which users can then reference by name.20:35
jdstrandFor example, the apache package in Ubuntu declares three profiles-- Apache, Apache Secure, and Apache Full, which correspond to ports 80/tcp, 443/tcp and 80,433/tcp respectively. A user could then do:20:35
jdstrand$ sudo ufw allow 'Apache Full'20:36
jdstrandto open tcp ports 80 and 443. This a particularly handy with more complicated protocols like CIFS. Eg:20:36
jdstrand$ sudo ufw allow Samba20:36
jdstrandwill open udp port 137 and 138 as well as tcp ports 139 and 445.20:36
jdstrandYou can get arbitrarily complicated and mix and match application rules with regular rules by using the extended syntax:20:36
jdstrand$ sudo ufw allow to 192.168.2.3 app Apache from 192.168.0.0/16 port 80,1024:65535,808020:36
jdstrand$ sudo ufw status20:36
jdstrand...20:36
jdstrand192.168.2.3 Apache         ALLOW   192.168.0.0/16 80,1024:65535,808020:36
jdstrand$ sudo ufw status verbose20:36
jdstrand...20:36
jdstrand192.168.2.3 80/tcp (Apache) ALLOW   192.168.0.0/16 80,1024:65535,8080/tcp20:36
jdstrandYou can see a list of available profiles with the 'app list' command. Eg:20:36
jdstrand$ sudo ufw app list20:37
jdstrandAvailable applications: Apache Apache Full Apache Secure CUPS OpenSSH20:37
jdstrandApplications that currently have ufw integration (Intrepid only) are apache, bind, cups, dovecot, openssh, postfix, and samba (thanks nxvl and didrocks!).20:37
jdstrandPlease note that installing a package will *not* add any rules or open any ports on your firewall.20:37
jdstrandThe 'ufw' cli command provides a lot of functionality, and it very useful for a lot of people, but sometimes more functionality is needed. ufw as a whole allows administrators to take advantage of ufw's ease of use and adjust the firewall as much as desired by using various iptables chains.20:37
jdstrandThe ufw cli command manipulates the ufw[6]-user* chains, but administrators can also modify ufw[6]-before* and ufw[6]-after* chains via /etc/ufw/*.rules files.20:37
jdstrandEg, an incoming ipv4 packet will traverse through ufw-before-input -> ufw-user-input -> ufw-after-input. So an admin can add NAT and forwarding rules to these chains, but still do things like 'ufw allow 25/tcp'.20:37
jdstrandDon't want avahi to be allowed? Adjust /etc/ufw/before*.rules.20:38
jdstrandNeed to enable port forwarding and NAT in your virtual machines? Adjust /etc/ufw/before*.rules and /etc/ufw/sysctl.conf.20:38
jdstrandWant to do egress filtering or add different commenction tracking helper modules? You can do it. Anything you can do with ip[6]tables, you can do within the ufw framework.20:38
jdstrandThe implementation achieves this by:20:38
jdstrand- using iptables-save/iptables-retore syntax in config files20:38
jdstrand- using 3 sets of chains-- before, user and after. Rules managed with the ufw command are added to the 'user' chains, with before and after chains configurable by administrator20:38
jdstrand- when possible, modifying the chains in place, rather than reloading the full ruleset, which reduces connection dropping20:38
jdstrand- uses iptables comments for application rules20:38
jdstrandBasically, ufw not only provides an easier way to deploy and use a firewall, it provides application integration with Ubuntu applications and a ready to use framework for administrators requiring advanced functionality.20:39
jdstrandQUESTION: why you chose to have uppercase in package name?20:39
jdstrandthe package name can be whatever is in the supplied package profile20:39
jdstrandwhat is in there is typically the marketing name of the software20:40
jdstrandeg OpenSSH20:40
jdstrandand that's pretty much it for ufw. wgrant?20:40
keesI think wgrant is missing -- it's very very early in the morning for him.20:41
keesI'll add some more details about working with ubuntu-cve-tracker20:41
mazaalaijdstrand: tnx for ufw, it really useful, and make my life a lot easier20:41
jdstrandmazaalai: glad you like it! :)20:41
keesOnce you have a local branch of ubuntu-cve-tracker, the first thing to do is read, surprisingly, the README file.  :)20:41
keesfrom there, the structure of the CVE files in active/, retired/, and ignored/ will be more clear.20:42
keesAnyone interested in helping triage CVEs and their impact on various Ubuntu releases is encouraged to join our efforts.20:42
* mazaalai rising hand20:42
jdstrandI forgot to mention something else wrt ufw20:44
jdstrandthere is quite a bit of documentation on it, which can be seen:20:44
jdstrandhttps://help.ubuntu.com/8.04/serverguide/C/firewall.html (hardy)20:44
jdstrandhttp://doc.ubuntu.com/ubuntu/serverguide/C/firewall.html (intrepid)20:44
jdstrandhttps://wiki.ubuntu.com/UbuntuFirewall20:44
jdstrandand of course 'man ufw'20:45
keesfor people interested in helping with any aspect of Ubuntu Security (be it ubuntu-cve-tracker, ufw, patching, etc), the #ubuntu-hardening IRC channel is the best place to coordinate and ask questions.20:45
keesAnd the SecurityTeam wiki has information (but needs some work too)20:45
keesThat's all we've got prepared for today.  Are there any other questions?20:45
keesalright then, thanks!  Next up at 20:00 UTC will be Kernel Discussion with Ben Collins.  :)20:47
jdstrandIs there mentoring available for the security team -  or what would you recommend we do if we wanted to start  contributing?20:47
jdstrandkees: ^20:47
jdstrandI'll field it20:47
jdstrandbasically, people wanting to contribute to the Ubuntu Security team can do so in any of the ways kees mentioned20:48
jdstrandif people are wanting to patch a package, then the best thing to do is discuss it in #ubuntu-motu20:48
jdstrandthat way others from MOTU-Swat can guide you through the process20:49
jdstrandwhen the patch is ready, attach a debdiff that follow SecurityUpdateProcedures to a bug20:49
jdstrandkees or I will then review it, provide feedback and publish it20:50
jdstrandmembers of motu-swat as well as kees and I are available for questions and help when needed20:50
jdstrandQUESTION: with the new hardening options, how does Ubuntu compare to other distributions or free OSs?20:54
keesjdstrand: heh, good question20:55
keesIntrepid will basically be on par with with Fedora and RHEL.  In the past, not many of the compiler hardening options were enabled (it's a tricky problem for how Debian packages are built, compared to how RPMs are built)20:56
keesA major difference to Fedora is our use of AppArmor by default instead of SELinux.20:56
keesSo on MAC systems, we're more like SuSE (which uses AppArmor)20:56
jdstrandis most or all of grsecurity now included in Ubuntu?20:56
jdstrand(or its functional equivalent)20:57
keesgrsecurity has a lot of misc kerne hardening features.  many aren't appropriate for general use, though many people ask about PaX.20:57
keesmost of the elements of PaX (namely Address Space Layout Randomization) are in the mainline linux kernel now, so everyone gets it.20:58
keesFedora published this great chart: http://www.awe.com/mark/blog/200801070918.html20:58
keesdiscounting the SELinux bits, Intrepid can make the same claims as Fedora 8 in that chart.20:58
keeswell, except NX emulation, which we don't think is worth the performance hit20:59
jdstrandto clarify, we do have apparmor, and selinux is now available as a viable option in Ubuntu20:59
keesokay, thanks again everyone!  we gotta clear out for BenC.  :)20:59
BenCHello21:05
* BenC is wondering if there's a format, or does he just start talking21:05
charliebhi BenC21:05
charliebBenC: join #ubuntu-classroom-chat also, there will be questions.21:06
BenCAlso, is there someone fielding questions for me, or do I need to do it myself?21:06
davfigueBenC: you can ask for a volunteer :)21:06
BenCdavfigue: are you volunteering? :)21:06
davfigueBenC: sure21:07
BenCdavfigue: Thanks21:07
BenCOk, I'll start out with an overview, and bring up some topics, and hopefully grab some questions afterwords21:08
BenCNot sure if any of my fellow kernel guys are here to help, but I can poke them if needed21:08
BenCIf any of you are following intrepid's kernel, you've probably noticed some huge changes during intrepid's cycle21:09
BenCI'll list some major highlights:21:09
BenC* main kernel source only builds supported architectures (x86 and x86_64)21:09
BenC* nvidia/fglrx are not built as dkms packages21:10
BenC* linux-restricted-modules has been repackaged21:10
BenC* linux-ubuntu-modules has been merged into the ubuntu/ subdirectory of the main kernel source21:10
BenC* crashdump facility has been completed and integrated21:11
BenC* fallback kernel (last-good-boot) has been implemented21:12
BenCVarious other things I've since forgotten21:12
BenCWe mainly wanted to change things up and see what we could accomplish this time around21:13
BenCSo now, to keep from covering things people have no interest in, I'll take questions :)21:14
charliebBenC: what means that fglrx/nvidia are not build as dkms? when i install fglrx, the package tries to build with dkms.21:14
BenCs/not/now/21:15
BenCThat's new in intrepid21:15
charliebBenC: i use intrepid (2.6.27-2). and there is dkms.21:16
gQuigsHow is the transition going to dkms/ what works?21:16
BenCcharlieb: right, that's what's supposed to be there :)21:16
BenCcharlieb: I said "not" but I meant to type "now built as"21:17
BenCgQuigs: the transition started pre-hardy21:17
BenCMatt Domsch helped that a lot21:18
BenCWe plan on moving all of our external modules (IOW, all of lrm) to dkms21:19
charliebBenC: why is there no more openvz-support for intrepid ?21:19
BenCcharlieb: openvz was supported by the vendor, not us...we rely on them to provide us patches for it21:19
gQuigsare linux-ports stuck on 2.6.25 for intrepid?21:22
BenCI wouldn't say stuck21:22
gQuigs*planning on?21:23
BenCWe started ports out on the latest stable release21:23
BenCIn the hopes that community ppl interested in the ports would pick up the ball and run21:24
BenCBut no one ever did21:24
gQuigsso... what would the plans for it be next cycle? assuming no community members pick it up?21:25
BenCWe'll move it forward to the latest stable, get it building, and let it continue again21:26
BenCIt wont stagnate, but it could definitely use some love (unless it's working perfectly, in which case, no reason to mess with it)21:27
devfilBenC: usually what are the patches applied by Ubuntu to the "original" kernel?21:28
BenCdevfil: they fall into two categories21:29
BenC1) Patches like apparmor that we put into place to support features we want21:29
devfiland?21:30
BenC2) Patches we pull from upstream or write to fix bugs (usually trivial things)21:30
BenCAny questions on the move to 2.6.27?21:34
gQuigsI noticed virtualbox still requires 2.6.26, how many more things are in the same boat?21:35
BenCWhy does vbox require 2.6.26?21:35
BenCI thought for sure we put fixes in to help with that21:35
gQuigserr, at least the version in the repositories isn't updated for 2.6.27 yet21:36
BenCis vbox using dkms to build it's kernel modules?21:36
BenCif not, that's a problem with vbox's packaging :)21:36
gQuigsit doesn't look like it uses dkms21:37
BenCI suggest filing a bug then21:38
smb_tpNot currently but it would be a good move, as Ben said21:39
BenCIf it isn't using dkms, then it is going to have to keep up post-release with security updates anyway (which is nothing to do with 2.6.27)21:39
devfilBenC: what do you think about prefetch (https://blueprints.launchpad.net/ubuntu/+spec/prefetch)? there is a chance to have it integrated in intrepid+1?21:40
BenCdevfil: I think the platform team would have to get some data to see if it's even going to help21:41
devfilBenC: prefetch + compcache (already included) should make Ubuntu more fast and a lot of people want this21:43
BenCdevfil: I can't disagree with you, but we need actual data points to make the patching of stock kernel source warranted21:44
BenCif it only gives a 1% speedup, that's not worth the extra effort21:44
devfilyou're right21:45
gQuigsany chance in getting doc in startup screen about getting around badram?  (http://lkml.org/lkml/2008/3/11/319)21:46
BenCgQuigs: Not sure...might be something worth writing a spec for21:47
BenCUDS is coming up in 3 months :)21:48
gQuigswill do21:48
=== Czessi__ is now known as Czessi
gQuigswell, thank you for answering all of my questions :)21:52
BenCNo problem21:53
BenCI think I'll close with a big thanks to everyone for testing and helping to track down issues :)21:53
devfilBenC: also thanks from me21:53
davfigueBenC: thanks for all the hard job iin the kernel21:54
devfilalso thanks for all your efforts to make ubuntu kernel better and for 27 kernel version21:54
devfilyou and the rest of the team have done a very good job21:54
charliebthx, BenC21:57
=== Descenti1n is now known as Descention

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