ok to remove curl, because reqwest does not depend on openssl anymore, #4218
This commit is contained in:
parent
08446afc53
commit
e3ee957370
@ -7,7 +7,7 @@ arch=('x86_64')
|
|||||||
url=""
|
url=""
|
||||||
license=('AGPL-3.0')
|
license=('AGPL-3.0')
|
||||||
groups=()
|
groups=()
|
||||||
depends=('gtk3' 'xdotool' 'libxcb' 'libxfixes' 'alsa-lib' 'curl' 'libva' 'libvdpau' 'libappindicator-gtk3' 'pam' 'gst-plugins-base' 'gst-plugin-pipewire')
|
depends=('gtk3' 'xdotool' 'libxcb' 'libxfixes' 'alsa-lib' 'libva' 'libvdpau' 'libappindicator-gtk3' 'pam' 'gst-plugins-base' 'gst-plugin-pipewire')
|
||||||
makedepends=()
|
makedepends=()
|
||||||
checkdepends=()
|
checkdepends=()
|
||||||
optdepends=()
|
optdepends=()
|
||||||
|
@ -3,7 +3,7 @@ Version: 1.2.0
|
|||||||
Release: 0
|
Release: 0
|
||||||
Summary: RPM package
|
Summary: RPM package
|
||||||
License: GPL-3.0
|
License: GPL-3.0
|
||||||
Requires: gtk3 libxcb1 xdotool libXfixes3 alsa-utils curl libXtst6 libappindicator-gtk3 libvdpau1 libva2 pam gstreamer-plugins-base gstreamer-plugin-pipewire
|
Requires: gtk3 libxcb1 xdotool libXfixes3 alsa-utils libXtst6 libappindicator-gtk3 libvdpau1 libva2 pam gstreamer-plugins-base gstreamer-plugin-pipewire
|
||||||
Provides: libdesktop_drop_plugin.so()(64bit), libdesktop_multi_window_plugin.so()(64bit), libflutter_custom_cursor_plugin.so()(64bit), libflutter_linux_gtk.so()(64bit), libscreen_retriever_plugin.so()(64bit), libtray_manager_plugin.so()(64bit), liburl_launcher_linux_plugin.so()(64bit), libwindow_manager_plugin.so()(64bit), libwindow_size_plugin.so()(64bit), libtexture_rgba_renderer_plugin.so()(64bit)
|
Provides: libdesktop_drop_plugin.so()(64bit), libdesktop_multi_window_plugin.so()(64bit), libflutter_custom_cursor_plugin.so()(64bit), libflutter_linux_gtk.so()(64bit), libscreen_retriever_plugin.so()(64bit), libtray_manager_plugin.so()(64bit), liburl_launcher_linux_plugin.so()(64bit), libwindow_manager_plugin.so()(64bit), libwindow_size_plugin.so()(64bit), libtexture_rgba_renderer_plugin.so()(64bit)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
@ -3,7 +3,7 @@ Version: 1.2.0
|
|||||||
Release: 0
|
Release: 0
|
||||||
Summary: RPM package
|
Summary: RPM package
|
||||||
License: GPL-3.0
|
License: GPL-3.0
|
||||||
Requires: gtk3 libxcb libxdo libXfixes alsa-lib curl libappindicator-gtk3 libvdpau libva pam gstreamer1-plugins-base
|
Requires: gtk3 libxcb libxdo libXfixes alsa-lib libappindicator-gtk3 libvdpau libva pam gstreamer1-plugins-base
|
||||||
Provides: libdesktop_drop_plugin.so()(64bit), libdesktop_multi_window_plugin.so()(64bit), libflutter_custom_cursor_plugin.so()(64bit), libflutter_linux_gtk.so()(64bit), libscreen_retriever_plugin.so()(64bit), libtray_manager_plugin.so()(64bit), liburl_launcher_linux_plugin.so()(64bit), libwindow_manager_plugin.so()(64bit), libwindow_size_plugin.so()(64bit), libtexture_rgba_renderer_plugin.so()(64bit)
|
Provides: libdesktop_drop_plugin.so()(64bit), libdesktop_multi_window_plugin.so()(64bit), libflutter_custom_cursor_plugin.so()(64bit), libflutter_linux_gtk.so()(64bit), libscreen_retriever_plugin.so()(64bit), libtray_manager_plugin.so()(64bit), liburl_launcher_linux_plugin.so()(64bit), libwindow_manager_plugin.so()(64bit), libwindow_size_plugin.so()(64bit), libtexture_rgba_renderer_plugin.so()(64bit)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
@ -3,7 +3,7 @@ Version: 1.1.9
|
|||||||
Release: 0
|
Release: 0
|
||||||
Summary: RPM package
|
Summary: RPM package
|
||||||
License: GPL-3.0
|
License: GPL-3.0
|
||||||
Requires: gtk3 libxcb1 xdotool libXfixes3 alsa-utils curl libXtst6 libayatana-appindicator3-1 libvdpau1 libva2 pam gstreamer-plugins-base gstreamer-plugin-pipewire
|
Requires: gtk3 libxcb1 xdotool libXfixes3 alsa-utils libXtst6 libayatana-appindicator3-1 libvdpau1 libva2 pam gstreamer-plugins-base gstreamer-plugin-pipewire
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The best open-source remote desktop client software, written in Rust.
|
The best open-source remote desktop client software, written in Rust.
|
||||||
|
@ -3,7 +3,7 @@ Version: 1.2.0
|
|||||||
Release: 0
|
Release: 0
|
||||||
Summary: RPM package
|
Summary: RPM package
|
||||||
License: GPL-3.0
|
License: GPL-3.0
|
||||||
Requires: gtk3 libxcb libxdo libXfixes alsa-lib curl libappindicator libvdpau1 libva2 pam gstreamer1-plugins-base
|
Requires: gtk3 libxcb libxdo libXfixes alsa-lib libappindicator libvdpau1 libva2 pam gstreamer1-plugins-base
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The best open-source remote desktop client software, written in Rust.
|
The best open-source remote desktop client software, written in Rust.
|
||||||
|
@ -832,8 +832,6 @@ pub fn get_audit_server(api: String, custom: String, typ: String) -> String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn post_request(url: String, body: String, header: &str) -> ResultType<String> {
|
pub async fn post_request(url: String, body: String, header: &str) -> ResultType<String> {
|
||||||
#[cfg(not(target_os = "linux"))]
|
|
||||||
{
|
|
||||||
let mut req = reqwest::Client::new().post(url);
|
let mut req = reqwest::Client::new().post(url);
|
||||||
if !header.is_empty() {
|
if !header.is_empty() {
|
||||||
let tmp: Vec<&str> = header.split(": ").collect();
|
let tmp: Vec<&str> = header.split(": ").collect();
|
||||||
@ -845,35 +843,6 @@ pub async fn post_request(url: String, body: String, header: &str) -> ResultType
|
|||||||
let to = std::time::Duration::from_secs(12);
|
let to = std::time::Duration::from_secs(12);
|
||||||
Ok(req.body(body).timeout(to).send().await?.text().await?)
|
Ok(req.body(body).timeout(to).send().await?.text().await?)
|
||||||
}
|
}
|
||||||
#[cfg(target_os = "linux")]
|
|
||||||
{
|
|
||||||
let mut data = vec![
|
|
||||||
"-sS",
|
|
||||||
"-X",
|
|
||||||
"POST",
|
|
||||||
&url,
|
|
||||||
"-H",
|
|
||||||
"Content-Type: application/json",
|
|
||||||
"-d",
|
|
||||||
&body,
|
|
||||||
"--connect-timeout",
|
|
||||||
"12",
|
|
||||||
];
|
|
||||||
if !header.is_empty() {
|
|
||||||
data.push("-H");
|
|
||||||
data.push(header);
|
|
||||||
}
|
|
||||||
let output = async_process::Command::new("curl")
|
|
||||||
.args(&data)
|
|
||||||
.output()
|
|
||||||
.await?;
|
|
||||||
let res = String::from_utf8_lossy(&output.stdout).to_string();
|
|
||||||
if !res.is_empty() {
|
|
||||||
return Ok(res);
|
|
||||||
}
|
|
||||||
hbb_common::bail!(String::from_utf8_lossy(&output.stderr).to_string());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[tokio::main(flavor = "current_thread")]
|
#[tokio::main(flavor = "current_thread")]
|
||||||
pub async fn post_request_sync(url: String, body: String, header: &str) -> ResultType<String> {
|
pub async fn post_request_sync(url: String, body: String, header: &str) -> ResultType<String> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user