[debian-mysql] Please update/review your patches for MariaDB 10.3 in Debian

Vicențiu Ciorbaru vicentiu at mariadb.org
Thu Dec 20 08:58:50 GMT 2018


Hi Otto!

armhf_mroonga_storage_fail.patch can be removed. It was applied upstream.

I have tried submitting a merge request for an updated c11_atomics 
patch, however I think I require an invitation to the team to be able to 
do that from the GitLab interface. As time is short, I have attached the 
commit instead.

I expect it will be merged to upstream for the next release too.
Note that I did not spend time testing this particular fix on a mips 
machine as I do not have one handy and emulating it still takes a day 
and half to compile. I believe that if you push to debian infrastructure 
it will be faster.

Will be looking into the other failures now.

Vicențiu

On Tue, 18 Dec 2018 at 18:31 Otto Kekäläinen <otto at debian.org 
<mailto:otto at debian.org>> wrote:

    Hello Vicențiu!

    You have contributed to some of the patches at
    https://salsa.debian.org/mariadb-team/mariadb-10.3/tree/master/debian/patches

    Some of them don't apply anymore and I have disabled them:
    - armhf_mroonga_storage_fail.patch
    - c11_atomics.patch

    Could you please refresh them or let me know if you don't have any use
    for them anymore, or if something new in upstream has made them
    obsolete?

    They are now disabled and if nobody contributes to fix them for the
    10.3 era I will probably scrap them at some point.

    I prefer contributions as merge requests on Debian's new Gitlab
    instance called Salsa:
    https://wiki.debian.org/Teams/MySQL/patches

    Maintaining MariaDB in Debian is a very big task and I appreciate all
    help I get that decreases my workload. Thanks for your previous
    contributions and hopefully you can continue contributing!


    -- 
    Otto Kekäläinen
    Follow me on https://twitter.com/ottokekalainen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-mysql-maint/attachments/20181220/7792ef7b/attachment.html>
-------------- next part --------------
commit 2b8e7caccc2b9c97d0306ff16e7d46a035fbf10c
Author: Vicențiu Ciorbaru <vicentiu at mariadb.org>
Date:   Thu Dec 20 08:19:45 2018 +0000

    Refresh c11_atomics patch for 10.3

diff --git a/debian/patches/c11_atomics.patch b/debian/patches/c11_atomics.patch
index 6c3649f05..0c0ccd014 100644
--- a/debian/patches/c11_atomics.patch
+++ b/debian/patches/c11_atomics.patch
@@ -1,128 +1,55 @@
-From: Debian MySQL Maintainers <pkg-mysql-maint at lists.alioth.debian.org>
-Date: Thu, 10 Aug 2017 20:40:29 +0200
-Subject: c11_atomics
+Author: Vicențiu Ciorbaru <vicentiu at mariadb.org>
+Date:   Thu Dec 20 10:00:10 2018 +0200
 
----
- configure.cmake               | 23 +++++++++++++++++++++--
- include/atomic/gcc_builtins.h | 15 +++++++++++++++
- include/atomic/nolock.h       |  4 ++--
- mysys/CMakeLists.txt          |  4 ++++
- sql/CMakeLists.txt            |  4 ++++
- 5 files changed, 46 insertions(+), 4 deletions(-)
+   Link with libatomic to enable C11 atomics support
 
+   Some architectures (mips) require libatomic to support proper
+   atomic operations. Check first if support is available without
+   linking, otherwise use the library.
+
+diff --git a/configure.cmake b/configure.cmake
+index 42ba24961..2d183ea9f 100644
 --- a/configure.cmake
 +++ b/configure.cmake
-@@ -128,7 +128,7 @@ IF(UNIX)
-   ENDIF()
-   FIND_PACKAGE(Threads)
- 
--  SET(CMAKE_REQUIRED_LIBRARIES 
-+  LIST(APPEND CMAKE_REQUIRED_LIBRARIES
-     ${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
-   # Need explicit pthread for gcc -fsanitize=address
-   IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
-@@ -1038,7 +1038,26 @@ ELSEIF(NOT WITH_ATOMIC_OPS)
-     long long int *ptr= &var;
-     return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
-   }"
--  HAVE_GCC_C11_ATOMICS)
-+  HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
-+  IF(HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
+@@ -926,7 +926,25 @@ int main()
+   long long int *ptr= &var;
+   return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
+ }"
+-HAVE_GCC_C11_ATOMICS)
++HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
++IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC)
++  SET(HAVE_GCC_C11_ATOMICS True)
++ELSE()
++  SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
++  LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
++  CHECK_CXX_SOURCE_COMPILES("
++  int main()
++  {
++    long long int var= 1;
++    long long int *ptr= &var;
++    return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
++  }"
++  HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++  IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
 +    SET(HAVE_GCC_C11_ATOMICS True)
-+  ELSE()
-+    SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
-+    LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
-+    CHECK_CXX_SOURCE_COMPILES("
-+    int main()
-+    {
-+      long long int var= 1;
-+      long long int *ptr= &var;
-+      return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST);
-+    }"
-+    HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
-+    IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
-+      SET(HAVE_GCC_C11_ATOMICS True)
-+    ELSE()
-+      SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
-+    ENDIF()
 +  ENDIF()
- ELSE()
-   MESSAGE(FATAL_ERROR "${WITH_ATOMIC_OPS} is not a valid value for WITH_ATOMIC_OPS!")
- ENDIF()
---- a/include/atomic/gcc_builtins.h
-+++ b/include/atomic/gcc_builtins.h
-@@ -16,6 +16,7 @@
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
- 
-+#if defined (HAVE_GCC_ATOMIC_BUILTINS)
- #define make_atomic_add_body(S)                     \
-   v= __sync_fetch_and_add(a, v);
- #define make_atomic_fas_body(S)                     \
-@@ -26,6 +27,20 @@
-   sav= __sync_val_compare_and_swap(a, cmp_val, set);\
-   if (!(ret= (sav == cmp_val))) *cmp= sav
- 
-+#elif defined(HAVE_GCC_C11_ATOMICS)
-+
-+#define make_atomic_add_body(S)                     \
-+  v= __atomic_fetch_add(a, v, __ATOMIC_SEQ_CST)
-+#define make_atomic_fas_body(S)                     \
-+  v= __atomic_exchange_n(a, v, __ATOMIC_SEQ_CST)
-+#define make_atomic_cas_body(S)                     \
-+  int ## S sav;                                     \
-+  ret= __atomic_compare_exchange_n(a, cmp, set,     \
-+                                   0,               \
-+                                   __ATOMIC_SEQ_CST,\
-+                                   __ATOMIC_SEQ_CST);
-+#endif
-+
- #ifdef MY_ATOMIC_MODE_DUMMY
- #define make_atomic_load_body(S)   ret= *a
- #define make_atomic_store_body(S)  *a= v
---- a/include/atomic/nolock.h
-+++ b/include/atomic/nolock.h
-@@ -17,7 +17,7 @@
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
- 
- #if defined(__i386__) || defined(_MSC_VER) || defined(__x86_64__)   \
--    || defined(HAVE_GCC_ATOMIC_BUILTINS) \
-+    || defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_C11_ATOMICS) \
-     || defined(HAVE_SOLARIS_ATOMIC)
- 
- #  ifdef MY_ATOMIC_MODE_DUMMY
-@@ -41,7 +41,7 @@
- #  elif __GNUC__
- #    if defined(HAVE_SOLARIS_ATOMIC)
- #      include "solaris.h"
--#    elif defined(HAVE_GCC_ATOMIC_BUILTINS)
-+#    elif defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_C11_ATOMICS)
- #      include "gcc_builtins.h"
- #    elif defined(__i386__) || defined(__x86_64__)
- #      include "x86-gcc.h"
---- a/mysys/CMakeLists.txt
-+++ b/mysys/CMakeLists.txt
-@@ -79,6 +79,10 @@ IF(HAVE_BFD_H)
-   TARGET_LINK_LIBRARIES(mysys bfd)  
- ENDIF(HAVE_BFD_H)
- 
-+IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
-+  TARGET_LINK_LIBRARIES(mysys atomic)
++  SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
 +ENDIF()
-+
- IF (WIN32)
-   TARGET_LINK_LIBRARIES(mysys IPHLPAPI)  
- ENDIF(WIN32)
+ 
+ IF(WITH_VALGRIND)
+   SET(HAVE_valgrind 1)
+diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
+index d85e588ab..68dde1de6 100644
 --- a/sql/CMakeLists.txt
 +++ b/sql/CMakeLists.txt
-@@ -165,6 +165,10 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATI
-   ${SSL_LIBRARIES}
-   ${LIBSYSTEMD})
+@@ -178,6 +178,10 @@ ELSE()
+   SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL})
+ ENDIF()
  
-+IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
++IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
 +  TARGET_LINK_LIBRARIES(sql atomic)
 +ENDIF()
 +
- IF(WIN32)
-   SET(MYSQLD_SOURCE main.cc nt_servc.cc message.rc)
-   TARGET_LINK_LIBRARIES(sql psapi)
+ 
+ IF(MSVC AND NOT WITHOUT_DYNAMIC_PLUGINS)
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 5c40e56e6..2be9309c0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,7 +7,7 @@ mips-groonga-atomic.patch
 mips-connect-unaligned.patch
 mips-machine.patch
 #armhf_mroonga_storage_fail.patch
-#c11_atomics.patch
+c11_atomics.patch
 kFreeBSD-gettid.patch
 #mips-innobase-atomic.patch
 mytop-merge_src:mytop_improvements.patch


More information about the pkg-mysql-maint mailing list