/srv/irclogs.ubuntu.com/2008/08/14/#ubuntu-classroom.txt

=== rzr is now known as RzR
Miyavix3Helloo19:35
Miyavix3Is anyone here...?19:36
FlannelMiyavix3: Yep19:36
Miyavix3ok :D!19:37
Miyavix3So I did the same thing19:37
Miyavix3and same results19:37
Miyavix3auto lo19:37
FlannelWhat same thing? and what same results?19:37
Miyavix3iface lo inet loopback19:37
Miyavix3sudo nano /etc/network/nterfaces19:37
Flannelright, you need to add "auto eth0" and "iface eth0 inet dhcp" to the end of that19:38
Miyavix3save and then try apt-gettig something/19:39
Miyavix3?19:39
FlannelSave, then sudo /etc/init.d/networking restart19:39
Flanneland then verify you're online (w3m google.com, or ping or whatever)19:40
Miyavix3Tell me when I need internet19:40
Miyavix3Because 1 ethernet cord for 2 computers19:40
Flannelthis is where you'd need internet.  We're connecting you to the......19:40
FlannelI see19:40
FlannelDid you boot this other box with the ethernet plugged in?19:40
Miyavix3I can't find my other cable19:40
Miyavix3I plug it in for apt-get19:40
Miyavix3I'm not completely stupid19:40
Miyavix3just, mostly stupid19:41
FlannelWell, without the GUI, automatic things like recognizing theres a new ethernet cable don't always happen19:41
Miyavix3So for the sudo etc/init.d ... I need internet?19:41
Flannelso, plug it in, sudo /etc/init.d/networking restart, try to get online, if that doesn't work, I imagine your stuff isn't broken at all, you just need to reboot with the cord plugged in.  And I'm leaning towards telling you to remove the stuff we just added.19:42
FlannelMiyavix3: yeah19:42
FlannelMiyavix3: We're trying to connect to the internet then19:42
Miyavix3ok, brb19:42
Miyavix3switching chords19:42
Miyavix3so askdlahsdlkajs19:44
Miyavix3Am I connected?19:44
FlannelMiyavix3: yes19:44
Miyavix3oh cool, lol19:44
Miyavix3erll uh19:44
Miyavix3[fail]19:44
Miyavix3interface lo declared allow-auto twice ifdown: couldn't real interfaces file "etc/network/interfaces"19:45
Miyavix3anything?19:47
Miyavix3read*19:48
Miyavix3>_>19:48
FlannelWell, I'm hesitant to think anything was wrong to begin with, so why don't you try removing the stuff we just added, and rebooting with the network cable plugged in19:48
* Flannel hates the "reboot to fix it" option, but I'm obviously not familiar with whatever chnages they made in stuff after Dapper if theres no eth0 in there by default19:49
Miyavix3brb again19:49
Miyavix3What's the shutdown command?19:49
Miyavix3nvm19:50
batsquidshutdown now19:51
Miyavix31ok well19:54
Miyavix31I think I'm SOL19:54
FlannelMiyavix3: Nah, even if you can't get networking to work for some reason, you can grab an alternate CD and install the GUI from that19:54
Miyavix31I have the insall disk19:55
Miyavix31install19:55
Miyavix31So I can fix this and everything will be fine19:56
Miyavix31?19:56
Miyavix31Or rather, I'll have my settings and files?19:56
Miyavix31I have the disk19:59
Miyavix31well uh...20:05
Miyavix31what do I do?20:05
Miyavix31Flannel... =\20:07
Miyavix31I'm just going to reinstall20:08
Miyavix31Seriously, this problem has lasted over 2 hours20:09
Miyavix31Thanks for your help man20:09
Miyavix31but I suck20:09
Miyavix31So see ya20:09
Miyavix3is anyone here...20:18
=== Moot2 is now known as MootBot
=== Syntux__ is now known as Syntux
nhandlerI have to ask you all a serious question. The package I was planning on demonstrating how to perform a merge on refuses to build in intrepid. I can either do the lesson as planned today, but you will be unable to build the package, or I can push the lesson back to next Tuesday and do the lesson then with a different package.22:38
nhandlerWhat would you guys prefer I do?22:39
Syntuxcan't you find another package ?22:41
nhandlerSyntux: Yes I can. And that is what I would do if I were to push the lesson back to Tuesday22:41
Syntuxwe can't find one now? in like 10 minutes?22:42
Syntuxit's 1 am here and the only reason I'm awake is this session :-)22:42
nhandlerI'm really sorry Syntux. Yes, I could find a new package, but the lesson would be significantly longer as I would be working on it as I am trying to teach22:44
Syntuxyou know what; picking a random package and seeing what would happen is better than picking a tested one22:46
james_whey nhandler22:46
nhandlerHi james_w22:46
Syntuxone of the things that we face as motu wannabes is that we always face problems that wasn't mentioned in wiki/video or by our mentor :D22:46
Syntuxso it's good to see how things really work22:47
james_wI don't think having it build at the end is the most important bit, but if you're not happy doing the session then we shouldn't22:47
james_wSyntux makes a good point though, things never go to plan22:47
nhandlerjames_w: I am fine doing the session as is. The reason the package refuses to build has nothing to do with the merge.22:47
james_wnhandler: that's ok then22:47
Syntuxthe most important part about this session is to understand the difference between sync and merge; and the workflow22:47
james_wis anyone else here for the session, or is it just me and Syntux ?22:47
Syntuxjames_w, I'm here before you :p so it's syntux and me.22:48
nhandlerSyntux: The session actually focuses more about HOW to perform a merge22:48
Syntuxtrue but a wannabe wont merge without differentiating it from sync.22:49
nhandlerSyntux: I do mention how you know the difference between a sync and a merge, but that is not the focus of the lesson22:50
Syntuxsure22:50
nhandlerIt looks like people still want me to do the lesson. So I'll give it a try. If you plan on participating, please join #ubuntu-classroom-chat22:51
james_wthanks nhandler22:52
james_wwould you like to give it a few minutes to allow people to arrive?22:52
nhandlerWe still have 8 minutes until it was scheduled to start. I'll wait until then.22:52
james_wgreat, thanks22:53
LaneyRawr22:59
james_whey Laney, top showering23:00
james_wnhandler: you would like questions in #-chat?23:00
nhandlerYes james_w23:00
LaneyI merged the shampoo with my hair, and built the soap into a lather23:00
Laneyand in the end we got a working clean target23:01
james_w:-)23:01
nhandlerI guess I'll start23:01
james_wnhandler: fair enough.23:01
nhandlerHello everyone, and thanks for joining me for my MOTU School session about merging packages from Debian.23:01
nhandlerIf you have any questions, please feel free to ask them in #ubuntu-classroom-chat at any time. Please be sure to prefix your questions with "QUESTION:".23:01
nhandlerThe wiki does an excellent job of explaining why we need to merge/sync packages from Debian.23:02
nhandlerHere is an excerpt from https://wiki.ubuntu.com/UbuntuDevelopment/Merging.23:02
nhandlerUbuntu is based on the Debian GNU/Linux distribution and uses the same package management system. In the beginning of each Ubuntu development cycle the packages in Ubuntu are updated to those in Debian unstable. However, because Ubuntu is not the same as Debian, some of the packages need to be modified to work in Ubuntu. There might also be bug fixes that Ubuntu developers have introduced into the packages.23:03
nhandlerYou can determine whether this has taken place by noting the package version. If the package version includes ubuntu in it (an example would be gimp 2.2.9-3ubuntu2) then the Ubuntu developers have made some change and it is no longer the same as the Debian package. There are more than 1000 such packages in the Universe repository.23:03
nhandlerAt the start of the development cycle a decision has to be made with regard to these Ubuntu-versioned packages. Of course if the Debian version hasn't changed since the last Ubuntu release then nothing needs to be changed. However, if there is a newer version of the package in Debian then one of two things should happen.23:03
nhandlerIf all of the reasons that the Ubuntu version existed (bug fixes, dependencies, etc.) are fixed in the new Debian package then we can just take the Debian package directly. This is called a sync. However, if the new Debian version has the same issues that caused the Ubuntu version to be made, then those changes need to be applied to the new Debian version. This is called merging.23:04
nhandlerThe Ubuntu Merge-o-Matic (MoM), http://merges.ubuntu.com/universe.html, provides a list of packages that need to either be merged or synced from Debian.23:04
nhandlerDaD, http://dad.dunnewind.net/universe.php, is another merge tool. Although we will be using MoM for our example today, you should always check DaD to make sure that someone isn't already working on merging the package you want to do. You also should ask the last Ubuntu uploader if they are planning on doing the merge.23:05
nhandlerToday, we will be merging a package called "ksensors".23:05
nhandlerBefore we begin, please install: devscripts, build-essential, wget, fakeroot, quilt, patchutils, and debhelper from the repositories. You will need them in order to follow along with this lesson.23:05
nhandlerAll of these packages are available in the Ubuntu repositories.23:06
nhandlerStart by creating a directory called "Merges" in your home folder. This folder will hold all of your merges.23:06
nhandlerNext, download the grab-merge script, http://merges.ubuntu.com/grab-merge.sh, to the Merges folder, and make it executable with 'chmod +x ~/Merges/grab-merge.sh'.23:07
nhandlerWe will use grab-merge.sh to download all of the files that we need to perform the merge from MoM.23:08
nhandlerInside your Merges folder, create a new folder called "ksensors". This new folder will hold all the files related to merging ksensors.23:08
nhandlerNow, open a terminal (Applications->Accessories->Terminal), and type 'cd ~/Merges/ksensors' to enter our new ksensors folder.23:09
nhandlerWe will now download the files we need to perform the merge. Type '../grab-merge.sh ksensors'. This will download all the files we need.23:09
nhandlerOnce the script finishes running, type 'less REPORT' to view the report file that MoM generated for us. This report will show us which files had changes that were unable to be merged automatically.23:11
nhandlerNear the bottom of the REPORT file, you should see a line that looks like this:23:11
nhandlerC  debian/control23:11
nhandlerThat means that MoM was unable to automatically merge the changes that were made in Ubuntu and Debian for that file.23:12
nhandlerFirst, 'cd ksensors-0.7.3-16ubuntu1' to enter the source directory.23:13
nhandlerThe first thing you should do is look at the changelog file. This file shows all changes that were made in Ubuntu and in Debian. I prefer to just leave this file open so that I can refer to it later.23:13
nhandlerWhen performing a merge, we need to focus on the most recent "batch" of Ubuntu changes. You will be able to recognize this "batch", because all of the Ubuntu changes in it will be against the same Debian revision. The debian revision is located after the '-' and before the 'ubuntu'. In ksensors, the batch of changes that we want to focus on includes versions 0.7.3-15ubuntu1 and 0.7.3-15ubuntu2. Do you notice that both of those versio23:14
nhandlerns have a Debian revision of 15?23:14
medo_nhandler: do you mean the upstream changelog file23:15
medo_or the /debian/changelog23:15
nhandlermedo_: I mean debian/changelog23:15
medo_thank23:16
medo_:)23:16
nhandlerRemember, please try and ask all questions in #ubuntu-classroom-chat23:16
nhandlerMoving on, if you look at version 0.7.3-15ubuntu1, you will see that it had two changes. It modified the menu file, and it added dh_iconcache to debian/rules.23:16
Laney<m_newton> QUESTIN where are we lookinh23:17
Laneylooking* I think23:17
m_newtonLaney, I found it thanks23:18
nhandlerIn 0.7.3-15ubuntu2, you will see that several changes were made. quilt was added as a Build-Depends in debian/control, debian/rules was updated, a patch was added in debian/patches, and dh_iconcache was changed to dh_icons in debian/rules.23:18
nhandlerNow that we know what changes were made in Ubuntu, we need to look at the most recent Debian version, 0.7.3-16, to see if any of the Ubuntu changes were added upstream in Debian. As you can see from the changelog entry, Debian has not applied any of the Ubuntu changes.23:20
Laney<m_newton> QUESTION: do we close the terminal where we did less REPORT23:20
nhandlerm_newton: You can close the REPORT file if you wish. It does not matter.23:21
Laney <Syntux> Laney, why we have to focus on the version before the last (15) and not the last (16)23:21
Alan_MGuys, please see nhandlers comment about questions.23:22
nhandlerSyntux: The reason we are looking at the Ubuntu changes that had a Debian revision of 15 is because 0.7.3-16 is not currently in Ubuntu yet. As a result, no Ubuntu changes have been made for that Debian revision23:22
nhandlerDid that answer your question Syntux ?23:23
Syntuxsure.23:23
SyntuxThanks.23:23
nhandlerAlright, now for the fun part. We are now able to perform the merge.23:23
nhandlerStart by opening debian/control. You should see a section that looks like this: http://paste.ubuntu.com/37417/23:23
norsettonhandler: I have a question before, who is telling us that we should carry over these changes?23:24
nhandlernorsetto: What changes are you referring to?23:24
norsettonhandler: the changes from the previous ubuntu versions23:24
nhandlernorsetto: We don't always carry over the Ubuntu changes from previous versions. It depends if they are still needed and whether or not they have been applied upstream23:25
norsettonhandler: right, I think this is a pretty important point23:25
nhandlerOur goal is to get all of the Ubuntu changes applied upstream so that we can automatically sync the package when Debian releases a new version23:26
nhandlernorsetto: I talk about this topic a little later in the lesson23:26
norsettonhandler: in this particular case, seems like we have been carrying the wrong change for the last few years23:26
nhandlernorsetto: You are probably right. Most of the changes in ksensors should have been sent upstream. However, I don't think we should simply drop them now.23:27
Laney(they can be sent upstrem as part of this merge!)23:28
norsettonhandler: I think is a good idea always to check the bug report that originated a change, in this case bug 4567523:28
norsettonhandler: so, seems like the change did exactly the opposite of what the bug report was about ... but anyhow, this is indeed off-topic, so, lets continue23:29
nhandlerBack to debian/control...23:30
nhandlerStart by opening debian/control. You should see a section that looks like this: http://paste.ubuntu.com/37417/23:30
nhandlerThe lines above the '=======' are the Ubuntu changes. The lines below it are the Debian changes. Whenever possible, we try to use the Debian changes instead of the Ubuntu ones, but this is not always the case.23:30
nhandlerThe first thing we will look at is the maintainer field. The Maintainer field should be set to 'Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>' for packages in Universe or Multiverse, and to Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com> for packages in main or restricted. You can read more about this here: https://wiki.ubuntu.com/DebianMaintainerField23:31
nhandlerAn easy way to figure out what repository a package is in is to use: 'apt-cache madison <package>'23:31
nhandlerThe XSBC-Original-Maintainer field is used to store the information of the Debian maintainer.23:32
nhandlerFor ksensors, do you notice how the Ubuntu XSBC-Original-Maintainer field and the Debian Maintainer field both contain the same information? This means that the Debian maintainer has not changed since the last Ubuntu version. We can simply delete the Debian Maintainer field line from the control file. If the two fields had been different, we would have had to update the Ubuntu XSBC-Original-Maintainer field to contain the new Debian23:33
nhandlermaintainer's information.23:33
nhandlerLooking back at debian/changelog, you can see that the only change Ubuntu made to the Build-Depends field was adding 'quilt' in version 0.7.3-15ubuntu2. Since Debian has also modified the Build-Depends field, we have to merge the different changes together. In this case, all we need to do is add 'quilt' to the end of the Debian Build-Depends line. After doing that, we can remove the Ubuntu Build-Depends line.23:34
Laney<m_newton> Question: apt-cache madison <package> <<< what does madison signify??23:34
nhandlerm_newton: "apt-cacheĀ“s madison command attempts to mimic the output format and a subset of the functionality of the Debian archive management tool, madison." that is from the apt-cache man page23:36
nhandlerContinuing with the lesson...23:36
nhandlerNow that we have resolved all of the conflicting lines in debian/control, we can remove the '<<<<<<<', '=======', and '>>>>>>>' lines.23:36
nhandlerAt this point, you should have a control file that has been successfully merged. If you would like to verify that your control file is correct, you can upload it to http://paste.ubuntu.com/, and paste the URL in #ubuntu-classroom-chat.23:37
nhandlerYou can view my control file here: http://paste.ubuntu.com/37304/23:41
=== greg__ is now known as __greg__
nhandlerMoM attempts to merge as many of the changes as possible from the Debian and Ubuntu versions of the package. However, you should always verify that this task was done correctly.23:43
nhandlerThe first change we will verify is the change to the menu file.23:44
nhandlerStart by opening up debian/menu23:45
nhandlerNotice how they have changed the section from Apps/System to Apps/Tools?23:46
nhandlerThis is the change norsetto and I were talking about earlier23:46
nhandlerHowever, for the purposes of this lesson, just notice how the change made in Ubuntu has not been applied upstream in Debian. It is still needed, and MoM has successfully applied the change.23:47
nhandlerI'm surprised nobody asked me how I knew it changed from Apps/System to Apps/Tools23:49
m_newtonya, how nhandler23:49
m_newtonI just see Apps/Tools23:49
nhandlerI knew this by opening up ~/Merges/ksensors/ksensors_0.7.3-15ubuntu2.patch23:50
nhandlerThis file is a diff that shows all of the Ubuntu changes that were made23:50
nhandlerThere is a similar file, ksensors_0.7.3-16.patch, that shows the changes that were made in the new Debian version of the package23:50
nhandlerNow, I want you to look back at the changelog. Notice how in version 0.7.3-15ubuntu1 they added dh_iconcache to debian/rules, and in version 0.7.3-15ubuntu2 they replaced dh_iconcache with dh_icons?23:51
medo_yeah23:52
nhandlerThis means that our current debian/rules should have dh_icons, and not dh_iconcache. We can verify this by looking at debian/rules. You will notice that on line 99 is dh_icons.23:52
nhandlerWhile we are looking at debian/rules, we should also verify that it includes 'patch' and 'upatch', which were added in version 0.7.3-15ubuntu2. You will find 'patch' on line 30, and 'unpatch' on line 45.23:53
nhandlerWhile I've been presenting this lesson, james_w was kind enough to find a way to hopefully enable us to build this package.23:54
nhandlerTo apply this fix, locate this line "cp -f /usr/share/aclocal/libtool.m4 admin/libtool.m4.in". It should be line 3323:55
nhandlerRight below it, paste these lines of text: http://paste.ubuntu.com/37565/23:56
nhandlerOnce you make those changes, you can save and quit the debian/rules file23:56
nhandlerWe are almost done. The only other Ubuntu change that we need to verify is still present is 01_kubuntu_fix_etc_sensors_conf.diff.23:57
nhandlerYou will find that patch in debian/patches. It is also listed in debian/patches/series.23:59
nhandlerHowever, since the file that the patch modifies, src/lmsensors.cpp, has been changed in Debian, this patch will fail to apply if we were to try and build the package.23:59
nhandlerSince working with patches is outside the scope of this lesson, I have made the needed changes to the patch. You can find my revised version here: http://paste.ubuntu.com/37450/23:59

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