Control: tags 954611 + patch
Control: tags 954611 + pending

Dear maintainer,

I've prepared an NMU for genwqe-user (versioned as 4.0.18-3.1) and
uploaded it to mentors for sponsoring. Please feel free to tell me if I
should remove it.

--
Regards
Sudip

diff -Nru genwqe-user-4.0.18/debian/changelog 
genwqe-user-4.0.18/debian/changelog
--- genwqe-user-4.0.18/debian/changelog 2017-03-09 14:44:34.000000000 +0000
+++ genwqe-user-4.0.18/debian/changelog 2020-04-10 14:38:27.000000000 +0100
@@ -1,3 +1,10 @@
+genwqe-user (4.0.18-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS. (Closes: #954611)
+
+ -- Sudip Mukherjee <sudipm.mukher...@gmail.com>  Fri, 10 Apr 2020 14:38:27 
+0100
+
 genwqe-user (4.0.18-3) unstable; urgency=medium
 
   * Change Architecture to linux-any.
diff -Nru genwqe-user-4.0.18/debian/patches/fix_gettid.patch 
genwqe-user-4.0.18/debian/patches/fix_gettid.patch
--- genwqe-user-4.0.18/debian/patches/fix_gettid.patch  1970-01-01 
01:00:00.000000000 +0100
+++ genwqe-user-4.0.18/debian/patches/fix_gettid.patch  2020-04-10 
14:38:27.000000000 +0100
@@ -0,0 +1,297 @@
+Description: Fix FTBFS
+ Latest glibc has defined gettid() and as a result there was a conflict.
+ Rename gettid() to sys_gettid() to use our own gettid instead of using
+ the gettid() from glibc.
+
+Author: Sudip Mukherjee <sudipm.mukher...@gmail.com>
+Bug-Debian: https://bugs.debian.org/954611
+
+---
+
+--- genwqe-user-4.0.18.orig/lib/card_defs.h
++++ genwqe-user-4.0.18/lib/card_defs.h
+@@ -32,19 +32,19 @@
+ #include <unistd.h>
+ #include <sys/syscall.h>   /* For SYS_xxx definitions */
+ 
+-static inline pid_t gettid(void)
++static inline pid_t sys_gettid(void)
+ {
+       return (pid_t)syscall(SYS_gettid);
+ }
+ 
+ #define pr_err(fmt, ...)                                              \
+       fprintf(stderr, "%08x.%08x %s:%u: Error: " fmt,                 \
+-              getpid(), gettid(), __FILE__, __LINE__, ## __VA_ARGS__)
++              getpid(), sys_gettid(), __FILE__, __LINE__, ## __VA_ARGS__)
+ 
+ #define pr_warn(fmt, ...) do {                                                
\
+               if (_dbg_flag)                                          \
+                       fprintf(stderr, "%08x.%08x %s:%u: Warn: " fmt,  \
+-                              getpid(), gettid(), __FILE__, __LINE__, \
++                              getpid(), sys_gettid(), __FILE__, __LINE__,     
\
+                               ## __VA_ARGS__);                        \
+       } while (0)
+ 
+@@ -56,7 +56,7 @@ static inline pid_t gettid(void)
+ #define       pr_info(fmt, ...) do {                                          
\
+               if (_dbg_flag)                                          \
+                       fprintf(stderr, "%08x.%08x %s:%u: Info: " fmt,  \
+-                              getpid(), gettid(), __FILE__, __LINE__, \
++                              getpid(), sys_gettid(), __FILE__, __LINE__,     
\
+                               ## __VA_ARGS__);                        \
+       } while (0)
+ 
+--- genwqe-user-4.0.18.orig/lib/ddcb_capi.c
++++ genwqe-user-4.0.18/lib/ddcb_capi.c
+@@ -61,7 +61,7 @@ extern FILE *libddcb_fd_out;
+ 
+ #include <sys/syscall.h>   /* For SYS_xxx definitions */
+ 
+-static inline pid_t gettid(void)
++static inline pid_t sys_gettid(void)
+ {
+       return (pid_t)syscall(SYS_gettid);
+ }
+@@ -69,25 +69,25 @@ static inline pid_t gettid(void)
+ #define VERBOSE0(fmt, ...) do {                                               
\
+               if (libddcb_fd_out)                                     \
+                       fprintf(libddcb_fd_out, "%08x.%08x: " fmt,      \
+-                              getpid(), gettid(), ## __VA_ARGS__);    \
++                              getpid(), sys_gettid(), ## __VA_ARGS__);        
\
+       } while (0)
+ 
+ #define VERBOSE1(fmt, ...) do {                                               
\
+               if (libddcb_fd_out && (libddcb_verbose > 0))            \
+                       fprintf(libddcb_fd_out, "%08x.%08x: " fmt,      \
+-                              getpid(), gettid(), ## __VA_ARGS__);    \
++                              getpid(), sys_gettid(), ## __VA_ARGS__);        
\
+       } while (0)
+ 
+ #define VERBOSE2(fmt, ...) do {                                               
\
+               if (libddcb_fd_out && (libddcb_verbose > 1))            \
+                       fprintf(libddcb_fd_out, "%08x.%08x: " fmt,      \
+-                              getpid(), gettid(), ## __VA_ARGS__);    \
++                              getpid(), sys_gettid(), ## __VA_ARGS__);        
\
+       } while (0)
+ 
+ #define VERBOSE3(fmt, ...) do {                                               
\
+               if (libddcb_fd_out && (libddcb_verbose > 3))            \
+                       fprintf(libddcb_fd_out, "%08x.%08x: " fmt,      \
+-                              getpid(), gettid(), ## __VA_ARGS__);    \
++                              getpid(), sys_gettid(), ## __VA_ARGS__);        
\
+       } while (0)
+ 
+ #define __free(ptr) free((ptr))
+--- genwqe-user-4.0.18.orig/lib/hw_defs.h
++++ genwqe-user-4.0.18/lib/hw_defs.h
+@@ -33,7 +33,7 @@
+ #  define ABS(a)       (((a) < 0) ? -(a) : (a))
+ #endif
+ 
+-static inline pid_t gettid(void)
++static inline pid_t sys_gettid(void)
+ {
+       return (pid_t)syscall(SYS_gettid);
+ }
+@@ -44,14 +44,14 @@ extern FILE *zedc_log;
+ #define pr_err(fmt, ...) do {                                         \
+               if (zedc_log)                                           \
+                       fprintf(zedc_log, "%08x.%08x %s:%u: Error: " fmt, \
+-                              getpid(), gettid(), __FILE__, __LINE__, \
++                              getpid(), sys_gettid(), __FILE__, __LINE__,     
\
+                               ## __VA_ARGS__);                        \
+       } while (0)
+ 
+ #define pr_warn(fmt, ...) do {                                                
\
+               if (zedc_log)                                           \
+                       fprintf(zedc_log, "%08x.%08x %s:%u: Warn: " fmt, \
+-                              getpid(), gettid(), __FILE__, __LINE__, \
++                              getpid(), sys_gettid(), __FILE__, __LINE__,     
\
+                               ## __VA_ARGS__);                        \
+       } while (0)
+ 
+@@ -63,14 +63,14 @@ extern FILE *zedc_log;
+ #define       pr_info(fmt, ...) do {                                          
\
+               if (zedc_log && zedc_dbg)                               \
+                       fprintf(zedc_log, "%08x.%08x %s:%u: Info: " fmt, \
+-                              getpid(), gettid(), __FILE__, __LINE__, \
++                              getpid(), sys_gettid(), __FILE__, __LINE__,     
\
+                               ## __VA_ARGS__);                        \
+       } while (0)
+ 
+ #define       pr_log(dbg, fmt, ...) do {                                      
\
+               if (zedc_log && (dbg))                                  \
+                       fprintf(zedc_log, "%08x.%08x %s:%u: Info: " fmt, \
+-                              getpid(), gettid(), __FILE__, __LINE__, \
++                              getpid(), sys_gettid(), __FILE__, __LINE__,     
\
+                               ## __VA_ARGS__);                        \
+       } while (0)
+ 
+--- genwqe-user-4.0.18.orig/misc/zpipe_append.c
++++ genwqe-user-4.0.18/misc/zpipe_append.c
+@@ -61,7 +61,7 @@ static unsigned int CHUNK_i = 16 * 1024;
+ static unsigned int CHUNK_o = 16 * 1024; /* 16384; */
+ static int _pattern = 0;
+ 
+-static inline pid_t gettid(void)
++static inline pid_t sys_gettid(void)
+ {
+       return (pid_t)syscall(SYS_gettid);
+ }
+--- genwqe-user-4.0.18.orig/misc/zpipe_mt.c
++++ genwqe-user-4.0.18/misc/zpipe_mt.c
+@@ -126,7 +126,7 @@ static int pin_to_cpu(int run_cpu)
+       return run_cpu;
+ }
+ 
+-static pid_t gettid(void)
++static pid_t sys_gettid(void)
+ {
+       return (pid_t)syscall(SYS_gettid);
+ }
+@@ -178,7 +178,7 @@ static int check_for_pattern(const unsig
+                               "it=%d: %d or more times \"%02x\" "
+                               "at %016lx!\n",
+                               (unsigned long)getpid(),
+-                              (unsigned long)gettid(),
++                              (unsigned long)sys_gettid(),
+                               (unsigned long)in,
+                               (unsigned long)out,
+                               it, zeros, pattern,
+@@ -253,11 +253,11 @@ static int def(struct thread_data *d, FI
+                       strm.next_out = out;
+                       memset(strm.next_out, 0xF0, chunk_o);
+                       if (chunk_o >= 8)
+-                              *((uint32_t *)&out[4]) = gettid();
++                              *((uint32_t *)&out[4]) = sys_gettid();
+ 
+                       pr_dbg(3, "%08lx.%08lx 1) %02x%02x%02x%02x%02x ...\n",
+                              (unsigned long)getpid(),
+-                             (unsigned long)gettid(),
++                             (unsigned long)sys_gettid(),
+                              out[0], out[1], out[2], out[3], out[4]);
+ 
+                       ret = deflate(&strm, flush);    /* no bad ret value */
+@@ -267,7 +267,7 @@ static int def(struct thread_data *d, FI
+ 
+                       pr_dbg(3, "%08lx.%08lx 2) %02x%02x%02x%02x%02x ...\n",
+                              (unsigned long)getpid(),
+-                             (unsigned long)gettid(),
++                             (unsigned long)sys_gettid(),
+                              out[0], out[1], out[2], out[3], out[4]);
+ 
+                       if (check_for_pattern(out, have, nr, in, out, 0x00) ||
+@@ -483,16 +483,16 @@ static void *libz_thread(void *data)
+       char i_fname[64], o_fname[64], n_fname[64];
+       char diff_cmd[128];
+ 
+-      d->tid = gettid();
++      d->tid = sys_gettid();
+       d->cpu = sched_getcpu();
+ 
+       for (i = 0; (i < (unsigned int)count) && (exit_on_err == 0); i++) {
+               unsigned int j;
+               int new_cpu;
+ 
+-              sprintf(i_fname, "i_%08x_%08x_%d.bin", getpid(), gettid(), i);
+-              sprintf(o_fname, "o_%08x_%08x_%d.bin", getpid(), gettid(), i);
+-              sprintf(n_fname, "n_%08x_%08x_%d.bin", getpid(), gettid(), i);
++              sprintf(i_fname, "i_%08x_%08x_%d.bin", getpid(), sys_gettid(), 
i);
++              sprintf(o_fname, "o_%08x_%08x_%d.bin", getpid(), sys_gettid(), 
i);
++              sprintf(n_fname, "n_%08x_%08x_%d.bin", getpid(), sys_gettid(), 
i);
+ 
+               i_fp = fopen(i_fname, "w+");
+               for (j = 0, len = 0; len < data_size; j++) {
+@@ -529,7 +529,7 @@ static void *libz_thread(void *data)
+                       exit(EXIT_FAILURE);
+ 
+               pr_dbg(3, "%08x.%08x %d. compressing ...\n",
+-                     getpid(), gettid(), i);
++                     getpid(), sys_gettid(), i);
+ 
+               rc = def(d, i_fp, o_fp, Z_DEFAULT_COMPRESSION, i);
+               if (rc != Z_OK) {
+@@ -544,7 +544,7 @@ static void *libz_thread(void *data)
+               new_cpu = sched_getcpu();
+               if (d->cpu != new_cpu) {
+                       pr_dbg(1, "%08x.%08x CPU moved from %d to %d\n",
+-                             getpid(), gettid(), d->cpu, new_cpu);
++                             getpid(), sys_gettid(), d->cpu, new_cpu);
+                       d->cpu = new_cpu;
+               }
+ 
+@@ -553,7 +553,7 @@ static void *libz_thread(void *data)
+               d->compressions++;
+ 
+               pr_dbg(3, "%08x.%08x %d. decompressing ...\n",
+-                     getpid(), gettid(), i);
++                     getpid(), sys_gettid(), i);
+ 
+               o_fp = fopen(o_fname, "r");   /* original data */
+               if (o_fp == NULL)
+@@ -568,7 +568,7 @@ static void *libz_thread(void *data)
+                       error_trigger();
+ 
+                       fprintf(stderr, "%08x.%08x err/inf: rc=%d %s %s %s\n",
+-                              getpid(), gettid(), rc,
++                              getpid(), sys_gettid(), rc,
+                               i_fname, o_fname, n_fname);
+                       zerr(rc);
+ 
+@@ -577,7 +577,7 @@ static void *libz_thread(void *data)
+                       rc = system(diff_cmd);
+                       if (rc != 0)
+                               fprintf(stderr, "%08x.%08x %s: %d\n",
+-                                      getpid(), gettid(),
++                                      getpid(), sys_gettid(),
+                                       strerror(errno), errno);
+ 
+                       goto exit_failure;
+@@ -600,7 +600,7 @@ static void *libz_thread(void *data)
+                       error_trigger();
+ 
+                       fprintf(stderr, "%08x.%08x In %s and Out %s differ!\n",
+-                              getpid(), gettid(), i_fname, n_fname);
++                              getpid(), sys_gettid(), i_fname, n_fname);
+                       goto exit_failure;
+               }
+ 
+--- genwqe-user-4.0.18.orig/tools/zlib_mt_perf.c
++++ genwqe-user-4.0.18/tools/zlib_mt_perf.c
+@@ -162,7 +162,7 @@ static int pin_to_cpu(int run_cpu)
+       return run_cpu;
+ }
+ 
+-static pid_t gettid(void)
++static pid_t sys_gettid(void)
+ {
+       return (pid_t)syscall(SYS_gettid);
+ }
+@@ -485,7 +485,7 @@ static void *libz_thread_defl(void *data
+       d->defl_total=0;
+       d->defl_time=0;
+       d->comp_calls=0;
+-      d->tid = gettid();
++      d->tid = sys_gettid();
+       d->cpu = sched_getcpu();
+       d->first_run = true;
+       d->checksum = 0;
+@@ -526,7 +526,7 @@ static void *libz_thread_infl(void *data
+       d->infl_total = 0;
+       d->infl_time = 0;
+       d->decomp_calls = 0;
+-      d->tid = gettid();
++      d->tid = sys_gettid();
+       d->cpu = sched_getcpu();
+       d->first_run = true;
+       d->checksum = 0;
+@@ -543,7 +543,7 @@ static void *libz_thread_infl(void *data
+               rc = infl(d, c_fp);
+               if (rc != Z_OK) {
+                       fprintf(stderr, "%08x.%08x err/inf: rc=%d %s\n",
+-                              getpid(), gettid(), rc, c_fname);
++                              getpid(), sys_gettid(), rc,     c_fname);
+                       zerr(rc);
+                       goto exit_failure;
+               }
diff -Nru genwqe-user-4.0.18/debian/patches/series 
genwqe-user-4.0.18/debian/patches/series
--- genwqe-user-4.0.18/debian/patches/series    2017-03-08 11:43:51.000000000 
+0000
+++ genwqe-user-4.0.18/debian/patches/series    2020-04-10 14:38:27.000000000 
+0100
@@ -8,3 +8,4 @@
 fix-libs-locations.patch
 0001-Adding-missing-license-header.patch
 0002-lib-software-Fix-return-types.patch
+fix_gettid.patch

Reply via email to