2014-07-22 20:57:37 +02:00
#
# spec file for package xrdp
#
2023-01-10 04:10:49 +01:00
# Copyright (c) 2023 SUSE LLC
2014-07-22 20:57:37 +02:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2018-09-26 16:27:03 +02:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2014-07-22 20:57:37 +02:00
#
2017-11-24 08:06:56 +01:00
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
2014-07-22 20:57:37 +02:00
Name : xrdp
2022-10-26 03:45:29 +02:00
Version : 0.9.20
2014-07-22 20:57:37 +02:00
Release : 0
2016-10-12 08:56:56 +02:00
Summary : Remote desktop protocol (RDP) server
2018-04-16 12:50:06 +02:00
License : Apache-2.0 AND GPL-2.0-or-later
2014-07-22 20:57:37 +02:00
Group : System/X11/Utilities
2020-02-08 09:13:53 +01:00
URL : https://github.com/neutrinolabs/xrdp
2017-07-12 11:26:35 +02:00
Source0 : https://github.com/neutrinolabs/%{name} /releases/download/v%{version} /%{name} -%{version} .tar.gz
Source1 : https://github.com/neutrinolabs/%{name} /releases/download/v%{version} /%{name} -%{version} .tar.gz.asc
Source2 : xrdp.keyring
Source4 : sysconfig.xrdp
Source5 : force_stop
2021-01-10 15:03:34 +01:00
Source6 : xrdp.ini
Source7 : sesman.ini
2014-07-22 20:57:37 +02:00
Source100 : %{name} -rpmlintrc
2017-05-27 20:13:35 +02:00
# PATCH-FIX-OPENSUSE xrdp-pam.patch - hfiguiere@novell.com refreshed by ftake@geeko.jp
2016-09-21 13:37:09 +02:00
Patch1 : xrdp-pam.patch
# PATCH-FIX-OPENSUSE xrdp-disable-8-bpp-vnc-support.patch bsc#991059 - fezhang@suse.com -- disable 8 bpp support for vnc connections
Patch4 : xrdp-disable-8-bpp-vnc-support.patch
2018-09-26 16:27:03 +02:00
# PATCH-FIX-OPENSUSE xrdp-support-KillDisconnected-for-Xvnc.patch boo#1101506 - fezhang@suse.com -- Support the KillDisconnected option for TigerVNC Xvnc sessions
Patch5 : xrdp-support-KillDisconnected-for-Xvnc.patch
2019-09-10 14:33:49 +02:00
# PATCH-FIX-OPENSUSE xrdp-systemd-services.patch boo#1138954 boo#1144327 - fezhang@suse.com -- Let systemd handle the daemons
Patch6 : xrdp-systemd-services.patch
2023-01-10 04:10:49 +01:00
# PATCH-FIX-UPSTREAM xrdp-update-pam.d-path.patch bsc#1203468 - yu.daike@suse.com -- update install script to accommodate with pam.d path move
Patch7 : xrdp-update-pam.d-path.patch
# PATCH-FIX-UPSTREAM xrdp-CVE-2022-23468.patch bsc#1206300 - yu.daike@suse.com -- Buffer overflow in xrdp_login_wnd_create()
Patch8 : xrdp-CVE-2022-23468.patch
# PATCH-FIX-UPSTREAM xrdp-CVE-2022-23478.patch bsc#1206302 - yu.daike@suse.com -- Out of Bound Write in xrdp_mm_trans_process_drdynvc_chan
Patch9 : xrdp-CVE-2022-23478.patch
# PATCH-FIX-UPSTREAM xrdp-CVE-2022-23479.patch bsc#1206303 - yu.daike@suse.com -- Buffer overflow in xrdp_mm_chan_data_in() function
Patch10 : xrdp-CVE-2022-23479.patch
# PATCH-FIX-UPSTREAM xrdp-CVE-2022-23480.patch bsc#1206306 - yu.daike@suse.com -- Buffer overflow in devredir_proc_client_devlist_announce_req
Patch11 : xrdp-CVE-2022-23480.patch
# PATCH-FIX-UPSTREAM xrdp-CVE-2022-23481.patch bsc#1206307 - yu.daike@suse.com -- Out of Bound Read in xrdp_caps_process_confirm_active()
Patch12 : xrdp-CVE-2022-23481.patch
# PATCH-FIX-UPSTREAM xrdp-CVE-2022-23482.patch bsc#1206310 - yu.daike@suse.com -- Out of Bound Read in xrdp_sec_process_mcs_data_CS_CORE()
Patch13 : xrdp-CVE-2022-23482.patch
# PATCH-FIX-UPSTREAM xrdp-CVE-2022-23483.patch bsc#1206311 - yu.daike@suse.com -- Out of Bound Read in libxrdp_send_to_channel()
Patch14 : xrdp-CVE-2022-23483.patch
# PATCH-FIX-UPSTREAM xrdp-CVE-2022-23484.patch bsc#1206312 - yu.daike@suse.com -- Integer Overflow in xrdp_mm_process_rail_update_window_text()
Patch15 : xrdp-CVE-2022-23484.patch
# PATCH-FIX-UPSTREAM xrdp-CVE-2022-23493.patch bsc#1206313 - yu.daike@suse.com -- Out of Bound Read in xrdp_mm_trans_process_drdynvc_channel_close()
Patch16 : xrdp-CVE-2022-23493.patch
# PATCH-FIX-UPSTREAM xrdp-CVE-2022-23477.patch bsc#1206301 - yu.daike@suse.com -- Buffer over flow in audin_send_open() function
Patch17 : xrdp-CVE-2022-23477.patch
# Keep SLE only patches on the bottom starting from patch number 1001
2019-10-14 08:43:52 +02:00
# PATCH-FEATURE-SLE xrdp-avahi.diff bnc#586785 - hfiguiere@novell.com -- Add Avahi support.
2023-01-10 04:10:49 +01:00
Patch1001 : xrdp-avahi.diff
2016-09-21 13:37:09 +02:00
# PATCH-FIX-SLE xrdp-filter-tab-from-mstsc-on-focus-change.patch bnc#601996 bnc#623534 - dliang@novell.com -- filter the fake tab key which is used to notify the session
2023-01-10 04:10:49 +01:00
Patch1002 : xrdp-filter-tab-from-mstsc-on-focus-change.patch
2016-09-21 13:37:09 +02:00
# PATCH-FIX-SLE xrdp-bsc965647-allow-admin-choose-desktop.patch bsc#965647 - fezhang@suse.com -- Allow administrator choose the desktop displayed
2023-01-10 04:10:49 +01:00
Patch1003 : xrdp-bsc965647-allow-admin-choose-desktop.patch
2016-09-21 13:37:09 +02:00
# PATCH-FEATURE-SLE xrdp-fate318398-change-expired-password.patch fate#318398 - fezhang@suse.com -- enable user to update expired password via PAM
2023-01-10 04:10:49 +01:00
Patch1004 : xrdp-fate318398-change-expired-password.patch
2020-10-27 07:29:56 +01:00
2014-07-22 20:57:37 +02:00
BuildRequires : autoconf
BuildRequires : automake
2016-09-21 13:37:09 +02:00
BuildRequires : fdupes
2022-03-25 19:15:48 +01:00
BuildRequires : fuse-devel
2014-07-22 20:57:37 +02:00
BuildRequires : libX11-devel
BuildRequires : libXfixes-devel
BuildRequires : libXrandr-devel
2016-09-21 13:37:09 +02:00
BuildRequires : libavahi-devel
BuildRequires : libtool
2017-05-27 20:13:35 +02:00
BuildRequires : nasm
2016-09-21 13:37:09 +02:00
BuildRequires : openssl-devel
BuildRequires : pam-devel
BuildRequires : pkg-config
BuildRequires : pkgconfig(systemd)
Requires : xorg-x11-Xvnc
2017-05-27 20:13:35 +02:00
Recommends: xorgxrdp
2014-07-22 20:57:37 +02:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
%description
2017-06-08 09:18:11 +02:00
A terminal server, capable of accepting connection from rdesktop and
Microsoft's own terminal server / remote desktop clients.
2014-07-22 20:57:37 +02:00
2017-05-27 20:13:35 +02:00
%package devel
Summary : Development files for xrdp
2017-06-08 09:18:11 +02:00
Group : Development/Libraries/C and C++
2017-05-27 20:13:35 +02:00
Requires : libpainter0 = %{version}
Requires : librfxencode0 = %{version}
%description devel
2017-06-08 09:18:11 +02:00
This package contains the development headers for xrdp.
2017-05-27 20:13:35 +02:00
%package -n libpainter0
Summary : Library for manipulating memory bitmaps
2017-06-08 09:18:11 +02:00
Group : System/Libraries
2017-05-27 20:13:35 +02:00
%description -n libpainter0
2017-06-08 09:18:11 +02:00
This package contains libraries for manipulating memory bitmaps.
2017-05-27 20:13:35 +02:00
%package -n librfxencode0
2017-06-08 09:18:11 +02:00
Summary : Library for the JPEG2000 codec for RDP
Group : System/Libraries
2017-05-27 20:13:35 +02:00
%description -n librfxencode0
2017-06-08 09:18:11 +02:00
This package contains libraries for the JPEG2000 codec for RDP.
2017-05-27 20:13:35 +02:00
2014-07-22 20:57:37 +02:00
%prep
%setup -q
2015-10-19 09:24:42 +02:00
%patch1 -p1
2016-09-21 13:37:09 +02:00
%patch4 -p1
2018-09-26 16:27:03 +02:00
%patch5 -p1
2019-09-10 14:33:49 +02:00
%patch6 -p1
2023-01-10 04:10:49 +01:00
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
2021-01-10 15:03:34 +01:00
%patch11 -p1
2016-09-21 13:37:09 +02:00
%patch12 -p1
%patch13 -p1
%patch14 -p1
2022-12-05 03:37:06 +01:00
%patch15 -p1
2023-01-10 04:10:49 +01:00
%patch16 -p1
%patch17 -p1
%if 0%{?sle_version}
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
%endif
2014-07-22 20:57:37 +02:00
%build
2016-09-21 13:37:09 +02:00
sh ./bootstrap
%configure \
2018-03-27 14:47:28 +02:00
--enable-ipv6 \
2018-04-16 12:50:06 +02:00
--enable-painter \
2020-02-08 09:13:53 +01:00
--with-systemdsystemunitdir=%{_unitdir} \
2022-03-25 19:15:48 +01:00
--enable-vsock \
--enable-fuse
2020-02-08 09:13:53 +01:00
make %{?_smp_mflags} V=1
2014-07-22 20:57:37 +02:00
2016-09-21 13:37:09 +02:00
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
2016-10-12 08:56:56 +02:00
find %{buildroot} -name '*.a' -delete
2016-09-21 13:37:09 +02:00
find %{buildroot} -type f -name " * . l a " -delete -print
2017-11-24 08:06:56 +01:00
mkdir -p %{buildroot} /%{_fillupdir}
install -m 644 %{SOURCE4} %{buildroot} /%{_fillupdir} /sysconfig.xrdp
2020-06-22 12:29:00 +02:00
mkdir -p %{buildroot} /%{_libexecdir} /initscripts/legacy-actions/xrdp
install -m 755 %{SOURCE5} %{buildroot} /%{_libexecdir} /initscripts/legacy-actions/xrdp/force_stop
2021-01-10 15:03:34 +01:00
install -m 644 %{SOURCE6} %{SOURCE7} %{buildroot} /%{_sysconfdir} /xrdp/
2014-07-22 20:57:37 +02:00
2016-09-21 13:37:09 +02:00
ln -sf %{_sbindir} /service %{buildroot} %{_sbindir} /rcxrdp
ln -sf %{_sbindir} /service %{buildroot} %{_sbindir} /rcxrdp-sesman
2014-07-22 20:57:37 +02:00
2018-08-02 19:06:46 +02:00
# remove a private key and certification file generated during make and
2017-05-27 20:13:35 +02:00
# use certification file created at the post phase
2018-08-02 19:06:46 +02:00
rm -f %{buildroot} /%{_sysconfdir} /xrdp/{cert,key}.pem
2014-07-22 20:57:37 +02:00
2016-09-21 13:37:09 +02:00
%fdupes -s %{buildroot}
2014-07-22 20:57:37 +02:00
%pre
2016-09-21 13:37:09 +02:00
%service_add_pre xrdp-sesman.service
%service_add_pre xrdp.service
2014-07-22 20:57:37 +02:00
%post
/sbin/ldconfig
2016-09-21 13:37:09 +02:00
%service_add_post xrdp-sesman.service
%service_add_post xrdp.service
%{fillup_only -n xrdp}
if [ ! -e %{_sysconfdir} /xrdp/rsakeys.ini ]; then
xrdp-keygen xrdp %{_sysconfdir} /xrdp/rsakeys.ini
if [ $? -ne 0 ] || [ ! -e %{_sysconfdir} /xrdp/rsakeys.ini ]; then
echo " C o u l d n o t g e n e r a t e r s a k e y s . i n i , p l e a s e c h e c k m a n u a l l y ! "
2014-07-22 20:57:37 +02:00
fi
fi
exit 0
2016-09-21 13:37:09 +02:00
%preun
%stop_on_removal
%service_del_preun xrdp.service
%service_del_preun xrdp-sesman.service
2014-07-22 20:57:37 +02:00
%postun
/sbin/ldconfig
2016-09-21 13:37:09 +02:00
%service_del_postun xrdp.service
%service_del_postun xrdp-sesman.service
2014-07-22 20:57:37 +02:00
%restart_on_update
2017-05-27 20:13:35 +02:00
%post -n libpainter0 -p /sbin/ldconfig
%postun -n libpainter0 -p /sbin/ldconfig
%post -n librfxencode0 -p /sbin/ldconfig
%postun -n librfxencode0 -p /sbin/ldconfig
2014-07-22 20:57:37 +02:00
%files
2016-09-21 13:37:09 +02:00
%defattr (-,root,root)
%dir %{_datadir} /xrdp
%dir %{_libdir} /xrdp
%config (noreplace) %{_sysconfdir} /pam.d/xrdp-sesman
2020-10-27 07:29:56 +01:00
%license COPYING
2016-09-21 13:37:09 +02:00
%{_bindir} /xrdp*
%{_datadir} /xrdp/*
%{_libdir} /xrdp/*
%{_mandir} /man1/*
%{_mandir} /man5/*
%{_mandir} /man8/*
2020-06-22 12:29:00 +02:00
%{_libexecdir} /initscripts/legacy-actions/xrdp
2016-09-21 13:37:09 +02:00
%{_sbindir} /rc*
%{_sbindir} /xrdp*
2022-02-07 22:12:13 +01:00
%dir %{_sysconfdir} /xrdp
%config (noreplace) %{_sysconfdir} /xrdp/km*.ini
%dir %{_sysconfdir} /xrdp/pulse
%config (noreplace) %{_sysconfdir} /xrdp/pulse/default.pa
%config (noreplace) %{_sysconfdir} /xrdp/reconnectwm.sh
%ghost %config (noreplace) %{_sysconfdir} /xrdp/rsakeys.ini
%config (noreplace) %{_sysconfdir} /xrdp/startwm.sh
%config (noreplace) %{_sysconfdir} /xrdp/xrdp_keyboard.ini
%config (noreplace) %{_sysconfdir} /xrdp/sesman.ini
%config (noreplace) %{_sysconfdir} /xrdp/xrdp.ini
2016-09-21 13:37:09 +02:00
%{_unitdir} /xrdp*
%ghost %{_localstatedir} /log/xrdp-sesman.log
2017-11-24 08:06:56 +01:00
%config %{_fillupdir} /sysconfig.xrdp
2014-07-22 20:57:37 +02:00
2017-05-27 20:13:35 +02:00
%files devel
%defattr (-,root,root)
2020-03-12 09:59:33 +01:00
%{_includedir} /ms-*
2017-05-27 20:13:35 +02:00
%{_includedir} /painter.h
%{_includedir} /rfxcodec_*
%{_includedir} /xrdp_*
%{_libdir} /libpainter.so
%{_libdir} /librfxencode.so
%{_libdir} /pkgconfig/libpainter.pc
%{_libdir} /pkgconfig/rfxcodec.pc
%{_libdir} /pkgconfig/xrdp.pc
%files -n libpainter0
%{_libdir} /libpainter.so.*
%files -n librfxencode0
%{_libdir} /librfxencode.so.*
2014-07-22 20:57:37 +02:00
%changelog