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

Re: How to register files as a part of a package?

Wichert Akkerman <wichert@wiggy.net> wrote:

> > Maybe we need a dpkg-adopt <filename>. I would like for packages to be
> > able to claim ownership of files that wern't necessarily in the
> > original deb package.
> We're thinking of adding such a system, but we want to restructure the
> database handling code first.

Good, well - if you do, make sure you look up Solaris' `installf' command.
It has categories for each delivered file that would be useful to

f     a standard executable or data file
e     a file (perhaps owned by another package) frigged with by the
      package installation scripts
v     volatile file (one whose contents are expected to change)
d     directory
x     an exclusive directory (I think this means no other packages are
      allowed to deliver content to it)
l     linked file
p     named pipe
s     symbolic link
b     block special device
c     character special device

I can think of a few additions to this list such as volatile exclusive
directories (eg /var/spool/squid), etc.

Note that in the instance where you modify some other package's file in
package installation scripts, you first notify the package system you're
going to modify a file, make your changes then at the end of the script
notify the package system that you're done delivering files.

I hate to say it, but this is a missing feature that makes Debian's
package system a complete and utter mess compared to Solaris'.

Virtues of a package system:

  - every file on a system can be identified as beonging to a package
  - installations and upgrades can be easily backed out (dpkg--)
  - integrity - not just md5 sums but file ownership and permissions can
    easily be checked (dpkg--)

You should be able to run `debsums -as' on a freshly installed system and
have it return no changes.  A tool similar to `cruft' should return
no spurious files on your system - especially since your data directories
such as `/home' would be marked as a volatile directory by the base system
package.  And if you only install things through the package installation
system, and configure things solely with `debconf' and `dpkg-reconfigure',
you should be able to expect these commands to return nothing when re-run.
   Sam Vilain, sam@vilain.net     WWW: http://sam.vilain.net/
    7D74 2A09 B2D3 C30F F78E      GPG: http://sam.vilain.net/sam.asc
    278A A425 30A9 05B5 2F13

Real Programmers don't write in Shell Script.  Shell script is for
obsolete platforms that don't ship with Perl, and for very short sequences
of commands.  As a rule of thumb, if you need an `if' statement or a `for'
loop in a shell script, it's time to re-write it in Perl.

To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: