Bug 227628

Summary: databases/mariadb55-server, databases/mariadb100-server, databases/mariadb101-server, databases/mariadb102-server: Fix build for aarch64
Product: Ports & Packages Reporter: Naram Qashat <cyberbotx>
Component: Individual Port(s)Assignee: Bernard Spil <brnrd>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: needs-qa, patch
Priority: --- Flags: bugzilla: maintainer-feedback? (brnrd)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
mariadb102-server.patch
none
mariadb101-server.patch
none
mariadb100-server.patch
none
mariadb55-server.patch none

Description Naram Qashat 2018-04-19 03:39:08 UTC
Created attachment 192637 [details]
mariadb102-server.patch

These patches allow the MariaDB ports to build for aarch64. They didn't build because of their use of sbrk, which is not available under the aarch64 architecture of FreeBSD. I used the patch applied to MySQL from Oracle as shown here:

https://github.com/mysql/mysql-server/commit/75271e51d60bce8683423b208cbb43b11ca6060e

I did not check if MariaDB runs with these patches, though, only that it builds and links. I do not have a working aarch64 system to test runtime with these patches. But considering that the above commit to MySQL limits this code to Linux, I suspect the server should run just fine under FreeBSD still.

(Patches for 55, 100 and 101 will be in the following messages.)
Comment 1 Naram Qashat 2018-04-19 03:39:32 UTC
Created attachment 192638 [details]
mariadb101-server.patch
Comment 2 Naram Qashat 2018-04-19 03:40:06 UTC
Created attachment 192639 [details]
mariadb100-server.patch
Comment 3 Naram Qashat 2018-04-19 03:40:32 UTC
Created attachment 192640 [details]
mariadb55-server.patch
Comment 4 Bernard Spil freebsd_committer freebsd_triage 2018-04-21 10:04:15 UTC
Hi Naram,

Thanks for generating the patches! Have you already submitted these upstream at https://jira.mariadb.org/ or has someone else already done so?

There should be new versions of MariaDB out very soon, I'll try to merge your patches too.

Cheers, Bernard.
Comment 5 Naram Qashat 2018-04-21 14:40:19 UTC
I have not submitted the patches upstream yet. I could do so later today, though.
Comment 6 Naram Qashat 2018-04-21 22:19:06 UTC
I have submitted this upstream now:

https://jira.mariadb.org/browse/MDEV-15961

Hopefully it should make it into the next version, if not the version after that.
Comment 7 Bernard Spil freebsd_committer freebsd_triage 2018-04-22 08:07:59 UTC
Thanks Naram!

I've imported the patches into my porting tree. They will land together with the security patches in te coming weeks. See http://www.vuxml.org/freebsd/57aec168-453e-11e8-8777-b499baebfeaf.html
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-04-23 19:12:47 UTC
A commit references this bug:

Author: brnrd
Date: Mon Apr 23 19:12:24 UTC 2018
New revision: 468131
URL: https://svnweb.freebsd.org/changeset/ports/468131

Log:
  databases/mariadb55-server: Security update to 5.5.60

   - Fix build with aarch64 [1]
   - Remove new ${name}_limits behavior from 11-STABLE [2]

  PR:		227628 [1], 227434 [2]
  Submitted by:	Naram Qashat <cyberbotx cyberbotx com> [1], 0mp [2]
  MFH:		2018Q2
  Security:	57aec168-453e-11e8-8777-b499baebfeaf

Changes:
  head/databases/mariadb55-server/Makefile
  head/databases/mariadb55-server/distinfo
  head/databases/mariadb55-server/files/patch-MDEV-15961
Comment 9 commit-hook freebsd_committer freebsd_triage 2018-04-27 11:24:14 UTC
A commit references this bug:

Author: brnrd
Date: Fri Apr 27 11:23:15 UTC 2018
New revision: 468422
URL: https://svnweb.freebsd.org/changeset/ports/468422

Log:
  databases/mariadb100-server: Security update to 10.0.35

   - Fix build with aarch64 [1]
   - Remove new ${name}_limits behavior from 11-STABLE [2]

  PR:             227628 [1], 227434 [2]
  Submitted by:   Naram Qashat <cyberbotx cyberbotx com> [1]
  Submitted by:   0mp [2]
  MFH:            2018Q2
  Security:       57aec168-453e-11e8-8777-b499baebfeaf

Changes:
  head/databases/mariadb100-server/Makefile
  head/databases/mariadb100-server/distinfo
  head/databases/mariadb100-server/files/extra-patch-MDEV-15288
  head/databases/mariadb100-server/files/patch-mysys_stacktrace.c
Comment 10 commit-hook freebsd_committer freebsd_triage 2018-04-27 11:35:27 UTC
A commit references this bug:

Author: brnrd
Date: Fri Apr 27 11:35:08 UTC 2018
New revision: 468423
URL: https://svnweb.freebsd.org/changeset/ports/468423

Log:
  MFH: r468131

  databases/mariadb55-server: Security update to 5.5.60

   - Fix build with aarch64 [1]
   - Remove new ${name}_limits behavior from 11-STABLE [2]

  PR:		227628 [1], 227434 [2]
  Submitted by:	Naram Qashat <cyberbotx cyberbotx com> [1], 0mp [2]
  Security:	57aec168-453e-11e8-8777-b499baebfeaf

  Approved by:	ports-secteam (riggs)

Changes:
_U  branches/2018Q2/
  branches/2018Q2/databases/mariadb55-server/Makefile
  branches/2018Q2/databases/mariadb55-server/distinfo
  branches/2018Q2/databases/mariadb55-server/files/patch-MDEV-15961
Comment 11 commit-hook freebsd_committer freebsd_triage 2018-05-06 19:23:43 UTC
A commit references this bug:

Author: brnrd
Date: Sun May  6 19:23:26 UTC 2018
New revision: 469246
URL: https://svnweb.freebsd.org/changeset/ports/469246

Log:
  databases/mariadb102-server: Fix builds

   - Fix build on aarch64 [1]
   - Fix build with clang6 (HEAD, 11-STABLE) [2]

  PR:             227628 [1], 227244 [2]
  Submitted by:   Naram Qashat <cyberbotx cyberbotx com> [1]
  Submitted by:   dim

Changes:
  head/databases/mariadb102-server/Makefile
  head/databases/mariadb102-server/files/patch-MDEV-15768
  head/databases/mariadb102-server/files/patch-MDEV-15961
Comment 12 commit-hook freebsd_committer freebsd_triage 2018-05-11 09:37:57 UTC
A commit references this bug:

Author: brnrd
Date: Fri May 11 09:37:51 UTC 2018
New revision: 469620
URL: https://svnweb.freebsd.org/changeset/ports/469620

Log:
  databases/mariadb101-server: Security update to 10.1.33

   - Fix build on aarch64 [1]
   - Remove ${name}_limits for 11-STABLE [2]

  PR:             227628 [1], 227434 [2], 228148 [3]
  Submitted by:   Naram Qashat <cyberbotx cyberbotx com> [1]
  Submitted by:   0mp [2]
  Reported by:    Miroslav Lachman <000 fbsd quip cz> [3]
  MFH:            2018Q2
  Security:       57aec168-453e-11e8-8777-b499baebfeaf

Changes:
  head/databases/mariadb101-server/Makefile
  head/databases/mariadb101-server/distinfo
  head/databases/mariadb101-server/files/patch-MDEV-15961
  head/databases/mariadb101-server/files/patch-sql-common_client.c
  head/databases/mariadb101-server/pkg-plist
Comment 13 Bernard Spil freebsd_committer freebsd_triage 2018-05-11 09:45:27 UTC
All versions have been patched.

Thanks for providing the patches Naram!
Comment 14 commit-hook freebsd_committer freebsd_triage 2018-05-13 14:03:21 UTC
A commit references this bug:

Author: brnrd
Date: Sun May 13 14:02:19 UTC 2018
New revision: 469795
URL: https://svnweb.freebsd.org/changeset/ports/469795

Log:
  MFH: r469620 r469631

  databases/mariadb101-server: Security update to 10.1.33

   - Fix build on aarch64 [1]
   - Remove ${name}_limits for 11-STABLE [2]

  PR:             227628 [1], 227434 [2], 228148 [3]
  Submitted by:   Naram Qashat <cyberbotx cyberbotx com> [1]
  Submitted by:   0mp [2]
  Reported by:    Miroslav Lachman <000 fbsd quip cz> [3]
  Security:       57aec168-453e-11e8-8777-b499baebfeaf

  databases/mariadb101-client: Fix patch

  Reported by:	Niels Poppe

  Approved by:	portmgr (riggs)

Changes:
_U  branches/2018Q2/
  branches/2018Q2/databases/mariadb101-client/files/patch-sql-common_client.c
  branches/2018Q2/databases/mariadb101-server/Makefile
  branches/2018Q2/databases/mariadb101-server/distinfo
  branches/2018Q2/databases/mariadb101-server/files/patch-MDEV-15961
  branches/2018Q2/databases/mariadb101-server/files/patch-sql-common_client.c
  branches/2018Q2/databases/mariadb101-server/pkg-plist