/srv/irclogs.ubuntu.com/2010/07/16/#ubuntu-classroom.txt

jcastroakgraner: my irc session was all messed up00:52
jcastrodid everything go ok?00:52
akgraneryeppers00:55
akgranerwe only ended 10 mins before the end of the session00:56
akgranermhall119, did a great job!00:56
jcastroakgraner: awesome, so basically bueno owes mhall119 a beer!00:57
akgranerexactly!00:57
akgranerhowever if mhall119 isn't around - I'll proxy for him and drink it for him :-D00:58
jcastroI see you often enough to keep that promise, heh01:03
akgranerhehe01:04
mhall119akgraner: no stealing my drinks!01:48
mhall119ah, who am I kidding, unless it's coffee I really don't care01:49
mhall119but coffee I'll fight you for01:49
akgranermhall119, dang you weren't supposed to notice that comment :-P01:49
mhall119irssi highlights are like the answering machine for IRC01:49
mhall119I can come back hours later and see who's talking about me01:50
=== yofel_ is now known as yofel
=== nhandler_ is now known as nhandler
=== ext2 is now known as ext3
=== jsimmons_ is now known as jsimmons
=== drdanz_ is now known as drdanz
=== warp11 is now known as warp10
delcoyotehi15:57
=== pl is now known as Guest78739
maja87hey16:21
dholbach W E L C O M E   E V E R Y B O D Y16:50
dholbach… to the last day of https://wiki.ubuntu.com/UbuntuDeveloperWeek16:50
dholbachI hope you all are having a great time16:50
dholbachif you weren't around in all of the sessions, just check out the logs on https://wiki.ubuntu.com/UbuntuDeveloperWeek16:51
dholbachthanks a lot to everybody who's participating to make this such a great event16:51
dholbachif you're here for the first time today, please also head to #ubuntu-classroom-chat (if you're not using lernid or in the channel already)16:51
dholbachbecause that's where all the chatter and questions for the presenter happen16:51
dholbachjust make sure you prefix your questions with QUESTION: so they stand out16:52
dholbachfirst today is going to be Michael mhall119 Hall, who will talk a bit about Django, why it's awesome and why it should be a natural choice as a web framework if you want to avoid pain and instead enjoy what you're doing16:52
dholbachhave a great day every one, you still have 7 minutes to relax a bit before mhall119 gets cracking16:53
mhall119While we're waiting, if anybody isn't familiar with Django, please take a quick look here: http://www.djangoproject.com/16:56
mhall119also, if you plan on following along with our actual code, you might want to go ahead and sudo apt-get install python-django16:56
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Django And You - Instructor: mhall119
mhall119alright, time to get things started17:01
mhall119First off, my name is Michael Hall, I'm a software developer for the Moffitt Cancer Research Center in central Florida17:01
mhall119We use Django extensively for internal applications that support our medical research studies17:02
mhall119I'm also one of the loco-directory hackers (http://loco.ubuntu.com), which is also based on Django17:02
mhall119Django is a web application framework for Python, it's a lot like J2EE is for Java, only much much easier17:03
mhall119You can get Django from http://www.djangoproject.com/ or apt-get install python-django if you're on Ubuntu17:04
mhall119today's class is going to be 2 hours long, which still isn't enough time to cover everything you can do with Django17:04
mhall119so we're going to be covering enough to get a very simple web app up and running17:04
mhall119there will be code involved, if you have django I'll help you get it up and running on your local box17:05
mhall119if you don't have Django, I still recommend getting the code with us, so you can follow along17:05
mhall119in the first hour, we'll just be getting django setup with a very simple "hello world" type app17:06
mhall119in the second hour we'll start creating data models, which is where django really makes programming fun and easy17:06
mhall119so if you can stick around for both session, I'd highly recommend it17:06
mhall119before we get started, any question on Django in general?17:07
mhall119< saji89> QUESTION:does a web framework differ from a CMS?17:07
mhall119yes, a web framework is more low-level than a CMS17:07
mhall119at it's most basic, it run redirects queries to a URL to come piece of code you've written to handle it and return a response17:08
mhall119 < abuazzam> QUESTION is there any alternative to django? why django is better? sorry for my  english17:08
mhall119Yes, there are alternatives.  Zope is another python web framework, it's what Launchpad is built on17:09
mhall119I don't have as much experience with Zope, so I won't go into which is better or why17:09
mhall119any other questions before we start working on code?17:10
mhall119okay17:10
mhall119if you have Django installed, it provided a command line tool to help you bootstrap your project17:11
ClassBotabhijit asked: i know about qunta plus. is django similar to it?17:11
mhall119I'm not familiar with qunta, sorry17:11
mhall119okay, so to start a django project, you run django-admin $projectname17:12
mhall119for these classes, we're going to make a cookbook app17:12
mhall119so I ran: django-admin startproject cookbook17:12
mhall119sorry, forgot the "startproject" command in the first example17:12
mhall119instead of doing that, I'd like everyone to run this: bzr branch -r tag:mkproject lp:~mhall119/+junk/cookbook17:13
mhall119that will get you a copy of my cookbook branch as it is after running startproject17:13
mhall119sorry for the confusion, it seems you need to have an ssh key registered with Launchpad to run the bzr command17:17
mhall119those who don't can view the code here: http://bazaar.launchpad.net/~mhall119/+junk/cookbook/revision/117:18
mhall119as you'll see, Django creates a few files for you, I'll quickly go over each17:18
mhall119manage.py is going to be the script you use to work with your project17:19
mhall119you'll see more of that later17:19
mhall119settings.py is where you configure your project, giving it DB connection information, telling it which apps to include, etc17:19
mhall119A django project is comprised of multiple django applications, which means you can mix and match existing applications with your own custom ones to build your project17:20
mhall119finally, urls.py is where you map a url pattern to a python function that will handle requests to it17:21
=== abhijit_ is now known as abhijit
mhall119okay, so next we need to create our custom application17:21
mhall119for that I ran "django-admin startapp recipes"17:21
mhall119but you don't have to do that17:22
mhall119if you have the bzr branch, just run bzr pull -r tag:mkapp17:22
mhall119that will update your local copy with the app's files17:22
mhall119this creates a "recipes" folder under your project folder17:22
mhall119( I should have said to cd into the cookbook project folder first)17:23
ClassBotnite asked: what do you need to have to work withdjango?17:23
mhall119all you need is python and django17:24
mhall119you can also run Django behind apache, using mod_wsgi or mod_python17:24
mhall119but django has a built-in web server that is very useful for local development17:24
mhall119that's what we'll be using today17:24
ClassBotNervengift95 asked: is there a difference between the bzr branch and the files created by the django commands?17:24
mhall119nope, I ran those command and commited the files they created directly into the branch17:25
ClassBotabhijit asked: do I need to know python to use django?17:25
mhall119yes, since you will be programming a web app, you will need to know the language17:25
mhall119this is another way a web framework differs from a CMS17:25
mhall119but python is very easy to learn, so don't let that discourage you17:26
ClassBotsaji8973 asked: So, bzr is not an absolute requirement?17:26
mhall119correct, you don't need bzr to use django,  I'm just using it for this class17:26
mhall119okay, moving on17:26
mhall119you should now have your 'recipes' app folder, lets look at what's in there17:27
mhall119models.py you can ignore for now, we'll come back to that in the next hour17:27
mhall119test.py we're not going to touch on at all, that's a topic for another day17:27
mhall119so that only leaves us with views.py17:27
mhall119for those who can't get bzr working, you can look at the files here: http://bazaar.launchpad.net/~mhall119/+junk/cookbook/revision/217:28
mhall119as you can see, views is currently empty17:28
mhall119Django follows a Model-View-Template model, which is analogous to MVC17:29
mhall119a Django view is nothing more than a Python function that takes an HttpRequest object as an argument17:29
mhall119so if you run: "bzr pull -r tag:welcome" we'll get our first view17:30
mhall119now if you look at views.py, you will see our first view17:32
mhall119it also made a couple changes to cookbook/settings.py and cookbook/urls.py17:32
mhall119in settings.py, we added our 'recipes' app to the INSTALLED_APPS array17:33
mhall119at the bottom of the file17:33
mhall119that tells Django that we want to include that app in our project17:33
mhall119above it you see some of Django's built in apps that are installed by default to give you the functionality you'd expect from a web framework17:34
mhall119next if you look at urls.py, you'll see we added a single entry at the bottom17:34
mhall119this tells django that any request to this server who's path matches '^welcome/', pass the request on to the welcome function17:35
ClassBotError404NotFound asked: Is it really essential to have an application? We can host views.py urls.py models.py and other such in project directory and access them. Which is better and why? Also how does Django compare to its PHP alternates such as Zend, CakePHP?17:35
mhall119true, your views can exist outside of application directories17:35
mhall119but using applications helps keep your code separate and modular17:36
mhall119which helps reusability and readability17:36
mhall119I'm not familiar enough with PHP frameworks to make a comparison17:36
mhall119okay, now that we have our app and our view, it's time to see it in action17:37
mhall119from the project's directory, run: ./manage.py runserver17:37
mhall119this will start Django's built-in webserver on http://127.0.0.1:8000/17:38
mhall119if you go there in a browser, you will see a lovely 404 page like this: http://family.ubuntu-fl.org:8002/17:38
mhall119why the 404?17:39
mhall119because the only URL we have mapped is /welcome, Django doesn't know what to do with just /17:39
mhall119try it again with /welcome at the end17:40
mhall119you should see something more like http://family.ubuntu-fl.org:8002/welcome/17:40
mhall119which is nothing more than the text string we put into our HttpResponse object in our welcome view17:40
mhall119as Error404NotFound just mentioned, you will see that page a lot when writing your django app, as well as the 500 error page17:42
mhall119the 404 shows you what url patterns Django is looking for, so if you have a typo or something, it makes it easy to compare and find17:42
mhall119the 500 page will give you a stacktrace of the calls leading up to the error, as well as the values of local variables in those calls, it's very useful for tracking down the source of errors17:43
mhall119now, as easy as it is to throw a string into HttpResponse and return it, you don't really want to do that for an entire page of HTML17:44
mhall119so Django provides a built-in templating system17:44
mhall119if you now run: "bzr pull -r tag:addtemplate" you will see how that works17:44
mhall119that revision pulls in recipes/media and recipes/templates directories17:45
mhall119by default, Django will look for template files in $app/templates/ for any installed application17:45
mhall119(another good reason for using applications)17:46
mhall119if you take a look at templates/welcome.html, you'll notice it's not 100% HTML17:46
mhall119it contains markup for Django's custom template language17:46
mhall119you can't use straight Python in Django templates, which makes them a little less powerful by themselves compared to regular PHP17:47
mhall119but it does make them very fast17:47
mhall119and you can extend the template language with your own tags (which we won't cover today, sorry)17:47
mhall119right now the only tag we're using in welcome.html is {{MEDIA_URL}}17:48
mhall119Django templates use {{ }} for variable substitution17:49
mhall119which means MEDIA_URL is a variable name in teh templates context17:49
mhall119how did it get there?  take another look at your views.py17:49
mhall119now, instead of returning an HttpResponse object, we're calling render_to_response17:49
mhall119which itself is just a helper function that renders the template to an HttpResponse object for you17:50
mhall119the first parameter is the name of the template file to use17:50
ClassBotThere are are 10 minutes remaining in the current session.17:50
mhall119the second is a python dictionary of name/value pairs, this is the template's context17:50
mhall119recipes.MEDIA_URL is defined in cookbook/recipes/__init__.py, it's just a base URL path for the recipes/media folder17:51
mhall119if you look again at cookbook/urls.py, you'll see that there is an extra line mapping urls with that base to Django's built-ind static.serve view17:52
mhall119if you are running behind Apache, you'll set your apache conf to serve those files basedon that url, bypassing Django all together, which is more efficient17:52
mhall119now if you go back to your welcome page you will see this: http://family.ubuntu-fl.org:8002/welcome17:53
mhall119and before anyone says it, I know my HTML is horrible, and my graphic is lame17:53
mhall119one last thing in this hour17:54
mhall119run: "bzr pull -r tag:showdebug"17:54
mhall119and refresh your browser17:54
mhall119you'll see now a red bar saying you're in debug mode17:55
mhall119look again at welcome.html to see how I did that17:55
ClassBotThere are are 5 minutes remaining in the current session.17:55
mhall119notice the {% if settings.DEBUG %} {% endif %} tags17:56
mhall119if/else/endif lets you conditionally display blocks of your template depending on the values of context variables17:56
mhall119in this case, it's getting the value from our settings.py file17:57
mhall119and that's the end of this hour, any question on what we've covered so far?17:57
ClassBotean5533 asked: Is there anything Django CAN'T do?17:58
mhall119At this point, I haven't figured out how to make it serve me coffee17:58
mhall119joking aside, since your views are in python, it can do pretty much anything you can do in python17:58
ClassBotlousygarua asked: how are the {% and %}'s quicker than <?php ?>?17:59
mhall119I don't know about quicker, it's just what Django uses17:59
mhall119{% %} denotes a tag, while {{ }} denotes variable substitution17:59
mhall119tags are bits of python code that operate on values passed to them, or wrapped in them18:00
ClassBotubuntufreak16 asked: You mentioned about the red bar with debug mode but that didn't happen for me is it because i use chromium ?18:00
mhall119I'm using chromium, so that's not it18:00
mhall119did you do the last bzr pull?  Also, check that settings.py DEBUG == True18:00
mhall119should be on line 318:01
mhall119ubuntufreak16: try restarting the django server then, you usually don't have to do that though18:01
ClassBotNervengift95 asked: i get a 404 that /welcome doesn't match ^welcome$ whats wrong?18:02
mhall119make sure you don't have a / at the end of the url18:02
mhall119this is my mistake, I removed it from the original url pattern at some point18:02
mhall119okay, I'm going to take a 2 minute break, let everyone run to the restroom or refill their coffee18:03
mhall119because the next hour is going to be kind of fast, and you won't want to miss any of it18:04
mhall119okay, everybody back now?18:07
=== tsduncan_ is now known as tsduncan
mhall119alright, I hope everyone is back by now18:09
mhall119so, if Django views are simple, Django models are magic18:09
mhall119models are really at the heard of most Django applications, they define the data records you're going to be working with throughout your app18:10
mhall119and Django provides a very nice ORM layer between your model definitions and your database tables18:10
mhall119run "bzr pull -r tag:addmodels"18:11
mhall119first, lets look at the changes this made in our settings.py18:12
mhall119on line 12, we specified that the DATABASE_ENGINE we'll be using is sqlite318:12
mhall119Django should make it so you never have to care about what database you're using18:12
mhall119and sqlite is convenient for development18:13
mhall119at Moffitt, we use sqlite3 for development, and MySQL or Oracle in production18:13
mhall119on line 13, we specify the file name to use for our Sqlite3 database18:13
mhall119now let's look at recipes/models.py18:14
mhall119in it you'll see that I've defined 4 data models for our cookbook application18:14
mhall119Django models are Python classes that extend django.db.models.Model18:15
mhall119in them, you define the fields your model will have18:15
mhall119Django comes with many predefined field types that will most likely cover everything you need18:16
mhall119the full list can be found here: http://docs.djangoproject.com/en/1.2/ref/models/fields/#ref-models-fields18:16
mhall119but you can also make your own custom fields if you ever needed to18:17
mhall119the first 2 models, Category and Ingredient, are pretty basic, they just contain a character field called "name"18:17
mhall119most of what we're interested in is in the Recipe model18:17
mhall119here we can create links to other models with the ForeignKey and ManyToMany field types18:18
mhall119category links a Recipe record to one Category record (a Category record can be linked to zero or more Recipes)18:19
mhall119and ingredients links one or more recipes to one or more ingredients18:19
mhall119if you don't include the "through" parameter on the ManyToMany field, Django will create the necessary linkage for you18:20
mhall119but in this case, I wanted to add additional information to that linkage, so I created another Measurement class18:20
mhall119this lets me add a quanity and unit field to the relationship between recipes and ingredients18:20
mhall119notice also that I am giving the "unit" field a list of choices18:21
mhall119Django will automatically create HTML form elements for you, based on your model definitions, and the "choices" parameter will make this field a <select>, rather than an <input>18:21
mhall119now that we have our model definition, Django can use them to build out database tables18:22
mhall119so we don't need to write any SQL create statements, or thinking about table structure18:22
mhall119Django does that all for us, and in a surprisingly efficient manner18:22
mhall119so, from your cookbook/ project folder, run ./manage.py syncdb18:23
mhall119syncdb tells Django to update the database with tables for any new models18:23
mhall119since we're using sqlite3, it will also create the cookbook.db file in our project's folder18:23
mhall119any questions so far?18:24
ClassBotean5533 asked: What if you want to change your model? Does Django gracefully change the database structure?18:25
mhall119the short answer is no, syncdb is only smart enough to create a table if it's missing18:25
mhall119if you add or remove fields from your model after the fact, it won't touch the tables18:25
mhall119the long answer is "yes", but with the help of a Django application called South18:25
mhall119http://south.aeracode.org/18:26
mhall119South takes snapshots of our model defintions as you change them, and lets you automatically "migrate" your table structures to add or remove columns18:26
mhall119we have recently started using South at Moffitt, and also in the loco-directory project, and I've been very impressed with it18:27
ClassBotlousygarua asked: can you elaborate more on the ManyToMany field? I don't understand what it does18:27
mhall119basically, it will create an intermediate table, with foreign key links to both the model tables18:27
mhall119since we provided the Measurement model, and it has foreign key fields to both Ingredient and Reciple, it will use that18:28
mhall119I hope than answers your question18:28
ClassBotubuntufreak asked: when i tried the command it showed me the Django's auth system to define a superuser, what is its purpose ?18:28
mhall119ah yes, in settings.py we have django.contrib.auth as one of our INSTALLED_APPS18:29
mhall119this gives us a user/group system to use in our project18:29
mhall119and as part of the setup for that app's models, it's going to ask you to create a superuser18:29
mhall119for this demo, just use root/password18:29
mhall119we won't really go into using access controls, but the Auth system is what lets you require user accounts and logins18:30
mhall119< ubuntufreak> mhall119, is it a one-time process specific to the app18:30
mhall119yes, it'll only ask you for that when you syncdb for the first time with the Auth app18:30
mhall119another very useful app that comes with Django is the Admin app18:31
mhall119django.contrib.admin18:31
mhall119which gives you a very generic interface to add/modify/delete records based on your model definitions18:31
mhall119do use it, we need to add it to our INSTALLED_APPS, create a url pattern for it, and most importantly tell it about our models18:32
mhall119so run "bzr pull -r tag:addadmin" from your project folder18:32
mhall119in settings.py, we just added django.contrib.admin to our INSTALLED_APPS list18:33
mhall119and in urls.py we uncommented the lines to enable it18:33
mhall119finally, we added the file recipes/admin.py18:33
mhall119let's take a look at that real quick18:33
mhall119the first three are very simple, we just register the model with the admin site, and it will use the field definitions in them to build our interface18:34
mhall119but for Recipe, we want to add a little bit more18:34
mhall119we want to be able to add/remove Measurement items from the same form18:34
mhall119so we create an "Inline" form for them, and then create a custom Admin interface for Recipe, specifying that we want to inline forms for Measurements18:35
mhall119otherwise we'd have to go define all our measurements in one place, then the recipe in another18:36
=== jack is now known as Guest6596
mhall119next, we need to run ./manage.py syncdb again18:36
mhall119why again?18:36
mhall119well, because we added the Admin app to our project, so we need to create whatever tables it needs18:37
mhall119in this case, it's just a LogEntry table, for tracking changes you make from the admin app18:37
ClassBotNervengift95 asked: how do I create a superuser when i said i didn't want one during syncdb?18:38
mhall119I'm not sure how to make one after the fact, since we're just getting started you can simply delete cookbook.db, and run syncdb again18:38
mhall119you will want a superuser account for the next step18:38
mhall119now if you point your browser to /admin/ you will see the login screen for the admin app18:40
mhall119like this: http://family.ubuntu-fl.org:8002/admin/18:40
mhall119once you log in, you'll see your models listed under the Recipes app18:40
mhall119from there you can add/change/delete your records18:41
mhall119for the sake of time, though, just download http://people.ubuntu.com/~mhall119/cookbook.db and copy it over your current cookbook.db18:41
mhall119then you can see that I've got all the fixing for a delicious plate of Spaghetti18:43
mhall119okay, gonna have to rush through the rest, so hang on18:44
mhall119run "bzr pull -r tag:recipeview"18:44
mhall119you will see that I added a new view function called show_recipe18:44
mhall119with a new line in urls.py, mapping the path /recipe/(\d*) to that view18:45
mhall119the (\d*) regular expression will match any number, and that number will be passed as the second argument to our view function18:46
mhall119in this case, it will be the internal recipe_id18:46
mhall119also, I am not a chef, this is the spaghetti I make when it's my turn to cook18:46
mhall119don't mock it18:47
mhall119now if you go back to your /welcome page, you will see our spaghetti entry listed as a link18:47
mhall119click that link, and you'll go to our new view page18:47
mhall119that view uses the recipes/templates/recipe.html template18:48
mhall119in there you see that we use the {{ }} substitution to put the values for our recipe's fields where we want them18:48
mhall119we can also loop over the ManyToMany field using the {% for value in list %} tag18:49
mhall119okay, one last step, let's add a search form18:49
mhall119bzr pull -r tag:searchform18:49
mhall119then look at recipes/forms.py18:51
mhall119we define forms in much the same way we defined models, they are a python class that extends django.forms.Form18:51
mhall119and contains fields of different types18:51
mhall119these are different from our model field types18:51
mhall119form fields can be found here: http://docs.djangoproject.com/en/1.2/ref/forms/fields/#ref-forms-fields18:52
mhall119and again you can make your own if you ever needed to18:52
mhall119Django forms are also magical18:52
mhall119they not only handle building the HTML elements to display our form, they also parse the values out of the submit request, and validate them against the field type18:53
mhall119you can also add your own clean_$fieldname methods to your form, to perform extra validation18:53
mhall119now if you go back to your /welcome page, you will have a search box at the top18:53
mhall119type in "taco" and hit search, and you'll get nothing18:54
mhall119type in "spa" and hit searh, you get Spaghetti18:54
mhall119the magic behind all that is recipes/views.py lines 13 to 17, only 4 lines!18:54
mhall119not covered here, but something you will use, is the ModelForm18:55
mhall119ModelForm takes a model definition, and automagically created a Form based on it's field definitions18:55
mhall119it also performs validation based on not only the field type, but any additional restrictions you have18:56
mhall119remember how Measurement.unit has an array of choices?  Not only will the ModelForm render that as a <select> field, but if the submitted value isn't in the choices list, it will fail validation and tell the user so18:56
mhall119any questions in our remaining few minutes?18:57
mhall119before I go, I want to mention again the loco-directory project: https://launchpad.net/loco-directory18:57
mhall119this is the code behind loco.ubuntu.com18:57
mhall119we are always looking for new contributors, and I just taught you everything you needed to know to get started18:58
mhall119we label quick and easy fixes as "bitesize" bugs, and they are perfect for getting started: https://bugs.launchpad.net/loco-directory/+bugs?field.tag=bitesize18:59
mhall119the developers hang out in #ubuntu-locoteams most of the time, so if you need help getting loco-directory setup just come in and ask18:59
mhall119but mostly if you follow the directions in the INSTALL file, you'll be up and running in no time18:59
mhall119any other questions?19:00
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Adopt-An-Upstream - Instructor: jcastro
jcastroHi everyone!19:01
jcastroThis class will be about Adopt an Upstream19:01
jcastrothanks for coming, let's get started!19:01
jcastroFirst of all, what is an upstream19:01
jcastroand why should we adopt them?19:02
jcastroImagine that "Ubuntu" as a distribution sits on a river19:02
jcastrowe take software from large projects, GNOME, KDE, Linux, Xorg, etc.19:02
jcastroimagine that those projects are "upstream" along the river19:03
jcastrobecause their software flows down to us19:03
jcastroinbetween us an upstreams on this river is Debian19:03
jcastroand further "downstream" from Ubuntu you have things that are derivatives from Ubuntu19:03
jcastroThings like Linux Mint, etc.19:03
jcastro(sorry my linode disconnected me)19:04
jcastrook so on this big "Free Software river" we have all these projects19:05
jcastroso when you hear people talking about "upstreams", they're usually referring to a project that we ship in Ubuntu19:05
jcastroso for example, the rhythmbox folks, Mozilla, Miro, couchdb, etc. are all examples of upstream projects19:05
jcastrosince the software flows downstream (like a boat)19:06
jcastrothings need to flow upstream.19:06
jcastroBugs about the software19:06
jcastropatches that potentially fix the software19:06
jcastrofeedback on the software19:06
jcastrothings like that19:06
jcastroand like swimming upstream, it takes effort, patches and bugs don't magically flow upstream19:07
jcastroso like on rivers with dams, we can build little fish elevators so stuff can flow back.19:07
jcastrothis "flow", "circle of life", or whatever you want to call it needs to be efficient, or bad things can happen19:07
jcastroFor example, when we started actually measuring the amount of patches sitting in Launchpad waiting for review ...19:08
jcastrowe found /over 2500/ patches.19:08
jcastrohttps://wiki.ubuntu.com/OperationCleansweep19:08
jcastroso we started this19:08
jcastroto start getting those fixes and patches reviewed, and upstream.19:08
jcastroAny questions so far?19:09
=== warp10 is now known as warp10_
jcastro(bah one sec)19:09
jcastro< simar> QUESTION: Are there projects that are created on launchpad with no upstreams..19:10
jcastroin those cases the project themselves are the upstream19:10
jcastronot everything is in Debian and/or Ubuntu19:10
jcastroand even in the case of software that we make for ubuntu, the same flow applies19:10
jcastroso for example, the software-center is an upstream19:10
jcastrook, so now that you know about the river, let's talk about some of the things you can do to make this flow be more efficiently19:11
jcastroas I talk about some of these things you're going to think it's all common sense19:12
jcastroand "wow, how come people just aren't doing that every day?"19:12
jcastroSo, with over 20k packages in our archive, it can be tough to keep track of all this stuff19:13
jcastroso, we know we have users who care about stuff19:13
jcastroand we know we have upstreams who always wouldn't mind extra help19:13
jcastroso, what if we connected people who are passionate about software with the upstream?19:13
jcastroso, we created adopt-an-upstream19:14
jcastrowhich is basically explained here: https://wiki.ubuntu.com/Upstream/Adopt19:14
jcastrothe idea being "I care about my favorite mp3 player, so I am going to work with upstream and ubuntu developers to get things sorted"19:15
jcastrolarger projects, like our amazing MozillaTeam are larger19:15
=== warp10_ is now known as warp10
jcastrohowever, poor Joe Smith who started a quickly project last month might not be so lucky.19:16
jcastroSo, let me talk to you about some examples on what I do with my personal favorite piece of desktop software, Banshee19:17
jcastroI idle in their IRC19:17
jcastroI subscribe to their mailing lists19:17
jcastroI read their roadmaps19:17
jcastroand I do these sorts of things on the distro side as well19:17
jcastroI try to be the "ubuntu guy" for them.19:17
jcastroSo if they have a fix that they want out to users, I help getting them talk to the packager, etc.19:18
jcastroAnd I just don't it myself, we have people from the Debian and Ubuntu Mono teams who chip in19:18
jcastroso overall we try to basically "be there" for the upstream project.19:18
jcastroAnother place where upstreams appreciate help is bug reporting19:19
jcastrohttp://castrojo.tumblr.com/post/785661804/papercutter-profile-marcus-carlson19:19
jcastroI just blogged about a guy who not only was working on the ubuntu problems, but also helping the upstream clean up their bugs19:19
jcastroand generally Being Awesome.19:19
jcastroSo what we have is a list: https://wiki.ubuntu.com/BugSquad/AdoptPackage19:20
jcastroand basically you kind of take ownership of that package19:20
jcastroyou go through the bug reports19:20
jcastroLaunchpad makes it real easy for people to link to upstream bugs19:20
jcastrounfortunately sometimes people don't know how to make good bugs19:21
jcastroit might be missing good information, etc.19:21
jcastroAnd to be honest, who wants developers reading bugs all day? We want them fixing bugs!19:21
jcastroSo what we try to do is act as a quality filter on bugs19:21
jcastrowe weed out the junk bugs (or try to get reporters to add information)19:22
jcastroand then only forward the best bugs we can19:22
jcastroSo really, you don't have to be a rocket scientist19:22
jcastroall it really takes is someone who is willing to put one foot in each project and connect people, bugs, and patches.19:23
jcastroAny questions so far?19:23
jcastroOk, another area of things you can talk to upstreams about are some of the great tools we've made for upstream developers to use.19:24
=== MichealH_ is now known as MichealH
jcastroMaybe they need help setting up a daily build PPA.19:24
jcastroOr a stable release PPA for older Ubuntu releases.19:24
jcastromaybe they're not in Ubuntu yet, and want to know how to get into Ubuntu.19:24
jcastroor maybe they don't understand the workflow with Debian.19:25
jcastroSo since I got sick of explaining it to projects over and over again ... I just wrote them all down19:25
jcastrohttps://wiki.ubuntu.com/Upstream19:25
jcastroThe goal of this page is to give upstreams a "everything you need to know about Ubuntu in one page"19:25
jcastroit's not really new content, it just points people to existing pages.19:26
jcastroYou might be looking at this and saying "well, duh."19:26
jcastrobut remember every upstream project is different, so we can't expect them to know what a PPA, and SRU, or Notify-OSD is, for example.19:26
jcastroone of my FAVORITE things we can do for upstreams is hook them up with apport hooks.19:27
jcastroSo you've all seen when an application crashes19:27
jcastroand we gather this info, and attach it to the bug report19:27
jcastrohttps://wiki.ubuntu.com/Apport/DeveloperHowTo19:28
jcastrowe can write these to get more information19:28
jcastroSo for example, the Banshee guys are currently moving over from HAL (the old device stuff), to udev/gio/libgpod (all the new sexy bits)19:29
jcastroand they want to test this19:29
jcastrobut in order to be truly useful19:29
jcastrowe need things like the firmware version and all this kind of stuff19:29
jcastroin the past we would make a huge wiki page19:29
jcastroand say "fill in your ipod info here and link it to your bug"19:29
jcastrobut with apport hooks we can make that automatically19:30
jcastroso today I asked didrocks to whip up one for Banshee ipod testing19:30
jcastroso now users can plug stuff in, click stuff, and auto submit data.19:30
jcastroSo what I did today was talk to one of the Banshee developers19:30
jcastroand asked him how we could help. What fields of information did he need from the debug tools?19:31
jcastrowhere should we send the data?19:31
jcastrois the data we send you good enough to help you add support for that model?19:31
jcastrowhere do we send data that is so new that we need to submit that data to his upstream, libgpod?19:31
jcastrothose are the kinds of things adopters think about, and try to fix.19:32
jcastro< umang> QUESTION: I know there should be enough projects out there who could be helped. But I was still wondering whether there is a place (e.g. wiki page) where upstreams can register themselves for "we want someone familar with19:32
jcastro               Debian/Ubuntu to help us work with them"19:32
jcastrothat is an excellent question19:32
jcastroso ideally, every upstream would have a person to do this19:32
jcastrohowever we always have limited time and volunteers19:33
jcastro(which is why we always run sessions looking for more)19:33
jcastroright now the best thing to do if you need to be adopted is to add yourself to the wiki page, or ask for help on a mailing list.19:33
jcastrohttps://wiki.ubuntu.com/BugSquad/AdoptPackage19:33
jcastroso under "Packages that should really be adopted"19:34
jcastroI would just add your project there, and perhaps a note "Get in contact with me and I'll help get you started" or something like that19:34
jcastrothe people in #ubuntu-bugs and the BugSquad can help you as well19:34
jcastroand we can always do our best to help find you a person19:35
jcastro< umang> jcastro, I was asking more in terms of finding upstreams that could do with help.19:35
jcastroah, so really, that is a great question because it's all of them19:35
jcastroI know that sounds like a lame answer19:35
jcastroWhat I recommend to people is to do something you're familiar with19:36
jcastroand passionate about19:36
jcastrono one wants to spend all day working on software they hate19:36
jcastroThe big projects always need a hand (Mozilla, OOo)19:36
jcastrobut I personally prefer to pick something more in the middle. Not too big, not too small.19:36
jcastroIt's also important to remember that you are part of a larger team19:37
jcastroso don't think if you want to help OpenOffice with bugs that you're going to get swamped and killed.19:37
jcastroAnother way you can help projects is by trying to find them new volunteers.19:38
jcastroI am notorious for doing this. I basically find people who aren't busy and convince them to help a project.19:38
jcastrohttp://castrojo.tumblr.com/post/656609843/someone-want-to-help-out-redshift19:38
jcastroHere's an example19:38
jcastro< simar> QUESTION: Say I have adopted a package and aren't enough bug triagers that help with that package, one possible reason for this is that the package is not properly documented anywhere, so some odd triagers will always ask19:39
jcastro               for irrelevent information from bug filers should someone, probably who know more consider adding a wiki page on information to ask while triaging and debug procedures,,19:39
jcastroaha! awesome, I was just going to get to that19:39
=== abhijit_ is now known as abhijit
jcastrolet's look at some examples19:39
jcastrohttps://wiki.ubuntu.com/Bugs/Upstream19:40
jcastrohere's an example of some pages on where we talk about how to triage bugs in more detail19:40
jcastro(this includes forwarding)19:40
jcastroremember since every upstream is different they might have different workflows19:41
jcastroso for example, some upstreams want to see every bug, crap or not, they want them all19:41
jcastrosome want us to filter19:41
jcastrosome want patches in bugzilla, some want them in a git branch, some even (still!) want patches posted on mailing lists19:41
jcastroso here on these pages we try to document how to make that process suck less.19:42
jcastroso on these pages, the bugsquad took care of the big ones, like KDE and GNOME19:42
jcastrobut let's look at this one: https://wiki.ubuntu.com/Bugs/Upstream/Listen19:42
jcastrosomeone who cared about the Listen media player made that page19:42
jcastro< NMinker> QUESTION: Would it be smart to join a team who only pushes every other new release to (let's say) the main Maverick repo? So that issues (like kernel/program incompatibility) are fixed pushed to the main repo.19:43
jcastroABSOLUTELY19:43
jcastrolet's say you're a generalist19:43
jcastroand you are interested in the desktop19:43
jcastro(actually hold on, their page is broken, let me find a more squared away team *cough*)19:44
jcastro(almost found it, smoke if you got em)19:45
jcastrohttps://wiki.ubuntu.com/BugSquad/TODO19:46
jcastrook19:46
jcastroso in this example the BugSquad has a list of stuff that needs to get done19:46
jcastroeach team should have a list of "low hanging fruit"19:46
jcastrofor something like the kernel (which is large and has a large team), my recommendation is to just show up on IRC and ask someone for some things that need to get done19:47
jcastrohttps://wiki.ubuntu.com/DesktopTeam/GettingStarted19:47
jcastrohere the desktop team has a list of where to sign up19:47
jcastroand links to bugs you can work on19:47
jcastro< NMinker> I asked because I'm currently testing Maverick on VMware, and packaging (for open-vm-tools) available in the repo don't compile properly.  And I had to go the bug report and grab the patches needed to make it compile19:48
jcastro                 properly in Maverick and push it to my PPA.19:48
jcastroso this is my favorite kind of situation19:48
jcastrocan you link me to the bug?19:48
jcastroI'd like to take some time to talk about this19:49
jcastrobecause I'd like to close the loop on things like this19:49
jcastroso first off, this is also an example of a "service" that you can help with upstreams19:50
jcastroperhaps they have a certain patch that they are interested in, but need it tested19:50
ClassBotThere are are 10 minutes remaining in the current session.19:50
jcastrothrowing it in a PPA and letting them know about it lets them throw testers at it19:50
jcastroso in this case where you have a fix19:51
jcastroand you have it in a PPA19:51
jcastrothe best thing to do is put it in Maverick, you can do that by generating a debdiff, posting it on the bug, and testing it, and then ask a sponsor to look at it19:52
jcastrohttps://wiki.ubuntu.com/SponsorshipProcess19:52
jcastrook, any other questions? Is there an area you want me to go over again?19:52
jcastroone thing I find tremendously useful is to be the ubuntu factoid for an upstream19:53
jcastroso for example, I am mindful of when freezes are in our development process19:53
jcastroand how things might work19:53
jcastrosometimes I know an upstream will say "ah, their feature freeze is on 12 may, that means I can release on 11 may and still make it for lucid!" or whatever19:54
jcastrothis is an excellent time to get them talking to a packager or a Debian Developer19:54
jcastrobecause there is always plumbing stuff going on in a distro that upstreams might not be aware of19:55
ClassBotThere are are 5 minutes remaining in the current session.19:55
jcastroQUESTION: are there any minimal expectations from someone who adopted a package? I adopted the debian-installer packages a few months back but I think it's going to take some time to get everything really nice19:56
jcastrohttps://wiki.ubuntu.com/Upstream/Adopt19:56
jcastroI tried my best to list those at the bottom19:56
jcastroand asked some upstreams what they would expect someone like that to be19:56
jcastrofrom the upstreams I've talked to, they're happy to have someone who is willing to learn.19:57
jcastroit would suck if you signed up to help a project and ended up just getting in the way19:57
jcastrowhich is why I like to idle in IRC channels and read up on the mailing lists19:57
jcastroso I can educate myself when they're doing major changes19:57
jcastroI try to pay attention when they want to do a major feature19:58
jcastroI am always thinking "if we got that into a PPA and brought in the ubuntu hordes, we could get some great testing done."19:58
jcastroand upstreams /love/ when we can provide them with data.19:58
jcastro< NMinker> I hate when that happens, when I get in the way19:59
jcastroeveryone messes up!19:59
jcastroit's how you learn and adapt that make it all Just Work(tm) in the end19:59
jcastrook, that's it for me19:59
jcastroI hope you learned something!19:59
jcastroAnd I hope you help me provide our upstream projects with the tools they need to make people love their operating system!19:59
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: How To Help With Edubuntu - Instructor: highvoltage
highvoltageGood morning / afternoon / evening depending on where you are!20:01
highvoltageThis session is on Edubuntu, and how to get involved20:02
highvoltageIt's not as interactive as mhall119's session from earlier, and not quite as well prepared as jcastro's session20:02
highvoltageI moved from South Africa to Canada about two weeks ago, and I'm in the process of moving to a new apartment so to say that I'm all over the place at the moment is a bit of an understatement :)20:03
highvoltageIn this session, I hope to introduce you to the project and make it easy to get involved, I'll cover:20:03
highvoltage• What the Edubuntu project is,20:03
highvoltage• What we do20:04
highvoltage• Community structure20:04
highvoltage• and how you could get involved.20:04
highvoltageif there's any questions, feel free to ask at any time in #ubuntu-classroom-chat, if you append QUESTION to your question, the bot will notify my in a private message20:05
highvoltage(although at this stage in the developer week I'm sure everyone knows that by now ;) )20:05
highvoltageLet's start at the beginning, usually a very good place to start.20:05
highvoltageThe Edubuntu project takes on a quite a few tasks20:06
highvoltageons of the most important tasks is supporting, maintaining packages relating to education in Ubuntu20:06
highvoltagethat also includes bug fixes20:07
highvoltageif you followed the session on adopt-an-upstream earlier, it's like the Edubuntu team adopted all of the educational packages in the Ubuntu repositories20:07
highvoltagenot quite as formally though, but after that session we might actually do it :)20:08
highvoltageif you'd like to get involved with Edubuntu on a technical level, then bug fixes are a great place to start20:08
highvoltageyou can find a list of current bugs in the packages that we track at the following URL:20:09
highvoltagehttps://bugs.launchpad.net/~edubuntu-bugs/+packagebugs20:09
highvoltageyou'll notice that there are currently 356 open bugs being tracked20:10
highvoltageand that the packages range from educational software, to system management tools useful for classrooms and more20:11
highvoltagewhile Edubuntu tracks the bugs in these packages, most of these packages are also tracked by other teams20:11
highvoltagefor example,20:11
highvoltageltsp, ltspfs and ldm are all part of LTSP, which are maintained by the LTSP team (https://launchpad.net/ltsp)20:12
highvoltageand the kdeedu suite is also maintained by the Kubuntu team who does a great job of looking at Ubuntu's KDE packages20:13
highvoltagethere are some packages which are maintained by us only20:13
highvoltageyou could think of them as the packages for which we are upstream20:14
highvoltagethese are usually the packages that I personally give most attention to since they're vital for being able to install an Edubuntu system20:14
highvoltagethese package names typically begin with edubuntu- or ubuntu-edu20:15
highvoltageexamples are:20:15
highvoltage ∘ ubuntu-edu-preschool20:15
highvoltage ∘ ubuntu-edu-primary20:15
highvoltage ∘ ubuntu-edu-secondary20:15
highvoltage ∘ ubuntu-edu-tertiary20:15
highvoltage ∘ edubuntu-artwork20:15
highvoltage ∘ edubuntu-live20:15
highvoltage ∘ edubuntu-desktop20:16
highvoltagethe ubuntu-edu-* packages are metapackages20:16
highvoltagemetapackages are packages that don't contain any direct data, but contains information such as dependencies, so they end up just installing other software20:17
highvoltageubuntu-edu-preschool will install an application bundle for really young kids20:17
highvoltageprimary and secondary for school kids, and tertiary for post-secondary studends20:17
highvoltagewe don't write any of the educational software ourselves20:18
highvoltageinstead, we aim to put together the best of what the free software world has to offer together in an easily installable package20:19
highvoltagebefore I move on, I'd like to mention bug days20:19
highvoltageevery now and again (and we should have one scheduled again soon) we have a bug day where the team joins in on #edubuntu, and we co-ordinate and fix a bunch of bugs20:20
highvoltagewe like to do this before alpha and beta releases, this also provides a great opportunity to test the images that are generated20:20
highvoltageif you follow planet ubuntu (http://planet.ubuntu.com), you'll usually see a bunch of us blog about it20:21
highvoltageotherwise, joining the edubuntu development mailing list is probably the best way to keep up to date with events20:21
highvoltageI'll provide more details on that and how to get in touch a bit later20:22
highvoltageI'll already said quite a bit, any questions before we move on?20:22
highvoltageone of the more prominent Edubuntu projects is our Edubuntu installation disc20:23
highvoltageit takes all the meta-packages I mentioned earlier and installs it automatically as part of the installation process20:24
highvoltagethis allows very easy installation of all the education packages. It's in part being obsoleted by the software center20:25
highvoltageor at least, so we thought :)20:25
highvoltagein previous releases, we made Edubuntu an add-on cd to Ubuntu, since the packages became really easy to install via the app installer. we had quite a few users which were outraged, a lot of people want something really simple and turn-key20:26
highvoltagethat's also why we spend some energy on LTSP20:26
highvoltageLTSP is the Linux Terminal Server Project, it allows you to netboot a whole bunch of diskless machines from one machine without having to do a lot of setup work20:26
highvoltagefor Edubuntu 10.04, we integrated a graphical LTSP installer as part of the installation process20:27
highvoltageit makes it really easy for even a relatively unexperienced user to install it20:27
highvoltagealso, we've included an option to run LTSP live from the live CD20:28
highvoltagefor improved performance, you can also use the startup disk creator to create a live USB disk to test ltsp20:28
highvoltagethis is great for demoing the technology and also for users completely new to the concept to experiment with it20:28
highvoltagein addition to producing our own artwork and session packages, we also like to work with other derivatives and if possible, get their work included in the archives so that it can be easily installed on Ubuntu20:30
highvoltageour best example so far is Qimo and mhall119. We worked together to get the Qimo packages into the Ubuntu archives20:31
highvoltagenow, if someone wants to install a Qimo desktop session in Ubuntu, it's as simple as installing the qimo-session meta-package20:31
highvoltagewe'd like to do more things like this, although it's often very time consuming keeping contact with other projects (also ties in with adopt-an-upstream again)20:32
highvoltagebut mhall119 has been really great and has been really easy to work with!20:32
highvoltagethat pretty much covers what we do, in summary, we maintain a bunch of packages in Ubuntu, try to get new ones in, work with similar projects as far as we can and also produce an installable DVD that aims to make it really easy for pretty much anyone20:34
highvoltageNext I'll cover our community structure. Since we're just over half-way, are there any questions before we move on?20:35
highvoltageEdubuntu is fully integrated into the rest of the Ubuntu community20:36
highvoltagewe follow all the same procedures, we use the same build infrastructure and follow all the same rules20:36
highvoltagesome people prefer to think of Edubuntu as a completely seperate project than Ubuntu20:36
highvoltagebut that is just wrong20:36
highvoltageall of our work happens from within Ubuntu, we report to the Ubuntu Community Council and also the Ubuntu Technical Board20:37
highvoltagewe also have our own council, called the Edubuntu Council. The Edubuntu Council is a deligate to the Community Council and the Ubuntu Technical Board20:38
highvoltageif you're unfamiliar with those terms,20:38
highvoltageplease refer to the ubuntu governance page on http://www.ubuntu.com/project/about-ubuntu/governance20:39
highvoltageit's usually much easier to contribute to a project if you know how it's managed :)20:39
highvoltagebeing a Community Council delegate, the Edubuntu Council is allowed to grant Membership to people who have contributed good solid contributions over a period of time20:40
highvoltageUbuntu membership is an official recognition of work done with Ubuntu (or in our case, Edubuntu). as part of this you'll get an @ubuntu.com e-mail address (and also a @edubuntu.org email address) as well as have the right to represent yourself as an Ubuntu representative by printing Ubuntu/Edubuntu business cards20:41
highvoltagemore information on membership is available on https://wiki.ubuntu.com/Membership20:42
highvoltagebeing a Technical Board delegate, the Edubuntu Council is allowed to grant upload rights to contributors who have shown skills and commitment to maintaining packages20:43
highvoltageapplying with the Edubuntu Council, you can become an official Edubuntu Developer (edubuntu-dev on Launchpad)20:44
highvoltageEdubuntu Developers can upload any of the packages that form part of the Edubuntu, which is pretty much the bug list I mentioned earlier20:44
ClassBotmhall119 asked: https://launchpad.net/~edubuntu is a moderated team, what are the requirements for membership?20:46
highvoltageI was thinking about that just earlier today!20:46
highvoltagewhen Edubuntu was initially founded, that was the group for the entire team20:46
highvoltagesince then we branched out and created a ton of new groups, and also later on cut back and simplified20:47
highvoltagebasically that group is currently undefined, what I'm going to suggest at the next edubuntu weekly meeting,20:48
highvoltageis that we just make it an open group for anyone interested in edubuntu to join20:48
highvoltagewe've had lots of people wanting to join #edubuntu-members like that, so if someone wants to show support for edubuntu and get an edubuntu badge on their profile it would be nice to have a group for that20:48
highvoltageso in short, we'll probably make it a group that anyone who wants to get involved with edubuntu can join20:49
highvoltagethe Edubuntu team has weekly meetings on IRC where we do a quick status update on the activities the last week, and also discuss any problems that we might have20:50
ClassBotThere are are 10 minutes remaining in the current session.20:51
highvoltageattending these meetings is probably the best way to keep up to date of what's happening in Edubuntu20:51
highvoltageit's also a good place to check in and find out what the current problems are, which can be useful if you want to get involved20:51
highvoltageIt's every Wednesday evening  at 19:00 in #ubuntu-meeting20:52
highvoltageit's an open meeting and anyone is allowed to join20:53
highvoltageif you'd like to add a topic, feel free to add it to our agenda and add your name after the agenda item: https://wiki.ubuntu.com/Edubuntu/Meetings/Agenda20:53
highvoltagebesides the weekly meetings, we also communicate over other platforms20:54
highvoltagewe use a few mailing lists:20:54
highvoltageEdubuntu users: general support list for all Edubuntu users. This includes regular Ubuntu users who happen to use educational packages or Ubuntu in an educational environment20:54
highvoltagethat list is at http://lists.ubuntu.com/mailman/listinfo/edubuntu-users20:55
highvoltageThen there's Edubuntu Developers, that's for anyone who contributes to and works on Edubuntu:20:55
ClassBotThere are are 5 minutes remaining in the current session.20:55
highvoltagehttp://lists.ubuntu.com/mailman/listinfo/edubuntu-devel20:55
highvoltageand there's also the Ubuntu Education list, this is a list for mostly non-technical users and educators who use Ubuntu for educational purposes20:56
highvoltagehttp://lists.ubuntu.com/mailman/listinfo/ubuntu-education20:56
highvoltageyou can find us on Identica: http://identi.ca/group/edubuntu20:57
highvoltagefacebook: http://www.facebook.com/pages/Edubuntu/11213983213611020:57
highvoltageas mhall119 mentioned in -chat, the IRC channel is a great place to find all of us20:57
highvoltagethat's on #edubuntu on this network20:57
highvoltagewe're basically out of time, but I think I managed to say everything that I intended to.20:58
highvoltageThere's 2 more minutes left, any final questions?20:58
highvoltageFor anyone reading either on IRC or in the logs afterwards, thanks for doing so, have a great weekend!20:59
highvoltageEnd of session. *GONG*21:00
* warp10 waves21:00
gaspaone-two one-two21:00
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Me, Myself and QA - Instructors: warp10, gaspa, BlackZ
gaspawarp10: ok, the mike works...21:00
warp10Thank you highvoltage, and hi everybody, guys! Who is here to have great moments learning about QA stuff, raise your hand (in #ubuntu-classroom-chat, please)!21:00
warp10OK, great. I'm Andrea Colangelo, an Ubuntu Developer. BlackZ, gaspa and me from the Ubuntu Italian Mafia Famiglia [Copyright (C) Daniel Holbach] will try to show you that QA is not that boring at all, and rather it is a very appreciated activity in Ubuntu development.21:02
warp10In case you don't know already, QA means Quality Assurance, and it involves a number of procedures and tools aiming to keep Ubuntu packages and the whole archive in good shape.21:03
warp10Wrong or circular dependencies, packages that Fails To Build From Source (FTBFS) and that Not Build from Source (NBS) anymore, install and upgrade issues, fixing lintian errors: all of them are problems that QA activites are intended to fix.21:03
warp10QA is not focused on a particular set of packages, rather the whole archive is the domain of our activities. Therefore, a good committement to QA also gives you the possibility to increase your packaging knowledge and skills, and will allow you to reach the deeper and more obscure corners of the archive.21:04
warp10Further, a good QA also means working side-by-side with your fellow developers who packaged and/or cared of the package you are working on, and will give you that extraordinary feeling of "standing on the shoulders of giants" that new contributors well know.21:04
warp10And please, don't think QA involves Ubuntu only. Very often your fixes for Ubuntu issues apply to Debian too, and a good Ubuntu Developer is always ready to open reportbug and send patches upstream to Debian.21:05
warp10Therefore, QA and community are thigtly related, and a good QA will make all Ubuntu users happier. This is one among the many reasons why we like QA so much! :)21:05
warp10Since QA is such a wide and extensive field of activities, you will find *lot* of things to do, and *lot* of issues to fix anytime. But don't be scared: lots of tools have been deployed to help your efforts, tools that gaspa, BlackZ and me will try to show you in these remaining 55 minutes.21:05
warp10If you are really interested in QA, the website you will definitely want to add to your favourites is http://qa.ubuntu.com/. There you will find (almost) everything that is QA-related.21:06
warp10Lots of (hopefully) good words so far, but we still didn't saw anything. So, let's dirt our hands with something more pragmatic. But first of all: any question so far? (In -chat, please)21:06
warp10Ok, good. The first argument we will introduce is NBS. Who of you already knows what a NBS is? Raise your hands again (in -chat, please)!21:07
warp10Ok, great. NBS are one of the most appreciated QA activities, and the one I like most, personally. :)21:08
warp10NBS stands for "Not Built From Source". As you can easily understand, it refers to packages that, altough still in the archive, are no longer built from source.21:09
warp10You might wonder why such a situation could happen. Well, there is a number of different reasons. The most common one is that the package has been renamed.21:09
warp10For examble, upstream released a brand new release and renamed his software, so we may want to rename the package as well. Another possibility is that a library gets a new SONAME and this has to be reflected in the binary name.21:10
warp10(For people who don't know already, a SONAME is a sort of "name" describing what functionalities a certain library or piece of software exposes. See also: http://en.wikipedia.org/wiki/Soname.)21:10
warp10If there are packages that still depend on the NBS package, the NBS can't be removed from the archive, or it would cause an unmetdep (i.e.: a package is not installable because one of its dependency is missing from archives).21:11
warp10Our work as QA guys is to carefully check the situation and rebuild the packages depending on our NBS, so that their dependencies list is updated with the new package, and then we can drop the useless NBS from archives.21:11
warp10Feeling a little confused? Yeah, comprehensible. Don't worry: we will see some examples in a few seconds. Also, please refer to https://wiki.ubuntu.com/UbuntuDevelopment/NBS for a broader overview and more examples. And ask your questions anytime in -chat if needed, ok?21:12
warp10The most important thing to understand right now is that when you tackle a certain NBS you won't work on the NBS package itself (it's a zombie! It is going to be deleted from archives!), but rather on the packages depending on the NBS package, to make those packages not depend anymore on the zombie.21:12
warp10In fact, our final goal is to make sure that the NBS package has no reverse-dependencies (i.e.: no packages depending on it), making it a dead leaf we can drop with no pain from the archive.21:13
warp10A few tools are here to help you NBS, guys. The most important one is this page: http://people.canonical.com/~ubuntu-archive/NBS/21:13
warp10The full list of NBS waiting for love is there. It is updated about every 6 hours. As you see, every NBS is represented by a text file (named after the package name).21:13
warp10Let's open a NBS and see what's written there. For example, let's take libgss1: a pretty easy one. StraigLet's open a NBS and see what's written there. For example, let's take libgss1: a pretty easy one. Straight link is: http://people.canonical.com/~ubuntu-archive/NBS/libgss1ht link is: http://people.canonical.com/~ubuntu-archive/NBS/libgss121:14
warp10This file contains informations about libgss1 reverse dependencies. In our case, two packages depend on libgss1 both on ia64 and sparc: libgss-dpg and libgss-dev. These two packages have to be rebuilt to drop the NBS.21:15
warp10You might be wondering why a simple rebuild is enough to fix everything. This happens thanks to the "{shlibs:Depends}" macro in debian/control who will link our package to the latest libraries available. In this case, it will drop the dependency on libgss1 and will link our packages to libgss3 (the brand new package who made libgss1 a NBS)21:15
warp10Let's see another example. Please, open libopensync0. As you see, this NBS has several reverse-dependencies that need to be updated. Anyway, don't despair. Very often, it's just a matter of rebuilding a few source packages that build several binary packages.21:16
warp10Let's go deeper in the matter with a third example. Please, open libv8-2.2.7: http://people.canonical.com/~ubuntu-archive/NBS/libv8-2.2.7.21:17
warp10As you see, there is just one package depending on libv8-2.2.7: it is nodejs on amd64, i386, and armel. Since (almost) everybody has either an i386 or amd64 machine, we can work on it.21:17
warp10Let's get some informations about nodejs. Let's download it from the archive and run dpkg -I on it: wget http://archive.ubuntu.com/ubuntu/pool/universe/n/nodejs/nodejs_0.1.97-1_i386.deb && dpkg -I nodejs_0.1.97-1_i386.deb | grep Depends21:18
warp10As you see, it depends on libv8-2.2.7 (but we already knew that). Right now, the archive has libv8-2.2.18 and we should rebuild nodejs against it21:18
warp10Therefore, let's apt-get source nodejs. We will not make anything special about it, except for updating the changelog. Actually, we won't add the standard "ubuntu1" after the debian revision, but will rather use "build1" to show that we didn't modified anything and this is just a rebuild.21:19
warp10Anyway, given that we are asking the build daemons to rebuild the whole package, this is a good occasion to do other maintainance around nodejs. For example, we could check if there are open bugs, if the package is lintian free or if it needs to be merged/synced from Debian.21:19
warp10In any case, once we are over with the modifications we need (if any), we have to rebuild the package with our favourite tool (e.g.: pbuilder) and after the standard Build-Install-Run test, we can upload it to archives, or ask a sponsor to do it for us.21:19
warp10Fixing a NBS isn't always that easy. Sometimes your package FTBFS, or there are other issues around that will make your life not easy. Don't forget that your fellow Ubuntu Developers are around and ready to help and assist you21:20
warp10Ok, everything clear so far? Is your mind all messed up with reverse-deps and NBS? :)21:21
warp10A final word about another tool the Good Old Gaspa made available for all of us. Please, head your browser to http://gaspa.yattaweb.it/issues/reverse_nbs.xml at maximum warp speed.21:21
warp10As you can easily understand from the name itself, this page allows you to tackle NBSs from the build-deps side. Rather than opening the NBS page and reading what package needs to be rebuilt, you here see what package depends on which NBSs (yes, even multiple ones)21:22
warp10This way, you can check the status of a particular package you are working on, and can easily understand if that package needs multiple transitions.21:22
warp10That page also shows some other interesting information, like the already done NBS (i.e.: ready to be dropped from archives), and lots of links to launchpad, packages.u.c, the NBS page on people.u.c, all with an eye-candy UI (altough gaspa should update it to the lucid's aubergine colour :))21:23
warp10Summarizing, NBSs are a nice, funny, and appreciated QA activities (we can't release Ubuntu if NBSs are around in the archives!) and you have at least two tools and 100+ Ubuntu Developers ready to help you.21:24
warp10Therefore, choose your favourite NBS and kill him rebuilding all of its reverse-deps! :)21:24
warp10And now, let's move to a completely different topic: FTBFS. Unless you have questions to ask in -chat, of course.21:25
gaspa:)21:25
gaspaFirst of all, presetation: hi everybody! I'm gaspa, MOTU, a python passionate (well, passionate of21:26
gaspathousands of other things, but that's what matters),21:26
gaspaand then,let's talk about QA: as you may know, we have a lot of packages in ubuntu but not all of them were successfully built.21:26
gaspaWhen this happens we say that this package "Fails To Build From Source", but usually we use the acronym FTBFS for indicate that.21:27
gaspaA package can FTBFS for a lot of reasons, the most common reason is for its dependencies... for example some dependencies could have a different version than debian.21:27
gaspawhat I said above is important: in fact if a package FTBFS in ubuntu it does not mean that it will FTBFS in debian...21:28
gaspa( so we should often figth them with our forces ;) )21:28
gaspabut, of course, we have our tools that gives help: guess what? we havea list of packages that FTBFS, see http://qa.ubuntuwire.org/ftbfs21:29
gaspathe page lists all the packages, together with a lot of helpful informations, the arch that fails, links to LP and packages.debian.org pages....21:30
gaspabut the most important is the build log, that help us understand really what gone wrong!21:31
gaspaIn the best case you just need to do a fresh build of it, or perhaps to update a single dependency...21:31
gaspabut other issues can happen too, of course...21:32
gaspafor example, another reason is that we have sometimes different compiling option from debian or upstream, for this kind of problems google helps greatly (search for the string that gives the error...)21:32
gaspai.e. it happened with different versions of glibc between debian/ubuntu21:33
gaspaof course we have a lot of programming languages, every kind of language has different behavior and different problems... You can concentrate on your preferred language and find the package of that language.21:35
gaspaLast, but not the least, it can be an upstream bug: remember always to report them (together with the fix you found, of course), so the package will be updated in debian and then we can sync/merge it21:35
gaspanow, another kind of QA we can do... merges!21:36
* gaspa throw the mike toward warp1021:36
* warp10 grabs the microphone and reaches the center of the classroom21:37
warp10Ok, we all know Ubuntu is a debian-derived distro. This means we have the same packages too. We have a few procedures to update our packages from debian to ubuntu. We can do a sync if the package has no ubuntu changes, otherwise we need to merge all ubuntu changes for the new package from debian.21:38
warp10First of all we have to check if our ubuntu changes have been accepted in the debian package. We can sync the package only if *every* change in the ubuntu package has been accepted in the debian package too21:38
warp10Why do we need to do those changes? Well, for example we want to fix a bug in our ubuntu package which is not fixed yet in Debian, or we need to do ubuntu-*specific* changes.21:39
warp10Let's go ahead with merges. How can we merge a package? First of all we need to check the pending merges with MoM, a web application hosted on merges.ubuntu.com21:39
warp10Once we are there we will see the merges sorted from 4 components (universe, multiverse, main and restricted). In this session we will work on the pending merges of the universe component, so let's visit merges.ubuntu.com/universe.html21:40
warp10And please, don't forget to contact the latest uploader of the package (to prevent doubling the work).21:40
warp10You can do a merge in many ways: either manually, or with the grab-merge script. In this session we will use this second method.21:41
warp10Where can we download the grab-merge script? It has been included in the ubuntu-dev-tools package, so just install the ubuntu-dev-tools package.21:41
warp10Let's suppose we will work on the 'vlc' package, so type 'grab-merge vlc' and read the REPORT file for useful informations.21:41
warp10We will check the changelog of ubuntu and debian (let's suppose we have the version 1.0.5-1ubuntu1 and the version 1.0.6-1 in debian).21:42
warp10Imagine we have the ubuntu change * Add foobar to BD (LP: #123456). First of all, we will edit our debian/changelog file (changing the description of the change and replacing the mom signature with our own).21:42
warp10Then we will merge that change adding the BD foobar in debian/control21:42
warp10If you're unsure, don't forget you can visit patches.ubuntu.com and check with the latest debdiff (ubuntu+version.patch).21:43
warp10Once you are done you have to run ../merge-genchanges in the new, merged package, and then ../merge-buildpackage to check the package builds correctly.21:43
warp10If the package builds fine, you have to open a bug report in LP against the package with the summary: "Please merge vlc 1.0.6-1 (universe) from debian unstable (main) (if it's in debian unstable in the component 'main', of course)21:43
warp10Now, you can attach your debdiff to the bug report. Otherwise, you can use bzr to create a branch with your debdiff.21:44
warp10You're done! just subscribe ubuntu-sponsors and wait patiently. :)21:44
warp10As I said above, we can merge with bzr too. Let's see how that works.21:45
warp10First of all, we need to see if the package we want to merge has any failure http://package-import.ubuntu.com/status/21:45
warp10Let's suppose we want to merge vlc from debian sid again. Run: bzr merge-package lp:debian/sid/vlc21:45
warp10Then we need to run 'bzr status' and 'bzr diff' to check if there are conflicts or something else wrong21:46
warp10For example, if there are conflicts, you have to run bzr resolve and bzr conflicts, and  then you can do an entry in debian/changelog with the command dch -i21:46
warp10Now our branch is ready to be committed, but run bzr diff -r tag:1.0.6-1 first to check all ubuntu changes. You're done!21:46
warp10This concludes the part of this session about merges. The last quarter will be held from Good Old Gaspa who will talk about ubuntuwire21:47
* warp10 throw the microphone back to gaspa21:47
* gaspa 's not Old21:47
* gaspa catch the mike with a double-back-flip21:47
* warp10 but he his Good! \o/21:48
gaspaok, warp10 already talked about http://qa.ubuntu.com....21:48
gaspalol21:48
gaspaanother resources I want to point all fo you is UbuntuWire... Ubuntuwire is a21:48
gaspawebsite that collect a lot of services that fit into the ubuntu community: lists, search, and a lot of QA resources.21:48
gaspapoint your browsers to http://ubuntuwire.com21:49
gaspaUnfortunately there's no time to look in deep at each of them, but a look on the page above will give you a bit of taste.21:49
gaspaThere are community driven resources, as well as Canonical ones. For example you already saw NBS (the first of Canonical resources), and the ftbfs page.21:49
gaspaWell, you'd already have a lot of material to look at, tonight ;)21:50
gaspaisn't it? :)21:50
gaspaAlthough, but I want to point you on a couple of these pages that I found21:50
gaspaparticularly useful.21:50
ClassBotThere are are 10 minutes remaining in the current session.21:50
gaspa the first of them is the debcheck page: http://qa.ubuntuwire.org/debcheck/ This page lists all the package that aren't21:51
gaspain good shape.21:51
gaspafrom the point of view of their relationships (packages that feel alone, poor21:51
gaspapackages :) )21:51
* warp10 chuckles21:51
gaspaIf you give a fast look at that page, you'll see a lot of classes of issues: Broken Depends/Recommends/Suggests, Build-Depends, HalfBroken, Packages in Main with depends on !Main...AWESOME, we'll have a lot of work!! :)21:51
gaspaAs you can see, pages are grouped by issue, but if you select a single package, you'll see a lot of issues for only one! So, you can make the package shine resolving a lot of problems. [well, to be honest, often a lot of issues are caused by a single problem, so it's probably easier to fix them in a while)21:52
gaspaexample! let's take a look at a single package:21:52
gaspahttp://qa.ubuntuwire.org/debcheck/debcheck.py?dist=maverick&package=anjal21:52
gaspayou can see that "Package declares a build time dependency on evolution-plugins (<< 2.29.0) which cannot be satisfied on ia64. evolution-plugins (<< 2.29.0) 2.30.1.2-3ubuntu1 is available." So, anjal depends on evolution-plugins << 2.29.0, but we have 2.30 in maverick!21:53
gaspaWhat should we do!?21:53
gaspaOf course this issue could be caused by some different reasons. One could be simply a build-dependency that need to be updated.... is this the case? [ Hint: why there's a '<<' on the build-dependency and not a "<=" ?? ]21:54
gaspaoh, another possibility is that anjal depends on a feature that's present on evolution-plugins in 2.29, but is moved on another package from 2.29 and so on...21:54
gaspanote that *I don't know the real answer*, so perhaps it's worth a rebuild on your ppa and test the package with only a version dump.21:55
ClassBotThere are are 5 minutes remaining in the current session.21:55
gaspawe can look at how behave the build in your ppa, and let's proceed in the right direction21:56
gaspathanks, ClassBot.21:56
gaspaLittle hint: If you have doubts, well, you can always take a look at Debian packages... they should be always your reference [in particular seems this package does not have a debian maintainer... any volunteer in here? :) ]21:56
gaspa:)21:56
gaspaAnother thing that you should remember (haven't said it yet??) is to keep in contact with upstream, when possible...21:57
gaspaasking upstream is perhaps a bit longer than resolve problems ourselves, but have the advantage that tipically upstream knows better the software in case :)21:57
gaspaOk, we met debcheck. Keep in mind that you can run itself on your PCs,it's enough to install edos-distcheck and make it runs :)21:57
gaspafor example, I did on my own and I publish sometimes the results:21:57
gaspahttp://gaspa.yattaweb.it/issues/issues/edos/lucid_i386_edosresults.xml21:58
gaspa( i didn't do any run for maverick, yet... :P I'll do one soon, I promise! )21:58
gaspaok, I wanted to cite Harvest, but there's no time, I guess...21:58
warp10gaspa: I suppose we can steal a few more minutes, if needed21:59
gaspaso, just some time for question...21:59
gaspawarp10: if ClassBot wont shut up us :)21:59
warp10gaspa: don't think so. He is such a good boy :)22:00
gaspaok :)22:00
gaspalet's try ;)22:00
gaspaI'll be brief: the approach we got  till now, is something like "take a kind of bug and fix as many package as you can"22:00
gaspamerges, ftbfs, nb...22:00
gaspaThis is handful sometimes, expecially when you want to became experienced on something in particular22:00
=== ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi
gaspaBut, have you noted that every of these pages/tools we showed so far differs, is in a different place from the others? well, wouldn't be more efficient to take a package and fix all the problem of that package? So, for this kind of QA,dholbach build Harvest22:01
gaspa Harvest's aim is to centralize a lot of these lists of bugs, and show them in a comfortable way, and makes us able to fix a lot of bugs of a single package without searching here and there in the internet :) ... so, it makes us *really* happy :)22:01
gaspaI can't show you as daniel is working hard with a GSoC student to get it back more cool, usable, extensible, and whatever :P... but STAY TUNED on the link at the qa.ubuntu.com page :)22:02
gaspaok, finished. ;) thanks and sorry for taking a bit of other time :)22:02

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