Opened 2 years ago

Closed 2 weeks ago

Last modified 2 weeks ago

#55916 closed request (fixed)

mariadb-10.3 should be created

Reported by: ryandesign (Ryan Schmidt) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: stevehav (Steve Havelka), joostdekeijzer (joost de keijzer), ctreleaven (Craig Treleaven)
Port: mariadb-10.3

Description

mariadb version 10.3 exists since April 2017; a port should be created for it.

Change History (21)

comment:1 Changed 17 months ago by mf2k (Frank Schima)

Owner: pixilla deleted
Status: newassigned

See #57827

comment:2 Changed 16 months ago by michaelld (Michael Dickens)

Owner: set to michaelld

working on this

comment:3 Changed 10 months ago by iEFdev (Eric F)

And mariadb-10.4 to, if possible. That would be great.

- - -

btw: I noticed in the MySQL Howto… It actually looks like both (10.3/4) are available as ports, already. They're listed, and followed by the text: “For each of the above ports, there is a "-server" companion port …” (last mod was 2 months ago).

Last edited 8 months ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:4 Changed 8 months ago by michaelld (Michael Dickens)

Has duplicate #59591

comment:5 Changed 8 months ago by michaelld (Michael Dickens)

I'd forgotten about these. I think I have initial Portfile's around ... but I think there were some conflicting files during installation ... something like that that I never tracked down what was going on. Let me see if I can track those down.

comment:6 Changed 3 months ago by stevehav (Steve Havelka)

I'd like to have access to 10.3 too -- anything I could do to help get the port file wrapped up? I'm new to macports but have written packaging files for other systems in the past (fink, my own local debian repositories).

comment:7 Changed 3 months ago by ryandesign (Ryan Schmidt)

Cc: stevehav added

Steve, you would probably start by copying the existing mariadb-10.2 Portfile and files and making the appropriate changes to it to update it for version 10.3.x. Install it and verify it works. Submit a pull request of your work. Since Michael mentioned conflicts above, you should probably install the mariadb-10.2 port too; I am assuming that is the port with which 10.3 has a conflict, and if it does, MacPorts will tell you what file(s) conflict, and you can then look for solutions so that those files do not conflict.

comment:8 Changed 3 months ago by joostdekeijzer (joost de keijzer)

Cc: joostdekeijzer added

comment:9 Changed 8 weeks ago by ctreleaven (Craig Treleaven)

Cc: ctreleaven added

comment:10 Changed 5 weeks ago by joostdekeijzer (joost de keijzer)

@ryandesign @stevehav I'm very new to this but really need/want v10.3 and 10.4

Starting out with 10.3 I've gotten to the conflicting file(s):

The install fails on:

Error: Failed to activate mariadb-10.3: Image error: /opt/local/bin/mariadb_config is being used by the active mariadb-10.2 port.  Please deactivate this port first, or use 'port -f activate mariadb-10.3' to force the activation.

Running port -f activate mariadb-10.3 gives:

Warning: File /opt/local/bin/mariadb_config already exists.  Moving to: /opt/local/bin/mariadb_config.mp_1591190708.
Warning: File /opt/local/lib/pkgconfig/libmariadb.pc already exists.  Moving to: /opt/local/lib/pkgconfig/libmariadb.pc.mp_1591190708.

See https://github.com/joostdekeijzer/macports-ports/tree/mariadb-10.3/databases/mariadb-10.3

Last edited 5 weeks ago by joostdekeijzer (joost de keijzer) (previous) (diff)

comment:11 Changed 5 weeks ago by joostdekeijzer (joost de keijzer)

comment:12 Changed 5 weeks ago by joostdekeijzer (joost de keijzer)

I've got mariadb-10.4 to compile too :-D

It required wsrep-lib and wsrep-API submodules. See https://github.com/joostdekeijzer/macports-ports/tree/mariadb-10.4/databases/mariadb-10.4 Portfile.

v10.4 also has the conflicting files /opt/local/bin/mariadb_config and /opt/local/lib/pkgconfig/libmariadb.pc.

I have no idea how to handle these conflicts so I'll leave it as is for now.

Also: have not done any extensive tests (the compiled binaries work).

comment:13 in reply to:  10 Changed 5 weeks ago by ryandesign (Ryan Schmidt)

Replying to joostdekeijzer:

Starting out with 10.3 I've gotten to the conflicting file(s):

The install fails on:

Error: Failed to activate mariadb-10.3: Image error: /opt/local/bin/mariadb_config is being used by the active mariadb-10.2 port.  Please deactivate this port first, or use 'port -f activate mariadb-10.3' to force the activation.

Running port -f activate mariadb-10.3 gives:

