Debian Bug report logs - #587377
debian-policy: Decide on arbitrary file/path names limit

Package: debian-policy; Maintainer for debian-policy is Debian Policy List <debian-policy@lists.debian.org>; Source for debian-policy is src:debian-policy.

Reported by: "Aaron M. Ucko" <ucko@debian.org>

Date: Mon, 28 Jun 2010 01:06:02 UTC

Severity: wishlist

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, ucko@debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#587377; Package dpkg. (Mon, 28 Jun 2010 01:06:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Aaron M. Ucko" <ucko@debian.org>:
New Bug report received and forwarded. Copy sent to ucko@debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 28 Jun 2010 01:06:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "Aaron M. Ucko" <ucko@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dpkg: can't install packages with really long filenames
Date: Sun, 27 Jun 2010 21:03:28 -0400
Package: dpkg
Version: 1.15.7.2
Severity: important

dpkg won't let me install (upgrade to) the latest version of sbcl-doc:

Preparing to replace sbcl-doc 1:1.0.34.0-1.1 (using .../sbcl-doc_1%3a1.0.39.0-1_all.deb) ...
Unpacking replacement sbcl-doc ...
dpkg: error processing /var/cache/apt/archives/sbcl-doc_1%3a1.0.39.0-1_all.deb (--unpack):
 unable to clean up mess surrounding `./usr/share/doc/sbcl-doc/html/sbcl/Method-sb_002dbsd_002dsockets_003asocket_002dmake_002dstream-_0028_0028socket-socket_0029-_0026key-input-output-_0028element_002dtype-_0027character_0029-_0028buffering-full_0029-_0028external_002dformat-default_0029-tim' before installing another version: File name too long
dpkg-deb: subprocess paste killed by signal (Broken pipe)

I'll mark sbcl-doc as affected, but I'd argue that this is ultimately
a bug in dpkg for being unable to cope with such long filenames or
perhaps in dpkg-dev for allowing them into packages; one way or
another, there should not be skew, particularly in that direction.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg depends on:
ii  coreutils         8.5-1                  GNU core utilities
ii  libbz2-1.0        1.0.5-4                high-quality block-sorting file co
ii  libc6             2.11.1-3               Embedded GNU C Library: Shared lib
ii  libselinux1       2.0.94-1               SELinux runtime shared libraries
ii  xz-utils          4.999.9beta+20100527-1 XZ-format compression utilities
ii  zlib1g            1:1.2.3.4.dfsg-3       compression library - runtime

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt                           0.7.25.3   Advanced front-end for dpkg

-- no debconf information




Added indication that 587377 affects sbcl-doc Request was from "Aaron M. Ucko" <ucko@debian.org> to control@bugs.debian.org. (Mon, 28 Jun 2010 01:09:02 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#587377; Package dpkg. (Wed, 26 Jan 2011 03:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 26 Jan 2011 03:21:03 GMT) Full text and rfc822 format available.

Message #12 received at 587377@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: "Aaron M. Ucko" <ucko@debian.org>, 587377@bugs.debian.org
Subject: Re: Bug#587377: debian-policy: Decide on arbitrary file/path names limit
Date: Wed, 26 Jan 2011 04:17:48 +0100
reassign 587377 debian-policy
retitle 587377 debian-policy: Decide on arbitrary file/path names limit
severity 587377 wishlist
thanks

Hi!

On Sun, 2010-06-27 at 21:03:28 -0400, Aaron M. Ucko wrote:
> Package: dpkg
> Version: 1.15.7.2
> Severity: important
> 
> dpkg won't let me install (upgrade to) the latest version of sbcl-doc:
> 
> Preparing to replace sbcl-doc 1:1.0.34.0-1.1 (using .../sbcl-doc_1%3a1.0.39.0-1_all.deb) ...
> Unpacking replacement sbcl-doc ...
> dpkg: error processing /var/cache/apt/archives/sbcl-doc_1%3a1.0.39.0-1_all.deb (--unpack):
>  unable to clean up mess surrounding `./usr/share/doc/sbcl-doc/html/sbcl/Method-sb_002dbsd_002dsockets_003asocket_002dmake_002dstream-_0028_0028socket-socket_0029-_0026key-input-output-_0028element_002dtype-_0027character_0029-_0028buffering-full_0029-_0028external_002dformat-default_0029-tim' before installing another version: File name too long
> dpkg-deb: subprocess paste killed by signal (Broken pipe)

(This error is from dpkg trying to cleanup in case a previous run was
interrupted half-way, which was not the case here, but rename(2)
validates first the arugments so it returns with ENAMETOOLONG instead
of the usual ENOENT or ENOTDIR.)

> I'll mark sbcl-doc as affected, but I'd argue that this is ultimately
> a bug in dpkg for being unable to cope with such long filenames or
> perhaps in dpkg-dev for allowing them into packages; one way or
> another, there should not be skew, particularly in that direction.

This is not really a dpkg bug, the limitation is not actually coming
from it, it's coming from the kernel and/or specific file system
implementation. I don't consider it appropriate to add an arbitrary
limit in dpkg itself, when it can handle long file/path names just
fine.

Given that this might cause problems depending on the different support
from the build and host machines this should be considered a matter of
policy, and as such “enforced” by lintian or ftp-master for example, if
at all. I'm thus reassigning it to debian-policy, so that an arbitrary
limit can be decided if desired.

thanks,
guillem




Bug reassigned from package 'dpkg' to 'debian-policy'. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Wed, 26 Jan 2011 03:21:06 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions dpkg/1.15.7.2. Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Wed, 26 Jan 2011 03:21:07 GMT) Full text and rfc822 format available.

Changed Bug title to 'debian-policy: Decide on arbitrary file/path names limit' from 'dpkg: can't install packages with really long filenames' Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Wed, 26 Jan 2011 03:21:07 GMT) Full text and rfc822 format available.

Severity set to 'wishlist' from 'important' Request was from Guillem Jover <guillem@debian.org> to control@bugs.debian.org. (Wed, 26 Jan 2011 03:21:08 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Wed, 02 Mar 2011 05:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Wed, 02 Mar 2011 05:30:03 GMT) Full text and rfc822 format available.

Message #25 received at 587377@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Guillem Jover <guillem@debian.org>
Cc: "Aaron M. Ucko" <ucko@debian.org>, 587377@bugs.debian.org
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Tue, 1 Mar 2011 23:27:38 -0600
user debian-policy@packages.debian.org
usertags 587377 + normative issue
quit

Guillem Jover wrote:

> This is not really a dpkg bug, the limitation is not actually coming
> from it, it's coming from the kernel and/or specific file system
> implementation. I don't consider it appropriate to add an arbitrary
> limit in dpkg itself, when it can handle long file/path names just
> fine.
>
> Given that this might cause problems depending on the different support
> from the build and host machines this should be considered a matter of
> policy, and as such “enforced” by lintian or ftp-master for example, if
> at all. I'm thus reassigning it to debian-policy, so that an arbitrary
> limit can be decided if desired.

This is a hard one.  I agree that dpkg shouldn't enforce this (though
perhaps it could recover better).

 * _POSIX_PATH_MAX is 256.  _POSIX_NAME_MAX is 14 (yikes).
 * _XOPEN_PATH_MAX is 1024.  _XOPEN_NAME_MAX is 255.
 * Linux PATH_MAX is 4096.
 * NTFS's maximum path length is 32768.
 * naive file access in Windows has a maximum path length of 260.
 * the maximum path length on this laptop[1] is 170:

	[...]/src/gcc/[...]/ \
	MBeanServerPermission$ \
	MBeanServerPermissionCollection$ \
	MBeanServerPermissionEnumeration.class

To throw out a strawman, I suppose 256 characters should be a reasonable
maximum for paths in Debian packages.

I'd be happier with data from the lintian lab to support that.  Any
takers?

Thanks.
Jonathan

[1]
	find / |
	awk '
		BEGIN {
			maxstr = "";
			maxlength = 0
		}
		length($0) > maxlength {
			maxlength = length($0);
			maxstr = $0;
			print maxlength;
			print maxstr;
		}
	'




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Wed, 02 Mar 2011 15:30:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to ucko@debian.org (Aaron M. Ucko):
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Wed, 02 Mar 2011 15:30:08 GMT) Full text and rfc822 format available.

Message #30 received at 587377@bugs.debian.org (full text, mbox):

From: ucko@debian.org (Aaron M. Ucko)
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Guillem Jover <guillem@debian.org>, "Aaron M. Ucko" <ucko@debian.org>, 587377@bugs.debian.org
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Wed, 02 Mar 2011 10:28:51 -0500
Jonathan Nieder <jrnieder@gmail.com> writes:

> This is a hard one.  I agree that dpkg shouldn't enforce this (though
> perhaps it could recover better).

That's fair.

> To throw out a strawman, I suppose 256 characters should be a reasonable
> maximum for paths in Debian packages.

Running a variant of your script (modified to consult $1 rather than $0
and account for leading slashes) against uncompressed amd64 Contents
files gives a maximum length of 211 characters at present for testing
and unstable, corresponding to

/usr/share/eclipse/dropins/rse/eclipse/plugins/org.eclipse.rse.core.source_3.1.1.201006121442-7a7CEw7sReRSjesfJIs/src/org.eclipse.rse.subsystems.files.core_3.1.1.201006121442/.settings/org.eclipse.jdt.core.prefs

so it looks like a limit of 256 should indeed be ample.

Thanks for taking the time to revisit this issue, BTW.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?amu@monk.mit.edu




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Wed, 02 Mar 2011 17:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Wed, 02 Mar 2011 17:51:03 GMT) Full text and rfc822 format available.

Message #35 received at 587377@bugs.debian.org (full text, mbox):

From: Sean Finney <seanius@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>, 587377@bugs.debian.org
Cc: Guillem Jover <guillem@debian.org>, "Aaron M. Ucko" <ucko@debian.org>
Subject: Re: Bug#587377: debian-policy: Decide on arbitrary file/path names limit
Date: Wed, 02 Mar 2011 18:48:37 +0100
[Message part 1 (text/plain, inline)]
Hi,

I don't think policy really has much place establishing an arbitrary
file limit either, though.

Having a warning in lintian for arbitrarily long (perhaps >= 256)
filenames is totally reasonable i'd say, but there's no reason to
otherwise throw out limits for the sake of having them.  It should be
pointed out that even if we had such a limit in policy, it would still
be possible for a policy-compliant package to FTBFS on a buildd because
there will inevitably be intermediate paths >= this size... so don't
know what it would gain anyone.


	sean
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Wed, 02 Mar 2011 19:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Wed, 02 Mar 2011 19:15:03 GMT) Full text and rfc822 format available.

Message #40 received at 587377@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Sean Finney <seanius@debian.org>
Cc: 587377@bugs.debian.org, Guillem Jover <guillem@debian.org>, "Aaron M. Ucko" <ucko@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Wed, 2 Mar 2011 13:11:22 -0600
Sean Finney wrote:

> Having a warning in lintian for arbitrarily long (perhaps >= 256)
> filenames is totally reasonable i'd say, but there's no reason to
> otherwise throw out limits for the sake of having them.

Oh, I don't know.

Now that I check, the path provoking this was 269 characters
(including leading '.').  I'm able to install the package, both on
tmpfs and ext4, without trouble.  I suppose it would be interesting to
know: what was the environment like in which it failed to rename(2)?
E.g., what filesystem?

The ustar format only supports 256 character path names; but dpkg also
supports data.tar.gz using the GNU format, which supports longer.

Now I'm starting to worry that it might have been the length of the
filename rather than the pathname that triggered Bug#587440.  But the
filename was only 234 characters, which should certainly be safe, even
on filesystems like ubifs.  Ideas?

Puzzled,
Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Wed, 02 Mar 2011 19:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Wed, 02 Mar 2011 19:39:03 GMT) Full text and rfc822 format available.

Message #45 received at 587377@bugs.debian.org (full text, mbox):

From: Sean Finney <seanius@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>, 587377@bugs.debian.org
Cc: Guillem Jover <guillem@debian.org>, "Aaron M. Ucko" <ucko@debian.org>
Subject: Re: Bug#587377: debian-policy: Decide on arbitrary file/path names limit
Date: Wed, 02 Mar 2011 20:36:16 +0100
[Message part 1 (text/plain, inline)]
hi jonathan,

On Wed, 2011-03-02 at 13:11 -0600, Jonathan Nieder wrote:
> Now that I check, the path provoking this was 269 characters
> (including leading '.').  I'm able to install the package, both on
> tmpfs and ext4, without trouble.  I suppose it would be interesting to
> know: what was the environment like in which it failed to rename(2)?
> E.g., what filesystem?
> 
> The ustar format only supports 256 character path names; but dpkg also
> supports data.tar.gz using the GNU format, which supports longer.
> 
> Now I'm starting to worry that it might have been the length of the
> filename rather than the pathname that triggered Bug#587440.  But the
> filename was only 234 characters, which should certainly be safe, even
> on filesystems like ubifs.  Ideas?

Back when I was doing the conffile stuff I recall seeing hardcoded 256
character limits within dpkg in the archive handling stuff.


	sean
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Wed, 02 Mar 2011 19:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Wed, 02 Mar 2011 19:45:03 GMT) Full text and rfc822 format available.

Message #50 received at 587377@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Sean Finney <seanius@debian.org>
Cc: 587377@bugs.debian.org, Guillem Jover <guillem@debian.org>, "Aaron M. Ucko" <ucko@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Wed, 2 Mar 2011 13:41:22 -0600
Sean Finney wrote:

> Back when I was doing the conffile stuff I recall seeing hardcoded 256
> character limits within dpkg in the archive handling stuff.

"path_quote_filename(buf, fname, 256)" and %.255s get used to display
filenames to the user, but I think anything lower level having that
limit would be a bug.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Wed, 02 Mar 2011 19:51:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to ucko@debian.org (Aaron M. Ucko):
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Wed, 02 Mar 2011 19:51:03 GMT) Full text and rfc822 format available.

Message #55 received at 587377@bugs.debian.org (full text, mbox):

From: ucko@debian.org (Aaron M. Ucko)
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Sean Finney <seanius@debian.org>, 587377@bugs.debian.org, Guillem Jover <guillem@debian.org>, "Aaron M. Ucko" <ucko@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Wed, 02 Mar 2011 14:47:22 -0500
Jonathan Nieder <jrnieder@gmail.com> writes:

> E.g., what filesystem?

As I recall, I was running reiser3 at the time.

> Now I'm starting to worry that it might have been the length of the
> filename rather than the pathname that triggered Bug#587440.  But the
> filename was only 234 characters, which should certainly be safe, even
> on filesystems like ubifs.  Ideas?

Quite likely, in retrospect; path-name limits are filesystem-independent
and relatively large, and 234 does in fact exceed reiser3's limit of 226
(per http://en.wikipedia.org/wiki/Comparison_of_filesystems).  It might
also be appropriate to worry about files whose names exceed the ISO 9660
180- or 207-character limit; the longest current filename appears to be
debian_2kwwidgets-examples_2usr_2share_2doc_2kwwidgets-examples_2examples_2Cxx_2FileBrowserDialog_2vtkKWMyFileBrowserDialog_8h_source.html
(in usr/share/doc/kwwidgets-doc/html), 138 characters long, so such a
limit should pose little trouble in practice.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?amu@monk.mit.edu




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Wed, 02 Mar 2011 21:09:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to ucko@debian.org (Aaron M. Ucko):
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Wed, 02 Mar 2011 21:09:06 GMT) Full text and rfc822 format available.

Message #60 received at 587377@bugs.debian.org (full text, mbox):

From: ucko@debian.org (Aaron M. Ucko)
To: ucko@debian.org (Aaron M. Ucko)
Cc: Jonathan Nieder <jrnieder@gmail.com>, Sean Finney <seanius@debian.org>, 587377@bugs.debian.org, Guillem Jover <guillem@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Wed, 02 Mar 2011 16:06:29 -0500
ucko@debian.org (Aaron M. Ucko) writes:

> (in usr/share/doc/kwwidgets-doc/html), 138 characters long, so such a

That's a pathological example per #552346; disregarding kwwidgets-doc
gets the current limit down to 133, which 14 packages hit in unstable.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?amu@monk.mit.edu




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Thu, 03 Mar 2011 04:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Thu, 03 Mar 2011 04:21:03 GMT) Full text and rfc822 format available.

Message #65 received at 587377@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: "Aaron M. Ucko" <ucko@debian.org>
Cc: Sean Finney <seanius@debian.org>, 587377@bugs.debian.org, Guillem Jover <guillem@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Wed, 2 Mar 2011 22:17:32 -0600
Aaron M. Ucko wrote:

> As I recall, I was running reiser3 at the time.

Thanks.  To summarize:

A lintian-clean Debian package failed to unpack with ENAMETOOLONG.
Setting maximum lengths for paths and filenames in data.tar.gz
in policy could prevent future mistakes of this kind, without making
dpkg itself any less flexible.

Packages currently are not using paths of more than 255 characters.
kFreeBSD uses a PATH_MAX of 1024 (and Linux 4096), so this seems safe,
even with the possibility of .dpkg-dist suffixes and
/var/complicated/path/to/chroot prefixes.  Making it a hard limit
would allow dpkg-managed files to be archived using non-GNU tar and
similarly limited tools.  Not so interesting.

Packages currently are not using filenames of more than 150 characters.
This is cutting it close for unpacking on ISO9660 cd-roms (~180 chars
max).  Is that use case worth worrying about?  The only other
filesystem of concern is ReiserFS 3, which does not support filenames
of longer than 226 characters.  A maximum of 175 or 200 characters
would leave 16 chars for ".dpkg-divert.tmp" and a little extra grace
area, hopefully addressing all practical problems.

Another question: is Debian policy the right place to make a decisions
like this?  Ideally these maxima would be set using some cross-distro
standard like POSIX or the FHS.  Sadly:

 - the FHS has nothing to say about lengths;
 - POSIX only allows 14 characters, which is not enough;
 - XSI allows 255 characters, which is appealing but more than
   ReiserFS 3 can handle.

If I had to make a proposal, I'd suggest maxima of

 _XOPEN_PATH_MAX / 2 (= 512) for paths, to leave room for chroots
 _XOPEN_NAME_MAX - 16 (= 239) for filenames, to leave room for
 .dpkg-divert.tmp.  Forget ReiserFS 3. :)

I imagine others may have better ideas.

Hope that helps,
Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Thu, 03 Mar 2011 16:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Julien Cristau <jcristau@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Thu, 03 Mar 2011 16:15:03 GMT) Full text and rfc822 format available.

Message #70 received at 587377@bugs.debian.org (full text, mbox):

From: Julien Cristau <jcristau@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>, 587377@bugs.debian.org
Cc: "Aaron M. Ucko" <ucko@debian.org>, Sean Finney <seanius@debian.org>, Guillem Jover <guillem@debian.org>
Subject: Re: Bug#587377: debian-policy: Decide on arbitrary file/path names limit
Date: Thu, 3 Mar 2011 17:11:14 +0100
On Wed, Mar  2, 2011 at 22:17:32 -0600, Jonathan Nieder wrote:

> If I had to make a proposal, I'd suggest maxima of
> 
>  _XOPEN_PATH_MAX / 2 (= 512) for paths, to leave room for chroots
>  _XOPEN_NAME_MAX - 16 (= 239) for filenames, to leave room for
>  .dpkg-divert.tmp.  Forget ReiserFS 3. :)
> 
> I imagine others may have better ideas.
> 
Your proposal sounds sane to me, fwiw.

Cheers,
Julien




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Thu, 03 Mar 2011 21:39:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Thu, 03 Mar 2011 21:39:06 GMT) Full text and rfc822 format available.

Message #75 received at 587377@bugs.debian.org (full text, mbox):

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Jonathan Nieder <jrnieder@gmail.com>, 587377@bugs.debian.org
Cc: "Aaron M. Ucko" <ucko@debian.org>, Sean Finney <seanius@debian.org>, Guillem Jover <guillem@debian.org>
Subject: Re: Bug#587377: debian-policy: Decide on arbitrary file/path names limit
Date: Thu, 3 Mar 2011 22:37:27 +0100
On Wed, Mar 02, 2011 at 10:17:32PM -0600, Jonathan Nieder wrote:
> Aaron M. Ucko wrote:
> 
> > As I recall, I was running reiser3 at the time.
> 
> Thanks.  To summarize:
> 
> A lintian-clean Debian package failed to unpack with ENAMETOOLONG.
> Setting maximum lengths for paths and filenames in data.tar.gz
> in policy could prevent future mistakes of this kind, without making
> dpkg itself any less flexible.
> 
> Packages currently are not using paths of more than 255 characters.
> kFreeBSD uses a PATH_MAX of 1024 (and Linux 4096), so this seems safe,
> even with the possibility of .dpkg-dist suffixes and
> /var/complicated/path/to/chroot prefixes.  Making it a hard limit
> would allow dpkg-managed files to be archived using non-GNU tar and
> similarly limited tools.  Not so interesting.
> 
> Packages currently are not using filenames of more than 150 characters.
> This is cutting it close for unpacking on ISO9660 cd-roms (~180 chars
> max).  Is that use case worth worrying about?  The only other
> filesystem of concern is ReiserFS 3, which does not support filenames
> of longer than 226 characters.  A maximum of 175 or 200 characters
> would leave 16 chars for ".dpkg-divert.tmp" and a little extra grace
> area, hopefully addressing all practical problems.
> 
> Another question: is Debian policy the right place to make a decisions
> like this?  Ideally these maxima would be set using some cross-distro
> standard like POSIX or the FHS.  Sadly:

I do not think it is the purpose of Debian policy to limit file name and path 
length without providing guidance.

Most of the time, files path are not chosen by the packager, but are functionnal
elements imposed by external considerations (compatibility with upstream,
compliance with the FHS/Debian policy, required by an external interface, etc.).
For example, an interface can store a data structure as a directory hierarchy.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Thu, 03 Mar 2011 22:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Thu, 03 Mar 2011 22:00:03 GMT) Full text and rfc822 format available.

Message #80 received at 587377@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
Cc: 587377@bugs.debian.org, "Aaron M. Ucko" <ucko@debian.org>, Sean Finney <seanius@debian.org>, Guillem Jover <guillem@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Thu, 3 Mar 2011 15:58:59 -0600
Bill Allombert wrote:
> On Wed, Mar 02, 2011 at 10:17:32PM -0600, Jonathan Nieder wrote:

>> Another question: is Debian policy the right place to make a decisions
>> like this?  Ideally these maxima would be set using some cross-distro
>> standard like POSIX or the FHS.  Sadly:
>
> I do not think it is the purpose of Debian policy to limit file name and path 
> length without providing guidance.

Could you expand on that?  What sort of guidance could policy provide?

I admit that I have much less interest in this now that I understand
current packages are not butting against the practical limits.  But I
do think that an easily checkable "packages should not have absurdly
filenames" (in their files list; I do not mean to say anything about
files generated at runtime) could be helpful in communicating

 * what filesystems are usable for installing Debian?
 * how many characters of grace area can tools like dpkg-divert feel
   free to use?
 * when is enough enough and the current pathname scheme actually a
   bug that is going to prevent people from being able to install
   the package?

> Most of the time, files path are not chosen by the packager

This makes concrete, practically motivated advice about limits more
useful, no?

Hoping that is clearer,
Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Thu, 03 Mar 2011 22:27:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Thu, 03 Mar 2011 22:27:06 GMT) Full text and rfc822 format available.

Message #85 received at 587377@bugs.debian.org (full text, mbox):

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 587377@bugs.debian.org, "Aaron M. Ucko" <ucko@debian.org>, Sean Finney <seanius@debian.org>, Guillem Jover <guillem@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Thu, 3 Mar 2011 23:23:37 +0100
On Thu, Mar 03, 2011 at 03:58:59PM -0600, Jonathan Nieder wrote:
> Bill Allombert wrote:
> > On Wed, Mar 02, 2011 at 10:17:32PM -0600, Jonathan Nieder wrote:
> 
> >> Another question: is Debian policy the right place to make a decisions
> >> like this?  Ideally these maxima would be set using some cross-distro
> >> standard like POSIX or the FHS.  Sadly:
> >
> > I do not think it is the purpose of Debian policy to limit file name and path 
> > length without providing guidance.
> 
> Could you expand on that?  What sort of guidance could policy provide?

Guidance about how to fix a package that run afoul of the limit.

> I admit that I have much less interest in this now that I understand
> current packages are not butting against the practical limits.  But I
> do think that an easily checkable "packages should not have absurdly
> filenames" (in their files list; I do not mean to say anything about
> files generated at runtime) could be helpful in communicating
> 
>  * what filesystems are usable for installing Debian?
>  * how many characters of grace area can tools like dpkg-divert feel
>    free to use?
>  * when is enough enough and the current pathname scheme actually a
>    bug that is going to prevent people from being able to install
>    the package?
> 
> > Most of the time, files path are not chosen by the packager
> 
> This makes concrete, practically motivated advice about limits more
> useful, no?

Not really;  the packager might not be able to change the filename without breaking either 
FHS compliance, the interface or compatibility with upstream.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Thu, 03 Mar 2011 22:39:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Thu, 03 Mar 2011 22:39:06 GMT) Full text and rfc822 format available.

Message #90 received at 587377@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
Cc: 587377@bugs.debian.org, "Aaron M. Ucko" <ucko@debian.org>, Sean Finney <seanius@debian.org>, Guillem Jover <guillem@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Thu, 3 Mar 2011 16:35:09 -0600
Bill Allombert wrote:

> Not really;  the packager might not be able to change the filename without breaking either 
> FHS compliance, the interface or compatibility with upstream.

Ah, now I think I understand a bit better.

FHS compliance sounds like a red herring to me.  Does the FHS mandate
anything close to filenames of 239 characters or paths of 512
characters?

Re compatibility with upstream, to the extent that it is not an
interface: it's worth mentioning that as a cost to imposing
requirements, but I do not think it is a good excuse to accept buggy
software.  If we wanted to maintain perfect compatibility with
upstream (and upstream were not cooperative for some reason), many
parts of policy would not apply.  For example, sloppy programs
launching an editor would tend to use vi and not respect $EDITOR.

Now preserving interfaces _does_ seem like an objection that's more
important.  A policy "should" like this (potential) one represents a
bug but it is not necessarily more important than the other bug of
breaking compatibility.  Breaking interfaces can be difficult and it
takes time.  But if that's what it takes to make your path usable
with dpkg-divert (which is what the filename limit is about), that
_definitely_ seems worth it to me; and if that's what it takes to
make your package unpackable on kFreeBSD with a long leading prefix
that also seems worth it.

Perhaps the 512 seems gratuitously low?  How about

 _XOPEN_PATH_MAX - 100 = 924	- for paths
 _XOPEN_NAME_MAX - 16 = 239	- for filenames

?

Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Thu, 03 Mar 2011 22:54:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Finney <seanius@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Thu, 03 Mar 2011 22:54:03 GMT) Full text and rfc822 format available.

Message #95 received at 587377@bugs.debian.org (full text, mbox):

From: Sean Finney <seanius@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>, 587377@bugs.debian.org, "Aaron M. Ucko" <ucko@debian.org>, Guillem Jover <guillem@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Thu, 03 Mar 2011 23:51:37 +0100
[Message part 1 (text/plain, inline)]
Hi Jonathan,

On Thu, 2011-03-03 at 15:58 -0600, Jonathan Nieder wrote:
>  * how many characters of grace area can tools like dpkg-divert feel
>    free to use?

I don't think tools should be like "whoa, i think this filename is going
to be too long" for some arbitrary value, nor should they be like "hey,
this filename is under the policy defined limit, so there's nothing to
worry about".  Instead, they should try to do what they want to do just
like they normally would, check for errors like they're already doing,
and handle themselves as gracefully as possible and give informative
information based on errno when stuff doesn't work as expected.

>  * when is enough enough and the current pathname scheme actually a
>    bug that is going to prevent people from being able to install
>    the package?

If the package fails to install, I think we already have processes in
place for that.  The user would report it and probably give it a serious
severity.  If they were debootstrapping onto a fat16 filesystem (or
something else deigned to be not worth supporting) the release time
might step in and say that it's not RC, and otherwise the package will
have to be fixed anyway.

And anyway can't know what those limits are going to be in all
situations.  When building the binary package, you have the filename
plus the length of the build directory and temporary destdir directory
(i.e. /tmp/buildd/<sourcepackage>/debian/<binarypackage>/<path>).  Throw
some chroots while you're at it and... :)

Like I said before, I think having lintian warnings for concrete
known/potential issues (like this package won't unpack on a CDROM,
ReiserFS, etc) would be good (really good even), but I don't see where
the gain is in having arbirary policy-defined limits in packaging.  What
is the benefit of all this?

The only benefit I could think of would be if instead of defining the
maximum limit, we defined/referenced a minimum guaranteed limit that
"debian installation compatible" filesystems must support.  This might
then provide a bit of guidance in the situation where install failures
occurred on some arbitrary filesystem/package/path combination.


	Sean
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Thu, 03 Mar 2011 23:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Thu, 03 Mar 2011 23:06:03 GMT) Full text and rfc822 format available.

Message #100 received at 587377@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Sean Finney <seanius@debian.org>
Cc: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>, 587377@bugs.debian.org, "Aaron M. Ucko" <ucko@debian.org>, Guillem Jover <guillem@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Thu, 3 Mar 2011 17:04:10 -0600
tags 587377 + wontfix
quit

Sean Finney wrote:
> On Thu, 2011-03-03 at 15:58 -0600, Jonathan Nieder wrote:

>>  * how many characters of grace area can tools like dpkg-divert feel
>>    free to use?
>
> I don't think tools should be like "whoa, i think this filename is going
> to be too long" for some arbitrary value, nor should they be like "hey,
> this filename is under the policy defined limit, so there's nothing to
> worry about".  Instead, they should try to do what they want to do just
> like they normally would, check for errors like they're already doing,
> and handle themselves as gracefully as possible and give informative
> information based on errno when stuff doesn't work as expected.

Yes, sorry, that was unclear of me.  What I meant is that dpkg could
avoid adding suffixes of more than 16 characters to filenames in the
future (and probably should).

> Like I said before, I think having lintian warnings for concrete
> known/potential issues (like this package won't unpack on a CDROM,
> ReiserFS, etc) would be good (really good even), but I don't see where
> the gain is in having arbirary policy-defined limits in packaging.  What
> is the benefit of all this?
>
> The only benefit I could think of would be if instead of defining the
> maximum limit, we defined/referenced a minimum guaranteed limit that
> "debian installation compatible" filesystems must support.  This might
> then provide a bit of guidance in the situation where install failures
> occurred on some arbitrary filesystem/package/path combination.

Right.  The general view seems to be roughly that this belongs in the
realm of unofficial policy / best practices / case law, so I'm going
to go ahead and tag this bug rejected.  However, I'll leave it open as
usual for policy bugs, in case someone wants to argue for it.

Secretly I hope that some kind, lintian-knowledgeable person might
glean some advice from it for new checks.

Thanks for your help.




Added tag(s) wontfix. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Thu, 03 Mar 2011 23:06:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Thu, 03 Mar 2011 23:12:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Thu, 03 Mar 2011 23:12:03 GMT) Full text and rfc822 format available.

Message #107 received at 587377@bugs.debian.org (full text, mbox):

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 587377@bugs.debian.org, "Aaron M. Ucko" <ucko@debian.org>, Sean Finney <seanius@debian.org>, Guillem Jover <guillem@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Fri, 4 Mar 2011 00:09:34 +0100
On Thu, Mar 03, 2011 at 04:35:09PM -0600, Jonathan Nieder wrote:
> Bill Allombert wrote:
> 
> > Not really;  the packager might not be able to change the filename without breaking either 
> > FHS compliance, the interface or compatibility with upstream.
> 
> Ah, now I think I understand a bit better.
> 
> FHS compliance sounds like a red herring to me.  Does the FHS mandate
> anything close to filenames of 239 characters or paths of 512
> characters?

To give an example: Debian policy mandates that the file 
/usr/share/doc/<package>/changelog.Debian.gz 
exists.
Now perl subpolicy mandate that the perl module Foo::Bar::Baz::Qux::Quux::Quuux::Quuuux 
whic live in /usr/share/perl5/Foo/Bar/Baz/Qux/Quux/Quuux/Quuuux
be packaged as
libfoo-bar-baz-qux-quux-quuux-quuuux-perl,
which leads to the file
/usr/share/doc/libfoo-bar-baz-qux-quux-quuux-quuuux-perl/changelog.Debian.gz

> Re compatibility with upstream, to the extent that it is not an
> interface: it's worth mentioning that as a cost to imposing
> requirements, but I do not think it is a good excuse to accept buggy
> software.  If we wanted to maintain perfect compatibility with
> upstream (and upstream were not cooperative for some reason), many
> parts of policy would not apply.  For example, sloppy programs
> launching an editor would tend to use vi and not respect $EDITOR.
> 
> Now preserving interfaces _does_ seem like an objection that's more
> important.  A policy "should" like this (potential) one represents a
> bug but it is not necessarily more important than the other bug of
> breaking compatibility.  Breaking interfaces can be difficult and it
> takes time.  But if that's what it takes to make your path usable
> with dpkg-divert (which is what the filename limit is about), that
> _definitely_ seems worth it to me; and if that's what it takes to
> make your package unpackable on kFreeBSD with a long leading prefix
> that also seems worth it.
> 
> Perhaps the 512 seems gratuitously low?  How about
> 
>  _XOPEN_PATH_MAX - 100 = 924	- for paths
>  _XOPEN_NAME_MAX - 16 = 239	- for filenames

