control: tag -1 + pending

Dear maintainer,

On 2024-06-19 23:07, Aurelien Jarno wrote:
> Source: gopacket
> Version: 1.1.19-6
> Severity: important
> Tags: patch ftbfs
> User: debian-gl...@lists.debian.org
> Usertags: glibc2.39
> Control: affects -1 bettercap
> 
> Dear maintainer,
> 
> gopacket fail to build from source when built against glibc 2.39:
> 
> | src/github.com/google/gopacket/pcap/pcap_unix.go:349:18: could not 
> determine kind of name for C.gopacket_time_secs_t
> 
> Packages depending on golang-github-google-gopacket-dev are also
> affected.
> 
> It appears that the issue has been introduced in version 1.1.19-5 by
> 0002-fix-time-type-with-__USE_TIME_BITS64.patch. It uses __time64_t when
> __USE_TIME_BITS64 is defined, but __time64_t is an internal type which
> must never used by user code. Among other things it is not defined in
> when it equals __time_t. glibc 2.39 changed the cases where
> __USE_TIME_BITS64 is defined.
> 
> The easiest way to fix that is to just drop the glibc specific part and
> use the generic definition, which relies on correct definition of time_t
> and suseconds_t, and avoid logic duplication between gopacket and glibc.
> The following patch does that and could be used as a replacement for 
> 0002-fix-time-type-with-__USE_TIME_BITS64.patch:
> 

I have just uploaded a NMU to delayed/2 using the above strategy. Please
feel free to ask me to delay or cancel it. You will find the
corresponding debdiff attached.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                     http://aurel32.net
diff -Nru gopacket-1.1.19/debian/changelog gopacket-1.1.19/debian/changelog
--- gopacket-1.1.19/debian/changelog    2024-03-28 09:51:11.000000000 +0100
+++ gopacket-1.1.19/debian/changelog    2024-07-16 22:14:26.000000000 +0200
@@ -1,3 +1,11 @@
+gopacket (1.1.19-6.1) unstable; urgency=medium
+
+  * Non maintainer upload.
+  * Fix time type with __USE_TIME_BITS64 in a way that is compatible with
+    glibc 2.39.
+
+ -- Aurelien Jarno <aure...@debian.org>  Tue, 16 Jul 2024 20:14:26 +0000
+
 gopacket (1.1.19-6) unstable; urgency=medium
 
   * Fix missing endif
diff -Nru 
gopacket-1.1.19/debian/patches/0002-fix-time-type-with-__USE_TIME_BITS64.patch 
gopacket-1.1.19/debian/patches/0002-fix-time-type-with-__USE_TIME_BITS64.patch
--- 
gopacket-1.1.19/debian/patches/0002-fix-time-type-with-__USE_TIME_BITS64.patch  
    2024-03-28 09:51:11.000000000 +0100
+++ 
gopacket-1.1.19/debian/patches/0002-fix-time-type-with-__USE_TIME_BITS64.patch  
    2024-07-16 22:14:26.000000000 +0200
@@ -1,26 +1,20 @@
-From: Shengjing Zhu <z...@debian.org>
-Date: Thu, 28 Mar 2024 16:28:53 +0800
+From: Aurelien Jarno <aure...@debian.org>
+Date: Tue, 16 Jul 2024 19:28:53 +0200
 Subject: fix time type with __USE_TIME_BITS64
 
 ---
- pcap/pcap_unix.go | 5 +++++
- 1 file changed, 5 insertions(+)
+ pcap/pcap_unix.go.orig |    3 ---
+ 1 file changed, 3 deletions(-)
 
-diff --git a/pcap/pcap_unix.go b/pcap/pcap_unix.go
-index d1a9cdc..4f0c92b 100644
 --- a/pcap/pcap_unix.go
-+++ b/pcap/pcap_unix.go
-@@ -112,8 +112,13 @@ int pcap_tstamp_type_name_to_val(const char* t) {
++++ b/pcap/pcap_unix.go.orig
+@@ -111,9 +111,6 @@ int pcap_tstamp_type_name_to_val(const char* t) {
+ #elif __ANDROID__
  #define gopacket_time_secs_t __kernel_time_t
  #define gopacket_time_usecs_t __kernel_suseconds_t
- #elif __GLIBC__
-+#ifndef __USE_TIME_BITS64
- #define gopacket_time_secs_t __time_t
- #define gopacket_time_usecs_t __suseconds_t
-+#else
-+#define gopacket_time_secs_t __time64_t
-+#define gopacket_time_usecs_t __suseconds64_t
-+#endif
+-#elif __GLIBC__
+-#define gopacket_time_secs_t __time_t
+-#define gopacket_time_usecs_t __suseconds_t
  #else  // Some form of linux/bsd/etc...
  #include <sys/param.h>
  #ifdef __OpenBSD__

Reply via email to