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

Bug#213907: marked as done (Dynamic registration of files to packages)



Your message dated Mon, 23 Aug 2004 16:05:47 -0500
with message-id <87eklxk1jo.fsf@glaurung.internal.golden-gryphon.com>
and subject line Bug#234286: debian-policy: log file should be in packages' file list
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 3 Oct 2003 11:38:31 +0000
>From tbm@cyrius.com Fri Oct 03 06:38:29 2003
Return-path: <tbm@cyrius.com>
Received: from bangpath.uucico.de [195.71.9.197] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1A5OGT-00055q-00; Fri, 03 Oct 2003 06:38:29 -0500
Received: by bangpath.uucico.de (Postfix, from userid 10)
	id F034726B2F; Fri,  3 Oct 2003 13:38:28 +0200 (CEST)
Received: by deprecation.cyrius.com (Postfix, from userid 1000)
	id 80016FE8C; Fri,  3 Oct 2003 21:38:01 +1000 (EST)
Date: Fri, 3 Oct 2003 21:38:01 +1000
From: Martin Michlmayr <tbm@cyrius.com>
To: submit@bugs.debian.org
Subject: Dynamic registration of files to packages
Message-ID: <20031003113801.GA3540@deprecation.cyrius.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.4i
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0
	tests=HAS_PACKAGE
	version=2.53-bugs.debian.org_2003_10_1
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_10_1 (1.174.2.15-2003-03-30-exp)

Package: dpkg
Severity: wishlist

We all agree that the package management system is one of the nicest
features of Debian.  It's very helpful to use dpkg to find out to
which package a file belongs (dpkg -S).  However, in many cases,
prominent files (e.g.  /etc/hosts, /etc/passwd) don't belong to any
package at all.  This fact is confusing because the files must have
been created somehow and it decreases the usefulness of the
packagement system.

Two examples illustrate this point:

 1. 'dpkg -S /etc/passwd' returns 'dpkg: /etc/passwd not found.'
    Further investigation shows that this file is created in the
    postinst script of the base-passwd package.

    /var/lib/dpkg/info/base-passwd.postinst:

    if [ ! -e /etc/passwd ] ; then
    	cp /usr/share/base-passwd/passwd.master /etc/passwd
    fi

 2. % dpkg -S /usr/bin/vi
    dpkg: /usr/bin/vi not found.
    % ll /usr/bin/vi
    lrwxrwxrwx    1 root     root           20 2003-09-12 00:08 /usr/bin/vi -> /etc/alternatives/vi
    % ll /etc/alternatives/vi
    lrwxrwxrwx    1 root     root           12 2003-09-29 12:56 /etc/alternatives/vi -> /usr/bin/vim
    % dpkg -S /usr/bin/vim
    vim: /usr/bin/vim

In both cases, the files belong to a package in some way and still
'dpkg -S' doesn't show it.

I want all files in /etc to have a proper owner which is shown with
dpkg -S.  For this, a dynamic mechanism is needed to tell dpkg to
which package a file belongs.  This is needed because not all files
can be part of the package itself, but need to be created at a later
time (e.g. in a postinst script).

This fexible mechanism, dpkg-registerfile (or whatever it will be
called) should take two arguments: the file and the package to which
the file belongs.  The script could then, similarly to dpkg-divert,
put the information in /var/lib/dpkg (The script must also have the
capability to remove the information again in case a file is being
deleted).  Of course, dpkg has to be made aware of this.

The examples given above could easily be adapted to comply to this
policy:

 1. The postinst script of base-passwd should say:

    if [ ! -e /etc/passwd ] ; then
    	cp /usr/share/base-passwd/passwd.master /etc/passwd
    	dpkg-registerfile /etc/passwd base-passwd
    fi

 2. The solution for this example is to have update-alternatives
    call dpkg-registerfile

    Obviously, dpkg-registerfile must also be able to re-register a
    file or change the package a file belongs to because
    update-alternatives might change the situation.

This is a bug report based on a mail I sent to -dpkg in November
2000.  There was some discussion following my posting; see
http://lists.debian.org/debian-dpkg/2000/debian-dpkg-200011/msg00025.html

-- 
Martin Michlmayr
tbm@cyrius.com

---------------------------------------
Received: (at 234286-done) by bugs.debian.org; 23 Aug 2004 21:08:01 +0000
>From srivasta@debian.org Mon Aug 23 14:08:01 2004
Return-path: <srivasta@debian.org>
Received: from host-12-107-230-171.dtccom.net (glaurung.internal.golden-gryphon.com) [12.107.230.171] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BzM2q-0004Eb-00; Mon, 23 Aug 2004 14:08:01 -0700
Received: from glaurung.internal.golden-gryphon.com (srivasta@localhost [127.0.0.1])
	by glaurung.internal.golden-gryphon.com (8.13.1/8.13.1/Debian-8) with ESMTP id i7NL5l9e022510
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <234286-done@bugs.debian.org>; Mon, 23 Aug 2004 16:05:47 -0500
Received: (from srivasta@localhost)
	by glaurung.internal.golden-gryphon.com (8.13.1/8.13.1/Debian-8) id i7NL5l3F022509;
	Mon, 23 Aug 2004 16:05:47 -0500
X-Authentication-Warning: glaurung.internal.golden-gryphon.com: srivasta set sender to srivasta@debian.org using -f
To: 234286-done@bugs.debian.org
Subject: Re: Bug#234286: debian-policy: log file should be in packages' file list
References: <E1Av347-0000jb-6N@jidanni.org>
	<20040223001628.GB4109@riva.ucam.org>
From: Manoj Srivastava <srivasta@debian.org>
Organization: The Debian Project
X-URL: http://www.debian.org/%7Esrivasta/
User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) (i686-pc-linux-gnu)
Mail-Copies-To: nobody
X-Face: #q.#]5@vq!Jz+E0t_/;Y^gTjR\T^"B'fbeuVGiyKrvbfKJl!^e|e:iu(kJ6c|QYB57LP*|t
 &YlP~HF/=h:GA6o6W@I#deQL-%#.6]!z:6Cj0kd#4]>*D,|0djf'CVlXkI,>aV4\}?d_KEqsN{Nnt7
 78"OsbQ["56/!nisvyB/uA5Q.{)gm6?q.j71ww.>b9b]-sG8zNt%KkIa>xWg&1VcjZk[hBQ>]j~`Wq
 Xl,y1a!(>6`UM{~'X[Y_,Bv+}=L\SS*mA8=s;!=O`ja|@PEzb&i0}Qp,`Z\:6:OmRi*
Date: Mon, 23 Aug 2004 16:05:47 -0500
In-Reply-To: <20040223001628.GB4109@riva.ucam.org> (Colin Watson's message of
	"Mon, 23 Feb 2004 00:16:28 +0000")
Message-ID: <87eklxk1jo.fsf@glaurung.internal.golden-gryphon.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Delivered-To: 234286-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

On Mon, 23 Feb 2004 00:16:28 +0000, Colin Watson <cjwatson@debian.org> said: 

> On Mon, Feb 23, 2004 at 07:31:15AM +0800, Dan Jacobson wrote:
>> Package: debian-policy Version: 3.6.1.0 Severity: wishlist
>>
>> Idea: programs that will make log files should be required to list
>> the basic log file (before rotations, etc.) so that dpkg -L package
>> will list them, and dpkg -S will find them.

> There is no mechanism in dpkg for packages to do this yet, so
> there's no point in you filing this request against policy. Sorry. I
> recommend that this bug be closed. (I believe that the request is
> already in dpkg's huge bug list somewhere, so no need to add to it
> with a reassign; it's certainly a reasonably well-known wishlist
> among the developers.)

> If a package attempted to fulfil your request using only the current
> mechanisms, then the log file would be erased on every upgrade. This
> is why an extension to dpkg is needed.

	Closing the report.

	manoj
-- 
Though I'll admit readability suffers slightly...  --Larry Wall in
<2969@jato.Jpl.Nasa.Gov>
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: