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

Bug#792167: lintian: Clarify and improve LFS tag description



Source: lintian
Source-Version: 2.5.33
Severity: wishlist
Tags: patch

Hi!

The problem with LFS is actually worse than it seemed. because even
programs that might not need or usually have to read and handle large
files, might still fail, if they have to operate on files with large
metadata values, like inode numbers for example. A simple stat(2) on
a file might fail on a filesystem with large inode numbers, even if
the file is otherwise not large.

Here's a patch trying to clarify the above (but I'm not sure if I've
been too subtle?), and adding a mention to getconf for build systems
that do not use autoconf.

Thanks,
Guillem
From b3b82ea5d983080397476ddc52b7ad2441bd1a3f Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Sun, 12 Jul 2015 13:14:30 +0200
Subject: [PATCH] c/binaries: Improve LFS tag description

Clarify that this does not only affect large files, but also large
metadata in general, like large inode numbers. And mention that the
getconf program can be used to retrieve system specific flags to
enable LFS.
---
 checks/binaries.desc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/checks/binaries.desc b/checks/binaries.desc
index 33d07c2..db99863 100644
--- a/checks/binaries.desc
+++ b/checks/binaries.desc
@@ -385,14 +385,16 @@ Certainty: possible
 Experimental: yes
 Info: The listed ELF binary appears to be (partially) built without
  "Large File Support" (LFS).  If so, it may not be able to handle large
- files correctly.
+ files or files with large metadata values (ex: inode numbers) correctly.
  .
  To support large files, code review might be needed to make sure that
  those files are not slurped into memory or mmap(2)ed, and that correct
  64-bit data types are used (ex: off_t instead of ssize_t), etc.  Once
  that has been done ensure <tt>_FILE_OFFSET_BITS</tt> is defined and
  set to 64 before the relevant files are included.  This can be done by
- using the <tt>AC_SYS_LARGEFILE</tt> macro with autoconf.
+ using the <tt>AC_SYS_LARGEFILE</tt> macro with autoconf, or by appending
+ the output of <tt>getconf LFS_CFLAGS</tt> and <tt>getconf LFS_LDFLAGS</tt>
+ to <tt>CFLAGS</tt> and <tt>LDFLAGS</tt> respectively.
  .
  Take into account that even if this tag is not emitted, that does not
  mean the binary is LFS-safe (ie. no OOM conditions, file truncation
-- 
2.4.3.573.g4eafbef


Reply to: