pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases Use proper CONF_FILES for my.cnf. Makes mysq...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9f83376a3e60
branches:  trunk
changeset: 348482:9f83376a3e60
user:      fhajny <fhajny%pkgsrc.org@localhost>
date:      Tue Jun 14 13:23:44 2016 +0000

description:
Use proper CONF_FILES for my.cnf. Makes mysql56-client look for it
under $PKG_SYSCONFDIR, and prevents mysql_install_db from creating
$PREFIX/my.cnf. Brings mysql56-client and mysql56-server in sync
WRT my.cnf location. Bump respective PKGREVISIONs.

Noticed by peterkelm@ on Github.

diffstat:

 databases/mysql56-client/Makefile                                       |   3 +-
 databases/mysql56-client/distinfo                                       |   5 +-
 databases/mysql56-client/patches/patch-scripts_CMakeLists.txt           |  17 ++++++-
 databases/mysql56-client/patches/patch-scripts_mysql__install__db.pl.in |  21 ++++++++++
 databases/mysql56-server/Makefile                                       |   5 +-
 5 files changed, 43 insertions(+), 8 deletions(-)

diffs (111 lines):

diff -r 2ce87dec729a -r 9f83376a3e60 databases/mysql56-client/Makefile
--- a/databases/mysql56-client/Makefile Tue Jun 14 13:09:47 2016 +0000
+++ b/databases/mysql56-client/Makefile Tue Jun 14 13:23:44 2016 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.20 2016/04/18 10:32:47 adam Exp $
+# $NetBSD: Makefile,v 1.21 2016/06/14 13:23:44 fhajny Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-client-/}
+PKGREVISION=   1
 COMMENT=       MySQL 5, a free SQL database (client)
 
 CONFLICTS=     mysql3-client-[0-9]*
diff -r 2ce87dec729a -r 9f83376a3e60 databases/mysql56-client/distinfo
--- a/databases/mysql56-client/distinfo Tue Jun 14 13:09:47 2016 +0000
+++ b/databases/mysql56-client/distinfo Tue Jun 14 13:23:44 2016 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.32 2016/04/18 10:32:47 adam Exp $
+$NetBSD: distinfo,v 1.33 2016/06/14 13:23:44 fhajny Exp $
 
 SHA1 (mysql-5.6.30.tar.gz) = 85d2370bce02b903e8f93964fa5f93c2f068bcaf
 RMD160 (mysql-5.6.30.tar.gz) = e30068c45263a018da6e948512fae66ac970f14a
@@ -27,7 +27,8 @@
 SHA1 (patch-mysql-test_CMakeLists.txt) = b7dd562d55678b13ac487aa0ee59bf2551af1f9d
 SHA1 (patch-mysys__ssl_CMakeLists.txt) = e50bad459520be78ea2d5c4d0699cda8c1141884
 SHA1 (patch-mysys_stacktrace.c) = 27ddd012c9ca299cfe2b9935b9f99fe603415e7e
-SHA1 (patch-scripts_CMakeLists.txt) = 3f4621b3256034c5a3114e98c108658794f06008
+SHA1 (patch-scripts_CMakeLists.txt) = 5b44d2d137e3e64474d663a8faab5b5f289f4cf5
+SHA1 (patch-scripts_mysql__install__db.pl.in) = 7e8c1cfe7231982f124e5d5e7f384ea2bd015c3a
 SHA1 (patch-scripts_mysqld_safe.sh) = 0784314227657aa0bc3f4a0b4e21c173a86fa94b
 SHA1 (patch-sql_CMakeLists.txt) = 83c1e50de6b53a0af5ff010f248dd595745b3eb5
 SHA1 (patch-sql_log_event.h) = a413038ffa29103c75e1d243864615ccb3d9621e
diff -r 2ce87dec729a -r 9f83376a3e60 databases/mysql56-client/patches/patch-scripts_CMakeLists.txt
--- a/databases/mysql56-client/patches/patch-scripts_CMakeLists.txt     Tue Jun 14 13:09:47 2016 +0000
+++ b/databases/mysql56-client/patches/patch-scripts_CMakeLists.txt     Tue Jun 14 13:23:44 2016 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-scripts_CMakeLists.txt,v 1.1 2013/02/13 21:00:06 adam Exp $
+$NetBSD: patch-scripts_CMakeLists.txt,v 1.2 2016/06/14 13:23:44 fhajny Exp $
 
-Fix paths.
+Fix paths. Set sysconfdir early for substitution in scripts.
 
---- scripts/CMakeLists.txt.orig        2013-01-22 16:54:49.000000000 +0000
+--- scripts/CMakeLists.txt.orig        2015-11-16 09:38:05.000000000 +0000
 +++ scripts/CMakeLists.txt
-@@ -182,22 +182,14 @@ ENDIF(UNIX)
+@@ -205,22 +205,15 @@ ENDIF(UNIX)
  # i.e. makes access relative the current directory. This matches
  # the documentation, so better not change this.
  
@@ -24,6 +24,15 @@
 -ELSE()
    SET(localstatedir ${MYSQL_DATADIR})
 -ENDIF()
++SET(sysconfdir ${DEFAULT_SYSCONFDIR})
  
  IF(UNIX)
    SET(EXT)
+@@ -238,7 +231,6 @@ INSTALL_SCRIPT(
+   )
+ 
+ SET(prefix "${CMAKE_INSTALL_PREFIX}")
+-SET(sysconfdir ${prefix})
+ SET(bindir ${prefix}/${INSTALL_BINDIR})
+ SET(libexecdir ${prefix}/${INSTALL_SBINDIR})
+ SET(scriptdir ${prefix}/${INSTALL_BINDIR})
diff -r 2ce87dec729a -r 9f83376a3e60 databases/mysql56-client/patches/patch-scripts_mysql__install__db.pl.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/mysql56-client/patches/patch-scripts_mysql__install__db.pl.in   Tue Jun 14 13:23:44 2016 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-scripts_mysql__install__db.pl.in,v 1.1 2016/06/14 13:23:44 fhajny Exp $
+
+We expect config files under $PKG_SYSCONFDIR.
+
+--- scripts/mysql_install_db.pl.in.orig        2015-11-16 09:38:05.000000000 +0000
++++ scripts/mysql_install_db.pl.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl
++#!/opt/local/bin/perl
+ # -*- cperl -*-
+ #
+ # Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
+@@ -469,7 +469,7 @@ my $copy_cfg_file;
+ 
+ my $cnfext = ( $^O =~ m/^(MSWin32|cygwin)$/ ) ? "ini" : "cnf";
+ 
+-$config_file= "$basedir/my.$cnfext";
++$config_file= "@sysconfdir@/my.$cnfext";
+ 
+ my $cfg_template= find_in_basedir($opt,"file","my-default.$cnfext",
+                                 ".", "share","share/mysql","support-files");
diff -r 2ce87dec729a -r 9f83376a3e60 databases/mysql56-server/Makefile
--- a/databases/mysql56-server/Makefile Tue Jun 14 13:09:47 2016 +0000
+++ b/databases/mysql56-server/Makefile Tue Jun 14 13:23:44 2016 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.28 2016/04/18 10:32:47 adam Exp $
+# $NetBSD: Makefile,v 1.29 2016/06/14 13:23:45 fhajny Exp $
 
 PKGNAME=       ${DISTNAME:S/-/-server-/}
+PKGREVISION=   1
 COMMENT=       MySQL 5, a free SQL database (server)
 
 CONFLICTS=     mysql3-server-[0-9]*
@@ -36,6 +37,8 @@
 
 PTHREAD_OPTS+=         require
 
+CONF_FILES+=           share/mysql/my-default.cnf ${PKG_SYSCONFDIR}/my.cnf
+
 PKG_GROUPS=            ${MYSQL_GROUP}
 PKG_USERS=             ${MYSQL_USER}:${MYSQL_GROUP}
 



Home | Main Index | Thread Index | Old Index