Bug#864655: stretch-pu: package trafficserver/7.0.0-5+deb9u1

2017-06-14 Thread Adrian Bunk
On Wed, Jun 14, 2017 at 09:12:21AM +0200, Jean Baptiste Favre wrote:
> Hello Adrian,
> 
> Thanks for pointing this out.
> 
> I've little knowledge in ARM dev.
> I've searched for memory barrier implementations examples in debian
> packages source code, but I was clearly presumptuous claiming to fix the
> build properly.
> 
> Do you have any pointer about proper memory barriers implementations ?
>...

std::atomic_thread_fence is the proper C++11 way to do memory barriers.

> Regards,
> Jean Baptiste

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed



Bug#864655: stretch-pu: package trafficserver/7.0.0-5+deb9u1

2017-06-14 Thread Jean Baptiste Favre
Hello Adrian,

Thanks for pointing this out.

I've little knowledge in ARM dev.
I've searched for memory barrier implementations examples in debian
packages source code, but I was clearly presumptuous claiming to fix the
build properly.

Do you have any pointer about proper memory barriers implementations ?
I'd really like to fix armel build and learn about this architecture.

Regards,
Jean Baptiste

On 13/06/2017 12:49, Adrian Bunk wrote:
> On Mon, Jun 12, 2017 at 09:58:07PM +0800, Aron Xu wrote:
>> ...
>> @@ -1,3 +1,11 @@
>> +trafficserver (7.0.0-5+deb9u1) UNRELEASED; urgency=medium
>> ...
>> +  * Add a patch to fix arm build
>> +
>> + -- Jean Baptiste Favre   Mon, 29 May 2017 14:45:52 
>> +0200
>> ...
>> ++  #if defined(__ARM_ARCH_4__) \
>> ++ || defined(__ARM_ARCH_4T__) \
>> ++ || defined(__ARM_ARCH_5__) \
>> ++ || defined(__ARM_ARCH_5E__)  \
>> ++ || defined(__ARM_ARCH_5T__) \
>> ++ || defined(__ARM_ARCH_5TE__) \
>> ++ || defined(__ARM_ARCH_5TEJ__) \
>> ++ || defined(__ARM_ARCH_6__) \
>> ++ || defined __ARM_ARCH_6J__  \
>> ++ || defined(__ARM_ARCH_6K__) \
>> ++ || defined(__ARM_ARCH_6Z) \
>> ++ || defined(__ARM_ARCH_6ZK__) \
>> ++ || defined(__ARM_ARCH_6T2__)
>> ++#if defined(__thumb__)
>> ++  // This is just a placeholder and almost certainly not sufficient.
>> ++  #define mb() __asm__ __volatile__ ("" : : : "memory");
>> ++  #define rmb() __asm__ __volatile__("" : : : "memory")
>> ++  #define wmb() __asm__ __volatile__("" : : : "memory")
>> ...
> 
> This would change the code from not building to being known broken on armel.
> 
> That's IMHO worse than before.
> 
> cu
> Adrian
> 




signature.asc
Description: OpenPGP digital signature


Bug#864655: stretch-pu: package trafficserver/7.0.0-5+deb9u1

2017-06-13 Thread Adrian Bunk
On Mon, Jun 12, 2017 at 09:58:07PM +0800, Aron Xu wrote:
>...
> @@ -1,3 +1,11 @@
> +trafficserver (7.0.0-5+deb9u1) UNRELEASED; urgency=medium
>...
> +  * Add a patch to fix arm build
> +
> + -- Jean Baptiste Favre   Mon, 29 May 2017 14:45:52 +0200
>...
> ++  #if defined(__ARM_ARCH_4__) \
> ++ || defined(__ARM_ARCH_4T__) \
> ++ || defined(__ARM_ARCH_5__) \
> ++ || defined(__ARM_ARCH_5E__)  \
> ++ || defined(__ARM_ARCH_5T__) \
> ++ || defined(__ARM_ARCH_5TE__) \
> ++ || defined(__ARM_ARCH_5TEJ__) \
> ++ || defined(__ARM_ARCH_6__) \
> ++ || defined __ARM_ARCH_6J__  \
> ++ || defined(__ARM_ARCH_6K__) \
> ++ || defined(__ARM_ARCH_6Z) \
> ++ || defined(__ARM_ARCH_6ZK__) \
> ++ || defined(__ARM_ARCH_6T2__)
> ++#if defined(__thumb__)
> ++  // This is just a placeholder and almost certainly not sufficient.
> ++  #define mb() __asm__ __volatile__ ("" : : : "memory");
> ++  #define rmb() __asm__ __volatile__("" : : : "memory")
> ++  #define wmb() __asm__ __volatile__("" : : : "memory")
>...

This would change the code from not building to being known broken on armel.

That's IMHO worse than before.

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed



Processed: Re: Bug#864655: stretch-pu: package trafficserver/7.0.0-5+deb9u1

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

> tags -1 + stretch moreinfo
Bug #864655 [release.debian.org] stretch-pu: package 
trafficserver/7.0.0-5+deb9u1
Added tag(s) moreinfo and stretch.

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



Bug#864655: stretch-pu: package trafficserver/7.0.0-5+deb9u1

2017-06-12 Thread Adam D. Barratt

Control: tags -1 + stretch moreinfo

On 2017-06-12 14:58, Aron Xu wrote:

I'd like to apply the attached patch as first pu for trafficserver in
stretch, it fixes the build on kfreebsd and arm architectures.


It doesn't look like any of those changes have made it to unstable yet; 
tagging appropriately.


By "arm architectures", I assume in practice you mean armel? There 
appear to be arm64 and armhf packages in the archive already.


Regards,

Adam



Bug#864655: stretch-pu: package trafficserver/7.0.0-5+deb9u1

2017-06-12 Thread Aron Xu
Package: release.debian.org
Severity: normal
User: release.debian@packages.debian.org
Usertags: pu

I'd like to apply the attached patch as first pu for trafficserver in
stretch, it fixes the build on kfreebsd and arm architectures.


Regards,
Aron
diff --git a/debian/changelog b/debian/changelog
index 8c25b126..7ff51263 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+trafficserver (7.0.0-5+deb9u1) UNRELEASED; urgency=medium
+
+  * Update d/rules to reflect healthcheck being managed as a stable plugin
+  * Add a patch to fix kfreebsd build
+  * Add a patch to fix arm build
+
+ -- Jean Baptiste Favre   Mon, 29 May 2017 14:45:52 +0200
+
 trafficserver (7.0.0-5) unstable; urgency=medium
 
   * Add patch to fix arm* build. (Closes: #857389)
diff --git a/debian/patches/0007-fix_build_kfreebsd.patch 
b/debian/patches/0007-fix_build_kfreebsd.patch
new file mode 100644
index ..46f4ac8d
--- /dev/null
+++ b/debian/patches/0007-fix_build_kfreebsd.patch
@@ -0,0 +1,39 @@
+Description: Fix kfreebsd build skipping malloc_np.h include
+Author: Jean Baptiste Favre 
+Origin: other
+Last-Update: 2017-03-24
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/lib/ts/ink_memory.cc
 b/lib/ts/ink_memory.cc
+@@ -27,7 +27,7 @@
+ #include "ts/Diags.h"
+ #include "ts/ink_atomic.h"
+ 
+-#if defined(freebsd)
++#if !defined(kfreebsd) && defined(freebsd)
+ #include  // for malloc_usable_size
+ #endif
+ 
+--- a/proxy/Plugin.cc
 b/proxy/Plugin.cc
+@@ -124,7 +124,7 @@ plugin_load(int argc, char *argv[], bool validateOnly)
+   return false; // this line won't get called since Fatal brings down ATS
+ }
+ 
+-#if defined(freebsd) || defined(darwin)
++#if (!defined(kfreebsd) && defined(freebsd)) || defined(darwin)
+ optreset = 1;
+ #endif
+ #if defined(__GLIBC__)
+--- a/proxy/http/remap/RemapConfig.cc
 b/proxy/http/remap/RemapConfig.cc
+@@ -902,7 +902,7 @@ remap_load_plugin(const char **argv, int argc, url_mapping 
*mp, char *errbuf, in
+   void *ih = NULL;
+   TSReturnCode res = TS_SUCCESS;
+   if (pi->fp_tsremap_new_instance) {
+-#if defined(freebsd) || defined(darwin)
++#if (!defined(kfreebsd) && defined(freebsd)) || defined(darwin)
+ optreset = 1;
+ #endif
+ #if defined(__GLIBC__)
diff --git a/debian/patches/0008-fix_build_armel.patch 
b/debian/patches/0008-fix_build_armel.patch
new file mode 100644
index ..4b12a506
--- /dev/null
+++ b/debian/patches/0008-fix_build_armel.patch
@@ -0,0 +1,42 @@
+--- a/plugins/header_rewrite/lulu.h
 b/plugins/header_rewrite/lulu.h
+@@ -48,9 +48,36 @@ uint16_t getPort(sockaddr const *s_socka
+ #define rmb() __asm__ __volatile__("sync" : : : "memory")
+ #define wmb() __asm__ __volatile__("" : : : "memory")
+ #elif defined(__arm__)
+-#define mb() __asm__ __volatile__("dmb" : : : "memory")
+-#define rmb() __asm__ __volatile__("dmb" : : : "memory")
+-#define wmb() __asm__ __volatile__("" : : : "memory")
++  #if defined(__ARM_ARCH_4__) \
++ || defined(__ARM_ARCH_4T__) \
++ || defined(__ARM_ARCH_5__) \
++ || defined(__ARM_ARCH_5E__)  \
++ || defined(__ARM_ARCH_5T__) \
++ || defined(__ARM_ARCH_5TE__) \
++ || defined(__ARM_ARCH_5TEJ__) \
++ || defined(__ARM_ARCH_6__) \
++ || defined __ARM_ARCH_6J__  \
++ || defined(__ARM_ARCH_6K__) \
++ || defined(__ARM_ARCH_6Z) \
++ || defined(__ARM_ARCH_6ZK__) \
++ || defined(__ARM_ARCH_6T2__)
++#if defined(__thumb__)
++  // This is just a placeholder and almost certainly not sufficient.
++  #define mb() __asm__ __volatile__ ("" : : : "memory");
++  #define rmb() __asm__ __volatile__("" : : : "memory")
++  #define wmb() __asm__ __volatile__("" : : : "memory")
++#else // defined(__thumb__)
++  int a = 0, b = 0;
++  #define mb() __asm__ __volatile__ ("mcr p15,0,%0,c7,c10,5" : : "r" (0) 
: "memory")
++  #define rmb() mb()
++  #define wmb() __asm__ __volatile__("" : : : "memory")
++#endif // defined(__thumb__)
++  #else
++// ARMv7 and later.
++#define mb() __asm__ __volatile__("dmb" : : : "memory")
++#define rmb() __asm__ __volatile__("dmb" : : : "memory")
++#define wmb() __asm__ __volatile__("" : : : "memory")
++  #endif
+ #elif defined(__mips__)
+ #define mb() __asm__ __volatile__("sync" : : : "memory")
+ #define rmb() __asm__ __volatile__("sync" : : : "memory")
diff --git a/debian/patches/series b/debian/patches/series
index e3a27b9c..9916d6ef 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,5 @@
 0004-force-use-luajit-system-remove-lib-luajit.patch
 0005-fix_documentation_build.patch
 0006-fix_arm_build.patch
+0007-fix_build_kfreebsd.patch
+0008-fix_build_armel.patch
diff --git a/debian/rules b/debian/rules
index 2c8a1169..8f33657f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -41,7 +41,7 @@ override_dh_auto_install:
 ifneq ($(DEB_HOST_ARCH_OS),linux)
# Remove Linux-specific plugin