Your message dated Thu, 7 Mar 2024 04:33:00 +0100
with message-id <zek1bikvq8mdn...@thunder.hadrons.org>
and subject line Re: Bug#1028320: Enable lfs (large file support) by default on 
hppa
has caused the Debian Bug report #1028320,
regarding Enable lfs (large file support) by default on hppa
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1028320: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028320
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: dpkg
Severity: important
Tags: lfs, hppa
Version: 1.21.17
Tags: hppa, patch, ftbfs

This is a follow-up for #1020335 regarding "enabling LFS by default on hppa 
arch".

It's unfeasable to try to fix every package which fails on
hppa due to missing large file support. The problem is, that failures happen
undeterministic and silently at runtime which makes it often really hard to
find the real cause and in summary wastes a lot of developer time.

The attached patch is trivial and enables LFS by default for the hppa arch only.
Guillem, would you mind applying the attached patch?

Testing:

$ dpkg-buildflags --get CPPFLAGS
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2

$ DEB_BUILD_MAINT_OPTIONS="future=+lfs" dpkg-buildflags --get CPPFLAGS
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2

$ DEB_BUILD_MAINT_OPTIONS="future=-lfs" dpkg-buildflags --get CPPFLAGS
-Wdate-time -D_FORTIFY_SOURCE=2

That way, we *just* need to mark those packages which shouldn't be built with 
LFS with:
DEB_BUILD_MAINT_OPTIONS="future=-lfs"
This is much easier to handle than the other way around.
I expect the number of packages which need this flag disabled is minimal.

Thanks,
Helge
diff -up ./scripts/Dpkg/Vendor/Debian.pm.org ./scripts/Dpkg/Vendor/Debian.pm
--- ./scripts/Dpkg/Vendor/Debian.pm.org	2022-12-21 11:07:11.032960709 +0000
+++ ./scripts/Dpkg/Vendor/Debian.pm	2022-12-21 13:47:24.308936916 +0000
@@ -96,6 +96,16 @@ sub run_hook {
 sub _add_build_flags {
     my ($self, $flags) = @_;
 
+    require Dpkg::Arch;
+
+    my $arch = Dpkg::Arch::get_host_arch();
+    my ($abi, $libc, $os, $cpu) = Dpkg::Arch::debarch_to_debtuple($arch);
+
+    unless (defined $abi and defined $libc and defined $os and defined $cpu) {
+        warning(g_("unknown host architecture '%s'"), $arch);
+        ($abi, $os, $cpu) = ('', '', '');
+    }
+
     # Default feature states.
     my %use_feature = (
         future => {
@@ -138,6 +148,11 @@ sub _add_build_flags {
         },
     );
 
+    # enable LFS for hppa by default, disable with "future=-lfs"
+    if ($cpu =~ /^(?:hppa)$/) {
+	$use_feature{future}{lfs} = 1;
+    }
+
     ## Setup
 
     require Dpkg::BuildOptions;
@@ -151,16 +166,6 @@ sub _add_build_flags {
         $opts_maint->parse_features($area, $use_feature{$area});
     }
 
-    require Dpkg::Arch;
-
-    my $arch = Dpkg::Arch::get_host_arch();
-    my ($abi, $libc, $os, $cpu) = Dpkg::Arch::debarch_to_debtuple($arch);
-
-    unless (defined $abi and defined $libc and defined $os and defined $cpu) {
-        warning(g_("unknown host architecture '%s'"), $arch);
-        ($abi, $os, $cpu) = ('', '', '');
-    }
-
     ## Global defaults
 
     my @compile_flags = qw(

--- End Message ---
--- Begin Message ---
Version: 1.22.5

Hi!

On Wed, 2023-01-25 at 16:52:03 +0100, Helge Deller wrote:
> On 1/24/23 11:55, Guillem Jover wrote:
> > On Mon, 2023-01-09 at 15:20:41 +0100, Helge Deller wrote:
> > > Package: dpkg
> > > Severity: important
> > > Tags: lfs, hppa
> > > Version: 1.21.17
> > > Tags: hppa, patch, ftbfs

> > Given the above, I think I'd like have more information on the table,
> > and I'm not sure how urgent you see this change, but I think right now
> > during the freeze is probably not the right time to entertain?
> 
> It's urgent, because I see packages failing to build from source on
> the buildds. Often it's just that they run testcases after building
> and then fail to find their sources, test scenarios, ....
> So, after the freeze....
> 
> > I think some of the information I might like to see, might perhaps be
> > a tall ask, but I think it would be very useful for hppa and for other
> > ports as well. And in the end I think given that this would also
> > probably end up having a global impact on maintainers, it might be
> > worth bringing it up on debian-devel, once there's a more clear
> > picture?
> > 
> > Does the above seem reasonable?
> 
> Sure. The change has to happen anyway (btw, for 64-bit time_t too, but
> it's probably more invasive), and I think it would be good to have
> multiple arches change it at the same time...

In the end you got this change now via the time64 transition, where
the lfs default change piggybacks on it. :)

  ,---
  $ DEB_HOST_ARCH=hppa dpkg-buildflags --query-features abi
  Feature: lfs
  Enabled: yes
  Builtin: no

  Feature: time64
  Enabled: yes
  Builtin: no
  `---

Thus, this is now fixed. Closing.

Thanks,
Guillem

--- End Message ---

Reply via email to