Accepting request 236691 from home:aeneas_jaissle

Initial package creation for xrdp

OBS-URL: https://build.opensuse.org/request/show/236691
OBS-URL: https://build.opensuse.org/package/show/X11:RemoteDesktop/xrdp?expand=0&rev=1
This commit is contained in:
Dirk Mueller 2014-07-22 18:57:37 +00:00 committed by Git OBS Bridge
commit cba0a04e0c
11 changed files with 634 additions and 0 deletions

25
.gitattributes vendored Normal file
View File

@ -0,0 +1,25 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
## Specific LFS patterns
openSUSE.bmp filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

12
_service Normal file
View File

@ -0,0 +1,12 @@
<services>
<service name="tar_scm">
<param name="url">https://github.com/neutrinolabs/xrdp.git</param>
<param name="scm">git</param>
<param name="versionprefix">0.9.0git</param>
</service>
<service name="recompress">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version"/>
</services>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7668cbe29c5ac3b017b437a25a437ded1001a2fe8acc9419875603e1ee846149
size 1681760

View File

@ -0,0 +1,214 @@
#
# spec file for package xrdp
#
# Copyright (c) 2014 Aeneas Jaißle <aj@ajaissle.de>
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} >= 1220
%define with_systemd 1
%else
%define with_systemd 0
%endif
Name: xrdp
Version: 0.9.0git.1401423964
Release: 0
Summary: An open source RDP server
License: Apache-2.0
Group: System/X11/Utilities
Url: http://www.xrdp.org/
Source0: %{name}-%{version}.tar.xz
Source1: sysconfig.%{name}
Source2: openSUSE.bmp
Source100: %{name}-rpmlintrc
# PATCH-FIX-SUSE -- Adjust default settings to openSUSE standards
Patch0: %{name}-get-it-working.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fuse-devel
BuildRequires: libopenssl-devel
BuildRequires: libtool
BuildRequires: pam-devel
BuildRequires: pkg-config
BuildRequires: libX11-devel
BuildRequires: libXfixes-devel
BuildRequires: libXrandr-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?with_systemd} == 1
%systemd_requires
%else
Requires(pre): %insserv_prereq
%endif
Requires(pre): %fillup_prereq
%description
Based on the work of FreeRDP and rdesktop, xrdp uses the remote desktop
protocol to present a GUI to the user.
The goal of this project is to provide a fully functional Linux terminal
server, capable of accepting connections from rdesktop, freerdp, and
Microsoft's own terminal server / remote desktop clients.
%prep
%setup -q
cp sesman/sesman.ini sesman/sesman.ini.example
cp xrdp/xrdp.ini xrdp/xrdp.ini.example
%patch0 -p1
%build
./bootstrap
%{configure} \
%if 0%{?with_systemd} == 1
--with-systemdsystemunitdir=%{_unitdir} \
%endif
--enable-fuse \
--disable-static
# More confgiure options:
# --enable-jpeg \
# --enable-kerberos \
# --enable-loadpulsemodules \
# --enable-neutrinordp \
# --enable-pamuserpass \
# --enable-simplesound \
# --enable-tjpeg \
# --enable-xrdpdebug \
# --enable-xrdpvr \
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
%if 0%{?with_systemd} == 1
rm -r %{buildroot}%{_initrddir}
%if 0%{?suse_version} >= 1230
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-sesman
%else
%{__ln_s} /sbin/service %{buildroot}%{_sbindir}/rc%{name}
%{__ln_s} /sbin/service %{buildroot}%{_sbindir}/rc%{name}-sesman
%endif
%else
%{__ln_s} %{_initrddir}/%{name} %{buildroot}%{_sbindir}/rc%{name}
%endif
# create sysconfig file and ghost rsakeys.ini
install -d %{buildroot}%{_localstatedir}/adm/fillup-templates
install %{SOURCE1} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
install %{SOURCE2} %{buildroot}%{_datadir}/%{name}/
touch %{buildroot}%{_sysconfdir}/%{name}/rsakeys.ini
# remove libtool cruft
find %{buildroot}%{_libdir}/%{name} -name *.la -delete
%if 0%{?with_systemd} == 1
%pre
%service_add_pre %{name}.service
%service_add_pre %{name}-sesman.service
%endif
%preun
%if 0%{?with_systemd} == 1
%service_del_preun %{name}.service
%service_del_preun %{name}-sesman.service
%else
%stop_on_removal
%endif
%post
/sbin/ldconfig
%if 0%{?with_systemd} == 1
%service_add_post %{name}.service
%service_add_post %{name}-sesman.service
%fillup_only
%else
%fillup_and_insserv
%endif
# generate a keypair used to perform authentication to the remote client
if ! [[ -e %{_sysconfdir}/%{name}/rsakeys.ini ]]; then
xrdp-keygen xrdp
if ! [[ $? == 0 ]]; then
echo "Could not generate rsakeys.ini, please check manually!"
fi
fi
exit 0
%postun
/sbin/ldconfig
%if 0%{?with_systemd} == 1
%service_add_post %{name}.service
%service_add_post %{name}-sesman.service
%else
%insserv_cleanup
%endif
%restart_on_update
%files
%defattr(-, root, root, -)
%doc COPYING sesman/sesman.ini.example xrdp/xrdp.ini.example
%config %{_sysconfdir}/default/%{name}
%config %{_sysconfdir}/pam.d/%{name}-sesman
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/km-0407.ini
%config %{_sysconfdir}/%{name}/km-0409.ini
%config %{_sysconfdir}/%{name}/km-040c.ini
%config %{_sysconfdir}/%{name}/km-0410.ini
%config %{_sysconfdir}/%{name}/km-0419.ini
%config %{_sysconfdir}/%{name}/km-041d.ini
%config %{_sysconfdir}/%{name}/km-0816.ini
%ghost %config(noreplace) %{_sysconfdir}/%{name}/rsakeys.ini
%config(noreplace) %{_sysconfdir}/%{name}/sesman.ini
%config(noreplace) %{_sysconfdir}/%{name}/startwm.sh
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.sh
%config %{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
%{_bindir}/%{name}-dis
%{_bindir}/%{name}-genkeymap
%{_bindir}/%{name}-keygen
%{_bindir}/%{name}-sesadmin
%{_bindir}/%{name}-sesrun
%{_sbindir}/%{name}
%{_sbindir}/%{name}-chansrv
%{_sbindir}/%{name}-sesman
%{_sbindir}/%{name}-sessvc
%{_sbindir}/rc%{name}
%if 0%{?with_systemd} == 1
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}-sesman.service
%{_sbindir}/rc%{name}-sesman
%else
%{_initrddir}/%{name}
%endif
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/libcommon.so*
%{_libdir}/%{name}/libmc.so*
%{_libdir}/%{name}/librdp.so*
%{_libdir}/%{name}/libscp.so*
%{_libdir}/%{name}/libvnc.so*
%{_libdir}/%{name}/libxrdp.so*
%{_libdir}/%{name}/libxrdpapi.so*
%{_libdir}/%{name}/libxup.so*
%{_mandir}/man*/%{name}*.gz
%{_mandir}/man5/sesman.ini.5.gz
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%changelog

3
openSUSE.bmp Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab42b5fc6b70b8369f947569a5b704bffd8c6b61b212506f35ed8847577c8b85
size 100854

2
sysconfig.xrdp Normal file
View File

@ -0,0 +1,2 @@
#SESMAN_OPTIONS=""
#XRDP_OPTIONS=""

129
xrdp-get-it-working.patch Normal file
View File

@ -0,0 +1,129 @@
diff -ur a/instfiles/pam.d/xrdp-sesman b/instfiles/pam.d/xrdp-sesman
--- a/instfiles/pam.d/xrdp-sesman 2014-06-09 18:53:00.000000000 +0530
+++ b/instfiles/pam.d/xrdp-sesman 2014-06-09 18:53:26.000000000 +0530
@@ -1,5 +1,6 @@
#%PAM-1.0
-@include common-auth
-@include common-account
-@include common-session
-@include common-password
+auth include common-auth
+account include common-account
+password include common-password
+session required pam_loginuid.so
+session include common-session
diff -ur a/sesman/sesman.ini b/sesman/sesman.ini
--- a/sesman/sesman.ini 2014-06-09 18:53:00.000000000 +0530
+++ b/sesman/sesman.ini 2014-06-09 18:53:26.000000000 +0530
@@ -28,16 +28,9 @@
[Logging]
LogFile=xrdp-sesman.log
-LogLevel=DEBUG
-EnableSyslog=1
-SyslogLevel=DEBUG
-
-[X11rdp]
-param1=-bs
-param2=-ac
-param3=-nolisten
-param4=tcp
-param5=-uds
+LogLevel=ERROR
+EnableSyslog=0
+SyslogLevel=ERROR
[Xvnc]
param1=-bs
diff -ur a/xrdp/xrdp.ini b/xrdp/xrdp.ini
--- a/xrdp/xrdp.ini 2014-06-09 18:52:59.000000000 +0530
+++ b/xrdp/xrdp.ini 2014-06-09 18:56:57.000000000 +0530
@@ -55,7 +55,8 @@
#
# top level window background color in RGB format
-ls_top_window_bg_color=009cb5
+#ls_top_window_bg_color=009cb5
+ls_top_window_bg_color=000000
# width and height of login screen
ls_width=350
@@ -65,7 +66,7 @@
ls_bg_color=dedede
# logo
-ls_logo_filename=
+ls_logo_filename=/usr/share/xrdp/openSUSE.bmp
ls_logo_x_pos=55
ls_logo_y_pos=50
@@ -94,9 +95,9 @@
[Logging]
LogFile=xrdp.log
-LogLevel=DEBUG
-EnableSyslog=1
-SyslogLevel=DEBUG
+LogLevel=ERROR
+EnableSyslog=0
+SyslogLevel=ERROR
# LogLevel and SysLogLevel could by any of: core, error, warning, info or debug
[channels]
@@ -119,16 +120,6 @@
# for debugging xrdp, add following line to section xrdp1
# chansrvport=/tmp/.xrdp/xrdp_chansrv_socket_7210
-[xrdp1]
-name=sesman-X11rdp
-lib=libxup.so
-username=ask
-password=ask
-ip=127.0.0.1
-port=-1
-xserverbpp=24
-code=10
-
[xrdp2]
name=sesman-Xvnc
lib=libvnc.so
@@ -145,39 +136,6 @@
username=na
password=ask
-[xrdp4]
-name=vnc-any
-lib=libvnc.so
-ip=ask
-port=ask5900
-username=na
-password=ask
-#pamusername=asksame
-#pampassword=asksame
-#pamsessionmng=127.0.0.1
-
-[xrdp5]
-name=sesman-any
-lib=libvnc.so
-ip=ask
-port=-1
-username=ask
-password=ask
-
-[xrdp6]
-name=rdp-any
-lib=librdp.so
-ip=ask
-port=ask3389
-
-[xrdp7]
-name=neutrinordp-any
-lib=libxrdpneutrinordp.so
-ip=ask
-port=ask3389
-username=ask
-password=ask
-
# You can override the common channel settings for each session type
#channel.rdpdr=true
#channel.rdpsnd=true

1
xrdp-rpmlintrc Normal file
View File

@ -0,0 +1 @@
addFilter("E: devel-file-in-non-devel-package")

30
xrdp.changes Normal file
View File

@ -0,0 +1,30 @@
-------------------------------------------------------------------
Mon Jun 9 13:27:30 UTC 2014 - cyberorg@opensuse.org
- add openSUSE logo and colors closer to openSUSE default theme
-------------------------------------------------------------------
Mon Jun 2 21:59:44 UTC 2014 - aj@ajaissle.de
- add sesman.ini.example and xrdp.ini.example
- some spec cleanup
- prevent rsakeys to be replaced on every update
- add sysconfig.xrdp
- add xrdp-rpmlintrc
-------------------------------------------------------------------
Sat May 31 06:28:14 UTC 2014 - cyberorg@opensuse.org
- add xrdp-get-it-working.patch
fixes /etc/pam.d/xrdp-sesman
sane log levels
remove sessions not working properly
- remove devel package as it did not have any real devel files,
it just had symlinks to libs that are needed by xrdp to function
- fix post to add missing files so xrdp can start
-------------------------------------------------------------------
Thu May 29 11:07:53 UTC 2014 - aj@ajaissle.de
- Initial package, based on 0.9.0

214
xrdp.spec Normal file
View File

