Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #12313 (assigned enhancement)

Opened 14 months ago

Last modified 12 months ago

Create separate mysql5-client and mysql5-server ports

Reported by: sfiera@… Owned by: ryandesign@…
Priority: High Milestone: Port Enhancements
Component: ports Version: 1.5.2
Keywords: Cc: ryandesign@…, sfiera@…, nox@…, pb-macports@…

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

mysql5-client-Portfile (2.7 kB) - added by sfiera@… 14 months ago.
mysql5-server-Portfile (1.6 kB) - added by sfiera@… 14 months ago.
mysql5-Portfile (426 bytes) - added by sfiera@… 13 months ago.
mysql5.diff (3.7 kB) - added by ryandesign@… 12 months ago.
mysql5-client.diff (4.5 kB) - added by ryandesign@… 12 months ago.
mysql5-server.diff (5.1 kB) - added by ryandesign@… 12 months ago.

Change History

Changed 14 months ago by sfiera@…

Changed 14 months ago by sfiera@…

Changed 14 months ago by ryandesign@…

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.

Changed 13 months 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.

Changed 13 months ago by ryandesign@…

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 13 months ago by sfiera@…

Changed 13 months 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.

Changed 13 months ago by nox@…

  • cc nox@… added
  • version 1.5.0 deleted

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.

Changed 13 months ago by nox@…

  • priority changed from Not set to Normal

Changed 12 months 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.

Changed 12 months ago by sfiera@…

  • cc changed from ryandesign@macports.org,sfiera@macports.org, nox@macports.org to ryandesign@macports.org, sfiera@macports.org, nox@macports.org
  • priority changed from Normal to High
  • version set to 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...

Changed 12 months 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.

Changed 12 months 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.

Changed 12 months ago by ryandesign@…

  • cc pb-macports@… added
  • status changed from new to assigned

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.

Changed 12 months ago by ryandesign@…

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 12 months ago by ryandesign@…

Changed 12 months ago by ryandesign@…

Changed 12 months ago by ryandesign@…

Changed 12 months ago by ryandesign@…

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

Changed 12 months ago by ryandesign@…

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

Note: See TracTickets for help on using tickets.