From a2f2c07a29f5c98f6736cde0c86b24887f9fd48a Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 28 Sep 2024 21:55:15 -0700 Subject: [PATCH 01/11] cirrus: token update --- .cirrus.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1a13a8c59c9..63e28ff4560 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -45,7 +45,7 @@ task: cpu: 4 memory: 12G environment: - GITHUB_TOKEN: ENCRYPTED[23bd9513fa7174e74eaddce6a3099cabb22118423591553b23518e8c34bf155e07c559838b1d3422f561c73c1e31e6fc] + GITHUB_TOKEN: ENCRYPTED[f20f769b749757fbdc3968320deea1c8e90f2bc2ff5f957bae4de0f022793f57400a5936fe8699bd732a231c9ed74be7] FURY_TOKEN: ENCRYPTED[833e7ce9bfd87970b321dd621677f792a65f485b40819cad30258d3a1e1569f9cb4878a2958efecdf40a5050354edd54] stateful: false @@ -82,7 +82,7 @@ task: cpu: 4 memory: 12G environment: - GITHUB_TOKEN: ENCRYPTED[23bd9513fa7174e74eaddce6a3099cabb22118423591553b23518e8c34bf155e07c559838b1d3422f561c73c1e31e6fc] + GITHUB_TOKEN: ENCRYPTED[f20f769b749757fbdc3968320deea1c8e90f2bc2ff5f957bae4de0f022793f57400a5936fe8699bd732a231c9ed74be7] FURY_TOKEN: ENCRYPTED[833e7ce9bfd87970b321dd621677f792a65f485b40819cad30258d3a1e1569f9cb4878a2958efecdf40a5050354edd54] stateful: false @@ -119,7 +119,7 @@ task: cpu: 4 memory: 12G environment: - GITHUB_TOKEN: ENCRYPTED[23bd9513fa7174e74eaddce6a3099cabb22118423591553b23518e8c34bf155e07c559838b1d3422f561c73c1e31e6fc] + GITHUB_TOKEN: ENCRYPTED[f20f769b749757fbdc3968320deea1c8e90f2bc2ff5f957bae4de0f022793f57400a5936fe8699bd732a231c9ed74be7] stateful: false install_rust_script: From ed430415ee69279ea692358525196ad7d4c965b8 Mon Sep 17 00:00:00 2001 From: Luis Mario Domenzain Date: Mon, 7 Oct 2024 16:49:45 +0200 Subject: [PATCH 02/11] add X11 xmonad to tiling_desktop_environments --- config/src/config.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/config/src/config.rs b/config/src/config.rs index 70a77d8db6c..113cdbfba4c 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -1766,6 +1766,7 @@ fn default_tiling_desktop_environments() -> Vec { "X11 bspwm", "X11 dwm", "X11 i3", + "X11 xmonad", ] .iter() .map(|s| s.to_string()) From 1595b5d388f051e32cd84f953b88fab0f6b53ca9 Mon Sep 17 00:00:00 2001 From: Jack Tubbenhauer Date: Sat, 12 Oct 2024 22:51:11 +1100 Subject: [PATCH 03/11] docs: fix InputSelector.md typo --- docs/config/lua/keyassignment/InputSelector.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config/lua/keyassignment/InputSelector.md b/docs/config/lua/keyassignment/InputSelector.md index eea3c3341d5..37a1e011697 100644 --- a/docs/config/lua/keyassignment/InputSelector.md +++ b/docs/config/lua/keyassignment/InputSelector.md @@ -15,7 +15,7 @@ upon the input. is itself a table with a `label` field and an optional `id` field. The label will be shown in the list, while the id can be a different string that is meaningful to your action. The label can be used together - with [wezterm.format](../wezterm/format.md) to produce styled test. + with [wezterm.format](../wezterm/format.md) to produce styled text. * `action` - and event callback registered via `wezterm.action_callback`. The callback's function signature is `(window, pane, id, label)` where `window` and `pane` are the [Window](../window/index.md) and [Pane](../pane/index.md) From 9ddca7bde92090792dbcdc65c1e9897c362196d7 Mon Sep 17 00:00:00 2001 From: SATOH Fumiyasu Date: Sun, 13 Oct 2024 14:03:34 +0900 Subject: [PATCH 04/11] docs: Put APT key into /etc/apt/keyrings sources.list(5) says: > The recommended locations for keyrings are > /usr/share/keyrings for keyrings managed by packages, and > /etc/apt/keyrings for keyrings managed by the system operator. --- docs/install/linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/install/linux.md b/docs/install/linux.md index 7413faf3691..341cf0a1bda 100644 --- a/docs/install/linux.md +++ b/docs/install/linux.md @@ -100,8 +100,8 @@ hide: steps: ```console - $ curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg - $ echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list + $ curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /etc/apt/keyrings/wezterm-fury.gpg + $ echo 'deb [signed-by=/etc/apt/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list ``` Update your dependencies: From 6a0ed04df448c91906666005ba38e72b00f17060 Mon Sep 17 00:00:00 2001 From: Sean Estabrooks Date: Fri, 27 Sep 2024 15:45:27 -0400 Subject: [PATCH 05/11] Alter copr spec file for Fedora 41 and Rawhide SlouchyButton mentioned in #6015 that a Fedora Openssl packaging change was likely causing a problem for the copr build. The deprecated engine header has been broken out into its own package. Add a dependency on it for Fedora 41 and Rawhide. --- ci/deploy.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/deploy.sh b/ci/deploy.sh index f9292f2c729..fe96b0031d2 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -171,6 +171,9 @@ BuildRequires: Mesa-libEGL-devel %else BuildRequires: mesa-libEGL-devel %endif +%if 0%{?fedora} >= 41 +BuildRequires: openssl-devel-engine +%endif Source0: wezterm-${TAR_NAME}.tar.gz %global debug_package %{nil} From f847bd284db6a38e7f5920421ba23e3aa688f8fd Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 30 Oct 2024 21:52:16 -0700 Subject: [PATCH 06/11] hbwrap: from_raw_parts handling of null ptr use similar approach to 67d4ba9f76470a7ff1f3e7609119cdbb9d33024c closes: https://github.com/wez/wezterm/pull/6337 closes: https://github.com/wez/wezterm/issues/6336 --- wezterm-font/src/hbwrap.rs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/wezterm-font/src/hbwrap.rs b/wezterm-font/src/hbwrap.rs index 939155972ef..6b9164d3fbc 100644 --- a/wezterm-font/src/hbwrap.rs +++ b/wezterm-font/src/hbwrap.rs @@ -10,10 +10,10 @@ use cairo::Extend; use memmap2::{Mmap, MmapOptions}; use std::ffi::CStr; use std::io::Read; +use std::mem; use std::ops::Range; use std::os::raw::{c_char, c_int, c_uint, c_void}; use std::sync::Arc; -use std::{mem, slice}; use wezterm_color_types::SrgbaPixel; extern "C" { @@ -79,7 +79,7 @@ impl Blob { unsafe { let mut len = 0; let ptr = hb_blob_get_data(self.blob, &mut len); - std::slice::from_raw_parts(ptr as *const u8, len as usize) + from_raw_parts(ptr as *const u8, len as usize) } } @@ -1056,7 +1056,7 @@ impl Buffer { unsafe { let mut len: u32 = 0; let info = hb_buffer_get_glyph_infos(self.buf, &mut len as *mut _); - slice::from_raw_parts(info, len as usize) + from_raw_parts(info, len as usize) } } @@ -1066,7 +1066,7 @@ impl Buffer { unsafe { let mut len: u32 = 0; let pos = hb_buffer_get_glyph_positions(self.buf, &mut len as *mut _); - slice::from_raw_parts(pos, len as usize) + from_raw_parts(pos, len as usize) } } @@ -1180,3 +1180,16 @@ pub fn hb_tag_to_string(tag: hb_tag_t) -> TagString { } TagString(buf) } + +/// Wrapper around std::slice::from_raw_parts that allows for ptr to be +/// null. In the null ptr case, an empty slice is returned. +/// This is necessary because harfbuzz may sometimes encode +/// empty arrays in that way, and rust 1.78 will panic if a null +/// ptr is passed in. +pub(crate) unsafe fn from_raw_parts<'a, T>(ptr: *const T, size: usize) -> &'a [T] { + if ptr.is_null() { + &[] + } else { + std::slice::from_raw_parts(ptr, size) + } +} From 0983ae90d6dfb45c5f99058e97de73a70ca9dd36 Mon Sep 17 00:00:00 2001 From: "Anthony M. Cook" Date: Fri, 1 Nov 2024 01:51:12 -0500 Subject: [PATCH 07/11] Mark wayland-backend as optional dependency (#6342) * Mark wayland-backend as optional dependency Fixes #6315 https://github.com/wez/wezterm/commit/09ac8c53777ac6de61b757292f5dc4da80322bbd introduced the `wayland-backend` dependency, but did not mark it as optional, this prevented the build from successfully completing on X11 systems without Wayland development libraries. --- window/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/window/Cargo.toml b/window/Cargo.toml index 2ad3ac6b4c2..06f32a49902 100644 --- a/window/Cargo.toml +++ b/window/Cargo.toml @@ -15,7 +15,7 @@ k9 = "0.12.0" gl_generator = "0.14" [features] -wayland = ["wayland-client", "smithay-client-toolkit", "wayland-egl", "wayland-protocols"] +wayland = ["wayland-client", "smithay-client-toolkit", "wayland-egl", "wayland-protocols", "wayland-backend"] [dependencies] async-channel = "2.3" @@ -82,7 +82,7 @@ zbus = "4.2" zvariant = "4.0" smithay-client-toolkit = {version = "0.19", default-features=false, optional=true} -wayland-backend = {version="0.3.5", features=["client_system", "rwh_06"]} +wayland-backend = {version="0.3.5", features=["client_system", "rwh_06"], optional=true} wayland-protocols = {version="0.32", optional=true} wayland-client = {version="0.31", optional=true} wayland-egl = {version="0.32", optional=true} From c57b3ee28bd4394b2ff2ddf059798d4c84966633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 2 Nov 2024 18:13:52 +0100 Subject: [PATCH 08/11] nix: add headless variant see https://github.com/NixOS/nixpkgs/commit/e6e229dc20b3492c2f2b7789f61b6fb8adf43ee3 --- nix/flake.nix | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/nix/flake.nix b/nix/flake.nix index 58911cc078b..824b111104e 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -120,6 +120,13 @@ # tests are failing with: Unable to exchange encryption keys rm -r wezterm-ssh/tests + + # hash does not work well with NixOS + substituteInPlace assets/shell-integration/wezterm.sh \ + --replace-fail 'hash wezterm 2>/dev/null' 'command type -P wezterm &>/dev/null' \ + --replace-fail 'hash base64 2>/dev/null' 'command type -P base64 &>/dev/null' \ + --replace-fail 'hash hostname 2>/dev/null' 'command type -P hostname &>/dev/null' \ + --replace-fail 'hash hostnamectl 2>/dev/null' 'command type -P hostnamectl &>/dev/null' ''; preFixup = lib.optionalString stdenv.isLinux '' @@ -154,6 +161,28 @@ ''; passthru = { + # the headless variant is useful when deploying wezterm's mux server on remote severs + headless = rustPlatform.buildRustPackage { + pname = "wezterm-headless"; + inherit version src postPatch cargoLock meta; + + nativeBuildInputs = [ pkgs.pkg-config ]; + + buildInputs = [ pkgs.openssl ]; + + cargoBuildFlags = [ + "--package" "wezterm" + "--package" "wezterm-mux-server" + ]; + + doCheck = false; + + postInstall = '' + install -Dm644 assets/shell-integration/wezterm.sh -t $out/etc/profile.d + install -Dm644 ${passthru.terminfo}/share/terminfo/w/wezterm -t $out/share/terminfo/w + ''; + }; + terminfo = pkgs.runCommand "wezterm-terminfo" { From 6fc35e7dcbb9dea389c8415848d595299a5f0a5e Mon Sep 17 00:00:00 2001 From: Sirio Balmelli Date: Mon, 21 Oct 2024 11:42:40 +0200 Subject: [PATCH 09/11] nix/flake.lock: update Signed-off-by: Sirio Balmelli --- nix/flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nix/flake.lock b/nix/flake.lock index 006a6fc64a2..c166132ed1c 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -71,11 +71,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726238386, - "narHash": "sha256-3//V84fYaGVncFImitM6lSAliRdrGayZLdxWlpcuGk0=", + "lastModified": 1729265718, + "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "01f064c99c792715054dc7a70e4c1626dbbec0c3", + "rev": "ccc0c2126893dd20963580b6478d1a10a4512185", "type": "github" }, "original": { @@ -103,11 +103,11 @@ ] }, "locked": { - "lastModified": 1726280639, - "narHash": "sha256-YfLRPlFZWrT2oRLNAoqf7G3+NnUTDdlIJk6tmBU7kXM=", + "lastModified": 1729477859, + "narHash": "sha256-r0VyeJxy4O4CgTB/PNtfQft9fPfN1VuGvnZiCxDArvg=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "e9f8641c92f26fd1e076e705edb12147c384171d", + "rev": "ada8266712449c4c0e6ee6fcbc442b3c217c79e1", "type": "github" }, "original": { From 255b9e0783b9c70d7094f2fdcf00a4b0c3db3c72 Mon Sep 17 00:00:00 2001 From: Sirio Balmelli Date: Mon, 21 Oct 2024 11:42:40 +0200 Subject: [PATCH 10/11] nix/flake.nix: fix x86_64-darwin build The default SDK errors missing UserNotifications on x86_64-darwin. Signed-off-by: Sirio Balmelli --- nix/flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/flake.nix b/nix/flake.nix index 824b111104e..5e925cad854 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -73,7 +73,7 @@ xorg.xcbutilwm # contains xcb-ewmh among others ] ++ lib.optionals stdenv.isDarwin ( - (with pkgs.darwin.apple_sdk.frameworks; [ + (with pkgs.darwin.apple_sdk_12_3.frameworks; [ Cocoa CoreGraphics Foundation From 51c794ac500a2033b9dc570c71810518bfa667a9 Mon Sep 17 00:00:00 2001 From: Sirio Balmelli Date: Mon, 21 Oct 2024 11:42:40 +0200 Subject: [PATCH 11/11] WezTerm.app/Contents/Info.plist: request network permissions On MacOS 15 (Sequoia) and later, Wezterm.app should ask for a LocalNetwork entitlement by default. This fixes mysterious network failures (eg: 'no route to host') when: - Wezterm is a toplevel process (ie: not a child of a process that already has LocalNetwork entitlement, like Terminal) - A shell running inside Wezterm executes a process which accesses the network, but does not itself already have a LocalNetwork entitlement, eg: /etc/profiles/per-user/$(whoami)/bin/ssh for ssh installed by nix home-manager. Signed-off-by: Sirio Balmelli --- assets/macos/WezTerm.app/Contents/Info.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/macos/WezTerm.app/Contents/Info.plist b/assets/macos/WezTerm.app/Contents/Info.plist index fee5020cc82..36ff95b4cfb 100644 --- a/assets/macos/WezTerm.app/Contents/Info.plist +++ b/assets/macos/WezTerm.app/Contents/Info.plist @@ -60,6 +60,8 @@ An application launched via WezTerm would like to access your Downloads folder. NSSystemAdministrationUsageDescription An application launched via WezTerm requires elevated permission. + NSLocalNetworkUsageDescription + An application launched via WezTerm would like to access the local network. CFBundleDocumentTypes