@ -0,0 +1,214 @@
#
# spec file for package xrdp
#
# Copyright (c) 2014 Aeneas Jaißle <aj@ajaissle.de>
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%if 0%{?suse_version} >= 1220
%define with_systemd 1
%else
%define with_systemd 0
%endif
Name: xrdp
Version: 0.9.0
Release: 0
Summary: An open source RDP server
License: Apache-2.0
Group: System/X11/Utilities
Url: http://www.xrdp.org/
Source0: %{name}-%{version}.tar.xz
Source1: sysconfig.%{name}
Source2: openSUSE.bmp
Source100: %{name}-rpmlintrc
# PATCH-FIX-SUSE -- Adjust default settings to openSUSE standards
Patch0: %{name}-get-it-working.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fuse-devel
BuildRequires: libopenssl-devel
BuildRequires: libtool
BuildRequires: pam-devel
BuildRequires: pkg-config
BuildRequires: libX11-devel
BuildRequires: libXfixes-devel
BuildRequires: libXrandr-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?with_systemd} == 1
%systemd_requires
%else
Requires(pre): %insserv_prereq
%endif
Requires(pre): %fillup_prereq
%description
Based on the work of FreeRDP and rdesktop, xrdp uses the remote desktop
protocol to present a GUI to the user.
The goal of this project is to provide a fully functional Linux terminal
server, capable of accepting connections from rdesktop, freerdp, and
Microsoft's own terminal server / remote desktop clients.
%prep
%setup -q
cp sesman/sesman.ini sesman/sesman.ini.example
cp xrdp/xrdp.ini xrdp/xrdp.ini.example
%patch0 -p1
%build
./bootstrap
%{configure} \
%if 0%{?with_systemd} == 1
--with-systemdsystemunitdir=%{_unitdir} \
%endif
--enable-fuse \
--disable-static
# More confgiure options:
# --enable-jpeg \
# --enable-kerberos \
# --enable-loadpulsemodules \
# --enable-neutrinordp \
# --enable-pamuserpass \
# --enable-simplesound \
# --enable-tjpeg \
# --enable-xrdpdebug \
# --enable-xrdpvr \
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
%if 0%{?with_systemd} == 1
rm -r %{buildroot}%{_initrddir}
%if 0%{?suse_version} >= 1230
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}
%{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-sesman
%else
%{__ln_s} /sbin/service %{buildroot}%{_sbindir}/rc%{name}
%{__ln_s} /sbin/service %{buildroot}%{_sbindir}/rc%{name}-sesman
%endif
%else
%{__ln_s} %{_initrddir}/%{name} %{buildroot}%{_sbindir}/rc%{name}
%endif
# create sysconfig file and ghost rsakeys.ini
install -d %{buildroot}%{_localstatedir}/adm/fillup-templates
install %{SOURCE1} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
install %{SOURCE2} %{buildroot}%{_datadir}/%{name}/
touch %{buildroot}%{_sysconfdir}/%{name}/rsakeys.ini
# remove libtool cruft
find %{buildroot}%{_libdir}/%{name} -name *.la -delete
%if 0%{?with_systemd} == 1
%pre
%service_add_pre %{name}.service
%service_add_pre %{name}-sesman.service
%endif
%preun
%if 0%{?with_systemd} == 1
%service_del_preun %{name}.service
%service_del_preun %{name}-sesman.service
%else
%stop_on_removal
%endif
%post
/sbin/ldconfig
%if 0%{?with_systemd} == 1
%service_add_post %{name}.service
%service_add_post %{name}-sesman.service
%fillup_only
%else
%fillup_and_insserv
%endif
# generate a keypair used to perform authentication to the remote client
if ! [[ -e %{_sysconfdir}/%{name}/rsakeys.ini ]]; then
xrdp-keygen xrdp
if ! [[ $? == 0 ]]; then
echo "Could not generate rsakeys.ini, please check manually!"
fi
fi
exit 0
%postun
/sbin/ldconfig
%if 0%{?with_systemd} == 1
%service_add_post %{name}.service
%service_add_post %{name}-sesman.service
%else
%insserv_cleanup
%endif
%restart_on_update
%files
%defattr(-, root, root, -)
%doc COPYING sesman/sesman.ini.example xrdp/xrdp.ini.example
%config %{_sysconfdir}/default/%{name}
%config %{_sysconfdir}/pam.d/%{name}-sesman
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/km-0407.ini
%config %{_sysconfdir}/%{name}/km-0409.ini
%config %{_sysconfdir}/%{name}/km-040c.ini
%config %{_sysconfdir}/%{name}/km-0410.ini
%config %{_sysconfdir}/%{name}/km-0419.ini
%config %{_sysconfdir}/%{name}/km-041d.ini
%config %{_sysconfdir}/%{name}/km-0816.ini
%ghost %config(noreplace) %{_sysconfdir}/%{name}/rsakeys.ini
%config(noreplace) %{_sysconfdir}/%{name}/sesman.ini
%config(noreplace) %{_sysconfdir}/%{name}/startwm.sh
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.sh
%config %{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
%{_bindir}/%{name}-dis
%{_bindir}/%{name}-genkeymap
%{_bindir}/%{name}-keygen
%{_bindir}/%{name}-sesadmin
%{_bindir}/%{name}-sesrun
%{_sbindir}/%{name}
%{_sbindir}/%{name}-chansrv
%{_sbindir}/%{name}-sesman
%{_sbindir}/%{name}-sessvc
%{_sbindir}/rc%{name}
%if 0%{?with_systemd} == 1
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}-sesman.service
%{_sbindir}/rc%{name}-sesman
%else
%{_initrddir}/%{name}
%endif
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/libcommon.so*
%{_libdir}/%{name}/libmc.so*
%{_libdir}/%{name}/librdp.so*
%{_libdir}/%{name}/libscp.so*
%{_libdir}/%{name}/libvnc.so*
%{_libdir}/%{name}/libxrdp.so*
%{_libdir}/%{name}/libxrdpapi.so*
%{_libdir}/%{name}/libxup.so*
%{_mandir}/man*/%{name}*.gz
%{_mandir}/man5/sesman.ini.5.gz
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%changelog