Skip to content

Commit

Permalink
rustdesk: update to 1.1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
hadfl committed Feb 23, 2025
1 parent 6d7e008 commit a8103d5
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 16 deletions.
8 changes: 5 additions & 3 deletions build/rustdesk-server/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# http://www.illumos.org/license/CDDL.
# }}}

# Copyright 2024 OmniOS Community Edition (OmniOSce) Association.
# Copyright 2025 OmniOS Community Edition (OmniOSce) Association.

. ../../lib/build.sh

PROG=rustdesk-server
VER=1.1.12
VER=1.1.14
PKG=ooce/application/rustdesk-server
SUMMARY="$PROG - remote control"
DESC="Full-featured open source remote control alternative for self-hosting "
Expand Down Expand Up @@ -51,7 +51,9 @@ pre_build() {
}

init
download_source $PROG $VER
clone_github_source $PROG "$GITHUB/rustdesk/$PROG" $VER
append_builddir $PROG
run_inbuild $GIT submodule update --init --recursive
patch_source
prep_build
SODIUM_USE_PKG_CONFIG=1 build_rust
Expand Down
48 changes: 48 additions & 0 deletions build/rustdesk-server/patches/0001-add-illumos-support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From 073bae1e73f31f0f5a6acb6903cd88136dd1f41c Mon Sep 17 00:00:00 2001
From: Dominik Hassler <hadfl@omnios.org>
Date: Sat, 22 Feb 2025 19:16:00 +0000
Subject: [PATCH] add illumos support

diff -wpruN --no-dereference '--exclude=*.orig' a~/libs/hbb_common/src/tcp.rs a/libs/hbb_common/src/tcp.rs
--- a~/libs/hbb_common/src/tcp.rs 1970-01-01 00:00:00
+++ a/libs/hbb_common/src/tcp.rs 1970-01-01 00:00:00
@@ -68,10 +68,11 @@ pub(crate) fn new_socket(addr: std::net:
std::net::SocketAddr::V6(..) => TcpSocket::new_v6()?,
};
if reuse {
- // windows has no reuse_port, but it's reuse_address
+ // windows has no reuse_port, but its reuse_address
// almost equals to unix's reuse_port + reuse_address,
// though may introduce nondeterministic behavior
- #[cfg(unix)]
+ // illumos has no support for SO_REUSEPORT
+ #[cfg(all(unix, not(target_os = "illumos")))]
socket.set_reuseport(true).ok();
socket.set_reuseaddr(true).ok();
}
@@ -226,6 +227,8 @@ pub async fn listen_any(port: u16) -> Re
if let Ok(mut socket) = TcpSocket::new_v6() {
#[cfg(unix)]
{
+ // illumos has no support for SO_REUSEPORT
+ #[cfg(not(target_os = "illumos"))]
socket.set_reuseport(true).ok();
socket.set_reuseaddr(true).ok();
use std::os::unix::io::{FromRawFd, IntoRawFd};
diff -wpruN --no-dereference '--exclude=*.orig' a~/libs/hbb_common/src/udp.rs a/libs/hbb_common/src/udp.rs
--- a~/libs/hbb_common/src/udp.rs 1970-01-01 00:00:00
+++ a/libs/hbb_common/src/udp.rs 1970-01-01 00:00:00
@@ -20,10 +20,11 @@ fn new_socket(addr: SocketAddr, reuse: b
SocketAddr::V6(..) => Socket::new(Domain::ipv6(), Type::dgram(), None),
}?;
if reuse {
- // windows has no reuse_port, but it's reuse_address
+ // windows has no reuse_port, but its reuse_address
// almost equals to unix's reuse_port + reuse_address,
// though may introduce nondeterministic behavior
- #[cfg(unix)]
+ // illumos has no support for SO_REUSEPORT
+ #[cfg(all(unix, not(target_os = "illumos")))]
socket.set_reuse_port(true).ok();
socket.set_reuse_address(true).ok();
}
24 changes: 12 additions & 12 deletions build/rustdesk-server/patches/illumos.patch
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@ diff -wpruN --no-dereference '--exclude=*.orig' a~/Cargo.toml a/Cargo.toml
+dns-lookup = "2.0.4"
ping = "0.4.0"

[build-dependencies]
@@ -58,3 +58,6 @@ hbb_common = { path = "libs/hbb_common"
[workspace]
members = ["libs/hbb_common"]
exclude = ["ui"]
[target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies]
@@ -75,3 +75,6 @@ panic = 'abort'
strip = true
#opt-level = 'z' # only have smaller size after strip # Default is 3, better performance
#rpath = true # Not needed
+
+[patch.crates-io]
+machine-uid = { git = "https://github.com/hadfl/machine-uid.git", branch = "illumos" }
diff -wpruN --no-dereference '--exclude=*.orig' a~/libs/hbb_common/Cargo.toml a/libs/hbb_common/Cargo.toml
--- a~/libs/hbb_common/Cargo.toml 1970-01-01 00:00:00
+++ a/libs/hbb_common/Cargo.toml 1970-01-01 00:00:00
@@ -34,7 +34,7 @@ chrono = "0.4"

@@ -48,7 +48,7 @@ sha2 = "0.10"
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
mac_address = "1.1"
-machine-uid = "0.2"
+machine-uid = "0.5.1"

[features]
quic = []
default_net = { git = "https://github.com/rustdesk-org/default_net" }
-machine-uid = { git = "https://github.com/rustdesk-org/machine-uid" }
+machine-uid = { git = "https://github.com/hadfl/machine-uid.git", branch = "illumos" }
[target.'cfg(not(any(target_os = "macos", target_os = "windows")))'.dependencies]
tokio-rustls = { version = "0.26", features = ["logging", "tls12", "ring"], default-features = false }
rustls-platform-verifier = "0.3.1"
1 change: 1 addition & 0 deletions build/rustdesk-server/patches/series
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
illumos.patch
0001-add-illumos-support.patch
2 changes: 1 addition & 1 deletion doc/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
| ooce/application/php-83 | 8.3.17 | https://www.php.net/downloads.php | [omniosorg](https://github.com/omniosorg)
| ooce/application/php-84 | 8.4.4 | https://www.php.net/downloads.php | [omniosorg](https://github.com/omniosorg)
| ooce/application/php-XX/imagick | 3.7.0 | https://github.com/Imagick/imagick/tags | [omniosorg](https://github.com/omniosorg)
| ooce/application/rustdesk-server | 1.1.12 | https://github.com/rustdesk/rustdesk-server/releases | [omniosorg](https://github.com/omniosorg)
| ooce/application/rustdesk-server | 1.1.14 | https://github.com/rustdesk/rustdesk-server/releases | [omniosorg](https://github.com/omniosorg)
| ooce/application/texlive | 20240312 | https://pi.kwarc.info/historic/systems/texlive/2024/ | [omniosorg](https://github.com/omniosorg)
| ooce/application/tidy | 5.8.0 | https://github.com/htacg/tidy-html5/releases | [omniosorg](https://github.com/omniosorg)
| ooce/application/tig | 2.5.10 | https://github.com/jonas/tig/releases | [omniosorg](https://github.com/omniosorg)
Expand Down

0 comments on commit a8103d5

Please sign in to comment.