Bug 171338 - both databases/mariadb-scripts and databases/mariadb-server install /usr/local/bin/mysqld_multi
Summary: both databases/mariadb-scripts and databases/mariadb-server install /usr/loca...
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: Mark Felder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-05 08:30 UTC by bartsch
Modified: 2015-03-26 19:25 UTC (History)
1 user (show)

See Also:
dgeo: maintainer-feedback+


Attachments
patch against databases/mariadb-scripts (2.33 KB, patch)
2014-09-03 15:49 UTC, geoffroy desvernay
no flags Details | Diff
Build log mariadb-client 5.3.12_5 (67.04 KB, application/x-gzip)
2014-10-18 09:44 UTC, Bernard Spil
no flags Details
Build log mariadb-server 5.3.12_5 (140.18 KB, application/x-gzip)
2014-10-18 09:44 UTC, Bernard Spil
no flags Details
Build logs of mariadb-{client,server,scripts}-5.3.12_5 (211.59 KB, application/x-compressed)
2014-10-19 19:11 UTC, Bernard Spil
no flags Details
Patch for mariadb-server (1.25 KB, patch)
2014-10-19 19:14 UTC, Bernard Spil
brnrd: maintainer-approval?
Details | Diff
mariadb53-client build failure (520.64 KB, text/plain)
2015-02-03 15:38 UTC, Mark Felder
no flags Details
updated patch (1.57 KB, patch)
2015-02-06 09:36 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 bartsch 2012-09-05 08:30:08 UTC
both mariadb-scripts-5.3.7 and mariadb-server-5.3.7 install /usr/local/bin/mysqld_multi with different path entries.

mariadb-scripts: /usr/local/var[1-6]
mariadb-server:  /var/db/mysql[1-6]

This leads to checksum error (pkg_info -g) in the previously installed port.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-09-10 09:51:22 UTC
Maintainer of databases/mariadb-scripts,

Please note that PR ports/171338 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/171338

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-09-10 09:51:25 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 geoffroy desvernay 2012-09-12 11:34:04 UTC
Still a plist problem... will try to fix it this week.
-- 
*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 4 geoffroy desvernay 2012-11-14 09:18:06 UTC
This is a multi-part message in MIME format.
Comment 5 geoffroy desvernay 2012-11-20 13:50:31 UTC
This is a multi-part message in MIME format.
Comment 6 John Marino freebsd_committer freebsd_triage 2014-01-26 14:59:06 UTC
State Changed
From-To: feedback->open

Maintainer has fixed.
Comment 7 geoffroy desvernay 2014-03-07 13:59:52 UTC
Could someone commit this SVP ?
-- 
*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 44 26

Comment 8 Mark Felder freebsd_committer freebsd_triage 2014-03-07 14:14:43 UTC
Responsible Changed
From-To: freebsd-ports-bugs->feld

I'll take it.
Comment 9 geoffroy desvernay 2014-09-03 15:46:56 UTC
Anyone to take a look at this ?
Comment 10 geoffroy desvernay 2014-09-03 15:49:18 UTC
Created attachment 146735 [details]
patch against databases/mariadb-scripts

Last patch attached in GNATS
Comment 11 Mark Felder freebsd_committer freebsd_triage 2014-09-03 16:15:22 UTC
Last I saw the patch didn't solve the problem completely. There are inappropriate things being installed by the different mariadb ports. They should perfectly model the mysql (5.1 ?) ports, but they do not. I was working on it but mariadb was refusing to build and produce identical output when given the exact same build flags as the mysql port version it is sister to, and then I had given up due to $work projects.

I'll take a look again at the patch you provided and see if it is sufficient to make them installable for now, I guess. Users should really be encouraged to move to a newer MariaDB release :-)
Comment 12 Mark Felder freebsd_committer freebsd_triage 2014-09-11 17:38:29 UTC
Ok, I tried looking at this again and here's what I ran into:


I applied your patch, but cannot build mariadb-scripts because I can't build mariadb-server. mariadb-server has plist problems. Fixing the plist problems gets you one step further, but then mariadb-server conflicts with mariadb-client on include/mysql/client_plugin.h. If I remove that from mariadb-server, mariadb-client won't build successfully because of the way the client port is a slave of the server port.

It's a big mess. All three ports need to be fixed to solve this problem. I literally cannot test your mariadb-scripts patch with poudriere testport until the other issues with mariadb-server and mariadb-client are solved.

