• Bug#1037136: dpkg-buildflags: 64-bit time_t by default (2/2)

    From Steve Langasek@1:229/2 to All on Tue Jun 6 06:30:01 2023
    [continued from previous message]

    my $arch = Dpkg::Arch::get_host_arch();
    @@ -176,6 +171,15 @@ sub set_build_features {
    ($abi, $os, $cpu) = ('', '', '');
    }

    + if ($arch eq 'i386') {
    + $use_feature{feature}{time64} = 0;
    + }
    +
    + foreach my $area (sort keys %use_feature) {
    + $opts_build->parse_features($area, $use_feature{$area});
    + $opts_maint->parse_features($area, $use_feature{$area});
    + }
    +
    # compatibility: map future=[+-]lfs,time64 onto 'feature'
    if ((my $flag = $use_feature{future}{lfs}) != -1) {
    $use_feature{feature}{lfs} = $flag;
    --
    2.40.1


    --XYYxCDx0wYlNPLnW
    Content-Type: text/x-diff; charset=us-ascii
    Content-Disposition: attachment;
    filename="0003-Also-emit-Werror-implicit-function-declaration-for-f.patch"
    Content-Transfer-Encoding: quoted-printable

    From 7eff8f89b32b6921a0d86c50c6c62154c6ddc96e Mon Sep 17 00:00:00 2001
    From: Steve Langasek <[email protected]>
    Date: Fri, 2 Jun 2023 16:30:19 +0000
    Subject: [PATCH 3/3] Also emit -Werror=implicit-function-declaration for
    feature=+time64

    Per https://lists.debian.org/debian-devel/2023/05/msg00262.html et al.,
    missing glibc includes can cause packages to link to the wrong symbols, potentially causing crashes or misbehavior. Since functions that use
    time_t are fairly ubiquitous, there's a high risk of this happening for
    *some* package in Debian. Better to make all software with missing
    function declarations fail to build now, than to spend all cycle tracking
    down runtime bugs.
    ---
    scripts/Dpkg/Vendor/Debian.pm | 2 ++
    1 file changed, 2 insertions(+)