mirror of
https://github.com/terrapkg/packages.git
synced 2026-06-13 15:10:37 +00:00
Compare commits
22 Commits
f38
...
p/rustdesk
| Author | SHA1 | Date | |
|---|---|---|---|
| a42d1b8892 | |||
| eb206aede2 | |||
| 1dbe7b2f08 | |||
| 16db6e4603 | |||
| c9759df23b | |||
| 247d2cf88c | |||
| 09d9f61ae9 | |||
| 283914c2a3 | |||
| c1508b7e34 | |||
| 240daf4bb7 | |||
| 75f598918d | |||
| 9c83a0b3c9 | |||
| b7f0f01b25 | |||
| 841a7dec99 | |||
| d8da0ba726 | |||
| f4301a93e6 | |||
| 9b460cb0ec | |||
| b0429a6fcc | |||
| 189563adbf | |||
| f3760d0ecc | |||
| a6d81ba1ed | |||
| 0b20f0bf6d |
@@ -0,0 +1,5 @@
|
|||||||
|
project pkg {
|
||||||
|
rpm {
|
||||||
|
spec = "rustdesk-selinux.spec"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
# vim: sw=4:ts=4:et
|
||||||
|
# Rustdesk will be added later, but for now this supplements the
|
||||||
|
# external rustdesk package
|
||||||
|
|
||||||
|
%define relabel_files() \
|
||||||
|
restorecon -R /usr/lib/rustdesk/rustdesk; \
|
||||||
|
|
||||||
|
%define selinux_policyver 38.28-1
|
||||||
|
|
||||||
|
Name: rustdesk-selinux
|
||||||
|
Version: 1.0
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: SELinux policy module for rustdesk
|
||||||
|
|
||||||
|
Group: System Environment/Base
|
||||||
|
License: GPLv2+
|
||||||
|
URL: http://rustdesk.com
|
||||||
|
Source0: rustdesk.te
|
||||||
|
|
||||||
|
Requires: policycoreutils, libselinux-utils
|
||||||
|
BuildRequires: policycoreutils, libselinux-utils, checkpolicy
|
||||||
|
Supplements: rustdesk
|
||||||
|
Enhances: rustdesk
|
||||||
|
Requires(post): selinux-policy-base >= %{selinux_policyver}, policycoreutils
|
||||||
|
Requires(postun): policycoreutils
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package installs and sets up the SELinux policy security module for rustdesk.
|
||||||
|
|
||||||
|
%build
|
||||||
|
checkmodule -M -m -o rustdesk.mod %{SOURCE0}
|
||||||
|
semodule_package -o rustdesk.pp -m rustdesk.mod
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -d %{buildroot}%{_datadir}/selinux/packages
|
||||||
|
install -m 644 rustdesk.pp %{buildroot}%{_datadir}/selinux/packages
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%post
|
||||||
|
semodule -n -i %{_datadir}/selinux/packages/rustdesk.pp
|
||||||
|
if /usr/sbin/selinuxenabled ; then
|
||||||
|
/usr/sbin/load_policy
|
||||||
|
%relabel_files
|
||||||
|
|
||||||
|
fi;
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%postun
|
||||||
|
if [ $1 -eq 0 ]; then
|
||||||
|
semodule -n -r rustdesk
|
||||||
|
if /usr/sbin/selinuxenabled ; then
|
||||||
|
/usr/sbin/load_policy
|
||||||
|
%relabel_files
|
||||||
|
|
||||||
|
fi;
|
||||||
|
fi;
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
%files
|
||||||
|
%attr(0600,root,root) %{_datadir}/selinux/packages/rustdesk.pp
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sun Oct 1 2023 Cappy Ishihara <cappy@fyralabs.com> 1.0-1
|
||||||
|
- Initial version
|
||||||
|
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
module rustdesk 1.0;
|
||||||
|
|
||||||
|
require {
|
||||||
|
type xdm_t;
|
||||||
|
type sudo_exec_t;
|
||||||
|
type cache_home_t;
|
||||||
|
type chronyc_t;
|
||||||
|
type xserver_misc_device_t;
|
||||||
|
type xserver_t;
|
||||||
|
type chronyd_restricted_t;
|
||||||
|
type device_t;
|
||||||
|
type unreserved_port_t;
|
||||||
|
type xserver_port_t;
|
||||||
|
type event_device_t;
|
||||||
|
type init_t;
|
||||||
|
type speech_dispatcher_t;
|
||||||
|
class capability dac_override;
|
||||||
|
class dir create;
|
||||||
|
class unix_dgram_socket sendto;
|
||||||
|
class unix_stream_socket connectto;
|
||||||
|
class tcp_socket name_connect;
|
||||||
|
class chr_file { getattr open read write };
|
||||||
|
class file execute;
|
||||||
|
}
|
||||||
|
|
||||||
|
#============= chronyc_t ==============
|
||||||
|
allow chronyc_t chronyd_restricted_t:unix_dgram_socket sendto;
|
||||||
|
|
||||||
|
#============= init_t ==============
|
||||||
|
allow init_t event_device_t:chr_file open;
|
||||||
|
allow init_t sudo_exec_t:file execute;
|
||||||
|
|
||||||
|
#!!!! This avc can be allowed using the boolean 'nis_enabled'
|
||||||
|
allow init_t unreserved_port_t:tcp_socket name_connect;
|
||||||
|
allow init_t xserver_misc_device_t:chr_file { read write };
|
||||||
|
allow init_t xserver_port_t:tcp_socket name_connect;
|
||||||
|
allow init_t xserver_t:unix_stream_socket connectto;
|
||||||
|
|
||||||
|
#============= speech_dispatcher_t ==============
|
||||||
|
allow speech_dispatcher_t cache_home_t:dir create;
|
||||||
|
allow speech_dispatcher_t self:capability dac_override;
|
||||||
|
|
||||||
|
#============= xdm_t ==============
|
||||||
|
allow xdm_t device_t:chr_file getattr;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
project pkg {
|
||||||
|
rpm {
|
||||||
|
spec = "rustdesk.spec"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
|
index be7e2aef..1f0c1eac 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -17,7 +17,7 @@ travis-ci = { repository = "1wilkens/pam" }
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
libc = "^0.2"
|
||||||
|
-pam-sys = "^0.5"
|
||||||
|
+pam-sys = { version = "1.0.0-alpha4", path = "./pam-sys" }
|
||||||
|
users = "^0.8"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
From df8080b8b813f33963e8a169f157bff1607d54f4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Johnson <davidjohnson@rivosinc.com>
|
||||||
|
Date: Tue, 5 Sep 2023 10:29:20 -0700
|
||||||
|
Subject: [PATCH] Added __gnuc_va_list to the list of blocked types since this
|
||||||
|
type exists on at least some Linux platforms, and prevents pam-sys from
|
||||||
|
compiling without this exclusion.
|
||||||
|
|
||||||
|
---
|
||||||
|
build.rs | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/build.rs b/build.rs
|
||||||
|
index 7ac5cf3..cf44cde 100644
|
||||||
|
--- a/build.rs
|
||||||
|
+++ b/build.rs
|
||||||
|
@@ -29,6 +29,7 @@ fn main() {
|
||||||
|
.blocklist_type("va_list")
|
||||||
|
.blocklist_type("__va_list")
|
||||||
|
.blocklist_type("__builtin_va_list")
|
||||||
|
+ .blocklist_type("__gnuc_va_list")
|
||||||
|
.blocklist_type("__va_list_tag")
|
||||||
|
.blocklist_function("pam_v.*")
|
||||||
|
.blocklist_function("pam_syslog")
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
|
index 9e8224fc..8fbbe54c 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -127,7 +127,7 @@ mouce = { git="https://github.com/fufesou/mouce.git" }
|
||||||
|
evdev = { git="https://github.com/fufesou/evdev" }
|
||||||
|
dbus = "0.9"
|
||||||
|
dbus-crossroads = "0.5"
|
||||||
|
-pam = { git="https://github.com/fufesou/pam", optional = true }
|
||||||
|
+pam = { path = "./pam", optional = true }
|
||||||
|
users = { version = "0.11" }
|
||||||
|
|
||||||
|
[target.'cfg(target_os = "android")'.dependencies]
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
#global pamsys_ver v1.0.0-alpha5
|
||||||
|
#global pamsys 1.0.0-alpha5
|
||||||
|
#global pam_ver v0.7.0
|
||||||
|
#global pam 0.7.0
|
||||||
|
|
||||||
|
%ifarch x86_64
|
||||||
|
%global scarch x64
|
||||||
|
%else
|
||||||
|
%ifarch aarch64
|
||||||
|
%global scarch arm64
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: rustdesk
|
||||||
|
Version: 1.2.3
|
||||||
|
Release: 1%{?dist}
|
||||||
|
Summary: An open-source remote desktop, and alternative to TeamViewer.
|
||||||
|
|
||||||
|
Group: System Environment/Base
|
||||||
|
License: GPLv2+
|
||||||
|
URL: http://rustdesk.com
|
||||||
|
Source0: https://github.com/rustdesk/rustdesk/archive/refs/tags/%{version}.tar.gz
|
||||||
|
Source1: https://github.com/c-smile/sciter-sdk/raw/master/bin.lnx/%{scarch}/libsciter-gtk.so
|
||||||
|
%dnl Source2: https://github.com/fufesou/pam/archive/refs/tags/%{pam_ver}.tar.gz
|
||||||
|
%dnl Source3: https://github.com/1wilkens/pam-sys/archive/refs/tags/%{pamsys_ver}.tar.gz
|
||||||
|
%dnl Patch0: pam-deps.diff
|
||||||
|
%dnl Patch1: pam-sys-build.patch
|
||||||
|
%dnl Patch2: rustdesk-deps.diff
|
||||||
|
|
||||||
|
BuildRequires: rust-packaging anda-srpm-macros gcc-c++ git curl wget nasm yasm gcc gtk3-devel clang libxcb-devel libxdo-devel libXfixes-devel pulseaudio-libs-devel cmake alsa-lib-devel
|
||||||
|
BuildRequires: gstreamer1-devel rust-gstreamer-devel pkgconfig(gstreamer-app-1.0)
|
||||||
|
BuildRequires: libvpx-devel opus-devel libyuv-devel libaom-devel pam-devel clang-devel
|
||||||
|
Requires: gtk3 libxcb libxdo libXfixes alsa-lib libappindicator libvdpau1 libva2 pam gstreamer1-plugins-base
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
The best open-source remote desktop client software, written in Rust.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n rustdesk-%version
|
||||||
|
%{dnl:
|
||||||
|
%patch 2 -p1
|
||||||
|
tar xf %SOURCE2
|
||||||
|
mv pam-%pam pam
|
||||||
|
cd pam
|
||||||
|
git apply %PATCH0
|
||||||
|
tar xf %SOURCE3
|
||||||
|
mv pam-sys-%pamsys pam-sys
|
||||||
|
cd pam-sys
|
||||||
|
git apply %PATCH1
|
||||||
|
cd ../..
|
||||||
|
}
|
||||||
|
%cargo_prep_online
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cargo_build -a
|
||||||
|
%global __python %{__python3}
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cargo_install -a
|
||||||
|
mkdir -p %buildroot/usr/lib/rustdesk/
|
||||||
|
mkdir -p %buildroot%_datadir/rustdesk/files/
|
||||||
|
mkdir -p %buildroot%_datadir/icons/hicolor/{256x256,scalable}/apps/
|
||||||
|
install %SOURCE1 %buildroot/usr/lib/rustdesk/libsciter-gtk.so
|
||||||
|
install res/rustdesk.service %buildroot%_datadir/rustdesk/files/
|
||||||
|
install res/128x128@2x.png %buildroot%_datadir/icons/hicolor/256x256/apps/rustdesk.png
|
||||||
|
install res/scalable.svg %buildroot%_datadir/icons/hicolor/scalable/apps/rustdesk.svg
|
||||||
|
install res/rustdesk.desktop %buildroot%_datadir/rustdesk/files/
|
||||||
|
install res/rustdesk-link.desktop %buildroot%_datadir/rustdesk/files/
|
||||||
|
install -d %buildroot%_datadir/applications/
|
||||||
|
install res/rustdesk.desktop %buildroot%_datadir/applications/
|
||||||
|
install res/rustdesk-link.desktop %buildroot%_datadir/applications/
|
||||||
|
install -d %buildroot%_unitdir
|
||||||
|
install res/rustdesk.service %buildroot%_unitdir/rustdesk.service
|
||||||
|
|
||||||
|
%files
|
||||||
|
%_bindir/rustdesk
|
||||||
|
%_bindir/naming
|
||||||
|
/usr/lib/rustdesk/libsciter-gtk.so
|
||||||
|
%_datadir/rustdesk/files/rustdesk.service
|
||||||
|
%_datadir/icons/hicolor/256x256/apps/rustdesk.png
|
||||||
|
%_datadir/icons/hicolor/scalable/apps/rustdesk.svg
|
||||||
|
%_datadir/rustdesk/files/rustdesk.desktop
|
||||||
|
%_datadir/rustdesk/files/rustdesk-link.desktop
|
||||||
|
|
||||||
|
%_datadir/applications/rustdesk.desktop
|
||||||
|
%_datadir/applications/rustdesk-link.desktop
|
||||||
|
%_unitdir/rustdesk.service
|
||||||
|
|
||||||
|
|
||||||
|
%pre
|
||||||
|
# can do something for centos7
|
||||||
|
case "$1" in
|
||||||
|
1)
|
||||||
|
# for install
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
# for upgrade
|
||||||
|
systemctl stop rustdesk || true
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
%post
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable rustdesk
|
||||||
|
systemctl start rustdesk
|
||||||
|
update-desktop-database
|
||||||
|
|
||||||
|
%preun
|
||||||
|
case "$1" in
|
||||||
|
0)
|
||||||
|
# for uninstall
|
||||||
|
systemctl stop rustdesk || true
|
||||||
|
systemctl disable rustdesk || true
|
||||||
|
;;
|
||||||
|
1)
|
||||||
|
# for upgrade
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
%postun
|
||||||
|
case "$1" in
|
||||||
|
0)
|
||||||
|
# for uninstall
|
||||||
|
update-desktop-database
|
||||||
|
;;
|
||||||
|
1)
|
||||||
|
# for upgrade
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
%autochangelog
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
rpm.version(gh("rustdesk/rustdesk"));
|
||||||
Reference in New Issue
Block a user