From 19ba339200d90c74a8f65278cfa0947aa94aff2b Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Fri, 18 Feb 2022 19:14:04 +0100 Subject: [PATCH] locustdb: update rustyline dependency instead of patching it and nix rusyline 4.0.0 seem to work (latest version, 9.1.2, fails due to other dependencies (rustix and clip and perhaps others). --- packages/locustdb/Cargo.toml.patch | 11 +++++++ packages/locustdb/build.sh | 12 -------- packages/locustdb/nix-0.5.1-errno.diff | 18 ------------ packages/locustdb/nix-0.5.1-sched.diff | 20 ------------- packages/locustdb/nix-0.5.1-termios.diff | 31 -------------------- packages/locustdb/rustyline-1.0.0-ioctl.diff | 15 ---------- 6 files changed, 11 insertions(+), 96 deletions(-) create mode 100644 packages/locustdb/Cargo.toml.patch delete mode 100644 packages/locustdb/nix-0.5.1-errno.diff delete mode 100644 packages/locustdb/nix-0.5.1-sched.diff delete mode 100644 packages/locustdb/nix-0.5.1-termios.diff delete mode 100644 packages/locustdb/rustyline-1.0.0-ioctl.diff diff --git a/packages/locustdb/Cargo.toml.patch b/packages/locustdb/Cargo.toml.patch new file mode 100644 index 000000000..55c7efd23 --- /dev/null +++ b/packages/locustdb/Cargo.toml.patch @@ -0,0 +1,11 @@ +--- ../Cargo.toml.orig 2022-02-18 18:05:37.225538565 +0000 ++++ ./Cargo.toml 2022-02-18 18:05:47.435482830 +0000 +@@ -33,7 +33,7 @@ + rand = "0.5.5" + regex = "1" + rust-crypto = "0.2.36" +-rustyline = "1.0.0" ++rustyline = "4.0.0" + scoped_threadpool = "0.1.9" + seahash = "3.0.5" + std-semaphore = "0.1.0" diff --git a/packages/locustdb/build.sh b/packages/locustdb/build.sh index ae09a928a..962a19aa6 100644 --- a/packages/locustdb/build.sh +++ b/packages/locustdb/build.sh @@ -21,18 +21,6 @@ TERMUX_PKG_BLACKLISTED_ARCHES="arm, i686" termux_step_make() { termux_setup_rust - : "${CARGO_HOME:=$HOME/.cargo}" - export CARGO_HOME - - cargo fetch --target $CARGO_TARGET_NAME - for p in errno sched termios; do - patch --silent -p1 \ - -d $CARGO_HOME/registry/src/github.com-*/nix-0.5.1 \ - < $TERMUX_PKG_BUILDER_DIR/nix-0.5.1-${p}.diff - done - patch --silent -p1 \ - -d $CARGO_HOME/registry/src/github.com-*/rustyline-1.0.0 \ - < $TERMUX_PKG_BUILDER_DIR/rustyline-1.0.0-ioctl.diff cargo build --jobs $TERMUX_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release } diff --git a/packages/locustdb/nix-0.5.1-errno.diff b/packages/locustdb/nix-0.5.1-errno.diff deleted file mode 100644 index 394f7a325..000000000 --- a/packages/locustdb/nix-0.5.1-errno.diff +++ /dev/null @@ -1,18 +0,0 @@ ---- a/src/errno.rs -+++ b/src/errno.rs -@@ -29,13 +29,13 @@ - __dfly_error() - } - --#[cfg(any(target_os = "openbsd", target_os = "netbsd"))] -+#[cfg(any(target_os = "openbsd", target_os = "netbsd", target_os = "android"))] - unsafe fn errno_location() -> *mut c_int { - extern { fn __errno() -> *mut c_int; } - __errno() - } - --#[cfg(any(target_os = "linux", target_os = "android"))] -+#[cfg(target_os = "linux")] - unsafe fn errno_location() -> *mut c_int { - extern { fn __errno_location() -> *mut c_int; } - __errno_location() diff --git a/packages/locustdb/nix-0.5.1-sched.diff b/packages/locustdb/nix-0.5.1-sched.diff deleted file mode 100644 index eda53abe5..000000000 --- a/packages/locustdb/nix-0.5.1-sched.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/sched.rs -+++ b/src/sched.rs -@@ -36,7 +36,7 @@ - } - - // Support a maximum CPU set of 1024 nodes --#[cfg(all(target_arch = "x86_64", target_os = "linux"))] -+#[cfg(all(target_arch = "x86_64", any(target_os = "linux", target_os = "android")))] - mod cpuset_attribs { - use super::CpuMask; - pub const CPU_SETSIZE: usize = 1024; -@@ -53,7 +53,7 @@ - } - } - --#[cfg(all(target_arch = "x86", target_os = "linux"))] -+#[cfg(all(target_arch = "x86", any(target_os = "linux", target_os = "android")))] - mod cpuset_attribs { - use super::CpuMask; - pub const CPU_SETSIZE: usize = 1024; diff --git a/packages/locustdb/nix-0.5.1-termios.diff b/packages/locustdb/nix-0.5.1-termios.diff deleted file mode 100644 index 54a495b58..000000000 --- a/packages/locustdb/nix-0.5.1-termios.diff +++ /dev/null @@ -1,31 +0,0 @@ ---- a/src/sys/termios.rs -+++ b/src/sys/termios.rs -@@ -11,7 +11,7 @@ - mod ffi { - pub use self::consts::*; - -- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "linux"))] -+ #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "linux", target_os = "android"))] - mod non_android { - use super::consts::*; - use libc::c_int; -@@ -35,9 +35,10 @@ - } - } - -- #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "linux"))] -+ #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd", target_os = "linux", target_os = "android"))] - pub use self::non_android::*; - -+ /* - // On Android before 5.0, Bionic directly inline these to ioctl() calls. - #[inline] - #[cfg(all(target_os = "android", not(target_arch = "mips")))] -@@ -92,6 +93,7 @@ - - #[cfg(target_os = "android")] - pub use self::android::*; -+ */ - - - #[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))] diff --git a/packages/locustdb/rustyline-1.0.0-ioctl.diff b/packages/locustdb/rustyline-1.0.0-ioctl.diff deleted file mode 100644 index 1f26d524a..000000000 --- a/packages/locustdb/rustyline-1.0.0-ioctl.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- a/src/tty/unix.rs -+++ b/src/tty/unix.rs -@@ -23,10 +23,10 @@ - #[cfg(any(target_os = "macos", target_os = "freebsd"))] - const TIOCGWINSZ: libc::c_ulong = 0x40087468; - --#[cfg(any(all(target_os = "linux", target_env = "gnu"), target_os = "android"))] -+#[cfg(all(target_os = "linux", target_env = "gnu"))] - const TIOCGWINSZ: libc::c_ulong = 0x5413; - --#[cfg(all(target_os = "linux", target_env = "musl"))] -+#[cfg(any(all(target_os = "linux", target_env = "musl"), target_os = "android"))] - const TIOCGWINSZ: libc::c_int = 0x5413; - - /// Try to get the number of columns in the current terminal,