Debdiff2

Dev Week -- Debdiffs And How To Get Them Submitted -- Daniel Holbach -- Thu, Feb 21

see also Tuesday session.

(03:03:17 PM) dholbach: Next up is "Debdiffs And How To Get Them Submitted" :)
(03:03:22 PM) dholbach: How are you all doing?
(03:03:33 PM) daishujin: Great!
(03:03:37 PM) dholbach: How's Ubuntu Developer Week coming on this week for you? :)
(03:04:02 PM) ***mruiz hugs pedro_ 
(03:04:08 PM) charliecb: fine
(03:04:15 PM) daishujin: very interesting
(03:04:17 PM) Grazieno: dholbach: very cool for me!
(03:04:30 PM) dholbach: ROCK ON! That's what I like to hear :-)
(03:04:31 PM) InsClusoe: dholbach: I am loving it.
(03:04:52 PM) holloway: we want more, we want more \o/
(03:04:52 PM) dholbach: Ok, let's talk debdiffs.
(03:04:54 PM) mirrado: Amazing
(03:04:57 PM) dholbach: hehe :-)
(03:05:04 PM) mirrado: :)
(03:05:42 PM) dholbach: Debdiffs are your way to make other developers happy. In this session we'll try to create one and I'll tell you how you'd submit it
(03:06:00 PM) dholbach: This time I thought we're going to try to fix a real bug
(03:06:26 PM) dholbach: I picked a 'bitesize' one, which generally are bugs that are suited for new contributors
(03:06:27 PM) ember_ is now known as ember
(03:06:52 PM) dholbach: all those bugs are linked from http://wiki.ubuntu.com/MOTU/TODO and http://wiki.ubuntu.com/MOTU/TODO/Bugs
(03:07:36 PM) dholbach: but first we need to set up our working environment
(03:08:03 PM) dholbach: please all edit your ~/.bashrc (or .zshrc if you use zsh) file and add something along the lines of:
(03:08:04 PM) dholbach: export DEBFULLNAME='Daniel Holbach'
(03:08:04 PM) dholbach: export DEBEMAIL='daniel.holbach@ubuntu.com'
(03:08:17 PM) dholbach: then save it and run   source ~/.bashrc
(03:08:40 PM) dholbach: these two variables will be used by a couple of tools we're going to need
(03:08:43 PM) dholbach: everybody all set?
(03:08:50 PM) Grazieno: dholbach: or . .bashrc :)
(03:09:09 PM) dholbach: Grazieno: I don't understand
(03:09:37 PM) Grazieno: dholbach: in your home, do only '. .bashrc'
(03:09:42 PM) dholbach: right
(03:10:02 PM) dholbach: anyway... all set? give a quick '+1' too
(03:10:12 PM) TuxCrafter: + 1/2
(03:10:17 PM) Grazieno: +1
(03:10:24 PM) rzr: pedro_: thx, sorry for disturbing ... my RTFM list is overloading :)
(03:10:29 PM) barcc: +1
(03:10:30 PM) mirrado: +1
(03:10:31 PM) Iulian: +1
(03:10:43 PM) dholbach: ok perfect
(03:10:50 PM) dholbach: we need a few tools next, please run:
(03:10:54 PM) dholbach:    sudo apt-get install devscripts build-essential wget fakeroot patchutils debhelper
(03:10:56 PM) charliecb: +1
(03:11:10 PM) rzr: +0.42
(03:11:21 PM) mirrado: +1
(03:11:43 PM) dholbach: devscripts contains packaging tools which make the job much easier
(03:12:03 PM) dholbach: build-essential is a meta-package which pulls in stuff like gcc, make and so on
(03:12:24 PM) dholbach: fakeroot is interesting too, because it simulates an environment where we work as 'root'
(03:12:45 PM) dholbach: ok... let's get working on https://bugs.launchpad.net/ubuntu/+source/xnetcardconfig/+bug/181494 together
(03:13:09 PM) dholbach: I don't know how tricky it's going to be, let's just all start working on it and let's see where we end up :)
(03:13:23 PM) dholbach: if you have questions or I'm too quick, please let me know on #ubuntu-classroom-chat
(03:13:52 PM) dholbach: the problem seems to be that xnetcardconfig depends on xsu which is going to be removed soon
(03:14:18 PM) dholbach: This seems to confirm it:
(03:14:20 PM) dholbach:    apt-cache show xnetcardconfig
(03:14:38 PM) dholbach: ok, let's dive into the problem :-)
(03:14:44 PM) dholbach:    apt-get source xnetcardconfig
(03:14:53 PM) dholbach: oh... I forgot:
(03:15:05 PM) dholbach: you might have to add a deb-src line to your /etc/apt/sources.list first
(03:15:27 PM) dholbach: for hardy that'd be  "deb-src http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse"
(03:15:40 PM) dholbach: and please run    sudo apt-get update   afterwards
(03:15:48 PM) dholbach: then the    apt-get source    run is going to work :)
(03:16:00 PM) dholbach: <charliecb> QUESTION: what means -> Conflicts: menu (<< 2.1.12)
(03:16:24 PM) dholbach: charliecb: the package xnetcardconfig conflicts with the package menu (if it is older than 2.1.12)
(03:16:33 PM) dholbach: that means they're not installable at the same time
(03:17:18 PM) dholbach: the main reason for using conflicts is that no two packages can install the same file at the same time
(03:17:33 PM) dholbach: that's also the main reason breaking upgrades :)
(03:17:44 PM) dholbach: so you need to be very careful if you move files from one package to another
(03:18:10 PM) dholbach: OK, apt-get source downloaded the following files for us
(03:18:22 PM) dholbach: xnetcardconfig_0.2.0-1.dsc  and  xnetcardconfig_0.2.0-1.tar.gz
(03:18:34 PM) dholbach: which is REALLY weird
(03:18:48 PM) dholbach: does somebody see a problem with those two files?
(03:19:25 PM) dholbach: OK, the version number 0.2.0-1 indicates that:
(03:19:53 PM) dholbach:  - the upstream version of xnetcardconfig is 0.2.0 (what the upstream author release on their homepage)
(03:20:08 PM) dholbach:  - it's the first debian revision of it
(03:20:18 PM) dholbach: <rzr> no patches
(03:20:21 PM) dholbach: rzr: Exactly.
(03:20:49 PM) dholbach: if you package upstream software, you take the tarball you download from their webpage and rename it to
(03:20:58 PM) dholbach: <software>_<version>.orig.tar.gz
(03:21:48 PM) dholbach: this result in the debian/ubuntu packaging tools moving all the changes we apply to make it build properly into <software>_<upstreamversion>-<ubunturevision>.diff.gz
(03:22:09 PM) dholbach: there's no .diff.gz here, although the 0.2.0-1 version indicates that
(03:22:13 PM) dholbach: does that make sense for everybody?
(03:22:36 PM) dholbach: Ok, let's move on then :)
(03:22:43 PM) InsClusoe: yes
(03:22:46 PM) dholbach: cd xnetcardconfig-0.2.0/
(03:22:58 PM) dholbach: let's fix the obvious problem first: xsu depends
(03:23:26 PM) dholbach: for those of you who have read the link on the bug report: http://packages.qa.debian.org/x/xsu/news/20040720T150036Z.html suggests to use 'gksu' instead
(03:23:47 PM) dholbach: let's take a look at debian/control
(03:24:08 PM) dholbach: it's the file that specifies (among other things): what is needed to build the package and what is needed to install and use the package
(03:24:23 PM) dholbach: let's, as a first measure, replace xsu with gksu
(03:24:30 PM) dholbach: <charliecb> QUESTION: isn't the name for the package wrong? it must be xnetcardconfig_0.2.0-1.orig.tar.gz? or not?
(03:25:04 PM) dholbach: charliecb: I'd agree with xnetcardconfig_0.2.0.orig.tar.gz - the debian maintainer might have overlooked it
(03:25:44 PM) geser: it was never in Debian, it got synced from some other source during for hoary and never touched since Dec 2005
(03:26:17 PM) dholbach: everybody welcome geser - he's a great guy and always digs up these facts from somewhere - he's awesome!
(03:26:21 PM) dholbach: thanks geser
(03:26:46 PM) dholbach: ok, that's done now, let's document our change
(03:26:59 PM) dholbach: let's run      dch -i         to add a new changelog entry and increment the version number
(03:27:11 PM) dholbach: dch is a nifty tool from devscripts
(03:27:25 PM) dholbach: a few things we need to make sure here:
(03:27:36 PM) dholbach:  - get the version right, which might be a bit controversial here :-)
(03:27:48 PM) dholbach:  - upload to the right Ubuntu version
(03:27:52 PM) dholbach:  - document our changes right
(03:29:14 PM) dholbach: as the version is wrong already, I suggest we just use 0.2.0-1ubuntu1 and go from there
(03:29:36 PM) dholbach: <charliecb> QUESTION: changelog has to look like this: xnetcardconfig (0.2.0-1ubuntu1) gutsy; urgency=low
(03:29:36 PM) dholbach:    * removed dependence for xsu , add dependence for gksu
(03:29:40 PM) dholbach: charliecb: nearly
(03:29:48 PM) dholbach: we can't upload to gutsy, it's released already
(03:30:07 PM) dholbach: but if we replace gutsy with hardy, I think it looks OK already
(03:30:16 PM) dholbach: although I prefer to use changelog entries like
(03:30:34 PM) dholbach:   * debian/control: replaced xsu dependency with gksu.
(03:30:35 PM) dholbach: or something
(03:30:59 PM) dholbach: it's important to point out which files you changed, so the next person who works on the package knows what happend and why
(03:31:39 PM) dholbach: who's done with that part of the story? quick +1 please?
(03:31:50 PM) charliecb: +1
(03:31:53 PM) Iulian: +1
(03:31:57 PM) barcc: +1
(03:32:07 PM) dholbach: party on
(03:32:11 PM) Grazieno: +1
(03:32:17 PM) mirrado: +1
(03:32:25 PM) dholbach: what do we do now? is that all?
(03:33:01 PM) holloway: we need a new source package?
(03:33:06 PM) dholbach: before that
(03:33:12 PM) mirrado: we need to change the reference to the package mantainer in debian/control
(03:33:22 PM) dholbach: mirrado: good point, but even before that
(03:33:29 PM) charliecb: test the package with pbuilder?
(03:33:41 PM) dholbach: all good points, but something else
(03:34:00 PM) InsClusoe: get gksu
(03:34:06 PM) InsClusoe: ?
(03:34:14 PM) dholbach: if there's a dependency on xsu, it might be used somewhere in the code somewhere - we need to fix that reference
(03:34:27 PM) dholbach:  grep -r xsu *
(03:34:44 PM) dholbach: seems that we need to get   xnetcardconfig.in   a proper treatment
(03:34:59 PM) dholbach: this line is the offending one:
(03:35:02 PM) dholbach:       (xsu -c "$0" -u root -i "@PREFIX@/share/pixmaps/xnetcardconfig.png" -t "Configure network" -d -m "Network configuration requires^superuser priveleges.") >/dev/null 2>&1 || {
(03:35:52 PM) Grazieno: sed -i 's/xsu/gksu/g' xnetcardconfig.in
(03:36:02 PM) dholbach: just replacing 'xsu' with 'gksu' is not going to work
(03:36:22 PM) dholbach: if you look at the manpage of gksu, you'll find out that there is no '-c' or '-i'
(03:36:39 PM) dholbach: as I read the manpage, something like
(03:36:42 PM) dholbach:      (gksu -c "$0" -D /usr/share/applications/xnetcardconfig.desktop) >/dev/null 2>&1 || {
(03:36:44 PM) dholbach: might work
(03:36:50 PM) dholbach: it's something we need to test in the end
(03:36:50 PM) Grazieno: hum..
(03:37:12 PM) dholbach: Grazieno: you have a question?
(03:37:19 PM) Grazieno: dholbach: no
(03:37:28 PM) dholbach: ok good
(03:37:40 PM) dholbach: let's document that change too, please run
(03:37:42 PM) dholbach:     dch -e
(03:38:03 PM) dholbach: something like this will do:
(03:38:03 PM) dholbach:   * xnetcardconfig.in: replaced usage of xsu with gksu.
(03:38:20 PM) dholbach: now we come to mirrado's point
(03:38:24 PM) dholbach: mirrado: care to explain?
(03:38:34 PM) dholbach: <charliecb> QUESTION: why  /usr/share/applications/xnetcardconfig.desktop ? who creates that file?
(03:39:40 PM) mirrado: we need to substitute the mantainer field with XSBC-original-mantainer tag
(03:39:48 PM) dholbach: charliecb: I'll make it short becaues it's not really relevant to the topic of the session... as I read the gksu manpage you can pass it the location of a Desktop file, where it get description of the program from (instead of the strings that were passed to xsu call before)
(03:40:27 PM) dholbach: charliecb: I saw it in gksu's manpage and found that the .desktop file in the tarball is available at ./xnetcardconfig.desktop
(03:40:52 PM) charliecb: ok. thanks
(03:41:02 PM) dholbach: charliecb: and grepping for .desktop in the source I found out that it's installed to "/usr/share/applications/xfld-xnetcardconfig.desktop" - thanks for prodding me, I was wrong :-)
(03:42:12 PM) dholbach: if you want to update the line in xnetcardconfig.in, it's now:
(03:42:13 PM) dholbach:   (gksu -c "$0" -D /usr/share/applications/xfld-xnetcardconfig.desktop) >/dev/null 2>&1 || {
(03:43:03 PM) dholbach: mirrado is completely right in what he says, we need to follow https://wiki.ubuntu.com/DebianMaintainerField
(03:43:38 PM) rzr is now known as rZr
(03:43:49 PM) dholbach: our friends at Debian asked us to preserve the debian maintainer in debian/control, but set a different maintainer address so that Ubuntu users are not going to mail them if the Ubuntu package is broken :)
(03:44:10 PM) dholbach: we'll replace this:
(03:44:13 PM) dholbach:    Maintainer: Benedikt Meurer <bm@os-cillation.de>
(03:44:15 PM) dholbach: with
(03:44:22 PM) dholbach:    XSBC-Original-Maintainer: Benedikt Meurer <bm@os-cillation.de>
(03:44:30 PM) dholbach:    Maintainer: Ubuntu MOTU Developers <ubuntu-motu@lists.ubuntu.com>
(03:45:51 PM) dholbach: ok, let's document that too :)
(03:46:14 PM) dholbach: 'updated Maintainer field' should be fine
(03:46:45 PM) dholbach: now we'll do what holloway suggested: a new source package
(03:47:03 PM) mirrado: We need to register in the changelog our changes in the xnetcardconfig.in
(03:47:06 PM) holloway: debuild -S :)
(03:47:15 PM) dholbach: mirrado: exactly
(03:47:17 PM) geser: dpkg-source: error: syntax error in ./xnetcardconfig-0.2.0/debian/control at line 14: duplicate field Conflicts found
(03:47:19 PM) dholbach: holloway: exactly
(03:47:41 PM) dholbach: geser: good point - let's take a look at it
(03:48:13 PM) dholbach: geser is right - there are two Conflicts statements, let's merge them
(03:48:47 PM) dholbach: also let's document it
(03:48:49 PM) charliecb: i don't see conflicts when i run "debuild -S"
(03:49:16 PM) dholbach: charliecb: that's because you're on gutsy - the hardy build will fail
(03:49:33 PM) charliecb: ok
(03:49:34 PM) dholbach: you should get    E: xnetcardconfig source: debian-control-with-duplicate-fields conflicts: 13, 15   though
(03:49:51 PM) dholbach: <Iulian> QUESTION: Standards-Version shouldn't be 3.7.3 ?
(03:50:03 PM) dholbach: Iulian: good question - can you explain what Standards-Version means?
(03:50:33 PM) Iulian: It's the Standards-Version from the debian policy.
(03:50:39 PM) dholbach: exactly
(03:51:01 PM) dholbach: so if you put standards version 3.7.3 in there, you're saying "this package complies to version 3.7.3 of the debian policy"
(03:51:12 PM) dholbach: which is something I wouldn't testify right now :)
(03:51:31 PM) Iulian: Right :)
(03:51:38 PM) dholbach: changing the Standards-Version is a good thing if it's a package that you maintain
(03:52:03 PM) dholbach: if it's a package we inherit from debian or some other place, we try to only introduce minimal changes that have a bigger effect
(03:52:13 PM) dholbach: so changing just the standards-version is probably not something we'd do
(03:52:29 PM) dholbach: Iulian: but a lot of people still do it - so the question is definitely justified :)
(03:52:38 PM) dholbach: alrighty
(03:52:58 PM) dholbach: did the    debuild -S   command work for everybody now that we merged the Conflicts fields?
(03:53:09 PM) dholbach: +1?
(03:53:16 PM) charliecb: +1 (with gutsy)
(03:53:40 PM) dholbach: anybody else?
(03:53:49 PM) Iulian: +1
(03:54:04 PM) mirrado: +1
(03:54:05 PM) barcc: +1
(03:54:09 PM) dholbach: ahhh, here we go
(03:54:18 PM) dholbach: now
(03:54:20 PM) dholbach:   cd ..
(03:54:30 PM) dholbach:    debdiff xnetcardconfig_0.2.0-1.dsc xnetcardconfig_0.2.0-1ubuntu1.dsc
(03:54:36 PM) Grazieno: +1
(03:55:11 PM) dholbach: This command will print out the diff the between the two source packages (0.2.0-1 and 0.2.0-1ubuntu1)
(03:55:22 PM) charliecb: +1
(03:55:25 PM) dholbach: can you all put your debdiff up at http://paste.ubuntu.com and paste the link here?
(03:57:04 PM) charliecb: http://paste.ubuntu.com/4869/
(03:57:10 PM) Grazieno: http://paste.ubuntu.com/4868/
(03:57:43 PM) barcc: http://paste.ubuntu.com/4870/
(03:58:10 PM) dholbach: Grazieno: you don't mention that you drop the xsu depends and don't mention which files you changes, but apart from that: very good
(03:58:14 PM) Iulian: http://paste.ubuntu.com/4871/
(03:58:31 PM) mirrado: http://paste.ubuntu.com/4872/
(03:58:47 PM) dholbach: charliecb: you did not mention the change in xnetcardconfig.in, other than that: good work
(03:59:18 PM) dholbach: barcc: good work :)
(03:59:53 PM) dholbach: Iulian: you didn't change xnetcardconfig.in and your changelog is a bit sparse
(04:00:33 PM) dholbach: mirrado: your changelog does not list all the changes either, other than that: good work
(04:00:40 PM) dholbach: WOW, I'm amazed - well done everybody!
(04:00:51 PM) dholbach: so what would be next:
(04:00:59 PM) mirrado: I'm correcting it right now.
(04:01:10 PM) dholbach:  - what charliecb mentioned above: test building it with pbuilder (http://wiki.ubuntu.com/PbuilderHowto)
(04:01:22 PM) dholbach:  - testing if our suggested xsu fix really works
(04:02:06 PM) dholbach:  - then we'd add a    (LP: #181494)   to the bug report, so the bug will automatically closed once our patch gets uploaded
(04:02:18 PM) dholbach: then we'd run:
(04:02:33 PM) dholbach:    debdiff xnetcardconfig_0.2.0-1.dsc xnetcardconfig_0.2.0-1ubuntu1.dsc > debdiff
(04:02:48 PM) dholbach: and attach the resulting debdiff file to the bug report
(04:03:08 PM) dholbach: and subscribe ubuntu-universe-sponsors to the bug report to get the fix uploaded
(04:03:30 PM) dholbach: https://wiki.ubuntu.com/SponsorshipProcess has more information on how to get it uploaded :)
(04:04:05 PM) dholbach: fixing this bug will actually two bugs:
(04:04:11 PM) dholbach: Once https://bugs.edge.launchpad.net/ubuntu/+source/xnetcardconfig/+bug/181494 is done
(04:04:19 PM) dholbach: https://bugs.edge.launchpad.net/ubuntu/+source/xsu/+bug/181495 can be fixed too :)
(04:04:40 PM) charliecb: dholbach: isn't it enough to attach the diff to https://bugs.launchpad.net/ubuntu/+source/xnetcardconfig/+bug/181494 ???
(04:04:47 PM) dholbach: so I hope somebody of you will walk through all the additional steps I mentioned so we get those two bugs ironed out :)
(04:05:13 PM) dholbach: charliecb: the sponsoring process requires that the sponsors team is subscribed to the bug
(04:05:31 PM) dholbach: charliecb: if you look at the bug you will notice that just three people are subscribed to it right now
(04:05:59 PM) dholbach: having the sponsors team on it will make sure you don't block on just one person, but it will be dealt with by a bigger team
(04:06:15 PM) dholbach: any last questions? :)
(04:06:34 PM) charliecb: no. thanks for the nice lesson, dholbach!!
(04:06:37 PM) Iulian: All good here.
(04:06:39 PM) dholbach: rock on!
(04:06:46 PM) mirrado: http://paste.ubuntu.com/4874/
(04:06:59 PM) Iulian: The next package will be much better than this one.
(04:07:04 PM) mirrado: Is it correct now?
(04:07:07 PM) dholbach: tomorrow we'll have a MOTU Q&A session - if anything came up in your mind after this session, bring your questions to that session instead :)
(04:07:42 PM) Iulian: Okies
(04:07:48 PM) Iulian: Thank you dholbach!
(04:07:55 PM) Grazieno: dholbach: thanks, really!
(04:07:56 PM) dholbach: mirrado: better, I'd just mention the other changes to debian/control too: maintainer field change and merge of the two conflicts lines
(04:08:02 PM) dholbach: mirrado: other than that: good work
(04:08:08 PM) dholbach: thanks everybody: you guys ROCK
(04:08:15 PM) Iulian: That was awesome!
(04:08:16 PM) mirrado: Thanks dholbach :)
(04:08:25 PM) dholbach: and I'd like to welcome you all to working with the MOTU team - it's big fun!
(04:08:32 PM) dholbach: http://wiki.ubuntu.com/MOTU/GettingStarted
(04:08:37 PM) barcc: you ROCK!
(04:08:46 PM) dholbach: have a great day everybody and see you tomorrow!

MeetingLogs/devweek0802/Debdiff2 (last edited 2008-08-06 16:36:14 by localhost)