Dev Week -- Packaging software for Mono, for great justice -- directhex and meebey -- Thu, Jan 22

UTC -4 (EST)

(03:00:08 PM) directhex: Ladies, gentlemen, and everyone in between, welcome to our little session on Mono.
(03:00:12 PM) meebey: you are 3 seconds late! :-P
(03:00:24 PM) directhex: During the next hour, you will be regailed with tales of delight and intrigue, by myself and meebey, who is a long-time Debian Developer and the current Debian Mono Pope.
(03:00:36 PM) directhex: We've got buckets of valuable knowledge to splash about, and only an hour, so we're going to try and structure things a little.
(03:01:16 PM) directhex: So we're going to dedicate 5-10 minutes to a brief introduction to Mono in Debian, followed by about 20-30 minutes on a few other topics with an example package or two, then spend our remaining time on Q&A
(03:01:44 PM) directhex: i'll try and keep an eye on questions as we progress though
(03:02:12 PM) directhex: so, i'm delighted to introduce international sexpot extraordinaire, meebey!
(03:02:42 PM) meebey: oh, that's me I guess....
(03:02:58 PM) directhex: i can check /whois if you like
(03:03:17 PM) meebey: nah, not needed, my IRC client highlighted me
(03:03:50 PM) meebey: I would like to talk about the nice team setup we have in debian and ubuntu for packaging mono, mono based application and mono based libraries
(03:04:51 PM) meebey: we have the mono team, that maintains mono itself and other core components of it, like libgdiplus, xsp, mono-basic, mono-debugger and so on
(03:05:26 PM) meebey: that team has currently 6 members, and is a mix of debian developers and ubuntu developers
(03:06:03 PM) meebey: debian and ubuntu work directly on the source packages hosted on SVN using the alioth project
(03:06:56 PM) meebey: we do the same with Mono based applications like f-spot, beagle, tomboy, which are in the pkg-cli-apps team
(03:07:27 PM) meebey: the pkg-cli-apps team focus on sexy applications using Mono, which has currently 16 members
(03:08:10 PM) meebey: and the last team is pkg-cli-libs, which focuses on packaging libraries for Mono with 12 members
(03:08:35 PM) meebey: to get an idea of which package set those 3 team are working on, check this URLs:
(03:08:48 PM) meebey:
(03:08:52 PM) meebey:
(03:08:55 PM) meebey:
(03:09:40 PM) meebey: yes, thats alot of packages we share there, between debian and ubuntu, doing a great joined team effort
(03:10:19 PM) meebey: the 3 teams mainly operate using the #debian-mono channel found on OFTC and pkg-mono-devel mailing list (hosted at alioth)
(03:11:32 PM) directhex: and we're such sexy people that even gentoo packagers and upstream devs are starting to pop up in there
(03:12:31 PM) meebey: 4 of the team members are currently on this channel btw :)
(03:12:46 PM) ***meebey says hello to Laney, RAOF and RainCT
(03:13:07 PM) ***RainCT hides *g*
(03:13:32 PM) meebey: ok I think I will continue now with packaging...
(03:13:51 PM) RainCT: go, meebey, go :)
(03:14:15 PM) meebey: one of the first issues we had (the pioneers of mono in the debian land :-P) was that there are no rules specific to Mono packaging
(03:14:31 PM) meebey: as Mono is a new runtime, we hit new issues
(03:14:46 PM) meebey: compared to the known C, known Java, known Python land
(03:15:10 PM) meebey: for that reason, we developed a CLI Policy, that addresses those issues
(03:15:29 PM) meebey: the current CLI Policy can be found at:
(03:15:57 PM) directhex: CLI in this case doesn't stand for command line interface, it stands for Common Language Infrastructure, which is the trademark-free name for the main part of the ECMS 335 spec that Mono implements
(03:16:08 PM) directhex: ECMA
(03:16:29 PM) meebey: correct, that term is explained in the policy btw too:
(03:17:07 PM) meebey: so when you package Mono based applications, you should have the CLI policy handy...
(03:18:23 PM) meebey: ok now the good news: you don't have to know all details of the CLI policy in order to create proper package!
(03:18:57 PM) meebey: we created debhelper tools that make CLI libs/apps packaging much simpler! :)
(03:19:23 PM) meebey: this leads us to the cli-common-dev package
(03:19:57 PM) meebey: that package contains nice debhelper tools made just for making your lifer easier with CLI packaging
(03:24:53 PM) meebey: re
(03:24:56 PM) directhex: debhelper tools being those handy things which fill in your dependencies etc for you, and do all that tedious stuff nobody wants to do manually in a package
(03:25:03 PM) meebey: sorry for the delay, my computer crashed :(
(03:25:11 PM) DBO: no problem =)
(03:25:12 PM) directhex: pfft, debian
(03:25:15 PM) directhex: ;)
(03:25:19 PM) ***meebey learned, don't install new memory before doing a classroom session
(03:25:27 PM) meebey: *cough*
(03:26:00 PM) directhex: anyway... debhelper tools...
(03:26:08 PM) meebey: the most important tool for you is the dh_clideps tool from the cli-common-dev package
(03:26:30 PM) meebey: it generate for you the complete Depends line
(03:26:43 PM) meebey: just like dh_shlibdeps does for C libs
(03:27:11 PM) meebey: now I will head over how to use that tool in a package
(03:27:43 PM) meebey: as example I will use a dh7 style package: smuxi
(03:28:04 PM) meebey:
(03:28:18 PM) directhex: (smuxi is a sexy irc client you should all switch to)
(03:28:36 PM) meebey: thats the control file of smuxi, which uses the cli:Depends variable generated by dh_clideps
(03:28:43 PM) meebey: see the Depends line:
(03:28:55 PM) meebey: Depends: ${shlibs:Depends}, ${misc:Depends}, ${cli:Depends}
(03:29:21 PM) meebey: thats a short nice list of deps isn't it? it's that simple :)
(03:29:35 PM) directhex: in control it is
(03:29:50 PM) meebey: the dh_clideps tool needs to be invoked in the debian/rules file of course
(03:29:56 PM) meebey: nothing happens automagically
(03:30:12 PM) meebey: so take a look at the rules file:
(03:30:30 PM) meebey:
(03:30:51 PM) meebey: that rules file might look confusing to some of you, it's using debhelper 7 minimalistic rules style
(03:31:15 PM) directhex: dh7's like cdbs, but awesome
(03:31:25 PM) meebey: now you might think: "well and where is now the dh_clideps call?!?"
(03:31:44 PM) meebey: ok I lied, it's a bit of automagic flying around
(03:32:13 PM) meebey: dh7 allows to extend the automatically called debhelper commands
(03:32:39 PM) meebey: and cli-common-dev does that for you when you include the /usr/share/cli-common/cli.make file
(03:33:22 PM) meebey: if you dont like dh7, don't worry, the dh_* tools can be used with cdbs and tradtional debhelper style too!
(03:34:21 PM) meebey: here a cdbs example (different package though):
(03:34:35 PM) meebey:
(03:34:39 PM) directhex: you SHOULD like dh7 though, 'cos it's awesome
(03:34:48 PM) meebey: and here a old dh style rules file:
(03:34:54 PM) meebey:
(03:35:07 PM) meebey: nobody likes old dh, compare gfax rules and smuxi rules :)
(03:35:10 PM) meebey: they both do the same thing ;)
(03:35:33 PM) meebey: ups sorry, I pasted the directories rather than the files
(03:36:06 PM) meebey: cdbs cli-common-dev usage:
(03:36:31 PM) directhex: f-spot being a super-complicated package installed in ubuntu by default
(03:36:37 PM) meebey: old dh cli-common-dev usage:
(03:36:41 PM) directhex: with a rules file a few lines long :)
(03:37:30 PM) meebey: you will probably notice that both the cdbs and old dh example do something funny with MONO_SHARED_DIR
(03:38:01 PM) meebey: thats nicely explained in the CLI policy at:
(03:38:32 PM) meebey: with the dh7 integration though you don't need to handle that, because it makes sure that MONO_SHARED_DIR is not needed!
(03:38:44 PM) meebey: another reason to use the sexy dh7
(03:38:47 PM) meebey: :-P
(03:39:43 PM) directhex: free gifts for every dh7 user never happened, so you need to settle for it making life easier instead
(03:40:26 PM) meebey: now I will pass control back to directhex, so he can put some words on the on going transition in debian/ubuntu with Mono 2.0
(03:40:49 PM) directhex: okay then kiddies, the infamous Mono 2.0 transition.
(03:41:22 PM) directhex: the first thing to be aware of is that Mono is awesome. Accusations of bloat, fr'example, are lies and hax. Mono is thin and slender
(03:41:59 PM) directhex: but not slender enough. We identified a number of issues which prevented us from making a ridiculously thin Mono which could still run big powerful apps like f-spot
(03:42:42 PM) directhex: the main issue being that there are two published versions of CLI (1.0 and 2.0), and therefore two versions of most of the libraries in Mono - but an app which used version 2.0 would still end up pulling in pieces of 1.0
(03:42:52 PM) directhex: bad. fat. icky poo poo bloaty.
(03:43:37 PM) directhex: so we took the launch of Mono 2.0 by the Mono community as a chance to go to town on Mono dependencies, and by allowing us to create the world's first "pure" CLI 2.0-only Mono release
(03:44:12 PM) directhex: this means rebuilding all apps and all libs using only CLI 2.0, which exposes a whole world of little issues and bugs, and therefore triggered a big ol' packaging transition
(03:44:46 PM) meebey: side note: CLI 1.0 and 2.0 are 2 different runtime profiles, generics is implemented at runtime level in CLI, and thus the CLI runtime had to be extended giving us the 2.0 version
(03:45:16 PM) directhex: you can check on the current progress of the transition at - you'll see almost every app in Ubuntu (and most but not all in Debian) are now 2.0-only. The libs haven't been attacked yet, as we need to do apps first to prevent breakage
(03:45:27 PM) meebey: the CLI 1.0 runtime is only used by applications compiled with mcs (the 1.0 compiler) while gmcs targets the 2.0 runtime version
(03:46:21 PM) meebey: so there is no reason to ship both runtime versions flying around, when 2.0 can do everything for you :)
(03:46:21 PM) directhex: the transitions been powered by people from both Debian and Ubuntu, and i want to give a special note of thanks to Laney and james_w for their ubuntu-sourced help with a number of packages, as well as those packages whose maintainers are based in ubuntuland (like RAOF or RainCT )
(03:47:16 PM) directhex: the theory (yay, theories) is that this transition should save 20-40% of the disk space required to install f-spot, which directly means savings on ubuntu desktop install disks
(03:47:43 PM) meebey: and might lead to a tomboy installed by default for debian ;)
(03:47:59 PM) directhex: so if you want to help us out, be sure to come & visit us in #debian-mono on oftc (
(03:48:45 PM) directhex: now, we've gone on far longer than i was expecting, so i'm gonna invite you to start asking questions in #ubuntu-classroom-chat, and ramble on a little more whilst waiting for questions
(03:49:53 PM) directhex: there's a second little transition which has sorta jumped us when we weren't expecting it, for gnome sharp (gnome bindings for mono). it's an irritation which i'd welcome willing packagers to lend a hand with, as it means (sigh) revisiting some packages we thought were done & dusted, and altering their build-deps
(03:50:24 PM) meebey: questions regarding the Mono runtime, Mono applications or library or even deeper topic like C# are welcome too btw
(03:50:55 PM) directhex: or other tangentially monoish questions
(03:51:12 PM) directhex: like "how do you manage to be so awesome?"
(03:51:25 PM) meebey: KDE4 ships with Mono bindings now btw, so you can write KDE applications with C#
(03:51:35 PM) meebey: at least KDE4 in debian, not sure about ubuntu
(03:51:42 PM) directhex: yes, in jaunty definitely
(03:52:13 PM) directhex: we'd encourage you to do so! it looks like an interesting platform, and you can do lots of interesting things rather easier than in languages like c
(03:52:21 PM) RAOF: It might be good to mention the mono dllmap situation, which I find is a common packaging trap for the unfamiliar.
(03:52:38 PM) meebey: good point
(03:52:54 PM) meebey: dh_clideps might spit warnings about unresolved modulerefs
(03:53:14 PM) meebey: a moduleref is a refence to a C library, that is used by a C# application
(03:53:29 PM) meebey: like GTK# calls GTK+ libraries
(03:53:52 PM) meebey: the C# application has to specifiy a library name, and thats where those dllmaps come in
(03:54:11 PM) meebey: the C# application usually only specifies ""
(03:54:46 PM) meebey: but the runtime package of libfoo0 only contains, the name is a symlink sitting in libfoo-dev
(03:54:57 PM) meebey: and nobody wants to install development package to run applications :)
(03:55:14 PM) meebey: so Mono provides dllmaps, which redirect the usage to
(03:55:35 PM) meebey: a dllmap is a simple XML file next to the .exe file or the .dll file (which ever invokes the C lib)
(03:55:59 PM) meebey: it looks like this:
(03:56:45 PM) meebey: so shipping that file using the source package fixes those issues, it's also explained in the CLI policy at:
(03:57:38 PM) meebey: this might look complicated, but you don't have to pay attention to this issues if dh_clideps is not showing any warnings :)
(03:57:58 PM) directhex: it might point to foo.dll if the app is designed to run on windows as well as linux, and the dllmap does the same job to rediect to
(03:58:52 PM) RAOF: It's also worth noting that the .config files are generally _not_ automatically generated.  No-change rebuilds to pick up a new library SONAME won't work in general.
(03:59:20 PM) directhex: unless you include some rules magic to generate them
(03:59:29 PM) meebey: RAOF: thats on purpose though, as the changed ABI might break the application
(03:59:50 PM) directhex: <dinxter> maybe something about moonlight progress, thats mono 2.0 is it?
(03:59:54 PM) directhex: moonlight!
(04:00:04 PM) RAOF: meebey: Right.  But it's something that people unfamiliar with CLI packaging might not expect.
(04:00:08 PM) meebey: directhex: your part :)
(04:00:21 PM) directhex: moonlight is in debian's NEW queue, which is a bit like being stuck in Revu but with even longer delays
(04:00:25 PM) meebey: RAOF: correct, dh_clideps will tell them though that there is something to handle
(04:00:41 PM) directhex: I'm expecting it to leave NEW in about a week or so, at which point I can sync it to jaunty
(04:00:58 PM) directhex: i already have packages for intrepid & jaunty in my PPA, and meebey has some for debian experimental in his personal repository
(04:01:21 PM) meebey: moonlight allows to run/see silverlight webpages on linux
(04:01:21 PM) directhex: but this is moonlight 1.0, which only supports silverlight 1.0! no netflix for you yet
(04:01:39 PM) directhex: hm, we're overrunning. so much mono joy to spread
(04:01:45 PM) meebey: oh noez
(04:01:46 PM) directhex: still last session of the day, nobody'll notice
(04:01:55 PM) meebey: ;)
(04:02:08 PM) directhex: as long as nobody mentions it out loud
(04:02:16 PM) meebey: so what did we learn from this session? install the sexy IRC client called smuxo! :-P
(04:02:24 PM) directhex: smuxi!
(04:02:27 PM) ***dinxter has sealed lips
(04:02:30 PM) meebey: ups
(04:02:32 PM) meebey: smuxi!
(04:02:32 PM) directhex: nice typu, meebey!
(04:02:36 PM) ***meebey hides
(04:02:45 PM) meebey: too much mono for today I guess
(04:03:08 PM) directhex: anyone who wants to learn more exciting stuff, or remembers a question they forgot, please join us in #debian-mono on oftc
(04:03:20 PM) directhex: oh, or wants to help us. we want lots of people like that
(04:03:53 PM) meebey: yeah with ~90 source packages on our back we welcome any help we get
(04:04:35 PM) directhex: yeah, anyone wanna be the new ikvm maintainer?
(04:04:46 PM) hyperair: how many maintain mono packages?
(04:04:48 PM) meebey: don't be that nasty
(04:04:49 PM) hyperair: and what's ikvm?
(04:05:08 PM) meebey: hyperair: I said that in the beginning
(04:05:11 PM) meebey: of the talk
(04:05:15 PM) directhex: he missed it. hang on...
(04:05:33 PM) directhex: <meebey> we have the mono team, that maintains mono itself and other core components of it, like libgdiplus, xsp, mono-basic, mono-debugger and so on
(04:05:34 PM) directhex: <meebey> that team has currently 6 members, and is a mix of debian developers and ubuntu developers
(04:05:39 PM) directhex: <meebey> the pkg-cli-apps team focus on sexy applications using Mono, which has currently 16 members
(04:05:41 PM) directhex: <meebey> and the last team is pkg-cli-libs, which focuses on packaging libraries for Mono with 12 members
(04:05:59 PM) hyperair: i see
(04:06:02 PM) directhex: and ikvm's the most lightweight way to install openjdk you can get! :p
(04:06:16 PM) meebey: some source packages are very heavy though and needs lots of attention
(04:06:22 PM) hyperair: wait a sec. ikvm is mono right? jdk is java right?
(04:06:27 PM) directhex: it's a java compiler and classlib for mono, so you can compile java or run .class files on mono, or use .class files indie your mono apps
(04:06:38 PM) meebey: hyperair: ikvm is a java implementation running on mono :)
(04:06:45 PM) hyperair: that's interesting
(04:06:45 PM) meebey: hyperair: a java vm
(04:06:58 PM) meebey: we have more than C# in debian and ubuntu!
(04:07:12 PM) hyperair: but of course
(04:07:44 PM) directhex: yeah, for those who don't know, CLI is designed (as the name implies) for multi-language interop
(04:07:44 PM) hyperair: well. i should check out smuxi
(04:08:04 PM) meebey: there is: python running on mono (ironpython), java running on mono (ikvm), boo which is a python like language
(04:08:09 PM) directhex: in debian/ubuntu we have c#, java, python, nemerle, boo,, and possibly others i forgotted
(04:08:24 PM) meebey: yeah I missed some languages, too much of them!
(04:08:24 PM) directhex: though nobody with sense wants to compile o_o
(04:08:25 PM) meebey: :-P
(04:08:49 PM) hyperair: i'm sure those with lecturers with no sense would ;)
(04:09:45 PM) RAOF: directhex: F#?
(04:09:49 PM) directhex: RAOF, non-free
(04:09:57 PM) RAOF: Awww.
(04:10:03 PM) meebey: IronRuby is non-free too right?
(04:10:08 PM) directhex: when f# is relicensed under a Free license like Ms-PL, we use it
(04:10:25 PM) meebey: yeah we are waiting for those to become free too and we will package them
(04:10:25 PM) directhex: meebey, no, ironruby is ticking all the free boxes, but i don't wanna do the git snapshot dance... give me a tarball
(04:10:39 PM) meebey: directhex: so we miss a release there, ic
(04:11:55 PM) directhex: okay. ANY MORE QUESTIONS? :o
(04:12:21 PM) directhex: no?
(04:12:33 PM) directhex:      _ _                   _ _             _
(04:12:33 PM) directhex:   __| (_)_ __   __ _    __| (_)_ __   __ _| |
(04:12:33 PM) directhex:  / _` | | '_ \ / _` |  / _` | | '_ \ / _` | |
(04:12:33 PM) directhex: | (_| | | | | | (_| | | (_| | | | | | (_| |_|
(04:12:36 PM) directhex:  \__,_|_|_| |_|\__, |  \__,_|_|_| |_|\__, (_)
(04:12:36 PM) directhex:                |___/                 |___/
(04:12:52 PM) directhex: session over. remember you can find us in #debian-mono on oftc!

MeetingLogs/devweek0901/MonoPackaging (last edited 2009-01-22 21:17:29 by ausimage)