Bug 211328 - databases/mariadb101-client version 10.1.16 Failed: patch
Summary: databases/mariadb101-client version 10.1.16 Failed: patch
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Bernard Spil
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-24 07:14 UTC by Matthias Fechner
Modified: 2016-09-15 19:48 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brnrd)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Fechner freebsd_committer freebsd_triage 2016-07-24 07:14:30 UTC
try to build the port, you will get a patch error:
===>  Patching for mariadb101-client-10.1.16
===>  Applying FreeBSD patches for mariadb101-client-10.1.16
1 out of 7 hunks failed--saving rejects to scripts/CMakeLists.txt.rej
=> Patch patch-scripts_CMakeLists.txt failed to apply cleanly.
=> Patch(es) patch-CMakeLists.txt patch-client_CMakeLists.txt patch-cmake_ssl.cmake patch-extra_CMakeLists.txt patch-include_CMakeLists.txt patch-include_my__compare.h patch-libmysql_CMakeLists.txt patch-libservices_CMakeLists.txt patch-man_CMakeLists.txt patch-mysys_my__default.c patch-pcre_CMakeLists.txt applied cleanly.
*** Error code 1

For full log please see here:
https://pkg.fechner.net/data/103amd64-default/2016-07-24_08h54m44s/logs/errors/mariadb101-client-10.1.16.log
Comment 1 Laurence 'GreenReaper' Parry 2016-07-24 08:30:15 UTC
The rejected patch portion is:

@@ -285,18 +291,8 @@
   SET(BIN_SCRIPTS
     msql2mysql
     mysql_config
-    mysql_fix_extensions
-    mysql_setpermission
-    mysql_secure_installation
-    mysql_zap
     mysqlaccess
-    mysql_convert_table_format
     mysql_find_rows
-    mytop
-    mysqlhotcopy
-    mysqldumpslow
-    mysqld_multi
-    mysqld_safe
     ${WSREP_BINARIES}
     ${SYSTEMD_SCRIPTS}
   )

mariadb-10.1.16/scripts/CMakeLists.txt appears to now have an external variable WITHOUT_SERVER. If this is not set, then SERVER_SCRIPTS is set to

      mysql_fix_extensions
      mysql_zap
      mysqld_multi
      mysqld_safe
      mysqldumpslow

${SERVER_SCRIPTS} is then included in in the SET(BIN_SCRIPTS) block a little further down, instead of the above server lines.

To resolve this, we might to cut the above five removals from the patch and:
a) set WITHOUT_SERVER, *or*
b) remove ${SERVER_SCRIPTS} in the patch instead

I chose b) as it's possible that WITHOUT_SERVER has other complications, and I modified the port's files/patch-scripts_CMakeLists.txt to end with:

@@ -284,14 +291,8 @@ ELSE()
   SET(BIN_SCRIPTS
     msql2mysql
     mysql_config
-    mysql_setpermission
-    mysql_secure_installation
     mysqlaccess
-    mysql_convert_table_format
     mysql_find_rows
-    mytop
-    mysqlhotcopy
-    ${SERVER_SCRIPTS}
     ${WSREP_BINARIES}
     ${SYSTEMD_SCRIPTS}
   )

This worked, but there may be a better way.
(Note: other line numbers may have changed.)
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-07-24 10:23:54 UTC
A commit references this bug:

Author: brnrd
Date: Sun Jul 24 10:23:45 UTC 2016
New revision: 418997
URL: https://svnweb.freebsd.org/changeset/ports/418997

Log:
  databases/mariadb101-client: Update to 10.1.16

    - -client was missig from the -server commit
    - post-install target to post-stage
    - Delete private headers
    - Add service_encryption.h patch
    - Fix scipts/CMakeLists.txt patch

  PR:             211328

Changes:
  head/databases/mariadb101-client/Makefile
  head/databases/mariadb101-client/files/patch-include_mysql_service__encryption.h
  head/databases/mariadb101-client/files/patch-scripts_CMakeLists.txt
Comment 3 Bernard Spil freebsd_committer freebsd_triage 2016-07-24 10:25:00 UTC
So sorry... Only committed the server part and not the client part.

This fixes the issue.
Comment 4 Matthias Fechner freebsd_committer freebsd_triage 2016-07-24 15:03:52 UTC
Thanks a lot!
Builds fine again.
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-09-15 19:48:15 UTC
A commit references this bug:

Author: brnrd
Date: Thu Sep 15 19:47:38 UTC 2016
New revision: 422222
URL: https://svnweb.freebsd.org/changeset/ports/422222

Log:
  MFH: r418997

  databases/mariadb101-client: Update to 10.1.16

    - -client was missig from the -server commit
    - post-install target to post-stage
    - Delete private headers
    - Add service_encryption.h patch
    - Fix scipts/CMakeLists.txt patch

  PR:             211328

  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/databases/mariadb101-client/Makefile
  branches/2016Q3/databases/mariadb101-client/files/patch-include_mysql_service__encryption.h
  branches/2016Q3/databases/mariadb101-client/files/patch-scripts_CMakeLists.txt