[14:22] <xperia> persia: are you online ?
[14:23] <persia> I am.  You wanted to talk about packaging?
[14:23] <xperia> yes exactly. do you have any time now or should we make it other day ?
[14:24] <persia> I have some time.
[14:24] <persia> For me, the hardest part of packaging is documenting the authorship and licensing.
[14:25] <persia> And I recommend doing that first.  It's less frustrating to get stuck there before you do anything else, then after you have a nearly working product.
[14:25] <xperia> ohh great. i am ready. i have built everything allready on my host so it need only packaging.
[14:25] <xperia> okay then say me what do i need to have and execute
[14:25] <persia> For copyright, you'll want to go through *every* file in the source, and document the author, the copyright holder, and the license.
[14:26] <persia> These days, I tend to use http://dep.debian.net/deps/dep5/ as  a format for that document
[14:28] <xperia> persia. ihave allready a LICENSE.GPL file inside the sources
[14:28] <xperia>  The Qtopia Environment is Copyright (C) 2000-2001 Trolltech AS and
[14:28] <xperia>   other authors as specified in the file headers.
[14:28] <xperia>  You may use, distribute and copy the Qtopia Environment under the terms
[14:28] <xperia>  of GNU General Public License version 2, which is displayed below.
[14:28] <xperia> .....
[14:29] <persia> Understood.  You need to redocument it, to demonstrate that you've done the review as part of the packaging.
[14:29] <persia> If everything is truly licensed properly, and all under the same license, this can be very quick and easy.
[14:30] <xperia> okay then i will now install dep5 and start it
[14:30] <persia> Most of the time I find a few files that aren't documented properly, and need to go chase the authors to make sure the right license headers may be added, etc.
[14:30] <persia> Nothing to install.  It's just a text file.
[14:33] <xperia> exist some full example that i can modify only or do i need to read the whole site
[14:34] <persia> There are some examples on that page.
[14:34] <persia> But only that page should be sufficient, including examples.
[14:35] <xperia> persia: ahh okay i see it now at the end
[14:43] <xperia> persia: i have it now. http://paste-bin.com/view/f851b18d
[14:47] <persia> xperia: That was fast :)
[14:48] <persia> xperia: I'd recommend just listing yourself for debian/* so that you don't need to add file headers to each file.
[14:48] <persia> Also, You list copyright 2000-2001 : did you maybe mean 2000-2010?
[14:48] <xperia> it has to go forward :-) used the first example
[14:49] <persia> OK.  So, how does this build?
[14:50] <xperia> well it build great.
[14:50] <xperia> ./configure
[14:50] <xperia> make
[14:50] <xperia> works great
[14:50] <xperia> without any problems
[14:50] <xperia> maybe  need to specifiy some prefix-install folder now
[14:51] <persia> Unpack your source.
[14:51] <persia> make a directory debian/ in the source
[14:51] <xperia> okay will do
[14:52] <xperia> okay done
[14:53] <persia> copy the file you created from the DEP5 guide to debian/copyright
[14:53] <persia> Copy /usr/share/doc/debhelper/examples/rules.tiny to debian/rules
[14:53] <persia> echo 7 > debian/compat
[14:54] <persia> dch --create to start a changelog: add the package name, ${version}-0ppa1 (we'll start with a ppa, and can go from there), target lucid, urgency low, changelog entry "Initial Packaging"
[14:55] <xperia> is debian/copyright the folder or the file i have now debian/copyright/copyright
[14:55] <persia> Next create debian/control in a text editor: http://www.debian.org/doc/debian-policy/ch-controlfields.html documents the fields and relevant policies.
[14:55] <persia> debian/copyright should be the text file.
[14:59] <xperia> persia: what if i have allready a existing big ChangeLog file ? Do i need still to create a new one ?
[15:00] <persia> Yes.
[15:00] <persia> Basically you want to separate the changelog for the packaging from the changelog for the software.
[15:00] <persia> debian/changelog should only contain changes to how it's packaged.
[15:00] <persia> ./ChangeLog contains the changes to trunk, etc.
[15:01] <persia> When there's a new release of the software, just add "New upstream version" in debian/changelog.
[15:02] <persia> But most debian/changelog entries will end up being stuff like "Rebuild against new libfoo", "Adjusted udev rules to match new semantics", "Update to standards-version x.y.z", etc.
[15:02] <persia> (this is a luxury you will have because of your close relationship with upstream.  If the people writing the software and the people packaging the software are very different, more complex things may apepar in debian/changelog)
[15:04] <xperia> okay. wotking on creating the change log. with dch --create
[15:04] <xperia> does this changelog file need to be moved later to the debian folder
[15:04] <xperia> becouse i am outside of the debian folder all the time
[15:06] <persia> dch --create will automatically create it in the debian folder
[15:09] <xperia> Is this here corect writen this way in my console ?
[15:09] <xperia> PACKAGE opie, (VERSION)1.2.5-0ppa1 UNRELEASED; urgency=low target lucid
[15:09] <xperia>   * Initial Packaging. (Closes: #XXXXXX)
[15:09] <xperia>  -- administrator <administrator@localhost>  Fri, 19 Mar 2010 16:05:48 +0100
[15:10] <persia> Not quite.
[15:10] <xperia> or do i need
[15:10] <xperia> opie 1.2.5-0ppa1 urgency=low target=lucid
[15:11] <persia> You want the parentheses.
[15:11] <persia> And you can't use the name opie : it's been taken since before your project started.
[15:11] <persia> So you need to have a different package name.
[15:11] <xperia> ohh man how should i named it then. it exist allready a package from 2004 but dont know how it is called
[15:11] <persia> maybe "opi-env" ?
[15:12] <xperia> good tip. i will use opie-desktop as gnome-desktop or ubuntu-desktop
[15:13] <persia> That works,.
[15:13] <xperia> just need to know if i need to remove the Words like PACKAGE and so on
[15:14] <xperia> is this here needed
[15:14] <xperia> opie-desktop 1.2.5-0ppa1 urgency=low target=lucid
[15:14] <persia> You want something like:
[15:14] <xperia> or this here
[15:14] <xperia> PACKAGE opie-desktop (VERSION)1.2.5-0ppa1 UNRELEASED; urgency=low target=lucid
[15:15] <persia> opie-desktop (1.2.5-0ppa1) lucid; urgency=low
[15:17] <xperia> awesome have done it :-) 
[15:17] <xperia> cat debian/changelog
[15:17] <xperia> opie-desktop 1.2.5-0ppa1 lucid; urgency=low
[15:17] <xperia>   * Initial Packaging. (Closes: #XXXXXX)
[15:17] <xperia>  -- administrator <administrator@localhost>  Fri, 19 Mar 2010 16:05:48 +0100
[15:17] <persia> Well, fix your name and email :)
[15:18] <persia> You need those to match an identity from `gpg --list-secret-keys`
[15:20] <xperia> okay great ! thanks for the Tip.
[15:20] <xperia> will change that direct now
[15:22] <xperia> have change it: http://paste-bin.com/view/305b942d
[15:22] <xperia> now on to creating this control file
[15:23] <persia> This is the most manual part after copyright, but if you just follow down the page in the debian policy manual, there's a good chance you'll end up with something mostly right.
[15:24] <xperia> hmmm this is a litlle more tricky now :-) cant find any examples at first sight
[15:25] <persia> Aside from Description, it's mostly just key-value entries, in RFC822 format.
[15:25] <persia> So:
[15:25] <persia> Source: opie-desktop
[15:25] <persia> Maintainer: ${name & email from changelog}
[15:25] <persia> Section: ${pick one}
[15:26] <xperia> ahh great thanks
[15:26] <persia> Priority: optional
[15:26] <persia> ...
[15:26] <persia> Put a blank line between the source paragraph and any additional paragraphs.
[15:26] <persia> And read the docs on Description closely: there's a very specific format
[15:31] <xperia> what should i write for 
[15:31] <xperia> Architecture
[15:31] <xperia> the package build great on a i386
[15:31] <xperia> it should work too on a arm or other arch
[15:31] <xperia> the main goal is having it for arm
[15:32] <xperia> but also for i386
[15:32] <persia> any works
[15:33] <persia> That will try to compile for each available architecture separatly.
[15:35] <xperia> okay
[15:38] <xperia> persia: have done it
[15:38] <xperia> http://paste-bin.com/view/bc526299
[15:40] <persia> Almost.
[15:40] <persia> You need to start with Source:
[15:40] <persia> Package: belongs inthe second paragraph.
[15:40] <persia> Both Source: and Package: should be opie-desktop
[15:40] <persia> That's the name being assigned, not that actual source.
[15:40] <persia> Version: doesn't belong there
[15:41] <persia> section, priority, maintainer, homepage belong in the Source: paragraph.
[15:41] <persia> Architecture & Description belong in the Package: paragraph.
[15:41] <persia> The order should ideally be that shown on the policy page.
[15:41] <xperia> hmmm i have study the section 5.3 :-) and it looks like i needed to look at section 5.2
[15:42] <persia> heh
[15:48] <xperia> persia: i think i have understand it now. http://paste-bin.com/view/f1d96cc0
[15:49] <persia> Section, Priority, and Homepage are preferred in the first paragraph instead of the second, if they can go there.
[15:49] <persia> So delete them from the second paragraph (no need for duplication)
[15:50] <xperia> oky have done it. the control file should be done now if i am not wrong
[15:50] <persia> Not quite.
[15:51] <persia> You'll want to add Build-Depends to the first paragraph, and Depends to the second.
[15:51] <persia> Depends: is probably just: 
[15:51] <persia> Depends: ${shlibs:Depends}, ${misc:Depends}
[15:51] <persia> Build-Depends needs to come from you, but should start with "debhelper (>= 7)"
[15:52] <xperia> ohhhhh that is now a step more heavy
[15:52] <xperia> can i write the line Depends: ${shlibs:Depends}, ${misc:Depends}
[15:53] <xperia> exact the same way in the control file or do i need to specify exactly what for packages are needed
[15:53] <persia> For Depends: you can start with the exact same way.
[15:54] <xperia> okay
[15:54] <persia> With Build-Depends, you'll need to add all the -dev libraries you need to build.
[15:57] <xperia> okay i think that should be very easy
[15:57] <xperia> all the dev-libs that i need are written here http://opie.handhelds.org/cgi-bin/moin.cgi/BuildOpie
[15:58] <persia> Right.
[15:59] <persia> Add all the required ones and all the optional ones.
[16:01] <xperia> Build-Depends: debhelper (>= 7), libfreetype6-dev, libjpeg62-dev, libpam0g-dev, libpng12-dev, zlib1g-dev, libasound2-dev, libsysfs-dev, libpcsclite-dev, pkg-config, libbluetooth-dev, libobexftp0-dev, libopenobex1-dev, libpcap-dev, libsqlite3-dev, libxine-dev
[16:01] <xperia> is that good from thy syntax point of view ?
[16:03] <persia> Yep.
[16:03] <persia> So let's see the entire control file, all assembled.
[16:04] <xperia> okay http://paste-bin.com/view/1d24b0be
[16:05] <persia> Ideally the order of the various entries should match the order in which they are presented in policy
[16:05] <persia> Other than that, looks pretty good.
[16:05] <persia> Oh, and Description needs changing.
[16:05] <persia> Go read policy about Description again.
[16:06] <xperia> okay changed the order and look now at Description
[16:09] <xperia> so what does i need to change in the description field.
[16:09] <xperia> do i need to encapsle the lines with < >
[16:09] <xperia> or o i need to make more than one space between the first and the second  Text Phrase ?
[16:12] <persia> xperia: After Description: you want a single line synopsis.  This should complete the cloze "${PACKAGE} is (a/the) ${SHORT_DESCRIPTION}".
[16:12] <persia> Below that line you should have at least three lines going into detail about the package, each proceeded by a single space.
[16:13] <persia> see policy 5.6.13 and 3.4
[16:16] <xperia> ohh this rules drives me crazy. how about his now ?
[16:16] <xperia> http://paste-bin.com/view/44d042f9
[16:17] <persia> Try to keep each line of the description under 70 characters :)
[16:17] <persia> But that's the last edit for now.
[16:17] <persia> So, now you're ready to build a source package.
[16:18] <xperia> ohhhh cant beleve it. need to shorten this lines
[16:18] <persia> Do you have a release tarball of opie that you unpacked when you started?
[16:18] <persia> Just description.  Leave build-depends alone for now
[16:18] <xperia> wait wait need to shorten the description lines
[16:19] <xperia> okay done.
[16:19] <xperia> no i have builded from trunk. it is very stable
[16:20] <xperia> the rlease version is a litlle old and dont has the newest changes
[16:21] <xperia> i have followed step by step this howto. it is very easy and and works great.
[16:21] <xperia> http://opie.handhelds.org/cgi-bin/moin.cgi/BuildOpie
[16:22] <persia> Well, that's a little frustrating, because it makes it a bit messy, but we can try to work around that.
[16:22] <persia> Grab the release tarball anyway.
[16:26] <xperia> are you sure ? the release is heavy outdated 
[16:26] <xperia> http://opie.handhelds.org/cgi-bin/moin.cgi/Source
[16:26] <xperia> i have worked only as described on the page with this
[16:26] <xperia> git clone git://gitorious.org/opie/opie.git
[16:26] <xperia> if i am not wrong it should exist a snapshot of this git tree as tarball
[16:27] <persia> Well, we need a tarball.
[16:27] <persia> So we can make a tarball of the snapshot *or* we can use the old tarball.
[16:27] <persia> We'll use the snapshot source in either case.
[16:27] <xperia> let me find it http://gitorious.org/opie/opie
[16:28] <xperia> http://gitorious.org/opie/opie/archive-tarball/master
[16:28] <xperia> this should it be
[16:28] <xperia> http://gitorious.org/opie/opie/trees/master
[16:29] <xperia> okay i have the .tar.gz
[16:29] <xperia> should i extaract it or just save it
[16:30] <persia> Just save it.
[16:30] <persia> What version is the tar.gz ?
[16:31] <xperia> the newest 1.2.5 (trunk)
[16:32] <xperia> it is named opie-opie-master.tar.gz
[16:32] <persia> OK.
[16:32] <persia> Rename that to opie-desktop_1.2.5.orig.tar.gz
[16:33] <xperia> does it need to be copyed to debian/
[16:34] <persia> Nope.  It needs to be in the directory above the source.
[16:36] <xperia> okay have done the renaming
[16:38] <persia> OK.  Now, add a changelog entry
[16:38] <persia> (just run dch)
[16:38] <persia> Report that you updated to a git snapshot with today's date and the SHA hash
[16:41] <xperia> well have done dch but for some reasn i am getting this
[16:41] <xperia> http://paste-bin.com/view/f1724819
[16:42] <persia> Somehow debian/changelog got messed up.
[16:42] <persia> Delete it, and recreate it.
[16:42] <persia> Oh, I see.
[16:42] <persia> You missed the () around the version.
[16:45] <xperia> persia: you are right. the problem was the missings ()
[16:45] <xperia> okay it works now reporting the change in the changelog
[16:46] <persia> Excellent.  paste your new modified changelog?
[16:48] <xperia> need only to add the SHA hash number. is that the SHA Hash number from the gitorious page or should i create a new one ?
[16:49] <persia> You want the hash from the git tree so others can replicate your work.
[16:49] <persia> I believe that date + SHA hash identifies a unique state of source.
[16:56] <xperia> okay have done it
[16:57] <persia> OK.  So paste the debian/changelog
[16:57] <xperia> http://paste-bin.com/view/c40a7231
[16:58] <persia> I usually delete the [NAME] stuff when it's just me, but doesn't matter for now.
[16:58] <xperia> okay
[16:58] <persia> Next, run `debuild -S -i -I `
[16:58] <persia> This *should* build you a source package.
[16:58] <persia> If it doesn't, we'll hunt down the errors.
[16:58] <xperia> okay now it is getting interessting :-)
[16:59] <xperia> debuild: fatal error at line 685:
[16:59] <xperia> found debian/changelog in directory
[16:59] <xperia>   /media/usbdisk/LinuXperiaOS/opiehome/opie
[16:59] <xperia> but there's no debian/rules there!  Are you in the source code tree?
[16:59] <persia> Did you copy /usr/share/doc/debhelper/examples/rules.tiny to debian/rules ?
[17:00] <xperia> ohh i have rules.tiny
[17:00] <xperia> okay it works :-)
[17:01] <persia> So you have a diff.gz and .dsc?
[17:02] <xperia> dpkg-source: info: building opie-desktop using existing opie-desktop_1.2.5.orig.tar.gz
[17:02] <xperia> it is working at this line here at the moment
[17:02] <persia> That'll take a while.  It's preparing a diff between the git snapshot and the tarball
[17:03] <xperia> ahhh okay. in my case this will sure go abaout 30 min as i have a slow build host
[17:04] <xperia> persia: in this case i recomend to meet us in 30 min again here. till then we make a litlle break
[17:05] <persia> heh
[17:05] <xperia> :-)
[17:05] <xperia> this will sure need some 30 min :-)
[17:05] <xperia> ahh no it proceed :-)
[17:06] <xperia> ohhh that dont look gooog :-)
[17:06] <xperia> good
[17:07] <persia> What happened?
[17:07] <xperia> have a lot of this lines here 
[17:07] <xperia> dpkg-source: error: cannot represent change to opie/core/launcher/.obj/x86-linux/moc_qprocess.o: binary file contents changed
[17:07] <xperia> dpkg-source: error: cannot represent change to opie/core/launcher/.obj/x86-linux/moc_mediumwidget.o: binary file contents changed
[17:07] <xperia> dpkg-source: error: cannot represent change to opie/core/launcher/.obj/x86-linux/moc_mediadlg.o: binary file contents changed
[17:07] <xperia> dpkg-source: error: cannot represent change to opie/core/multimedia/opieplayer/modplug/.obj/x86-linux/tables.o: binary file contents changed
[17:07] <xperia> dpkg-source: error: cannot represent change to opie/core/multimedia/opieplayer/modplug/.obj/x86-linux/memfile.o: binary file contents changed
[17:08] <xperia> it works still
[17:08] <persia> No, it doesn't.
[17:08] <persia> Did you run any build commands in that source before we started?
[17:08] <xperia> really ? what si wrong
[17:08] <xperia> well yes :-) wanted to know if it builds
[17:09] <persia> OK.
[17:09] <persia> Well, that's the issue.
[17:09] <persia> SO
[17:09] <xperia> did not wanted to have some strange surprises
[17:09] <persia> Make a new directory.
[17:09] <xperia> okay
[17:09] <persia> get your snapshot
[17:09] <persia> copy the entire contents of the debian/ directory we constructed in there.
[17:09] <persia> Put the orig.tar.gz one level down.
[17:10] <persia> run `dbuild -S -i -I` again.
[17:10] <persia> (in the new directory)
[17:10] <persia> You need the tree *before* it's built.
[17:13] <xperia> so okay i have created now in /media/usbdisk/opiehome the dir "debian-packager"
[17:13] <xperia> will now clone the git sources there with git clone git://gitorious.org/opie/opie.git
[17:14] <xperia> copy the debian folder from previous
[17:14] <xperia> and look that the snapshot file opie-desktop_1.2.5.orig.tar.gz
[17:14] <xperia> is located in /media/usbdisk/opiehome
[17:17] <persia> Right.
[17:17] <persia> And then build the source package.
[17:25] <xperia> persia: the thing is that the extracted sources need some symlinking to other files and packages
[17:25] <xperia> http://opie.handhelds.org/cgi-bin/moin.cgi/BuildOpie#head-263fce4b2279b68f6de230fff90c8d725add4c0f
[17:25] <xperia> how can this be solved so it can be done automagicly
[17:26] <persia> Do you need these to build, or to run?
[17:27] <xperia> uic compiler is needed to compile opie
[17:28] <xperia> and qfvb is needed for runnning
[17:28] <persia> Then you first need to package the uic compiler.
[17:28] <persia> And qfvb
[17:28] <persia> (unless they are already packaged)
[17:28] <xperia> ahhh dont we have them allready in the package repo. let me see if they exist
[17:31] <xperia> persia: uic-qt2 dont looks like it is in the repo but it can be find precompiled here
[17:31] <xperia> http://linuxtogo.org/~mickeyl/tools/
[17:32] <persia> You need to have it compiled in the repo, not use precompiled sources.
[17:32] <persia> The same recipe we used for opie-desktop can be used for that.
[17:33] <xperia> ohhh okay
[17:33] <persia> Note that this recipe produces buggy packages (but a buggy package can be debugged, and a non-existent package can't be)
[17:34] <xperia> okay i understand. in this case i will start now to create two dirs for creating the needed packages.
[17:34] <xperia> need some 20 to 40 minutes
[17:35] <persia> No worries.  I think you'll end up needing a bunch of time over 2-3 weeks, as a rough estimate.
[17:36] <xperia> ohhhh nooooo
[17:36] <persia> ?
[17:36] <xperia> such long :-)
[17:38] <persia> Well, making a package takes 20 minutes.
[17:38] <persia> Then it's buggy.
[17:38] <persia> So you have to fix the bugs.
[17:39] <persia> You're proposing to package a compiler, which tends to have odd, hard to track down issues, a virtual framebuffer, which ends up being all sorts of odd to configure and use, *and* a comprehensive integrated suite of applications.
[17:39] <persia> So I'm expecting you'll run into a lot of issues along the way.
[17:49] <xperia> mmmmhhhh okay in this case i will look to try first to package the uic compiler and the virtual frambuffer.
[17:49] <xperia>  have thinked it should be more easy to package opie as it nearly compile for every architecture from the sources in open embedded
[17:50] <xperia> maybe have to look also how the whole thing with compiling works in open embedded. i know 100% that it fetch allways the newest sources from the git repo and compile it for the different archs. for the arm arch however if i am not wrong they use qemu
[17:52] <persia> qemu can also be used in Ubuntu.
[17:53] <persia> I think the difference is that Ubuntu requires everything to be packaged first, whereas OE provides a framework that supports a mix of packaged and unpackaged software.
[17:54] <xperia> the most easy thing in this case would be to look in open embedded how they compile uic and qtvfb. hmm let me just see it as i have it her on my usbdisk
[18:02] <xperia> hmmm open embedded has packages that are fully missed in ubuntu-mobile
[18:02] <xperia> xqt
[18:02] <xperia> xqt2
[18:02] <xperia> http://xqt.sourceforge.jp/
[18:03] <xperia> ohh man that looks like a lot of work :-(
[18:10] <xperia> persia: i will rethink the whole think with packaging opie for debian. it is way to high for me ! will probably stick with open embedded for the moment
[18:10] <persia> xperia: OK.  I understand.
[18:11] <xperia> thanks a lot for your very helpfull time. have learned somevery good stuff about what is needed for packaging.
[18:12] <persia> No problem.  At least I know it's a mountain of work next time someone asks me about packaging OPIE.
[18:13] <xperia> okay see you next time persia and a lot of success with ubuntu-mobile !
[18:13] <xperia> bye.