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

Bug#672160: Directory /boot/console-setup



On Thu, May 10, 2012 at 07:43:46PM +0300, Anton Zinoviev wrote:
> First the problem in few words.  The package console-setup needs an 
> access to a directory similar to /var very early during the boot process 
> - when /var is not yet mounted.  Currently it creates files in the 
> directory /etc/console-setup.  As a result when the package is purged it 
> is impossible to tell which files in /etc/console-setup are 
> automatically generated (so they have to be removed) and which are put 
> there by the admin (so we are not permitted to remove them).

I think your premise here is false.  The /etc/console-setup directory is
owned by the console-setup package; there are certain predictable filenames
that will have been created by the package; and any files in this directory
are configuration files for console-setup, whether created by the admin
manually or created by the package.

So it's perfectly permissible under policy for the package to remove these
files on purge.

> One possible solution is to generate the files in a directory named 
> /etc/console-setup/.cache and to put a file /etc/console-setup/.cache/README
> explaining the purpose of this directory and warning the admin that the 
> package is free to remove or overwrite at any time any files in this 
> directory.

> Please don't complain that this is a policy violation. :) I think at the 
> moment there is no solution of the problem without policy violation and 
> the packages kbd, console-tools and console-setup have been happily 
> doing policy violations regarding /etc since the very first version of 
> Debian.

My complaint is that this is excessively ugly.  For persistent variable data
that needs to be available during early boot, even when this is binary data
that the user won't edit, /etc is the normal place to keep it - it's the
creation of a a .cache subdirectory that I object to.

> The second solution I propose is to generate the files in a directory 
> /boot/console-setup.  After all the whole need of such directory arises 
> due to the specifics of the boot process.

> Personally, I think I prefer /boot to /etc.

Not useful for reasons already discussed.
> 
> Some additional info: most of the time the package requires only 
> read-only access to this directory.  Write-access is required only in 
> the following occasions:

> 1. when the admin is dpkg-reconfiguring the package
> 2. during the first reboot (but not too early in the boot process) if 
> the admin has edited the configuration files of console-setup by hand 
> and he has not used the command "setupcon --save"
> 3. when the admin uses the command "setupcon --save"

Yep, which makes this entirely consistent with storage on the rootfs,
including when the rootfs is read-only by default, and /etc the right place
to put the data.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek@ubuntu.com                                     vorlon@debian.org

Attachment: signature.asc
Description: Digital signature


Reply to: