Bug 161883 - [MAINTAINER] databases/mariadb-server: [SUMMARIZE CHANGES]
Summary: [MAINTAINER] databases/mariadb-server: [SUMMARIZE CHANGES]
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Doug Barton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-21 17:10 UTC by geoffroy desvernay
Modified: 2012-01-09 14:10 UTC (History)
0 users

See Also:


Attachments
mariadb-server-5.2.9.patch (2.95 KB, patch)
2011-10-21 17:10 UTC, geoffroy desvernay
no flags Details | Diff
mariadb-server.patch (3.54 KB, patch)
2011-10-24 21:47 UTC, geoffroy desvernay
no flags Details | Diff
mariadb-rcd.diff (3.36 KB, patch)
2011-11-07 06:13 UTC, Doug Barton
no flags Details | Diff
mariadb-rcd+limits.diff (3.38 KB, patch)
2011-11-19 17:39 UTC, geoffroy desvernay
no flags Details | Diff
mariadb.diff (8.81 KB, patch)
2012-01-04 14:27 UTC, geoffroy desvernay
no flags Details | Diff
mariadb.diff (3.44 KB, patch)
2012-01-09 14:06 UTC, geoffroy desvernay
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description geoffroy desvernay 2011-10-21 17:10:07 UTC
add multi-instances capability to startup script

Generated with FreeBSD Port Tools 0.99
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-10-21 17:10:18 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dougb

dougb@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 geoffroy desvernay 2011-10-21 22:45:52 UTC
Please don't commit it now: it's buggy

I'll work on it next week more seriously...

--=20
*Geoffroy Desvernay*
C.R.I - Administration syst=C3=A8mes et r=C3=A9seaux
Ecole Centrale de Marseille
Comment 3 Doug Barton freebsd_committer freebsd_triage 2011-10-21 23:16:01 UTC
State Changed
From-To: open->suspended


Originator asked to hold off.
Comment 4 geoffroy desvernay 2011-10-24 21:47:50 UTC
Seems to work this time...
-- 
*Geoffroy Desvernay*
C.R.I - Administration systèmes et réseaux
Ecole Centrale de Marseille
Comment 5 geoffroy desvernay 2011-10-24 22:24:42 UTC
This time the startup script seems to work as expected (last followup's=20
diff):
  - doesn't break old installs
  - add a 'mysql_instances' rc var to make more than one mysql server=20
start at boot
  - Permit to start/stop/... one instance at a time

Copy-pasted from memcached's script for most :)

--=20
*Geoffroy Desvernay*
C.R.I - Administration syst=C3=A8mes et r=C3=A9seaux
Ecole Centrale de Marseille
Comment 6 Doug Barton freebsd_committer freebsd_triage 2011-11-07 06:13:31 UTC
Please consider the attached, which has a few small tweaks:

1. The use of {brackets} around variable names are only really necessary
when they are close to some other text. Adding new instances of them
when they are not needed is frowned on.

2. Empty default variable assignments (: ${mysql_instances=""}) are not
necessary or desirable.

3. You assigned mysql_dbdir=/var/db/mysql unconditionally, in spite of
the mysql_dbdir variable.

4. I changed the bare test for the existence of mysql_instances for a
case statement to check if $2 is in there. If it isn't, there should be
an error.

5. I changed $0 to %%PREFIX%%/etc/rc.d/mysql-server in the invocation line.

Please test this version and let me know if it works for you.


Doug

-- 

		"We could put the whole Internet into a book."
		"Too practical."

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/
Comment 7 geoffroy desvernay 2011-11-19 17:39:03 UTC
On 07/11/2011 07:13, Doug Barton wrote:
> Please consider the attached, which has a few small tweaks:
>
> 1. The use of {brackets} around variable names are only really necessary
> when they are close to some other text. Adding new instances of them
> when they are not needed is frowned on.
>
> 2. Empty default variable assignments (: ${mysql_instances=""}) are not
> necessary or desirable.
>
> 3. You assigned mysql_dbdir=/var/db/mysql unconditionally, in spite of
> the mysql_dbdir variable.
>
> 4. I changed the bare test for the existence of mysql_instances for a
> case statement to check if $2 is in there. If it isn't, there should be
> an error.
>
> 5. I changed $0 to %%PREFIX%%/etc/rc.d/mysql-server in the invocation line.
>
> Please test this version and let me know if it works for you.
>
>
> Doug
>

Just tested on our production server: it works for us(tm)

