Re: Find which package has installed some file under /etc

2011-12-23 Thread Vincent Lefevre
On 2011-12-22 16:30:57 +0100, Tom H wrote:
> You can check whether a file in "/etc/default/" is sourced by a file
> in "/etc/init.d/".

It's impossible to do this reliably (e.g. recursively), and the
/etc/default/ file may be sourced by another script.

For instance, /etc/default/cryptdisks is not directly sourced by
/etc/init.d/cryptdisks, but by /lib/cryptsetup/cryptdisks.functions
(which is itself sourced by /etc/init.d/cryptdisks).

/etc/default/acpi-support is not sourced by /etc/init.d/acpi-support
either, and not by files sourced from /etc/init.d/acpi-support either.
I've found that it is sourced by scripts from /etc/acpi/ but I don't
see how I could do such detections automatically in the general case.

Another example: /etc/default/debsums is provided by debsums, but
debsums doesn't provide an init.d script. /etc/default/debsums is
actually sourced by the /etc/cron.*/debsums files.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111224002352.gd15...@xvii.vinc17.org



Re: Find which package has installed some file under /etc

2011-12-22 Thread Tom H
On Thu, Dec 22, 2011 at 4:23 AM, Vincent Lefevre  wrote:
> On 2011-12-20 14:20:51 -0700, Bob Proulx wrote:
>>
>> But I think this discussion of /etc/default/ collisions is all rather
>> academic.  No one has yet to mention any real world case of a problem.
>> Just the potential that it might be a problem.  Unless it is a real
>> problem, and I haven't seen it yet, then I don't think there is much
>> benefit trying to prevent it, since it hasn't been happening.
>
> I thought about writing a script that would automatically clean up
> the /etc/default directory, but if some filenames are not based on
> package names, there would be real problems.

You can check whether a file in "/etc/default/" is sourced by a file
in "/etc/init.d/".


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CAOdo=sxeko9t4hpuhqkakkj3rwrxdvr_rd06co6squctiya...@mail.gmail.com



Re: Find which package has installed some file under /etc

2011-12-21 Thread Vincent Lefevre
On 2011-12-20 14:20:51 -0700, Bob Proulx wrote:
> But I think this discussion of /etc/default/ collisions is all rather
> academic.  No one has yet to mention any real world case of a problem.
> Just the potential that it might be a problem.  Unless it is a real
> problem, and I haven't seen it yet, then I don't think there is much
> benefit trying to prevent it, since it hasn't been happening.

I thought about writing a script that would automatically clean up
the /etc/default directory, but if some filenames are not based on
package names, there would be real problems.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111222032329.ga25...@xvii.vinc17.org



Re: Find which package has installed some file under /etc

2011-12-21 Thread Osamu Aoki
Hi,

On Tue, Dec 20, 2011 at 11:06:04PM +0200, Andrei Popescu wrote:
> On Ma, 20 dec 11, 20:56:11, Osamu Aoki wrote:
> > On Tue, Dec 20, 2011 at 12:29:01AM +0100, Vincent Lefevre wrote:
> > > The point is what the Debian Policy says. 
> > 
> > Anyway, if you feel strong to enforce this ipart of policy, most
> > effective thing to do is file a wishlist bug with patch to lintian to
> > enforce  for both init.d script and default file.
> 
> AFAIK init.d scripts always belong to a package, so not the same thing 
> (name clashes would be detected by dpkg).

Yah ... that is why no DD cares about hypothetical name crash and live
with common sense.

Osamu



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111221151544.gb8...@goofy.lan



Re: Find which package has installed some file under /etc

2011-12-20 Thread Bob Proulx
Andrei Popescu wrote:
> Osamu Aoki wrote:
> > Vincent Lefevre wrote:
> > > The point is what the Debian Policy says. 
> > 
> > Anyway, if you feel strong to enforce this ipart of policy, most
> > effective thing to do is file a wishlist bug with patch to lintian to
> > enforce  for both init.d script and default file.
> 
> AFAIK init.d scripts always belong to a package, so not the same thing 
> (name clashes would be detected by dpkg).

I think you missed that it was the /etc/default/ file naming that was
under discussion.  Those files are often not packaged (for the good
reasons mentioned) and so a conflict would not be detected by dpkg.
But usually also when they are not packaged they are often not created
programmatically but are left to the local admin to create.  That is
the best practice to use and the one I like to see the most.

Presumably the local admin being a human can deal with the problem.
If I needed to create a /etc/default/ file as a local admin action and
found that it was in conflict between two init.d scripts then I would
edit the /etc/init.d/ conffile to remove the conflict and file a bug
against one or both of the packages to fix it upstream.

But I think this discussion of /etc/default/ collisions is all rather
academic.  No one has yet to mention any real world case of a problem.
Just the potential that it might be a problem.  Unless it is a real
problem, and I haven't seen it yet, then I don't think there is much
benefit trying to prevent it, since it hasn't been happening.

Bob


signature.asc
Description: Digital signature


Re: Find which package has installed some file under /etc

2011-12-20 Thread Andrei Popescu
On Ma, 20 dec 11, 20:56:11, Osamu Aoki wrote:
> On Tue, Dec 20, 2011 at 12:29:01AM +0100, Vincent Lefevre wrote:
> > The point is what the Debian Policy says. 
> 
> Anyway, if you feel strong to enforce this ipart of policy, most
> effective thing to do is file a wishlist bug with patch to lintian to
> enforce  for both init.d script and default file.

AFAIK init.d scripts always belong to a package, so not the same thing 
(name clashes would be detected by dpkg).

Kind regards,
Andrei
-- 
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic


signature.asc
Description: Digital signature


Re: Find which package has installed some file under /etc

2011-12-20 Thread Osamu Aoki
On Tue, Dec 20, 2011 at 12:29:01AM +0100, Vincent Lefevre wrote:
> The point is what the Debian Policy says. 

Anyway, if you feel strong to enforce this ipart of policy, most
effective thing to do is file a wishlist bug with patch to lintian to
enforce  for both init.d script and default file.

I realy do not see any major issue with current state relying common
sense and some huristics to handle common case such as apache2.

Osamu


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111220115611.ga3...@goofy.lan



Re: Find which package has installed some file under /etc

2011-12-19 Thread Vincent Lefevre
Hi,

On 2011-12-19 23:02:07 +0900, Osamu Aoki wrote:
> On Mon, Dec 19, 2011 at 01:02:22AM +0100, Vincent Lefevre wrote:
> > On 2011-12-18 13:18:02 -0700, Bob Proulx wrote:
> > > The namespace is defined by Debian Policy.  The filename should be
> > > named after the package name.  Since the package names must be
> > > different the file name derived from it must be different.  (I think
> > > it is okay for /etc/default/foo to be part of a foo-common package
> > > though.  The namespace intention has been preserved.)
> > 
> > It's not always the case:
> 
> did you check "apt-cache showsrc ..."

What "apt-cache showsrc ..." says doesn't matter. The point is what
the Debian Policy says. If it isn't followed and some new package
creates a /etc/default/... file that clashes with some other package
because of that, there would be a problem (with potential data loss).
The fact that the filename is close to the package name is not
sufficient to avoid problems.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111219232901.ga3...@xvii.vinc17.org



Re: Find which package has installed some file under /etc

2011-12-19 Thread Osamu Aoki
Hi,

On Mon, Dec 19, 2011 at 01:02:22AM +0100, Vincent Lefevre wrote:
> On 2011-12-18 13:18:02 -0700, Bob Proulx wrote:
> > The namespace is defined by Debian Policy.  The filename should be
> > named after the package name.  Since the package names must be
> > different the file name derived from it must be different.  (I think
> > it is okay for /etc/default/foo to be part of a foo-common package
> > though.  The namespace intention has been preserved.)
> 
> It's not always the case:

did you check "apt-cache showsrc ..."
 
> /etc/default/alsa created by alsa-base
Package: alsa-driver
Binary: linux-sound-base, alsa-base, alsa-base-udeb, alsa-source

Not exactly in any way now but close enough

> /etc/default/apache2 created by apache2.2-common
Package: apache2
Binary: apache2.2-common, apache2.2-bin, apache2-mpm-worker,
apache2-mpm-prefork, apache2-mpm-event, apache2-mpm-itk, apache2-utils,
apache2-suexec, apache2-suexec-custom, apache2, apache2-doc,
apache2-prefork-dev, apache2-threaded-dev, apache2-dbg

So this is following source package name

> /etc/default/bluetooth created by bluez
Package: bluez
Binary: libbluetooth3, libbluetooth3-dbg, libbluetooth-dev, bluetooth,
bluez, bluez-dbg, bluez-alsa, bluez-gstreamer, bluez-cups,
bluez-pcmcia-support, bluez-compat, bluez-utils, bluez-audio

So this is following a associated package name from the same source
package

> /etc/default/bootlogd created by initscripts

Package: sysvinit
Binary: sysvinit, sysvinit-utils, sysv-rc, initscripts
sysvinit-utils: /sbin/bootlogd
initscripts: /etc/default/bootlogd

...

and the rests are almost same situation.  Some are shorthand name ... others
are one of those associated package name.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111219140207.ga10...@goofy.lan



Re: Find which package has installed some file under /etc

2011-12-19 Thread Vincent Lefevre
On 2011-12-18 21:20:06 -0700, Bob Proulx wrote:
> Well...  We are all friends here.  Have you hit a problem with one of
> them?  I am sure something could be worked out.

No problems with /etc/default yet. But I think that it would have
been preferable to avoid problems that could arise in the future
(and even though problems can be fixed, it's much better to avoid
them in the first place, e.g. before losing a config file because
it is overwritten by some other package).

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111219125748.gf5...@xvii.vinc17.org



Re: Find which package has installed some file under /etc

2011-12-18 Thread Bob Proulx
Vincent Lefevre wrote:
> Bob Proulx wrote:
> > Okay I was wrong on the strictly exact names.  But most of those do
> > exist within the expected namespace of the parent package.  The only
> > ones that are a stretch are devpts and tmpfs.  The others are pretty
> > obvious.
> 
> But this not sufficient to avoid a possible clash for some of them.

Well...  We are all friends here.  Have you hit a problem with one of
them?  I am sure something could be worked out.

Bob


signature.asc
Description: Digital signature


Re: Find which package has installed some file under /etc

2011-12-18 Thread Vincent Lefevre
On 2011-12-18 17:09:35 -0700, Bob Proulx wrote:
> Vincent Lefevre wrote:
> > /etc/default/alsa created by alsa-base
> > /etc/default/apache2 created by apache2.2-common
> > /etc/default/bluetooth created by bluez
> > /etc/default/bootlogd created by initscripts
> > /etc/default/cacerts created by ca-certificates-java
> > /etc/default/cryptdisks created by cryptsetup
> > /etc/default/decnet created by dnet-common
> > /etc/default/devpts created by initscripts
> > /etc/default/halt created by initscripts
> > /etc/default/keyboard created by keyboard-configuration
> > /etc/default/locale created by locales
> > /etc/default/nss created by libc-bin
> > /etc/default/saned created by sane-utils
> > /etc/default/ssh created by openssh-server
> > /etc/default/tmpfs created by initscripts
> > /etc/default/useradd created by passwd
> > /etc/default/wicd created by wicd-daemon
> 
> Okay I was wrong on the strictly exact names.  But most of those do
> exist within the expected namespace of the parent package.  The only
> ones that are a stretch are devpts and tmpfs.  The others are pretty
> obvious.

But this not sufficient to avoid a possible clash for some of them.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111219005827.ge5...@xvii.vinc17.org



Re: Find which package has installed some file under /etc

2011-12-18 Thread Bob Proulx
Vincent Lefevre wrote:
> Bob Proulx wrote:
> > The namespace is defined by Debian Policy.  The filename should be
> > named after the package name.  Since the package names must be
> > different the file name derived from it must be different.  (I think
> > it is okay for /etc/default/foo to be part of a foo-common package
> > though.  The namespace intention has been preserved.)
> 
> It's not always the case:
> 
> /etc/default/alsa created by alsa-base
> /etc/default/apache2 created by apache2.2-common
> /etc/default/bluetooth created by bluez
> /etc/default/bootlogd created by initscripts
> /etc/default/cacerts created by ca-certificates-java
> /etc/default/cryptdisks created by cryptsetup
> /etc/default/decnet created by dnet-common
> /etc/default/devpts created by initscripts
> /etc/default/halt created by initscripts
> /etc/default/keyboard created by keyboard-configuration
> /etc/default/locale created by locales
> /etc/default/nss created by libc-bin
> /etc/default/saned created by sane-utils
> /etc/default/ssh created by openssh-server
> /etc/default/tmpfs created by initscripts
> /etc/default/useradd created by passwd
> /etc/default/wicd created by wicd-daemon

Okay I was wrong on the strictly exact names.  But most of those do
exist within the expected namespace of the parent package.  The only
ones that are a stretch are devpts and tmpfs.  The others are pretty
obvious.

Bob


signature.asc
Description: Digital signature


Re: Find which package has installed some file under /etc

2011-12-18 Thread Vincent Lefevre
On 2011-12-18 13:18:02 -0700, Bob Proulx wrote:
> The namespace is defined by Debian Policy.  The filename should be
> named after the package name.  Since the package names must be
> different the file name derived from it must be different.  (I think
> it is okay for /etc/default/foo to be part of a foo-common package
> though.  The namespace intention has been preserved.)

It's not always the case:

/etc/default/alsa created by alsa-base
/etc/default/apache2 created by apache2.2-common
/etc/default/bluetooth created by bluez
/etc/default/bootlogd created by initscripts
/etc/default/cacerts created by ca-certificates-java
/etc/default/cryptdisks created by cryptsetup
/etc/default/decnet created by dnet-common
/etc/default/devpts created by initscripts
/etc/default/halt created by initscripts
/etc/default/keyboard created by keyboard-configuration
/etc/default/locale created by locales
/etc/default/nss created by libc-bin
/etc/default/saned created by sane-utils
/etc/default/ssh created by openssh-server
/etc/default/tmpfs created by initscripts
/etc/default/useradd created by passwd
/etc/default/wicd created by wicd-daemon

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111219000222.gd5...@xvii.vinc17.org



Re: Find which package has installed some file under /etc

2011-12-18 Thread Bob Proulx
Vincent Lefevre wrote:
> Bob Proulx wrote:
> > The namespace is defined by Debian Policy.  The filename should be
> > named after the package name.  Since the package names must be
> > different the file name derived from it must be different.  (I think
> > it is okay for /etc/default/foo to be part of a foo-common package
> > though.  The namespace intention has been preserved.)
> 
> OK, so for these files, that's another way to know what package
> they may be associated with. :)

Uhm...  Yes.  They may have the name of the package they are
associated with in the filename.  But I thought that was too obvious
to require a mention!  :-)

Bob


signature.asc
Description: Digital signature


Re: Find which package has installed some file under /etc

2011-12-18 Thread Vincent Lefevre
On 2011-12-18 13:18:02 -0700, Bob Proulx wrote:
> The namespace is defined by Debian Policy.  The filename should be
> named after the package name.  Since the package names must be
> different the file name derived from it must be different.  (I think
> it is okay for /etc/default/foo to be part of a foo-common package
> though.  The namespace intention has been preserved.)

OK, so for these files, that's another way to know what package
they may be associated with. :)

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111218212107.gc5...@xvii.vinc17.org



Re: Find which package has installed some file under /etc

2011-12-18 Thread Bob Proulx
Vincent Lefevre wrote:
> Bob Proulx wrote:
> > Sometimes I see people file bugs to the BTS against a package asking
> > for the package to provide a /etc/default/ file as part of the
> > package.  When I see those I usually counter with a request that it
> > not be made part of the package.  If the file is part of a package
> > there there will always need to be handling of modifications to it.
> 
> But if they are not part of the package, how can clashes between
> packages (e.g. 2 packages using the same name for the /etc/default
> file) be handled?

The namespace is defined by Debian Policy.  The filename should be
named after the package name.  Since the package names must be
different the file name derived from it must be different.  (I think
it is okay for /etc/default/foo to be part of a foo-common package
though.  The namespace intention has been preserved.)

Bob


signature.asc
Description: Digital signature


Re: Find which package has installed some file under /etc

2011-12-18 Thread Vincent Lefevre
On 2011-12-17 18:55:45 -0700, Bob Proulx wrote:
> Sometimes I see people file bugs to the BTS against a package asking
> for the package to provide a /etc/default/ file as part of the
> package.  When I see those I usually counter with a request that it
> not be made part of the package.  If the file is part of a package
> there there will always need to be handling of modifications to it.

But if they are not part of the package, how can clashes between
packages (e.g. 2 packages using the same name for the /etc/default
file) be handled?

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111218182410.gb5...@xvii.vinc17.org



Re: Find which package has installed some file under /etc

2011-12-17 Thread Bob Proulx
Vincent Lefevre wrote:
> However there are still packages for which neither dpkg -S, nor ucfq
> gives information about the package:
> 
> xvii:~> ll /etc/default/ntfs-3g
> -rw-r--r-- 1 root root 48 2011-12-08 00:21:36 /etc/default/ntfs-3g
> xvii:~> dpkg -S /etc/default/ntfs-3g
> dpkg-query: no path found matching pattern /etc/default/ntfs-3g.
> xvii:~> ucfq /etc/default/ntfs-3g
> Configuration filePackage Exists 
> Changed
> /etc/default/ntfs-3g  Yes

Files in /etc/default/ are often expected to be under the control of
the local admin.  Often if they exist at all then they are created not
by a package but by the local admin.  In those cases there wouldn't
ever be a database listing them.

I would grep through /etc/init.d/* for references to those files.
Since those files are (mostly) included by boot time init.d scripts
that is where you will see them included.

  $ grep ntfs-3g /etc/init.d/*

Sometimes I see people file bugs to the BTS against a package asking
for the package to provide a /etc/default/ file as part of the
package.  When I see those I usually counter with a request that it
not be made part of the package.  If the file is part of a package
there there will always need to be handling of modifications to it.
That is why there is default dpkg behavior and why there is additional
helpers like ucf to help manage those changes.  But if the file is not
part of the package at all then things are simple and no management is
required.  Simple is better.  I prefer not to see /etc/default/ files
as part of the package.

Bob


signature.asc
Description: Digital signature


Re: Find which package has installed some file under /etc

2011-12-17 Thread Vincent Lefevre
On 2011-12-18 02:11:33 +0100, Michael Biebl wrote:
> On 18.12.2011 01:00, Vincent Lefevre wrote:
> > Is there a way to find which package has installed some file
> > under /etc? For conffiles, there is dlocate or "dpkg -S", but
> > what about the other files (installed in postinst)?
> 
> ucf is also used to manage configuration files.
> As those files are not registered in the dpkg db, you need to use ucfq
> to query the ucf internal database.

Thanks, this is OK for dictd:

xvii:~> ll /etc/default/dictd
-rw-r--r-- 1 root root 857 2009-06-04 19:27:26 /etc/default/dictd
xvii:~> dpkg -S /etc/default/dictd
dpkg-query: no path found matching pattern /etc/default/dictd.
xvii:~> ucfq /etc/default/dictd
Configuration filePackage Exists Changed
/etc/default/dictddictd   YesYes

However there are still packages for which neither dpkg -S, nor ucfq
gives information about the package:

xvii:~> ll /etc/default/ntfs-3g
-rw-r--r-- 1 root root 48 2011-12-08 00:21:36 /etc/default/ntfs-3g
xvii:~> dpkg -S /etc/default/ntfs-3g
dpkg-query: no path found matching pattern /etc/default/ntfs-3g.
xvii:~> ucfq /etc/default/ntfs-3g
Configuration filePackage Exists Changed
/etc/default/ntfs-3g  Yes

-- 
Vincent Lefèvre  - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20111218013111.ga5...@xvii.vinc17.org



Re: Find which package has installed some file under /etc

2011-12-17 Thread Michael Biebl
On 18.12.2011 01:00, Vincent Lefevre wrote:
> Is there a way to find which package has installed some file
> under /etc? For conffiles, there is dlocate or "dpkg -S", but
> what about the other files (installed in postinst)?

ucf is also used to manage configuration files.
As those files are not registered in the dpkg db, you need to use ucfq
to query the ucf internal database.

Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?



signature.asc
Description: OpenPGP digital signature


Re: Find which package has installed some file under /etc

2011-12-17 Thread Bob Proulx
Vincent Lefevre wrote:
> Is there a way to find which package has installed some file
> under /etc?

Yes, if the package owns the file.  No, if the package put it there
but didn't keep ownership of it.

> For conffiles, there is dlocate or "dpkg -S",

Exactly!  If the package kept track of the file as a conffile then you
can locate it with 'dpkg -S'.

> but what about the other files (installed in postinst)?

Then the answer is No.  There isn't a database for it.

But if the package's postinst is still current then you should be able
to locate the script that did it.  Assume that /etc/foofile is the
file from /etc.

  grep foofile /var/lib/dpkg/info/*.postinst

That should locate the script the references it.  If the script is
still current.  If the package was purged and the file left behind
then nothing will be found.  If the file was left behind by a previous
version of the postinst script which was subsequently update to a
newer version that no longer references it then nothing will be found.
But if it still references it then you should be able to locate the
package by the script doing it.  (Sorry for this being confusing.)

Bob


signature.asc
Description: Digital signature


Find which package has installed some file under /etc

2011-12-17 Thread Vincent Lefevre
Is there a way to find which package has installed some file
under /etc? For conffiles, there is dlocate or "dpkg -S", but
what about the other files (installed in postinst)?

-- 
Vincent Lefèvre  - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/2011121803.gu4...@xvii.vinc17.org