Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1134696 > unrolled thread

Bug#1029574: indent shebang bug and misses LFS support

Started byHelge Deller <deller@gmx.de>
First post2023-01-24 19:00 +0100
Last post2023-01-24 21:10 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1029574: indent shebang bug and misses LFS support Helge Deller <deller@gmx.de> - 2023-01-24 19:00 +0100
    Bug#1029574: indent shebang bug and misses LFS support Santiago Vila <sanvila@debian.org> - 2023-01-24 20:20 +0100
      Bug#1029574: indent shebang bug and misses LFS support Helge Deller <deller@gmx.de> - 2023-01-24 21:10 +0100

#1134696 — Bug#1029574: indent shebang bug and misses LFS support

FromHelge Deller <deller@gmx.de>
Date2023-01-24 19:00 +0100
SubjectBug#1029574: indent shebang bug and misses LFS support
Message-ID<FRvKp-RqI-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Package:  indent
Version: 2.2.12
Tags: hppa, patch, lfs, FTBFS

The indent package has a bug in the script "regression/TEST"
which starts with "#/bin/sh" instead of a correct
shebang which would be "#!/bin/sh". This leads to a FTBFS on
the hppa architecture when running virtualized in qemu-user.

Secondly it would be nice if the indent tool would be built
with large file support. Adding future=+lfs to DEB_BUILD_MAINT_OPTIONS
allows that.

Both are fixed with attached patch. Please apply for next upload.

Thanks,
Helge

[toc] | [next] | [standalone]


#1134702

FromSantiago Vila <sanvila@debian.org>
Date2023-01-24 20:20 +0100
Message-ID<FRwZP-SnZ-1@gated-at.bofh.it>
In reply to#1134696
El 24/1/23 a las 18:48, Helge Deller escribió:
> Package:  indent
> Version: 2.2.12
> Tags: hppa, patch, lfs, FTBFS
> 
> The indent package has a bug in the script "regression/TEST"
> which starts with "#/bin/sh" instead of a correct
> shebang which would be "#!/bin/sh". This leads to a FTBFS on
> the hppa architecture when running virtualized in qemu-user.
> 
> Secondly it would be nice if the indent tool would be built
> with large file support. Adding future=+lfs to DEB_BUILD_MAINT_OPTIONS
> allows that.
> 
> Both are fixed with attached patch. Please apply for next upload.

Thanks for the report and the patch.

I'm curious about the LFS issue: Is it really a good idea to have a .c
file larger than 2GB? I did a quick search and found this tweet:

https://twitter.com/cristalopes/status/776569616692752384

   The largest C++ file we found in GitHub has 528Mb, 57 lines of code.
   Contains the first 50,847,534 primes, all hard coded in an array.

So: What would be the rationale for adding LFS support to the indent program?
"Just in case"?


Another question: I see there are now several ways to enable LFS. In procmail
I had this in debian/rules:

CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $$(getconf LFS_CFLAGS)

Is that equivalent to using future=+lfs or are there any differences?

Thanks.

[toc] | [prev] | [next] | [standalone]


#1134706

FromHelge Deller <deller@gmx.de>
Date2023-01-24 21:10 +0100
Message-ID<FRxMd-SUC-1@gated-at.bofh.it>
In reply to#1134702
Hi Santiago,

On 1/24/23 20:07, Santiago Vila wrote:
> El 24/1/23 a las 18:48, Helge Deller escribió:
>> Package:  indent
>> Version: 2.2.12
>> Tags: hppa, patch, lfs, FTBFS
>>
>> The indent package has a bug in the script "regression/TEST"
>> which starts with "#/bin/sh" instead of a correct
>> shebang which would be "#!/bin/sh". This leads to a FTBFS on
>> the hppa architecture when running virtualized in qemu-user.
>>
>> Secondly it would be nice if the indent tool would be built
>> with large file support. Adding future=+lfs to DEB_BUILD_MAINT_OPTIONS
>> allows that.
>>
>> Both are fixed with attached patch. Please apply for next upload.
>
> Thanks for the report and the patch.
>
> I'm curious about the LFS issue: Is it really a good idea to have a .c
> file larger than 2GB? I did a quick search and found this tweet:

LFS is not just the 2GB limit (_LARGEFILE_SOURCE) when opening files.
I see in src/backup.c the readdir() glibc call is used, which
may fail randomly on big filesystems when built as 32bit binary.
See e.g: https://www.mjr19.org.uk/sw/inodes64.html
For that the define _FILE_OFFSET_BITS=64 is needed to work reliable.

> https://twitter.com/cristalopes/status/776569616692752384
>
>    The largest C++ file we found in GitHub has 528Mb, 57 lines of code.
>    Contains the first 50,847,534 primes, all hard coded in an array.
>
> So: What would be the rationale for adding LFS support to the indent program?
> "Just in case"?

_FILE_OFFSET_BITS=64, needed for readdir() call.

> Another question: I see there are now several ways to enable LFS. In procmail
> I had this in debian/rules:
>
> CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $$(getconf LFS_CFLAGS)
>
> Is that equivalent to using future=+lfs or are there any differences?

Yes, your above code should work:
(sid_hppa)deller@pacific:~/$    getconf LFS_CFLAGS
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

Those are the defines which are needed.

Btw, if you add the "_TIME_BITS=64" define too, your are even 64-bit ready...

Thanks!
Helge

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web