Bug#1058643: dnsdist: re-enable 32-bit support via _TIME_BITS=64

2023-12-21 Thread Matija Nalis
On Sun, Dec 17, 2023 at 11:54:56PM +0100, Chris Hofstaedtler wrote:
> On Thu, Dec 14, 2023 at 12:06:59AM +, Matija Nalis wrote:
> > export DEB_CXXFLAGS_APPEND="-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64"
> > (and skipping dependency on architecture-is-64-bit, of course).
> 
> My understanding is, doing this on an individual package level, is
> not safe in any way. It might work when the stars align correctly,
> but there are zero guarantees for anything.

I agree, there would be issues in cases where 64-bit time_t is passed
to library which was not compiled for 64-bit time_t. But as link
below notes, that actually seems to happen not all that often. (and I
have not seen it in my - admittedly somewhat basic - use of dnsdist)

> I think we'll wait at the very least until Debian finishes the t64
> transition, and then we'll see what to do about 32bit archs.

Yes, when transition happens (with tentative timeline of Jan 2024?),
re-enabling 32-bit archs for dnsdist should "just work". 

More details (and suggestions for package maintainers how to prepare)
are available at:

https://wiki.debian.org/ReleaseGoals/64bit-time

> In the meantime, dnsdist works on arm64, also on Raspberrys!

It does, if one happens to have newer Rasperry Pi hardware (i.e.
Cortex-A53+, not older Rpi1 & Rpi2 which are 32-bit only), and 64-bit
distro (many are still 32-bit based by default for plug-in compatibility
with older hardware and resource conservation, and people are somewhat
understandably reluctant to reinstalling and reconfiguring their
whole systems just to install one package)

I did talk to people at #dnsdist IRC, and they referenced 
https://github.com/PowerDNS/pdns/pull/10933

If I understood correctly, it should just work when whole system is
recompiled for 64-bit, but there were talks about improving tests suite 
so it can validated if 64bit dnsdist + 32libs would work fine too.
(But it is, as always, the matter of priorities and available time...)

-- 
Opinions above are GNU-copylefted.



Bug#1058643: dnsdist: re-enable 32-bit support via _TIME_BITS=64

2023-12-17 Thread Chris Hofstaedtler
On Thu, Dec 14, 2023 at 12:06:59AM +, Matija Nalis wrote:
> So, all that is needed for dnsdist on 32-bit platform (like my Rasperry Pi
> armhf, where I tested that solution, and it compiles and runs just fine, 
> both versions 1.7.3-2 and 1.8.2-3) is:
> 
> export DEB_CXXFLAGS_APPEND="-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64"
> (and skipping dependency on architecture-is-64-bit, of course).

My understanding is, doing this on an individual package level, is
not safe in any way. It might work when the stars align correctly,
but there are zero guarantees for anything.

I think we'll wait at the very least until Debian finishes the t64
transition, and then we'll see what to do about 32bit archs.

In the meantime, dnsdist works on arm64, also on Raspberrys!

Chris



Bug#1058643: dnsdist: re-enable 32-bit support via _TIME_BITS=64

2023-12-13 Thread Matija Nalis
Package: dnsdist
Version: 1.8.2-3
Severity: wishlist
X-Debbugs-Cc: mnalis-debian...@voyager.hr

Dear Maintainer,

dnsdist has been available until Bullseye in Debian on 32-bit arhitectures, 
when support was removed and package was modified to depend on 
"architecture-is-64-bit".

That seems to be prompted by this upstream change (quoting from
https://blog.powerdns.com/2021/05/11/dnsdist-1-6-0-released):

"We would also like to take this opportunity to announce that we will stop
supporting systems using 32-bit time.  This includes 32-bit Linux platforms
like arm and i386 before kernel version 5.1."

and confirmed in Debian changelog
https://sources.debian.org/src/dnsdist/1.8.2-3/debian/changelog/#L97 
"* Note: upstream dropped support for archs with 32bit time_t values in 1.6.0."

And indeed, trying to compile Debian package on 32-bit armhf Debian Bookworm, 
it fails in configure step due to 32-bit time_t.

However, Debian Bookworm (and newer) include new glibc and kernel > 5.1
which allow for 64-bit time_t on 32-bit system like armhf, as documented
here:

https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html#index-_005fTIME_005fBITS

So, all that is needed for dnsdist on 32-bit platform (like my Rasperry Pi
armhf, where I tested that solution, and it compiles and runs just fine, 
both versions 1.7.3-2 and 1.8.2-3) is:

export DEB_CXXFLAGS_APPEND="-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64"
(and skipping dependency on architecture-is-64-bit, of course).

So, can we fix the build on 32-bit architectures that support 64-bit time_t? 
I'd love to see dnsdist back on armhf in Trixie!

Thank you for your consideration.