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: 10.3.18 -> 10.3.20 #73267

Merged
merged 1 commit into from Nov 14, 2019
Merged

mariadb: 10.3.18 -> 10.3.20 #73267

merged 1 commit into from Nov 14, 2019

Conversation

aanderse
Copy link
Member

@aanderse aanderse commented Nov 12, 2019

Motivation for this change

Version bump. Replace #71713.

Reading the release notes I'm left with the impression this bump contains security fixes, but when I actually look at the mentioned CVEs only mysql is mentioned... 🤷‍♂️

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@aanderse aanderse requested a review from andir November 12, 2019 01:47
@aanderse
Copy link
Member Author

@GrahamcOfBorg test mysql

@aanderse
Copy link
Member Author

Unsure on darwin failure and currently no ability to look into it.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-in-distress/3604/11

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the darwin optional patch to potentially fix the darwin build. It's failing because the patch was already "successfully" applied (i.e. that commit is now in the source)

Copy link
Member

@Br1ght0ne Br1ght0ne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine on NixOS. Leaving MacOS issues to other maintainers.

@lilyball
Copy link
Member

I've dug into this on darwin and I can confirm that the patch is already present in this version of mariadb and can simply be removed.

Similarly the patch appears to be present in version 3.1.5 of mariadb-connector-c, which this PR doesn't update but whoever does update that should be aware.

@jonringer
Copy link
Contributor

I could do that as part of #71860

@lilyball
Copy link
Member

diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix
index dbb7f2e3fff..77413b825c6 100644
--- a/pkgs/servers/sql/mariadb/default.nix
+++ b/pkgs/servers/sql/mariadb/default.nix
@@ -46,12 +46,7 @@ common = rec { # attributes common to both builds
   patches = [
     ./cmake-includedir.patch
     ./cmake-libmariadb-includedir.patch
-  ] ++ optional stdenv.hostPlatform.isDarwin (fetchpatch {
-    url = "https://github.com/MariaDB/mariadb-connector-c/commit/ee91b2c98a63acb787114dee4f2694e154630928.patch";
-    extraPrefix = "libmariadb/";
-    sha256 = "06i865zwyhs9fvrgmargzn09pbg1cmably3c4wifd241bj8ig8qk";
-    stripLen = 1;
-  });
+  ];
 
   cmakeFlags = [
     "-DBUILD_CONFIG=mysql_release"

With this diff applied I've gotten past the patch phase and am currently in the process of building.

@lilyball
Copy link
Member

Build failed:

builder for '/nix/store/8pm4jr9cji1yfk6gfbi1bazkssbgbh1a-mariadb-server-10.3.18.drv' failed with exit code 2; last 10 log lines:
        _auth_sha256_client in sha256_pw.c.o
    "_RSA_public_encrypt", referenced from:
        _auth_sha256_client in sha256_pw.c.o
    "_RSA_size", referenced from:
        _auth_sha256_client in sha256_pw.c.o
  ld: symbol(s) not found for architecture x86_64
  clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
  make[2]: *** [libmariadb/CMakeFiles/sha256_password.dir/build.make:84: libmariadb/sha256_password.so] Error 1
  make[1]: *** [CMakeFiles/Makefile2:605: libmariadb/CMakeFiles/sha256_password.dir/all] Error 2
  make: *** [Makefile:152: all] Error 2
cannot build derivation '/nix/store/58axybx0k1gg4svqqh4k25wyaavirj8s-env.drv': 1 dependencies couldn't be built
[0 built (1 failed), 1 copied (68.6 MiB), 62.7 MiB DL]
error: build of '/nix/store/58axybx0k1gg4svqqh4k25wyaavirj8s-env.drv' failed
1 package failed to build:
mariadb

@lilyball
Copy link
Member

Though now I'm wondering why the build failure said 10.3.18. I used nix-review off of the current working tree.

@lilyball
Copy link
Member

Ok forget that failure. I suspect what happened was nix-review just applied my staged changes (removing the patch) on top of the current nixpkgs instead of using the commit I had checked out. That would be explained by a variable named CRYPT_LIBS being broken. I'll let you know when my rebuild finishes.

@Izorkin
Copy link
Contributor

Izorkin commented Nov 12, 2019

I am added update MariaDB to 10.3.20 in #70924

@lilyball
Copy link
Member

This build takes a long time and I need to run. I'm cancelling my build, but suffice to say it got well past sha256_password (the spurious failure reported before). I'll let ofBorg deal with rebuilding this after the patch is removed, or with building #70924 instead.

@aanderse
Copy link
Member Author

@Izorkin I'm not sure what the state of your other PR is, but it has been sitting for a while. Since this is a security update I think it makes sense to have a very simple PR which can be merged quickly and have a backport in good time.

If your other PR is merged before this one that is fine too. Whatever gets security release faster is what we can go with.

@lilyball so this PR should be good to go on darwin now that I have updated... maybe? 😄

@filalex77 @jonringer @lilyball @Izorkin thanks for feedback so far. I had a busy day and didn't get a chance to respond so I appreciate the work you put in on this 🎉

@lilyball
Copy link
Member

Looks like ofBorg successfully built this on darwin 🎉

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nix-review passes on NixOS
diff LGTM

https://github.com/NixOS/nixpkgs/pull/73267
1 package are marked as broken and were skipped:
unixODBCDrivers.mysql

49 package were build:
akonadi akregator automysqlbackup diesel-cli digikam kaddressbook kdeApplications.akonadi-calendar kdeApplications.akonadi-contacts kdeApplications.akonadi-import-wizard kdeApplications.akonadi-mime kdeApplications.akonadi-notes kdeApplications.akonadi-search kdeApplications.akonadiconsole kdeApplications.calendarsupport kdeApplications.eventviews kdeApplications.incidenceeditor kdeApplications.kalarm kdeApplications.kalarmcal kdeApplications.kdepim-addons kdeApplications.kdepim-apps-libs kdeApplications.kdepim-runtime kgpg kmail kdeApplications.kmail-account-wizard kdeApplications.kmailtransport kdeApplications.knotes kontact korganizer kdeApplications.libgravatar kdeApplications.libkdepim kdeApplications.libksieve kdeApplications.mailcommon kdeApplications.mailimporter kdeApplications.mbox-importer kdeApplications.messagelib kdeApplications.pim-data-exporter kdeApplications.pim-sieve-editor kdeApplications.pimcommon kmymoney lua51Packages.luadbi-mysql luaPackages.luadbi-mysql lua53Packages.luadbi-mysql luajitPackages.luadbi-mysql mysql shmig snabb trojita zanshin zoneminder

@jonringer
Copy link
Contributor

@GrahamcOfBorg test mysql

@jonringer
Copy link
Contributor

the tests passed locally

@jonringer jonringer merged commit 2295a94 into NixOS:master Nov 14, 2019
@aanderse aanderse deleted the mariadb branch November 14, 2019 18:29
@aanderse
Copy link
Member Author

Thanks again, all! 🎉

@aanderse
Copy link
Member Author

Right... security fixes included. Anyone interested in doing backport? ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants