Project

General

Profile

Feature #6694

Add percona server 5.7 to /hipster

Added by Predrag Zečević over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
Start date:
2016-02-29
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Hi,

would it be possible to add Percona Server 5.7 to /hipster repository?

I did test compiling (only 32 bit mode) and in order to compile it:

a) boost needs update to 1.59 (currently 1.58):

$ pkg info -r system/library/boost
          Name: system/library/boost
       Summary: boost - free peer-reviewed portable C++ source libraries
      Category: System/Libraries
         State: Not installed
     Publisher: openindiana.org
       Version: 1.58.0
        Branch: 2015.0.1.4
Packaging Date: October 27, 2015 07:54:43 AM
          Size: 306.85 MB
          FMRI: pkg://openindiana.org/system/library/boost@1.58.0-2015.0.1.4:20151027T075443Z
   Project URL: http://www.boost.org
    Source URL: http://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.bz2/download

or use SFE package (in case boost upgrade is not possible; i have used that):
$ pkg info -l boost
          Name: system/library/g++/boost
       Summary: Free peer-reviewed portable C++ libraries (g++-built)
      Category: System/Libraries
         State: Installed
     Publisher: localhostoih
       Version: 1.59.0
        Branch: 0.0.151.1.8
Packaging Date: January  8, 2016 08:36:34 PM
          Size: 26.36 MB
          FMRI: pkg://localhostoih/system/library/g++/boost@1.59.0-0.0.151.1.8:20160108T203634Z
   Project URL: http://www.boost.org/
    Source URL: http://downloads.sourceforge.net/boost/boost_1_59_0.tar.bz2

b) patches to 2 files (similar to https://bugs.launchpad.net/percona-server/+bug/1496315):
Build/percona-server-5.7.10-3$ diff -p sql/mysqld.cc sql/mysqld.cc.oi
*** sql/mysqld.cc       2016-02-11 11:55:30.000000000 +0100
--- sql/mysqld.cc.oi    2016-02-29 09:34:39.338626265 +0100
*************** void clean_up(bool print_message)
*** 1424,1429 ****
--- 1424,1437 ----

  #ifndef EMBEDDED_LIBRARY

+ /* https://svnweb.freebsd.org/ports/head/databases/percona56-server/files/patch-sql_mysqld.cc?view=markup&pathrev=399074 */
+ /* At least OpenBSD and NexentaCore do not define s6_addr32 for user land settings. */
+ #if !defined s6_addr32 && defined __sun__
+ #       define s6_addr32 _S6_un._S6_u32
+ #elif !defined s6_addr32 && ( defined __OpenBSD__ || defined __FreeBSD__ )
+ #       define s6_addr32 __u6_addr.__u6_addr32
+ #endif  /* !defined s6_addr32 */
+ 
  static void clean_up_mutexes()
  {
    mysql_mutex_destroy(&LOCK_log_throttle_qni);

and
Build/percona-server-5.7.10-3$ diff -p vio/viosocket.c vio/viosocket.c.oi
*** vio/viosocket.c     2016-02-11 11:55:30.000000000 +0100
--- vio/viosocket.c.oi  2016-02-29 09:34:48.698736374 +0100
***************
*** 45,50 ****
--- 45,58 ----
  static void (*before_io_wait)(void)= 0;
  static void (*after_io_wait)(void)= 0;

+ /* https://svnweb.freebsd.org/ports/head/databases/percona56-server/files/patch-sql_mysqld.cc?view=markup&pathrev=399074 */
+ /* At least OpenBSD and NexentaCore do not define s6_addr32 for user land settings. */
+ #if !defined s6_addr32 && defined __sun__
+ #       define s6_addr32 _S6_un._S6_u32
+ #elif !defined s6_addr32 && ( defined __OpenBSD__ || defined __FreeBSD__ )
+ #       define s6_addr32 __u6_addr.__u6_addr32
+ #endif  /* !defined s6_addr32 */
+ 
  /* Wait callback macros (both performance schema and threadpool */
  #define START_SOCKET_WAIT(locker, state_ptr, sock, which, timeout) \
  do                                                                 \

Compiled, using (cd to unpacked source directory: percona-server-5.7.10-3):

export MAKE=gmake
export CC=gcc
export CXX=g++
export MY_ARCH=32
export MY_PREFIX=/opt/PerconaDB/5.7 # separate form anything; hold "package" (compiled data)

[[ -d bld ]] && pfexec rm -rf bld
mkdir bld && cd bld

/usr/bin/env CFLAGS="-m${MY_ARCH} -lsocket -O3 " CXXFLAGS="-m${MY_ARCH} -lsocket" LDFLAGS="-m${MY_ARCH}" \
      PKG_CONFIG_PATH="/usr/lib/pkgconfig"  \
      cmake .. -DCMAKE_INSTALL_PREFIX=${MY_PREFIX} -DSYSCONFDIR=${MY_PREFIX}/etc -DDTRACE=off -DBOOST_INCLUDE_DIR=/usr/g++/include
      gmake
      pfexec gmake install DESTDIR=/

Few checks (have created both method and manifest files form existing ones, and started instance):

$ which mysql mysqld
/opt/PerconaDB/5.7/bin/mysql
/opt/PerconaDB/5.7/bin/mysqld

$ mysqld --verbose --help | head -3
mysqld  Ver 5.7.10-3-log for solaris11 on i386 (Source distribution)
Copyright (c) 2009-2015 Percona LLC and/or its affiliates
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

I guess it would be not so complicated to have it modified to fit into existing build schema.

Best regards.

History

#1

Updated by Alexander Pyhalov over 4 years ago

  • Assignee set to Alexander Pyhalov
  • Status changed from New to Resolved
  • Tracker changed from Bug to Feature

Also available in: Atom PDF