Bug#871466: stretch-pu: package wrk/4.0.2-2~deb9u1

2017-08-12 Thread Adam D. Barratt
Control: tags -1 + pending

On Tue, 2017-08-08 at 12:22 -0400, Adam D. Barratt wrote:
> Control: tags -1 + confirmed
> 
> On Tue, 2017-08-08 at 11:02 +0300, Christos Trochalakis wrote:
> > wrk in stable is not functional due to #855118 [0], I'd like to
> > upload wrk_4.0.2-2~deb9u1 fixing the bug above, plus an FTBFS on mips
> > architectures.
> > 
> > [0] http://bugs.debian.org/855118
> > [1] http://bugs.debian.org/801881
> 
> I've argued with myself a bit as to whether the FTBFS fix is appropriate
> for a stable update, but please go ahead.

Uploaded and flagged for acceptance.

Regards,

Adam



Processed: Re: Bug#871466: stretch-pu: package wrk/4.0.2-2~deb9u1

2017-08-12 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + pending
Bug #871466 [release.debian.org] stretch-pu: package wrk/4.0.2-2~deb9u1
Added tag(s) pending.

-- 
871466: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871466
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Processed: Re: Bug#871466: stretch-pu: package wrk/4.0.2-2~deb9u1

2017-08-08 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + confirmed
Bug #871466 [release.debian.org] stretch-pu: package wrk/4.0.2-2~deb9u1
Added tag(s) confirmed.

-- 
871466: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871466
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#871466: stretch-pu: package wrk/4.0.2-2~deb9u1

2017-08-08 Thread Adam D. Barratt
Control: tags -1 + confirmed

On Tue, 2017-08-08 at 11:02 +0300, Christos Trochalakis wrote:
> wrk in stable is not functional due to #855118 [0], I'd like to
> upload wrk_4.0.2-2~deb9u1 fixing the bug above, plus an FTBFS on mips
> architectures.
> 
> [0] http://bugs.debian.org/855118
> [1] http://bugs.debian.org/801881

I've argued with myself a bit as to whether the FTBFS fix is appropriate
for a stable update, but please go ahead.

Regards,

Adam



Bug#871466: stretch-pu: package wrk/4.0.2-2~deb9u1

2017-08-08 Thread Christos Trochalakis

Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian@packages.debian.org
Usertags: pu

Hello,

wrk in stable is not functional due to #855118 [0], I'd like to
upload wrk_4.0.2-2~deb9u1 fixing the bug above, plus an FTBFS on mips
architectures.

[0] http://bugs.debian.org/855118
[1] http://bugs.debian.org/801881

Vcs commits:
https://anonscm.debian.org/cgit/collab-maint/wrk.git/commit/?h=debian=f83391282fc9c80380dd64e91f269c6e8e16289d
https://anonscm.debian.org/cgit/collab-maint/wrk.git/commit/?h=debian=a81e6cc12f24f8f980a88fcae9a37c8507abb546

I am attaching the relevant debdiff.
diff -Nru wrk-4.0.2/debian/changelog wrk-4.0.2/debian/changelog
--- wrk-4.0.2/debian/changelog  2016-10-03 03:16:03.0 +0300
+++ wrk-4.0.2/debian/changelog  2017-08-08 10:31:41.0 +0300
@@ -1,3 +1,18 @@
+wrk (4.0.2-2~deb9u1) stretch; urgency=medium
+
+  * Rebuild for stretch.
+
+ -- Christos Trochalakis   Tue, 08 Aug 2017 10:31:41 
+0300
+
+wrk (4.0.2-2) unstable; urgency=medium
+
+  [ Christos Trochalakis ]
+  * Modify previous mips FTBFS patch rendering wrk unusable in all
+architectures. Thanks to Rinat Ibragimov (Closes: #855118)
+  * Fix build on mips architectures (Closes: #801881)
+
+ -- Robert Edmonds   Sat, 05 Aug 2017 16:04:19 -0400
+
 wrk (4.0.2-1) unstable; urgency=medium
 
   [ Robert Edmonds ]
diff -Nru wrk-4.0.2/debian/patches/debian-changes 
wrk-4.0.2/debian/patches/debian-changes
--- wrk-4.0.2/debian/patches/debian-changes 2016-10-03 03:16:03.0 
+0300
+++ wrk-4.0.2/debian/patches/debian-changes 2017-08-08 10:31:41.0 
+0300
@@ -10,15 +10,17 @@
 repository.
 --- wrk-4.0.2.orig/Makefile
 +++ wrk-4.0.2/Makefile
-@@ -1,21 +1,14 @@
- CFLAGS  += -std=c99 -Wall -O2 -D_REENTRANT
- LIBS:= -lpthread -lm -lssl -lcrypto
- 
--TARGET  := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
-+CFLAGS   += -std=c99 -Wall -D_REENTRANT -D_POSIX_C_SOURCE=200112L 
-D_BSD_SOURCE
+@@ -1,21 +1,11 @@
+-CFLAGS  += -std=c99 -Wall -O2 -D_REENTRANT
+-LIBS:= -lpthread -lm -lssl -lcrypto
++CFLAGS   += -O2 -std=c99 -Wall -D_REENTRANT -D_POSIX_C_SOURCE=200112L 
-D_BSD_SOURCE
 +LIBS += -lpthread -lm -lcrypto -lssl
 +LDFLAGS  += -Wl,-E
  
+-TARGET  := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
++CFLAGS   += $(shell pkg-config --cflags luajit)
++LIBS += $(shell pkg-config --libs luajit)
+ 
 -ifeq ($(TARGET), sunos)
 -  CFLAGS += -D_PTHREADS -D_POSIX_C_SOURCE=200112L
 -  LIBS   += -lsocket
@@ -32,14 +34,11 @@
 -  CFLAGS  += -D_DECLARE_C99_LDBL_MATH
 -  LDFLAGS += -Wl,-E
 -endif
-+CFLAGS   += $(shell pkg-config --cflags luajit)
-+LIBS += $(shell pkg-config --libs luajit)
-+
 +CFLAGS   += $(CPPFLAGS)
  
  SRC  := wrk.c net.c ssl.c aprintf.c stats.c script.c units.c \
ae.c zmalloc.c http_parser.c
-@@ -50,8 +43,7 @@ clean:
+@@ -50,8 +40,7 @@ clean:
$(RM) -rf $(BIN) obj/*
  
  $(BIN): $(OBJ)
@@ -51,7 +50,7 @@
  
 --- wrk-4.0.2.orig/src/stats.c
 +++ wrk-4.0.2/src/stats.c
-@@ -21,12 +21,12 @@ void stats_free(stats *stats) {
+@@ -21,12 +21,21 @@ void stats_free(stats *stats) {
  
  int stats_record(stats *stats, uint64_t n) {
  if (n >= stats->limit) return 0;
@@ -63,8 +62,17 @@
  uint64_t max = stats->max;
 -while (n < min) min = __sync_val_compare_and_swap(>min, min, n);
 -while (n > max) max = __sync_val_compare_and_swap(>max, max, n);
-+while (n < min) min = __atomic_compare_exchange(>min, , , 
false,__ATOMIC_SEQ_CST,__ATOMIC_SEQ_CST);
-+while (n > max) max = __atomic_compare_exchange(>max, , , 
false,__ATOMIC_SEQ_CST,__ATOMIC_SEQ_CST);
++while (n < min) {
++__atomic_compare_exchange(>min, , , false,
++  __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
++min = stats->min;
++}
++while (n > max) {
++__atomic_compare_exchange(>max, , , false,
++  __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
++max = stats->max;
++}
++
  return 1;
  }