[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Silly Packaging Problem



Hello all,

I hope I've got the right list. If not, I appologize; just point the way and I'll take my question to the proper list.


I'm attempting to write a debian package for our site that installs configuration files specific to our needs. I'm not a *complete* n00b -- I've written dozens of packages similar to this one and they work without a hitch -- but for some reason this one isn't working.

Here's what I've been able to figure out:

My package pre-depends on the package that it configures: (In this case, courier-authdaemon.)

In my preinst script:
1) I check for the presence of a file: /etc/courier/authdaemonrc -- exit w/ error if it doesn't exist.
2) I then divert this file.
3) Then I check to see that (a) /etc/courier/authdaemonrc does not exist, and (b) that /etc/courier/authdaemonrc.distrib does exist. 4) The script continues by diverting other files that are also to be replaced.

After the preinst script exits the files from my package are installed. I presume dpkg handles this magically.

Then, in my postinst script:
1) I check for the presence of /etc/courier/authdaemonrc.distrib
2) I check for the presence of /etc/courier/authdaemonrc (from my package)
*** This is where the package installation fails -- /etc/courier/authdaemonrc does not exist.

Now, before you say, "Hey stupid, make sure your etc/courier/authdaemonrc file is actually *in* the package..." I already have. When I extract the contents of the .deb file to a directory using 'dpkg-deb -x', here is what I have:

3924634    4 drwxr-xr-x   5 root     root         4096 Aug  8 15:52 .
3924641    4 drwxr-xr-x   3 root     root         4096 Aug  8 15:44 ./etc
3924643 4 drwxr-xr-x 2 root root 4096 Aug 8 15:45 ./etc/courier 3924645 4 -rw-r--r-- 1 root root 364 Aug 3 14:38 ./etc/courier/imapd.cnf 3924646 8 -rw-r--r-- 1 root root 6139 Aug 3 14:38 ./etc/courier/imapd-ssl 3924647 4 -rw-r--r-- 1 root root 2692 Aug 3 14:38 ./etc/courier/authdaemonrc 3924648 16 -rw-r--r-- 1 root root 12638 Aug 3 14:38 ./etc/courier/imapd
3924649    4 drwxr-xr-x   3 root     root         4096 Aug  8 15:45 ./usr
3924650 4 drwxr-xr-x 3 root root 4096 Aug 8 15:45 ./usr/share 3924651 4 drwxr-xr-x 3 root root 4096 Aug 8 15:45 ./usr/share/doc 3924652 4 drwxr-xr-x 2 root root 4096 Aug 8 15:45 ./usr/share/doc/tiem-courier-cfg 3924653 4 -rw-r--r-- 1 root root 1055 Aug 3 14:38 ./usr/share/doc/tiem-courier-cfg/copyright 3924654 4 -rw-r--r-- 1 root root 366 Aug 8 15:43 ./usr/share/doc/tiem-courier-cfg/changelog.gz 3924655 4 drwxr-xr-x 2 root root 4096 Aug 8 15:45 ./DEBIAN 3924656 4 -rwxr-xr-x 1 root root 1160 Aug 8 15:45 ./DEBIAN/postinst 3924657 4 -rwxr-xr-x 1 root root 1373 Aug 8 15:45 ./DEBIAN/preinst 3924658 4 -rwxr-xr-x 1 root root 738 Aug 8 15:45 ./DEBIAN/prerm 3924659 4 -rwxr-xr-x 1 root root 1019 Aug 8 15:45 ./DEBIAN/postrm 3924660 4 -rw-r--r-- 1 root root 91 Aug 8 15:45 ./DEBIAN/conffiles 3924661 4 -rw-r--r-- 1 root root 376 Aug 8 15:45 ./DEBIAN/md5sums 3924662 4 -rw-r--r-- 1 root root 510 Aug 8 15:45 ./DEBIAN/control


As you can see, etc/courier/authdaemonrc clearly exists in the package file.

The other files in etc/courier/ are installed as expected, but for some reason the authdaemonrc file is not installed.

Oh, and it get's better. After installation, when I do 'dpkg -L', etc/courier/authdaemonrc *is* listed as one of the files installed by my package.

So...  Uh...  Can anyone enlighten me as to why this is happening?


Anxiously awaiting a clue,

Michael Peek




Reply to: