Opened 17 years ago

Closed 15 years ago

Last modified 14 years ago

#12313 closed enhancement (fixed)

mysql5: Create a separate mysql5-server port

Reported by: sfiera@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.5.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), sfiera@…, nox@…, pb-macports@…, jabronson@…
Port: mysql3, mysql4, mysql5, mysql5-devel, mysql5-server

Description

This has been discussed. No one seems strongly against it, and the issue has come up often enough that I think there's sufficient reason to make the changed. But of course it's really up to mysql5's maintainer.

For this, I've split the mysql5 port into two portfiles, one for mysql5-client and one for mysql5-server. Obviously, the server-specific parts have gone to mysql5-server and the client parts to mysql5-client. I also added a post-destroot message to mysql5-client saying explicitly "This is the client port. Install mysql5-server if you want a server." Both ports compile, install, and run.

I also did a small rewrite of the mysql5 port that simply requires the mysql5-client port. I don't see a need to bump the revision on it.

Probably, these portfiles should be put into the system by first svn cping mysql5's Portfile into both the mysql5-client and mysql5-server directories, then pasting these portfiles over them (to get proper histories). Also, the files dir in mysql5 will need to moved to mysql5-client's folder.

Attachments (6)

mysql5-client-Portfile (2.7 KB) - added by sfiera@… 17 years ago.
mysql5-server-Portfile (1.6 KB) - added by sfiera@… 17 years ago.
mysql5-Portfile (426 bytes) - added by sfiera@… 17 years ago.
mysql5.diff (3.7 KB) - added by ryandesign (Ryan Carsten Schmidt) 17 years ago.
mysql5-client.diff (4.5 KB) - added by ryandesign (Ryan Carsten Schmidt) 17 years ago.
mysql5-server.diff (5.1 KB) - added by ryandesign (Ryan Carsten Schmidt) 17 years ago.

Download all attachments as: .zip

Change History (30)

Changed 17 years ago by sfiera@…

Attachment: mysql5-client-Portfile added

Changed 17 years ago by sfiera@…

Attachment: mysql5-server-Portfile added

comment:1 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Why "mysql5-client" and "mysql5-server"? I assumed "mysql5" would be the client (with the post-destroot message as you said) and "mysql5-server" would be the server. This would match the postgresql ports and is what I remember from the prior discussion.

comment:2 Changed 17 years ago by sfiera@…

I suppose there's no strong reason. I think it might be more helpful to be explicit, and a server variant could be added to mysql5 depending on mysql5-server to cause upgrades of current mysql5 +server to go smoothly. But consistency with postgresql is a good reason against.

comment:3 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

On the other hand, I don't want to inconvenience existing users too much. If we do ports "mysql5" and "mysql5-server", is there a way for "sudo port upgrade mysql5" to do the right thing if the user previously had "mysql5 +server" installed? I can't think of a way yet... but I'm still thinking.

Changed 17 years ago by sfiera@…

Attachment: mysql5-Portfile added

comment:4 Changed 17 years ago by sfiera@…

Well, if nothing else I updated the mysql Portfile to trigger +server => mysql5_server.

It's definitely not possible for the client port to cause mysql5-server to be installed automatically. That would require either a circular dependency, or recursive port calls. I think the only remotely clean way to do it would be to split the port up as I have (but not permanently). Once people have moved to mysql5-server, you would be able to 'move' mysql5-client back to mysql5 using dependencies.

comment:5 Changed 17 years ago by nox@…

Cc: nox@… added
Version: 1.5.0

I agree with ryandesign: a mysql5-server would be a good thing and would increase the global consistency of the ports tree, as this the way postgresql works.

comment:6 Changed 17 years ago by nox@…

Priority: Not setNormal

comment:7 Changed 17 years ago by sfiera@…

Ryan,

Is there a reason that this hasn't been committed yet? I'm pretty sure that you can't avoid a mysql5-client port without losing the +server feature, so that concern can only be dealt with by releasing mysql5-client and moving it back to mysql5 later. If there are other concerns, then I'd be happy to work on them to get the update out the door; this is a long-standing issue, but right now I'm not sure if you have reasons to hold it back or just haven't gotten around to it.

comment:8 Changed 17 years ago by sfiera@…

Cc: ryandesign@macports.org,sfiera@macports.org, nox@macports.orgryandesign@macports.org, sfiera@macports.org, nox@macports.org
Priority: NormalHigh
Version: 1.5.2