Warning: File /opt/local/bin/mariadb_config already exists.  Moving to: /opt/local/bin/mariadb_config.mp_1591190708.
Warning: File /opt/local/lib/pkgconfig/libmariadb.pc already exists.  Moving to: /opt/local/lib/pkgconfig/libmariadb.pc.mp_1591190708.

See https://github.com/joostdekeijzer/macports-ports/tree/mariadb-10.3/databases/mariadb-10.3

You should not force the activation. That will break the other port.

Ideally, the ports would not conflict with one another. Until someone can put in the work to figure out how best to accomplish that for this software (possibly by referencing how it was done for other software in MacPorts like the mysql* ports), the conflict should be communicated to the user by using the conflicts keyword in all the conflicting ports.

comment:14 Changed 5 weeks ago by joostdekeijzer (joost de keijzer)

comment:15 Changed 5 weeks ago by joostdekeijzer (joost de keijzer)

Found the culprit: the required submodule libmariadb (mariadb-connector-c) installs those files. I've patched my 10.3 and 10.4 portfiles. Also reported upstream of what I think is a bug there (https://github.com/mariadb-corporation/mariadb-connector-c/pull/138).

Two points remaining:

  1. Now, the conflicts are gone but I think the mariadb-10.2 port should apply the same patch to libmariadb. How is this best done since it will move mariadb_config and libmariadb.pc to a different location.
  2. I don't understand how the port select files work (eg. mariadb-10.2/files/mariadb-10.2). How do I create those files for 10.3 and 10.4? Also, they should now also symlink /opt/local/lib/pkgconfig/libmariadb.pc to /opt/local/lib/mariadb-10.3/pkgconfig/libmariadb.pc

comment:16 in reply to:  15 Changed 5 weeks ago by ryandesign (Ryan Schmidt)

Replying to joostdekeijzer:

  1. Now, the conflicts are gone but I think the mariadb-10.2 port should apply the same patch to libmariadb.

Ok great.

How is this best done since it will move mariadb_config and libmariadb.pc to a different location.

Find all ports that are currently relying on libmariadb.pc being in its current location and modify them to find it at its new location. My guess is there are no such ports but I don't know.

  1. I don't understand how the port select files work (eg. mariadb-10.2/files/mariadb-10.2). How do I create those files for 10.3 and 10.4?

Start by copying the mariadb-10.2 file, changing its name to mariadb-10.3, putting it in the mariadb-10.3 portfile's files directory, and changing any references in it to 10.2 to 10.3. Make any additional adjustments needed. For example, if a file that was mentioned for mariadb-10.2 no longer exists in 10.3, change that line to -.

Also, they should now also symlink /opt/local/lib/pkgconfig/libmariadb.pc to /opt/local/lib/mariadb-10.3/pkgconfig/libmariadb.pc

Looking in the mariadb-10.2, I see no mention of libmariadb at all. If you want port select mysql to be able to create symlinks for libmariadb.pc or other files that are not currently mentioned there, you can do that, but you have to add corresponding lines (even if they're just -) to all of the files in the mysql select group and revbump all of the affected portfiles.

comment:17 Changed 5 weeks ago by joostdekeijzer (joost de keijzer)

Hi, thanks for your reply.

Did not find any dependencies on libmariadb in other ports (it was only introduced in 10.2)

Created and updated 10.3 and 10.4 select files.

I decided not to add any extra files (there are many more binaries now, especially in the 10.4 release but I'm not comfortable editing all those index file for all relevant ports).

I've created a branche with all modifications (for 10.2, 10.3 and 10.4):
https://github.com/joostdekeijzer/macports-ports/tree/mariadb-10.3-10.4-and-10.2-fixes

The separate branches are also available:

I guess someone should test?

Also, maybe a separate ticket to update the port select index files (are there any tools for this?)

Hope this helps to fix this issue.

comment:18 Changed 2 weeks ago by michaelld (Michael Dickens)

In 77637c0a4ccb8b719a1d05cba2c9dbaab43a65ec/macports-ports (master):

mariadb-10.2: add patches from #55916

comment:19 Changed 2 weeks ago by michaelld (Michael Dickens)

In 53cecb189a44087a274b9881e7f348314631f244/macports-ports (master):

mariadb-10.3: new port

Copied and tweaked from #55916

comment:20 Changed 2 weeks ago by michaelld (Michael Dickens)

Resolution: fixed
Status: assignedclosed

In 016ac961c2ff82d37d19d29b5f552dffe6e7b470/macports-ports (master):

mariadb-10.4: new port

Copied and tweaked from #55916

Closes: #55916

comment:21 Changed 2 weeks ago by michaelld (Michael Dickens)

@joostdekeijzer : thank you so -very- much for your work here! I had to do some tweaks to get these working, but the core was solid. They are now committed into MacPorts, and I'll add them to my "keep updated" list to check every so often. Cheers!

Note: See TracTickets for help on using tickets.