diff options
author | CoprDistGit <infra@openeuler.org> | 2023-07-25 02:58:31 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-07-25 02:58:31 +0000 |
commit | 902cc953e473c3551c743dec16a4092cd7a6390d (patch) | |
tree | 083a711f3ccb26c32ec88edb2757588b4e4155e7 | |
parent | cceb11264a2aaef5f380d60391d46923d892ad5e (diff) |
automatic import of xrdpopeneuler23.03openeuler22.03_LTS_SP2openeuler20.03
-rw-r--r-- | xrdp.logrotate | 7 | ||||
-rw-r--r-- | xrdp.polkit | 13 | ||||
-rw-r--r-- | xrdp.spec | 21 | ||||
-rw-r--r-- | xrdp.sysconfig | 5 |
4 files changed, 38 insertions, 8 deletions
diff --git a/xrdp.logrotate b/xrdp.logrotate new file mode 100644 index 0000000..d976cc6 --- /dev/null +++ b/xrdp.logrotate @@ -0,0 +1,7 @@ +/var/log/xrdp*.log { + missingok + notifempty + rotate 4 + weekly + create +} diff --git a/xrdp.polkit b/xrdp.polkit new file mode 100644 index 0000000..b4c987e --- /dev/null +++ b/xrdp.polkit @@ -0,0 +1,13 @@ +polkit.addRule(function(action, subject) { + if ((action.id == "org.freedesktop.color-manager.create-device" || + action.id == "org.freedesktop.color-manager.create-profile"|| + action.id == "org.freedesktop.color-manager.delete-device" || + action.id == "org.freedesktop.color-manager.delete-profile" || + action.id == "org.freedesktop.color-manager.modify-device" || + action.id == "org.freedesktop.color-manager.modify-profile" || + action.id == "org.freedesktop.packagekit.system-sources-refresh") && + subject.active == true) { + return polkit.Result.YES; + } + return polkit.Result.NOT_HANDLED; +}); @@ -7,8 +7,12 @@ URL: http://www.xrdp.org/ Source0: https://github.com/neutrinolabs/xrdp/releases/download/v%{version}/xrdp-%{version}.tar.gz Source1: https://github.com/neutrinolabs/xrdp/releases/download/v%{version}/xrdp-%{version}.tar.gz.asc # get the key from keyserver using: -# +# gpg --receive-keys 0x9F72CDBC01BF10EB +# gpg --export 9F72CDBC01BF10EB > 18AB838A907167745914871903993B4065E7193B.gpg Source2: 18AB838A907167745914871903993B4065E7193B.gpg +Source3: xrdp.sysconfig +Source4: xrdp.logrotate +Source5: xrdp.polkit BuildRequires: make BuildRequires: /usr/bin/gpg2 @@ -68,23 +72,21 @@ CFLAGS="$RPM_OPT_FLAGS %{?_missing_braces}" \ %install %make_install +%{__install} -Dp -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/xrdp +%{__install} -Dp -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/xrdp +%{__install} -Dp -m 644 %{SOURCE5} %{buildroot}%{_datadir}/polkit-1/rules.d/xrdp.rules %post -%{?ldconfig} %systemd_post xrdp.service %preun -%systemd_preun xrdp.service -if [ $1 -eq 0 ]; then - # Stop services on package removal (see bug 1349083) - systemctl stop xrdp.service > /dev/null 2>&1 || : -fi +systemctl stop xrdp.service > /dev/null 2>&1 || : %ldconfig_postun %posttrans if [ ! -s %{_sysconfdir}/xrdp/rsakeys.ini ]; then - (umask 377; %{_bindir}/xrdp-keygen xrdp %{_sysconfdir}/xrdp/rsakeys.ini &>/dev/null) + (umask 377; touch %{_sysconfdir}/xrdp/rsakeys.ini; %{_bindir}/xrdp-keygen xrdp %{_sysconfdir}/xrdp/rsakeys.ini &>/dev/null) fi %files @@ -95,6 +97,8 @@ fi %dir %{_datadir}/xrdp %config(noreplace) %{_sysconfdir}/xrdp/xrdp.ini %config(noreplace) %{_sysconfdir}/pam.d/xrdp-sesman +%config(noreplace) %{_sysconfdir}/logrotate.d/xrdp +%config(noreplace) %{_sysconfdir}/sysconfig/xrdp %config(noreplace) %{_sysconfdir}/xrdp/sesman.ini %config(noreplace) %{_sysconfdir}/xrdp/km*.ini %config(noreplace) %{_sysconfdir}/xrdp/xrdp_keyboard.ini @@ -118,6 +122,7 @@ fi %{_datadir}/xrdp/ad24b.bmp %{_datadir}/xrdp/xrdp24b.bmp %{_datadir}/xrdp/xrdp_logo.bmp +%{_datadir}/polkit-1/rules.d/xrdp.rules %{_mandir}/man5/* %{_mandir}/man8/* %{_mandir}/man1/* diff --git a/xrdp.sysconfig b/xrdp.sysconfig new file mode 100644 index 0000000..1988bea --- /dev/null +++ b/xrdp.sysconfig @@ -0,0 +1,5 @@ +#for xrdp.service +#XRDP_OPTIONS="" + +#for xrdp-sesman.service +#SESMAN_OPTIONS="" |