Sorry for the bad news :-(
Comment 13 geoffroy desvernay 2014-10-15 22:01:20 UTC
Well, here we don't use mariadb 5.3 anymore and I don't have much time to look into this. Maybe removing these ports would be the less worse thing to do for now, maybe with lines in MOVED: upgrade to 5.5 should not break (unless using PBXT maybe, but it wasn't enabled by default).

I'm not aware of how to delete ports... svn diff is sufficient to submit here ? Should I change maintainer to ports@ and DEPRECATE them ?

Thank you for your help, and sorry to not be able to correct these for now
Comment 14 Bernard Spil freebsd_committer freebsd_triage 2014-10-18 09:44:20 UTC
Created attachment 148424 [details]
Build log mariadb-client 5.3.12_5
Comment 15 Bernard Spil freebsd_committer freebsd_triage 2014-10-18 09:44:44 UTC
Created attachment 148425 [details]
Build log mariadb-server 5.3.12_5
Comment 16 Bernard Spil freebsd_committer freebsd_triage 2014-10-18 09:55:31 UTC
A. SLAVE PORTS
The mysql and mariadb ports split in a -client and a -server part but mysql51-* and mariadb-* (5.3) split in 3 parts: -client, -server and -scripts. MariaDB 5.3 is a fork of MySQL 5.1 so it should align with the MySQL 5.1 port.

B. DEPENDENCIES
The newer version ports (5.5, 5.6) include the scripts into the -server port. There's an issue altogether with this as none of the ports containing the scripts pull in sufficient deps to actually run the scripts. All of perl, p5-DBD and p5-DBI-mysql(51) must be available to run the perl scripts of the distribution. 

mysql51-scripts pulls in perl via the mysql51-scripts/Makefile but pulls in p5-DBD-mysql51 via the mysql51-server/Makefile

Neither mariadb-server MARIADB_SCRIPTS_SLAVE nor  mariadb-client depend on p5-DBD-mysql so this can be seen as broken to begin with.

C. BUILD FAILURE
I was able to build both mariadb-client and -server 5.3.12_5 without problems on 10.1-RC2, buildlogs attached
Comment 18 Bernard Spil freebsd_committer freebsd_triage 2014-10-19 19:11:40 UTC
Created attachment 148473 [details]
Build logs of mariadb-{client,server,scripts}-5.3.12_5

Replaced the earlier buildlogs. All in one now
Comment 19 Bernard Spil freebsd_committer freebsd_triage 2014-10-19 19:14:29 UTC
Created attachment 148474 [details]
Patch for mariadb-server

Patch removes duplicates between -scripts and -server, copying as much as possible the mysql51-server and -client examples.
Comment 20 geoffroy desvernay 2014-10-26 01:00:25 UTC
Comment on attachment 148474 [details]
Patch for mariadb-server

maintainer-tested-and-approved :)
Comment 21 Mark Felder freebsd_committer freebsd_triage 2015-02-03 15:28:37 UTC
(In reply to geoffroy desvernay from comment #20)

Patch does not apply cleanly.

root@skeletor:/usr/ports # fetch -o /tmp/mariadb.diff "https://bz-attachments.freebsd.org/attachment.cgi?id=148474"
fetch: https://bz-attachments.freebsd.org/attachment.cgi?id=148474: size of remote file is not known
/tmp/mariadb.diff                                     1279  B   16 MBps 00m00s
root@skeletor:/usr/ports # svn patch /tmp/mariadb.diff
U         databases/mariadb-server/Makefile
>         applied hunk @@ -85,10 +85,6 @@ with offset 3
C         databases/mariadb-server/pkg-plist
>         rejected hunk @@ -395,3 +385,4 @@
Summary of conflicts:
  Text conflicts: 1
Comment 22 Mark Felder freebsd_committer freebsd_triage 2015-02-03 15:38:07 UTC
Created attachment 152516 [details]
mariadb53-client build failure

mariadb53-client fails to build on FreeBSD 10.0 via poudriere
Comment 23 geoffroy desvernay 2015-02-06 09:36:35 UTC
Created attachment 152604 [details]
updated patch

This one applies well.

I a maintainer change to Bernard (as discussed with him some time ago)
Comment 24 Bernard Spil freebsd_committer freebsd_triage 2015-02-08 11:22:09 UTC
Just tried a poudriere bulk for both 101amd64 and 100amd64. The 10.0 build fails on the my_gethostbyname_r macro.
Build output
10.0: checking style of gethost* routines... checking whether madvise is declared... yes other
checking style of gethostbyname_r routines... other
checking 3 argument to gethostbyname_r routines... char
10.1: checking style of gethost* routines... checking whether madvise is declared... yes other
checking style of gethostbyname_r routines... glibc2
checking 3 argument to gethostbyname_r routines... char

In 10.0 leading to
../include/my_net.h:113:74: note: expanded from macro 'my_gethostbyname_r'
#define my_gethostbyname_r(A,B,C,D,E) gethostbyname_r((A),(B),(C),(D),(E))
Looks like glibc1 vs glibc2 style gethostbyname_r

Not quite sure yet why it is behaving like this, further digging is required
Comment 25 geoffroy desvernay 2015-03-05 13:02:24 UTC
see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197679 for an interim solution
Comment 26 commit-hook freebsd_committer freebsd_triage 2015-03-26 19:25:06 UTC
A commit references this bug:

Author: feld
Date: Thu Mar 26 19:24:18 UTC 2015
New revision: 382337
URL: https://svnweb.freebsd.org/changeset/ports/382337

Log:
  Fix building on FreeBSD 10+
  Fix conflicts between client, server, and script packages
  Shebangfix

  The plists now are closer aligned with the mysql51-* ports

  PR:		197679
  PR:		171338

Changes:
  head/databases/mariadb-client/Makefile
  head/databases/mariadb-client/pkg-plist
  head/databases/mariadb-server/Makefile
  head/databases/mariadb-server/pkg-plist