initial version
This commit is contained in:
parent
58ce7e147c
commit
4faf1d1422
@ -0,0 +1 @@
|
|||||||
|
xrdp-0.5.0.20090811cvs.tar.gz
|
1
import.log
Normal file
1
import.log
Normal file
@ -0,0 +1 @@
|
|||||||
|
xrdp-0_5_0-0_2_20090811cvs_fc12:HEAD:xrdp-0.5.0-0.2.20090811cvs.fc12.src.rpm:1250272824
|
144
xrdp.init
Normal file
144
xrdp.init
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# xrdp Open source remote desktop protocol (RDP) server
|
||||||
|
#
|
||||||
|
# chkconfig: - 64 36
|
||||||
|
# description: Open source remote desktop protocol (RDP) server
|
||||||
|
#
|
||||||
|
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: xrdp
|
||||||
|
# Required-Start: $network
|
||||||
|
# Required-Stop: $network
|
||||||
|
# Should-Start: $network
|
||||||
|
# Should-Stop: $network
|
||||||
|
# Default-Start:
|
||||||
|
# Default-Stop:
|
||||||
|
# Short-Description: Starts the xrdp daemon
|
||||||
|
# Description: Open source remote desktop protocol (RDP) server
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
# Check that networking is up.
|
||||||
|
[ "${NETWORKING}" = "no" ] && exit 0
|
||||||
|
|
||||||
|
[ -e /etc/sysconfig/xrdp ] && . /etc/sysconfig/xrdp
|
||||||
|
|
||||||
|
start_xrdp() {
|
||||||
|
exec="/usr/sbin/xrdp"
|
||||||
|
prog="xrdp"
|
||||||
|
lockfile=/var/lock/subsys/xrdp
|
||||||
|
[ -x $exec ] || exit 5
|
||||||
|
echo -n $"Starting $prog: "
|
||||||
|
daemon "$exec $XRDP_OPTIONS >> /dev/null"
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && touch $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
stop_xrdp() {
|
||||||
|
prog="xrdp"
|
||||||
|
lockfile=/var/lock/subsys/xrdp
|
||||||
|
echo -n $"Stopping $prog: "
|
||||||
|
killproc $prog
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && rm -f $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
start_sesman() {
|
||||||
|
exec="/usr/sbin/xrdp-sesman"
|
||||||
|
prog="xrdp-sesman"
|
||||||
|
lockfile=/var/lock/subsys/xrdp-sesman
|
||||||
|
[ -x $exec ] || exit 5
|
||||||
|
echo -n $"Starting $prog: "
|
||||||
|
daemon "$exec $SESMAN_OPTIONS >> /dev/null"
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && touch $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
stop_sesman() {
|
||||||
|
prog="xrdp-sesman"
|
||||||
|
lockfile=/var/lock/subsys/xrdp-sesman
|
||||||
|
echo -n $"Stopping $prog: "
|
||||||
|
killproc $prog
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && rm -f $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
start() {
|
||||||
|
start_xrdp
|
||||||
|
start_sesman
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
stop_xrdp
|
||||||
|
stop_sesman
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
stop_xrdp
|
||||||
|
stop_sesman
|
||||||
|
start_xrdp
|
||||||
|
start_sesman
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
restart
|
||||||
|
}
|
||||||
|
|
||||||
|
force_reload() {
|
||||||
|
restart
|
||||||
|
}
|
||||||
|
|
||||||
|
rh_status() {
|
||||||
|
prog="xrdp"
|
||||||
|
status $prog
|
||||||
|
prog="xrdp-sesman"
|
||||||
|
status $prog
|
||||||
|
}
|
||||||
|
|
||||||
|
rh_status_q() {
|
||||||
|
rh_status >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
rh_status_q && exit 0
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
rh_status_q || exit 0
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
rh_status_q || exit 7
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
force-reload)
|
||||||
|
force_reload
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
rh_status
|
||||||
|
;;
|
||||||
|
condrestart|try-restart)
|
||||||
|
rh_status_q || exit 0
|
||||||
|
restart
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
|
||||||
|
exit 2
|
||||||
|
esac
|
||||||
|
exit $?
|
||||||
|
|
9
xrdp.logrotate
Normal file
9
xrdp.logrotate
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
/var/log/xrdp/sesman.log {
|
||||||
|
create 644 root root
|
||||||
|
daily
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
postrotate
|
||||||
|
/etc/rc.d/init.d/xrdp restart > /dev/null 2>/dev/null || :
|
||||||
|
endscript
|
||||||
|
}
|
180
xrdp.spec
Normal file
180
xrdp.spec
Normal file
@ -0,0 +1,180 @@
|
|||||||
|
%{!?_initddir: %global _initddir %{_sysconfdir}/rc.d/init.d}
|
||||||
|
|
||||||
|
%define cvs 20090811cvs
|
||||||
|
Summary: Open source remote desktop protocol (RDP) server
|
||||||
|
Name: xrdp
|
||||||
|
Version: 0.5.0
|
||||||
|
Release: 0.2.%{cvs}%{?dist}
|
||||||
|
License: GPLv2+ with exceptions
|
||||||
|
Group: Applications/Internet
|
||||||
|
URL: http://xrdp.sourceforge.net/
|
||||||
|
#Source0: http://dl.sf.net/xrdp/xrdp-%{version}.tar.gz
|
||||||
|
|
||||||
|
# The source for this package was pulled from upstream's vcs. Use the
|
||||||
|
# following commands to generate the tarball:
|
||||||
|
#
|
||||||
|
# visit http://sourceforge.net/projects/xrdp/develop
|
||||||
|
#
|
||||||
|
# cvs -d:pserver:anonymous@xrdp.cvs.sourceforge.net:/cvsroot/xrdp login
|
||||||
|
# cvs -z3 -d:pserver:anonymous@xrdp.cvs.sourceforge.net:/cvsroot/xrdp co -D 11-09-2009 -P xrdp
|
||||||
|
# mv xrdp xrdp-0.5.0.20090811cvs
|
||||||
|
# tar -czvf xrdp-0.5.0.20090811cvs.tar.gz xrdp-0.5.0.20090811cvs
|
||||||
|
|
||||||
|
|
||||||
|
Source0: %{name}-%{version}.%{cvs}.tar.gz
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
Source1: xrdp.init
|
||||||
|
Source2: xrdp.sysconfig
|
||||||
|
Source3: xrdp.logrotate
|
||||||
|
|
||||||
|
BuildRequires: pam-devel
|
||||||
|
BuildRequires: openssl-devel
|
||||||
|
BuildRequires: autoconf
|
||||||
|
BuildRequires: automake
|
||||||
|
BuildRequires: libtool
|
||||||
|
|
||||||
|
|
||||||
|
#vnc-server provides Xvnc (tigervnc-server in fedora)
|
||||||
|
Requires: vnc-server
|
||||||
|
|
||||||
|
#initscripts requires
|
||||||
|
Requires(post): chkconfig
|
||||||
|
Requires(preun): chkconfig
|
||||||
|
# This is for /sbin/service
|
||||||
|
Requires(preun): initscripts
|
||||||
|
# This is for /sbin/service
|
||||||
|
Requires(postun): initscripts
|
||||||
|
|
||||||
|
|
||||||
|
%description
|
||||||
|
The goal of this project is to provide a fully functional Linux terminal
|
||||||
|
server, capable of accepting connections from rdesktop and Microsoft's own
|
||||||
|
terminal server / remote desktop clients.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}-%{version}.%{cvs}
|
||||||
|
|
||||||
|
# remove unused modules from xrdp login combobox
|
||||||
|
%{__sed} -i -e '/\[xrdp2\]/,$d' xrdp/xrdp.ini
|
||||||
|
|
||||||
|
#fix wrong permission
|
||||||
|
%{__chmod} 644 keygen/keygen.c
|
||||||
|
|
||||||
|
%build
|
||||||
|
./bootstrap
|
||||||
|
|
||||||
|
%configure
|
||||||
|
%{__make} %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
%{__rm} -rf %{buildroot}
|
||||||
|
%{__make} install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
|
#remove .la and .a files
|
||||||
|
find %{buildroot} -name '*.a' -exec rm {} \;
|
||||||
|
find %{buildroot} -name '*.la' -exec rm {} \;
|
||||||
|
|
||||||
|
#install sesman pam config /etc/pam.d/xrdp-sesman
|
||||||
|
%{__install} -Dp -m 644 instfiles/pam.d/xrdp-sesman %{buildroot}%{_sysconfdir}/pam.d/xrdp-sesman
|
||||||
|
|
||||||
|
#installx xrdp initscript /etc/rc.d/init.d/xrdp
|
||||||
|
%{__install} -Dp -m 755 %{SOURCE1} %{buildroot}%{_initddir}/xrdp
|
||||||
|
|
||||||
|
#install xrdp sysconfig /etc/sysconfig/xrdp
|
||||||
|
%{__install} -Dp -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/xrdp
|
||||||
|
|
||||||
|
#install logrotate /etc/logrotate.d/xrdp
|
||||||
|
%{__install} -Dp -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/xrdp
|
||||||
|
|
||||||
|
#install log file /var/log/xrdp-sesman.log
|
||||||
|
%{__mkdir} -p %{buildroot}%{_localstatedir}/log/
|
||||||
|
touch %{buildroot}%{_localstatedir}/log/xrdp-sesman.log
|
||||||
|
|
||||||
|
# rsakeys.ini
|
||||||
|
touch %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini
|
||||||
|
%{__chmod} 0600 %{buildroot}%{_sysconfdir}/xrdp/rsakeys.ini
|
||||||
|
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 = 0 ] ; then
|
||||||
|
/sbin/service %{name} stop >/dev/null 2>&1
|
||||||
|
/sbin/chkconfig --del %{name}
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
%post
|
||||||
|
# This adds the proper /etc/rc*.d links for the script
|
||||||
|
/sbin/chkconfig --add %{name}
|
||||||
|
|
||||||
|
xrdp-keygen xrdp %{_sysconfdir}/xrdp/rsakeys.ini > /dev/null
|
||||||
|
%{__chmod} 0600 %{_sysconfdir}/xrdp/rsakeys.ini
|
||||||
|
|
||||||
|
%postun
|
||||||
|
if [ "$1" -ge "1" ] ; then
|
||||||
|
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc COPYING *.txt
|
||||||
|
%dir %{_libdir}/xrdp
|
||||||
|
%dir %{_sysconfdir}/xrdp
|
||||||
|
%dir %{_datadir}/xrdp
|
||||||
|
%config(noreplace) %{_sysconfdir}/xrdp/sesman.ini
|
||||||
|
%config(noreplace) %{_sysconfdir}/xrdp/xrdp.ini
|
||||||
|
%config(noreplace) %{_sysconfdir}/pam.d/xrdp-sesman
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/xrdp
|
||||||
|
%config(noreplace) %{_sysconfdir}/sysconfig/xrdp
|
||||||
|
%{_initddir}/xrdp
|
||||||
|
%{_sysconfdir}/xrdp/*.sh
|
||||||
|
%{_bindir}/xrdp-sesadmin
|
||||||
|
%{_bindir}/xrdp-keygen
|
||||||
|
%{_bindir}/xrdp-sesrun
|
||||||
|
%{_bindir}/xrdp-sestest
|
||||||
|
%{_sbindir}/xrdp-chansrv
|
||||||
|
%{_sbindir}/xrdp
|
||||||
|
%{_sbindir}/xrdp-sesman
|
||||||
|
%{_sbindir}/xrdp-sessvc
|
||||||
|
%{_datadir}/xrdp/ad256.bmp
|
||||||
|
%{_datadir}/xrdp/cursor0.cur
|
||||||
|
%{_datadir}/xrdp/cursor1.cur
|
||||||
|
%{_datadir}/xrdp/xrdp256.bmp
|
||||||
|
%{_datadir}/xrdp/sans-10.fv1
|
||||||
|
%{_mandir}/man5/*
|
||||||
|
%{_mandir}/man8/*
|
||||||
|
%{_libdir}/xrdp/lib*.so.*
|
||||||
|
%{_libdir}/xrdp/libcommon.so
|
||||||
|
%{_libdir}/xrdp/libmc.so
|
||||||
|
%{_libdir}/xrdp/librdp.so
|
||||||
|
%{_libdir}/xrdp/libscp.so
|
||||||
|
%{_libdir}/xrdp/libvnc.so
|
||||||
|
%{_libdir}/xrdp/libxrdp.so
|
||||||
|
%{_libdir}/xrdp/libxup.so
|
||||||
|
%ghost %{_localstatedir}/log/xrdp-sesman.log
|
||||||
|
%attr(0600,root,root) %verify(not size md5 mtime) %{_sysconfdir}/xrdp/rsakeys.ini
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 13 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 0.5.0-0.2.20090811cvs
|
||||||
|
- more changes to spec file https://bugzilla.redhat.com/show_bug.cgi?id=516364#c10
|
||||||
|
|
||||||
|
* Wed Aug 12 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 0.5.0-0.1.20090811cvs
|
||||||
|
- change versioning schema
|
||||||
|
- improve initscript
|
||||||
|
- fix some macros
|
||||||
|
|
||||||
|
|
||||||
|
* Tue Aug 11 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 0.5.0-2.20090811cvs
|
||||||
|
- changes from BZ#516364 comment 2 from Mamoru Tasaka
|
||||||
|
- changed license to "GPLv2+ with exceptions"
|
||||||
|
- dropped -libs subpackage
|
||||||
|
- use cvs version
|
||||||
|
- remove a patch and use sed instead
|
||||||
|
- remove attr's
|
||||||
|
|
||||||
|
* Thu Apr 02 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> 0.5.0-1
|
||||||
|
- Initial RPM release
|
5
xrdp.sysconfig
Normal file
5
xrdp.sysconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# put some options here
|
||||||
|
|
||||||
|
#XRDP_OPTIONS=""
|
||||||
|
#SESMAN_OPTIONS=""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user