Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mariadb: duplicating binary files in client and server packages #63723

Closed
Izorkin opened this issue Jun 24, 2019 · 9 comments
Closed

mariadb: duplicating binary files in client and server packages #63723

Izorkin opened this issue Jun 24, 2019 · 9 comments

Comments

@Izorkin
Copy link
Contributor

Izorkin commented Jun 24, 2019

Issue description

1db3a91#commitcomment-34044268
mysql_upgrade requires availability of mysqlcheck, which is in the package mariadb.client
In other operating systems they are separated - mysql_upgrade -> mariadb.server, mysqlcheck -> mariadb.client. And when the server is installed the client is automatically installed.

@gloaming
Copy link
Contributor

gloaming commented Jul 4, 2019

Hmm, is there a reason not to make the client a dependency of the server? The only dependencies the client has that the server doesn't are openssl and zlib which any server should have (via openssh). How much space is saved by removing the client binaries?

@gloaming
Copy link
Contributor

gloaming commented Jul 4, 2019

So it seems the mysql_upgrade binary is hardcoded to expect the other binaries in the same directory:

$ PATH=/nix/store/58imvk1bcbamifbrblmbaiqqzn0gwxmb-mariadb-client-10.3.15/bin /nix/store/qmiz7b38a8kw2pcdpzys2kvxl4v8d8pb-mariadb-10.3.15/bin/mysql_upgrade 
FATAL ERROR: Can't execute '/nix/store/qmiz7b38a8kw2pcdpzys2kvxl4v8d8pb-mariadb-10.3.15/bin/mysqlcheck

$ cp /nix/store/qmiz7b38a8kw2pcdpzys2kvxl4v8d8pb-mariadb-10.3.15/bin/mysql_upgrade .
$ ./mysql_upgrade 
FATAL ERROR: Can't execute './mysql'

$ cp /nix/store/qmiz7b38a8kw2pcdpzys2kvxl4v8d8pb-mariadb-10.3.15/bin/mysql .
$ ./mysql_upgrade 
FATAL ERROR: Can't execute './mysqlcheck'

Probably the splitting works on other distros because the binaries all end up in /usr/bin anyway.

@Izorkin
Copy link
Contributor Author

Izorkin commented Jul 4, 2019

Need to build the package with server+client and only client?
Is this variant bad?

  environment.systemPackages = with pkgs; [
    mariadb.server mariadb.client
  ];

@gloaming
Copy link
Contributor

gloaming commented Jul 5, 2019

I'm not sure what you mean.

Can you check to see if the project cmake allows you to configure a different install PREFIX for the client/server?

@Izorkin
Copy link
Contributor Author

Izorkin commented Jul 5, 2019

Should I change the build of MariaDB, so that one package includes files for both server and client, and the other package only includes client files?

Can you check to see if the project cmake allows you to configure a different install PREFIX for the client/server?

I don't know how to configure this

@gloaming
Copy link
Contributor

@FRidh 19.09 milestone? If this and #64132 aren't resolved by then we will have to add the client binaries back into the server package.

@Izorkin
Copy link
Contributor Author

Izorkin commented Jul 21, 2019

Izorkin@b24bce7 - this variant optimal?

@Izorkin Izorkin mentioned this issue Jul 27, 2019
10 tasks
@Izorkin
Copy link
Contributor Author

Izorkin commented Jul 28, 2019

#63355 update MariaDB configuration, please check this variant.

@Izorkin
Copy link
Contributor Author

Izorkin commented Aug 3, 2019

Fixed, mariadb package includes server and client binaries.
#63355

@Izorkin Izorkin closed this as completed Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants