diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index c788e0fc2610..aa629ca96f9b 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -17,6 +17,11 @@ - All Log4Shell vulnerability scanners were removed, as they were all unmaintained upstream and are no longer relevant given that the vulnerability has been fixed upstream for several years. +- `asio` (standalone version of `boost::asio`) has been updated from 1.24.0 to 1.36.0. Some breaking changes were introduced between these + two versions, and the one affected most was the removal of `asio::io_service` in favor of `asio::io_context` in 1.33.0. `asio_1_32_0` is + retained for packages that have not completed migration. `asio_1_10` has been removed as no packages depend on it anymore. + `asio` also no longer propagates `boost` as it is used independent from `boost` in most cases. + - `python3packages.pillow-avif-plugin` has been removed as the functionality is included in `python3packages.pillow` directly since version 11.3. ## Other Notable Changes {#sec-nixpkgs-release-26.05-notable-changes} diff --git a/nixos/doc/manual/release-notes/rl-2605.section.md b/nixos/doc/manual/release-notes/rl-2605.section.md index 0f7e00d6cb11..ce2cb43eef21 100644 --- a/nixos/doc/manual/release-notes/rl-2605.section.md +++ b/nixos/doc/manual/release-notes/rl-2605.section.md @@ -22,4 +22,4 @@ -- Create the first release note entry in this section! +- `services.openssh` now supports generating host SSH keys by setting `services.openssh.generateHostKeys = true` while leaving `services.openssh.enable` disabled. This is particularly useful for systems that have no need of an SSH daemon but want SSH host keys for other purposes such as using agenix or sops-nix. diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix index 1301c3648011..8c5c7de61fec 100644 --- a/nixos/modules/services/networking/ssh/sshd.nix +++ b/nixos/modules/services/networking/ssh/sshd.nix @@ -381,6 +381,19 @@ in ''; }; + generateHostKeys = lib.mkOption { + type = lib.types.bool; + default = config.services.openssh.enable; + defaultText = lib.literalExpression "services.openssh.enable"; + description = '' + Whether to generate SSH host keys. + + This can be enabled explicitly if you want to generate host keys but + don't want to enable the SSH daemon. + ''; + example = true; + }; + banner = lib.mkOption { type = lib.types.nullOr lib.types.lines; default = null; @@ -669,115 +682,232 @@ in ###### implementation - config = lib.mkIf cfg.enable { + config = lib.mkMerge [ + (lib.mkIf cfg.enable { - users.users.sshd = { - isSystemUser = true; - group = "sshd"; - description = "SSH privilege separation user"; - }; - users.groups.sshd = { }; - - services.openssh.moduliFile = lib.mkDefault "${cfg.package}/etc/ssh/moduli"; - services.openssh.sftpServerExecutable = lib.mkDefault "${cfg.package}/libexec/sftp-server"; - - environment.etc = - authKeysFiles - // authPrincipalsFiles - // { - "ssh/moduli".source = cfg.moduliFile; - "ssh/sshd_config".source = sshconf; + users.users.sshd = { + isSystemUser = true; + group = "sshd"; + description = "SSH privilege separation user"; }; + users.groups.sshd = { }; - systemd.tmpfiles.settings."ssh-root-provision" = { - "/root"."d-" = { - user = "root"; - group = ":root"; - mode = ":700"; - }; - "/root/.ssh"."d-" = { - user = "root"; - group = ":root"; - mode = ":700"; - }; - "/root/.ssh/authorized_keys"."f^" = { - user = "root"; - group = ":root"; - mode = ":600"; - argument = "ssh.authorized_keys.root"; - }; - }; + services.openssh.moduliFile = lib.mkDefault "${cfg.package}/etc/ssh/moduli"; + services.openssh.sftpServerExecutable = lib.mkDefault "${cfg.package}/libexec/sftp-server"; - systemd = { - sockets.sshd = lib.mkIf cfg.startWhenNeeded { - description = "SSH Socket"; - wantedBy = [ "sockets.target" ]; - socketConfig.ListenStream = - if cfg.listenAddresses != [ ] then - lib.concatMap ( - { addr, port }: - if port != null then [ "${addr}:${toString port}" ] else map (p: "${addr}:${toString p}") cfg.ports - ) cfg.listenAddresses - else - cfg.ports; - socketConfig.Accept = true; - # Prevent brute-force attacks from shutting down socket - socketConfig.TriggerLimitIntervalSec = 0; - }; + environment.etc = + authKeysFiles + // authPrincipalsFiles + // { + "ssh/moduli".source = cfg.moduliFile; + "ssh/sshd_config".source = sshconf; + }; - services."sshd@" = { - description = "SSH per-connection Daemon"; - after = [ - "network.target" - "sshd-keygen.service" - ]; - wants = [ "sshd-keygen.service" ]; - stopIfChanged = false; - path = [ cfg.package ]; - environment.LD_LIBRARY_PATH = nssModulesPath; - - serviceConfig = { - ExecStart = lib.concatStringsSep " " [ - "-${lib.getExe' cfg.package "sshd"}" - "-i" - "-D" - "-f /etc/ssh/sshd_config" - ]; - KillMode = "process"; - StandardInput = "socket"; - StandardError = "journal"; + systemd.tmpfiles.settings."ssh-root-provision" = { + "/root"."d-" = { + user = "root"; + group = ":root"; + mode = ":700"; + }; + "/root/.ssh"."d-" = { + user = "root"; + group = ":root"; + mode = ":700"; + }; + "/root/.ssh/authorized_keys"."f^" = { + user = "root"; + group = ":root"; + mode = ":600"; + argument = "ssh.authorized_keys.root"; }; }; - services.sshd = lib.mkIf (!cfg.startWhenNeeded) { - description = "SSH Daemon"; - wantedBy = [ "multi-user.target" ]; - after = [ - "network.target" - "sshd-keygen.service" - ]; - wants = [ "sshd-keygen.service" ]; - stopIfChanged = false; - path = [ cfg.package ]; - environment.LD_LIBRARY_PATH = nssModulesPath; + systemd = { + sockets.sshd = lib.mkIf cfg.startWhenNeeded { + description = "SSH Socket"; + wantedBy = [ "sockets.target" ]; + socketConfig.ListenStream = + if cfg.listenAddresses != [ ] then + lib.concatMap ( + { addr, port }: + if port != null then [ "${addr}:${toString port}" ] else map (p: "${addr}:${toString p}") cfg.ports + ) cfg.listenAddresses + else + cfg.ports; + socketConfig.Accept = true; + # Prevent brute-force attacks from shutting down socket + socketConfig.TriggerLimitIntervalSec = 0; + }; - restartTriggers = [ config.environment.etc."ssh/sshd_config".source ]; - - serviceConfig = { - Type = "notify-reload"; - Restart = "always"; - ExecStart = lib.concatStringsSep " " [ - (lib.getExe' cfg.package "sshd") - "-D" - "-f" - "/etc/ssh/sshd_config" + services."sshd@" = { + description = "SSH per-connection Daemon"; + after = [ + "network.target" + "sshd-keygen.service" ]; - KillMode = "process"; + wants = lib.mkIf cfg.generateHostKeys [ "sshd-keygen.service" ]; + stopIfChanged = false; + path = [ cfg.package ]; + environment.LD_LIBRARY_PATH = nssModulesPath; + + serviceConfig = { + ExecStart = lib.concatStringsSep " " [ + "-${lib.getExe' cfg.package "sshd"}" + "-i" + "-D" + "-f /etc/ssh/sshd_config" + ]; + KillMode = "process"; + StandardInput = "socket"; + StandardError = "journal"; + }; + }; + + services.sshd = lib.mkIf (!cfg.startWhenNeeded) { + description = "SSH Daemon"; + wantedBy = [ "multi-user.target" ]; + after = [ + "network.target" + "sshd-keygen.service" + ]; + wants = lib.mkIf cfg.generateHostKeys [ "sshd-keygen.service" ]; + stopIfChanged = false; + path = [ cfg.package ]; + environment.LD_LIBRARY_PATH = nssModulesPath; + + restartTriggers = [ config.environment.etc."ssh/sshd_config".source ]; + + serviceConfig = { + Type = "notify-reload"; + Restart = "always"; + ExecStart = lib.concatStringsSep " " [ + (lib.getExe' cfg.package "sshd") + "-D" + "-f" + "/etc/ssh/sshd_config" + ]; + KillMode = "process"; + }; }; }; - services.sshd-keygen = { + networking.firewall.allowedTCPPorts = lib.optionals cfg.openFirewall cfg.ports; + + security.pam.services.sshd = lib.mkIf cfg.settings.UsePAM { + startSession = true; + showMotd = true; + unixAuth = if cfg.settings.PasswordAuthentication == true then true else false; + }; + + # These values are merged with the ones defined externally, see: + # https://github.com/NixOS/nixpkgs/pull/10155 + # https://github.com/NixOS/nixpkgs/pull/41745 + services.openssh.authorizedKeysFiles = + lib.optional cfg.authorizedKeysInHomedir "%h/.ssh/authorized_keys" + ++ [ "/etc/ssh/authorized_keys.d/%u" ]; + + services.openssh.settings.AuthorizedPrincipalsFile = lib.mkIf ( + authPrincipalsFiles != { } + ) "/etc/ssh/authorized_principals.d/%u"; + + services.openssh.extraConfig = lib.mkOrder 0 ( + lib.concatStringsSep "\n" ( + [ + "Banner ${if cfg.banner == null then "none" else pkgs.writeText "ssh_banner" cfg.banner}" + "AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}" + ] + ++ lib.map (port: ''Port ${toString port}'') cfg.ports + ++ lib.map ( + { port, addr, ... }: + ''ListenAddress ${addr}${lib.optionalString (port != null) (":" + toString port)}'' + ) cfg.listenAddresses + ++ lib.optional cfgc.setXAuthLocation "XAuthLocation ${lib.getExe pkgs.xorg.xauth}" + ++ lib.optional cfg.allowSFTP ''Subsystem sftp ${cfg.sftpServerExecutable} ${lib.concatStringsSep " " cfg.sftpFlags}'' + ++ [ + "AuthorizedKeysFile ${toString cfg.authorizedKeysFiles}" + ] + ++ lib.optional (cfg.authorizedKeysCommand != "none") '' + AuthorizedKeysCommand ${cfg.authorizedKeysCommand} + AuthorizedKeysCommandUser ${cfg.authorizedKeysCommandUser} + '' + ++ lib.map (k: "HostKey ${k.path}") cfg.hostKeys + ) + ); + + system.checks = [ + (pkgs.runCommand "check-sshd-config" + { + nativeBuildInputs = [ validationPackage ]; + } + '' + ${lib.concatMapStringsSep "\n" ( + lport: "sshd -G -T -C lport=${toString lport} -f ${sshconf} > /dev/null" + ) cfg.ports} + ${lib.concatMapStringsSep "\n" ( + la: + lib.concatMapStringsSep "\n" ( + port: + "sshd -G -T -C ${lib.escapeShellArg "laddr=${la.addr},lport=${toString port}"} -f ${sshconf} > /dev/null" + ) (if la.port != null then [ la.port ] else cfg.ports) + ) cfg.listenAddresses} + touch $out + '' + ) + ]; + + assertions = [ + { + assertion = if cfg.settings.X11Forwarding then cfgc.setXAuthLocation else true; + message = "cannot enable X11 forwarding without setting xauth location"; + } + { + assertion = + (builtins.match "(.*\n)?(\t )*[Kk][Ee][Rr][Bb][Ee][Rr][Oo][Ss][Aa][Uu][Tt][Hh][Ee][Nn][Tt][Ii][Cc][Aa][Tt][Ii][Oo][Nn][ |\t|=|\"]+yes.*" "${configFile}\n${cfg.extraConfig}") + != null + -> cfgc.package.withKerberos; + message = "cannot enable Kerberos authentication without using a package with Kerberos support"; + } + { + assertion = + (builtins.match "(.*\n)?(\t )*[Gg][Ss][Ss][Aa][Pp][Ii][Aa][Uu][Tt][Hh][Ee][Nn][Tt][Ii][Cc][Aa][Tt][Ii][Oo][Nn][ |\t|=|\"]+yes.*" "${configFile}\n${cfg.extraConfig}") + != null + -> cfgc.package.withKerberos; + message = "cannot enable GSSAPI authentication without using a package with Kerberos support"; + } + ( + let + duplicates = + # Filter out the groups with more than 1 element + lib.filter (l: lib.length l > 1) ( + # Grab the groups, we don't care about the group identifiers + lib.attrValues ( + # Group the settings that are the same in lower case + lib.groupBy lib.strings.toLower (lib.attrNames cfg.settings) + ) + ); + formattedDuplicates = lib.concatMapStringsSep ", " ( + dupl: "(${lib.concatStringsSep ", " dupl})" + ) duplicates; + in + { + assertion = lib.length duplicates == 0; + message = ''Duplicate sshd config key; does your capitalization match the option's? Duplicate keys: ${formattedDuplicates}''; + } + ) + ] + ++ lib.forEach cfg.listenAddresses ( + { addr, ... }: + { + assertion = addr != null; + message = "addr must be specified in each listenAddresses entry"; + } + ); + }) + + (lib.mkIf cfg.generateHostKeys { + systemd.services.sshd-keygen = { description = "SSH Host Keys Generation"; + wantedBy = [ "multi-user.target" ]; unitConfig = { ConditionFileNotEmpty = map (k: "|!${k.path}") cfg.hostKeys; }; @@ -802,119 +932,7 @@ in fi ''); }; - }; - - networking.firewall.allowedTCPPorts = lib.optionals cfg.openFirewall cfg.ports; - - security.pam.services.sshd = lib.mkIf cfg.settings.UsePAM { - startSession = true; - showMotd = true; - unixAuth = if cfg.settings.PasswordAuthentication == true then true else false; - }; - - # These values are merged with the ones defined externally, see: - # https://github.com/NixOS/nixpkgs/pull/10155 - # https://github.com/NixOS/nixpkgs/pull/41745 - services.openssh.authorizedKeysFiles = - lib.optional cfg.authorizedKeysInHomedir "%h/.ssh/authorized_keys" - ++ [ "/etc/ssh/authorized_keys.d/%u" ]; - - services.openssh.settings.AuthorizedPrincipalsFile = lib.mkIf ( - authPrincipalsFiles != { } - ) "/etc/ssh/authorized_principals.d/%u"; - - services.openssh.extraConfig = lib.mkOrder 0 ( - lib.concatStringsSep "\n" ( - [ - "Banner ${if cfg.banner == null then "none" else pkgs.writeText "ssh_banner" cfg.banner}" - "AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}" - ] - ++ lib.map (port: ''Port ${toString port}'') cfg.ports - ++ lib.map ( - { port, addr, ... }: - ''ListenAddress ${addr}${lib.optionalString (port != null) (":" + toString port)}'' - ) cfg.listenAddresses - ++ lib.optional cfgc.setXAuthLocation "XAuthLocation ${lib.getExe pkgs.xorg.xauth}" - ++ lib.optional cfg.allowSFTP ''Subsystem sftp ${cfg.sftpServerExecutable} ${lib.concatStringsSep " " cfg.sftpFlags}'' - ++ [ - "AuthorizedKeysFile ${toString cfg.authorizedKeysFiles}" - ] - ++ lib.optional (cfg.authorizedKeysCommand != "none") '' - AuthorizedKeysCommand ${cfg.authorizedKeysCommand} - AuthorizedKeysCommandUser ${cfg.authorizedKeysCommandUser} - '' - ++ lib.map (k: "HostKey ${k.path}") cfg.hostKeys - ) - ); - - system.checks = [ - (pkgs.runCommand "check-sshd-config" - { - nativeBuildInputs = [ validationPackage ]; - } - '' - ${lib.concatMapStringsSep "\n" ( - lport: "sshd -G -T -C lport=${toString lport} -f ${sshconf} > /dev/null" - ) cfg.ports} - ${lib.concatMapStringsSep "\n" ( - la: - lib.concatMapStringsSep "\n" ( - port: - "sshd -G -T -C ${lib.escapeShellArg "laddr=${la.addr},lport=${toString port}"} -f ${sshconf} > /dev/null" - ) (if la.port != null then [ la.port ] else cfg.ports) - ) cfg.listenAddresses} - touch $out - '' - ) - ]; - - assertions = [ - { - assertion = if cfg.settings.X11Forwarding then cfgc.setXAuthLocation else true; - message = "cannot enable X11 forwarding without setting xauth location"; - } - { - assertion = - (builtins.match "(.*\n)?(\t )*[Kk][Ee][Rr][Bb][Ee][Rr][Oo][Ss][Aa][Uu][Tt][Hh][Ee][Nn][Tt][Ii][Cc][Aa][Tt][Ii][Oo][Nn][ |\t|=|\"]+yes.*" "${configFile}\n${cfg.extraConfig}") - != null - -> cfgc.package.withKerberos; - message = "cannot enable Kerberos authentication without using a package with Kerberos support"; - } - { - assertion = - (builtins.match "(.*\n)?(\t )*[Gg][Ss][Ss][Aa][Pp][Ii][Aa][Uu][Tt][Hh][Ee][Nn][Tt][Ii][Cc][Aa][Tt][Ii][Oo][Nn][ |\t|=|\"]+yes.*" "${configFile}\n${cfg.extraConfig}") - != null - -> cfgc.package.withKerberos; - message = "cannot enable GSSAPI authentication without using a package with Kerberos support"; - } - ( - let - duplicates = - # Filter out the groups with more than 1 element - lib.filter (l: lib.length l > 1) ( - # Grab the groups, we don't care about the group identifiers - lib.attrValues ( - # Group the settings that are the same in lower case - lib.groupBy lib.strings.toLower (lib.attrNames cfg.settings) - ) - ); - formattedDuplicates = lib.concatMapStringsSep ", " ( - dupl: "(${lib.concatStringsSep ", " dupl})" - ) duplicates; - in - { - assertion = lib.length duplicates == 0; - message = ''Duplicate sshd config key; does your capitalization match the option's? Duplicate keys: ${formattedDuplicates}''; - } - ) - ] - ++ lib.forEach cfg.listenAddresses ( - { addr, ... }: - { - assertion = addr != null; - message = "addr must be specified in each listenAddresses entry"; - } - ); - }; + }) + ]; } diff --git a/nixos/tests/openssh.nix b/nixos/tests/openssh.nix index a59f49312c23..940db7139b32 100644 --- a/nixos/tests/openssh.nix +++ b/nixos/tests/openssh.nix @@ -250,6 +250,15 @@ in }; }; + server-no-sshd-with-key = + { pkgs, ... }: + { + services.openssh.generateHostKeys = true; + users.users.root.openssh.authorizedKeys.keys = [ + snakeOilPublicKey + ]; + }; + client = { ... }: { @@ -276,6 +285,10 @@ in server_localhost_only_lazy.wait_for_unit("sshd.socket", timeout=30) server_lazy_socket.wait_for_unit("sshd.socket", timeout=30) + # sshd-keygen is a oneshot unit, so just wait for multi-user.target, which + # pulls it in. + server_no_sshd_with_key.wait_for_unit("multi-user.target", timeout=30) + with subtest("manual-authkey"): client.succeed( '${pkgs.openssh}/bin/ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -N ""' @@ -408,6 +421,19 @@ in server_sftp.wait_for_file("/srv/sftp/uploads/test-file") + with subtest("keygen without sshd"): + client.fail( + "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i privkey.snakeoil root@server-no-sshd-with-key true", + timeout=30 + ) + server_no_sshd_with_key.succeed("test -e /etc/ssh/ssh_host_ed25519_key") + server_no_sshd_with_key.succeed("test -e /etc/ssh/ssh_host_ed25519_key.pub") + server_no_sshd_with_key.fail("pgrep sshd") + + # Validate the above check for sshd using pgrep does pass on a server + # that should have sshd running, just to prove it's a useful test. + server.succeed("pgrep sshd") + # None of the per-connection units should have failed. server_lazy.fail("systemctl is-failed 'sshd@*.service'") ''; diff --git a/pkgs/applications/emulators/libretro/cores/mame2003-plus.nix b/pkgs/applications/emulators/libretro/cores/mame2003-plus.nix index 0581de85285b..b5fe73e6a070 100644 --- a/pkgs/applications/emulators/libretro/cores/mame2003-plus.nix +++ b/pkgs/applications/emulators/libretro/cores/mame2003-plus.nix @@ -5,13 +5,13 @@ }: mkLibretroCore { core = "mame2003-plus"; - version = "0-unstable-2025-11-13"; + version = "0-unstable-2025-12-02"; src = fetchFromGitHub { owner = "libretro"; repo = "mame2003-plus-libretro"; - rev = "62c7089644966f6ac5fc79fe03592603579a409d"; - hash = "sha256-NHJfZpo4/aR9a6Sn3x+BQaVfKtkMBUoDQlgtvIkXDFI="; + rev = "e58d3285f4323a19a0f5aea01f4cdf7a934e1155"; + hash = "sha256-3n34FDDQ1CjmZ4V7Vl/JYi/24w9F3z1nLSEuq44KvMg="; }; makefile = "Makefile"; diff --git a/pkgs/applications/emulators/libretro/cores/ppsspp.nix b/pkgs/applications/emulators/libretro/cores/ppsspp.nix index bdc4cb4bd0c0..31a00e5aa7a3 100644 --- a/pkgs/applications/emulators/libretro/cores/ppsspp.nix +++ b/pkgs/applications/emulators/libretro/cores/ppsspp.nix @@ -13,13 +13,13 @@ }: mkLibretroCore { core = "ppsspp"; - version = "0-unstable-2025-11-27"; + version = "0-unstable-2025-12-04"; src = fetchFromGitHub { owner = "hrydgard"; repo = "ppsspp"; - rev = "e5bafa4264e88cf2699e44740e2580ced0454a90"; - hash = "sha256-+Rmj75yBodwqENJppTWpsef9R0ajCoz9KaxVuYktUII="; + rev = "cf306e9cec919011339fb123d009cb470f628df4"; + hash = "sha256-5UNd59QG10yD7wuiXWC5JwqWvggx07M6n320dhJ3rU0="; fetchSubmodules = true; }; diff --git a/pkgs/by-name/as/asio/package.nix b/pkgs/by-name/as/asio/package.nix new file mode 100644 index 000000000000..01b982933956 --- /dev/null +++ b/pkgs/by-name/as/asio/package.nix @@ -0,0 +1,69 @@ +{ + lib, + stdenv, + fetchFromGitHub, + autoreconfHook, + pkg-config, + openssl, + boost, + testers, + asioVersion ? "1.36.0", +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "asio"; + version = asioVersion; + + src = fetchFromGitHub { + owner = "chriskohlhoff"; + repo = "asio"; + tag = "asio-${lib.replaceStrings [ "." ] [ "-" ] finalAttrs.version}"; + hash = + { + # Preserve 1.32.0 because some project depends on asio/io_service.hpp + "1.32.0" = "sha256-PBoa4OAOOmHas9wCutjz80rWXc3zGONntb9vTQk3FNY="; + "1.36.0" = "sha256-BhJpE5+t0WXsuQ5CtncU0P8Kf483uFoV+OGlFLc7TpQ="; + } + .${asioVersion} or (throw "Unsupported asio version. Please use overrideAttrs directly"); + }; + + sourceRoot = "${finalAttrs.src.name}/asio"; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; + + # Only used for test coverage + checkInputs = [ + openssl + boost + ]; + + configureFlags = lib.optionals finalAttrs.finalPackage.doCheck [ + # Only used in tests, "HAVE_BOOST_COROUTINE" + "--enable-boost-coroutine" + + # There is also the "--with-boost" flag, but + # after several tests, it doesn't make any difference + # in the output. + ]; + + enableParallelBuilding = true; + + doCheck = true; + + passthru.tests.pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + versionCheck = true; + }; + + meta = { + homepage = "https://think-async.com/Asio"; + description = "Cross-platform C++ library for network and low-level I/O programming"; + license = lib.licenses.boost; + maintainers = with lib.maintainers; [ aleksana ]; + platforms = lib.platforms.unix; + pkgConfigModules = [ "asio" ]; + }; +}) diff --git a/pkgs/by-name/cf/cfspeedtest/package.nix b/pkgs/by-name/cf/cfspeedtest/package.nix index b3670b6b7961..8d81b7e4f8ad 100644 --- a/pkgs/by-name/cf/cfspeedtest/package.nix +++ b/pkgs/by-name/cf/cfspeedtest/package.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cfspeedtest"; - version = "2.0.0"; + version = "2.0.1"; src = fetchFromGitHub { owner = "code-inflation"; repo = "cfspeedtest"; tag = "v${finalAttrs.version}"; - hash = "sha256-uqWTYhC+ADwGpUSYXKKD4t0ZSEsVxVM6hNHKewuW0Ts="; + hash = "sha256-q69ti2bEJBO7Evz8X2EQGbMP3n27fesSO1z8HaEhKJM="; }; - cargoHash = "sha256-VuCYy8awQTmOxh9efJb0t6BXcxwlkz/uJNb8bCzXMdc="; + cargoHash = "sha256-AvcbA4V9Ht9yWNOPPVQvAGULiTh7cY92NaZJbOAOk1U="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/by-name/cl/clorinde/package.nix b/pkgs/by-name/cl/clorinde/package.nix index 2ef0f91ee0c8..82b728259943 100644 --- a/pkgs/by-name/cl/clorinde/package.nix +++ b/pkgs/by-name/cl/clorinde/package.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "clorinde"; - version = "1.1.1"; + version = "1.2.0"; src = fetchFromGitHub { owner = "halcyonnouveau"; repo = "clorinde"; tag = "clorinde-v${finalAttrs.version}"; - hash = "sha256-a44y0cVmpQf3AmN4DXR50pFhUrWlANN9X0v0zQttT7M="; + hash = "sha256-d+fVk3ZWccw/E6/mAyiGkP5t5/nl3riBAHwhzsaLiDs="; }; - cargoHash = "sha256-YSyHp3JwsLO7yrLko5NE2lb6ozy8Ah9i2Rz3854ujh0="; + cargoHash = "sha256-bu31l7slpWIHe2Ze/pP2udygt/KeWrdh0MYkCXCSWIc="; cargoBuildFlags = [ "--package=clorinde" ]; diff --git a/pkgs/by-name/co/codex/package.nix b/pkgs/by-name/co/codex/package.nix index c9fd27473edc..a49f28ad465f 100644 --- a/pkgs/by-name/co/codex/package.nix +++ b/pkgs/by-name/co/codex/package.nix @@ -14,18 +14,18 @@ }: rustPlatform.buildRustPackage (finalAttrs: { pname = "codex"; - version = "0.64.0"; + version = "0.65.0"; src = fetchFromGitHub { owner = "openai"; repo = "codex"; tag = "rust-v${finalAttrs.version}"; - hash = "sha256-1nUawra7VChAcLAwWgcasy22q37DQxq6q8qAx55gHMc="; + hash = "sha256-1zh6ifwavP3RFqQbHIClEQ4cKRQ5LdU61LReA6+HSW8="; }; sourceRoot = "${finalAttrs.src.name}/codex-rs"; - cargoHash = "sha256-cIiHB8THztG/TqPMjFekkQl8wEvALIf5Bg/fqXJ/hKs="; + cargoHash = "sha256-XzqEI8wpI5g1+u+AOWiZYOzCVhwysMtHKPDpcfu2HAU="; nativeBuildInputs = [ installShellFiles diff --git a/pkgs/by-name/co/cosmic-applets/package.nix b/pkgs/by-name/co/cosmic-applets/package.nix index accc526c1a27..2a32eeee1ca2 100644 --- a/pkgs/by-name/co/cosmic-applets/package.nix +++ b/pkgs/by-name/co/cosmic-applets/package.nix @@ -20,17 +20,17 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-applets"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-applets"; tag = "epoch-${finalAttrs.version}"; - hash = "sha256-4BH7qEoUf5UtpiQtk3WvgA3p/hAa58RnQ4jUjG8tpd0="; + hash = "sha256-HZi9pT9s7h/TJtWK28vlCvhiuQqmxZa0HmSsnBa8F80="; }; - cargoHash = "sha256-XOA5yREoQHGxPI9PVYd2UsaHRCIfbb3Tkr1eovqIIow="; + cargoHash = "sha256-8Zq8l4gRI9FuGFy6Gi5doFNvOT7nOy8qCE9pmbcCELQ="; nativeBuildInputs = [ just diff --git a/pkgs/by-name/co/cosmic-applibrary/package.nix b/pkgs/by-name/co/cosmic-applibrary/package.nix index b393ff7dc5df..d2aab743b07e 100644 --- a/pkgs/by-name/co/cosmic-applibrary/package.nix +++ b/pkgs/by-name/co/cosmic-applibrary/package.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-applibrary"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-bg/package.nix b/pkgs/by-name/co/cosmic-bg/package.nix index 98e5eebbe1c0..15cdf6a566ba 100644 --- a/pkgs/by-name/co/cosmic-bg/package.nix +++ b/pkgs/by-name/co/cosmic-bg/package.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-bg"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-comp/package.nix b/pkgs/by-name/co/cosmic-comp/package.nix index 28508219b387..250b1b8c0826 100644 --- a/pkgs/by-name/co/cosmic-comp/package.nix +++ b/pkgs/by-name/co/cosmic-comp/package.nix @@ -20,14 +20,14 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-comp"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-comp"; tag = "epoch-${finalAttrs.version}"; - hash = "sha256-MyE2C7oUMSIkNn03am/ytc1/oJITsAO7Ok3XV231EmA="; + hash = "sha256-ozymo6ucBEv4vEADIHyn/G+p5V8SMgsyW/TcEi3Dhxg="; }; cargoHash = "sha256-qlfCCHqjKX72hVj5Bgh1wKT7pMsy5vG1VEIqJk4prR8="; diff --git a/pkgs/by-name/co/cosmic-edit/package.nix b/pkgs/by-name/co/cosmic-edit/package.nix index 3a2b7178a02b..f6db5214c206 100644 --- a/pkgs/by-name/co/cosmic-edit/package.nix +++ b/pkgs/by-name/co/cosmic-edit/package.nix @@ -16,14 +16,14 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-edit"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-edit"; tag = "epoch-${finalAttrs.version}"; - hash = "sha256-Zk4qo/2ZdlAv2g1gIoMfzRXwndmqtyIqtX/2Z1nmhLM="; + hash = "sha256-lqM2MYuGXUh0gTosjbJbusP5daHhs7tsnDTmYzh1Vbo="; }; cargoHash = "sha256-6b6m6mZTa3Li74JCm6czR0VBc7H5IRTPr7yic3V1FL4="; diff --git a/pkgs/by-name/co/cosmic-files/package.nix b/pkgs/by-name/co/cosmic-files/package.nix index ffe09417c879..2fb2d683312c 100644 --- a/pkgs/by-name/co/cosmic-files/package.nix +++ b/pkgs/by-name/co/cosmic-files/package.nix @@ -12,14 +12,14 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-files"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-files"; tag = "epoch-${finalAttrs.version}"; - hash = "sha256-jH88PzgHMbbtGc68v/7Azia+LrB1kfA7QdBJOVAsEs0="; + hash = "sha256-rjGhT8ZFLpVEGz5g9Hy3E8eYigxUXF1ZHLXUhHdIyHE="; }; cargoHash = "sha256-WPBK7/7l+Z69AFrqnDL6XszUcBHuZdKsNZ31HS+Ol4o="; diff --git a/pkgs/by-name/co/cosmic-greeter/package.nix b/pkgs/by-name/co/cosmic-greeter/package.nix index ba5c3f8ac8aa..18d775912867 100644 --- a/pkgs/by-name/co/cosmic-greeter/package.nix +++ b/pkgs/by-name/co/cosmic-greeter/package.nix @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-greeter"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-icons/package.nix b/pkgs/by-name/co/cosmic-icons/package.nix index 61f3fa10ac3a..93712ff2c7da 100644 --- a/pkgs/by-name/co/cosmic-icons/package.nix +++ b/pkgs/by-name/co/cosmic-icons/package.nix @@ -9,7 +9,7 @@ }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "cosmic-icons"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-idle/package.nix b/pkgs/by-name/co/cosmic-idle/package.nix index 5cf27060c9ad..fd6b7cccc256 100644 --- a/pkgs/by-name/co/cosmic-idle/package.nix +++ b/pkgs/by-name/co/cosmic-idle/package.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-idle"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-initial-setup/package.nix b/pkgs/by-name/co/cosmic-initial-setup/package.nix index ab7e31549ad1..a14c9b07d763 100644 --- a/pkgs/by-name/co/cosmic-initial-setup/package.nix +++ b/pkgs/by-name/co/cosmic-initial-setup/package.nix @@ -14,14 +14,14 @@ }: rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-initial-setup"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-initial-setup"; tag = "epoch-${finalAttrs.version}"; - hash = "sha256-iSxBd/0DsaId7PETZMZbN4uZHiUJmxzm/1KXRXDwpEo="; + hash = "sha256-eK+1nEpCgWOdhA0Kdg/RwgAON0dMjZujWxqd5CdSqNk="; }; cargoHash = "sha256-jOPJiKPE3UUD/QHmb+6s6l2RVhtUFls3QRGQ6DmEFSE="; diff --git a/pkgs/by-name/co/cosmic-launcher/package.nix b/pkgs/by-name/co/cosmic-launcher/package.nix index c46444d5932b..e80af62bf5db 100644 --- a/pkgs/by-name/co/cosmic-launcher/package.nix +++ b/pkgs/by-name/co/cosmic-launcher/package.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-launcher"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-notifications/package.nix b/pkgs/by-name/co/cosmic-notifications/package.nix index 04c5f8e62e4a..ea1d12801a1b 100644 --- a/pkgs/by-name/co/cosmic-notifications/package.nix +++ b/pkgs/by-name/co/cosmic-notifications/package.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-notifications"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-osd/package.nix b/pkgs/by-name/co/cosmic-osd/package.nix index 7df34845f39f..e03f57505c8a 100644 --- a/pkgs/by-name/co/cosmic-osd/package.nix +++ b/pkgs/by-name/co/cosmic-osd/package.nix @@ -15,17 +15,17 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-osd"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-osd"; tag = "epoch-${finalAttrs.version}"; - hash = "sha256-mbsTDxd8vvkY0EQCOI8sXxY80odJgSAuuP2gNzy6HXo="; + hash = "sha256-WK90ml7xIRK2Xd1FIjRJg0QmXfFL1slmZOI8hhGsVtg="; }; - cargoHash = "sha256-cpNp/by8TU2lbb2d3smxUr48mTSLnoPXseiRZScwSXI="; + cargoHash = "sha256-DNQvmE/2swrDybjcQfCAjMRkAttjl+ibbLG0HSlcZwU="; nativeBuildInputs = [ just diff --git a/pkgs/by-name/co/cosmic-panel/package.nix b/pkgs/by-name/co/cosmic-panel/package.nix index 9fc2c803691c..b92a63491a2b 100644 --- a/pkgs/by-name/co/cosmic-panel/package.nix +++ b/pkgs/by-name/co/cosmic-panel/package.nix @@ -11,14 +11,14 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-panel"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-panel"; tag = "epoch-${finalAttrs.version}"; - hash = "sha256-gvEHieM8osGyRrkeE8gEOPduTv3y3KgoZ2YhFgW5qp8="; + hash = "sha256-1Xwe1uONJbl4wq6QBbTI1suLiSlTzU4e/5WBccvghHE="; }; cargoHash = "sha256-ZkjXZrcA4qKHSjEOxj7+j10PxJw/du8B2Mee2fxPJxs="; diff --git a/pkgs/by-name/co/cosmic-player/package.nix b/pkgs/by-name/co/cosmic-player/package.nix index 70bf397b220a..45572f49f561 100644 --- a/pkgs/by-name/co/cosmic-player/package.nix +++ b/pkgs/by-name/co/cosmic-player/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-player"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-randr/package.nix b/pkgs/by-name/co/cosmic-randr/package.nix index 1101e31c9c92..bf8e511b24ea 100644 --- a/pkgs/by-name/co/cosmic-randr/package.nix +++ b/pkgs/by-name/co/cosmic-randr/package.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-randr"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-screenshot/package.nix b/pkgs/by-name/co/cosmic-screenshot/package.nix index dde40f17d679..e8ab78b96982 100644 --- a/pkgs/by-name/co/cosmic-screenshot/package.nix +++ b/pkgs/by-name/co/cosmic-screenshot/package.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-screenshot"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-session/package.nix b/pkgs/by-name/co/cosmic-session/package.nix index d7ac180b2d1e..eb1a96b23e34 100644 --- a/pkgs/by-name/co/cosmic-session/package.nix +++ b/pkgs/by-name/co/cosmic-session/package.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-session"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-settings-daemon/package.nix b/pkgs/by-name/co/cosmic-settings-daemon/package.nix index 057c1819607c..f16059041241 100644 --- a/pkgs/by-name/co/cosmic-settings-daemon/package.nix +++ b/pkgs/by-name/co/cosmic-settings-daemon/package.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-settings-daemon"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-settings/package.nix b/pkgs/by-name/co/cosmic-settings/package.nix index 5f2282939c81..73cdba2478cf 100644 --- a/pkgs/by-name/co/cosmic-settings/package.nix +++ b/pkgs/by-name/co/cosmic-settings/package.nix @@ -27,17 +27,17 @@ let in rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-settings"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-settings"; tag = "epoch-${finalAttrs.version}"; - hash = "sha256-Z+MJMHcyqUnSKSUeYH5PyFFkzUQ33bkFoAd3m/TckrQ="; + hash = "sha256-MNse8aUfRuJ7svNWv/b+XF2LVNKw4O6oZN7bUmrPE78="; }; - cargoHash = "sha256-Su+yAQLr3Us8YNU8z83XO1UDjjOY3SCGnkmwGaIGFho="; + cargoHash = "sha256-zubJwm+4Jb6Fv2+tu93It4wkD9KJe3KaPUkxlWAvuZE="; nativeBuildInputs = [ cmake diff --git a/pkgs/by-name/co/cosmic-store/package.nix b/pkgs/by-name/co/cosmic-store/package.nix index 8d2df5c76e0e..252f7f938691 100644 --- a/pkgs/by-name/co/cosmic-store/package.nix +++ b/pkgs/by-name/co/cosmic-store/package.nix @@ -15,17 +15,17 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-store"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-store"; tag = "epoch-${finalAttrs.version}"; - hash = "sha256-rrM0ibnapXv+IYDPqw/dXQJ44cDWPNlz7rREVQw5J1o="; + hash = "sha256-6PysnBu6b4REfmIwk7MgYZpNXeFKX2kIrwoflqAAKNg="; }; - cargoHash = "sha256-nJLowAuWvj5JfmPyExQyfCJ9pqNJ0OdzPPku9z7RDWc="; + cargoHash = "sha256-n9QuACHrSctmH8qLpDL3Z6iGyKXhYKVoGOiw14jVIkc="; nativeBuildInputs = [ just diff --git a/pkgs/by-name/co/cosmic-term/package.nix b/pkgs/by-name/co/cosmic-term/package.nix index 75eed0912f66..ddec82d42938 100644 --- a/pkgs/by-name/co/cosmic-term/package.nix +++ b/pkgs/by-name/co/cosmic-term/package.nix @@ -15,7 +15,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-term"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-wallpapers/package.nix b/pkgs/by-name/co/cosmic-wallpapers/package.nix index e217cfd1ef95..57581c16dd11 100644 --- a/pkgs/by-name/co/cosmic-wallpapers/package.nix +++ b/pkgs/by-name/co/cosmic-wallpapers/package.nix @@ -7,7 +7,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "cosmic-wallpapers"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/by-name/co/cosmic-workspaces-epoch/package.nix b/pkgs/by-name/co/cosmic-workspaces-epoch/package.nix index 7b7f2e5b331b..25fbcefe90ab 100644 --- a/pkgs/by-name/co/cosmic-workspaces-epoch/package.nix +++ b/pkgs/by-name/co/cosmic-workspaces-epoch/package.nix @@ -14,14 +14,14 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "cosmic-workspaces-epoch"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { owner = "pop-os"; repo = "cosmic-workspaces-epoch"; tag = "epoch-${finalAttrs.version}"; - hash = "sha256-XsBOT4AUdw9cA1wjHzS0StbSIt4z3tEMnnJdegdsROI="; + hash = "sha256-/NLEI+rBuqq1NXh9KijkR+lOlyEOfgwc46dgUoPxF1E="; }; cargoHash = "sha256-7BdyHz66A+QhJY0haohaQiNkhpmX9rqIW9gD8E4Q7Qg="; diff --git a/pkgs/by-name/cr/crow/cpm.patch b/pkgs/by-name/cr/crow/cpm.patch index 20122fb3cc34..d5a6b5b8ce6f 100644 --- a/pkgs/by-name/cr/crow/cpm.patch +++ b/pkgs/by-name/cr/crow/cpm.patch @@ -1,6 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7dbc2c3..cfdd98d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,7 +11,6 @@ project(Crow + + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +-include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/CPM.cmake) + + # Make sure Findasio.cmake module is found + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 67c458c..2873530 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt -@@ -5,18 +5,9 @@ +@@ -5,18 +5,9 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 new) set(CMAKE_POLICY_WARNING_CMP0126 new) include(${CMAKE_SOURCE_DIR}/cmake/compiler_options.cmake) @@ -9,7 +23,7 @@ +find_package(Catch2 REQUIRED) -CPMAddPackage(Catch2 -- VERSION 3.7.0 +- VERSION 3.10.0 - GITHUB_REPOSITORY catchorg/Catch2 - OPTIONS - "CATCH_INSTALL_DOCS Off" @@ -19,4 +33,4 @@ - enable_testing() - set(TEST_SRCS + # list the test sources diff --git a/pkgs/by-name/cr/crow/package.nix b/pkgs/by-name/cr/crow/package.nix index ec2898d65c10..65ed605821db 100644 --- a/pkgs/by-name/cr/crow/package.nix +++ b/pkgs/by-name/cr/crow/package.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "crow"; - version = "1.2.1.2"; + version = "1.3.0.0"; src = fetchFromGitHub { owner = "CrowCpp"; repo = "Crow"; tag = "v${finalAttrs.version}"; - hash = "sha256-iQ2owNry4LOmMxyO5L7O7XZB5vwUf+ZuZL76hZ6FThk="; + hash = "sha256-QLYQ0RouqDDvhnBF79O/9M7IwlF0eQ3HTqR6bXWm574="; }; patches = [ @@ -30,6 +30,8 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "CROW_BUILD_EXAMPLES" false) + # Requires more non-trivial patches to get around CPM + (lib.cmakeBool "CROW_GENERATE_SBOM" false) ]; doCheck = true; diff --git a/pkgs/by-name/fr/freedv/package.nix b/pkgs/by-name/fr/freedv/package.nix index 7f11fdd76b88..67c0ea5413d7 100644 --- a/pkgs/by-name/fr/freedv/package.nix +++ b/pkgs/by-name/fr/freedv/package.nix @@ -21,7 +21,6 @@ speexdsp, hamlib_4, wxGTK32, - sioclient, dbus, apple-sdk_15, nix-update-script, @@ -133,7 +132,6 @@ stdenv.mkDerivation (finalAttrs: { speexdsp hamlib_4 wxGTK32 - sioclient python3.pkgs.numpy ] ++ ( diff --git a/pkgs/by-name/fu/fulcio/package.nix b/pkgs/by-name/fu/fulcio/package.nix index 8a5772ab4e6a..cdba3ec955da 100644 --- a/pkgs/by-name/fu/fulcio/package.nix +++ b/pkgs/by-name/fu/fulcio/package.nix @@ -15,13 +15,13 @@ buildGoModule rec { pname = "fulcio"; - version = "1.8.2"; + version = "1.8.3"; src = fetchFromGitHub { owner = "sigstore"; repo = "fulcio"; tag = "v${version}"; - hash = "sha256-yAaMXlcGU1JXGMr2nkUHAWkd2JAlprPbKxs1MKvU6iM="; + hash = "sha256-yR8Q1ksz1fB8sc8NA6Hr4dwe5VXerEgIQYiIpNTOEf8="; # populate values that require us to use git. By doing this in postFetch we # can delete .git afterwards and maintain better reproducibility of the src. leaveDotGit = true; @@ -33,7 +33,7 @@ buildGoModule rec { find "$out" -name .git -print0 | xargs -0 rm -rf ''; }; - vendorHash = "sha256-xOM92evfKrjFhPPny1kIVK5uxZkLJZ+qyJ15/4HpsN0="; + vendorHash = "sha256-G+vtNCm9Ecpj5IzxXojzcjGEQL47R5gNMFI/JCs7C0w="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/by-name/go/gokey/package.nix b/pkgs/by-name/go/gokey/package.nix index f1775c771227..ee5e6c2be92e 100644 --- a/pkgs/by-name/go/gokey/package.nix +++ b/pkgs/by-name/go/gokey/package.nix @@ -5,18 +5,16 @@ }: buildGoModule rec { pname = "gokey"; - version = "0.1.3"; - - patches = [ ./version.patch ]; + version = "0.2.0"; src = fetchFromGitHub { owner = "cloudflare"; repo = "gokey"; tag = "v${version}"; - hash = "sha256-pvtRSWq/vXlyUShb61aiDlis9AiQnrA2PWycr1Zw0og="; + hash = "sha256-tJ9nCHhKPrw7SRGsqAlo/tf3tBLF63+CevEXggZADlE="; }; - vendorHash = "sha256-qlP2tI6QQMjxP59zaXgx4mX9IWSrOKWmme717wDaUEc="; + vendorHash = "sha256-Btac9Oi8efqRy+OH49Na3Y6RGehHEmGfvDo2/7EWPL4="; meta = with lib; { homepage = "https://github.com/cloudflare/gokey"; diff --git a/pkgs/by-name/go/gokey/version.patch b/pkgs/by-name/go/gokey/version.patch deleted file mode 100644 index e52620da0fb6..000000000000 --- a/pkgs/by-name/go/gokey/version.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/go.mod b/go.mod -index 50b6806..f23b2ec 100644 ---- a/go.mod -+++ b/go.mod -@@ -1,8 +1,9 @@ - module github.com/cloudflare/gokey - --go 1.13 -+go 1.17 - - require ( - golang.org/x/crypto v0.17.0 - golang.org/x/term v0.15.0 -+ golang.org/x/sys v0.15.0 - ) diff --git a/pkgs/by-name/hi/hidviz/package.nix b/pkgs/by-name/hi/hidviz/package.nix index 906660f7dfd9..1b35c0466334 100644 --- a/pkgs/by-name/hi/hidviz/package.nix +++ b/pkgs/by-name/hi/hidviz/package.nix @@ -8,7 +8,7 @@ qt6, libusb1, protobuf, - asio, + asio_1_32_0, }: stdenv.mkDerivation (finalAttrs: { @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' substituteInPlace {hidviz,libhidx{,/libhidx{,_server{,_daemon}}}}/CMakeLists.txt \ --replace-fail 'cmake_minimum_required(VERSION 3.2)' 'cmake_minimum_required(VERSION 3.10)' - substituteInPlace libhidx/cmake_modules/Findasio.cmake --replace-fail '/usr/include/asio' '${lib.getDev asio}/include/asio' + substituteInPlace libhidx/cmake_modules/Findasio.cmake --replace-fail '/usr/include/asio' '${lib.getDev asio_1_32_0}/include/asio' substituteInPlace libhidx/libhidx/src/Connector.cc --replace-fail '/usr/local/libexec' "$out/libexec" ''; @@ -39,7 +39,8 @@ stdenv.mkDerivation (finalAttrs: { qt6.qtwebengine libusb1 protobuf - asio + # depends on io_service + asio_1_32_0 ]; meta = with lib; { diff --git a/pkgs/by-name/hp/hpx/package.nix b/pkgs/by-name/hp/hpx/package.nix index 12e03214d444..d83564b94bdd 100644 --- a/pkgs/by-name/hp/hpx/package.nix +++ b/pkgs/by-name/hp/hpx/package.nix @@ -22,6 +22,12 @@ stdenv.mkDerivation rec { hash = "sha256-AhByaw1KnEDuRfKiN+/vQMbkG0BJ6Z3+h+QT8scFzAY="; }; + patches = [ + # https://github.com/STEllAR-GROUP/hpx/pull/6731 + # Fix build with asio >= 1.34.0 + ./remove_deprecated_asio_features.patch + ]; + propagatedBuildInputs = [ hwloc ]; buildInputs = [ asio diff --git a/pkgs/by-name/hp/hpx/remove_deprecated_asio_features.patch b/pkgs/by-name/hp/hpx/remove_deprecated_asio_features.patch new file mode 100644 index 000000000000..68d99bdb82a9 --- /dev/null +++ b/pkgs/by-name/hp/hpx/remove_deprecated_asio_features.patch @@ -0,0 +1,557 @@ +From f073c54f9c69108707dc477c890592049fcd95db Mon Sep 17 00:00:00 2001 +From: Hartmut Kaiser +Date: Mon, 30 Jun 2025 09:49:03 -0500 +Subject: [PATCH 1/2] Removing deprecated Asio features + +Signed-off-by: Hartmut Kaiser +--- + .../iostreams/src/server/output_stream.cpp | 30 ++++-- + examples/async_io/async_io_low_level.cpp | 5 + + libs/core/asio/include/hpx/asio/asio_util.hpp | 6 ++ + libs/core/asio/src/asio_util.cpp | 102 +++++++++++++++++- + libs/core/executors/src/service_executors.cpp | 10 +- + .../hpx/io_service/io_service_pool.hpp | 4 + + libs/core/io_service/src/io_service_pool.cpp | 4 + + libs/core/runtime_local/src/pool_timer.cpp | 2 +- + .../src/parcelport_gasnet.cpp | 6 ++ + .../parcelport_lci/src/parcelport_lci.cpp | 13 ++- + .../parcelport_mpi/src/parcelport_mpi.cpp | 6 ++ + 11 files changed, 168 insertions(+), 20 deletions(-) + +diff --git a/components/iostreams/src/server/output_stream.cpp b/components/iostreams/src/server/output_stream.cpp +index dd0a519b27f8..40f8ee0758a3 100644 +--- a/components/iostreams/src/server/output_stream.cpp ++++ b/components/iostreams/src/server/output_stream.cpp +@@ -34,7 +34,7 @@ namespace hpx::iostreams::detail { + ar << valid; + if (valid) + { +- ar& data_; ++ ar & data_; + } + } + +@@ -44,7 +44,7 @@ namespace hpx::iostreams::detail { + ar >> valid; + if (valid) + { +- ar& data_; ++ ar & data_; + } + } + } // namespace hpx::iostreams::detail +@@ -53,23 +53,29 @@ namespace hpx::iostreams::server { + /////////////////////////////////////////////////////////////////////////// + void output_stream::call_write_async(std::uint32_t locality_id, + std::uint64_t count, detail::buffer const& in, hpx::id_type /*this_id*/) +- { // {{{ ++ { + // Perform the IO operation. + pending_output_.output(locality_id, count, in, write_f, mtx_); +- } // }}} ++ } + + void output_stream::write_async(std::uint32_t locality_id, + std::uint64_t count, detail::buffer const& buf_in) +- { // {{{ ++ { + // Perform the IO in another OS thread. + detail::buffer in(buf_in); + // we need to capture the GID of the component to keep it alive long + // enough. + hpx::id_type this_id = this->get_id(); ++#if ASIO_VERSION >= 103400 ++ asio::post(hpx::get_thread_pool("io_pool")->get_io_service(), ++ hpx::bind_front(&output_stream::call_write_async, this, locality_id, ++ count, HPX_MOVE(in), HPX_MOVE(this_id))); ++#else + hpx::get_thread_pool("io_pool")->get_io_service().post( + hpx::bind_front(&output_stream::call_write_async, this, locality_id, + count, HPX_MOVE(in), HPX_MOVE(this_id))); +- } // }}} ++#endif ++ } + + /////////////////////////////////////////////////////////////////////////// + void output_stream::call_write_sync(std::uint32_t locality_id, +@@ -86,16 +92,22 @@ namespace hpx::iostreams::server { + + void output_stream::write_sync(std::uint32_t locality_id, + std::uint64_t count, detail::buffer const& buf_in) +- { // {{{ ++ { + // Perform the IO in another OS thread. + detail::buffer in(buf_in); ++#if ASIO_VERSION >= 103400 ++ asio::post(hpx::get_thread_pool("io_pool")->get_io_service(), ++ hpx::bind_front(&output_stream::call_write_sync, this, locality_id, ++ count, std::ref(in), ++ threads::thread_id_ref_type(threads::get_outer_self_id()))); ++#else + hpx::get_thread_pool("io_pool")->get_io_service().post( + hpx::bind_front(&output_stream::call_write_sync, this, locality_id, + count, std::ref(in), + threads::thread_id_ref_type(threads::get_outer_self_id()))); +- ++#endif + // Sleep until the worker thread wakes us up. + this_thread::suspend(threads::thread_schedule_state::suspended, + "output_stream::write_sync"); +- } // }}} ++ } + } // namespace hpx::iostreams::server +diff --git a/examples/async_io/async_io_low_level.cpp b/examples/async_io/async_io_low_level.cpp +index 75312984bf7f..153e5d124930 100644 +--- a/examples/async_io/async_io_low_level.cpp ++++ b/examples/async_io/async_io_low_level.cpp +@@ -39,7 +39,12 @@ hpx::future async_io(char const* string_to_write) + hpx::get_runtime().get_thread_pool("io_pool"); + + // ... and schedule the handler to run on one of its OS-threads. ++#if ASIO_VERSION >= 103400 ++ asio::post( ++ pool->get_io_service(), hpx::bind(&do_async_io, string_to_write, p)); ++#else + pool->get_io_service().post(hpx::bind(&do_async_io, string_to_write, p)); ++#endif + + return p->get_future(); + } +diff --git a/libs/core/asio/include/hpx/asio/asio_util.hpp b/libs/core/asio/include/hpx/asio/asio_util.hpp +index 286536692102..e79bb15c4cb1 100644 +--- a/libs/core/asio/include/hpx/asio/asio_util.hpp ++++ b/libs/core/asio/include/hpx/asio/asio_util.hpp +@@ -17,6 +17,7 @@ + #endif + #include + #include ++#include + + /* The asio support includes termios.h. + * The termios.h file on ppc64le defines these macros, which +@@ -50,7 +51,12 @@ namespace hpx::util { + [[nodiscard]] HPX_CORE_EXPORT std::string cleanup_ip_address( + std::string const& addr); + ++#if ASIO_VERSION >= 103400 ++ using endpoint_iterator_type = ++ asio::ip::basic_resolver_iterator; ++#else + using endpoint_iterator_type = asio::ip::tcp::resolver::iterator; ++#endif + + [[nodiscard]] endpoint_iterator_type HPX_CORE_EXPORT connect_begin( + std::string const& address, std::uint16_t port, +diff --git a/libs/core/asio/src/asio_util.cpp b/libs/core/asio/src/asio_util.cpp +index b5443e5dfa4e..bd248f3345d0 100644 +--- a/libs/core/asio/src/asio_util.cpp ++++ b/libs/core/asio/src/asio_util.cpp +@@ -54,8 +54,13 @@ namespace hpx::util { + { + using namespace asio::ip; + std::error_code ec; ++#if ASIO_VERSION >= 103400 ++ address_v4 const addr4 = //-V821 ++ make_address_v4(addr.c_str(), ec); ++#else + address_v4 const addr4 = //-V821 + address_v4::from_string(addr.c_str(), ec); ++#endif + if (!ec) + { // it's an IPV4 address + ep = tcp::endpoint(address(addr4), port); +@@ -64,8 +69,13 @@ namespace hpx::util { + + if (!force_ipv4) + { ++#if ASIO_VERSION >= 103400 ++ address_v6 const addr6 = //-V821 ++ make_address_v6(addr.c_str(), ec); ++#else + address_v6 const addr6 = //-V821 + address_v6::from_string(addr.c_str(), ec); ++#endif + if (!ec) + { // it's an IPV6 address + ep = tcp::endpoint(address(addr6), port); +@@ -108,8 +118,26 @@ namespace hpx::util { + { + // resolve the given address + tcp::resolver resolver(io_service); +- tcp::resolver::query query(hostname, std::to_string(port)); + ++#if ASIO_VERSION >= 103400 ++ auto resolver_results = resolver.resolve( ++ asio::ip::tcp::v4(), hostname, std::to_string(port)); ++ ++ auto it = resolver_results.begin(); ++ auto end = resolver_results.begin(); ++ ++ // skip ipv6 results, if required ++ if (it == end && !force_ipv4) ++ { ++ resolver_results = resolver.resolve( ++ asio::ip::tcp::v6(), hostname, std::to_string(port)); ++ it = resolver_results.begin(); ++ } ++ ++ HPX_ASSERT(it != end); ++ return *it; ++#else ++ tcp::resolver::query query(hostname, std::to_string(port)); + asio::ip::tcp::resolver::iterator it = resolver.resolve(query); + + // skip ipv6 results, if required +@@ -121,9 +149,9 @@ namespace hpx::util { + ++it; + } + } +- + HPX_ASSERT(it != asio::ip::tcp::resolver::iterator()); + return *it; ++#endif + } + catch (std::system_error const&) + { +@@ -149,8 +177,21 @@ namespace hpx::util { + { + asio::io_context io_service; + tcp::resolver resolver(io_service); ++ ++#if ASIO_VERSION >= 103400 ++ auto resolver_results = resolver.resolve( ++ asio::ip::tcp::v4(), asio::ip::host_name(), ""); ++ auto it = resolver_results.begin(); ++ if (it == resolver_results.end()) ++ { ++ resolver_results = resolver.resolve( ++ asio::ip::tcp::v6(), asio::ip::host_name(), ""); ++ it = resolver_results.begin(); ++ } ++#else + tcp::resolver::query query(asio::ip::host_name(), ""); + tcp::resolver::iterator it = resolver.resolve(query); ++#endif + tcp::endpoint endpoint = *it; + return endpoint.address().to_string(); + } +@@ -230,8 +271,14 @@ namespace hpx::util { + tcp::endpoint ep; + if (util::get_endpoint(address, port, ep)) + { ++#if ASIO_VERSION >= 103400 ++ auto resolver_results = ++ tcp::resolver::results_type::create(ep, address, port_str); ++ return resolver_results.begin(); ++#else + return { + tcp::resolver::results_type::create(ep, address, port_str)}; ++#endif + } + } + catch (std::system_error const&) +@@ -244,10 +291,24 @@ namespace hpx::util { + { + // resolve the given address + tcp::resolver resolver(io_service); ++ ++#if ASIO_VERSION >= 103400 ++ auto resolver_results = resolver.resolve(asio::ip::tcp::v4(), ++ !address.empty() ? address : asio::ip::host_name(), port_str); ++ auto it = resolver_results.begin(); ++ if (it == resolver_results.end()) ++ { ++ resolver_results = resolver.resolve(asio::ip::tcp::v6(), ++ !address.empty() ? address : asio::ip::host_name(), ++ port_str); ++ it = resolver_results.begin(); ++ } ++ return it; ++#else + tcp::resolver::query query( + !address.empty() ? address : asio::ip::host_name(), port_str); +- + return {resolver.resolve(query)}; ++#endif + } + catch (std::system_error const&) + { +@@ -276,8 +337,14 @@ namespace hpx::util { + tcp::endpoint ep; + if (util::get_endpoint(address, port, ep)) + { ++#if ASIO_VERSION >= 103400 ++ auto resolver_results = ++ tcp::resolver::results_type::create(ep, address, port_str); ++ return resolver_results.begin(); ++#else + return { + tcp::resolver::results_type::create(ep, address, port_str)}; ++#endif + } + } + catch (std::system_error const&) +@@ -290,9 +357,21 @@ namespace hpx::util { + { + // resolve the given address + tcp::resolver resolver(io_service); ++#if ASIO_VERSION >= 103400 ++ auto resolver_results = ++ resolver.resolve(asio::ip::tcp::v4(), address, port_str); ++ auto it = resolver_results.begin(); ++ if (it == resolver_results.end()) ++ { ++ resolver_results = ++ resolver.resolve(asio::ip::tcp::v6(), address, port_str); ++ it = resolver_results.begin(); ++ } ++ return it; ++#else + tcp::resolver::query query(address, port_str); +- + return {resolver.resolve(query)}; ++#endif + } + catch (std::system_error const&) + { +@@ -306,9 +385,22 @@ namespace hpx::util { + { + // resolve the given address + tcp::resolver resolver(io_service); +- tcp::resolver::query query(asio::ip::host_name(), port_str); + ++#if ASIO_VERSION >= 103400 ++ auto resolver_results = resolver.resolve( ++ asio::ip::tcp::v4(), asio::ip::host_name(), port_str); ++ auto it = resolver_results.begin(); ++ if (it == resolver_results.end()) ++ { ++ resolver_results = resolver.resolve( ++ asio::ip::tcp::v6(), asio::ip::host_name(), port_str); ++ it = resolver_results.begin(); ++ } ++ return it; ++#else ++ tcp::resolver::query query(asio::ip::host_name(), port_str); + return {resolver.resolve(query)}; ++#endif + } + catch (std::system_error const&) + { +diff --git a/libs/core/executors/src/service_executors.cpp b/libs/core/executors/src/service_executors.cpp +index 4e3ba88a2392..3e39e59ede45 100644 +--- a/libs/core/executors/src/service_executors.cpp ++++ b/libs/core/executors/src/service_executors.cpp +@@ -1,4 +1,4 @@ +-// Copyright (c) 2023 Hartmut Kaiser ++// Copyright (c) 2023-2025 Hartmut Kaiser + // + // SPDX-License-Identifier: BSL-1.0 + // Distributed under the Boost Software License, Version 1.0. (See accompanying +@@ -10,12 +10,20 @@ + #include + + #include ++#include ++#if ASIO_VERSION >= 103400 ++#include ++#endif + + namespace hpx::parallel::execution::detail { + + void service_executor::post( + hpx::util::io_service_pool* pool, hpx::function&& f) + { ++#if ASIO_VERSION >= 103400 ++ asio::post(pool->get_io_service(), HPX_MOVE(f)); ++#else + pool->get_io_service().post(HPX_MOVE(f)); ++#endif + } + } // namespace hpx::parallel::execution::detail +diff --git a/libs/core/io_service/include/hpx/io_service/io_service_pool.hpp b/libs/core/io_service/include/hpx/io_service/io_service_pool.hpp +index 8d800f36d18d..8441886b9a1d 100644 +--- a/libs/core/io_service/include/hpx/io_service/io_service_pool.hpp ++++ b/libs/core/io_service/include/hpx/io_service/io_service_pool.hpp +@@ -19,6 +19,10 @@ + #endif + #include + #include ++#include ++#if ASIO_VERSION >= 103400 ++#include ++#endif + + // The boost asio support includes termios.h. The termios.h file on ppc64le + // defines these macros, which are also used by blaze, blaze_tensor as Template +diff --git a/libs/core/io_service/src/io_service_pool.cpp b/libs/core/io_service/src/io_service_pool.cpp +index 44eb3318c04b..ca2fe443e219 100644 +--- a/libs/core/io_service/src/io_service_pool.cpp ++++ b/libs/core/io_service/src/io_service_pool.cpp +@@ -259,7 +259,11 @@ namespace hpx::util { + for (std::size_t i = 0; i < pool_size_; ++i) + { + work_.emplace_back(initialize_work(*io_services_[i])); ++#if ASIO_VERSION >= 103400 ++ io_services_[i]->restart(); ++#else + io_services_[i]->reset(); ++#endif + } + + continue_barrier_->wait(); +diff --git a/libs/core/runtime_local/src/pool_timer.cpp b/libs/core/runtime_local/src/pool_timer.cpp +index 7487b5a72692..d2723d2452e8 100644 +--- a/libs/core/runtime_local/src/pool_timer.cpp ++++ b/libs/core/runtime_local/src/pool_timer.cpp +@@ -146,7 +146,7 @@ namespace hpx::util::detail { + } + + HPX_ASSERT(timer_ != nullptr); +- timer_->expires_from_now(time_duration.value()); ++ timer_->expires_at(time_duration.from_now()); + timer_->async_wait(hpx::bind_front( //-V779 + &pool_timer::timer_handler, this->shared_from_this())); + +diff --git a/libs/full/parcelport_gasnet/src/parcelport_gasnet.cpp b/libs/full/parcelport_gasnet/src/parcelport_gasnet.cpp +index 77da0c839b16..16160af101b7 100644 +--- a/libs/full/parcelport_gasnet/src/parcelport_gasnet.cpp ++++ b/libs/full/parcelport_gasnet/src/parcelport_gasnet.cpp +@@ -142,8 +142,14 @@ namespace hpx::parcelset { + + for (std::size_t i = 0; i != io_service_pool_.size(); ++i) + { ++#if ASIO_VERSION >= 103400 ++ asio::post( ++ io_service_pool_.get_io_service(static_cast(i)), ++ hpx::bind(&parcelport::io_service_work, this)); ++#else + io_service_pool_.get_io_service(int(i)).post( + hpx::bind(&parcelport::io_service_work, this)); ++#endif + } + return true; + } +diff --git a/libs/full/parcelport_lci/src/parcelport_lci.cpp b/libs/full/parcelport_lci/src/parcelport_lci.cpp +index d9083191376a..40cf14faba5c 100644 +--- a/libs/full/parcelport_lci/src/parcelport_lci.cpp ++++ b/libs/full/parcelport_lci/src/parcelport_lci.cpp +@@ -98,8 +98,13 @@ namespace hpx::parcelset::policies::lci { + sender_p->run(); + for (std::size_t i = 0; i != io_service_pool_.size(); ++i) + { ++#if ASIO_VERSION >= 103400 ++ asio::post(io_service_pool_.get_io_service(static_cast(i)), ++ hpx::bind(&parcelport::io_service_work, this)); ++#else + io_service_pool_.get_io_service(int(i)).post( + hpx::bind(&parcelport::io_service_work, this)); ++#endif + } + return true; + } +@@ -167,10 +172,10 @@ namespace hpx::parcelset::policies::lci { + static_cast(hpx::get_local_worker_thread_num()); + HPX_ASSERT(prg_thread_id < config_t::progress_thread_num); + for (int i = prg_thread_id * config_t::ndevices / +- config_t::progress_thread_num; +- i < (prg_thread_id + 1) * config_t::ndevices / +- config_t::progress_thread_num; +- ++i) ++ config_t::progress_thread_num; ++ i < (prg_thread_id + 1) * config_t::ndevices / ++ config_t::progress_thread_num; ++ ++i) + { + devices_to_progress.push_back(&devices[i]); + } +diff --git a/libs/full/parcelport_mpi/src/parcelport_mpi.cpp b/libs/full/parcelport_mpi/src/parcelport_mpi.cpp +index e30025899e76..c319c54df7ef 100644 +--- a/libs/full/parcelport_mpi/src/parcelport_mpi.cpp ++++ b/libs/full/parcelport_mpi/src/parcelport_mpi.cpp +@@ -181,8 +181,14 @@ namespace hpx::parcelset { + + for (std::size_t i = 0; i != io_service_pool_.size(); ++i) + { ++#if ASIO_VERSION >= 103400 ++ asio::post( ++ io_service_pool_.get_io_service(static_cast(i)), ++ hpx::bind(&parcelport::io_service_work, this)); ++#else + io_service_pool_.get_io_service(static_cast(i)) + .post(hpx::bind(&parcelport::io_service_work, this)); ++#endif + } + return true; + } + +From 85805f56579fe6fa6c5905daa0d228eba26c40c3 Mon Sep 17 00:00:00 2001 +From: Hartmut Kaiser +Date: Mon, 30 Jun 2025 10:31:26 -0500 +Subject: [PATCH 2/2] Changing some CIs to use Asio 1.34.2 + +Signed-off-by: Hartmut Kaiser +--- + .github/workflows/linux_debug.yml | 1 + + .github/workflows/macos_debug.yml | 1 + + .github/workflows/windows_debug_vs2022.yml | 1 + + libs/full/parcelport_lci/src/parcelport_lci.cpp | 2 ++ + 4 files changed, 5 insertions(+) + +diff --git a/.github/workflows/linux_debug.yml b/.github/workflows/linux_debug.yml +index 551e6d7215b2..0048b533326f 100644 +--- a/.github/workflows/linux_debug.yml ++++ b/.github/workflows/linux_debug.yml +@@ -26,6 +26,7 @@ jobs: + -DCMAKE_BUILD_TYPE=Debug \ + -DHPX_WITH_MALLOC=system \ + -DHPX_WITH_FETCH_ASIO=ON \ ++ -DHPX_WITH_ASIO_TAG=asio-1-34-2 \ + -DHPX_WITH_EXAMPLES=ON \ + -DHPX_WITH_TESTS=ON \ + -DHPX_WITH_TESTS_MAX_THREADS_PER_LOCALITY=2 \ +diff --git a/.github/workflows/macos_debug.yml b/.github/workflows/macos_debug.yml +index 7d0936730d54..5406fc0be0f1 100644 +--- a/.github/workflows/macos_debug.yml ++++ b/.github/workflows/macos_debug.yml +@@ -29,6 +29,7 @@ jobs: + -GNinja \ + -DCMAKE_BUILD_TYPE=Debug \ + -DHPX_WITH_FETCH_ASIO=ON \ ++ -DHPX_WITH_ASIO_TAG=asio-1-34-2 \ + -DHPX_WITH_EXAMPLES=ON \ + -DHPX_WITH_TESTS=ON \ + -DHPX_WITH_TESTS_MAX_THREADS_PER_LOCALITY=3 \ +diff --git a/.github/workflows/windows_debug_vs2022.yml b/.github/workflows/windows_debug_vs2022.yml +index cebecd992140..f91765418163 100644 +--- a/.github/workflows/windows_debug_vs2022.yml ++++ b/.github/workflows/windows_debug_vs2022.yml +@@ -31,6 +31,7 @@ jobs: + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_TOOLCHAIN_FILE='C:/projects/vcpkg/scripts/buildsystems/vcpkg.cmake' \ + -DHPX_WITH_FETCH_ASIO=ON \ ++ -DHPX_WITH_ASIO_TAG=asio-1-34-2 \ + -DHPX_WITH_EXAMPLES=ON \ + -DHPX_WITH_TESTS=ON \ + -DHPX_WITH_TESTS_EXAMPLES=ON \ +diff --git a/libs/full/parcelport_lci/src/parcelport_lci.cpp b/libs/full/parcelport_lci/src/parcelport_lci.cpp +index 40cf14faba5c..b9d1bcf293e9 100644 +--- a/libs/full/parcelport_lci/src/parcelport_lci.cpp ++++ b/libs/full/parcelport_lci/src/parcelport_lci.cpp +@@ -171,6 +171,7 @@ namespace hpx::parcelset::policies::lci { + int prg_thread_id = + static_cast(hpx::get_local_worker_thread_num()); + HPX_ASSERT(prg_thread_id < config_t::progress_thread_num); ++ // clang-format off + for (int i = prg_thread_id * config_t::ndevices / + config_t::progress_thread_num; + i < (prg_thread_id + 1) * config_t::ndevices / +@@ -179,6 +180,7 @@ namespace hpx::parcelset::policies::lci { + { + devices_to_progress.push_back(&devices[i]); + } ++ // clang-format on + } + } + } + diff --git a/pkgs/by-name/ma/mariadb-galera/package.nix b/pkgs/by-name/ma/mariadb-galera/package.nix index adcfd704a9a5..81a1ee8ab801 100644 --- a/pkgs/by-name/ma/mariadb-galera/package.nix +++ b/pkgs/by-name/ma/mariadb-galera/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - asio, + asio_1_32_0, boost, check, openssl, @@ -25,7 +25,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ - asio + # depends on io_service + asio_1_32_0 boost.dev check openssl diff --git a/pkgs/by-name/ms/msolve/package.nix b/pkgs/by-name/ms/msolve/package.nix index c22570ec6ce1..93d01cf3bd48 100644 --- a/pkgs/by-name/ms/msolve/package.nix +++ b/pkgs/by-name/ms/msolve/package.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "msolve"; - version = "0.9.2"; + version = "0.9.3"; src = fetchFromGitHub { owner = "algebraic-solving"; repo = "msolve"; tag = "v${finalAttrs.version}"; - hash = "sha256-/KV4zmato86DKDOUe3D/Ru/cFQaKOPyx6cQ8wZS4bgA="; + hash = "sha256-N/ePJGbF3pGU+IiyztkKujpfFRLy7FSIkpUltv6iJXY="; }; postPatch = '' diff --git a/pkgs/by-name/no/noto-fonts/package.nix b/pkgs/by-name/no/noto-fonts/package.nix index 5757eef4320c..15d33e5140b0 100644 --- a/pkgs/by-name/no/noto-fonts/package.nix +++ b/pkgs/by-name/no/noto-fonts/package.nix @@ -20,13 +20,13 @@ stdenvNoCC.mkDerivation rec { pname = "noto-fonts${suffix}"; - version = "2025.11.01"; + version = "2025.12.01"; src = fetchFromGitHub { owner = "notofonts"; repo = "notofonts.github.io"; rev = "noto-monthly-release-${version}"; - hash = "sha256-T7F8SUCbEEuJfgUYWk+/lDGuXn/df2DaGc+3hCuYhS0="; + hash = "sha256-XYamBsakiqfpwghuQan81ZNJTvcfua9hIbVXU4HWOqY="; }; outputs = [ diff --git a/pkgs/by-name/nu/nuraft/package.nix b/pkgs/by-name/nu/nuraft/package.nix index 1176313a2805..d32e01202816 100644 --- a/pkgs/by-name/nu/nuraft/package.nix +++ b/pkgs/by-name/nu/nuraft/package.nix @@ -5,7 +5,7 @@ fetchpatch, cmake, boost, - asio, + asio_1_32_0, openssl, zlib, }: @@ -34,7 +34,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ boost - asio + # Depends on io_service + asio_1_32_0 openssl zlib ]; diff --git a/pkgs/by-name/op/openvpn3/package.nix b/pkgs/by-name/op/openvpn3/package.nix index 10560959b300..c4223f7a93d3 100644 --- a/pkgs/by-name/op/openvpn3/package.nix +++ b/pkgs/by-name/op/openvpn3/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - asio, + asio_1_32_0, glib, jsoncpp, libcap_ng, @@ -81,7 +81,8 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - asio + # Depends on io_service + asio_1_32_0 glib jsoncpp libcap_ng @@ -101,7 +102,7 @@ stdenv.mkDerivation rec { (lib.mesonOption "bash-completion" "enabled") (lib.mesonOption "test_programs" "disabled") (lib.mesonOption "unit_tests" "disabled") - (lib.mesonOption "asio_path" "${asio}") + (lib.mesonOption "asio_path" "${asio_1_32_0}") (lib.mesonOption "dbus_policy_dir" "${placeholder "out"}/share/dbus-1/system.d") (lib.mesonOption "dbus_system_service_dir" "${placeholder "out"}/share/dbus-1/system-services") (lib.mesonOption "systemd_system_unit_dir" "${placeholder "out"}/lib/systemd/system") diff --git a/pkgs/by-name/pc/pc-ble-driver/package.nix b/pkgs/by-name/pc/pc-ble-driver/package.nix index 24b6ae8b58ae..cfa299a04036 100644 --- a/pkgs/by-name/pc/pc-ble-driver/package.nix +++ b/pkgs/by-name/pc/pc-ble-driver/package.nix @@ -5,7 +5,7 @@ fetchFromGitHub, cmake, git, - asio, + asio_1_32_0, catch2, spdlog, udev, @@ -47,7 +47,8 @@ stdenv.mkDerivation rec { git ]; buildInputs = [ - asio + # Depends on io_service + asio_1_32_0 catch2 spdlog ]; diff --git a/pkgs/by-name/pr/prometheus-qbittorrent-exporter/package.nix b/pkgs/by-name/pr/prometheus-qbittorrent-exporter/package.nix index f3ddde0e40e4..08b3c0e5969c 100644 --- a/pkgs/by-name/pr/prometheus-qbittorrent-exporter/package.nix +++ b/pkgs/by-name/pr/prometheus-qbittorrent-exporter/package.nix @@ -6,17 +6,17 @@ }: buildGoModule (finalAttrs: { pname = "prometheus-qbittorrent-exporter"; - version = "1.12.1"; + version = "1.13.0"; src = fetchFromGitHub { owner = "martabal"; repo = "qbittorrent-exporter"; tag = "v${finalAttrs.version}"; - hash = "sha256-9J4nGG52M7SSeXigLBJK/dqXRvSpPqOGRJ8BQx7+1eU="; + hash = "sha256-ivHTGj2+6c23KW5aT5a8NFzUxV13u0y9UnHttZYTkuA="; }; sourceRoot = "${finalAttrs.src.name}/src"; - vendorHash = "sha256-jJmhRnjioeTq9Uol0lYLChPi4O1D9JnGqN7q1XK36yE="; + vendorHash = "sha256-FHKt2QpvianVVbAJUcaou/+Ok69a8NbkM7ymVgxUi0I="; ldflags = [ "-s" diff --git a/pkgs/by-name/pr/prometheus/package.nix b/pkgs/by-name/pr/prometheus/package.nix index 05781511931e..2ad59a39c355 100644 --- a/pkgs/by-name/pr/prometheus/package.nix +++ b/pkgs/by-name/pr/prometheus/package.nix @@ -33,7 +33,7 @@ buildGoModule (finalAttrs: { pname = "prometheus"; - version = "3.7.2"; + version = "3.8.0"; outputs = [ "out" @@ -45,14 +45,14 @@ buildGoModule (finalAttrs: { owner = "prometheus"; repo = "prometheus"; tag = "v${finalAttrs.version}"; - hash = "sha256-bitRDX1oymFfzvQVYL31BON6UBfQYnqjZefQKc+yXx0="; + hash = "sha256-hRuZxwPPDLxQvy5MPKEyfmanNabcSjLRO+XbNKugPtk="; }; - vendorHash = "sha256-V+qLxjqGOaT1veEwtklqcS7iO31ufvDHBA9DbZLzDiE="; + vendorHash = "sha256-5wDaG01vcTtGzrS/S33U5XWXoSWM+N9z3dzXZlILxD8="; webUiStatic = fetchurl { url = "https://github.com/prometheus/prometheus/releases/download/v${finalAttrs.version}/prometheus-web-ui-${finalAttrs.version}.tar.gz"; - hash = "sha256-NFv6zNpMacd0RgVYBlWKbXKNCEh7WijpREg0bNojisM="; + hash = "sha256-oOEvNZFlYtTNBsn+B2pAWXi0A2oJ6IAo7V8bOLtjfCM="; }; excludedPackages = [ @@ -107,7 +107,6 @@ buildGoModule (finalAttrs: { in [ "-s" - "-w" "-X ${t}.Version=${finalAttrs.version}" "-X ${t}.Revision=unknown" "-X ${t}.Branch=unknown" @@ -129,19 +128,24 @@ buildGoModule (finalAttrs: { # Test mock data uses 64 bit data without an explicit (u)int64 doCheck = !(stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.parsed.cpu.bits < 64); - checkFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ + checkFlags = [ + # Skip for issue during TSDB compaction + "-skip=TestBlockRanges" + ] + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ "-skip=TestEvaluations/testdata/aggregators.test" ]; passthru.tests = { inherit (nixosTests) prometheus; }; - meta = with lib; { + meta = { description = "Service monitoring system and time series database"; homepage = "https://prometheus.io"; - license = licenses.asl20; - maintainers = with maintainers; [ + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ fpletz Frostman ]; + mainProgram = "prometheus"; }; }) diff --git a/pkgs/by-name/re/remnote/package.nix b/pkgs/by-name/re/remnote/package.nix index 36707c89cccd..a574bab6d61e 100644 --- a/pkgs/by-name/re/remnote/package.nix +++ b/pkgs/by-name/re/remnote/package.nix @@ -6,10 +6,10 @@ }: let pname = "remnote"; - version = "1.22.23"; + version = "1.22.28"; src = fetchurl { url = "https://download2.remnote.io/remnote-desktop2/RemNote-${version}.AppImage"; - hash = "sha256-8AliWnmYemaF6R7MGiU+H0ZwVw5hZRIbMHuGo4p+NQg="; + hash = "sha256-suYd2IK/lwPd0sEoRmKPydgyExX5aRNyBLikubBmMpI="; }; appimageContents = appimageTools.extractType2 { inherit pname version src; }; in diff --git a/pkgs/by-name/ri/ripunzip/package.nix b/pkgs/by-name/ri/ripunzip/package.nix index 0aee5d462a59..a180294b039a 100644 --- a/pkgs/by-name/ri/ripunzip/package.nix +++ b/pkgs/by-name/ri/ripunzip/package.nix @@ -11,16 +11,16 @@ rustPlatform.buildRustPackage rec { pname = "ripunzip"; - version = "2.0.3"; + version = "2.0.4"; src = fetchFromGitHub { owner = "google"; repo = "ripunzip"; rev = "v${version}"; - hash = "sha256-giNaTALPZYOfQ+kPyQufbRTdTwwKLK7iDvg50YNfzDg="; + hash = "sha256-oujRw/4yKNNqLJLTN4wxaOllSUGMu077YgWZkD0DJ4M="; }; - cargoHash = "sha256-uz07yZBkmBTEGB64rhBYQ2iL0KbrY4UAM96utv8HCSE="; + cargoHash = "sha256-J6FtaWjeJhbSB1WoAbh6c4DeShPmqGgmh2NTNRS6CUk="; buildInputs = [ openssl ]; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/by-name/sc/scom/package.nix b/pkgs/by-name/sc/scom/package.nix index 7f41fed11291..b17e053d819b 100644 --- a/pkgs/by-name/sc/scom/package.nix +++ b/pkgs/by-name/sc/scom/package.nix @@ -5,13 +5,13 @@ }: stdenv.mkDerivation (finaAttrs: { pname = "scom"; - version = "1.2.2"; + version = "1.2.3"; src = fetchFromGitHub { owner = "crash-systems"; repo = "scom"; tag = finaAttrs.version; - hash = "sha256-erHer9oeCFwenaEDk/RWYzGkrqigpwB+RPa+UVxFrOI="; + hash = "sha256-eFnCXMrks5V6o+0+vMjR8zaCdkc+hC3trSS+pOh4Y6U="; }; enableParallelBuilding = true; diff --git a/pkgs/by-name/si/sioclient/package.nix b/pkgs/by-name/si/sioclient/package.nix deleted file mode 100644 index fcf5a02ef7b3..000000000000 --- a/pkgs/by-name/si/sioclient/package.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - cmake, - asio, - rapidjson, - websocketpp, -}: - -stdenv.mkDerivation { - pname = "sioclient"; - version = "3.1.0-unstable-2023-11-10"; - - src = fetchFromGitHub { - owner = "socketio"; - repo = "socket.io-client-cpp"; - rev = "0dc2f7afea17a0e5bfb5e9b1e6d6f26ab1455cef"; - hash = "sha256-iUKWDv/CS2e68cCSM0QUobkfz2A8ZjJ7S0zw7rowQJ0="; - }; - - nativeBuildInputs = [ - cmake - ]; - - buildInputs = [ - asio - rapidjson - websocketpp - ]; - - meta = with lib; { - description = "C++11 implementation of Socket.IO client"; - homepage = "https://github.com/socketio/socket.io-client-cpp"; - license = licenses.mit; - maintainers = with maintainers; [ wegank ]; - platforms = platforms.unix; - }; -} diff --git a/pkgs/by-name/su/surrealdb-migrations/package.nix b/pkgs/by-name/su/surrealdb-migrations/package.nix index bb577d94dde0..b1047590fd11 100644 --- a/pkgs/by-name/su/surrealdb-migrations/package.nix +++ b/pkgs/by-name/su/surrealdb-migrations/package.nix @@ -9,7 +9,7 @@ let pname = "surrealdb-migrations"; - version = "2.3.0"; + version = "2.4.0"; in rustPlatform.buildRustPackage { inherit pname version; @@ -18,10 +18,10 @@ rustPlatform.buildRustPackage { owner = "Odonno"; repo = "surrealdb-migrations"; rev = "v${version}"; - hash = "sha256-BCShTHZSeahJclOHcWh7etl0FajhFs4/RVVszFZdOV8="; + hash = "sha256-eeIXbpfXZ91XcQ+4T76BGZU0Ron5dAf2pUAvLj9nEok="; }; - cargoHash = "sha256-fV7yHRiqcM4l9i3tnoMawEQxd9fqbcZYZkeTITy310g="; + cargoHash = "sha256-XA4OXHKSdVKoq3aKpKnYXzWjXHolDqPNLeIDS3iARYI="; # Error: No such file or directory (os error 2) # failures: diff --git a/pkgs/by-name/we/websocketpp/package.nix b/pkgs/by-name/we/websocketpp/package.nix index aa3abf8d9388..8720e5e5bf27 100644 --- a/pkgs/by-name/we/websocketpp/package.nix +++ b/pkgs/by-name/we/websocketpp/package.nix @@ -18,10 +18,14 @@ stdenv.mkDerivation rec { }; patches = [ + # Fix build with cmake4 (fetchpatch { url = "https://github.com/zaphoyd/websocketpp/commit/deb0a334471362608958ce59a6b0bcd3e5b73c24.patch?full_index=1"; hash = "sha256-bFCHwtRuCFz9vr4trmmBLziPSlEx6SNjsTcBv9zV8go="; }) + # Fix build with boost187/newer asio + # https://github.com/zaphoyd/websocketpp/pull/1164 + ./websocketpp-0.8.2-boost-1.87-compat.patch ]; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/by-name/we/websocketpp/websocketpp-0.8.2-boost-1.87-compat.patch b/pkgs/by-name/we/websocketpp/websocketpp-0.8.2-boost-1.87-compat.patch new file mode 100644 index 000000000000..71c51cdb8662 --- /dev/null +++ b/pkgs/by-name/we/websocketpp/websocketpp-0.8.2-boost-1.87-compat.patch @@ -0,0 +1,2534 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Amini Allight +Date: Wed, 12 Feb 2025 03:53:35 +0000 +Subject: [PATCH 1/7] fixed incompatibility with Boost 1.87 due to use of + previously-deprecated now-removed functionality + +(cherry picked from commit 146925c2404655dbb61b9a18e57692bfc18eb6c6) + + Conflicts: + examples/broadcast_server/broadcast_server.cpp + websocketpp/transport/asio/endpoint.hpp + websocketpp/transport/asio/security/none.hpp + websocketpp/transport/asio/security/tls.hpp +--- + SConstruct | 4 +- + docs/faq.dox | 12 +- + .../broadcast_server/broadcast_server.cpp | 2 +- + examples/debug_client/debug_client.cpp | 2 +- + examples/debug_server/debug_server.cpp | 2 +- + examples/echo_client/echo_client.cpp | 2 +- + examples/echo_server/echo_server.cpp | 2 +- + .../echo_server_both/echo_server_both.cpp | 8 +- + examples/echo_server_tls/echo_server_tls.cpp | 2 +- + .../CMakeLists.txt | 2 +- + .../SConscript | 4 +- + .../external_io_context.cpp} | 14 +- + .../tcp_echo_server.hpp | 12 +- + examples/print_client/print_client.cpp | 2 +- + .../print_client_tls/print_client_tls.cpp | 2 +- + examples/scratch_server/scratch_server.cpp | 2 +- + examples/sip_client/sip_client.cpp | 2 +- + .../telemetry_client/telemetry_client.cpp | 4 +- + .../telemetry_server/telemetry_server.cpp | 2 +- + examples/testee_client/testee_client.cpp | 2 +- + examples/testee_server/testee_server.cpp | 2 +- + test/endpoint/endpoint.cpp | 6 +- + test/transport/asio/timers.cpp | 8 +- + test/transport/integration.cpp | 27 ++- + tutorials/utility_server/step1.cpp | 2 +- + tutorials/utility_server/step2.cpp | 2 +- + tutorials/utility_server/utility_server.md | 8 +- + websocketpp/roles/server_endpoint.hpp | 4 +- + websocketpp/transport/asio/base.hpp | 2 +- + websocketpp/transport/asio/connection.hpp | 44 ++--- + websocketpp/transport/asio/endpoint.hpp | 182 +++++++++--------- + websocketpp/transport/asio/security/none.hpp | 16 +- + websocketpp/transport/asio/security/tls.hpp | 20 +- + websocketpp/transport/debug/endpoint.hpp | 2 +- + websocketpp/transport/iostream/endpoint.hpp | 2 +- + websocketpp/transport/stub/endpoint.hpp | 2 +- + 36 files changed, 205 insertions(+), 208 deletions(-) + rename examples/{external_io_service => external_io_context}/CMakeLists.txt (87%) + rename examples/{external_io_service => external_io_context}/SConscript (72%) + rename examples/{external_io_service/external_io_service.cpp => external_io_context/external_io_context.cpp} (92%) + rename examples/{external_io_service => external_io_context}/tcp_echo_server.hpp (92%) + +diff --git a/SConstruct b/SConstruct +index ae3df10..08a75a3 100644 +--- a/SConstruct ++++ b/SConstruct +@@ -271,8 +271,8 @@ subprotocol_server = SConscript('#/examples/subprotocol_server/SConscript',varia + # telemetry_server + telemetry_server = SConscript('#/examples/telemetry_server/SConscript',variant_dir = builddir + 'telemetry_server',duplicate = 0) + +-# external_io_service +-external_io_service = SConscript('#/examples/external_io_service/SConscript',variant_dir = builddir + 'external_io_service',duplicate = 0) ++# external_io_context ++external_io_context = SConscript('#/examples/external_io_context/SConscript',variant_dir = builddir + 'external_io_context',duplicate = 0) + + if not env['PLATFORM'].startswith('win'): + # iostream_server +diff --git a/docs/faq.dox b/docs/faq.dox +index 9f417ec..c89e85b 100644 +--- a/docs/faq.dox ++++ b/docs/faq.dox +@@ -29,19 +29,19 @@ Note: some browsers will allow the connection to continue if they requested a su + + ### How do I cleanly exit an Asio transport based program + +-The Asio transport based clients and servers use the Asio library's underlying `io_service` to handle asyncronous networking operations. The standard behavior of the io_service is to run until there are no async operations left and then return. WebSocket++, when using the Asio transport, behaves like a standard Asio application. If you want your WebSocket++/Asio based program to stop network operations and cleanly close all sockets you will want to do the following: ++The Asio transport based clients and servers use the Asio library's underlying `io_context` to handle asyncronous networking operations. The standard behavior of the io_context is to run until there are no async operations left and then return. WebSocket++, when using the Asio transport, behaves like a standard Asio application. If you want your WebSocket++/Asio based program to stop network operations and cleanly close all sockets you will want to do the following: + + - For servers, call `websocketpp::transport::asio::endpoint::stop_listening` to initiate the closing of the server listening socket. + - For clients, if you have engaged perpetual mode with `websocketpp::transport::asio::endpoint::start_perpetual`, disable it with `websocketpp::transport::asio::endpoint::stop_perpetual`. + - For both, run `websocketpp::endpoint::close` or `websocketpp::connection::close` on all currently outstanding connections. This will initiate the WebSocket closing handshake for these connections +-- Wait. Asio is asyncronous. When the calls to the above methods (stop_listening, close, etc) complete the server *will still be listening*, the connections *will still be active* until the io_service gets around to asyncronously processing the socket and WebSocket protocol closing handshakes. The `io_service::run` method will exit cleanly and automatically when all operations are complete. ++- Wait. Asio is asyncronous. When the calls to the above methods (stop_listening, close, etc) complete the server *will still be listening*, the connections *will still be active* until the io_context gets around to asyncronously processing the socket and WebSocket protocol closing handshakes. The `io_context::run` method will exit cleanly and automatically when all operations are complete. + +-__WARNING__: Asio's `io_service` has a method called `stop`. WebSocket++ wraps this method as `websocketpp::transport::asio::endpoint::stop`. While this operation has a benign sounding name, it is a powerful and destructive operation that should only be used in special cases. If you are using `io_service::stop` or `endpoint::stop` without a very good reason your program is likely broken and may exhibit erratic behavior. Specifically, `io_service::stop` stops the processing of events entirely. This does not give current operations (such as socket closing handshakes) the opportunity to finish. It will leave your sockets in a dangling state that may invoke operating system level timeouts or other errors. ++__WARNING__: Asio's `io_context` has a method called `stop`. WebSocket++ wraps this method as `websocketpp::transport::asio::endpoint::stop`. While this operation has a benign sounding name, it is a powerful and destructive operation that should only be used in special cases. If you are using `io_context::stop` or `endpoint::stop` without a very good reason your program is likely broken and may exhibit erratic behavior. Specifically, `io_context::stop` stops the processing of events entirely. This does not give current operations (such as socket closing handshakes) the opportunity to finish. It will leave your sockets in a dangling state that may invoke operating system level timeouts or other errors. + + __Special cases__: +-- If your client uses the `start_perpetual` method it will prevent the io_service from exiting even if it has nothing to do. This is useful if you want a client endpoint to idle in the background to allow new connections to be formed on demand rather than generating a new endpoint for each. +-- If you are using an external io_service and/or are placing non-WebSocket++ operations on the `io_service` those operations may keep the `io_service` open even after all WebSocket++ operations have completed. +-- If you are using `poll`/`poll_one`/`run_one` or otherwise manually driving the `io_service` event loop you may need to adjust usage to make sure you are correctly recognizing the "done with work" and "not done but idling / `io_service::work`" cases. ++- If your client uses the `start_perpetual` method it will prevent the io_context from exiting even if it has nothing to do. This is useful if you want a client endpoint to idle in the background to allow new connections to be formed on demand rather than generating a new endpoint for each. ++- If you are using an external io_context and/or are placing non-WebSocket++ operations on the `io_context` those operations may keep the `io_context` open even after all WebSocket++ operations have completed. ++- If you are using `poll`/`poll_one`/`run_one` or otherwise manually driving the `io_context` event loop you may need to adjust usage to make sure you are correctly recognizing the "done with work" and "not done but idling / `io_context::work`" cases. + + ### Is there a way to check the validity of a `connection_hdl`? + +diff --git a/examples/broadcast_server/broadcast_server.cpp b/examples/broadcast_server/broadcast_server.cpp +index b02e7cd..106eba7 100644 +--- a/examples/broadcast_server/broadcast_server.cpp ++++ b/examples/broadcast_server/broadcast_server.cpp +@@ -63,7 +63,7 @@ public: + // Start the server accept loop + m_server.start_accept(); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + try { + m_server.run(); + } catch (const std::exception & e) { +diff --git a/examples/debug_client/debug_client.cpp b/examples/debug_client/debug_client.cpp +index d3e9153..d3e21ab 100644 +--- a/examples/debug_client/debug_client.cpp ++++ b/examples/debug_client/debug_client.cpp +@@ -83,7 +83,7 @@ public: + + m_endpoint.connect(con); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + m_start = std::chrono::high_resolution_clock::now(); + m_endpoint.run(); + } +diff --git a/examples/debug_server/debug_server.cpp b/examples/debug_server/debug_server.cpp +index 8d1ff0e..3748800 100644 +--- a/examples/debug_server/debug_server.cpp ++++ b/examples/debug_server/debug_server.cpp +@@ -162,7 +162,7 @@ int main() { + // Start the server accept loop + echo_server.start_accept(); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + echo_server.run(); + } catch (websocketpp::exception const & e) { + std::cout << e.what() << std::endl; +diff --git a/examples/echo_client/echo_client.cpp b/examples/echo_client/echo_client.cpp +index 59af661..88171d9 100644 +--- a/examples/echo_client/echo_client.cpp ++++ b/examples/echo_client/echo_client.cpp +@@ -87,7 +87,7 @@ int main(int argc, char* argv[]) { + // exchanged until the event loop starts running in the next line. + c.connect(con); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + // this will cause a single connection to be made to the server. c.run() + // will exit when this connection is closed. + c.run(); +diff --git a/examples/echo_server/echo_server.cpp b/examples/echo_server/echo_server.cpp +index d234009..639c79f 100644 +--- a/examples/echo_server/echo_server.cpp ++++ b/examples/echo_server/echo_server.cpp +@@ -55,7 +55,7 @@ int main() { + // Start the server accept loop + echo_server.start_accept(); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + echo_server.run(); + } catch (websocketpp::exception const & e) { + std::cout << e.what() << std::endl; +diff --git a/examples/echo_server_both/echo_server_both.cpp b/examples/echo_server_both/echo_server_both.cpp +index 2c2c4ea..869c006 100644 +--- a/examples/echo_server_both/echo_server_both.cpp ++++ b/examples/echo_server_both/echo_server_both.cpp +@@ -58,13 +58,13 @@ context_ptr on_tls_init(websocketpp::connection_hdl hdl) { + } + + int main() { +- // set up an external io_service to run both endpoints on. This is not ++ // set up an external io_context to run both endpoints on. This is not + // strictly necessary, but simplifies thread management a bit. +- boost::asio::io_service ios; ++ boost::asio::io_context ios; + + // set up plain endpoint + server_plain endpoint_plain; +- // initialize asio with our external io_service rather than an internal one ++ // initialize asio with our external io_context rather than an internal one + endpoint_plain.init_asio(&ios); + endpoint_plain.set_message_handler( + bind(&on_message,&endpoint_plain,::_1,::_2)); +@@ -82,6 +82,6 @@ int main() { + endpoint_tls.listen(443); + endpoint_tls.start_accept(); + +- // Start the ASIO io_service run loop running both endpoints ++ // Start the ASIO io_context run loop running both endpoints + ios.run(); + } +diff --git a/examples/echo_server_tls/echo_server_tls.cpp b/examples/echo_server_tls/echo_server_tls.cpp +index 3d704f5..2f75a7d 100644 +--- a/examples/echo_server_tls/echo_server_tls.cpp ++++ b/examples/echo_server_tls/echo_server_tls.cpp +@@ -148,7 +148,7 @@ int main() { + // Start the server accept loop + echo_server.start_accept(); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + echo_server.run(); + + } +diff --git a/examples/external_io_service/CMakeLists.txt b/examples/external_io_context/CMakeLists.txt +similarity index 87% +rename from examples/external_io_service/CMakeLists.txt +rename to examples/external_io_context/CMakeLists.txt +index 5223da1..a0e89ec 100644 +--- a/examples/external_io_service/CMakeLists.txt ++++ b/examples/external_io_context/CMakeLists.txt +@@ -2,7 +2,7 @@ + file (GLOB SOURCE_FILES *.cpp) + file (GLOB HEADER_FILES *.hpp) + +-init_target (external_io_service) ++init_target (external_io_context) + + build_executable (${TARGET_NAME} ${SOURCE_FILES} ${HEADER_FILES}) + +diff --git a/examples/external_io_service/SConscript b/examples/external_io_context/SConscript +similarity index 72% +rename from examples/external_io_service/SConscript +rename to examples/external_io_context/SConscript +index beb7c1c..57305aa 100644 +--- a/examples/external_io_service/SConscript ++++ b/examples/external_io_context/SConscript +@@ -15,9 +15,9 @@ prgs = [] + # if a C++11 environment is available build using that, otherwise use boost + if env_cpp11.has_key('WSPP_CPP11_ENABLED'): + ALL_LIBS = boostlibs(['system'],env_cpp11) + [platform_libs] + [polyfill_libs] +- prgs += env_cpp11.Program('external_io_service', ["external_io_service.cpp"], LIBS = ALL_LIBS) ++ prgs += env_cpp11.Program('external_io_context', ["external_io_context.cpp"], LIBS = ALL_LIBS) + else: + ALL_LIBS = boostlibs(['system'],env) + [platform_libs] + [polyfill_libs] +- prgs += env.Program('external_io_service', ["external_io_service.cpp"], LIBS = ALL_LIBS) ++ prgs += env.Program('external_io_context', ["external_io_context.cpp"], LIBS = ALL_LIBS) + + Return('prgs') +diff --git a/examples/external_io_service/external_io_service.cpp b/examples/external_io_context/external_io_context.cpp +similarity index 92% +rename from examples/external_io_service/external_io_service.cpp +rename to examples/external_io_context/external_io_context.cpp +index 7372d59..c5ba0a4 100644 +--- a/examples/external_io_service/external_io_service.cpp ++++ b/examples/external_io_context/external_io_context.cpp +@@ -59,10 +59,10 @@ void on_message(ws_echo_server* s, websocketpp::connection_hdl hdl, ws_echo_serv + } + + int main() { +- asio::io_service service; ++ asio::io_context context; + + // Add a TCP echo server on port 9003 +- tcp_echo_server custom_http_server(service, 9003); ++ tcp_echo_server custom_http_server(context, 9003); + + // Add a WebSocket echo server on port 9002 + ws_echo_server ws_server; +@@ -70,8 +70,8 @@ int main() { + ws_server.clear_access_channels(websocketpp::log::alevel::frame_payload); + + // The only difference in this code between an internal and external +- // io_service is the different constructor to init_asio +- ws_server.init_asio(&service); ++ // io_context is the different constructor to init_asio ++ ws_server.init_asio(&context); + + // Register our message handler + ws_server.set_message_handler(bind(&on_message,&ws_server,::_1,::_2)); +@@ -80,6 +80,6 @@ int main() { + + // TODO: add a timer? + +- // Start the Asio io_service run loop for all +- service.run(); +-} +\ No newline at end of file ++ // Start the Asio io_context run loop for all ++ context.run(); ++} +diff --git a/examples/external_io_service/tcp_echo_server.hpp b/examples/external_io_context/tcp_echo_server.hpp +similarity index 92% +rename from examples/external_io_service/tcp_echo_server.hpp +rename to examples/external_io_context/tcp_echo_server.hpp +index ef4ce18..2e14703 100644 +--- a/examples/external_io_service/tcp_echo_server.hpp ++++ b/examples/external_io_context/tcp_echo_server.hpp +@@ -44,7 +44,7 @@ namespace asio = websocketpp::lib::asio; + struct tcp_echo_session : websocketpp::lib::enable_shared_from_this { + typedef websocketpp::lib::shared_ptr ptr; + +- tcp_echo_session(asio::io_service & service) : m_socket(service) {} ++ tcp_echo_session(asio::io_context & context) : m_socket(context) {} + + void start() { + m_socket.async_read_some(asio::buffer(m_buffer, sizeof(m_buffer)), +@@ -72,15 +72,15 @@ struct tcp_echo_session : websocketpp::lib::enable_shared_from_thisstart_accept(); + } + + void start_accept() { +- tcp_echo_session::ptr new_session(new tcp_echo_session(m_service)); ++ tcp_echo_session::ptr new_session(new tcp_echo_session(m_context)); + m_acceptor.async_accept(new_session->m_socket, + bind(&tcp_echo_server::handle_accept, this, new_session, _1)); + } +@@ -92,6 +92,6 @@ struct tcp_echo_server { + start_accept(); + } + +- asio::io_service & m_service; ++ asio::io_context & m_context; + asio::ip::tcp::acceptor m_acceptor; + }; +diff --git a/examples/print_client/print_client.cpp b/examples/print_client/print_client.cpp +index 7ba6e5f..20a2bd3 100644 +--- a/examples/print_client/print_client.cpp ++++ b/examples/print_client/print_client.cpp +@@ -68,7 +68,7 @@ int main(int argc, char* argv[]) { + // exchanged until the event loop starts running in the next line. + c.connect(con); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + // this will cause a single connection to be made to the server. c.run() + // will exit when this connection is closed. + c.run(); +diff --git a/examples/print_client_tls/print_client_tls.cpp b/examples/print_client_tls/print_client_tls.cpp +index 469d9c6..43164ea 100644 +--- a/examples/print_client_tls/print_client_tls.cpp ++++ b/examples/print_client_tls/print_client_tls.cpp +@@ -239,7 +239,7 @@ int main(int argc, char* argv[]) { + + c.get_alog().write(websocketpp::log::alevel::app, "Connecting to " + uri); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + // this will cause a single connection to be made to the server. c.run() + // will exit when this connection is closed. + c.run(); +diff --git a/examples/scratch_server/scratch_server.cpp b/examples/scratch_server/scratch_server.cpp +index 901ae8e..dab20b9 100644 +--- a/examples/scratch_server/scratch_server.cpp ++++ b/examples/scratch_server/scratch_server.cpp +@@ -94,7 +94,7 @@ int main(int argc, char * argv[]) { + // Start the server accept loop + echo_server.start_accept(); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + echo_server.run(); + } catch (websocketpp::exception const & e) { + std::cout << e.what() << std::endl; +diff --git a/examples/sip_client/sip_client.cpp b/examples/sip_client/sip_client.cpp +index 66fa857..c9f33e7 100644 +--- a/examples/sip_client/sip_client.cpp ++++ b/examples/sip_client/sip_client.cpp +@@ -69,7 +69,7 @@ int main(int argc, char* argv[]) { + + sip_client.connect(con); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + sip_client.run(); + + while(!received) { +diff --git a/examples/telemetry_client/telemetry_client.cpp b/examples/telemetry_client/telemetry_client.cpp +index f0f7fae..12390b8 100644 +--- a/examples/telemetry_client/telemetry_client.cpp ++++ b/examples/telemetry_client/telemetry_client.cpp +@@ -62,10 +62,10 @@ public: + m_hdl = con->get_handle(); + + // Queue the connection. No DNS queries or network connections will be +- // made until the io_service event loop is run. ++ // made until the io_context event loop is run. + m_client.connect(con); + +- // Create a thread to run the ASIO io_service event loop ++ // Create a thread to run the ASIO io_context event loop + websocketpp::lib::thread asio_thread(&client::run, &m_client); + + // Create a thread to run the telemetry loop +diff --git a/examples/telemetry_server/telemetry_server.cpp b/examples/telemetry_server/telemetry_server.cpp +index 3f8e604..2286c50 100644 +--- a/examples/telemetry_server/telemetry_server.cpp ++++ b/examples/telemetry_server/telemetry_server.cpp +@@ -66,7 +66,7 @@ public: + // Set the initial timer to start telemetry + set_timer(); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + try { + m_endpoint.run(); + } catch (websocketpp::exception const & e) { +diff --git a/examples/testee_client/testee_client.cpp b/examples/testee_client/testee_client.cpp +index b66e633..12583e5 100644 +--- a/examples/testee_client/testee_client.cpp ++++ b/examples/testee_client/testee_client.cpp +@@ -117,7 +117,7 @@ int main(int argc, char* argv[]) { + client::connection_ptr con = c.get_connection(uri+"/getCaseCount", ec); + c.connect(con); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + c.run(); + + std::cout << "case count: " << case_count << std::endl; +diff --git a/examples/testee_server/testee_server.cpp b/examples/testee_server/testee_server.cpp +index 9ac9a7d..13e574e 100644 +--- a/examples/testee_server/testee_server.cpp ++++ b/examples/testee_server/testee_server.cpp +@@ -124,7 +124,7 @@ int main(int argc, char * argv[]) { + // Start the server accept loop + testee_server.start_accept(); + +- // Start the ASIO io_service run loop ++ // Start the ASIO io_context run loop + if (num_threads == 1) { + testee_server.run(); + } else { +diff --git a/test/endpoint/endpoint.cpp b/test/endpoint/endpoint.cpp +index b4c429e..fa58e66 100644 +--- a/test/endpoint/endpoint.cpp ++++ b/test/endpoint/endpoint.cpp +@@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE( initialize_server_asio ) { + + BOOST_AUTO_TEST_CASE( initialize_server_asio_external ) { + websocketpp::server s; +- boost::asio::io_service ios; ++ boost::asio::io_context ios; + s.init_asio(&ios); + } + +@@ -141,8 +141,8 @@ BOOST_AUTO_TEST_CASE( listen_after_listen_failure ) { + server1.init_asio(); + server2.init_asio(); + +- boost::asio::ip::tcp::endpoint ep1(boost::asio::ip::address::from_string("127.0.0.1"), 12345); +- boost::asio::ip::tcp::endpoint ep2(boost::asio::ip::address::from_string("127.0.0.1"), 23456); ++ boost::asio::ip::tcp::endpoint ep1(boost::asio::ip::make_address("127.0.0.1"), 12345); ++ boost::asio::ip::tcp::endpoint ep2(boost::asio::ip::make_address("127.0.0.1"), 23456); + + server1.listen(ep1, ec); + BOOST_CHECK(!ec); +diff --git a/test/transport/asio/timers.cpp b/test/transport/asio/timers.cpp +index aa03d61..391b755 100644 +--- a/test/transport/asio/timers.cpp ++++ b/test/transport/asio/timers.cpp +@@ -54,9 +54,9 @@ void run_dummy_server(int port) { + using boost::asio::ip::tcp; + + try { +- boost::asio::io_service io_service; +- tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v6(), port)); +- tcp::socket socket(io_service); ++ boost::asio::io_context io_context; ++ tcp::acceptor acceptor(io_context, tcp::endpoint(tcp::v6(), port)); ++ tcp::socket socket(io_context); + + acceptor.accept(socket); + for (;;) { +@@ -79,7 +79,7 @@ void run_dummy_server(int port) { + + // Wait for the specified time period then fail the test + void run_test_timer(long value) { +- boost::asio::io_service ios; ++ boost::asio::io_context ios; + boost::asio::deadline_timer t(ios,boost::posix_time::milliseconds(value)); + boost::system::error_code ec; + t.wait(ec); +diff --git a/test/transport/integration.cpp b/test/transport/integration.cpp +index c083cfd..ab82b1a 100644 +--- a/test/transport/integration.cpp ++++ b/test/transport/integration.cpp +@@ -221,9 +221,9 @@ void run_dummy_server(int port) { + using boost::asio::ip::tcp; + + try { +- boost::asio::io_service io_service; +- tcp::acceptor acceptor(io_service, tcp::endpoint(tcp::v6(), port)); +- tcp::socket socket(io_service); ++ boost::asio::io_context io_context; ++ tcp::acceptor acceptor(io_context, tcp::endpoint(tcp::v6(), port)); ++ tcp::socket socket(io_context); + + acceptor.accept(socket); + for (;;) { +@@ -248,13 +248,12 @@ void run_dummy_client(std::string port) { + using boost::asio::ip::tcp; + + try { +- boost::asio::io_service io_service; +- tcp::resolver resolver(io_service); +- tcp::resolver::query query("localhost", port); +- tcp::resolver::iterator iterator = resolver.resolve(query); +- tcp::socket socket(io_service); ++ boost::asio::io_context io_context; ++ tcp::resolver resolver(io_context); ++ tcp::resolver::results_type endpoints = resolver.resolve("localhost", port); ++ tcp::socket socket(io_context); + +- boost::asio::connect(socket, iterator); ++ boost::asio::connect(socket, endpoints); + for (;;) { + char data[512]; + boost::system::error_code ec; +@@ -358,11 +357,11 @@ class test_deadline_timer + { + public: + test_deadline_timer(int seconds) +- : m_timer(m_io_service, boost::posix_time::seconds(seconds)) ++ : m_timer(m_io_context, boost::posix_time::seconds(seconds)) + { + m_timer.async_wait(bind(&test_deadline_timer::expired, this, ::_1)); +- std::size_t (boost::asio::io_service::*run)() = &boost::asio::io_service::run; +- m_timer_thread = websocketpp::lib::thread(websocketpp::lib::bind(run, &m_io_service)); ++ std::size_t (boost::asio::io_context::*run)() = &boost::asio::io_context::run; ++ m_timer_thread = websocketpp::lib::thread(websocketpp::lib::bind(run, &m_io_context)); + } + ~test_deadline_timer() + { +@@ -379,7 +378,7 @@ public: + BOOST_FAIL("Test timed out"); + } + +- boost::asio::io_service m_io_service; ++ boost::asio::io_context m_io_context; + boost::asio::deadline_timer m_timer; + websocketpp::lib::thread m_timer_thread; + }; +@@ -541,7 +540,7 @@ BOOST_AUTO_TEST_CASE( client_runs_out_of_work ) { + + c.run(); + +- // This test checks that an io_service with no work ends immediately. ++ // This test checks that an io_context with no work ends immediately. + BOOST_CHECK(true); + } + +diff --git a/tutorials/utility_server/step1.cpp b/tutorials/utility_server/step1.cpp +index c0e4643..dae4a2a 100644 +--- a/tutorials/utility_server/step1.cpp ++++ b/tutorials/utility_server/step1.cpp +@@ -57,7 +57,7 @@ public: + // Queues a connection accept operation + m_endpoint.start_accept(); + +- // Start the Asio io_service run loop ++ // Start the Asio io_context run loop + m_endpoint.run(); + } + private: +diff --git a/tutorials/utility_server/step2.cpp b/tutorials/utility_server/step2.cpp +index a2815bb..c4fe486 100644 +--- a/tutorials/utility_server/step2.cpp ++++ b/tutorials/utility_server/step2.cpp +@@ -68,7 +68,7 @@ public: + // Queues a connection accept operation + m_endpoint.start_accept(); + +- // Start the Asio io_service run loop ++ // Start the Asio io_context run loop + m_endpoint.run(); + } + private: +diff --git a/tutorials/utility_server/utility_server.md b/tutorials/utility_server/utility_server.md +index 1c7ee3f..461eed0 100644 +--- a/tutorials/utility_server/utility_server.md ++++ b/tutorials/utility_server/utility_server.md +@@ -56,7 +56,7 @@ m_endpoint.set_access_channels(websocketpp::log::alevel::all ^ websocketpp::log: + + Next, we initialize the transport system underlying the endpoint. This method is specific to the Asio transport not WebSocket++ core. It will not be necessary or present in endpoints that use a non-asio config. + +-> **Note:** This example uses an internal Asio `io_service` that is managed by the endpoint itself. This is a simple arrangement suitable for programs where WebSocket++ is the only code using Asio. If you have an existing program that already manages an `io_service` object or want to build a new program where WebSocket++ handlers share an io_service with other handlers you can pass the `io_service` you want WebSocket++ to register its handlers on to the `init_asio()` method and it will use it instead of generating and managing its own. [TODO: FAQ link instead?] ++> **Note:** This example uses an internal Asio `io_context` that is managed by the endpoint itself. This is a simple arrangement suitable for programs where WebSocket++ is the only code using Asio. If you have an existing program that already manages an `io_context` object or want to build a new program where WebSocket++ handlers share an io_context with other handlers you can pass the `io_context` you want WebSocket++ to register its handlers on to the `init_asio()` method and it will use it instead of generating and managing its own. [TODO: FAQ link instead?] + + ~~~{.cpp} + m_endpoint.init_asio(); +@@ -64,7 +64,7 @@ m_endpoint.init_asio(); + + #### `utility_server::run` method + +-In addition to the constructor, we also add a run method that sets up the listening socket, begins accepting connections, starts the Asio io_service event loop. ++In addition to the constructor, we also add a run method that sets up the listening socket, begins accepting connections, starts the Asio io_context event loop. + + ~~~{.cpp} + // Listen on port 9002 +@@ -73,7 +73,7 @@ m_endpoint.listen(9002); + // Queues a connection accept operation + m_endpoint.start_accept(); + +-// Start the Asio io_service run loop ++// Start the Asio io_context run loop + m_endpoint.run(); + ~~~ + +@@ -123,7 +123,7 @@ public: + // Queues a connection accept operation + m_endpoint.start_accept(); + +- // Start the Asio io_service run loop ++ // Start the Asio io_context run loop + m_endpoint.run(); + } + private: +diff --git a/websocketpp/roles/server_endpoint.hpp b/websocketpp/roles/server_endpoint.hpp +index 9cc652f..ed4b703 100644 +--- a/websocketpp/roles/server_endpoint.hpp ++++ b/websocketpp/roles/server_endpoint.hpp +@@ -110,8 +110,8 @@ public: + /// Starts the server's async connection acceptance loop (exception free) + /** + * Initiates the server connection acceptance loop. Must be called after +- * listen. This method will have no effect until the underlying io_service +- * starts running. It may be called after the io_service is already running. ++ * listen. This method will have no effect until the underlying io_context ++ * starts running. It may be called after the io_context is already running. + * + * Refer to documentation for the transport policy you are using for + * instructions on how to stop this acceptance loop. +diff --git a/websocketpp/transport/asio/base.hpp b/websocketpp/transport/asio/base.hpp +index b945fe1..8d980ad 100644 +--- a/websocketpp/transport/asio/base.hpp ++++ b/websocketpp/transport/asio/base.hpp +@@ -40,7 +40,7 @@ namespace websocketpp { + namespace transport { + /// Transport policy that uses asio + /** +- * This policy uses a single asio io_service to provide transport ++ * This policy uses a single asio io_context to provide transport + * services to a WebSocket++ endpoint. + */ + namespace asio { +diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp +index 57dda74..eaee6bc 100644 +--- a/websocketpp/transport/asio/connection.hpp ++++ b/websocketpp/transport/asio/connection.hpp +@@ -85,10 +85,10 @@ public: + typedef typename config::response_type response_type; + typedef typename response_type::ptr response_ptr; + +- /// Type of a pointer to the Asio io_service being used +- typedef lib::asio::io_service * io_service_ptr; +- /// Type of a pointer to the Asio io_service::strand being used +- typedef lib::shared_ptr strand_ptr; ++ /// Type of a pointer to the Asio io_context being used ++ typedef lib::asio::io_context * io_context_ptr; ++ /// Type of a pointer to the Asio io_context::strand being used ++ typedef lib::shared_ptr strand_ptr; + /// Type of a pointer to the Asio timer class + typedef lib::shared_ptr timer_ptr; + +@@ -97,7 +97,7 @@ public: + // to the public api. + friend class endpoint; + +- // generate and manage our own io_service ++ // generate and manage our own io_context + explicit connection(bool is_server, const lib::shared_ptr & alog, const lib::shared_ptr & elog) + : m_is_server(is_server) + , m_alog(alog) +@@ -313,7 +313,7 @@ public: + timer_ptr set_timer(long duration, timer_handler callback) { + timer_ptr new_timer( + new lib::asio::steady_timer( +- *m_io_service, ++ *m_io_context, + lib::asio::milliseconds(duration)) + ); + +@@ -393,7 +393,7 @@ public: + /// Initialize transport for reading + /** + * init_asio is called once immediately after construction to initialize +- * Asio components to the io_service ++ * Asio components to the io_context + * + * The transport initialization sequence consists of the following steps: + * - Pre-init: the underlying socket is initialized to the point where +@@ -451,21 +451,21 @@ protected: + /// Finish constructing the transport + /** + * init_asio is called once immediately after construction to initialize +- * Asio components to the io_service. ++ * Asio components to the io_context. + * +- * @param io_service A pointer to the io_service to register with this ++ * @param io_context A pointer to the io_context to register with this + * connection + * + * @return Status code for the success or failure of the initialization + */ +- lib::error_code init_asio (io_service_ptr io_service) { +- m_io_service = io_service; ++ lib::error_code init_asio (io_context_ptr io_context) { ++ m_io_context = io_context; + + if (config::enable_multithreading) { +- m_strand.reset(new lib::asio::io_service::strand(*io_service)); ++ m_strand.reset(new lib::asio::io_context::strand(*io_context)); + } + +- lib::error_code ec = socket_con_type::init_asio(io_service, m_strand, ++ lib::error_code ec = socket_con_type::init_asio(io_context, m_strand, + m_is_server); + + return ec; +@@ -573,7 +573,7 @@ protected: + lib::error_code const & ec) + { + if (ec == transport::error::operation_aborted || +- (post_timer && lib::asio::is_neg(post_timer->expires_from_now()))) ++ (post_timer && lib::asio::is_neg(post_timer->expiry() - std::chrono::steady_clock::now()))) + { + m_alog->write(log::alevel::devel,"post_init cancelled"); + return; +@@ -679,7 +679,7 @@ protected: + // Whatever aborted it will be issuing the callback so we are safe to + // return + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(m_proxy_data->timer->expires_from_now())) ++ lib::asio::is_neg(m_proxy_data->timer->expiry() - std::chrono::steady_clock::now())) + { + m_elog->write(log::elevel::devel,"write operation aborted"); + return; +@@ -751,7 +751,7 @@ protected: + // Whatever aborted it will be issuing the callback so we are safe to + // return + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(m_proxy_data->timer->expires_from_now())) ++ lib::asio::is_neg(m_proxy_data->timer->expiry() - std::chrono::steady_clock::now())) + { + m_elog->write(log::elevel::devel,"read operation aborted"); + return; +@@ -1012,18 +1012,18 @@ protected: + */ + lib::error_code interrupt(interrupt_handler handler) { + if (config::enable_multithreading) { +- m_io_service->post(m_strand->wrap(handler)); ++ boost::asio::post(m_io_context->get_executor(), m_strand->wrap(handler)); + } else { +- m_io_service->post(handler); ++ boost::asio::post(m_io_context->get_executor(), handler); + } + return lib::error_code(); + } + + lib::error_code dispatch(dispatch_handler handler) { + if (config::enable_multithreading) { +- m_io_service->post(m_strand->wrap(handler)); ++ boost::asio::post(m_io_context->get_executor(), m_strand->wrap(handler)); + } else { +- m_io_service->post(handler); ++ boost::asio::post(m_io_context->get_executor(), handler); + } + return lib::error_code(); + } +@@ -1095,7 +1095,7 @@ protected: + callback, lib::asio::error_code const & ec) + { + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(shutdown_timer->expires_from_now())) ++ lib::asio::is_neg(shutdown_timer->expiry() - std::chrono::steady_clock::now())) + { + m_alog->write(log::alevel::devel,"async_shutdown cancelled"); + return; +@@ -1172,7 +1172,7 @@ private: + lib::shared_ptr m_proxy_data; + + // transport resources +- io_service_ptr m_io_service; ++ io_context_ptr m_io_context; + strand_ptr m_strand; + connection_hdl m_connection_hdl; + +diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp +index 94509ad..7af0915 100644 +--- a/websocketpp/transport/asio/endpoint.hpp ++++ b/websocketpp/transport/asio/endpoint.hpp +@@ -77,25 +77,25 @@ public: + /// associated with this endpoint transport component + typedef typename transport_con_type::ptr transport_con_ptr; + +- /// Type of a pointer to the ASIO io_service being used +- typedef lib::asio::io_service * io_service_ptr; ++ /// Type of a pointer to the ASIO io_context being used ++ typedef lib::asio::io_context * io_context_ptr; + /// Type of a shared pointer to the acceptor being used + typedef lib::shared_ptr acceptor_ptr; + /// Type of a shared pointer to the resolver being used + typedef lib::shared_ptr resolver_ptr; + /// Type of timer handle + typedef lib::shared_ptr timer_ptr; +- /// Type of a shared pointer to an io_service work object +- typedef lib::shared_ptr work_ptr; ++ /// Type of a shared pointer to an io_context work object ++ typedef lib::shared_ptr> work_ptr; + + /// Type of socket pre-bind handler + typedef lib::function tcp_pre_bind_handler; + +- // generate and manage our own io_service ++ // generate and manage our own io_context + explicit endpoint() +- : m_io_service(NULL) +- , m_external_io_service(false) +- , m_listen_backlog(lib::asio::socket_base::max_connections) ++ : m_io_context(NULL) ++ , m_external_io_context(false) ++ , m_listen_backlog(lib::asio::socket_base::max_listen_connections) + , m_reuse_addr(false) + , m_state(UNINITIALIZED) + { +@@ -103,14 +103,14 @@ public: + } + + ~endpoint() { +- // clean up our io_service if we were initialized with an internal one. ++ // clean up our io_context if we were initialized with an internal one. + + // Explicitly destroy local objects + m_acceptor.reset(); + m_resolver.reset(); + m_work.reset(); +- if (m_state != UNINITIALIZED && !m_external_io_service) { +- delete m_io_service; ++ if (m_state != UNINITIALIZED && !m_external_io_context) { ++ delete m_io_context; + } + } + +@@ -132,34 +132,34 @@ public: + : config::socket_type(std::move(src)) + , m_tcp_pre_init_handler(src.m_tcp_pre_init_handler) + , m_tcp_post_init_handler(src.m_tcp_post_init_handler) +- , m_io_service(src.m_io_service) +- , m_external_io_service(src.m_external_io_service) ++ , m_io_context(src.m_io_context) ++ , m_external_io_context(src.m_external_io_context) + , m_acceptor(src.m_acceptor) +- , m_listen_backlog(lib::asio::socket_base::max_connections) ++ , m_listen_backlog(lib::asio::socket_base::max_listen_connections) + , m_reuse_addr(src.m_reuse_addr) + , m_elog(src.m_elog) + , m_alog(src.m_alog) + , m_state(src.m_state) + { +- src.m_io_service = NULL; +- src.m_external_io_service = false; ++ src.m_io_context = NULL; ++ src.m_external_io_context = false; + src.m_acceptor = NULL; + src.m_state = UNINITIALIZED; + } + + /*endpoint & operator= (const endpoint && rhs) { + if (this != &rhs) { +- m_io_service = rhs.m_io_service; +- m_external_io_service = rhs.m_external_io_service; ++ m_io_context = rhs.m_io_context; ++ m_external_io_context = rhs.m_external_io_context; + m_acceptor = rhs.m_acceptor; + m_listen_backlog = rhs.m_listen_backlog; + m_reuse_addr = rhs.m_reuse_addr; + m_state = rhs.m_state; + +- rhs.m_io_service = NULL; +- rhs.m_external_io_service = false; ++ rhs.m_io_context = NULL; ++ rhs.m_external_io_context = false; + rhs.m_acceptor = NULL; +- rhs.m_listen_backlog = lib::asio::socket_base::max_connections; ++ rhs.m_listen_backlog = lib::asio::socket_base::max_listen_connections; + rhs.m_state = UNINITIALIZED; + + // TODO: this needs to be updated +@@ -173,16 +173,16 @@ public: + return socket_type::is_secure(); + } + +- /// initialize asio transport with external io_service (exception free) ++ /// initialize asio transport with external io_context (exception free) + /** + * Initialize the ASIO transport policy for this endpoint using the provided +- * io_service object. asio_init must be called exactly once on any endpoint ++ * io_context object. asio_init must be called exactly once on any endpoint + * that uses transport::asio before it can be used. + * +- * @param ptr A pointer to the io_service to use for asio events ++ * @param ptr A pointer to the io_context to use for asio events + * @param ec Set to indicate what error occurred, if any. + */ +- void init_asio(io_service_ptr ptr, lib::error_code & ec) { ++ void init_asio(io_context_ptr ptr, lib::error_code & ec) { + if (m_state != UNINITIALIZED) { + m_elog->write(log::elevel::library, + "asio::init_asio called from the wrong state"); +@@ -193,34 +193,34 @@ public: + + m_alog->write(log::alevel::devel,"asio::init_asio"); + +- m_io_service = ptr; +- m_external_io_service = true; +- m_acceptor.reset(new lib::asio::ip::tcp::acceptor(*m_io_service)); ++ m_io_context = ptr; ++ m_external_io_context = true; ++ m_acceptor.reset(new lib::asio::ip::tcp::acceptor(*m_io_context)); + + m_state = READY; + ec = lib::error_code(); + } + +- /// initialize asio transport with external io_service ++ /// initialize asio transport with external io_context + /** + * Initialize the ASIO transport policy for this endpoint using the provided +- * io_service object. asio_init must be called exactly once on any endpoint ++ * io_context object. asio_init must be called exactly once on any endpoint + * that uses transport::asio before it can be used. + * +- * @param ptr A pointer to the io_service to use for asio events ++ * @param ptr A pointer to the io_context to use for asio events + */ +- void init_asio(io_service_ptr ptr) { ++ void init_asio(io_context_ptr ptr) { + lib::error_code ec; + init_asio(ptr,ec); + if (ec) { throw exception(ec); } + } + +- /// Initialize asio transport with internal io_service (exception free) ++ /// Initialize asio transport with internal io_context (exception free) + /** + * This method of initialization will allocate and use an internally managed +- * io_service. ++ * io_context. + * +- * @see init_asio(io_service_ptr ptr) ++ * @see init_asio(io_context_ptr ptr) + * + * @param ec Set to indicate what error occurred, if any. + */ +@@ -230,21 +230,21 @@ public: + // TODO: remove the use of auto_ptr when C++98/03 support is no longer + // necessary. + #ifdef _WEBSOCKETPP_CPP11_MEMORY_ +- lib::unique_ptr service(new lib::asio::io_service()); ++ lib::unique_ptr context(new lib::asio::io_context()); + #else +- lib::auto_ptr service(new lib::asio::io_service()); ++ lib::auto_ptr context(new lib::asio::io_context()); + #endif +- init_asio(service.get(), ec); +- if( !ec ) service.release(); // Call was successful, transfer ownership +- m_external_io_service = false; ++ init_asio(context.get(), ec); ++ if( !ec ) context.release(); // Call was successful, transfer ownership ++ m_external_io_context = false; + } + +- /// Initialize asio transport with internal io_service ++ /// Initialize asio transport with internal io_context + /** + * This method of initialization will allocate and use an internally managed +- * io_service. ++ * io_context. + * +- * @see init_asio(io_service_ptr ptr) ++ * @see init_asio(io_context_ptr ptr) + */ + void init_asio() { + // Use a smart pointer until the call is successful and ownership has +@@ -252,14 +252,14 @@ public: + // TODO: remove the use of auto_ptr when C++98/03 support is no longer + // necessary. + #ifdef _WEBSOCKETPP_CPP11_MEMORY_ +- lib::unique_ptr service(new lib::asio::io_service()); ++ lib::unique_ptr context(new lib::asio::io_context()); + #else +- lib::auto_ptr service(new lib::asio::io_service()); ++ lib::auto_ptr context(new lib::asio::io_context()); + #endif +- init_asio( service.get() ); ++ init_asio( context.get() ); + // If control got this far without an exception, then ownership has successfully been taken +- service.release(); +- m_external_io_service = false; ++ context.release(); ++ m_external_io_context = false; + } + + /// Sets the tcp pre bind handler +@@ -330,7 +330,7 @@ public: + * + * New values affect future calls to listen only. + * +- * The default value is specified as *::asio::socket_base::max_connections ++ * The default value is specified as *::asio::socket_base::max_listen_connections + * which uses the operating system defined maximum queue length. Your OS + * may restrict or silently lower this value. A value of zero may cause + * all connections to be rejected. +@@ -364,19 +364,19 @@ public: + m_reuse_addr = value; + } + +- /// Retrieve a reference to the endpoint's io_service ++ /// Retrieve a reference to the endpoint's io_context + /** +- * The io_service may be an internal or external one. This may be used to +- * call methods of the io_service that are not explicitly wrapped by the ++ * The io_context may be an internal or external one. This may be used to ++ * call methods of the io_context that are not explicitly wrapped by the + * endpoint. + * + * This method is only valid after the endpoint has been initialized with + * `init_asio`. No error will be returned if it isn't. + * +- * @return A reference to the endpoint's io_service ++ * @return A reference to the endpoint's io_context + */ +- lib::asio::io_service & get_io_service() { +- return *m_io_service; ++ lib::asio::io_context & get_io_context() { ++ return *m_io_context; + } + + /// Get local TCP endpoint +@@ -557,17 +557,15 @@ public: + lib::error_code & ec) + { + using lib::asio::ip::tcp; +- tcp::resolver r(*m_io_service); +- tcp::resolver::query query(host, service); +- tcp::resolver::iterator endpoint_iterator = r.resolve(query); +- tcp::resolver::iterator end; +- if (endpoint_iterator == end) { ++ tcp::resolver r(*m_io_context); ++ tcp::resolver::results_type endpoints = r.resolve(host, service); ++ if (endpoints.empty()) { + m_elog->write(log::elevel::library, + "asio::listen could not resolve the supplied host or service"); + ec = make_error_code(error::invalid_host_service); + return; + } +- listen(*endpoint_iterator,ec); ++ listen(*endpoints.begin(),ec); + } + + /// Set up endpoint for listening on a host and service +@@ -636,42 +634,42 @@ public: + return (m_state == LISTENING); + } + +- /// wraps the run method of the internal io_service object ++ /// wraps the run method of the internal io_context object + std::size_t run() { +- return m_io_service->run(); ++ return m_io_context->run(); + } + +- /// wraps the run_one method of the internal io_service object ++ /// wraps the run_one method of the internal io_context object + /** + * @since 0.3.0-alpha4 + */ + std::size_t run_one() { +- return m_io_service->run_one(); ++ return m_io_context->run_one(); + } + +- /// wraps the stop method of the internal io_service object ++ /// wraps the stop method of the internal io_context object + void stop() { +- m_io_service->stop(); ++ m_io_context->stop(); + } + +- /// wraps the poll method of the internal io_service object ++ /// wraps the poll method of the internal io_context object + std::size_t poll() { +- return m_io_service->poll(); ++ return m_io_context->poll(); + } + +- /// wraps the poll_one method of the internal io_service object ++ /// wraps the poll_one method of the internal io_context object + std::size_t poll_one() { +- return m_io_service->poll_one(); ++ return m_io_context->poll_one(); + } + +- /// wraps the reset method of the internal io_service object ++ /// wraps the restart method of the internal io_context object + void reset() { +- m_io_service->reset(); ++ m_io_context->restart(); + } + +- /// wraps the stopped method of the internal io_service object ++ /// wraps the stopped method of the internal io_context object + bool stopped() const { +- return m_io_service->stopped(); ++ return m_io_context->stopped(); + } + + /// Marks the endpoint as perpetual, stopping it from exiting when empty +@@ -687,7 +685,7 @@ public: + * @since 0.3.0 + */ + void start_perpetual() { +- m_work.reset(new lib::asio::io_service::work(*m_io_service)); ++ m_work.reset(new lib::asio::executor_work_guard(m_io_context->get_executor())); + } + + /// Clears the endpoint's perpetual flag, allowing it to exit when empty +@@ -716,7 +714,7 @@ public: + */ + timer_ptr set_timer(long duration, timer_handler callback) { + timer_ptr new_timer = lib::make_shared( +- *m_io_service, ++ *m_io_context, + lib::asio::milliseconds(duration) + ); + +@@ -851,7 +849,7 @@ protected: + + // Create a resolver + if (!m_resolver) { +- m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_service)); ++ m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_context)); + } + + tcon->set_uri(u); +@@ -883,8 +881,6 @@ protected: + port = pu->get_port_str(); + } + +- tcp::resolver::query query(host,port); +- + if (m_alog->static_test(log::alevel::devel)) { + m_alog->write(log::alevel::devel, + "starting async DNS resolve for "+host+":"+port); +@@ -905,7 +901,8 @@ protected: + + if (config::enable_multithreading) { + m_resolver->async_resolve( +- query, ++ host, ++ port, + tcon->get_strand()->wrap(lib::bind( + &type::handle_resolve, + this, +@@ -918,7 +915,8 @@ protected: + ); + } else { + m_resolver->async_resolve( +- query, ++ host, ++ port, + lib::bind( + &type::handle_resolve, + this, +@@ -966,10 +964,10 @@ protected: + + void handle_resolve(transport_con_ptr tcon, timer_ptr dns_timer, + connect_handler callback, lib::asio::error_code const & ec, +- lib::asio::ip::tcp::resolver::iterator iterator) ++ lib::asio::ip::tcp::resolver::results_type endpoints) + { + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(dns_timer->expires_from_now())) ++ lib::asio::is_neg(dns_timer->expiry() - std::chrono::steady_clock::now())) + { + m_alog->write(log::alevel::devel,"async_resolve cancelled"); + return; +@@ -987,8 +985,8 @@ protected: + std::stringstream s; + s << "Async DNS resolve successful. Results: "; + +- lib::asio::ip::tcp::resolver::iterator it, end; +- for (it = iterator; it != end; ++it) { ++ lib::asio::ip::tcp::resolver::results_type::iterator it; ++ for (it = endpoints.begin(); it != endpoints.end(); ++it) { + s << (*it).endpoint() << " "; + } + +@@ -1014,7 +1012,7 @@ protected: + if (config::enable_multithreading) { + lib::asio::async_connect( + tcon->get_raw_socket(), +- iterator, ++ endpoints, + tcon->get_strand()->wrap(lib::bind( + &type::handle_connect, + this, +@@ -1027,7 +1025,7 @@ protected: + } else { + lib::asio::async_connect( + tcon->get_raw_socket(), +- iterator, ++ endpoints, + lib::bind( + &type::handle_connect, + this, +@@ -1077,7 +1075,7 @@ protected: + connect_handler callback, lib::asio::error_code const & ec) + { + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(con_timer->expires_from_now())) ++ lib::asio::is_neg(con_timer->expiry() - std::chrono::steady_clock::now())) + { + m_alog->write(log::alevel::devel,"async_connect cancelled"); + return; +@@ -1119,7 +1117,7 @@ protected: + + lib::error_code ec; + +- ec = tcon->init_asio(m_io_service); ++ ec = tcon->init_asio(m_io_context); + if (ec) {return ec;} + + tcon->set_tcp_pre_init_handler(m_tcp_pre_init_handler); +@@ -1158,8 +1156,8 @@ private: + tcp_init_handler m_tcp_post_init_handler; + + // Network Resources +- io_service_ptr m_io_service; +- bool m_external_io_service; ++ io_context_ptr m_io_context; ++ bool m_external_io_context; + acceptor_ptr m_acceptor; + resolver_ptr m_resolver; + work_ptr m_work; +diff --git a/websocketpp/transport/asio/security/none.hpp b/websocketpp/transport/asio/security/none.hpp +index 6c7d352..009063f 100644 +--- a/websocketpp/transport/asio/security/none.hpp ++++ b/websocketpp/transport/asio/security/none.hpp +@@ -62,10 +62,10 @@ public: + /// Type of a shared pointer to this connection socket component + typedef lib::shared_ptr ptr; + +- /// Type of a pointer to the Asio io_service being used +- typedef lib::asio::io_service* io_service_ptr; +- /// Type of a pointer to the Asio io_service strand being used +- typedef lib::shared_ptr strand_ptr; ++ /// Type of a pointer to the Asio io_context being used ++ typedef lib::asio::io_context* io_context_ptr; ++ /// Type of a pointer to the Asio io_context strand being used ++ typedef lib::shared_ptr strand_ptr; + /// Type of the ASIO socket being used + typedef lib::asio::ip::tcp::socket socket_type; + /// Type of a shared pointer to the socket being used. +@@ -156,19 +156,19 @@ protected: + /// Perform one time initializations + /** + * init_asio is called once immediately after construction to initialize +- * Asio components to the io_service ++ * Asio components to the io_context + * +- * @param service A pointer to the endpoint's io_service ++ * @param service A pointer to the endpoint's io_context + * @param strand A shared pointer to the connection's asio strand + * @param is_server Whether or not the endpoint is a server or not. + */ +- lib::error_code init_asio (io_service_ptr service, strand_ptr, bool) ++ lib::error_code init_asio (io_context_ptr context, strand_ptr, bool) + { + if (m_state != UNINITIALIZED) { + return socket::make_error_code(socket::error::invalid_state); + } + +- m_socket.reset(new lib::asio::ip::tcp::socket(*service)); ++ m_socket.reset(new lib::asio::ip::tcp::socket(*context)); + + if (m_socket_init_handler) { + m_socket_init_handler(m_hdl, *m_socket); +diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp +index 04ac379..9f86fc1 100644 +--- a/websocketpp/transport/asio/security/tls.hpp ++++ b/websocketpp/transport/asio/security/tls.hpp +@@ -71,10 +71,10 @@ public: + typedef lib::asio::ssl::stream socket_type; + /// Type of a shared pointer to the ASIO socket being used + typedef lib::shared_ptr socket_ptr; +- /// Type of a pointer to the ASIO io_service being used +- typedef lib::asio::io_service * io_service_ptr; +- /// Type of a pointer to the ASIO io_service strand being used +- typedef lib::shared_ptr strand_ptr; ++ /// Type of a pointer to the ASIO io_context being used ++ typedef lib::asio::io_context * io_context_ptr; ++ /// Type of a pointer to the ASIO io_context strand being used ++ typedef lib::shared_ptr strand_ptr; + /// Type of a shared pointer to the ASIO TLS context being used + typedef lib::shared_ptr context_ptr; + +@@ -176,13 +176,13 @@ protected: + /// Perform one time initializations + /** + * init_asio is called once immediately after construction to initialize +- * Asio components to the io_service ++ * Asio components to the io_context + * +- * @param service A pointer to the endpoint's io_service ++ * @param service A pointer to the endpoint's io_context + * @param strand A pointer to the connection's strand + * @param is_server Whether or not the endpoint is a server or not. + */ +- lib::error_code init_asio (io_service_ptr service, strand_ptr strand, ++ lib::error_code init_asio (io_context_ptr context, strand_ptr strand, + bool is_server) + { + if (!m_tls_init_handler) { +@@ -193,13 +193,13 @@ protected: + if (!m_context) { + return socket::make_error_code(socket::error::invalid_tls_context); + } +- m_socket.reset(new socket_type(*service, *m_context)); ++ m_socket.reset(new socket_type(*context, *m_context)); + + if (m_socket_init_handler) { + m_socket_init_handler(m_hdl, get_socket()); + } + +- m_io_service = service; ++ m_io_context = context; + m_strand = strand; + m_is_server = is_server; + +@@ -381,7 +381,7 @@ private: + } + } + +- io_service_ptr m_io_service; ++ io_context_ptr m_io_context; + strand_ptr m_strand; + context_ptr m_context; + socket_ptr m_socket; +diff --git a/websocketpp/transport/debug/endpoint.hpp b/websocketpp/transport/debug/endpoint.hpp +index adc89b3..3606441 100644 +--- a/websocketpp/transport/debug/endpoint.hpp ++++ b/websocketpp/transport/debug/endpoint.hpp +@@ -60,7 +60,7 @@ public: + /// associated connection transport component + typedef typename transport_con_type::ptr transport_con_ptr; + +- // generate and manage our own io_service ++ // generate and manage our own io_context + explicit endpoint() + { + //std::cout << "transport::iostream::endpoint constructor" << std::endl; +diff --git a/websocketpp/transport/iostream/endpoint.hpp b/websocketpp/transport/iostream/endpoint.hpp +index 14cba72..257472d 100644 +--- a/websocketpp/transport/iostream/endpoint.hpp ++++ b/websocketpp/transport/iostream/endpoint.hpp +@@ -64,7 +64,7 @@ public: + /// associated connection transport component + typedef typename transport_con_type::ptr transport_con_ptr; + +- // generate and manage our own io_service ++ // generate and manage our own io_context + explicit endpoint() : m_output_stream(NULL), m_is_secure(false) + { + //std::cout << "transport::iostream::endpoint constructor" << std::endl; +diff --git a/websocketpp/transport/stub/endpoint.hpp b/websocketpp/transport/stub/endpoint.hpp +index 3bbb78f..8f8493a 100644 +--- a/websocketpp/transport/stub/endpoint.hpp ++++ b/websocketpp/transport/stub/endpoint.hpp +@@ -60,7 +60,7 @@ public: + /// associated connection transport component + typedef typename transport_con_type::ptr transport_con_ptr; + +- // generate and manage our own io_service ++ // generate and manage our own io_context + explicit endpoint() + { + //std::cout << "transport::iostream::endpoint constructor" << std::endl; +-- +2.48.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Amini Allight +Date: Wed, 12 Feb 2025 04:46:30 +0000 +Subject: [PATCH 2/7] updated docstrings + +(cherry picked from commit 30e77468e093e8384fa07819b345f81a0431eb37) + + Conflicts: + websocketpp/transport/asio/endpoint.hpp +--- + websocketpp/transport/asio/endpoint.hpp | 2 +- + websocketpp/transport/asio/security/none.hpp | 2 +- + websocketpp/transport/asio/security/tls.hpp | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp +index 7af0915..a5e1700 100644 +--- a/websocketpp/transport/asio/endpoint.hpp ++++ b/websocketpp/transport/asio/endpoint.hpp +@@ -549,7 +549,7 @@ public: + * + * @param host A string identifying a location. May be a descriptive name or + * a numeric address string. +- * @param service A string identifying the requested service. This may be a ++ * @param context A string identifying the requested service. This may be a + * descriptive name or a numeric string corresponding to a port number. + * @param ec Set to indicate what error occurred, if any. + */ +diff --git a/websocketpp/transport/asio/security/none.hpp b/websocketpp/transport/asio/security/none.hpp +index 009063f..ff19d5c 100644 +--- a/websocketpp/transport/asio/security/none.hpp ++++ b/websocketpp/transport/asio/security/none.hpp +@@ -158,7 +158,7 @@ protected: + * init_asio is called once immediately after construction to initialize + * Asio components to the io_context + * +- * @param service A pointer to the endpoint's io_context ++ * @param context A pointer to the endpoint's io_context + * @param strand A shared pointer to the connection's asio strand + * @param is_server Whether or not the endpoint is a server or not. + */ +diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp +index 9f86fc1..8b27656 100644 +--- a/websocketpp/transport/asio/security/tls.hpp ++++ b/websocketpp/transport/asio/security/tls.hpp +@@ -178,7 +178,7 @@ protected: + * init_asio is called once immediately after construction to initialize + * Asio components to the io_context + * +- * @param service A pointer to the endpoint's io_context ++ * @param context A pointer to the endpoint's io_context + * @param strand A pointer to the connection's strand + * @param is_server Whether or not the endpoint is a server or not. + */ +-- +2.48.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Amini Allight +Date: Wed, 12 Feb 2025 04:48:13 +0000 +Subject: [PATCH 3/7] updated docstrings + +(cherry picked from commit 3d13472f7489bda718ded20d885dbaf98e36442c) +--- + websocketpp/transport/asio/endpoint.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp +index a5e1700..7af0915 100644 +--- a/websocketpp/transport/asio/endpoint.hpp ++++ b/websocketpp/transport/asio/endpoint.hpp +@@ -549,7 +549,7 @@ public: + * + * @param host A string identifying a location. May be a descriptive name or + * a numeric address string. +- * @param context A string identifying the requested service. This may be a ++ * @param service A string identifying the requested service. This may be a + * descriptive name or a numeric string corresponding to a port number. + * @param ec Set to indicate what error occurred, if any. + */ +-- +2.48.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Amini Allight +Date: Fri, 14 Feb 2025 07:48:42 +0000 +Subject: [PATCH 4/7] silenced warning about unused variable in TLS IP address + validation, improved time-to-expiry calculation (credit toonetown), added + CMake flag to compile tests and examples with ASIO standalone, fixed example + and test compilation with ASIO standalone + +(cherry picked from commit 6867ad089932fc2a786c39dae5ed152991e4ee46) + + Conflicts: + websocketpp/transport/asio/security/tls.hpp +--- + CMakeLists.txt | 5 +++ + examples/debug_client/debug_client.cpp | 12 +++--- + .../echo_server_both/echo_server_both.cpp | 16 ++++---- + .../external_io_context.cpp | 2 +- + .../external_io_context/tcp_echo_server.hpp | 28 +++++++------- + .../print_client_tls/print_client_tls.cpp | 14 +++---- + examples/testee_server/testee_server.cpp | 4 +- + test/endpoint/endpoint.cpp | 6 +-- + test/http/parser_perf.cpp | 4 +- + test/transport/asio/timers.cpp | 4 +- + test/transport/integration.cpp | 38 ++++++++++--------- + websocketpp/common/asio.hpp | 2 +- + websocketpp/transport/asio/connection.hpp | 18 ++++----- + websocketpp/transport/asio/endpoint.hpp | 4 +- + 14 files changed, 81 insertions(+), 76 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4f93e24..cde4273 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -75,6 +75,7 @@ include (CMakeHelpers) + option (ENABLE_CPP11 "Build websocketpp with CPP11 features enabled." TRUE) + option (BUILD_EXAMPLES "Build websocketpp examples." FALSE) + option (BUILD_TESTS "Build websocketpp tests." FALSE) ++option (USE_ASIO_STANDALONE "Build websocketpp examples and tests using the standalone ASIO library." FALSE) + + if (BUILD_TESTS OR BUILD_EXAMPLES) + +@@ -246,6 +247,10 @@ endif() + + ############ Add projects + ++if (USE_ASIO_STANDALONE) ++ add_definitions("-DASIO_STANDALONE -DASIO_HAS_BOOST_DATE_TIME") ++endif () ++ + # Add main library + add_subdirectory (websocketpp) + +diff --git a/examples/debug_client/debug_client.cpp b/examples/debug_client/debug_client.cpp +index d3e21ab..7b6b40e 100644 +--- a/examples/debug_client/debug_client.cpp ++++ b/examples/debug_client/debug_client.cpp +@@ -44,7 +44,7 @@ using websocketpp::lib::bind; + + // pull out the type of messages sent by our config + typedef websocketpp::config::asio_tls_client::message_type::ptr message_ptr; +-typedef websocketpp::lib::shared_ptr context_ptr; ++typedef websocketpp::lib::shared_ptr context_ptr; + typedef client::connection_ptr connection_ptr; + + +@@ -94,13 +94,13 @@ public: + + context_ptr on_tls_init(websocketpp::connection_hdl) { + m_tls_init = std::chrono::high_resolution_clock::now(); +- context_ptr ctx = websocketpp::lib::make_shared(boost::asio::ssl::context::tlsv1); ++ context_ptr ctx = websocketpp::lib::make_shared(websocketpp::lib::asio::ssl::context::tlsv1); + + try { +- ctx->set_options(boost::asio::ssl::context::default_workarounds | +- boost::asio::ssl::context::no_sslv2 | +- boost::asio::ssl::context::no_sslv3 | +- boost::asio::ssl::context::single_dh_use); ++ ctx->set_options(websocketpp::lib::asio::ssl::context::default_workarounds | ++ websocketpp::lib::asio::ssl::context::no_sslv2 | ++ websocketpp::lib::asio::ssl::context::no_sslv3 | ++ websocketpp::lib::asio::ssl::context::single_dh_use); + } catch (std::exception& e) { + std::cout << e.what() << std::endl; + } +diff --git a/examples/echo_server_both/echo_server_both.cpp b/examples/echo_server_both/echo_server_both.cpp +index 869c006..a4f6a19 100644 +--- a/examples/echo_server_both/echo_server_both.cpp ++++ b/examples/echo_server_both/echo_server_both.cpp +@@ -14,7 +14,7 @@ using websocketpp::lib::placeholders::_2; + using websocketpp::lib::bind; + + // type of the ssl context pointer is long so alias it +-typedef websocketpp::lib::shared_ptr context_ptr; ++typedef websocketpp::lib::shared_ptr context_ptr; + + // The shared on_message handler takes a template parameter so the function can + // resolve any endpoint dependent types like message_ptr or connection_ptr +@@ -41,16 +41,16 @@ std::string get_password() { + + context_ptr on_tls_init(websocketpp::connection_hdl hdl) { + std::cout << "on_tls_init called with hdl: " << hdl.lock().get() << std::endl; +- context_ptr ctx(new boost::asio::ssl::context(boost::asio::ssl::context::tlsv1)); ++ context_ptr ctx(new websocketpp::lib::asio::ssl::context(websocketpp::lib::asio::ssl::context::tlsv1)); + + try { +- ctx->set_options(boost::asio::ssl::context::default_workarounds | +- boost::asio::ssl::context::no_sslv2 | +- boost::asio::ssl::context::no_sslv3 | +- boost::asio::ssl::context::single_dh_use); ++ ctx->set_options(websocketpp::lib::asio::ssl::context::default_workarounds | ++ websocketpp::lib::asio::ssl::context::no_sslv2 | ++ websocketpp::lib::asio::ssl::context::no_sslv3 | ++ websocketpp::lib::asio::ssl::context::single_dh_use); + ctx->set_password_callback(bind(&get_password)); + ctx->use_certificate_chain_file("server.pem"); +- ctx->use_private_key_file("server.pem", boost::asio::ssl::context::pem); ++ ctx->use_private_key_file("server.pem", websocketpp::lib::asio::ssl::context::pem); + } catch (std::exception& e) { + std::cout << e.what() << std::endl; + } +@@ -60,7 +60,7 @@ context_ptr on_tls_init(websocketpp::connection_hdl hdl) { + int main() { + // set up an external io_context to run both endpoints on. This is not + // strictly necessary, but simplifies thread management a bit. +- boost::asio::io_context ios; ++ websocketpp::lib::asio::io_context ios; + + // set up plain endpoint + server_plain endpoint_plain; +diff --git a/examples/external_io_context/external_io_context.cpp b/examples/external_io_context/external_io_context.cpp +index c5ba0a4..c6132ed 100644 +--- a/examples/external_io_context/external_io_context.cpp ++++ b/examples/external_io_context/external_io_context.cpp +@@ -59,7 +59,7 @@ void on_message(ws_echo_server* s, websocketpp::connection_hdl hdl, ws_echo_serv + } + + int main() { +- asio::io_context context; ++ websocketpp::lib::asio::io_context context; + + // Add a TCP echo server on port 9003 + tcp_echo_server custom_http_server(context, 9003); +diff --git a/examples/external_io_context/tcp_echo_server.hpp b/examples/external_io_context/tcp_echo_server.hpp +index 2e14703..f132c06 100644 +--- a/examples/external_io_context/tcp_echo_server.hpp ++++ b/examples/external_io_context/tcp_echo_server.hpp +@@ -39,42 +39,40 @@ using websocketpp::lib::placeholders::_1; + using websocketpp::lib::placeholders::_2; + using websocketpp::lib::bind; + +-namespace asio = websocketpp::lib::asio; +- + struct tcp_echo_session : websocketpp::lib::enable_shared_from_this { + typedef websocketpp::lib::shared_ptr ptr; + +- tcp_echo_session(asio::io_context & context) : m_socket(context) {} ++ tcp_echo_session(websocketpp::lib::asio::io_context & context) : m_socket(context) {} + + void start() { +- m_socket.async_read_some(asio::buffer(m_buffer, sizeof(m_buffer)), ++ m_socket.async_read_some(websocketpp::lib::asio::buffer(m_buffer, sizeof(m_buffer)), + websocketpp::lib::bind( + &tcp_echo_session::handle_read, shared_from_this(), _1, _2)); + } + +- void handle_read(const asio::error_code & ec, size_t transferred) { ++ void handle_read(const websocketpp::lib::asio::error_code & ec, size_t transferred) { + if (!ec) { +- asio::async_write(m_socket, +- asio::buffer(m_buffer, transferred), ++ websocketpp::lib::asio::async_write(m_socket, ++ websocketpp::lib::asio::buffer(m_buffer, transferred), + bind(&tcp_echo_session::handle_write, shared_from_this(), _1)); + } + } + +- void handle_write(const asio::error_code & ec) { ++ void handle_write(const websocketpp::lib::asio::error_code & ec) { + if (!ec) { +- m_socket.async_read_some(asio::buffer(m_buffer, sizeof(m_buffer)), ++ m_socket.async_read_some(websocketpp::lib::asio::buffer(m_buffer, sizeof(m_buffer)), + bind(&tcp_echo_session::handle_read, shared_from_this(), _1, _2)); + } + } + +- asio::ip::tcp::socket m_socket; ++ websocketpp::lib::asio::ip::tcp::socket m_socket; + char m_buffer[1024]; + }; + + struct tcp_echo_server { +- tcp_echo_server(asio::io_context & context, short port) ++ tcp_echo_server(websocketpp::lib::asio::io_context & context, short port) + : m_context(context) +- , m_acceptor(context, asio::ip::tcp::endpoint(asio::ip::tcp::v6(), port)) ++ , m_acceptor(context, websocketpp::lib::asio::ip::tcp::endpoint(websocketpp::lib::asio::ip::tcp::v6(), port)) + { + this->start_accept(); + } +@@ -85,13 +83,13 @@ struct tcp_echo_server { + bind(&tcp_echo_server::handle_accept, this, new_session, _1)); + } + +- void handle_accept(tcp_echo_session::ptr new_session, const asio::error_code & ec) { ++ void handle_accept(tcp_echo_session::ptr new_session, const websocketpp::lib::asio::error_code & ec) { + if (!ec) { + new_session->start(); + } + start_accept(); + } + +- asio::io_context & m_context; +- asio::ip::tcp::acceptor m_acceptor; ++ websocketpp::lib::asio::io_context & m_context; ++ websocketpp::lib::asio::ip::tcp::acceptor m_acceptor; + }; +diff --git a/examples/print_client_tls/print_client_tls.cpp b/examples/print_client_tls/print_client_tls.cpp +index 43164ea..cf616e1 100644 +--- a/examples/print_client_tls/print_client_tls.cpp ++++ b/examples/print_client_tls/print_client_tls.cpp +@@ -112,7 +112,7 @@ bool verify_common_name(char const * hostname, X509 * cert) { + * and + * https://github.com/iSECPartners/ssl-conservatory + */ +-bool verify_certificate(const char * hostname, bool preverified, boost::asio::ssl::verify_context& ctx) { ++bool verify_certificate(const char * hostname, bool preverified, websocketpp::lib::asio::ssl::verify_context& ctx) { + // The verify callback can be used to check whether the certificate that is + // being presented is valid for the peer. For example, RFC 2818 describes + // the steps involved in doing this for HTTPS. Consult the OpenSSL +@@ -176,16 +176,16 @@ bool verify_certificate(const char * hostname, bool preverified, boost::asio::ss + * (websocketpp.org, for example). + */ + context_ptr on_tls_init(const char * hostname, websocketpp::connection_hdl) { +- context_ptr ctx = websocketpp::lib::make_shared(boost::asio::ssl::context::sslv23); ++ context_ptr ctx = websocketpp::lib::make_shared(websocketpp::lib::asio::ssl::context::sslv23); + + try { +- ctx->set_options(boost::asio::ssl::context::default_workarounds | +- boost::asio::ssl::context::no_sslv2 | +- boost::asio::ssl::context::no_sslv3 | +- boost::asio::ssl::context::single_dh_use); ++ ctx->set_options(websocketpp::lib::asio::ssl::context::default_workarounds | ++ websocketpp::lib::asio::ssl::context::no_sslv2 | ++ websocketpp::lib::asio::ssl::context::no_sslv3 | ++ websocketpp::lib::asio::ssl::context::single_dh_use); + + +- ctx->set_verify_mode(boost::asio::ssl::verify_peer); ++ ctx->set_verify_mode(websocketpp::lib::asio::ssl::verify_peer); + ctx->set_verify_callback(bind(&verify_certificate, hostname, ::_1, ::_2)); + + // Here we load the CA certificates of all CA's that this client trusts. +diff --git a/examples/testee_server/testee_server.cpp b/examples/testee_server/testee_server.cpp +index 13e574e..8920270 100644 +--- a/examples/testee_server/testee_server.cpp ++++ b/examples/testee_server/testee_server.cpp +@@ -87,8 +87,8 @@ void on_message(server* s, websocketpp::connection_hdl hdl, message_ptr msg) { + s->send(hdl, msg->get_payload(), msg->get_opcode()); + } + +-void on_socket_init(websocketpp::connection_hdl, boost::asio::ip::tcp::socket & s) { +- boost::asio::ip::tcp::no_delay option(true); ++void on_socket_init(websocketpp::connection_hdl, websocketpp::lib::asio::ip::tcp::socket & s) { ++ websocketpp::lib::asio::ip::tcp::no_delay option(true); + s.set_option(option); + } + +diff --git a/test/endpoint/endpoint.cpp b/test/endpoint/endpoint.cpp +index fa58e66..c5f5a82 100644 +--- a/test/endpoint/endpoint.cpp ++++ b/test/endpoint/endpoint.cpp +@@ -53,7 +53,7 @@ BOOST_AUTO_TEST_CASE( initialize_server_asio ) { + + BOOST_AUTO_TEST_CASE( initialize_server_asio_external ) { + websocketpp::server s; +- boost::asio::io_context ios; ++ websocketpp::lib::asio::io_context ios; + s.init_asio(&ios); + } + +@@ -141,8 +141,8 @@ BOOST_AUTO_TEST_CASE( listen_after_listen_failure ) { + server1.init_asio(); + server2.init_asio(); + +- boost::asio::ip::tcp::endpoint ep1(boost::asio::ip::make_address("127.0.0.1"), 12345); +- boost::asio::ip::tcp::endpoint ep2(boost::asio::ip::make_address("127.0.0.1"), 23456); ++ websocketpp::lib::asio::ip::tcp::endpoint ep1(websocketpp::lib::asio::ip::make_address("127.0.0.1"), 12345); ++ websocketpp::lib::asio::ip::tcp::endpoint ep2(websocketpp::lib::asio::ip::make_address("127.0.0.1"), 23456); + + server1.listen(ep1, ec); + BOOST_CHECK(!ec); +diff --git a/test/http/parser_perf.cpp b/test/http/parser_perf.cpp +index 0c76bc7..0a9cc0b 100644 +--- a/test/http/parser_perf.cpp ++++ b/test/http/parser_perf.cpp +@@ -31,11 +31,11 @@ + + class scoped_timer { + public: +- scoped_timer(std::string i) : m_id(i),m_start(std::chrono::steady_clock::now()) { ++ scoped_timer(std::string i) : m_id(i),m_start(timer_ptr::element_type::clock_type::now()) { + std::cout << "Clock " << i << ": "; + } + ~scoped_timer() { +- std::chrono::nanoseconds time_taken = std::chrono::steady_clock::now()-m_start; ++ std::chrono::nanoseconds time_taken = timer_ptr::element_type::clock_type::now()-m_start; + + //nanoseconds_per_test + +diff --git a/test/transport/asio/timers.cpp b/test/transport/asio/timers.cpp +index 391b755..d59654d 100644 +--- a/test/transport/asio/timers.cpp ++++ b/test/transport/asio/timers.cpp +@@ -106,9 +106,9 @@ struct config { + }; + + // Mock context that does no validation +-typedef websocketpp::lib::shared_ptr context_ptr; ++typedef websocketpp::lib::shared_ptr context_ptr; + context_ptr on_tls_init(websocketpp::connection_hdl) { +- return context_ptr(new boost::asio::ssl::context(boost::asio::ssl::context::sslv23)); ++ return context_ptr(new websocketpp::lib::asio::ssl::context(websocketpp::lib::asio::ssl::context::sslv23)); + } + + // Mock connection +diff --git a/test/transport/integration.cpp b/test/transport/integration.cpp +index ab82b1a..526b243 100644 +--- a/test/transport/integration.cpp ++++ b/test/transport/integration.cpp +@@ -38,6 +38,8 @@ + #include + #include + ++#include "boost/date_time/posix_time/posix_time.hpp" ++ + struct config : public websocketpp::config::asio_client { + typedef config type; + typedef websocketpp::config::asio base; +@@ -218,19 +220,19 @@ void run_time_limited_client(client & c, std::string uri, long timeout, + } + + void run_dummy_server(int port) { +- using boost::asio::ip::tcp; ++ using websocketpp::lib::asio::ip::tcp; + + try { +- boost::asio::io_context io_context; ++ websocketpp::lib::asio::io_context io_context; + tcp::acceptor acceptor(io_context, tcp::endpoint(tcp::v6(), port)); + tcp::socket socket(io_context); + + acceptor.accept(socket); + for (;;) { + char data[512]; +- boost::system::error_code ec; +- socket.read_some(boost::asio::buffer(data), ec); +- if (ec == boost::asio::error::eof) { ++ websocketpp::lib::asio::error_code ec; ++ socket.read_some(websocketpp::lib::asio::buffer(data), ec); ++ if (ec == websocketpp::lib::asio::error::eof) { + break; + } else if (ec) { + // other error +@@ -239,26 +241,26 @@ void run_dummy_server(int port) { + } + } catch (std::exception & e) { + std::cout << e.what() << std::endl; +- } catch (boost::system::error_code & ec) { ++ } catch (websocketpp::lib::asio::error_code & ec) { + std::cout << ec.message() << std::endl; + } + } + + void run_dummy_client(std::string port) { +- using boost::asio::ip::tcp; ++ using websocketpp::lib::asio::ip::tcp; + + try { +- boost::asio::io_context io_context; ++ websocketpp::lib::asio::io_context io_context; + tcp::resolver resolver(io_context); + tcp::resolver::results_type endpoints = resolver.resolve("localhost", port); + tcp::socket socket(io_context); + +- boost::asio::connect(socket, endpoints); ++ websocketpp::lib::asio::connect(socket, endpoints); + for (;;) { + char data[512]; +- boost::system::error_code ec; +- socket.read_some(boost::asio::buffer(data), ec); +- if (ec == boost::asio::error::eof) { ++ websocketpp::lib::asio::error_code ec; ++ socket.read_some(websocketpp::lib::asio::buffer(data), ec); ++ if (ec == websocketpp::lib::asio::error::eof) { + break; + } else if (ec) { + // other error +@@ -267,7 +269,7 @@ void run_dummy_client(std::string port) { + } + } catch (std::exception & e) { + std::cout << e.what() << std::endl; +- } catch (boost::system::error_code & ec) { ++ } catch (websocketpp::lib::asio::error_code & ec) { + std::cout << ec.message() << std::endl; + } + } +@@ -360,7 +362,7 @@ public: + : m_timer(m_io_context, boost::posix_time::seconds(seconds)) + { + m_timer.async_wait(bind(&test_deadline_timer::expired, this, ::_1)); +- std::size_t (boost::asio::io_context::*run)() = &boost::asio::io_context::run; ++ std::size_t (websocketpp::lib::asio::io_context::*run)() = &websocketpp::lib::asio::io_context::run; + m_timer_thread = websocketpp::lib::thread(websocketpp::lib::bind(run, &m_io_context)); + } + ~test_deadline_timer() +@@ -370,16 +372,16 @@ public: + } + + private: +- void expired(const boost::system::error_code & ec) ++ void expired(const websocketpp::lib::asio::error_code & ec) + { +- if (ec == boost::asio::error::operation_aborted) ++ if (ec == websocketpp::lib::asio::error::operation_aborted) + return; + BOOST_CHECK(!ec); + BOOST_FAIL("Test timed out"); + } + +- boost::asio::io_context m_io_context; +- boost::asio::deadline_timer m_timer; ++ websocketpp::lib::asio::io_context m_io_context; ++ websocketpp::lib::asio::deadline_timer m_timer; + websocketpp::lib::thread m_timer_thread; + }; + +diff --git a/websocketpp/common/asio.hpp b/websocketpp/common/asio.hpp +index 3c8fa13..7322c25 100644 +--- a/websocketpp/common/asio.hpp ++++ b/websocketpp/common/asio.hpp +@@ -51,7 +51,7 @@ + + #include + #include +- #include ++ #include + #else + #include + +diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp +index eaee6bc..d1a2c20 100644 +--- a/websocketpp/transport/asio/connection.hpp ++++ b/websocketpp/transport/asio/connection.hpp +@@ -374,7 +374,7 @@ public: + * fail handler is called. + * + * Primarily used if you are using mismatched asio / system_error +- * implementations such as `boost::asio` with `std::system_error`. In these ++ * implementations such as `lib::asio` with `std::system_error`. In these + * cases the transport error type is different than the library error type + * and some WebSocket++ functions that return transport errors via the + * library error code type will be coerced into a catch all `pass_through` +@@ -573,7 +573,7 @@ protected: + lib::error_code const & ec) + { + if (ec == transport::error::operation_aborted || +- (post_timer && lib::asio::is_neg(post_timer->expiry() - std::chrono::steady_clock::now()))) ++ (post_timer && lib::asio::is_neg(post_timer->expiry() - timer_ptr::element_type::clock_type::now()))) + { + m_alog->write(log::alevel::devel,"post_init cancelled"); + return; +@@ -679,7 +679,7 @@ protected: + // Whatever aborted it will be issuing the callback so we are safe to + // return + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(m_proxy_data->timer->expiry() - std::chrono::steady_clock::now())) ++ lib::asio::is_neg(m_proxy_data->timer->expiry() - timer_ptr::element_type::clock_type::now())) + { + m_elog->write(log::elevel::devel,"write operation aborted"); + return; +@@ -751,7 +751,7 @@ protected: + // Whatever aborted it will be issuing the callback so we are safe to + // return + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(m_proxy_data->timer->expiry() - std::chrono::steady_clock::now())) ++ lib::asio::is_neg(m_proxy_data->timer->expiry() - timer_ptr::element_type::clock_type::now())) + { + m_elog->write(log::elevel::devel,"read operation aborted"); + return; +@@ -1012,18 +1012,18 @@ protected: + */ + lib::error_code interrupt(interrupt_handler handler) { + if (config::enable_multithreading) { +- boost::asio::post(m_io_context->get_executor(), m_strand->wrap(handler)); ++ lib::asio::post(m_io_context->get_executor(), m_strand->wrap(handler)); + } else { +- boost::asio::post(m_io_context->get_executor(), handler); ++ lib::asio::post(m_io_context->get_executor(), handler); + } + return lib::error_code(); + } + + lib::error_code dispatch(dispatch_handler handler) { + if (config::enable_multithreading) { +- boost::asio::post(m_io_context->get_executor(), m_strand->wrap(handler)); ++ lib::asio::post(m_io_context->get_executor(), m_strand->wrap(handler)); + } else { +- boost::asio::post(m_io_context->get_executor(), handler); ++ lib::asio::post(m_io_context->get_executor(), handler); + } + return lib::error_code(); + } +@@ -1095,7 +1095,7 @@ protected: + callback, lib::asio::error_code const & ec) + { + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(shutdown_timer->expiry() - std::chrono::steady_clock::now())) ++ lib::asio::is_neg(shutdown_timer->expiry() - timer_ptr::element_type::clock_type::now())) + { + m_alog->write(log::alevel::devel,"async_shutdown cancelled"); + return; +diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp +index 7af0915..57f784f 100644 +--- a/websocketpp/transport/asio/endpoint.hpp ++++ b/websocketpp/transport/asio/endpoint.hpp +@@ -967,7 +967,7 @@ protected: + lib::asio::ip::tcp::resolver::results_type endpoints) + { + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(dns_timer->expiry() - std::chrono::steady_clock::now())) ++ lib::asio::is_neg(dns_timer->expiry() - timer_ptr::element_type::clock_type::now())) + { + m_alog->write(log::alevel::devel,"async_resolve cancelled"); + return; +@@ -1075,7 +1075,7 @@ protected: + connect_handler callback, lib::asio::error_code const & ec) + { + if (ec == lib::asio::error::operation_aborted || +- lib::asio::is_neg(con_timer->expiry() - std::chrono::steady_clock::now())) ++ lib::asio::is_neg(con_timer->expiry() - timer_ptr::element_type::clock_type::now())) + { + m_alog->write(log::alevel::devel,"async_connect cancelled"); + return; +-- +2.48.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Amini Allight +Date: Fri, 14 Feb 2025 23:13:38 +0000 +Subject: [PATCH 5/7] improved variable names and fixed comments + +(cherry picked from commit dbdde20a9b4ffd49f480fd9e6e29ea212a73253b) + + Conflicts: + websocketpp/transport/asio/endpoint.hpp +--- + .../echo_server_both/echo_server_both.cpp | 8 +++--- + test/endpoint/endpoint.cpp | 4 +-- + test/transport/asio/timers.cpp | 4 +-- + test/transport/integration.cpp | 4 +-- + websocketpp/transport/asio/connection.hpp | 2 +- + websocketpp/transport/asio/endpoint.hpp | 27 +++++++++---------- + 6 files changed, 24 insertions(+), 25 deletions(-) + +diff --git a/examples/echo_server_both/echo_server_both.cpp b/examples/echo_server_both/echo_server_both.cpp +index a4f6a19..886ea7f 100644 +--- a/examples/echo_server_both/echo_server_both.cpp ++++ b/examples/echo_server_both/echo_server_both.cpp +@@ -60,12 +60,12 @@ context_ptr on_tls_init(websocketpp::connection_hdl hdl) { + int main() { + // set up an external io_context to run both endpoints on. This is not + // strictly necessary, but simplifies thread management a bit. +- websocketpp::lib::asio::io_context ios; ++ websocketpp::lib::asio::io_context ctx; + + // set up plain endpoint + server_plain endpoint_plain; + // initialize asio with our external io_context rather than an internal one +- endpoint_plain.init_asio(&ios); ++ endpoint_plain.init_asio(&ctx); + endpoint_plain.set_message_handler( + bind(&on_message,&endpoint_plain,::_1,::_2)); + endpoint_plain.listen(80); +@@ -73,7 +73,7 @@ int main() { + + // set up tls endpoint + server_tls endpoint_tls; +- endpoint_tls.init_asio(&ios); ++ endpoint_tls.init_asio(&ctx); + endpoint_tls.set_message_handler( + bind(&on_message,&endpoint_tls,::_1,::_2)); + // TLS endpoint has an extra handler for the tls init +@@ -83,5 +83,5 @@ int main() { + endpoint_tls.start_accept(); + + // Start the ASIO io_context run loop running both endpoints +- ios.run(); ++ ctx.run(); + } +diff --git a/test/endpoint/endpoint.cpp b/test/endpoint/endpoint.cpp +index c5f5a82..1840278 100644 +--- a/test/endpoint/endpoint.cpp ++++ b/test/endpoint/endpoint.cpp +@@ -53,8 +53,8 @@ BOOST_AUTO_TEST_CASE( initialize_server_asio ) { + + BOOST_AUTO_TEST_CASE( initialize_server_asio_external ) { + websocketpp::server s; +- websocketpp::lib::asio::io_context ios; +- s.init_asio(&ios); ++ websocketpp::lib::asio::io_context ctx; ++ s.init_asio(&ctx); + } + + #ifdef _WEBSOCKETPP_MOVE_SEMANTICS_ +diff --git a/test/transport/asio/timers.cpp b/test/transport/asio/timers.cpp +index d59654d..84938cb 100644 +--- a/test/transport/asio/timers.cpp ++++ b/test/transport/asio/timers.cpp +@@ -79,8 +79,8 @@ void run_dummy_server(int port) { + + // Wait for the specified time period then fail the test + void run_test_timer(long value) { +- boost::asio::io_context ios; +- boost::asio::deadline_timer t(ios,boost::posix_time::milliseconds(value)); ++ boost::asio::io_context ctx; ++ boost::asio::deadline_timer t(ctx,boost::posix_time::milliseconds(value)); + boost::system::error_code ec; + t.wait(ec); + BOOST_FAIL( "Test timed out" ); +diff --git a/test/transport/integration.cpp b/test/transport/integration.cpp +index 526b243..371c554 100644 +--- a/test/transport/integration.cpp ++++ b/test/transport/integration.cpp +@@ -252,10 +252,10 @@ void run_dummy_client(std::string port) { + try { + websocketpp::lib::asio::io_context io_context; + tcp::resolver resolver(io_context); +- tcp::resolver::results_type endpoints = resolver.resolve("localhost", port); ++ tcp::resolver::results_type results = resolver.resolve("localhost", port); + tcp::socket socket(io_context); + +- websocketpp::lib::asio::connect(socket, endpoints); ++ websocketpp::lib::asio::connect(socket, results); + for (;;) { + char data[512]; + websocketpp::lib::asio::error_code ec; +diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp +index d1a2c20..f4c13f3 100644 +--- a/websocketpp/transport/asio/connection.hpp ++++ b/websocketpp/transport/asio/connection.hpp +@@ -374,7 +374,7 @@ public: + * fail handler is called. + * + * Primarily used if you are using mismatched asio / system_error +- * implementations such as `lib::asio` with `std::system_error`. In these ++ * implementations such as `boost::asio` with `std::system_error`. In these + * cases the transport error type is different than the library error type + * and some WebSocket++ functions that return transport errors via the + * library error code type will be coerced into a catch all `pass_through` +diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp +index 57f784f..2aafd67 100644 +--- a/websocketpp/transport/asio/endpoint.hpp ++++ b/websocketpp/transport/asio/endpoint.hpp +@@ -86,7 +86,7 @@ public: + /// Type of timer handle + typedef lib::shared_ptr timer_ptr; + /// Type of a shared pointer to an io_context work object +- typedef lib::shared_ptr> work_ptr; ++ typedef lib::shared_ptr> work_guard_ptr; + + /// Type of socket pre-bind handler + typedef lib::function tcp_pre_bind_handler; +@@ -108,7 +108,7 @@ public: + // Explicitly destroy local objects + m_acceptor.reset(); + m_resolver.reset(); +- m_work.reset(); ++ m_work_guard.reset(); + if (m_state != UNINITIALIZED && !m_external_io_context) { + delete m_io_context; + } +@@ -541,8 +541,7 @@ public: + /** + * Bind the internal acceptor using the given host and service. More details + * about what host and service can be are available in the Asio +- * documentation for ip::basic_resolver_query::basic_resolver_query's +- * constructors. ++ * documentation for the ip::basic_resolver::resolve function. + * + * The endpoint must have been initialized by calling init_asio before + * listening. +@@ -558,14 +557,14 @@ public: + { + using lib::asio::ip::tcp; + tcp::resolver r(*m_io_context); +- tcp::resolver::results_type endpoints = r.resolve(host, service); +- if (endpoints.empty()) { ++ tcp::resolver::results_type results = r.resolve(host, service); ++ if (results.empty()) { + m_elog->write(log::elevel::library, + "asio::listen could not resolve the supplied host or service"); + ec = make_error_code(error::invalid_host_service); + return; + } +- listen(*endpoints.begin(),ec); ++ listen(*(results.begin()),ec); + } + + /// Set up endpoint for listening on a host and service +@@ -685,7 +684,7 @@ public: + * @since 0.3.0 + */ + void start_perpetual() { +- m_work.reset(new lib::asio::executor_work_guard(m_io_context->get_executor())); ++ m_work_guard.reset(new lib::asio::executor_work_guard(m_io_context->get_executor())); + } + + /// Clears the endpoint's perpetual flag, allowing it to exit when empty +@@ -697,7 +696,7 @@ public: + * @since 0.3.0 + */ + void stop_perpetual() { +- m_work.reset(); ++ m_work_guard.reset(); + } + + /// Call back a function after a period of time. +@@ -964,7 +963,7 @@ protected: + + void handle_resolve(transport_con_ptr tcon, timer_ptr dns_timer, + connect_handler callback, lib::asio::error_code const & ec, +- lib::asio::ip::tcp::resolver::results_type endpoints) ++ lib::asio::ip::tcp::resolver::results_type results) + { + if (ec == lib::asio::error::operation_aborted || + lib::asio::is_neg(dns_timer->expiry() - timer_ptr::element_type::clock_type::now())) +@@ -986,7 +985,7 @@ protected: + s << "Async DNS resolve successful. Results: "; + + lib::asio::ip::tcp::resolver::results_type::iterator it; +- for (it = endpoints.begin(); it != endpoints.end(); ++it) { ++ for (it = results.begin(); it != results.end(); ++it) { + s << (*it).endpoint() << " "; + } + +@@ -1012,7 +1011,7 @@ protected: + if (config::enable_multithreading) { + lib::asio::async_connect( + tcon->get_raw_socket(), +- endpoints, ++ results, + tcon->get_strand()->wrap(lib::bind( + &type::handle_connect, + this, +@@ -1025,7 +1024,7 @@ protected: + } else { + lib::asio::async_connect( + tcon->get_raw_socket(), +- endpoints, ++ results, + lib::bind( + &type::handle_connect, + this, +@@ -1160,7 +1159,7 @@ private: + bool m_external_io_context; + acceptor_ptr m_acceptor; + resolver_ptr m_resolver; +- work_ptr m_work; ++ work_guard_ptr m_work_guard; + + // Network constants + int m_listen_backlog; +-- +2.48.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Amini Allight +Date: Thu, 20 Feb 2025 06:19:46 +0000 +Subject: [PATCH 6/7] fixed use of deprecated boost::asio::deadline_timer in + tests + +(cherry picked from commit 096487461fe834c30fb322ac0b9088ad82e5a2d5) +--- + test/transport/asio/timers.cpp | 3 ++- + test/transport/integration.cpp | 27 ++++++++++++++------------- + 2 files changed, 16 insertions(+), 14 deletions(-) + +diff --git a/test/transport/asio/timers.cpp b/test/transport/asio/timers.cpp +index 84938cb..22a4bba 100644 +--- a/test/transport/asio/timers.cpp ++++ b/test/transport/asio/timers.cpp +@@ -80,7 +80,8 @@ void run_dummy_server(int port) { + // Wait for the specified time period then fail the test + void run_test_timer(long value) { + boost::asio::io_context ctx; +- boost::asio::deadline_timer t(ctx,boost::posix_time::milliseconds(value)); ++ boost::asio::system_timer t(ctx); ++ t.expires_after(std::chrono::milliseconds(value)); + boost::system::error_code ec; + t.wait(ec); + BOOST_FAIL( "Test timed out" ); +diff --git a/test/transport/integration.cpp b/test/transport/integration.cpp +index 371c554..70f4442 100644 +--- a/test/transport/integration.cpp ++++ b/test/transport/integration.cpp +@@ -355,17 +355,18 @@ void close(T * e, websocketpp::connection_hdl hdl) { + e->get_con_from_hdl(hdl)->close(websocketpp::close::status::normal,""); + } + +-class test_deadline_timer ++class test_system_timer + { + public: +- test_deadline_timer(int seconds) +- : m_timer(m_io_context, boost::posix_time::seconds(seconds)) ++ test_system_timer(int seconds) ++ : m_timer(m_io_context) + { +- m_timer.async_wait(bind(&test_deadline_timer::expired, this, ::_1)); ++ m_timer.expires_after(std::chrono::seconds(seconds)); ++ m_timer.async_wait(bind(&test_system_timer::expired, this, ::_1)); + std::size_t (websocketpp::lib::asio::io_context::*run)() = &websocketpp::lib::asio::io_context::run; + m_timer_thread = websocketpp::lib::thread(websocketpp::lib::bind(run, &m_io_context)); + } +- ~test_deadline_timer() ++ ~test_system_timer() + { + m_timer.cancel(); + m_timer_thread.join(); +@@ -381,7 +382,7 @@ public: + } + + websocketpp::lib::asio::io_context m_io_context; +- websocketpp::lib::asio::deadline_timer m_timer; ++ websocketpp::lib::asio::system_timer m_timer; + websocketpp::lib::thread m_timer_thread; + }; + +@@ -427,7 +428,7 @@ BOOST_AUTO_TEST_CASE( pong_timeout ) { + websocketpp::lib::thread sthread(websocketpp::lib::bind(&run_server,&s,9005,false)); + sleep(1); // give the server thread some time to start + +- test_deadline_timer deadline(10); ++ test_system_timer deadline(10); + + run_client(c, "http://localhost:9005",false); + +@@ -448,7 +449,7 @@ BOOST_AUTO_TEST_CASE( client_open_handshake_timeout ) { + + sleep(1); // give the server thread some time to start + +- test_deadline_timer deadline(10); ++ test_system_timer deadline(10); + + run_client(c, "http://localhost:9005"); + } +@@ -464,7 +465,7 @@ BOOST_AUTO_TEST_CASE( server_open_handshake_timeout ) { + + websocketpp::lib::thread sthread(websocketpp::lib::bind(&run_server,&s,9005,false)); + +- test_deadline_timer deadline(10); ++ test_system_timer deadline(10); + + sleep(1); // give the server thread some time to start + +@@ -489,7 +490,7 @@ BOOST_AUTO_TEST_CASE( client_self_initiated_close_handshake_timeout ) { + + websocketpp::lib::thread sthread(websocketpp::lib::bind(&run_server,&s,9005,false)); + +- test_deadline_timer deadline(10); ++ test_system_timer deadline(10); + + sleep(1); // give the server thread some time to start + +@@ -522,7 +523,7 @@ BOOST_AUTO_TEST_CASE( server_self_initiated_close_handshake_timeout ) { + c.set_open_handler(bind(&delay,::_1,1)); + + websocketpp::lib::thread sthread(websocketpp::lib::bind(&run_server,&s,9005,false)); +- test_deadline_timer deadline(10); ++ test_system_timer deadline(10); + + sleep(1); // give the server thread some time to start + +@@ -534,7 +535,7 @@ BOOST_AUTO_TEST_CASE( server_self_initiated_close_handshake_timeout ) { + BOOST_AUTO_TEST_CASE( client_runs_out_of_work ) { + client c; + +- test_deadline_timer deadline(3); ++ test_system_timer deadline(3); + + websocketpp::lib::error_code ec; + c.init_asio(ec); +@@ -600,7 +601,7 @@ BOOST_AUTO_TEST_CASE( stop_listening ) { + c.set_open_handler(bind(&close,&c,::_1)); + + websocketpp::lib::thread sthread(websocketpp::lib::bind(&run_server,&s,9005,false)); +- test_deadline_timer deadline(5); ++ test_system_timer deadline(5); + + sleep(1); // give the server thread some time to start + +-- +2.48.1 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Amini Allight +Date: Thu, 20 Feb 2025 17:25:03 +0000 +Subject: [PATCH 7/7] replaced uses of boost::asio::io_context::strand::wrap + with boost::asio::bind_executor to avoid future deprecation issues + +(cherry picked from commit a11fa6fe4937ca251753e90b1836a68bf57768a9) +--- + websocketpp/transport/asio/connection.hpp | 16 ++++++++-------- + websocketpp/transport/asio/endpoint.hpp | 6 +++--- + websocketpp/transport/asio/security/tls.hpp | 4 ++-- + 3 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/websocketpp/transport/asio/connection.hpp b/websocketpp/transport/asio/connection.hpp +index f4c13f3..4baa2ea 100644 +--- a/websocketpp/transport/asio/connection.hpp ++++ b/websocketpp/transport/asio/connection.hpp +@@ -318,7 +318,7 @@ public: + ); + + if (config::enable_multithreading) { +- new_timer->async_wait(m_strand->wrap(lib::bind( ++ new_timer->async_wait(lib::asio::bind_executor(*m_strand, lib::bind( + &type::handle_timer, get_shared(), + new_timer, + callback, +@@ -629,7 +629,7 @@ protected: + lib::asio::async_write( + socket_con_type::get_next_layer(), + m_bufs, +- m_strand->wrap(lib::bind( ++ lib::asio::bind_executor(*m_strand, lib::bind( + &type::handle_proxy_write, get_shared(), + callback, + lib::placeholders::_1 +@@ -713,7 +713,7 @@ protected: + socket_con_type::get_next_layer(), + m_proxy_data->read_buf, + "\r\n\r\n", +- m_strand->wrap(lib::bind( ++ lib::asio::bind_executor(*m_strand, lib::bind( + &type::handle_proxy_read, get_shared(), + callback, + lib::placeholders::_1, lib::placeholders::_2 +@@ -841,7 +841,7 @@ protected: + socket_con_type::get_socket(), + lib::asio::buffer(buf,len), + lib::asio::transfer_at_least(num_bytes), +- m_strand->wrap(make_custom_alloc_handler( ++ lib::asio::bind_executor(*m_strand, make_custom_alloc_handler( + m_read_handler_allocator, + lib::bind( + &type::handle_async_read, get_shared(), +@@ -910,7 +910,7 @@ protected: + lib::asio::async_write( + socket_con_type::get_socket(), + m_bufs, +- m_strand->wrap(make_custom_alloc_handler( ++ lib::asio::bind_executor(*m_strand, make_custom_alloc_handler( + m_write_handler_allocator, + lib::bind( + &type::handle_async_write, get_shared(), +@@ -947,7 +947,7 @@ protected: + lib::asio::async_write( + socket_con_type::get_socket(), + m_bufs, +- m_strand->wrap(make_custom_alloc_handler( ++ lib::asio::bind_executor(*m_strand, make_custom_alloc_handler( + m_write_handler_allocator, + lib::bind( + &type::handle_async_write, get_shared(), +@@ -1012,7 +1012,7 @@ protected: + */ + lib::error_code interrupt(interrupt_handler handler) { + if (config::enable_multithreading) { +- lib::asio::post(m_io_context->get_executor(), m_strand->wrap(handler)); ++ lib::asio::post(m_io_context->get_executor(), lib::asio::bind_executor(*m_strand, handler)); + } else { + lib::asio::post(m_io_context->get_executor(), handler); + } +@@ -1021,7 +1021,7 @@ protected: + + lib::error_code dispatch(dispatch_handler handler) { + if (config::enable_multithreading) { +- lib::asio::post(m_io_context->get_executor(), m_strand->wrap(handler)); ++ lib::asio::post(m_io_context->get_executor(), lib::asio::bind_executor(*m_strand, handler)); + } else { + lib::asio::post(m_io_context->get_executor(), handler); + } +diff --git a/websocketpp/transport/asio/endpoint.hpp b/websocketpp/transport/asio/endpoint.hpp +index 2aafd67..b9e1ae8 100644 +--- a/websocketpp/transport/asio/endpoint.hpp ++++ b/websocketpp/transport/asio/endpoint.hpp +@@ -776,7 +776,7 @@ public: + if (config::enable_multithreading) { + m_acceptor->async_accept( + tcon->get_raw_socket(), +- tcon->get_strand()->wrap(lib::bind( ++ lib::asio::bind_executor(*tcon->get_strand(), lib::bind( + &type::handle_accept, + this, + callback, +@@ -902,7 +902,7 @@ protected: + m_resolver->async_resolve( + host, + port, +- tcon->get_strand()->wrap(lib::bind( ++ lib::asio::bind_executor(*tcon->get_strand(), lib::bind( + &type::handle_resolve, + this, + tcon, +@@ -1012,7 +1012,7 @@ protected: + lib::asio::async_connect( + tcon->get_raw_socket(), + results, +- tcon->get_strand()->wrap(lib::bind( ++ lib::asio::bind_executor(*tcon->get_strand(), lib::bind( + &type::handle_connect, + this, + tcon, +diff --git a/websocketpp/transport/asio/security/tls.hpp b/websocketpp/transport/asio/security/tls.hpp +index 8b27656..07651c0 100644 +--- a/websocketpp/transport/asio/security/tls.hpp ++++ b/websocketpp/transport/asio/security/tls.hpp +@@ -266,7 +266,7 @@ protected: + if (m_strand) { + m_socket->async_handshake( + get_handshake_type(), +- m_strand->wrap(lib::bind( ++ lib::asio::bind_executor(*m_strand, lib::bind( + &type::handle_init, get_shared(), + callback, + lib::placeholders::_1 +@@ -326,7 +326,7 @@ protected: + + void async_shutdown(socket::shutdown_handler callback) { + if (m_strand) { +- m_socket->async_shutdown(m_strand->wrap(callback)); ++ m_socket->async_shutdown(lib::asio::bind_executor(*m_strand, callback)); + } else { + m_socket->async_shutdown(callback); + } +-- +2.48.1 + diff --git a/pkgs/by-name/xd/xdg-desktop-portal-cosmic/package.nix b/pkgs/by-name/xd/xdg-desktop-portal-cosmic/package.nix index c0447ca2492b..7e9eab41efda 100644 --- a/pkgs/by-name/xd/xdg-desktop-portal-cosmic/package.nix +++ b/pkgs/by-name/xd/xdg-desktop-portal-cosmic/package.nix @@ -16,7 +16,7 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "xdg-desktop-portal-cosmic"; - version = "1.0.0-beta.8"; + version = "1.0.0-beta.9"; # nixpkgs-update: no auto update src = fetchFromGitHub { diff --git a/pkgs/development/libraries/asio/1.10.nix b/pkgs/development/libraries/asio/1.10.nix deleted file mode 100644 index 1a283bc77f1e..000000000000 --- a/pkgs/development/libraries/asio/1.10.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ callPackage, ... }@args: - -callPackage ./generic.nix ( - args - // { - version = "1.10.8"; - sha256 = "0jgdl4fxw0hwy768rl3lhdc0czz7ak7czf3dg10j21pdpfpfvpi6"; - } -) diff --git a/pkgs/development/libraries/asio/default.nix b/pkgs/development/libraries/asio/default.nix deleted file mode 100644 index 5508f848cc68..000000000000 --- a/pkgs/development/libraries/asio/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ callPackage, ... }@args: - -callPackage ./generic.nix ( - args - // { - version = "1.24.0"; - sha256 = "sha256-iXaBLCShGGAPb88HGiBgZjCmmv5MCr7jsN6lKOaCxYU="; - } -) diff --git a/pkgs/development/libraries/asio/generic.nix b/pkgs/development/libraries/asio/generic.nix deleted file mode 100644 index d3ab8aa40038..000000000000 --- a/pkgs/development/libraries/asio/generic.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - boost, - openssl, - version, - sha256, - ... -}: - -stdenv.mkDerivation { - pname = "asio"; - inherit version; - - src = fetchurl { - url = "mirror://sourceforge/asio/asio-${version}.tar.bz2"; - inherit sha256; - }; - - propagatedBuildInputs = [ boost ]; - - buildInputs = [ openssl ]; - - meta = with lib; { - homepage = "http://asio.sourceforge.net/"; - description = "Cross-platform C++ library for network and low-level I/O programming"; - license = licenses.boost; - broken = stdenv.hostPlatform.isDarwin && lib.versionOlder version "1.16.1"; - platforms = platforms.unix; - }; -} diff --git a/pkgs/development/libraries/libpulsar/default.nix b/pkgs/development/libraries/libpulsar/default.nix index a6c7f0ec37a4..d9761c457462 100644 --- a/pkgs/development/libraries/libpulsar/default.nix +++ b/pkgs/development/libraries/libpulsar/default.nix @@ -1,8 +1,9 @@ { lib, asioSupport ? true, - asio, + asio_1_32_0, boost, + boost186, log4cxxSupport ? false, log4cxx, snappySupport ? false, @@ -23,30 +24,6 @@ stdenv, }: -let - /* - Check if null or false - Example: - let result = enableFeature null - => "OFF" - let result = enableFeature false - => "OFF" - let result = enableFeature «derivation» - => "ON" - */ - enableCmakeFeature = p: if (p == null || p == false) then "OFF" else "ON"; - - defaultOptionals = [ - protobuf - ] - ++ lib.optional snappySupport snappy.dev - ++ lib.optional zlibSupport zlib - ++ lib.optional zstdSupport zstd - ++ lib.optional log4cxxSupport log4cxx - ++ lib.optional asioSupport asio - ++ lib.optional (!asioSupport) boost; - -in stdenv.mkDerivation (finalAttrs: { pname = "libpulsar"; version = "3.7.2"; @@ -61,21 +38,38 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ cmake pkg-config + protobuf # protoc ] - ++ defaultOptionals ++ lib.optional gtestSupport gtest.dev; buildInputs = [ jsoncpp openssl curl + protobuf ] - ++ defaultOptionals; + ++ lib.optional snappySupport snappy.dev + ++ lib.optional zlibSupport zlib + ++ lib.optional zstdSupport zstd + ++ lib.optional log4cxxSupport log4cxx + ++ lib.optionals asioSupport [ + # io_service was removed in 1.33.0 + asio_1_32_0 + boost + ] + ++ lib.optionals (!asioSupport) [ + # io_service was removed in 1.87.0 + boost186 + ]; + + strictDeps = true; cmakeFlags = [ - "-DBUILD_TESTS=${enableCmakeFeature gtestSupport}" - "-DUSE_LOG4CXX=${enableCmakeFeature log4cxxSupport}" - "-DUSE_ASIO=${enableCmakeFeature asioSupport}" + (lib.cmakeBool "BUILD_TESTS" gtestSupport) + (lib.cmakeBool "USE_LOG4CXX" log4cxxSupport) + # We enable USE_ASIO here so at least we can + # have newer boost minus boost::asio + (lib.cmakeBool "USE_ASIO" asioSupport) ]; doInstallCheck = true; diff --git a/pkgs/development/libraries/wayland/protocols.nix b/pkgs/development/libraries/wayland/protocols.nix index 93117b7e9872..760e4918059b 100644 --- a/pkgs/development/libraries/wayland/protocols.nix +++ b/pkgs/development/libraries/wayland/protocols.nix @@ -21,6 +21,10 @@ stdenv.mkDerivation (finalAttrs: { && # https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/48 stdenv.hostPlatform.linker == "bfd" + && + # Even with bfd linker, the above issue occurs on platforms with stricter linker requirements + # https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/48#note_1453201 + !(stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isBigEndian) && lib.meta.availableOn stdenv.hostPlatform wayland; src = fetchurl { diff --git a/pkgs/development/python-modules/colbert-ai/default.nix b/pkgs/development/python-modules/colbert-ai/default.nix index 5b4ebfdeb2c4..1acc4f3ef12a 100644 --- a/pkgs/development/python-modules/colbert-ai/default.nix +++ b/pkgs/development/python-modules/colbert-ai/default.nix @@ -23,26 +23,15 @@ buildPythonPackage rec { pname = "colbert-ai"; - version = "0.2.21"; + version = "0.2.22"; pyproject = true; src = fetchPypi { inherit version; pname = "colbert_ai"; - hash = "sha256-qNb9tOInLysI7Tf45QlgchYNhBXR5AWFdRiYt35iW6s="; + hash = "sha256-AK/P711xXw06cGvpDStbdKK7fEAgc4B861UVwAJqiIY="; }; - # ImportError: cannot import name 'AdamW' from 'transformers' - # https://github.com/stanford-futuredata/ColBERT/pull/390 - postPatch = '' - substituteInPlace colbert/training/training.py \ - --replace-fail \ - "from transformers import AdamW, get_linear_schedule_with_warmup" \ - "from transformers import get_linear_schedule_with_warmup; from torch.optim import AdamW" - ''; - - pythonRemoveDeps = [ "git-python" ]; - build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/pyghmi/default.nix b/pkgs/development/python-modules/pyghmi/default.nix index d8953c00f499..bada4ba61ad5 100644 --- a/pkgs/development/python-modules/pyghmi/default.nix +++ b/pkgs/development/python-modules/pyghmi/default.nix @@ -14,12 +14,12 @@ buildPythonPackage rec { pname = "pyghmi"; - version = "1.6.7"; + version = "1.6.8"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-UtFTvWt/VX5bKZgAsnM+fzcG5ovh8TR6EKIn58Ohu7g="; + hash = "sha256-qkiPYbjL5iNeyxb1hC9hBoz8wB+uTMhp9NaWwlqijnk="; }; build-system = [ diff --git a/pkgs/development/python-modules/sagemaker-mlflow/default.nix b/pkgs/development/python-modules/sagemaker-mlflow/default.nix index 8da11f1551e4..4cb6d51a5fdf 100644 --- a/pkgs/development/python-modules/sagemaker-mlflow/default.nix +++ b/pkgs/development/python-modules/sagemaker-mlflow/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "sagemaker-mlflow"; - version = ".0.2.0"; + version = "0.2.0"; pyproject = true; src = fetchFromGitHub { diff --git a/pkgs/development/tools/ocaml/melange/default.nix b/pkgs/development/tools/ocaml/melange/default.nix index 8352e41011f1..6e0139729635 100644 --- a/pkgs/development/tools/ocaml/melange/default.nix +++ b/pkgs/development/tools/ocaml/melange/default.nix @@ -23,13 +23,13 @@ let versionHash = if lib.versionAtLeast ocaml.version "5.4" then { - version = "6.0.0-54"; - hash = "sha256-689OK37ObYhopfcaJ3AmkScGC4lCu3ZOTEM6N+Npvzs="; + version = "6.0.1-54"; + hash = "sha256-bV5TD8qlLt7wQdm9W0TyhDDBFFo/PdJXGgiscnsBFmc="; } else if lib.versionAtLeast ocaml.version "5.3" then { - version = "6.0.0-53"; - hash = "sha256-jPTQvV095BPB4EDepwGJTZ9sB/60VTO4YJTj2wI39jc="; + version = "6.0.1-53"; + hash = "sha256-e1/RIsFsKeAbc2wgQf1Hhta+nyAXIuEP7uatXrU9cLs="; } else if lib.versionAtLeast ocaml.version "5.2" then { diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index bf484a7423cf..ea8956f499b2 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -309,6 +309,7 @@ mapAliases { artichoke = throw "artichoke has been removed due to being archived upstream."; # Added 2025-11-04 artim-dark = aritim-dark; # Added 2025-07-27 aseprite-unfree = throw "'aseprite-unfree' has been renamed to/replaced by 'aseprite'"; # Converted to throw 2025-10-27 + asio_1_10 = throw "'asio_1_10' has been removed as it is outdated and unused. Use 'asio' instead"; # Added 2025-12-03 asitop = throw "'asitop' has been renamed to/replaced by 'macpm'"; # Converted to throw 2025-10-27 asterisk_18 = throw "asterisk_18: Asterisk 18 is end of life and has been removed"; # Added 2025-10-19 atlassian-cli = appfire-cli; # Added 2025-09-29 @@ -1435,6 +1436,7 @@ mapAliases { sierra-breeze-enhanced = throw "'sierra-breeze-enhanced' has been removed, as it is only compatible with Plasma 5, which is EOL"; # Added 2025-08-20 signal-desktop-source = throw "'signal-desktop-source' has been renamed to/replaced by 'signal-desktop'"; # Converted to throw 2025-10-27 simplesamlphp = throw "'simplesamlphp' was removed because it was unmaintained in nixpkgs"; # Added 2025-10-17 + sioclient = throw "'sioclient' has been removed as it is no longer used by freedv, and doesn't build with newer asio"; # Added 2025-12-03 siproxd = throw "'siproxd' has been removed as it was unmaintained and incompatible with newer libosip versions"; # Added 2025-05-18 sipwitch = throw "'sipwitch' has been removed because it has been marked as broken since at least November 2024."; # Added 2025-10-01 sisco.lv2 = throw "'sisco.lv2' has been removed as it was unmaintained and broken"; # Added 2025-08-26 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 74b2a7980e97..cad718c0f0b2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6844,8 +6844,8 @@ with pkgs; argparse-manpage = with python3Packages; toPythonApplication argparse-manpage; - asio_1_10 = callPackage ../development/libraries/asio/1.10.nix { }; - asio = callPackage ../development/libraries/asio { }; + asio_1_32_0 = callPackage ../by-name/as/asio/package.nix { asioVersion = "1.32.0"; }; + asio_1_36_0 = callPackage ../by-name/as/asio/package.nix { asioVersion = "1.36.0"; }; aspell = callPackage ../development/libraries/aspell { };