2 |
Name: xrdp |
Name: xrdp |
3 |
Epoch: 1 |
Epoch: 1 |
4 |
Version: 0.9.1 |
Version: 0.9.1 |
5 |
Release: %mkrel 1 |
Release: %mkrel 2 |
6 |
License: ASL 2.0 |
License: ASL 2.0 |
7 |
Group: Networking/Remote access |
Group: Networking/Remote access |
8 |
URL: http://www.xrdp.org/ |
URL: http://www.xrdp.org/ |
10 |
Source1: xrdp-sesman.pamd |
Source1: xrdp-sesman.pamd |
11 |
Source2: xrdp.sysconfig |
Source2: xrdp.sysconfig |
12 |
Source3: xrdp.logrotate |
Source3: xrdp.logrotate |
13 |
|
Source4: openssl.conf |
14 |
Patch0: xrdp-0.9.1-sesman.patch |
Patch0: xrdp-0.9.1-sesman.patch |
15 |
Patch1: xrdp-0.9.1-xrdp-ini.patch |
Patch1: xrdp-0.9.1-xrdp-ini.patch |
16 |
|
Patch2: xrdp-0.9.1-service.patch |
17 |
|
Patch3: xrdp-0.9.1-fastpath.patch |
18 |
|
|
19 |
BuildRequires: pkgconfig(x11) |
BuildRequires: pkgconfig(x11) |
20 |
BuildRequires: pkgconfig(xfixes) |
BuildRequires: pkgconfig(xfixes) |
28 |
BuildRequires: pkgconfig(glib-2.0) |
BuildRequires: pkgconfig(glib-2.0) |
29 |
|
|
30 |
|
|
31 |
#vnc-server provides Xvnc (tigervnc-server in fedora) |
# tigervnc-server-minimal provides Xvnc (default for now) |
32 |
Requires: tigervnc-server |
Requires: tigervnc-server |
33 |
|
Requires: xinitrc |
34 |
Requires(post): rpm-helper >= %{rpmhelper_required_version} |
Requires(post): rpm-helper >= %{rpmhelper_required_version} |
35 |
Requires(preun): rpm-helper >= %{rpmhelper_required_version} |
Requires(preun): rpm-helper >= %{rpmhelper_required_version} |
36 |
Requires(post): openssl |
Requires(posttrans): openssl |
37 |
|
|
38 |
|
|
39 |
%description |
%description |
40 |
xrdp provides a fully functional RDP server compatible with a wide range |
xrdp provides a fully functional RDP server compatible with a wide range |
41 |
of RDP clients, including FreeRDP and Microsoft RDP client. |
of RDP clients, including FreeRDP and Microsoft RDP client. |
42 |
|
|
43 |
|
%package devel |
44 |
|
Summary: Headers and pkg-config files needed to compile xrdp backends |
45 |
|
|
46 |
|
%description devel |
47 |
|
This package contains headers necessary for developing xrdp backends that |
48 |
|
talk to xrdp. |
49 |
|
|
50 |
%prep |
%prep |
51 |
%autosetup -p1 |
%autosetup -p1 |
52 |
|
|
55 |
. %{_sysconfdir}/xrdp/startwm.sh' > sesman/startwm-bash.sh |
. %{_sysconfdir}/xrdp/startwm.sh' > sesman/startwm-bash.sh |
56 |
|
|
57 |
%build |
%build |
58 |
%configure2_5x --enable-fuse --enable-pixman |
%configure2_5x --enable-fuse --enable-pixman --enable-painter |
59 |
%make_build |
%make_build |
60 |
|
|
61 |
%install |
%install |
65 |
find %{buildroot} -name '*.a' -exec rm {} \; |
find %{buildroot} -name '*.a' -exec rm {} \; |
66 |
find %{buildroot} -name '*.la' -exec rm {} \; |
find %{buildroot} -name '*.la' -exec rm {} \; |
67 |
|
|
68 |
|
# remove libpainter devel files |
69 |
|
rm -f %{buildroot}%{_includedir}/painter.h %{buildroot}%{_libdir}/libpainter.* %{buildroot}%{_libdir}/pkgconfig/libpainter.pc |
70 |
|
|
71 |
|
# remove .so files for non-modules |
72 |
|
rm -f %{buildroot}%{_libdir}/xrdp/libcommon.so %{buildroot}%{_libdir}/xrdp/libscp.so %{buildroot}%{_libdir}/xrdp/libxrdp.so %{buildroot}%{_libdir}/xrdp/libxrdpapi.so |
73 |
|
|
74 |
#install sesman pam config /etc/pam.d/xrdp-sesman |
#install sesman pam config /etc/pam.d/xrdp-sesman |
75 |
%{__install} -Dp -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/xrdp-sesman |
%{__install} -Dp -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/xrdp-sesman |
76 |
|
|
81 |
%{__install} -Dp -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/xrdp |
%{__install} -Dp -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/xrdp |
82 |
|
|
83 |
#install openssl.conf /etc/xrdp |
#install openssl.conf /etc/xrdp |
84 |
%{__install} -Dp -m 644 keygen/openssl.conf %{buildroot}%{_sysconfdir}/xrdp/openssl.conf |
%{__install} -Dp -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/xrdp/openssl.conf |
|
|
|
|
#install log file /var/log/xrdp-sesman.log |
|
|
%{__mkdir} -p %{buildroot}%{_localstatedir}/log/ |
|
|
touch %{buildroot}%{_localstatedir}/log/xrdp-sesman.log |
|
85 |
|
|
86 |
#install 'bash -l' startwm script |
#install 'bash -l' startwm script |
87 |
%{__install} -Dp -m 755 sesman/startwm-bash.sh %{buildroot}%{_sysconfdir}/xrdp/startwm-bash.sh |
%{__install} -Dp -m 755 sesman/startwm-bash.sh %{buildroot}%{_sysconfdir}/xrdp/startwm-bash.sh |
88 |
|
|
|
#rsakeys.ini |
|
|
touch %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini |
|
|
%{__chmod} 0600 %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini |
|
|
|
|
|
|
|
89 |
%post |
%post |
90 |
%_create_ssl_certificate %{name} |
%_create_ssl_certificate %{name} |
91 |
%_post_service %{name} |
%_post_service %{name} |
92 |
|
|
93 |
if [ ! -f %{_sysconfdir}/xrdp/rsakeys.ini ]; then |
%preun |
94 |
xrdp-keygen xrdp %{_sysconfdir}/xrdp/rsakeys.ini > /dev/null |
%_preun_service %{name} |
95 |
%{__chmod} 0600 %{_sysconfdir}/xrdp/rsakeys.ini |
|
96 |
|
%posttrans |
97 |
|
if [ ! -s %{_sysconfdir}/xrdp/rsakeys.ini ]; then |
98 |
|
(umask 377; %{_bindir}/xrdp-keygen xrdp %{_sysconfdir}/xrdp/rsakeys.ini >/dev/null) |
99 |
fi |
fi |
100 |
|
chmod 400 %{_sysconfdir}/xrdp/rsakeys.ini |
101 |
|
|
102 |
if [ ! -f %{_sysconfdir}/xrdp/cert.pem ]; then |
if [ ! -s %{_sysconfdir}/xrdp/cert.pem ]; then |
103 |
openssl req -x509 -newkey rsa:2048 -sha256 -nodes -days 3652 \ |
(umask 377; openssl req -x509 -newkey rsa:2048 -sha256 -nodes -days 3652 \ |
104 |
-keyout %{_sysconfdir}/xrdp/key.pem \ |
-keyout %{_sysconfdir}/xrdp/key.pem \ |
105 |
-out %{_sysconfdir}/xrdp/cert.pem \ |
-out %{_sysconfdir}/xrdp/cert.pem \ |
106 |
-subj /C=US/ST=CA/L=Sunnyvale/O=xrdp/CN=www.xrdp.org \ |
-config %{_sysconfdir}/xrdp/openssl.conf >/dev/null 2>&1) |
|
-config %{_sysconfdir}/xrdp/openssl.conf |
|
107 |
fi |
fi |
108 |
|
chmod 400 %{_sysconfdir}/xrdp/cert.pem |
109 |
%preun |
chmod 400 %{_sysconfdir}/xrdp/key.pem |
|
%_preun_service %{name} |
|
110 |
|
|
111 |
|
|
112 |
%files |
%files |
125 |
%exclude %ghost %{_sysconfdir}/xrdp/rsakeys.ini |
%exclude %ghost %{_sysconfdir}/xrdp/rsakeys.ini |
126 |
%{_sysconfdir}/xrdp/km*.ini |
%{_sysconfdir}/xrdp/km*.ini |
127 |
%{_sysconfdir}/xrdp/openssl.conf |
%{_sysconfdir}/xrdp/openssl.conf |
|
%{_sysconfdir}/xrdp/sesman.ini |
|
128 |
%{_sysconfdir}/xrdp/startwm*.sh |
%{_sysconfdir}/xrdp/startwm*.sh |
|
%{_sysconfdir}/xrdp/xrdp.ini |
|
129 |
%{_sysconfdir}/xrdp/xrdp_keyboard.ini |
%{_sysconfdir}/xrdp/xrdp_keyboard.ini |
130 |
%{_bindir}/xrdp-genkeymap |
%{_bindir}/xrdp-genkeymap |
131 |
%{_bindir}/xrdp-sesadmin |
%{_bindir}/xrdp-sesadmin |
159 |
%{_sysconfdir}/xrdp/pulse/default.pa |
%{_sysconfdir}/xrdp/pulse/default.pa |
160 |
%{_unitdir}/xrdp-sesman.service |
%{_unitdir}/xrdp-sesman.service |
161 |
%{_unitdir}/xrdp.service |
%{_unitdir}/xrdp.service |
162 |
%{_includedir}/* |
%ghost %{_localstatedir}/log/xrdp.log |
|
%{_libdir}/pkgconfig/xrdp.pc |
|
|
|
|
163 |
%ghost %{_localstatedir}/log/xrdp-sesman.log |
%ghost %{_localstatedir}/log/xrdp-sesman.log |
164 |
%attr(0600,root,root) %verify(not size md5 mtime) %{_sysconfdir}/xrdp/rsakeys.ini |
%attr(0600,root,root) %verify(not size md5 mtime) %{_sysconfdir}/xrdp/rsakeys.ini |
165 |
|
|
166 |
|
%files devel |
167 |
|
%{_includedir}/xrdp* |
168 |
|
%{_libdir}/pkgconfig/xrdp.pc |