New lintian checks for X.Org 7 migration

2006-04-16 Thread Russ Allbery
I'd like to have lintian start helping with notifying packagers of the
X.Org 7 migration.  However, I don't want to make matters worse by putting
in a bad check.  If someone has a moment, could you look over the
following set of checks and ensure that they're accurate?

(I know more checks are probably needed; at the least, checks for the
versioned dependencies on debhelper and xutils-dev would be good.  But
this seems like a good starting point.)

The three check descriptions are:

Tag: package-installs-font-to-usr-x11r6
Type: error
Info: The standard location for X fonts has moved to /usr/share/fonts/X11.
 Packages providing X fonts must install them into the new path.  Fonts
 installed into the old /usr/X11R6/lib/X11/fonts path may not be seen by
 the X server.
 .
 If the package uses imake, it must build-depend on xutils-dev (=
 1:1.0.2-1) for the correct paths. If it uses dh_installxfonts to handle X
 font installation, it must build-depend on debhelper (= 5.0.29).

Tag: package-installs-file-to-usr-x11r6-bin
Type: error
Info: Debian has switched to the modular X tree which now uses the regular
 FHS paths, and all packages must follow. All packages installing binaries
 must install them into /usr/bin (or some other appropriate location)
 instead of /usr/X11R6/bin.
 .
 The x11-common package attempts to change /usr/X11R6/bin into a symlink
 to /usr/bin, so if this migration has already occurred, a package
 installing files into /usr/X11R6/bin may appear to install
 successfully. However, such a package will be left in an inconsistent
 state and may orphan files when the compatibility link goes away.
 .
 If the package uses imake, it must build-depend on xutils-dev (=
 1:1.0.2-1) for the correct paths.

Tag: package-installs-file-to-usr-x11r6
Type: error
Info: Packages using the X Window System should not be configured to install
 files under the /usr/X11R6/ directory. Debian has switched to the modular
 X tree which now uses regular FHS paths and all packages should follow.
 .
 Programs that use GNU autoconf and automake are usually easily configured
 at compile time to use /usr/ instead of /usr/X11R6/.  Packages that use
 imake must build-depend on xutils-dev (= 1:1.0.2-2) for the correct
 paths.

Here is the current working lintian patch:

Index: checks/files
===
--- checks/files(revision 616)
+++ checks/files(working copy)
@@ -235,11 +235,15 @@
}
 
#- /usr/X11R6/
+   elsif ($file =~ m,^usr/X11R6/bin,) {
+   tag package-installs-file-to-usr-x11r6-bin, $file;
+   }
+   elsif ($file =~ m,^usr/X11R6/lib/X11/fonts,) {
+   tag package-installs-font-to-usr-x11r6, $file;
+   }
elsif ($file =~ m,^usr/X11R6/, and
-  $file !~ m,^usr/X11R6/lib/X11/fonts, and #font packages are 
allowed
-  $perm !~ m,^l, and #links to FHS locations are encouraged
-  $source_pkg ne xfree86) { #The X Window System is allowed to 
do anything
-   tag packages-installs-file-to-usr-x11r6, $file;
+  $perm !~ m,^l,) { #links to FHS locations are allowed
+   tag package-installs-file-to-usr-x11r6, $file;
}
 
#  /usr/lib/sgml
Index: checks/files.desc
===
--- checks/files.desc   (revision 616)
+++ checks/files.desc   (working copy)
@@ -29,17 +29,43 @@
  /usr/bin/X11/, /usr/include/X11/ or /usr/lib/X11/.
 Ref: policy 11.8.7
 
-Tag: packages-installs-file-to-usr-x11r6
-Type: warning
+Tag: package-installs-font-to-usr-x11r6
+Type: error
+Info: The standard location for X fonts has moved to /usr/share/fonts/X11.
+ Packages providing X fonts must install them into the new path.  Fonts
+ installed into the old /usr/X11R6/lib/X11/fonts path may not be seen by
+ the X server.
+ .
+ If the package uses imake, it must build-depend on xutils-dev (=
+ 1:1.0.2-1) for the correct paths. If it uses dh_installxfonts to handle X
+ font installation, it must build-depend on debhelper (= 5.0.29).
+
+Tag: package-installs-file-to-usr-x11r6-bin
+Type: error
+Info: Debian has switched to the modular X tree which now uses the regular
+ FHS paths, and all packages must follow. All packages installing binaries
+ must install them into /usr/bin (or some other appropriate location)
+ instead of /usr/X11R6/bin.
+ .
+ The x11-common package attempts to change /usr/X11R6/bin into a symlink
+ to /usr/bin, so if this migration has already occurred, a package
+ installing files into /usr/X11R6/bin may appear to install
+ successfully. However, such a package will be left in an inconsistent
+ state and may orphan files when the compatibility link goes away.
+ .
+ If the package uses imake, it must build-depend on xutils-dev (=
+ 1:1.0.2-1) for the correct paths.
+
+Tag: package-installs-file-to-usr-x11r6
+Type: error
 Info: Packages using the X Window System should 

Re: New lintian checks for X.Org 7 migration

2006-04-16 Thread Russ Allbery
Russ Allbery [EMAIL PROTECTED] writes:

  If the package uses imake, it must build-depend on xutils-dev (=
  1:1.0.2-1) for the correct paths. If it uses dh_installxfonts to handle X
  font installation, it must build-depend on debhelper (= 5.0.29).

Ugh, sorry, all of those 1:1.0.2-1 mentions should be 1:1.0.2-2.  I cut
and pasted the wrong thing.  Fixed in my version.

-- 
Russ Allbery ([EMAIL PROTECTED])   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: New lintian checks for X.Org 7 migration

2006-04-16 Thread Daniel Stone
On Sun, Apr 16, 2006 at 11:53:10AM -0700, Russ Allbery wrote:
 I'd like to have lintian start helping with notifying packagers of the
 X.Org 7 migration.  However, I don't want to make matters worse by putting
 in a bad check.  If someone has a moment, could you look over the
 following set of checks and ensure that they're accurate?

Thanks for doing this!  I hadn't even thought about lintian.

 (I know more checks are probably needed; at the least, checks for the
 versioned dependencies on debhelper and xutils-dev would be good.  But
 this seems like a good starting point.)
 
 The three check descriptions are:
 
 Tag: package-installs-font-to-usr-x11r6
 Type: error
 Info: The standard location for X fonts has moved to /usr/share/fonts/X11.
  Packages providing X fonts must install them into the new path.  Fonts
  installed into the old /usr/X11R6/lib/X11/fonts path may not be seen by
  the X server.
  .
  If the package uses imake, it must build-depend on xutils-dev (=
  1:1.0.2-1) for the correct paths. If it uses dh_installxfonts to handle X
  font installation, it must build-depend on debhelper (= 5.0.29).
 
 Tag: package-installs-file-to-usr-x11r6-bin
 Type: error
 Info: Debian has switched to the modular X tree which now uses the regular
  FHS paths, and all packages must follow. All packages installing binaries
  must install them into /usr/bin (or some other appropriate location)
  instead of /usr/X11R6/bin.
  .
  The x11-common package attempts to change /usr/X11R6/bin into a symlink
  to /usr/bin, so if this migration has already occurred, a package
  installing files into /usr/X11R6/bin may appear to install
  successfully. However, such a package will be left in an inconsistent
  state and may orphan files when the compatibility link goes away.
  .
  If the package uses imake, it must build-depend on xutils-dev (=
  1:1.0.2-1) for the correct paths.

Doing this was broken anyway, unless it was part of the core X Window
System, which it wasn't.

The tests look fine to me; thanks again for taking this on.

Cheers,
Daniel


signature.asc
Description: Digital signature


Re: New lintian checks for X.Org 7 migration

2006-04-16 Thread Russ Allbery
Daniel Stone [EMAIL PROTECTED] writes:
 On Sun, Apr 16, 2006 at 11:53:10AM -0700, Russ Allbery wrote:

 Tag: package-installs-file-to-usr-x11r6-bin
 Type: error
 Info: Debian has switched to the modular X tree which now uses the regular
  FHS paths, and all packages must follow. All packages installing binaries
  must install them into /usr/bin (or some other appropriate location)
  instead of /usr/X11R6/bin.
  .
  The x11-common package attempts to change /usr/X11R6/bin into a symlink
  to /usr/bin, so if this migration has already occurred, a package
  installing files into /usr/X11R6/bin may appear to install
  successfully. However, such a package will be left in an inconsistent
  state and may orphan files when the compatibility link goes away.
  .
  If the package uses imake, it must build-depend on xutils-dev (=
  1:1.0.2-1) for the correct paths.

 Doing this was broken anyway, unless it was part of the core X Window
 System, which it wasn't.

It used to be a warning that said you were only supposed to do this if the
package used imake.  (Policy still says that's allowed; we'll have to get
policy changed once everything has settled down and then I can re-add the
policy references to the lintian tests.)

 The tests look fine to me; thanks again for taking this on.

Absolutely.  I'll get them committed.  We were about due for another
lintian release anyway.

-- 
Russ Allbery ([EMAIL PROTECTED])   http://www.eyrie.org/~eagle/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]