* [gentoo-commits] repo/proj/guru:dev commit in: app-misc/zellij/, app-misc/zellij/files/
@ 2022-03-17 9:42 Alessandro Barbieri
0 siblings, 0 replies; only message in thread
From: Alessandro Barbieri @ 2022-03-17 9:42 UTC (permalink / raw
To: gentoo-commits
commit: 52e0eee766053d6b2a3b19168a9b94f9b16ff72d
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Thu Mar 17 09:42:13 2022 +0000
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu Mar 17 09:42:13 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=52e0eee7
app-misc/zellij: update patch
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
.../files/{1226.patch => zellij-PR-1226.patch} | 89 ++++++++++++++--------
app-misc/zellij/zellij-0.26.1.ebuild | 2 +-
2 files changed, 57 insertions(+), 34 deletions(-)
diff --git a/app-misc/zellij/files/1226.patch b/app-misc/zellij/files/zellij-PR-1226.patch
similarity index 71%
rename from app-misc/zellij/files/1226.patch
rename to app-misc/zellij/files/zellij-PR-1226.patch
index 497c01c9e..862903ca4 100644
--- a/app-misc/zellij/files/1226.patch
+++ b/app-misc/zellij/files/zellij-PR-1226.patch
@@ -1,7 +1,7 @@
From 22cff5439ca33c0beafd6a77c160959dff7fddf7 Mon Sep 17 00:00:00 2001
From: a-kenji <aks.kenji@protonmail.com>
Date: Wed, 16 Mar 2022 21:49:41 +0100
-Subject: [PATCH 1/3] fix(feat): `disable_automatic_asset_installation`
+Subject: [PATCH 1/4] fix(feat): `disable_automatic_asset_installation`
This fixes a regression in the feature system:
The asset installation didn't get turned off by the feature.
@@ -20,16 +20,6 @@ Alternative:
normal asset installation.
fixes #1130
----
- Cargo.toml | 2 +-
- src/commands.rs | 1 -
- src/install.rs | 14 +++++++++++---
- zellij-server/src/wasm_vm.rs | 4 +++-
- zellij-utils/Cargo.toml | 2 ++
- 5 files changed, 17 insertions(+), 6 deletions(-)
-
-diff --git a/Cargo.toml b/Cargo.toml
-index 78457fdcb..e522a11f1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -64,4 +64,4 @@ bin-dir = "{ bin }{ binary-ext }"
@@ -38,8 +28,6 @@ index 78457fdcb..e522a11f1 100644
[features]
-disable_automatic_asset_installation = []
+disable_automatic_asset_installation = [ "zellij-utils/disable_automatic_asset_installation" ]
-diff --git a/src/commands.rs b/src/commands.rs
-index 542741343..cfbcb8f08 100644
--- a/src/commands.rs
+++ b/src/commands.rs
@@ -89,7 +89,6 @@ fn create_new_client() -> ClientInfo {
@@ -50,8 +38,6 @@ index 542741343..cfbcb8f08 100644
populate_data_dir(&data_dir);
}
-diff --git a/src/install.rs b/src/install.rs
-index e7778dde2..3ba682e75 100644
--- a/src/install.rs
+++ b/src/install.rs
@@ -1,7 +1,10 @@
@@ -91,8 +77,6 @@ index e7778dde2..3ba682e75 100644
+
+#[cfg(feature = "disable_automatic_asset_installation")]
+pub(crate) fn populate_data_dir(_data_dir: &Path) {}
-diff --git a/zellij-server/src/wasm_vm.rs b/zellij-server/src/wasm_vm.rs
-index ebea0b8c9..68867fd7d 100644
--- a/zellij-server/src/wasm_vm.rs
+++ b/zellij-server/src/wasm_vm.rs
@@ -92,7 +92,9 @@ pub(crate) fn wasm_thread_main(
@@ -106,8 +90,6 @@ index ebea0b8c9..68867fd7d 100644
loop {
let (event, mut err_ctx) = bus.recv().expect("failed to receive event on channel");
-diff --git a/zellij-utils/Cargo.toml b/zellij-utils/Cargo.toml
-index 4e837f5a1..1e3223dd9 100644
--- a/zellij-utils/Cargo.toml
+++ b/zellij-utils/Cargo.toml
@@ -46,3 +46,5 @@ features = ["unstable"]
@@ -120,14 +102,8 @@ index 4e837f5a1..1e3223dd9 100644
From e4cc8bc1e6b029ba7c61b12b60fc2916bd181157 Mon Sep 17 00:00:00 2001
From: a-kenji <aks.kenji@protonmail.com>
Date: Thu, 17 Mar 2022 08:13:08 +0100
-Subject: [PATCH 2/3] fixup: make assets installation more robust
-
----
- src/install.rs | 17 +++++++++++------
- 1 file changed, 11 insertions(+), 6 deletions(-)
+Subject: [PATCH 2/4] fixup: make assets installation more robust
-diff --git a/src/install.rs b/src/install.rs
-index 3ba682e75..047c23707 100644
--- a/src/install.rs
+++ b/src/install.rs
@@ -32,12 +32,17 @@ pub(crate) fn populate_data_dir(data_dir: &Path) {
@@ -158,15 +134,9 @@ index 3ba682e75..047c23707 100644
From 3506ca50de0ab5443479011e44f750845f6bf5e1 Mon Sep 17 00:00:00 2001
From: a-kenji <aks.kenji@protonmail.com>
Date: Thu, 17 Mar 2022 08:22:09 +0100
-Subject: [PATCH 3/3] fix(feat): disable `mkdir` in `wasm_vm`
+Subject: [PATCH 3/4] fix(feat): disable `mkdir` in `wasm_vm`
disable `mkdir` in `wasm_vm` on `feature-disable-asset-installation`
----
- zellij-server/src/wasm_vm.rs | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/zellij-server/src/wasm_vm.rs b/zellij-server/src/wasm_vm.rs
-index 68867fd7d..d4796a3a7 100644
--- a/zellij-server/src/wasm_vm.rs
+++ b/zellij-server/src/wasm_vm.rs
@@ -272,7 +272,14 @@ fn start_plugin(
@@ -185,3 +155,56 @@ index 68867fd7d..d4796a3a7 100644
let mut wasi_env = WasiState::new("Zellij")
.env("CLICOLOR_FORCE", "1")
+
+From be35cf5731aa786cbac85491f260321be3953a88 Mon Sep 17 00:00:00 2001
+From: a-kenji <aks.kenji@protonmail.com>
+Date: Thu, 17 Mar 2022 10:25:15 +0100
+Subject: [PATCH 4/4] fixup! Use `cache_directory` for plugin hashes
+
+Use `cache_directory` rather than the `plugin_directory`
+for plugin hashes.
+--- /dev/null
++++ b/update-toolchain.sh
+@@ -0,0 +1,11 @@
++#!/usr/bin/env bash
++set -euxo pipefail
++
++get_latest_release() {
++ curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
++ grep '"tag_name":'
++ #| # Get tag line
++ #sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
++}
++
++get_latest_release "$1"
+--- a/zellij-server/src/wasm_vm.rs
++++ b/zellij-server/src/wasm_vm.rs
+@@ -29,7 +29,7 @@ use crate::{
+ };
+
+ use zellij_utils::{
+- consts::{VERSION, ZELLIJ_PROJ_DIR, ZELLIJ_TMP_DIR},
++ consts::{VERSION, ZELLIJ_PROJ_DIR, ZELLIJ_TMP_DIR, ZELLIJ_CACHE_DIR},
+ errors::{ContextType, PluginContext},
+ };
+ use zellij_utils::{
+@@ -271,8 +271,7 @@ fn start_plugin(
+ let output = Pipe::new();
+ let input = Pipe::new();
+ let stderr = LoggingPipe::new(&plugin.location.to_string(), plugin_id);
+- let plugin_own_data_dir = plugin_global_data_dir.join(Url::from(&plugin.location).to_string());
+- #[cfg(not(feature = "disable_automatic_asset_installation"))]
++ let plugin_own_data_dir = ZELLIJ_CACHE_DIR.join(Url::from(&plugin.location).to_string());
+ fs::create_dir_all(&plugin_own_data_dir).unwrap_or_else(|e| {
+ log::error!(
+ "Could not create plugin_own_data_dir in {:?} \n Error: {:?}",
+--- a/zellij-utils/src/consts.rs
++++ b/zellij-utils/src/consts.rs
+@@ -53,6 +53,7 @@ lazy_static! {
+ pub static ref ZELLIJ_TMP_DIR: PathBuf = PathBuf::from(format!("/tmp/zellij-{}", *UID));
+ pub static ref ZELLIJ_TMP_LOG_DIR: PathBuf = ZELLIJ_TMP_DIR.join("zellij-log");
+ pub static ref ZELLIJ_TMP_LOG_FILE: PathBuf = ZELLIJ_TMP_LOG_DIR.join("zellij.log");
++ pub static ref ZELLIJ_CACHE_DIR: PathBuf = ZELLIJ_PROJ_DIR.cache_dir().to_path_buf();
+ }
+
+ pub const FEATURES: &[&str] = &[
diff --git a/app-misc/zellij/zellij-0.26.1.ebuild b/app-misc/zellij/zellij-0.26.1.ebuild
index ad17763b6..759b6b3dd 100644
--- a/app-misc/zellij/zellij-0.26.1.ebuild
+++ b/app-misc/zellij/zellij-0.26.1.ebuild
@@ -324,7 +324,7 @@ BDEPEND="
QA_FLAGS_IGNORED="usr/bin/zellij"
-PATCHES=( "${FILESDIR}/1226.patch" )
+PATCHES=( "${FILESDIR}/${PN}-PR-1226.patch" )
src_configure() {
local myfeatures=(
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-17 9:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-17 9:42 [gentoo-commits] repo/proj/guru:dev commit in: app-misc/zellij/, app-misc/zellij/files/ Alessandro Barbieri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox