From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Oct 12 11:20:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 37A39C44 for ; Sat, 12 Oct 2013 11:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 249B5280B for ; Sat, 12 Oct 2013 11:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r9CBK14P093927 for ; Sat, 12 Oct 2013 11:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r9CBK1cT093926; Sat, 12 Oct 2013 11:20:01 GMT (envelope-from gnats) Date: Sat, 12 Oct 2013 11:20:01 GMT Message-Id: <201310121120.r9CBK1cT093926@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org Cc: From: Miroslav Lachman <000.fbsd@quip.cz> Subject: Re: ports/182547: [PATCH] databases/mariadb55-server: Respect hier(7) (also affects databases/mariadb55-client) X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Miroslav Lachman <000.fbsd@quip.cz> List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Oct 2013 11:20:02 -0000 The following reply was made to PR ports/182547; it has been noted by GNATS. From: Miroslav Lachman <000.fbsd@quip.cz> To: Michael Gmelin Cc: "bug-followup@FreeBSD.org" , Alexandr Kovalenko Subject: Re: ports/182547: [PATCH] databases/mariadb55-server: Respect hier(7) (also affects databases/mariadb55-client) Date: Sat, 12 Oct 2013 13:19:34 +0200 Michael Gmelin wrote: > > >> On 11 Oct 2013, at 18:41, Miroslav Lachman<000.fbsd@quip.cz> wrote: >> >> Michael Gmelin wrote: >>> >>> >>>> On 11 Oct 2013, at 16:56, Miroslav Lachman<000.fbsd@quip.cz> wrote: >>>> >>>> Michael Gmelin wrote: >>>>> On Wed, 02 Oct 2013 21:55:29 +0200 >>>>> Miroslav Lachman<000.fbsd@quip.cz> wrote: >>>>>> >>>>>> I will test your patch in a few days. I am too busy with my $WORK now. >>>>>> >>>>>> Miroslav Lachman >>>>> >>>>> Did you have a chance to test the patch yet? >>>>> >>>>> Michael >>>> >>>> I tried it right now, but I have a problem. mariadb55-server cannot be built on my test machine FreeBSD 9.2-RC4 amd64 GENERIC. >>>> >>>> I always get this error even with original (not patched) version: >>>> >>>> Creating bzip'd tar ball in '/usr/ports/databases/mariadb55-server/work/mariadb55-server-5.5.33a.tbz' >>>> tar: lib/mysql/plugin/auth_pam.so: Cannot stat: No such file or directory >>>> tar: Error exit delayed from previous errors. >>>> pkg_create: make_dist: tar command failed with code 256 >>>> >>>> I'll investigate it later. I have mariadb55-server-5.5.33a built on 8.4 production server, so I don't know why it failed on 9.2-RC4. >> >> I am not able to find a proper fix of the problem with auth_pam.so, so I just delete it from pkg-plist. MariaDB works without it. >> >> Tests I did: >> >> 1) start MariaDB with /usr/local/etc/my.cnf >> works >> 2) start MariaDB with /etc/my.cnf >> failed to start [intended] >> 3) check my_print_defaults --help >> it still prints /etc/ and /etc/mysql/ as right locations for my.cnf >> [wrong] >> >> And I have a comment to (2). It prints the error message to a logfile, but user is not informed about any error with 'service' command. >> I think it should be printed to the users console. >> >> I did: >> >> root@sm-reserve ~/# service mysql-server onestart >> Starting mysql. >> >> As you can see, 'service' command said "Starting mysql." and no error was shown, which is really bad. I thought it started with /etc/my.cnf and later found in a logfile, that MariaDB start failed: >> >> root@sm-reserve ~/# tail -f /var/db/mysql/sm-reserve.codelab.cz.err >> >> 131011 18:18:23 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql >> error: Config file /etc/my.cnf in invalid location, please move to or merge with /usr/local/etc/my.cnf >> Fatal error in defaults handling. Program aborted >> 131011 18:18:23 mysqld_safe mysqld from pid file /var/db/mysql/sm-reserve.codelab.cz.pid ended >> >> Maybe it is not related to your patch but why 'service' (rc script mysql-server) is silent in the case of a failed start? >> >> Miroslav Lachman > > Afaik service mysql always has been silent about errors (eg innodb log file sizes don't match etc) due to the way the daemon is started, this should be the same with mysql55. I remember missing a warning about innodb not working many years ago since it was buried in MySQL error log > > So improving this - also for the MySQL port - would be great, but might be outside of the scope of this PR. So how about this patch to rc.d/mysql-server: --- /usr/local/etc/rc.d/mysql-server.orig 2013-10-11 18:09:34.000000000 +0200 +++ /usr/local/etc/rc.d/mysql-server 2013-10-12 13:12:59.000000000 +0200 @@ -52,6 +52,11 @@ mysql_prestart() { + if [ -f "/etc/my.cnf" -o -f "/etc/mysql/my.cnf" ]; then + echo "Please move existing my.cnf file from /etc to /usr/local/etc" + return 1 + fi + And are you able to fix my_print_defaults --help to not print /etc/ and /etc/mysql/ as default options directories? Miroslav