help with package creation
Max Bowsher
maxb at f2s.com
Fri May 29 09:07:56 UTC 2009
travis+ml-ubuntu-dev at subspacefield.org wrote:
> Hi,
>
> I've found very spotty documentation on packages, mostly here:
>
> https://wiki.ubuntu.com/PackagingGuide/HandsOn
What about https://wiki.ubuntu.com/PackagingGuide/Complete ?
There's a huge amount of information there. If you still feel that to be
"spotty", it would be helpful if you noted specific things you found it
lacking in.
> The problem with these tutorals - and there are several - is that they
> don't take into account the differences in what you're trying to
> package.
Naturally you have to take the concepts expressed in the guides and
apply them to the specific package you are working on. I don't
understand what you're implying they should be like instead.
> I'm trying to create a "polipo-tor" package which depends on both polipo
> and tor being installed already. All it does is install some config files
> and set up /var/run/polipo-tor and /var/log/polipo-tor.
>
> I'm trying to package it as an architecture-independent package.
>
> Here is the contents via lesspipe:
>
> new debian package, version 2.0.
> size 9714 bytes: control archive= 1552 bytes.
> 96 bytes, 4 lines conffiles
> 626 bytes, 16 lines control
> 285 bytes, 4 lines md5sums
> 1371 bytes, 53 lines * postinst #!/bin/sh
> 1153 bytes, 45 lines * postrm #!/bin/sh
> 278 bytes, 11 lines * prerm #!/bin/sh
> Package: polipo-tor
> Version: 1.0-0ubuntu1
> Architecture: all
> Maintainer: Ubuntu MOTU Developers <ubuntu-motu at lists.ubuntu.com>
> Installed-Size: 52
> Depends: polipo, tor, tsocks
> Section: web
> Priority: optional
> Description: Polipo web proxy configured to route through tor
> This is the polipo-tor package.
> It installs a new polipo service that listens on port 8124
> and forwards all requests through tor.
> Note that this package makes it easy to route through tor,
> but it does not try to prevent de-anonymization attacks;
> those depend on browser configuration.
> Original-Maintainer: Travis H. <travis+o-ubuntu at subspacefield.org>
>
> *** Contents:
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./etc/
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./etc/polipo-tor/
> -rw-r--r-- root/root 3912 2009-05-22 13:18 ./etc/polipo-tor/config
> -rw-r--r-- root/root 450 2009-05-22 13:18 ./etc/polipo-tor/forbidden
> -rw-r--r-- root/root 172 2009-05-22 13:18 ./etc/polipo-tor/options
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./etc/init.d/
> -rwxr-xr-x root/root 11669 2009-05-22 12:54 ./etc/init.d/polipo-tor
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./var/
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./var/log/
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./var/log/polipo-tor/
> -rw-r--r-- root/root 0 2009-05-22 13:18 ./var/log/polipo-tor/polipo.log
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./var/run/
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./var/run/polipo-tor/
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./usr/
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./usr/share/
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./usr/share/doc/
> drwxr-xr-x root/root 0 2009-05-22 13:18 ./usr/share/doc/polipo-tor/
> -rw-r--r-- root/root 2051 2009-04-30 11:12 ./usr/share/doc/polipo-tor/README.Debian
> -rw-r--r-- root/root 1603 2009-04-28 19:05 ./usr/share/doc/polipo-tor/copyright
> -rw-r--r-- root/root 152 2009-05-22 13:03 ./usr/share/doc/polipo-tor/changelog.Debian.gz
>
> Now unfortunately, it isn't installing /etc/polipo-tor/config.
>
> Or anything in that subdirectory.
>
> ANy clues why?
By "that subdirectory" you mean "/etc/polipo-tor/" ?
Normal packaging methodologies will register files in /etc/ as
conffiles. Special processing is applied to conffiles to maintain user
changes. "User changes" includes deleting them. If you had a version of
your package installed, and deleted the files manually, then reinstalls
of your package will not recreate them.
Try reinstalling it with
'dpkg --force-confmiss -i polipo-tor_1.0-0ubuntu1_all.deb'
.
If that's not the problem, you'll need to publish your source package
and ask for someone to take a look at it. The #ubuntu-motu IRC channel
is a good place to get packaging help. If your package is intended to
enter Ubuntu itself when ready, publish it to REVU.
> Also, I've set up a local repository using the following script:
>
> cd /ref/www/packages/ubuntu
> for b in $(find dists -type d \( -name 'binary*' -o -name 'all' \))
> do
> dpkg-scanpackages $b /dev/null | gzip -9c > $b/Packages.gz
> done
> for s in $(find dists -type d -name source)
> do
> dpkg-scansources $s | gzip -9c > $s/Sources.gz
> done
>
>
> However, when I try to "apt-get -y install" a package, it fails because
> the repo isn't signed somehow. I've already added the key I used to create
> the packages via "apt-key add" but apparently that's not enough. What
> am I missing?
Different signatures for different purposes. The key used at package
build time is used to assert the author of the package and to
authenticate uploads to repository manager software.
The signature that APT checks is the one on the Release file of the
repository, which your simple repository will not have.
My own script for this purpose is currently at
https://code.launchpad.net/~maxb/+junk/apt-generate .
I really ought to write some documentation for it and put it somewhere
other than an adhoc +junk branch.
Max.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20090529/7b90d50d/attachment.sig>
More information about the Ubuntu-devel-discuss
mailing list