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

Bug#533287: debian-policy: please clarify 10.7.4



Hi,

In 2009, Colin Watson wrote:

> /etc/kernel-img.conf is a weird case. To start with, it's initially
> created by the installer (base-installer) and the update-grub line is
> added by another part of the installer (grub-installer). Obviously the
> installer can't own a configuration file permanently, so we say that the
> kernel owns it because it's the primary consumer (and indeed
> historically it was using it before the installer did anything with it).
> Its format is clearly documented in kernel-img.conf(5).
>
> Of course, though, the kernel is not a single package, but
[...]

Thanks.  In theory, the policy-compliant approach would have been to
provide a maintainer script or tool in the linux-base package to help
grub do the right thing.  I think policy is already clear about this.

Here is how I interpret the relevant requirements in §10.7.4:

 - among nonconflicting packages, one package must be designated as
   the configuration file's owner

 - other packages requiring the configuration file to be present
   must depend on the owning package

 - if it is desirable for a package other than the owner to modify
   a configuration file, the owning package should provide a program
   to help

 - if such a program is provided, other packages not conflicting with
   the owning package and aiming to modify the configuration file must
   use it and must declare appropriate dependencies

That last "if" seems like an odd and not too useful loophole.  It
would be nicer for policy to clearly state that packages *should not*
modify configuration files owned by other packages directly, whether a
tool for indirectly modifying is provided or not.  If such a tool
doesn't exist, that's a hint that it's time to help the package
maintainer to write one.

How about something like this patch?

diff --git a/policy.sgml b/policy.sgml
index 8c654d1..6c50774 100644
--- a/policy.sgml
+++ b/policy.sgml
@@ -8445,14 +8445,16 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq
 	  </p>
 
 	  <p>
+	    Packages should not directly modify configuration files
+	    owned by other packages.
 	    If it is desirable for two or more related packages to
 	    share a configuration file <em>and</em> for all of the
 	    related packages to be able to modify that configuration
-	    file, then the following should be done:
+	    file, then:
 	    <enumlist compact="compact">
 	      <item>
-		  One of the related packages (the "owning" package)
-		  will manage the configuration file with maintainer
+		  One of the related packages (the <em>owner</em>)
+		  manages the configuration file with maintainer
 		  scripts as described in the previous section.
 	      </item>
 	      <item>
@@ -8461,10 +8463,10 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq
 		  configuration file.
 	      </item>
 	      <item>
-		  The related packages must use the provided program
+		  The related packages should use the provided program
 		  to make any desired modifications to the
 		  configuration file.  They should either depend on
-		  the core package to guarantee that the configuration
+		  the owning package to guarantee that the configuration
 		  modifier program is available or accept gracefully
 		  that they cannot modify the configuration file if it
 		  is not.  (This is in addition to the fact that the


Reply to: