From c72f0dd46eb192e21aa0d74cba728cb1fbd26a75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Sun, 23 Nov 2014 09:31:39 +0100 Subject: [PATCH] Generated xrdp component for uds actor for rh based distros --- actors/.gitignore | 2 +- actors/linux/buildrpm.sh | 8 +++- actors/linux/udsactor-1.7.0.spec | 2 +- actors/linux/udsactor-xrdp-1.7.0.spec | 61 +++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 actors/linux/udsactor-xrdp-1.7.0.spec diff --git a/actors/.gitignore b/actors/.gitignore index 675118bb..4d038f60 100644 --- a/actors/.gitignore +++ b/actors/.gitignore @@ -5,4 +5,4 @@ udsactor*.build udsactor*.changes /udsactor_1.7.0.dsc /udsactor_1.7.0.tar.xz -/udsactor-1.7.0-1.noarch.rpm +/udsactor*.rpm diff --git a/actors/linux/buildrpm.sh b/actors/linux/buildrpm.sh index f47385cf..ce568163 100755 --- a/actors/linux/buildrpm.sh +++ b/actors/linux/buildrpm.sh @@ -2,8 +2,12 @@ top=`pwd` -#rm -rf rpm +rm -rf rpm for folder in SOURCES BUILD RPMS SPECS SRPMS; do mkdir -p rpm/$folder done -rpmbuild -v -bb --clean --target noarch 'udsactor-1.7.0.spec' 2>&1 + +for pkg in udsactor-1.7.0.spec udsactor-xrdp-1.7.0.spec; do + rpmbuild -v -bb --clean --target noarch $pkg 2>&1 +done + diff --git a/actors/linux/udsactor-1.7.0.spec b/actors/linux/udsactor-1.7.0.spec index c6bf8424..a10966a7 100644 --- a/actors/linux/udsactor-1.7.0.spec +++ b/actors/linux/udsactor-1.7.0.spec @@ -23,7 +23,7 @@ Provides: udsactor %install curdir=`pwd` cd ../.. -make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh install +make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh install-udsactor cd $curdir %clean diff --git a/actors/linux/udsactor-xrdp-1.7.0.spec b/actors/linux/udsactor-xrdp-1.7.0.spec new file mode 100644 index 00000000..b07abb5f --- /dev/null +++ b/actors/linux/udsactor-xrdp-1.7.0.spec @@ -0,0 +1,61 @@ +%define _topdir %(echo $PWD)/rpm +%define name udsactor-xrdp +%define version 1.7.0 +%define release 1 +%define buildroot %{_topdir}/%{name}-%{version}-%{release}-root + +BuildRoot: %{buildroot} +Name: %{name} +Version: %{version} +Release: %{release} +Summary: Glue between UDS Actor and XRDP +License: BSD3 +Group: Admin +Requires: xrdp udsactor pam +Vendor: Virtual Cable S.L.U. +URL: http://www.udsenterprise.com +Provides: udsactor-xrdp + +%define _rpmdir ../ +%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm + + +%install +curdir=`pwd` +cd ../.. +make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh install-udsactor-xrdp +cd $curdir + +%clean +rm -rf $RPM_BUILD_ROOT +curdir=`pwd` +cd ../.. +make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh clean +cd $curdir + + +%post +SESMANFILE=/etc/pam.d/xrdp-sesman +TMPFILE=$(mktemp /tmp/sesman.XXXXX) +grep -v uds $SESMANFILE > $TMPFILE +echo >> $TMPFILE +echo "# Added by udsactor-xrdp" >> $TMPFILE +echo "session optional pam_exec.so /usr/bin/uds-sesman" >> $TMPFILE +cp $TMPFILE $SESMANFILE +rm $TMPFILE > /dev/null 2>&1 + +%preun + +%postun +SESMANFILE=/etc/pam.d/xrdp-sesman +TMPFILE=$(mktemp /tmp/sesman.XXXXX) +grep -v uds $SESMANFILE > $TMPFILE +cp $TMPFILE $SESMANFILE +rm $TMPFILE > /dev/null 2>&1 + +%description +This package provides the required components to allow this machine to work on an environment managed by UDS Broker. + +%files +%defattr(-,root,root) +/usr/bin/* \ No newline at end of file