This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=520f58c74cd21160bb359e7b7ba61a78f2ad8e82

commit 520f58c74cd21160bb359e7b7ba61a78f2ad8e82
Author: Guillem Jover <[email protected]>
AuthorDate: Wed May 24 22:09:49 2023 +0200

    Dpkg::Vendor::Debian: Move time64 buildflags feature from future to abi
    
    Add this new feature area that describes the feature in a more correct
    and clear way, as flags that affect the userland ABI. And removes the
    confusion that might happen once these get enabled by default, as is
    being discussed in Debian.
    
    Suggested-by: Steve Langasek <[email protected]>
---
 man/dpkg-buildflags.pod       |  9 ++++++++-
 scripts/Dpkg/Vendor/Debian.pm | 14 ++++++++++----
 scripts/t/Dpkg_BuildFlags.t   |  2 ++
 3 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/man/dpkg-buildflags.pod b/man/dpkg-buildflags.pod
index 153e8b209..83f6719e7 100644
--- a/man/dpkg-buildflags.pod
+++ b/man/dpkg-buildflags.pod
@@ -349,12 +349,19 @@ Large File Support on 32-bit architectures where their 
ABI does
 not include LFS by default, by adding
 B<-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64> to B<CPPFLAGS>.
 
+=head2 abi
+
+Several compile-time options (detailed below) can be used to enable features
+that can change the ABI of a package, but cannot be enabled by default due to
+backwards compatibility reasons unless coordinated or checked individually.
+
 =item B<time64>
 
 This setting (since dpkg 1.22.0; disabled by default) enables 64-bit time_t
 support on 32-bit architectures where their ABI does not include it by
 default, by adding B<-D_TIME_BITS=64> to B<CPPFLAGS>.
-This setting automatically enables the B<lfs> feature as it requires it.
+This setting automatically enables the B<lfs> feature in the B<future> area
+as it requires it.
 
 =back
 
diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm
index 2acda6b81..ec4ae2f73 100644
--- a/scripts/Dpkg/Vendor/Debian.pm
+++ b/scripts/Dpkg/Vendor/Debian.pm
@@ -107,6 +107,8 @@ sub set_build_features {
     my %use_feature = (
         future => {
             lfs => 0,
+        },
+        abi => {
             time64 => 0,
         },
         qa => {
@@ -176,9 +178,9 @@ sub set_build_features {
         ($abi_bits, $abi_endian) = (0, 'unknown');
     }
 
-    ## Area: future
+    ## Area: abi
 
-    if ($use_feature{future}{time64}) {
+    if ($use_feature{abi}{time64}) {
         # On glibc, new ports default to time64, old ports currently default
         # to time32, so we track the latter as that is a list that is not
         # going to grow further, and might shrink.
@@ -215,13 +217,15 @@ sub set_build_features {
         if ($abi_bits != 32 or
             not exists $time32_arch{$arch} or
             $libc eq 'musl') {
-            $use_feature{future}{time64} = 0;
+            $use_feature{abi}{time64} = 0;
         } elsif ($libc eq 'gnu') {
             # On glibc 64-bit time_t support requires LFS.
             $use_feature{future}{lfs} = 1;
         }
     }
 
+    ## Area: future
+
     if ($use_feature{future}{lfs}) {
         if ($abi_bits != 32) {
             $use_feature{future}{lfs} = 0;
@@ -395,7 +399,9 @@ sub _add_build_flags {
                        '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64');
     }
 
-    if ($flags->use_feature('future', 'time64')) {
+    ## Area: abi
+
+    if ($flags->use_feature('abi', 'time64')) {
         $flags->append('CPPFLAGS', '-D_TIME_BITS=64');
     }
 
diff --git a/scripts/t/Dpkg_BuildFlags.t b/scripts/t/Dpkg_BuildFlags.t
index 850fe28b8..6ccdfe7fb 100644
--- a/scripts/t/Dpkg_BuildFlags.t
+++ b/scripts/t/Dpkg_BuildFlags.t
@@ -87,6 +87,8 @@ ok($bf->is_maintainer_modified('DPKGFLAGS'), 'prepend marked 
flag as maint modif
 my %known_features = (
     future => [ qw(
         lfs
+    ) ],
+    abi => [ qw(
         time64
     ) ],
     hardening => [ qw(

-- 
Dpkg.Org's dpkg

Reply via email to