* replaced :
   "$2 "*|*" $2 "*|*" $2")
by:
   "$2 "*|*" $2 "*|*" $2"|"$2")
to let it work in case there is only one instance

* changed the pidfile just below, using ${_dbdir}/`/bin/hostname`.pid 
instead of ${mysql_dbdir}/`/bin/hostname`_${instance}.pid ($mysql_dbdir 
may not let instance's owner write pidfile)

* added 'mysql_user' declaration and '_limits_args'
  to fix limits call if defined

Sorry for the delay, we had some big electrical problems these weeks... 
And I'm better with /bin/sh than with 20 years-old UPS (even if not so 
good in /bin/sh ;)

-- 
*Geoffroy Desvernay*
C.R.I - Administration systèmes et réseaux
Ecole Centrale de Marseille
Tel: (+33|0)4 91 05 45 24
Fax: (+33|0)4 91 05 45 98
dgeo@centrale-marseille.fr
Comment 8 Doug Barton freebsd_committer freebsd_triage 2011-12-27 07:24:42 UTC
Any progress on a .10 update? I was sort of hoping to commit this new
script along with the new version.


Doug

-- 

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/
Comment 9 geoffroy desvernay 2012-01-04 14:27:22 UTC
Same patch, with upstream upgrade (5.2.10)

Includes a patch to auth_pam.c to let it compile (should disappear in 
next upstream release)

Happy new year !
-- 
*Geoffroy Desvernay*
C.R.I - Administration systèmes et réseaux
Ecole Centrale de Marseille
Comment 10 dfilter service freebsd_committer freebsd_triage 2012-01-05 02:13:46 UTC
dougb       2012-01-05 02:13:37 UTC

  FreeBSD ports repository

  Modified files:
    databases/mariadb-server Makefile distinfo pkg-plist 
    databases/mariadb-server/files mysql-server.in 
  Added files:
    databases/mariadb-server/files 
                                   patch-plugin__auth_pam__auth_pam.c 
  Log:
  Upgrade to version 5.2.10:
  
  * Introduce a PAM authentication plugin
  * Various bug fixes
  
  For the rc.d script, add the ability to run multiple instances
  
  PR:             ports/161883
  Submitted by:   Geoffroy Desvernay <dgeo@centrale-marseille.fr> (maintainer)
  
  Revision  Changes    Path
  1.15      +1 -1      ports/databases/mariadb-server/Makefile
  1.9       +2 -2      ports/databases/mariadb-server/distinfo
  1.5       +65 -9     ports/databases/mariadb-server/files/mysql-server.in
  1.1       +10 -0     ports/databases/mariadb-server/files/patch-plugin__auth_pam__auth_pam.c (new)
  1.7       +8 -0      ports/databases/mariadb-server/pkg-plist
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 11 Doug Barton freebsd_committer freebsd_triage 2012-01-05 02:14:07 UTC
State Changed
From-To: suspended->closed


Committed, thanks for all your hard work and patience. :)
Comment 12 interfasys 2012-01-09 11:08:28 UTC
The rc.d script is broken.
mysql_dbdir is not used anymore when looking for the datadir and the
configuration file even though it's defined in rc.conf.

mysql_enable="YES"
mysql_dbdir="/dbs/mysql"


This is what is launched
mysql    72088  0.0  0.0  8328  1836  ??  Is   11:40AM   0:00.01 /bin/sh
/usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf
--user=mysql --datadir=/var/db/mysql --pid-file=/dbs/mysql/host.net.pid


Cheers,

Olivier
Comment 13 geoffroy desvernay 2012-01-09 14:06:48 UTC
On 09.01.2012 12:08, interfaSys sàrl wrote:
> The rc.d script is broken.
> mysql_dbdir is not used anymore when looking for the datadir and the
> configuration file even though it's defined in rc.conf.
>
> mysql_enable="YES"
> mysql_dbdir="/dbs/mysql"
>
>
> This is what is launched
> mysql    72088  0.0  0.0  8328  1836  ??  Is   11:40AM   0:00.01 /bin/sh
> /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf
> --user=mysql --datadir=/var/db/mysql --pid-file=/dbs/mysql/host.net.pid
>
>
> Cheers,
>
> Olivier

I found another bug: did not taks '_user' into account for different 
instances.

Patch attached to correct this

Thanks !
-- 
*geoffroy desvernay*
C.R.I - Administration systèmes et réseaux
Ecole Centrale de Marseille