Ryan: I don't think it would be fair to invoke "maintainer timeout" here because you're obviously active on a lot of ports. But, after talking to yet /another/ person on irc who has to rebuild mysql with +server, I can't help but wonder still what your thoughts are on this...

comment:9 Changed 17 years ago by pb-macports@…

I just wanted to back up the suggestion by pointing out this is almost exactly how it's done in the FreeBSD ports tree.

comment:10 Changed 17 years ago by pb-macports@…

If the ports don't get split, perhaps at least the port descriptions could be changed from the current "Multithreaded SQL database server", since that's not what you get by default.

comment:11 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: pb-macports@… added
Status: newassigned

Sorry for the delay in responding. I am in favor of splitting the ports. I just needed some time to work through the scenario thoroughly to make sure we handle upgrades appropriately. In the end I must agree with everything that has been written above, regarding the need to have a mysql5-client port for the time being, to be moved back to mysql5 later.

I'll see if I can test and commit these ports in the next few days. Thanks for continuing to pester me about it. It's high time this got done.

comment:12 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Ok, I finally got around to looking over the changes. I made some small adjustments. I'm attaching diffs against the mysql5 Portfile@r28410. To use them:

cd `port dir mysql5`
svn up -r 28410
cd ..
svn cp mysql5 mysql5-client
svn cp mysql5 mysql5-server
patch mysql5/Portfile < ~/Desktop/mysql5.diff
patch mysql5-client/Portfile < ~/Desktop/mysql5-client.diff
patch mysql5-server/Portfile < ~/Desktop/mysql5-server.diff

Problem: "sudo port -ncuf upgrade mysql5" from the old all-in-one mysql5 goes poorly. Because: the new mysql5 now depends on mysql5-client. So mysql5-client gets built first. And MacPorts wants to install mysql5-client first. But the files mysql5-client wants to install are the same files that are already installed by the old mysql5 and so I get tons of errors. Well, with "-ncuf" it moves the existing files aside, but that's a waste of space and untidy.

sudo port -ncuf upgrade mysql5
--->  Fetching mysql5-client
--->  Verifying checksum(s) for mysql5-client
--->  Extracting mysql5-client
--->  Applying patches to mysql5-client
--->  Configuring mysql5-client
--->  Building mysql5-client with target all
--->  Staging mysql5-client into destroot
--->  Installing mysql5-client 5.0.45_0+darwin_8
****************************************************************
mysql5-client installs only the client libraries to connect to
an existing MySQL server. If you want to run a MySQL server of
your own on this machine, you should also install mysql5-server.
****************************************************************
--->  Activating mysql5-client 5.0.45_0+darwin_8
Warning: File /opt/local/bin/my_print_defaults5 already exists.  Moving to: /opt/local/bin/my_print_defaults5.mp_1188706527.
Warning: File /opt/local/bin/myisam_ftdump5 already exists.  Moving to: /opt/local/bin/myisam_ftdump5.mp_1188706527.
Warning: File /opt/local/bin/myisamchk5 already exists.  Moving to: /opt/local/bin/myisamchk5.mp_1188706527.

(snipped 245 more lines)

I think we may need a different strategy... for example, one in which the mysql5 port merely prints a message advising the user to install mysql5-client and/or mysql5-server. Or... one in which mysql5 is still the real client port, and the +server variant just prints a message advising the user to install mysql5-server. Thoughts?

Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: mysql5.diff added

Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: mysql5-client.diff added

Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: mysql5-server.diff added

comment:13 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

I've committed r28858 which implements the change of ${name} to ${mysql} so as to make a future split less painful.

comment:14 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

I committed the updated livecheck.regex from my mysql5-client.diff in r28859.

comment:15 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Port: mysql3 mysql4 mysql5 mysql5-devel added
Priority: HighNormal

This request will obsolete #14146.

comment:16 Changed 15 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

comment:17 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Port mysql5-server added in r50615.

comment:18 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

mysql5 +server variant was made obsolete in r51837

comment:19 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Port: mysql5-server added
Summary: Create separate mysql5-client and mysql5-server portsmysql5: Create a separate mysql5-server port

comment:20 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Port mysql5-server-devel added in r52013.

comment:21 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

mysql5-devel +server variant now obsolete as of r52021.

comment:22 Changed 15 years ago by blb@…

Can this be closed or does anyone still care about mysql3 and mysql4?

comment:23 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

mysql3 will be deleted ASAP and mysql4 should probably be deleted in 2010, so no, I don't care to update those ports with this change anymore.

comment:24 Changed 14 years ago by jabronson@…

Cc: jabronson@… added

Cc Me!

Note: See TracTickets for help on using tickets.