/srv/irclogs.ubuntu.com/2008/01/18/#ubuntu-classroom.txt

=== bmk789 is now known as bmk789_sick_bed
=== bigon is now known as bigon`
dholbachMOTU Q&A session in 8 minutes12:52
Hobbseedholbach: can i have a pony?12:52
dholbachthat depends.... ;-)12:53
Hobbseeon?12:53
dholbach:-)12:53
* dholbach right now needs to find out what we covered last time12:53
rzrdholbach: what to not do i think12:53
rzr$ ./hello *12:54
dholbachyeah, I have a list of the other items on my box, but don't recall which bits we covered and which we didn't12:54
dholbachah found it... great12:54
dholbachWelcome to another MOTU Q&A Session!12:59
dholbachWho's here for some MOTU Q&A action?12:59
* warp10 raises his hand12:59
* rzr _o/12:59
dholbachLet's start with another round of introductions.... :-)13:00
=== bigon` is now known as bigon
* dholbach is Daniel Holbach, member of the MOTU team and tries to make the MOTU journey as pleasant and straight-forward as possible :)13:00
mruiz_0/13:00
* Hobbsee is the looney one13:00
* warp10 is Andrea Colangelo, MOTU helpful, getting a lot of fun :)13:01
* slytherin is a motu hopeful with special interest in java related packages13:01
dholbachrock on warp10, slytherin! :-)13:01
* rzr recently joined MOTU an maintains some packages also debian side ...13:01
dholbachgreat13:02
rzrslytherin: java , we need to do a Q&A session about this i fell13:02
dholbachdo we have some questions already?13:02
* warp10 has a question13:02
dholbachwarp10: fire away13:02
rzrslangasek:  someday at least13:02
warp10I would like to request syncs for some packages in contrib and non-free. Since they are not in Ubuntu yet, what's the best way to find out if such packages can land in universe or need to stay in mutilverse?13:02
* Hobbsee wants to become a MOTU13:03
dholbachwarp10: sometimes the changelog or copyright of the debian package already points out why it was moved to non-free or contrib in the first place13:03
dholbachthe archive admins will check the package carefully, when it is in non-free/contrib in Debian13:04
dholbachif all fails, you need to check the license texts in the package yourself13:04
dholbach(and the headers of source files, etc)13:04
dholbachany other questions?13:04
warp10dholbach: Ok, great. And for the procedural side, it is enough to report a bug (maybe using requestsync) or is there any special procedure?13:05
dholbachwarp10: no, that's exactly the process13:05
warp10Cool. Thank you :)13:05
dholbachit helps to point out explicitly what you know about the package, when you file the bug, but that's all there is about it13:06
dholbachok... if we don't have questions right now I'm sure we'll have some later on :)13:06
rzras suggested can we fix a java Q&A session date , since icedtea is on good way ..13:06
rzrI can help about gcj too13:06
dholbachsome of you might know, last session we answered the question "how do we make the most awful package ever?"13:06
dholbachwe still have some proposals on the list we didn't talk about last time13:07
dholbachif nobody has other questions, I think we'll just chat a bit about the other items on the list13:07
Hobbseedholbach: we use yada13:07
Hobbsee!13:07
Hobbseeoh, no...no, no....13:07
dholbachHobbsee: yeah, that was one of the proposals13:07
* Hobbsee has one better than that13:07
Hobbseewhere's steve?13:07
dholbachin bed? :)13:07
dholbach<Amaranth> interactive builds13:07
dholbach<Amaranth> an interactive build took out the buildds recently, didn't it?13:07
Hobbseeno, he's still awake13:07
Hobbseeyeah, it did13:08
dholbachwhat amaranth proposed is quite effective for a bad package :-)13:08
TuxCrafterhello all I will join this session13:08
dholbachwelcome TuxCrafter13:08
TuxCrafterwere is the agenda?13:08
dholbachTuxCrafter: if you have any questions, be sure to just ask them - right now we're discussing how to really produce packages13:08
Hobbseedholbach: try a debian/rules file building the .deb by hand.13:08
dholbach(and clarify how best not to do that)13:08
dholbachHobbsee: we had that too13:08
rzrTuxCrafter: see topic13:08
dholbachhang on13:08
Hobbseeoh, you saw that?13:08
Hobbseepity13:08
dholbachhttp://daniel.holba.ch/temp/qa-negative13:09
dholbachthat's the answers we got last time13:09
dholbachwe're at this one right now:13:09
dholbach<Amaranth> interactive builds13:09
dholbach<Amaranth> an interactive build took out the buildds recently, didn't it?13:09
Hobbseedholbach: you also got the packages that require sun java to build, which require a licence agreement, or programs that attempt to download from the internet?13:09
* slytherin has a suggestion13:09
dholbachHobbsee raises a good point13:10
dholbachif you install sun-java* it will ask you to accept a license agreement13:10
dholbachon a build daemon this manual interaction is impossible13:10
dholbachslytherin: fire away13:10
rzrdholbach: it is there are some hack to13:10
slytherindholbach: you finish first. I have suggestion regarding java packages13:10
rzrdholbach: let me find this out ...13:10
Hobbseerzr: the buildd admins have to do it manually13:10
Hobbseedholbach: you haven't mentioned the hardcoded dependancies either13:11
dholbachHobbsee: on things like         libsomething12   ?13:12
Hobbseedholbach: as in, lack of understanding about shlibdeps, and so hardcoding all the packages it needs to depend on in Depends:13:12
Hobbseeincluding libraries like that, yes13:12
dholbachyeah good point - I've seen that a couple of times13:12
* Hobbsee has seen that more than a couple13:12
dholbachdoes everybody understand what Hobbsee is referring to?13:12
TuxCrafter*** got a question for Q&A: If i look at the fedora process they have a very nice structured system with cody, will there come a similar system for ubuntu?13:12
HobbseeTuxCrafter: what's cody?13:13
HobbseeTuxCrafter: got a URL or something?13:13
dholbachTuxCrafter: I'm afraid I don't know anything about cody - can you elaborate?13:13
TuxCrafterHobbsee: my firefox is down i have to restart internet for it so i can find the info brb13:13
slytherinTuxCrafter: please raise your hand first before asking question so that you don't interupt the current discussion. :-)13:13
dholbachslytherin: you wanted to raise another point?13:14
slytherindholbach: Can you please explain what Hobbsee was saying13:14
dholbachok13:14
dholbachmost packages (for example those written in C or C++) have something similar to this in their depends line:13:14
rzrHobbsee: I noted how to workaround the "ask licence" blocker : http://rzr.online.fr/q/pbuilder13:14
dholbachDepends ${shlibs:Depends}, some-other-package13:14
dholbachDepends: ${shlibs:Depends}, some-other-package13:14
dholbachthe package build system will check which libraries the binaries are actually linked against, and then substitute ${shlibs:Depends} automatically13:15
dholbachso it's wrong to have a fixed Depends: libsomething1213:15
dholbachthis is important for example in cases of library transitions (libsomething12 -> libsomething13)13:16
dholbachif you use ${shlibs:Depends} a simple rebuild will probably suffice13:16
dholbachslytherin: does that make more sense now?13:16
slytherindholbach: Yes it does. Thanks.13:16
dholbachok great13:17
dholbachI hope the "interactive" item was clear too13:17
TuxCrafter*** has a question13:17
dholbachTuxCrafter: fire away13:17
TuxCrafter*** my dns is down and cant connect to web-pages on this moment and is sorry for this13:17
* Hobbsee didn't find any object named "cody" when searching for fedora and cody, where cody was not a person.13:18
dholbachHobbsee: same here13:18
TuxCrafterI have compared some debian packages with ubuntu and some of the ubuntu packages have far more dependecies than the ones in ubuntu, what can we do about this?13:18
Hobbseedholbach: you forgot packages requring scons.13:18
TuxCrafterwhat procedures to follow13:18
HobbseeTuxCrafter: reread, and correct your statement :)13:18
dholbachHobbsee: that's not necessarily a problem13:18
Hobbseedholbach: if it is written well, sure13:19
Hobbseedholbach: still, i guess there's not that much you can do if upstream decides to use it13:19
TuxCrafters/ones in ubuntu/ones in debian/13:19
dholbachTuxCrafter: do you have examples?13:19
TuxCrafterdholbach: i believe last time I checked it was pidgin13:20
dholbachI noticed for example GNOME packages that use different linker options nowadays which should resolve that13:20
dholbachI think it was wl,as-needed that they used for that13:21
dholbachbut I can't really comment on that, I'm no expert there13:21
HobbseeTuxCrafter: debian's pidgin and ubuntu's pidgin don't tend to overlap13:21
dholbachI think the summary was "it should be all good now" :-)13:21
Hobbseeor didn't, last i checked13:21
slytherindholbach: Now the suggestion I have to make is ; We should make some policy that when new java apps/libs are being added in Ubuntu (not present in Debian), we should prefer GCJ as compiler (java-gcj-compat-dev)13:22
dholbachI'm looking at packages.debian.org and launchpad.net right now13:22
dholbachslytherin: that's something the Debian / Ubuntu Java Team should decide - I can't really comment on the fitness of any compiler13:23
slytherinOk.13:24
TuxCrafterbut the problem behind it was that there were some people thing of creating a distribution spin of ubuntu or debian for the eeepc, and choice for debian because the dependecy were better and there for the total install size was much smaller for the same functionality. To bad i cant give exact examples because of my current dns problem.13:24
dholbachTuxCrafter: to me it seems like there's only liblaunchpad-integration0 which is in addition to the debian depends13:24
TuxCrafters/thing/thinking/13:24
rzrtalking about that, when a java app can be built as native code, should it be ? what is the policy ?13:24
dholbachrzr: we absolutely prefer that13:25
dholbachthere are packages in multiverse that ship pre-built .jar files, but we try to avoid it13:25
rzrI plan to do this on my packages, provide a -native and -java packages from the same source13:25
TuxCrafter*** is going to reset its modem to see if the dns problem resolves13:25
dholbachTuxCrafter: I can't comment on that - it'd be nice to see the results of an investigation - at the moment I see no points indicating that13:26
dholbachTuxCrafter: good luck13:26
rzrTuxCrafter: using other dns server may help13:26
dholbachTuxCrafter: does adding        "nameserver 141.1.1.1"     to /etc/resolv.conf help or is it more complicated than that?13:26
slytherinrzr: native may not be prefered. But I am not sure if there is any policy for/against that13:26
KmosTuxCrafter: opendns.com13:26
dholbachKmos: might be a bit hard to look it up without working DNS :)13:27
rzrslangasek: what are the reason to prefer jvm to native for applications ?13:27
Kmosdholbach: right...13:27
slytherinrzr: will they run with all the VMs?13:27
slytherinrzr: oops, please excuse me if I don't understand the concept of native code13:28
rzrTuxCrafter: btw :  nslookup opendns.com = 208.67.219.9913:28
Kmos208.67.222.222 ; 208.67.220.220 -> opendns13:28
TuxCrafte1*** everything working again13:28
dholbachgreat13:28
dholbachok... any other questions?13:28
dholbach(moving on while we have no real Java expert around)13:28
dholbach(doko in #ubuntu-devel and man-di are the most knowledgeable people I know)13:29
slytherindholbach: I plan to become one before hardy. :-)13:29
dholbachslytherin: excellent - that's highly appreciated :)13:29
rzrslytherin: i think it's a bit out topic, we'll talk about it the java q+a day :)13:29
dholbachok... anything else? if not we'll continue with our "how to make a BAD package" discussion :)13:30
slytherinrzr: sure if we have one13:30
dholbach<rulus> missing .desktop file for a graphical application13:31
dholbachhttps://wiki.ubuntu.com/PackagingGuide/SupplementaryFiles has a lot of information on the topic of .desktop files13:31
dholbachit's generally a good idea to add them (preferrably in upstream land)13:31
dholbach<txwikinger2> icons in wrong places13:32
dholbachis a similar point13:32
dholbach<dholbach> missing files in the package13:32
dholbachis a really interesting one13:32
dholbachif you have a source package that is split up in several binary packages this mistake is very easy to make13:32
rzrtalking about icons, can we just automatize missing icons from screenshots of apps ?13:32
TuxCrafte1*** got a other question13:33
dholbachrzr: it's a lot of work :)13:33
dholbachTuxCrafte1: fire away13:33
rzrdholbach: for a human , not a script shell , I'll note this down :)13:33
TuxCrafte1were is the defined behaviour for the remove  --purge options on packages, because some times they remove for example an init script and sometimes they dont. what are the rules for this and were can you find them and who is makeing them13:34
dholbachas far as I know conf files are not to be removed, just if you purge the package13:36
dholbachdebian/conffiles is the file where they are registered13:37
dholbachcoming back to the "missing files in a package" item13:37
dholbachone of the easiest ways to avoid this is running13:37
dholbachdebuild -us -uc && dh_install --list-missing13:38
dholbachwhich will (of the built source tree) make a list of files that the upstream build system wants to install, but are not installed into one of the binary packages13:38
warp10Cool...13:38
dholbachalso it's annoying if the upstream tarball ships example code or documentation, which never makes it into /usr/share/doc/<package>13:39
dholbachusers should not have to download the upstream source to do that :)13:39
dholbachif necessary you can split out documentation into a separate -doc package13:39
dholbach<dholbach> software without active upstream13:39
dholbach<amarillion> dholbach, but what if the software is finished?13:39
dholbach* persia likes software without active upstream, if it is stable and well written.13:39
dholbach<rulus> (software is never finished?)13:39
dholbachwe often receive packages of new software where the last updates were made in 200413:40
dholbachif you plan to maintain such a package, think twice if you really want to take care of bugs of this package, if there's nobody you can escalate problems to13:40
dholbacha good relationship to the upstream maintainer (and maintainers of other distros) is really important13:41
dholbachthe next point on the list is somewhat similar:13:41
dholbach<dholbach> inactive maintainer, no bug triage13:41
dholbachif you plan to maintain a package, make sure that you plan to read bug reports of your users :-)13:41
dholbachyou don't need to fix them all yourself, but you somehow need to take care of them13:42
dholbachany questions?13:42
TuxCrafte1maybe indicate that a package has  no active maintainer13:42
TuxCrafte1both on the ubuntu side as upstream13:42
dholbachTuxCrafte1: can you elaborate?13:42
TuxCrafte1as part of the Q&A13:42
dholbachI'm afraid I don't understand13:43
TuxCrafte1dholbach: it can happen that people sent in bug reports and nothing happends to them, it would be nice for people the be able to see in lets say launcepad that the package has no active maintainers13:44
TuxCrafte1this way you give some information about the quality/state of the used package13:44
dholbachright, but I think no user should have to worry about that, that's why it's important to bear that in mind when you start packaging new software13:44
dholbacha lot of packages have maintenance teams and not a dedicated maintainer13:45
TuxCrafte1true13:45
dholbachany other questions?13:45
dholbachthe session ended there last time, but persia had some items he encountered during reviews of packages13:46
dholbachChangelog in debian/docs13:46
dholbachdebian/docs is the file where you specify which files of the source should go into /usr/share/doc/<...>13:46
effie_jayxdholbach, how can one help with watchfiles?13:46
dholbachthe Changelog is different and should be installed by using dh_installchangelogs13:47
dholbacheffie_jayx: are you referring to http://qa.ubuntuwire.com/uehs/no_watch.php ?13:47
effie_jayxdholbach,  yes... where could I find usefull info on watchfiles and how can I help?13:48
dholbachah right13:48
dholbachhttps://wiki.ubuntu.com/PackagingGuide/Recipes/DebianWatch is a good tutorial on writing watch files13:48
dholbachthe manpage of uscan(1) has more information too13:49
dholbachdoes everybody know what a watch file is?13:49
effie_jayxdholbach, trying to learn about them13:50
dholbachdebian/watch specifies where to get new upstream releases of the software you're packaging13:50
effie_jayxuscan can be found in what package?13:50
dholbacheffie_jayx: devscripts13:50
dholbachthis is important as with uscan you can "automatically update a package" it does not fix all issues with it, but it simplifies the task a lot13:50
dholbachalso it's easy for others to see if your package it up to date13:51
dholbachwe could even automate the process and have a list of packages in the archive that are not up to date13:51
dholbachok... persia had another item on the list:;13:51
dholbach - Patching upstream makefile to install extra stuff13:51
dholbachwhere he notes: Use dh_install instead13:52
dholbachdoes that make sense?13:52
* rzr hides :)13:52
dholbachok... any questions?13:53
TuxCrafte1dholbach: isn't it better to let upstream include the extra stuff13:53
dholbachTuxCrafte1: sure, sometimes that works13:53
dholbachin some cases the upstream maintainer and you might disagree13:54
dholbachor you have user contributions like a new icons, etc13:54
dholbachbut in general you're right: the more work that goes upstream, the better13:54
TuxCrafte1dholbach: is't it better then to create two packages one that is mainstream and one with ubuntu enhancements13:54
dholbachif you add a   package-extras   package that just contains the additions that's probably fine13:55
dholbachif you re-package everything the archive admins might be a bit unhappy :)13:55
dholbachfor reasons like: having to apply security fixes to two packages instead of one, disk space, etc etc :)13:55
TuxCrafte1yea but in the spirit of bug tracking it is a lot better13:55
dholbachlet's just say that "getting the stuff upstream" is the best solution :)13:56
TuxCrafte1*** got a question about motu/packaging training13:56
dholbachTuxCrafte1: fire away13:56
TuxCrafte1are there video tutorials for moto packaging, because there is o much info about this topic that when you start reading you dont now how much time it takes before you can build a good package13:57
dholbachhttp://wiki.ubuntu.com/PackagingGuide13:57
TuxCrafte1and I want to start packaging but the guide is so big13:57
dholbachhas a couple of "recipes" that are tutorials13:57
dholbachwhich should be easy to follow13:58
dholbachI don't know of any videos yet13:58
dholbachok... we're at the end of our session13:58
TuxCrafte1dholbach: i see the guide is starting to get organized, nice to see this13:59
dholbachI hope to see you all next week again13:59
dholbachTuxCrafte1: thanks for the flowers - I put a lot of work into it :)13:59
TuxCrafte1thanks for all the info13:59
rzrsee ya thx dholbach it's always apreciated13:59
dholbachthanks a lot for attending13:59
dholbachsee you all in #ubuntu-motu :-)13:59
TuxCrafte1bye and thanks daniel13:59
warp10Thank you dholbach! :)13:59
dholbachhttp://wiki.ubuntu.com/MOTU/GettingStarted (if you haven't read it yet)13:59
rzrdholbach: what do you think about joining the java team and make a special q&a on this topic ?14:00
dholbachrzr: I'm afraid I'm not the right person to join the team14:00
dholbachrzr: but I'll try to organise a session on the topic14:00
dholbachI'll keep you updated14:00
* dholbach is out to walk the dog - see you guys around! :)14:00
rzrnice14:01
rzrlater14:01
=== bigon is now known as bigon`
=== bigon` is now known as bigon
=== \sh_away is now known as \sh
=== Pricey is now known as PriceChild
=== bigon is now known as bigon`
=== bigon` is now known as bigon
=== bigon is now known as bigon`
=== bigon` is now known as bigon
=== bigon is now known as bigon`
=== bigon` is now known as bigon
=== bigon is now known as bigon`
=== bigon` is now known as bigon
sistpotyhi everyone, sorry for being late20:05
warp10hi sistpoty20:05
sistpotyhi warp1020:06
sistpotyso who's around for part 2 of the library packaging session?20:06
albert23hello sistpoty20:06
sistpotyhi albert2320:06
sistpotyfirst off, there is an excellent guide about debian library packaging. We'll use this one as a reference for this session:20:07
sistpotyhttp://www.netfort.gr.jp/~dancer/column/libpkg-guide/libpkg-guide.html20:07
nixternalthanks sistpoty for the wakeup call :)20:09
sistpotyhi nixternal :)20:09
nixternalwell howdy20:09
sistpotyok, in part 1, we hopefully learned all the basic stuff about shared objects.20:09
ScottKYou wouldn't have a link to the log for that would you?20:10
nixternalI was just gonna ask, I have a lib I gotta package up :)20:10
albert23http://irclogs.ubuntu.com/2008/01/17/%23ubuntu-classroom.html20:10
sistpotyScottK: sorry.. no idea if this is publically logged somewhere20:10
sistpotythanks albert2320:10
ScottKalbert23: Thanks20:11
sistpotynow in part 2, we'll be packaging a library by example, and will discuss a few of the caveats20:11
sistpotysince I'm lazy, let's take libmyhello again from part 120:12
sistpotyhttp://www.potyra.de/library_packaging/libmyhello-1.0.1.tar.gz20:12
sistpotyeveryone got it?20:13
warp10y20:13
hellboy195y20:13
albert23yep20:13
sistpotyok, let's start with debianization... unpack it, rename the tarball so that we've got a valid .orig.tar.gz20:13
sistpotylet's take a look, we'll always need a few files in there, let's start with debian/copyright20:14
sistpotyput in the usual stuff there (this is not really important for the technical bits of library packaging)20:16
sistpotywhat else do we need... I guess we'll be using debhelper, so let's create a compat in debian/20:17
sistpotyeveryone got it so far?20:17
hellboy195y20:17
warp10y20:17
albert23y20:18
sistpotyok, now let's start with the interesting bits20:18
sistpotythe control-file20:18
sistpotyFirst off comes the usual stuff (I'll pastebin this)20:19
sistpotyhm... pastebin is kinda slow today :(20:19
sistpotyok, I'll paste it right here... pastebin doesn't like me *g*20:20
sistpotySource: libmyhello20:21
sistpotySection: libdevel20:21
sistpotyPriority: optional20:21
sistpotyMaintainer: Your Name <youraddress@bla.org>20:21
sistpotyBuild-Depends: debhelper (>> 5.0.0)20:21
sistpotyStandards-Version: 3.7.2.020:21
sistpotyfor a library, we'll always end up with two packages20:22
sistpotytwo binary packages even20:22
sistpotyone package contains the shared object(s)20:22
sistpotyand another one, the -dev package will contain everything you need to develop applications with the shared object20:23
sistpotyi.e. header-files, eventually a statically linked library, eventually pkconfig files (which specify what to pass to the compiler/linker to link against this library)20:24
sistpotyso let's create an entry for the -dev package20:25
sistpotyPackage: libmyhello-dev20:25
sistpotyArchitecture: any20:25
sistpotyDescription: myhello library headers20:25
sistpoty This package contains the development headers20:25
sistpoty for libmyhello.20:25
* ScottK notes sistpoty needs to update to the current standards version...20:26
sistpotyScottK: hehe, I'm not up to date20:26
sistpotythe package containing the shared object will need to be named in a special way:20:27
sistpotyit must be related to the soname.20:28
sistpotythe library packaging guide I mentioned contains the rules how it should be named20:28
sistpotychapter 5, section 320:29
sistpotyremember the soname of libmyhello yet?20:29
sistpotyanyone?20:30
warp10mmm... libmyhello.so.1, maybe?20:30
sistpotywarp10: exactly20:30
sistpotyif you wouldn't have remembered, you could of course always use objdump -p <shared object> to find out20:31
sistpotyso in this case, the name of the library would be libmyhello120:33
sistpotyif you've got a library, that contains more than one shared object20:33
sistpotyyou'll need to create a binary package for each of these20:33
sistpotylet's add an entry for the binary package20:33
sistpotyPackage: libmyhello120:34
sistpotyArchitecture: any20:34
sistpotyDepends: ${shlibs:Depends}20:34
sistpotyDescription: myhello library20:34
sistpoty This package contains the hello library.20:34
sistpotyok. anyone got a clue, why the name of this binary must be related to the SONAME?20:35
sistpotythis binary package...20:35
sistpotyanoyne`20:36
sistpoty+?20:36
albert23we want to be able to install multiple versions of the library, when ABI changes20:36
sistpotyalbert23: excellent20:36
sistpotyso does anyone have an idea why this could be needed?20:37
warp10sistpoty: maybe different packages may need different versions of the library?20:38
sistpotywarp10: this would be one argument, but not the main one.20:38
sistpotylet's just consider that a very essential library (maybe libc) will get updated20:38
sistpotycurrently, I've got libc6 installed, and I guess almost all packages I've got installed will depend on libc620:39
sistpotysuddenly, a new libc7 appears20:39
sistpotyif it couldn't be installed side-by-side to libc6, that would mean that I had to remove *all* installed programs20:40
sistpotyor that all programs would immediately break if libc6 were removed by force20:40
sistpotythat's pretty bad, hm?20:40
sistpoty(I tried this once when I didn't have a clue... wasn't so funny back then *g*)20:41
warp10:)20:41
sistpotyany questions so far?20:41
warp10I have one20:42
warp10Why the -dev package doesn't need any Depends: field?20:42
sistpotywarp10: excellent question... it needs one :)20:42
sistpotyso, as I wrote earlier, the -dev package is what you install if you want to build programs using this library20:43
sistpotyso we need to make it depend at least on the library package20:44
sistpotylet's add the depends line there20:44
sistpotythe header files in question should always match what's in the shared object20:45
sistpotyhence we'll need to restrict the version for this dependency20:45
sistpotyDepends: libmyhello1 (= ${binary:Version})20:46
sistpotyhowever often you'll need additional libraries to compile a program with a specific library20:47
sistpotyso you'll need to add the corresponding -dev packages there as well.20:47
sistpotya good indication should give you the NEEDED entries of the shared object20:48
sistpotyso you'll just need to find the corresponding -dev package that contains these shared objects20:49
sistpotyso, what do we need here?20:50
albert23NEEDED      libc.so.620:51
sistpotygreat.20:51
sistpotyso let's find out in which package this is (we'll see a better method later)20:52
sistpotyjust use dpkg -S libc.so.620:52
sistpotyhooray, it's libc6 :)... so we'll want libc6-dev20:53
sistpoty(libc6-dev is often ommitted, since build-essential already depends on it. however it's not wrong to add it)20:54
sistpotyas you might have noticed, in the case of libc6, the -dev package is not named like the source package20:55
sistpotybut instead it is named like the binary package + -dev20:55
sistpotythis is useful, if you want to have more than just one version of the library in the archive20:56
sistpoty(e.g. because one application needs the old one, and won't build with the new version)20:56
sistpotythen you'll need to be able to select which -dev package you want20:56
ScottKThere's a very recent thread on adding libc6 on debian-devel that came down pretty strongly in favor of adding it.20:57
sistpotyif you do this, you should have the -dev package(s) of the different versoin Provide and Conflict to libmyhello-dev package20:57
sistpotyScottK: ah, haven't read that one yet20:58
sistpoty(or maybe I have but forgot *g*)20:58
sistpotyok, does everyone have the control file so far?20:59
albert23y20:59
warp10y20:59
sistpotyhehe, mine is still missing the depends line *g*21:00
sistpotyok21:01
sistpotywhat else do we need... a changelog file. just create one with dch21:01
sistpotydch --create21:03
sistpoty(needed to look this up, thought it always was -c)21:03
sistpotyeveryone got it filled in?21:04
warp10y21:04
albert23y21:05
sistpotyok, then let's start with the rules file21:05
sistpotylet's see what targets we need to adhere to the policy: clean, build, binary, binary-arch, binary-indep21:06
sistpotydid I miss one?21:06
warp10install?21:07
ScottKconfigure?21:07
slangaseknot required by policy :)21:07
sistpotyyep21:07
warp10configure should be optional, right?21:07
sistpotyhi slangasek btw.21:07
* slangasek waves21:07
warp10install is optional too?21:08
sistpotywarp10: libmyhello fortunately doesn't need to be configured, as it doesn't use autotools21:08
sistpotywarp10: yes21:08
sistpotylet's start with clean, should be easiest21:09
sistpotysince we'll use debhelper, we'll first call dh_clean21:09
sistpotyand then: make clean21:09
sistpotyto cleanup libmyhello stuff21:09
sistpotyor, if you prefer make distclean21:09
sistpoty(which won't make a difference *here*)21:10
sistpotythen let's get a shot at the build rule21:12
james_wsistpoty: dh_testroot to start clean as well?21:12
sistpotyjames_w: right, makes sense21:13
sistpotyok, build should be easy as well.21:14
sistpotyjust a call to make21:14
sistpotyany questions so far?21:14
warp10n21:15
albert23n21:15
sistpotyok, then let's go to the binary target21:15
sistpotysince this is an arch:any package, we'll use the binary-arch target for the job, and have the binary target depend on it21:16
sistpotylet's add some debhelper stuff21:17
sistpotydh_testdir21:18
sistpotydh_testroot21:18
sistpotydh_installchangelogs21:18
sistpotydh_installdocs21:18
sistpotydh_install21:19
sistpotydh_strip21:19
sistpotydh_compress21:19
sistpotydh_fixperms21:19
sistpotyand now an interesting one: dh_makeshlibs21:20
sistpoty(we'll have a look at it in a few minutes)21:20
sistpotydh_shlibdeps21:20
sistpotydh_installdeb21:20
sistpotydh_gencontrol21:20
sistpotydh_md5sums21:20
sistpotydh_builddeb21:20
sistpotysince we'll need to build s.th. before we can install it, we'll add a dependency to build for binary-arch21:21
sistpoty(a nicer way is to use stamps, but that's a different topic)21:22
sistpotynow what does dh_makeshlibs do...21:22
sistpotyas you may have noticed, whenever you put ${shlibs:Depends} in the control file, it will get resolved to the library packages during build21:23
sistpotythis is done via the shlibs-mechanism21:23
sistpotyif you've been here in part 1, I guess you could build one yourself21:23
sistpotyif you look at /var/lib/dpkg/info, you'll find a number of shlibs-files21:24
sistpotylet's take a look at one21:25
sistpotythe format is: library-name soname-version dependencies21:26
sistpotylet's look at /usr/lib/dpkg/info/libgnome2-0.shlibs21:27
sistpotycompare this to the SONAME of /usr/lib/libgnome-2.so.021:28
sistpotythis explains the first two fields21:28
sistpotythe third one is the package where this shared object can be found in21:29
sistpotythe job of dh_makeshlibs is to generate such a file for us21:29
warp10cool...21:29
sistpotyand at this point, we can try to answer mok0's question of part 1, what to do if upstream released a new abi compatible version, but programs use this one21:31
sistpotysince the shlibs file can specify a version string (just look at the gnome shlibs file again)21:31
sistpotywe can request to have a minimum version of the library21:31
sistpotythis will get replaced for all packages that use ${shlibs:Depends} and build against our library21:32
sistpotyso we only need to tell dh_makeshlibs, that a new feature landed in the library, so that it will set version field in the shlibs file right21:33
sistpotyyou can do this with dh_makeshlibs -V<version>21:33
sistpotynow if anyone has installed an older version of the library, and wants to use the program that needs the new cool features21:33
sistpotyhe will have to upgrade the library via apt21:34
sistpotyany questions so far?21:34
albert23How can we know which library version was the first providing a specific ABI version?21:34
albert23Isn't there a risk we set version to high in dh_makeshlibs -V<version>?21:35
sistpotyalbert23: pretty much through the same means that we can find out if the ABI is broken21:35
albert23ok21:35
sistpotyalbert23: there is no real risk in Ubuntu to set the version to high21:36
sistpotyhowever setting the version not high enough can lead to problems21:36
albert23It would make backports more difficult?21:36
sistpotynot too sure... I don't think so21:37
sistpotya backport gets compiled to whatever is in gutsy or feisty21:37
sistpotyso it will get built against the feisty/gutsy version of the library, which has a different version requirement21:37
ScottKSo if you set it correctly and there isn't a sufficient ABI available, the backport build will, correctly, fail.21:37
sistpotywell... it doesn't really relate to building, but rather to installin21:38
sistpoty+g21:38
sistpotyin order to build against a library, the version (and ABI) is irrelevant.21:39
sistpotywhat matters to build against it is the API21:39
sistpotythe version rather enforces that users *need* to upgrade the library to a minimum ABI version21:39
ScottKI guess I meant API then.21:39
sistpotyso if the API changed, the field won't really be much of a problem, since this means a new ABI in almost all cases21:40
sistpotyand hence a new SONAME, and a different library package21:40
sistpotythis version is only relevant if the ABI/API stay the same, but new features got added21:41
ScottKAh.  RIght.21:41
sistpotyany further questions?21:41
warp10n21:42
albert23n21:42
sistpotyok, then let's try to fix the rules file and finish the package, shall we?21:42
sistpotysince we use dh_install, we still need to install the files into debian/tmp/21:43
sistpotylet's use PREFIX=$(pwd)/debian/tmp make install for this21:43
sistpotyif you want, you can put this right at the beginning of binary-arch21:44
sistpotyor you could add an install rule and have binary-arch depend on it... whatever you prefer21:44
sistpotynow we'll need to sort which files go into which package21:46
sistpotyso we want libmyhello1.install and libmyhello-dev.install21:47
sistpotythe header files will go into the -dev package21:47
sistpotybah... back a few lines... (recalled the Makefile wrongly)... PREFIX should of course be $(pwd)/debian/tmp/usr21:49
sistpotyI guess I should have added DESTDIR or s.th. to libmyhello's makefile21:49
sistpotyin case we'd have a statically linked library (libmyhello.a), that would go into the -dev package as well.21:50
sistpoty(only useful if you want to link s.th. statically against it)21:51
sistpotywhat else do we need in the -dev pacakge21:52
sistpotythe .so symlink should go in there as well21:52
sistpotybtw: the .so symlink is what the linker will look for if you give the -l parameter21:53
sistpotymore specifically, if you'd call -lmyhello, it would prepand a lib and add an .so and look for this file (libmyhello.so)21:53
sistpotyin case there are any other files for development purposes (pkconfig files for example), these should also go in the -dev package21:54
sistpotyluckily we don't have these21:54
sistpotyin the library package should be the shared object (of course) and the symlink that's named like the soname21:56
sistpotywhile the symlink itself would also be recreated by ldconfig21:56
sistpotyincluding it in the library package has the advantage that it will get deleted if the library is removed21:57
sistpotybecause it's a file of the package21:57
sistpotyeveryone got the .install files?21:58
albert23y21:58
warp10y21:58
sistpotyok, let's give it a shot, and see if it works21:59
sistpotyjust use21:59
sistpotyfakeroot make -f debian/rules binary21:59
sistpotyto fix the errors22:00
sistpoty(like my install files, that where wrong *g*)22:00
albert23mine too22:00
warp10argh... :-S22:00
sistpotydid you fix the PREFIX=... make install?22:01
albert23y22:01
warp10sistpoty: just a wrong install for me too :)22:01
sistpotywarp10: hehe22:01
albert23I think $(pwd) did not work22:04
albert23make tried to install in /debian22:04
sistpotyit should install into debian/tmp/usr/22:05
albert23I got this: PREFIX=/debian/tmp/usr make install22:05
sistpotyheh, I've got the same which doesn't work as well. but the answer is one line above22:06
sistpotyPREFIX=debian/tmp/usr make install22:06
sistpotythose nasty slashes *g*22:06
warp10grrrr22:06
albert23Yep, just removed the pwd part, that works22:06
sistpotyhm... I guess I'll need to read the make manual again, I was so sure that $(PWD) exists (or $(pwd))22:09
albert23$(CURDIR) ?22:09
slangasek$(PWD) exists only if it's set in the environment by the invoking shell22:09
slangasek$(shell pwd) execs out to call the pwd command, so is rather inefficient22:10
slangasek$(CURDIR) is the make builtin variable you should use22:10
sistpotythanks... I guess I confused this with $(pwd), which I often type in the shell *g*22:11
slangasek:)22:11
sistpotyso does everyone's build succeed now?22:11
albert23yep, package looks good22:12
warp10looks fine!22:12
sistpotydamn, only mine doesn't build yet *g*22:12
sistpotyok, so you've got a source package and a binary22:13
sistpotylet's run lintian at the binary packages. it will take a second look that we've got the files sorted out correctly22:13
albert23clean22:14
sistpotyexcellent!22:15
sistpotyany questions so far?22:15
albert23no, that's pretty clear22:16
warp10it's fine. Just wondering if it would be so easy in the real-world packaging :)22:17
albert23I guess that strongly depends on upstream22:18
sistpotyok, so now what would you do if the ABI of a library changed, but the SONAME didn't?22:18
* slangasek smiles22:18
albert23complain at upstream22:19
sistpotyalbert23: great, that should always be the first choice22:19
sistpotycan you imagine, while it's a bad idea, if you bump the SONAME on your own?22:19
sistpoty(as a packager)?22:20
albert23could be risky, as it might conflict with new upstream versions?22:20
sistpotythat's one argument22:21
sistpotybut you could append a debian or ubuntu somewhere and change the build scripts, so you could circumvent this22:22
sistpotyany other arguments against this?22:22
slangasekit leads to binary incompatibility with other distros22:22
slangasekbut that shouldn't outweigh the problems caused by binary incompatibility with previous releases22:22
sistpotyalso, it leads to binary incompatibility for binary only software22:23
sistpoty(just imaging to change the SONAME of libc, and look at what breaks in multiverse)22:23
slangasekwell, a workaround for such binary-only software would be to instruct users to create their own local symlinks for the wrong soname22:24
sistpotyheh22:25
sistpotyok, what other interesting points do we have...22:25
slangaseklike I said, the alternative is that you have to break all the /free/ software using the old version on upgrade :)22:25
sistpotyyeah, it's either bad or worse *g*22:25
sistpotyok, what should you do when you upgrade a library?22:26
slangasekby "upgrade", you mean "package a new version"?22:26
sistpotyyes22:26
sistpotywe already learned that we should look out for ABI compatibility, so let's look at the case where we *do* have a new SONAME22:27
sistpotyand hence a new library package22:27
sistpotyanyone any ideas?22:28
slangasekgrep -r $oldsover debian/ :)22:28
albert23I think we are going to have a problem with the -dev package22:28
sistpotyalbert23: what do you think could get problematic?22:29
albert23packages requiring the old ABI will get the new ABI when we would want to rebuild?22:29
sistpotyexactly (but it's API in this case... compiling *P*rograms->aPi, binaries->aBi)22:30
sistpotyso you should check which packages actually build-depend on the -dev package.22:31
sistpotyif there is a large number, you could do local test-builds and see which fail22:31
sistpotyin case you cannot live yet with the new version alone, you could for example make a different source package and hence have two version of the library in the archive22:32
sistpotyone thing you might stumble over when dealing with libraries is a lintian warning about rpath22:33
sistpotywhen you link against a library, that has an rpath set, it will tell the loader to look for the shared object only in that very directory22:34
sistpotyso you can specify -Wl,-rpath=/somewhere and link hello_prog against it22:34
sistpotythen the loader will look for libmyhello only in /somewhere when hello_prog is started22:35
sistpotycan anyone imagine, why using rpath for a library is a bad idea?22:35
albert23well, software would break if for some reason the library is moved to another directory....22:38
sistpotyexactly22:38
sistpotyand one use-case for moving a library is for example the ia32-libs package on amd6422:38
sistpotyok, any questions?22:39
slangasek(and multiarch! whoo!)22:39
slangasekalbert23, sistpoty: I would note that the general case is that we don't want to continue supporting an old API for a library, even if it means some work has to be done to get the applications ported22:40
slangasekso it's /usually/ better to have the new library version take over the source package name and the -dev package name, and only reintroduce an oldlibs package as a last resort22:40
sistpotythanks for clarifying22:41
albert23Well, one question: what would be the best place to look for bugs / qa issues to practice what we learned?22:41
sistpotyhm... that's a good question indeed22:42
sistpotywell, one thing is that you could review library packages on REVU22:42
sistpotyor get your hands dirty and package a library22:43
sistpotyok, I guess we're through with the session... slangasek: anything important I forgot or you'd like to add?22:44
slangaseksistpoty: I only had half an eye on the channel today; I guess you didn't talk about techniques maintainers can use to automatically detect ABI breakage when moving to a new upstream version?22:45
sistpotyslangasek: nope22:45
slangasekthe dpkg in hardy includes the new dpkg-gensymbols code developed by Raphaƫl Hertzog in Debian; it basically creates a manifest, declaring which symbols were added in which version of the package22:46
slangasekthe /side/ benefit of this is that if you already know which symbols are supposed to be present, you know if any have gone missing22:46
slangasekso http://qa.debian.org/cgi-bin/mole/seedsymbols is a site that includes automatically generated symbol manifests for all libs in the archive22:47
slangasek(the Debian archive, that is; most will be applicable to Ubuntu too, obviously)22:47
slangasekhttp://wiki.debian.org/UsingSymbolsFiles is a general description of this22:48
slangasekI still need to use this on my own packages, so I can only give you theoretical insight into this stuff, not much practical :)22:48
slangasekand everyone's eyes glaze over again ;)22:49
albert23Yeah, I guess I will first do some attempts to do the work manually.22:50
albert23I have bookmarked those links for later use...22:50
slangasekone example of this in practice is the zlib1g package22:51
slangasekwhich the maintainer, Mark Brown, blogged about as well (syndicated on planet.d.o)22:51
sistpotyheh, I skipped this post, and wanted to read it later (which I then forgot *g*)22:52
sistpotyok, anything else?22:52
sistpotythen thanks everyone for coming :)22:53
albert23No, not for me. I have learned a lot these two sessions!22:53
sistpotyand thanks very much slangasek for your expert help!22:53
albert23sistpoty and slangasek many thanks for these sessions!22:53
warp10Thank you sistpoty and slangasek, they have been two great sessions22:54
sistpotyand now I'm falling in my bed :)22:54
sistpotygood night everyone22:54
warp10I hope the wiki has room for logs, they would be really useful :)22:54
albert23good night22:55
sistpotysure, I'll find a place22:55
=== bigon is now known as bigon`
=== bigon` is now known as bigon

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