I am not objecting to a limit being set. What I am objecting to is for policy to forbid
something without providing guidance on how to deal with the issue.

If you look at the section about software version, policy provides guidance how to deal
with software without upstream version or non-increasing upstream version, it does not 
just state that this is forbidden, etc.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Thu, 03 Mar 2011 23:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Thu, 03 Mar 2011 23:21:03 GMT) Full text and rfc822 format available.

Message #112 received at 587377@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
Cc: 587377@bugs.debian.org, "Aaron M. Ucko" <ucko@debian.org>, Sean Finney <seanius@debian.org>, Guillem Jover <guillem@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Thu, 3 Mar 2011 17:18:40 -0600
Bill Allombert wrote:

> To give an example: Debian policy mandates that the file 
> /usr/share/doc/<package>/changelog.Debian.gz 
> exists.
> Now perl subpolicy mandate that the perl module Foo::Bar::Baz::Qux::Quux::Quuux::Quuuux 
> whic live in /usr/share/perl5/Foo/Bar/Baz/Qux/Quux/Quuux/Quuuux
> be packaged as
> libfoo-bar-baz-qux-quux-quuux-quuuux-perl,
> which leads to the file
> /usr/share/doc/libfoo-bar-baz-qux-quux-quuux-quuuux-perl/changelog.Debian.gz

I see.  (Though I suspect that a perl module with more than, say,
80 characters in its name is pushing the boundaries of good taste
already.  It's hard to get to 239.)

> I am not objecting to a limit being set. What I am objecting to is for policy to forbid
> something without providing guidance on how to deal with the issue.
>
> If you look at the section about software version, policy provides guidance how to deal
> with software without upstream version or non-increasing upstream version, it does not 
> just state that this is forbidden, etc.

Thanks for clarifying.  I misunderstood before and I agree now.

What _would_ be good advice in this case?  For long filenames, one
option is to build hierarchically named subdirectories.  I confess
that it's straining my imagination to come up with situations in which
names approaching the limits would come up in practice that are not
simply bugs.

Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Fri, 04 Mar 2011 20:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Henrique de Moraes Holschuh <hmh@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Fri, 04 Mar 2011 20:09:03 GMT) Full text and rfc822 format available.

Message #117 received at 587377@bugs.debian.org (full text, mbox):

From: Henrique de Moraes Holschuh <hmh@debian.org>
To: Sean Finney <seanius@debian.org>, 587377@bugs.debian.org
Cc: Jonathan Nieder <jrnieder@gmail.com>, Guillem Jover <guillem@debian.org>, "Aaron M. Ucko" <ucko@debian.org>
Subject: Re: Bug#587377: debian-policy: Decide on arbitrary file/path names limit
Date: Fri, 4 Mar 2011 17:04:47 -0300
On Wed, 02 Mar 2011, Sean Finney wrote:
> Having a warning in lintian for arbitrarily long (perhaps >= 256)
> filenames is totally reasonable i'd say, but there's no reason to

Most (all?) filesystems commonly used in Debian systems will limit you to
somewhere close to 254 characters per filename (paths can be longer).

Do not get paths and filenames confused.  Filenames go in the inode and
their lenght is limited by the filesystem.  Path length is limited by the
applications, libc, and (maybe) the kernel.

PATH_MAX is 4096, go anywhere close to that, and a LOT of applications will
give you real grief.

Policy should at least mention this.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh




Removed tag(s) wontfix. Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Fri, 04 Mar 2011 21:39:08 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Policy List <debian-policy@lists.debian.org>:
Bug#587377; Package debian-policy. (Sat, 05 Mar 2011 10:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
Extra info received and forwarded to list. Copy sent to Debian Policy List <debian-policy@lists.debian.org>. (Sat, 05 Mar 2011 10:45:03 GMT) Full text and rfc822 format available.

Message #124 received at 587377@bugs.debian.org (full text, mbox):

From: Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 587377@bugs.debian.org, "Aaron M. Ucko" <ucko@debian.org>, Sean Finney <seanius@debian.org>, Guillem Jover <guillem@debian.org>
Subject: Re: debian-policy: Decide on arbitrary file/path names limit
Date: Sat, 5 Mar 2011 11:42:48 +0100
On Thu, Mar 03, 2011 at 04:35:09PM -0600, Jonathan Nieder wrote:
> Bill Allombert wrote:
> 
> Now preserving interfaces _does_ seem like an objection that's more
> important.  A policy "should" like this (potential) one represents a
> bug but it is not necessarily more important than the other bug of
> breaking compatibility.  Breaking interfaces can be difficult and it
> takes time.  But if that's what it takes to make your path usable
> with dpkg-divert (which is what the filename limit is about), that
> _definitely_ seems worth it to me; and if that's what it takes to
> make your package unpackable on kFreeBSD with a long leading prefix
> that also seems worth it.

FWIW, I do not see any technical reason preventing dpkg-divert to be fixed
not to overstep the limit (by mangling the filename).

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 22:22:56 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.