···7676 peer-to-peer communication,
7777- can be additionally configured with environment variables,
7878- automatically determines whether `netbird-ui-<name>` should be available,
7979+- does not enable [routing features](#opt-services.netbird.useRoutingFeatures) by default
8080+ If you plan to use routing features, you must explicitly enable them. By enabling them, the service will
8181+ configure the firewall and enable IP forwarding on the system.
8282+ When set to `client` or `both`, reverse path filtering will be set to loose instead of strict.
8383+ When set to `server` or `both`, IP forwarding will be enabled.
79848085[autoStart](#opt-services.netbird.clients._name_.autoStart) allows you to start the client (an actual systemd service)
8186on demand, for example to connect to work-related or otherwise conflicting network only when required.
+55-26
nixos/modules/services/networking/netbird.nix
···2424 mkMerge
2525 mkOption
2626 mkOptionDefault
2727+ mkOverride
2728 mkPackageOption
2829 nameValuePair
2930 optional
···8384 type = bool;
8485 default = false;
8586 description = ''
8686- Enables backwards compatible Netbird client service.
8787+ Enables backward-compatible NetBird client service.
87888889 This is strictly equivalent to:
8990···112113 };
113114 ui.package = mkPackageOption pkgs "netbird-ui" { };
114115116116+ useRoutingFeatures = mkOption {
117117+ type = enum [
118118+ "none"
119119+ "client"
120120+ "server"
121121+ "both"
122122+ ];
123123+ default = "none";
124124+ example = "server";
125125+ description = ''
126126+ Enables settings required for NetBird's routing features: Network Resources, Network Routes & Exit Nodes.
127127+128128+ When set to `client` or `both`, reverse path filtering will be set to loose instead of strict.
129129+ When set to `server` or `both`, IP forwarding will be enabled.
130130+ '';
131131+ };
132132+115133 clients = mkOption {
116134 type = attrsOf (
117135 submodule (
···125143 type = port;
126144 example = literalExpression "51820";
127145 description = ''
128128- Port the Netbird client listens on.
146146+ Port the NetBird client listens on.
129147 '';
130148 };
131149···146164 default = null;
147165 example = "127.0.0.123";
148166 description = ''
149149- An explicit address that Netbird will serve `*.netbird.cloud.` (usually) entries on.
167167+ An explicit address that NetBird will serve `*.netbird.cloud.` (usually) entries on.
150168151151- Netbird serves DNS on it's own (dynamic) client address by default.
169169+ NetBird serves DNS on it's own (dynamic) client address by default.
152170 '';
153171 };
154172···200218 description = ''
201219 Start the service with the system.
202220203203- As of 2024-02-13 it is not possible to start a Netbird client daemon without immediately
221221+ As of 2024-02-13 it is not possible to start a NetBird client daemon without immediately
204222 connecting to the network, but it is [planned for a near future](https://github.com/netbirdio/netbird/projects/2#card-91718018).
205223 '';
206224 };
···209227 type = bool;
210228 default = true;
211229 description = ''
212212- Opens up firewall `port` for communication between Netbird peers directly over LAN or public IP,
230230+ Opens up firewall `port` for communication between NetBird peers directly over LAN or public IP,
213231 without using (internet-hosted) TURN servers as intermediaries.
214232 '';
215233 };
···247265 "trace"
248266 ];
249267 default = "info";
250250- description = "Log level of the Netbird daemon.";
268268+ description = "Log level of the NetBird daemon.";
251269 };
252270253271 ui.enable = mkOption {
···255273 default = nixosConfig.services.netbird.ui.enable;
256274 defaultText = literalExpression ''client.ui.enable'';
257275 description = ''
258258- Controls presence of `netbird-ui` wrapper for this Netbird client.
276276+ Controls presence of `netbird-ui` wrapper for this NetBird client.
259277 '';
260278 };
261279···292310 mkdir -p "$out/share/applications"
293311 substitute ${cfg.ui.package}/share/applications/netbird.desktop \
294312 "$out/share/applications/${mkBin "netbird"}.desktop" \
295295- --replace-fail 'Name=Netbird' "Name=Netbird @ ${client.service.name}" \
313313+ --replace-fail 'Name=NetBird' "Name=NetBird @ ${client.service.name}" \
296314 --replace-fail '${lib.getExe cfg.ui.package}' "$out/bin/${mkBin "netbird-ui"}"
297315 '')
298316 ];
···348366 type = path;
349367 default = "/var/lib/${client.dir.baseName}";
350368 description = ''
351351- A state directory used by Netbird client to store `config.json`, `state.json` & `resolv.conf`.
369369+ A state directory used by NetBird client to store `config.json`, `state.json` & `resolv.conf`.
352370 '';
353371 };
354372 dir.runtime = mkOption {
355373 type = path;
356374 default = "/var/run/${client.dir.baseName}";
357375 description = ''
358358- A runtime directory used by Netbird client.
376376+ A runtime directory used by NetBird client.
359377 '';
360378 };
361379 service.name = mkOption {
···415433 );
416434 default = { };
417435 description = ''
418418- Attribute set of Netbird client daemons, by default each one will:
436436+ Attribute set of NetBird client daemons, by default each one will:
419437420438 1. be manageable using dedicated tooling:
421439 - `netbird-<name>` script,
422422- - `Netbird - netbird-<name>` graphical interface when appropriate (see `ui.enable`),
440440+ - `NetBird - netbird-<name>` graphical interface when appropriate (see `ui.enable`),
423441 2. run as a `netbird-<name>.service`,
424442 3. listen for incoming remote connections on the port `51820` (`openFirewall` by default),
425443 4. manage the `netbird-<name>` wireguard interface,
···467485 networking.dhcpcd.denyInterfaces = toClientList (client: client.interface);
468486 networking.networkmanager.unmanaged = toClientList (client: "interface-name:${client.interface}");
469487470470- networking.firewall.allowedUDPPorts = concatLists (
471471- toClientList (client: optional client.openFirewall client.port)
472472- );
488488+ # Required for the routing ("Exit node") feature(s) to work
489489+ boot.kernel.sysctl = mkIf (cfg.useRoutingFeatures == "server" || cfg.useRoutingFeatures == "both") {
490490+ "net.ipv4.conf.all.forwarding" = mkOverride 97 true;
491491+ "net.ipv6.conf.all.forwarding" = mkOverride 97 true;
492492+ };
473493474474- # Ports opened on a specific
475475- networking.firewall.interfaces = listToAttrs (
476476- toClientList (client: {
477477- name = client.interface;
478478- value.allowedUDPPorts = optionals client.openFirewall [
479479- 5353 # required for the DNS forwarding/routing to work
480480- ];
481481- })
482482- );
494494+ networking.firewall = {
495495+ allowedUDPPorts = concatLists (toClientList (client: optional client.openFirewall client.port));
496496+497497+ # Required for the routing ("Exit node") feature(s) to work
498498+ checkReversePath = mkIf (
499499+ cfg.useRoutingFeatures == "client" || cfg.useRoutingFeatures == "both"
500500+ ) "loose";
501501+502502+ # Ports opened on a specific
503503+ interfaces = listToAttrs (
504504+ toClientList (client: {
505505+ name = client.interface;
506506+ value.allowedUDPPorts = optionals client.openFirewall [
507507+ 5353 # required for the DNS forwarding/routing to work
508508+ ];
509509+ })
510510+ );
511511+ };
483512484513 systemd.network.networks = mkIf config.networking.useNetworkd (
485514 toClientAttrs (
···601630 # see https://github.com/systemd/systemd/blob/17f3e91e8107b2b29fe25755651b230bbc81a514/src/resolve/org.freedesktop.resolve1.policy#L43-L43
602631 # see all actions used at https://github.com/netbirdio/netbird/blob/13e7198046a0d73a9cd91bf8e063fafb3d41885c/client/internal/dns/systemd_linux.go#L29-L32
603632 security.polkit.extraConfig = mkIf config.services.resolved.enable ''
604604- // systemd-resolved access for Netbird clients
633633+ // systemd-resolved access for NetBird clients
605634 polkit.addRule(function(action, subject) {
606635 var actions = [
607636 "org.freedesktop.resolve1.revert",
+22-50
nixos/tests/lomiri.nix
···6464 ];
6565 }
6666 ''
6767- magick -size 640x480 canvas:white -pointsize 30 -fill black -annotate +100+100 '${wallpaperText}' $out
6868- '';
6969- # gsettings tool with access to wallpaper schema
7070- lomiri-gsettings =
7171- pkgs:
7272- pkgs.stdenv.mkDerivation {
7373- name = "lomiri-gsettings";
7474- dontUnpack = true;
7575- nativeBuildInputs = with pkgs; [
7676- glib
7777- wrapGAppsHook3
7878- ];
7979- buildInputs = with pkgs; [
8080- # Not using the Lomiri-namespaced setting yet
8181- # lomiri.lomiri-schemas
8282- gsettings-desktop-schemas
8383- ];
8484- installPhase = ''
8585- runHook preInstall
8686- mkdir -p $out/bin
8787- ln -s ${pkgs.lib.getExe' pkgs.glib "gsettings"} $out/bin/lomiri-gsettings
8888- runHook postInstall
6767+ magick -size 640x480 canvas:black -pointsize 30 -fill white -annotate +100+100 '${wallpaperText}' $out
8968 '';
9090- };
9191- setLomiriWallpaperService =
9292- pkgs:
9393- let
9494- lomiriServices = [
9595- "lomiri.service"
9696- "lomiri-full-greeter.service"
9797- "lomiri-full-shell.service"
9898- "lomiri-greeter.service"
9999- "lomiri-shell.service"
100100- ];
101101- in
102102- rec {
103103- description = "Set Lomiri wallpaper to something OCR-able";
104104- wantedBy = lomiriServices;
105105- before = lomiriServices;
106106- serviceConfig = {
107107- Type = "oneshot";
108108- # Not using the Lomiri-namespaed settings yet
109109- # ExecStart = "${lomiri-gsettings pkgs}/bin/lomiri-gsettings set com.lomiri.Shell background-picture-uri file://${wallpaperFile pkgs}";
110110- ExecStart = "${lomiri-gsettings pkgs}/bin/lomiri-gsettings set org.gnome.desktop.background picture-uri file://${wallpaperFile pkgs}";
6969+7070+ lomiriWallpaperDconfSettings = pkgs: {
7171+ settings = {
7272+ "org/gnome/desktop/background" = {
7373+ picture-uri = "file://${wallpaperFile pkgs}";
11174 };
11275 };
7676+ };
1137711478 sharedTestFunctions = ''
11579 def wait_for_text(text):
···412376 })
413377 ];
414378 };
379379+380380+ programs.dconf.profiles.user.databases = [
381381+ (lomiriWallpaperDconfSettings pkgs)
382382+ ];
415383416384 # Help with OCR
417385 systemd.tmpfiles.settings = {
418386 "10-lomiri-test-setup" = terminalOcrTmpfilesSetup { inherit pkgs lib config; };
419387 };
420420-421421- systemd.user.services.set-lomiri-wallpaper = setLomiriWallpaperService pkgs;
422388 };
423389424390 enableOCR = true;
···562528 ];
563529 };
564530531531+ programs.dconf.profiles.user.databases = [
532532+ (lomiriWallpaperDconfSettings pkgs)
533533+ ];
534534+565535 # Help with OCR
566536 systemd.tmpfiles.settings = {
567537 "10-lomiri-test-setup" = terminalOcrTmpfilesSetup { inherit pkgs lib config; };
568538 };
569569-570570- systemd.user.services.set-lomiri-wallpaper = setLomiriWallpaperService pkgs;
571539 };
572540573541 enableOCR = true;
···710678711679 environment.etc."${wallpaperName}".source = wallpaperFile pkgs;
712680713713- systemd.user.services.set-lomiri-wallpaper = setLomiriWallpaperService pkgs;
681681+ programs.dconf.profiles.user.databases = [
682682+ (lomiriWallpaperDconfSettings pkgs)
683683+ ];
714684715685 # Help with OCR
716686 systemd.tmpfiles.settings = {
···733703 machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
734704735705 # Start page shows current time
736736- wait_for_text(r"(AM|PM)")
706706+ # And the greeter *actually* renders our wallpaper!
707707+ wait_for_text(r"(AM|PM|Lorem|ipsum)")
737708 machine.screenshot("lomiri_greeter_launched")
738709739710 # Advance to login part
···747718748719 # Output rendering from Lomiri has started when it starts printing performance diagnostics
749720 machine.wait_for_console_text("Last frame took")
721721+ # And the desktop doesn't render the wallpaper anymore. Grumble grumble...
750722 # Look for datetime's clock, one of the last elements to load
751723 wait_for_text(r"(AM|PM)")
752724 machine.screenshot("lomiri_launched")
···849821 ocr = [ "Log Out" ];
850822 extraCheck = ''
851823 # We should be able to log out and return to the greeter
852852- mouse_click(600, 280) # "Log Out"
824824+ mouse_click(600, 250) # "Log Out"
853825 mouse_click(340, 220) # confirm logout
854826 machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
855827 '';
···3333and the name of the extension you want to package as `extension`:
34343535```sh
3636-./query-extension-index.sh --cli-version=2.61.0 --extension=azure-devops --download
3636+nix run .#azure-cli.extension-tool -- \
3737+ --cli-version=2.61.0 \
3838+ --extension=azure-devops \
3939+ --init
3740```
38413942The output should look something like this:
···4144```json
4245{
4346 "pname": "azure-devops",
4444- "description": "Tools for managing Azure DevOps.",
4545- "version": "1.0.1",
4646- "url": "https://github.com/Azure/azure-devops-cli-extension/releases/download/20240514.1/azure_devops-1.0.1-py2.py3-none-any.whl",
4747- "sha256": "f300d0288f017148514ebe6f5912aef10c7a6f29bdc0c916b922edf1d75bc7db",
4747+ "version": "1.0.2",
4848+ "url": "https://github.com/Azure/azure-devops-cli-extension/releases/download/20250624.2/azure_devops-1.0.2-py2.py3-none-any.whl",
4949+ "hash": "sha256-4rDeAqOnRRKMP26MJxG4u9vBuos6/SQIoVgfNbBpulk=",
5050+ "description": "Tools for managing Azure DevOps",
4851 "license": "MIT",
4949- "requires": [
5050- "distro (==1.3.0)",
5151- "distro==1.3.0"
5252+ "requirements": [
5353+ "distro (>=1.6.0)"
5254 ]
5355}
5456```
···5961{
6062 azure-devops = mkAzExtension {
6163 pname = "azure-devops";
6262- version = "1.0.0";
6363- url = "https://github.com/Azure/azure-devops-cli-extension/releases/download/20240206.1/azure_devops-${version}-py2.py3-none-any.whl";
6464- sha256 = "658a2854d8c80f874f9382d421fa45abf6a38d00334737dda006f8dec64cf70a";
6464+ version = "1.0.2";
6565+ url = "https://github.com/Azure/azure-devops-cli-extension/releases/download/20250624.2/azure_devops-${version}-py2.py3-none-any.whl";
6666+ hash = "sha256-4rDeAqOnRRKMP26MJxG4u9vBuos6/SQIoVgfNbBpulk=";
6567 description = "Tools for managing Azure DevOps";
6668 propagatedBuildInputs = with python3Packages; [ distro ];
6769 meta.maintainers = with lib.maintainers; [ katexochen ];
···71737274* The attribute name should be the same as `pname`.
7375* Replace the version in `url` with `${version}`.
7474-* The json output `requires` must be transformed into `propagetedBuildInputs`.
7676+* The json output `requirements` must be transformed into package `requirements`.
7577* If `license` is `"MIT"`, it can be left out in the nix expression, as the builder defaults to that license.
7678* Add yourself as maintainer in `meta.maintainers`.
7779
+55-4
pkgs/by-name/az/azure-cli/extensions-tool.py
···174174 return max(versions, key=lambda e: parse(e["metadata"]["version"]), default=None)
175175176176177177-def processExtension(
177177+def find_extension_version(
178178 extVersions: dict,
179179 cli_version: Version,
180180 ext_name: Optional[str] = None,
181181 requirements: bool = False,
182182-) -> Optional[Ext]:
182182+) -> Optional[Dict[str, Any]]:
183183 versions = filter(_filter_invalid, extVersions)
184184 versions = filter(lambda v: _filter_compatible(v, cli_version), versions)
185185 latest = _get_latest_version(versions)
···188188 if ext_name and latest["metadata"]["name"] != ext_name:
189189 return None
190190 if not requirements and "run_requires" in latest["metadata"]:
191191+ return None
192192+ return latest
193193+194194+195195+def find_and_transform_extension_version(
196196+ extVersions: dict,
197197+ cli_version: Version,
198198+ ext_name: Optional[str] = None,
199199+ requirements: bool = False,
200200+) -> Optional[Ext]:
201201+ latest = find_extension_version(extVersions, cli_version, ext_name, requirements)
202202+ if not latest:
191203 return None
192204193205 return _transform_dict_to_obj(latest)
···335347 action=argparse.BooleanOptionalAction,
336348 help="whether to commit changes to git",
337349 )
350350+ parser.add_argument(
351351+ "--init",
352352+ action=argparse.BooleanOptionalAction,
353353+ help="whether you want to init a new extension",
354354+ )
338355 args = parser.parse_args()
339356 cli_version = parse(args.cli_version)
340357···348365 assert index["formatVersion"] == "1" # only support formatVersion 1
349366 extensions_remote = index["extensions"]
350367368368+ # init just prints the json of the extension version that matches the cli version.
369369+ if args.init:
370370+ if not args.extension:
371371+ logger.error("extension name is required for --init")
372372+ exit(1)
373373+374374+ for ext_name, ext_versions in extensions_remote.items():
375375+ if ext_name != args.extension:
376376+ continue
377377+ ext = find_extension_version(
378378+ ext_versions,
379379+ cli_version,
380380+ args.extension,
381381+ requirements=True,
382382+ )
383383+ break
384384+ if not ext:
385385+ logger.error(f"Extension {args.extension} not found in index")
386386+ exit(1)
387387+388388+ ext_translated = {
389389+ "pname": ext["metadata"]["name"],
390390+ "version": ext["metadata"]["version"],
391391+ "url": ext["downloadUrl"],
392392+ "hash": _convert_hash_digest_from_hex_to_b64_sri(ext["sha256Digest"]),
393393+ "description": ext["metadata"]["summary"].rstrip("."),
394394+ "license": ext["metadata"]["license"],
395395+ "requirements": ext["metadata"]["run_requires"][0]["requires"],
396396+ }
397397+ print(json.dumps(ext_translated, indent=2))
398398+ return
399399+351400 if args.extension:
352401 logger.info(f"updating extension: {args.extension}")
353402354403 ext = Optional[Ext]
355404 for _ext_name, extension in extensions_remote.items():
356356- extension = processExtension(
405405+ extension = find_and_transform_extension_version(
357406 extension, cli_version, args.extension, requirements=True
358407 )
359408 if extension:
···402451403452 extensions_remote_filtered = set()
404453 for _ext_name, extension in extensions_remote.items():
405405- extension = processExtension(extension, cli_version, args.extension)
454454+ extension = find_and_transform_extension_version(
455455+ extension, cli_version, args.extension
456456+ )
406457 if extension:
407458 extensions_remote_filtered.add(extension)
408459
···22 lib,
33 stdenv,
44 fetchurl,
55- fetchpatch,
65 bison,
76 cmake,
87 pkg-config,
···31303231stdenv.mkDerivation (finalAttrs: {
3332 pname = "mysql";
3434- version = "8.0.42";
3333+ version = "8.0.43";
35343635 src = fetchurl {
3736 url = "https://dev.mysql.com/get/Downloads/MySQL-${lib.versions.majorMinor finalAttrs.version}/mysql-${finalAttrs.version}.tar.gz";
3838- hash = "sha256-XrIsIMILdlxYlMkBBIW9B9iptuv7YovP0wYHAXFVJv4=";
3737+ hash = "sha256-diUKgQFch49iUhz68w3/DqmyUJeNKx3/AHQIo5jV25M=";
3938 };
40394140 nativeBuildInputs = [
···48474948 patches = [
5049 ./no-force-outline-atomics.patch # Do not force compilers to turn on -moutline-atomics switch
5151- # Fix compilation with LLVM 19, adapted from https://github.com/mysql/mysql-server/commit/3a51d7fca76e02257f5c42b6a4fc0c5426bf0421
5252- # in https://github.com/NixOS/nixpkgs/pull/374591#issuecomment-2615855076
5353- ./libcpp-fixes.patch
5454- (fetchpatch {
5555- url = "https://github.com/mysql/mysql-server/commit/4a5c00d26f95faa986ffed7a15ee15e868e9dcf2.patch";
5656- hash = "sha256-MEl1lQlDYtFjHk0+S02RQFnxMr+YeFxAyNjpDtVHyeE=";
5757- })
5850 ];
59516052 ## NOTE: MySQL upstream frequently twiddles the invocations of libtool. When updating, you might proactively grep for libtool references.
-183
pkgs/servers/sql/mysql/libcpp-fixes.patch
···11-diff --git a/include/my_char_traits.h b/include/my_char_traits.h
22-new file mode 100644
33-index 00000000..6336bc03
44---- /dev/null
55-+++ b/include/my_char_traits.h
66-@@ -0,0 +1,65 @@
77-+/* Copyright (c) 2024, Oracle and/or its affiliates.
88-+
99-+ This program is free software; you can redistribute it and/or modify
1010-+ it under the terms of the GNU General Public License, version 2.0,
1111-+ as published by the Free Software Foundation.
1212-+
1313-+ This program is designed to work with certain software (including
1414-+ but not limited to OpenSSL) that is licensed under separate terms,
1515-+ as designated in a particular file or component or in included license
1616-+ documentation. The authors of MySQL hereby grant you an additional
1717-+ permission to link the program and your derivative works with the
1818-+ separately licensed software that they have either included with
1919-+ the program or referenced in the documentation.
2020-+
2121-+ This program is distributed in the hope that it will be useful,
2222-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
2323-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2424-+ GNU General Public License, version 2.0, for more details.
2525-+
2626-+ You should have received a copy of the GNU General Public License
2727-+ along with this program; if not, write to the Free Software
2828-+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
2929-+
3030-+#ifndef MY_CHAR_TRAITS_INCLUDED
3131-+#define MY_CHAR_TRAITS_INCLUDED
3232-+
3333-+#include <cstring>
3434-+
3535-+template <class CharT>
3636-+struct my_char_traits;
3737-+
3838-+/*
3939-+ This is a standards-compliant, drop-in replacement for
4040-+ std::char_traits<unsigned char>
4141-+ We need this because clang libc++ is removing support for it in clang 19.
4242-+ It is not a complete implementation. Rather we implement just enough to
4343-+ compile any usage of char_traits<uchar> we have in our codebase.
4444-+ */
4545-+template <>
4646-+struct my_char_traits<unsigned char> {
4747-+ using char_type = unsigned char;
4848-+ using int_type = unsigned int;
4949-+
5050-+ static void assign(char_type &c1, const char_type &c2) { c1 = c2; }
5151-+
5252-+ static char_type *assign(char_type *s, std::size_t n, char_type a) {
5353-+ return static_cast<char_type *>(memset(s, a, n));
5454-+ }
5555-+
5656-+ static int compare(const char_type *s1, const char_type *s2, std::size_t n) {
5757-+ return memcmp(s1, s2, n);
5858-+ }
5959-+
6060-+ static char_type *move(char_type *s1, const char_type *s2, std::size_t n) {
6161-+ if (n == 0) return s1;
6262-+ return static_cast<char_type *>(memmove(s1, s2, n));
6363-+ }
6464-+
6565-+ static char_type *copy(char_type *s1, const char_type *s2, std::size_t n) {
6666-+ if (n == 0) return s1;
6767-+ return static_cast<char_type *>(memcpy(s1, s2, n));
6868-+ }
6969-+};
7070-+
7171-+#endif // MY_CHAR_TRAITS_INCLUDED
7272-diff --git a/sql/mdl_context_backup.h b/sql/mdl_context_backup.h
7373-index 89e7e23d..cf9c307e 100644
7474---- a/sql/mdl_context_backup.h
7575-+++ b/sql/mdl_context_backup.h
7676-@@ -28,6 +28,7 @@
7777- #include <map>
7878- #include <memory>
7979-8080-+#include "my_char_traits.h"
8181- #include "sql/malloc_allocator.h"
8282- #include "sql/mdl.h"
8383-8484-@@ -47,7 +48,8 @@ class MDL_context_backup_manager {
8585- /**
8686- Key for uniquely identifying MDL_context in the MDL_context_backup map.
8787- */
8888-- typedef std::basic_string<uchar> MDL_context_backup_key;
8989-+ using MDL_context_backup_key =
9090-+ std::basic_string<uchar, my_char_traits<uchar>>;
9191-9292- class MDL_context_backup;
9393-9494-diff --git a/sql/stream_cipher.h b/sql/stream_cipher.h
9595-index 606d4064..358fbb41 100644
9696---- a/sql/stream_cipher.h
9797-+++ b/sql/stream_cipher.h
9898-@@ -28,6 +28,8 @@
9999- #include <memory>
100100- #include <string>
101101-102102-+#include "my_char_traits.h"
103103-+
104104- /**
105105- @file stream_cipher.h
106106-107107-@@ -35,7 +37,8 @@
108108- binary log files.
109109- */
110110-111111--typedef std::basic_string<unsigned char> Key_string;
112112-+using Key_string =
113113-+ std::basic_string<unsigned char, my_char_traits<unsigned char>>;
114114-115115- /**
116116- @class Stream_cipher
117117-diff --git a/unittest/gunit/binlogevents/transaction_compression-t.cc b/unittest/gunit/binlogevents/transaction_compression-t.cc
118118-index ba13f979..01af0e3a 100644
119119---- a/unittest/gunit/binlogevents/transaction_compression-t.cc
120120-+++ b/unittest/gunit/binlogevents/transaction_compression-t.cc
121121-@@ -23,6 +23,7 @@
122122- */
123123-124124- #include <array>
125125-+#include <string>
126126-127127- #include <gtest/gtest.h>
128128- #include "libbinlogevents/include/binary_log.h"
129129-@@ -51,14 +52,13 @@ class TransactionPayloadCompressionTest : public ::testing::Test {
130130- using Managed_buffer_t = Decompressor_t::Managed_buffer_t;
131131- using Size_t = Decompressor_t::Size_t;
132132- using Char_t = Decompressor_t::Char_t;
133133-- using String_t = std::basic_string<Char_t>;
134134- using Decompress_status_t =
135135- binary_log::transaction::compression::Decompress_status;
136136- using Compress_status_t =
137137- binary_log::transaction::compression::Compress_status;
138138-139139-- static String_t constant_data(Size_t size) {
140140-- return String_t(size, (Char_t)'a');
141141-+ static std::string constant_data(Size_t size) {
142142-+ return std::string(size, (Char_t)'a');
143143- }
144144-145145- protected:
146146-@@ -69,7 +69,7 @@ class TransactionPayloadCompressionTest : public ::testing::Test {
147147- void TearDown() override {}
148148-149149- static void compression_idempotency_test(Compressor_t &c, Decompressor_t &d,
150150-- String_t data) {
151151-+ const std::string &data) {
152152- auto debug_string = concat(
153153- binary_log::transaction::compression::type_to_string(c.get_type_code()),
154154- " ", data.size());
155155-@@ -104,8 +104,8 @@ class TransactionPayloadCompressionTest : public ::testing::Test {
156156-157157- // Check decompressed data
158158- ASSERT_EQ(managed_buffer.read_part().size(), data.size()) << debug_string;
159159-- ASSERT_EQ(data, String_t(managed_buffer.read_part().begin(),
160160-- managed_buffer.read_part().end()))
161161-+ ASSERT_EQ(data, std::string(managed_buffer.read_part().begin(),
162162-+ managed_buffer.read_part().end()))
163163- << debug_string;
164164-165165- // Check that we reached EOF
166166-@@ -118,7 +118,7 @@ TEST_F(TransactionPayloadCompressionTest, CompressDecompressZstdTest) {
167167- for (auto size : buffer_sizes) {
168168- binary_log::transaction::compression::Zstd_dec d;
169169- binary_log::transaction::compression::Zstd_comp c;
170170-- String_t data{TransactionPayloadCompressionTest::constant_data(size)};
171171-+ std::string data{TransactionPayloadCompressionTest::constant_data(size)};
172172- TransactionPayloadCompressionTest::compression_idempotency_test(c, d, data);
173173- c.set_compression_level(22);
174174- TransactionPayloadCompressionTest::compression_idempotency_test(c, d, data);
175175-@@ -129,7 +129,7 @@ TEST_F(TransactionPayloadCompressionTest, CompressDecompressNoneTest) {
176176- for (auto size : buffer_sizes) {
177177- binary_log::transaction::compression::None_dec d;
178178- binary_log::transaction::compression::None_comp c;
179179-- String_t data{TransactionPayloadCompressionTest::constant_data(size)};
180180-+ std::string data{TransactionPayloadCompressionTest::constant_data(size)};
181181- TransactionPayloadCompressionTest::compression_idempotency_test(c, d, data);
182182- }
183183- }