Opened 21 years ago

Closed 21 years ago

Last modified 19 years ago

#399 closed defect (fixed)

mysql 3.23.55 PortFile

Reported by: bchesneau@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc: mike.mclean@…
Port:

Description

New Portfile for Mysql 3.23.55. However I've a problem with mysql_install_db after installation. After I execute it I should set new permissions to databases (chown -R mysql /opt/local/var/db/mysql). Don't know why. And if anybody could explain me how to launch mysql_install_db in the Portfile, have no success for now.

The Portfile

# $Id: Portfile,v 1.28 2003/03/03 06:13:24 mij Exp $

PortSystem 1.0 name mysql version 3.23.55 categories databases maintainers bchesneau@… description Multithreaded SQL database server long_description MySQL is an open-source, multi-threaded SQL database \

with a command syntax very similar to mSQL.

homepage http://www.mysql.com/ platforms darwin master_sites ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MySQL-3.23/ \

ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles/ \ http://distfiles.opendarwin.org/:lt

set filename ${portname}-${portversion}${extract.sufx} extract.only ${filename} distfiles ${filename} depends_lib lib:libdl.1:dlcompat

checksums mysql-3.23.55.tar.gz md5 259196ddc00c94051dceb9e86574d17e

set dbdir ${prefix}/var/db/mysql

configure.env LDFLAGS=-L${prefix}/lib \

CPPFLAGS=-I${prefix}/include

configure.args --localstatedir=${dbdir} --mandir=${prefix}/share/man --infodir=${prefix}/share/info --without-server --libexecdir=${prefix}/sbin --sysconfdir=${prefix}/etc --with-mysqld-user=mysql --with-innodb --without-bench

variant server {

depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup configure.args --localstatedir=${dbdir} --mandir=${prefix}/share/man --infodir=${prefix}/share/info --libexecdir=${prefix}/sbin --sysconfdir=${prefix}/etc --with-mysqld-user=mysql --with-innodb --without-bench --with-unix-socket-path=${prefix}/var/run

pre-install { system "install -o root -m 775 -d ${dbdir}"

file mkdir ${destroot}${prefix}/var/run file mkdir ${destroot}${prefix}/etc

}

post-install {

#addgroup mysql #set gid [existsgroup mysql] #adduser mysql gid=${gid} realname=MySQL\ Server

#system "${destroot}${prefix}/bin/mysql_install_db" #system "chown -R mysql:mysql ${dbdir}"

#system "${destroot}${prefix}/bin/mysql_install_db --force" system "chgrp -R mysql ${dbdir}" system "chown -R mysql ${dbdir}"

system "install -o root -m 755 -d ${destroot}${prefix}/etc/rc.d" set script [open ${destroot}${prefix}/etc/rc.d/mysql.sh w 0755] puts $script "#!/bin/sh" puts $script "${prefix}/bin/safe_mysqld --user=mysql &" close $script system "cd ${workpath}/${worksrcdir} && \

cp support-files/my-medium.cnf ${destroot}${prefix}/etc/my.cnf"

}

}

Attachments (3)

Portfile (2.3 KB) - added by bchesneau@… 21 years ago.
Portfile
patch-cvs-portfile (2.5 KB) - added by bchesneau@… 21 years ago.
Patch that upgrade cvs portfile to 3.23.56
3.23.57.patch (3.4 KB) - added by mike.mclean@… 21 years ago.
Patch against CVS version to install MySQL 3.23.57

Download all attachments as: .zip

Change History (15)

Changed 21 years ago by bchesneau@…

Attachment: Portfile added

Portfile

comment:1 Changed 21 years ago by michaelm@…

blocked: 403

comment:2 Changed 21 years ago by michaelm@…

Owner: changed from kevin@… to eric@…

assigning to current mysql maintainer

comment:3 Changed 21 years ago by bchesneau@…

why not install mysql in ${prefix}/mysql to have traditionnal layout of mysql like Postgres package ?

comment:4 Changed 21 years ago by michaelm@…

* Bug 398 has been marked as a duplicate of this bug. *

comment:5 Changed 21 years ago by michaelm@…

changing ownership is trying to change files in the wrong location, as when post-install executes the files are in destroot. Like tetex this port is partly broken until we get post-deploy actions. the

system "chgrp -R mysql ${dbdir}"

should be

system "chgrp -R mysql ${destroot}${dbdir}"

Changed 21 years ago by bchesneau@…

Attachment: patch-cvs-portfile added

Patch that upgrade cvs portfile to 3.23.56

comment:6 Changed 21 years ago by bchesneau@…

attachments.isobsolete: 01

comment:7 Changed 21 years ago by bchesneau@…

Resolution: duplicate
Status: newclosed

* This bug has been marked as a duplicate of 612 *

comment:8 Changed 21 years ago by mike.mclean@…

Resolution: duplicate
Status: closedreopened

There are instances where MySQL 3.23.x series will still be desired and useful. I propose leaving the "databases/mysql" directory and Portfile to build the 3.23.x series and create a new "databases/mysql4" for MySQL 4.x series.

I have a working, darwin tested, 3.23.57 patch (against the cvs Portfile -- CVS version 1.28, installs 3.23.52) that I will upload for consideration.

Changed 21 years ago by mike.mclean@…

Attachment: 3.23.57.patch added

Patch against CVS version to install MySQL 3.23.57

comment:9 Changed 21 years ago by mike.mclean@…

attachments.isobsolete: 01

comment:10 Changed 21 years ago by mike.mclean@…

Cc: mike.mclean@… added

comment:11 Changed 21 years ago by eric@…

Owner: changed from eric@… to darwinports-bugs@…
Status: reopenednew

comment:12 Changed 21 years ago by mij@…

Resolution: fixed
Status: newclosed

Committed with some changes. Thanks.

Note: See TracTickets for help on using tickets.