Summary: Xorcom RapidTunneling (tm) Name: rapid-tunneling Version: 1.14 Release: 1 License: GPLv2+ Group: Applications/Internet URL: http://www.xorcom.com/ Source: rapid-tunneling-%{version}.tar.gz #BuildRequires: asciidoc Requires: openssh-clients busybox BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description RapidTunneling (tm) allows remote access to machines behind firewalls and NAT routers via SSH port forwarding. %package server Summary: Server part of RapidTunneling Group: Applications/Internet Requires: openssh-server shadow-utils %description server This package contains the server files needed to run RapidTunneling Server. %package gui Summary: Xorcom RapidTunneling (tm) web GUI Group: Applications/Internet Requires: rapid-tunneling, sudo %description gui RapidTunneling (tm) allows remote access to machines behind firewalls and NAT routers via SSH port forwarding. This package contains the web-based user interface to initiate and control tunnels to the server. %prep %setup -q %build make %install %{__rm} -rf %{buildroot} make install DESTDIR=%{buildroot} # The placeholder is needed for debs, but creates an unnecessary file # conflicts on rpm: # The base directory itself is needed to allow 'useradd -m' in post # scripts. %{__rm} -f %{buildroot}/var/lib/rapid-tunneling/.placeholder %clean %{__rm} -rf %{buildroot} %post server HOME_DIR=/var/lib/rapid-tunneling/support NEW_USER=support NEW_GROUP=$NEW_USER getent group $NEW_GROUP >/dev/null || groupadd -r $NEW_GROUP if ! getent passwd $NEW_USER >/dev/null; then useradd -r -g $NEW_GROUP -m -d $HOME_DIR \ -c "RapidTunneling support user" $NEW_USER fi LINE='. /usr/share/rapid-tunneling/support_env' PROFILE=$HOME_DIR/.bash_profile if ! fgrep -q "$LINE" $PROFILE 2>/dev/null; then echo "$LINE" >> $PROFILE fi %post gui # add a user with uid=gid=0 if ! getent passwd rapid-tunneling >/dev/null ; then useradd -d /var/lib/rapid-tunneling/home -m -u 0 -g 0 -o rapid-tunneling fi SUDOERS=/etc/sudoers user="asterisk" TEXT="Defaults>$user !lecture $user ALL= NOPASSWD:/usr/sbin/rapid-tunneling $user ALL= NOPASSWD:/usr/sbin/rapid-tunneling-status" if ! fgrep -q "$TEXT" $SUDOERS; then echo "$TEXT" >> $SUDOERS; fi service httpd reload %postun gui if [ "$1" = 0 ]; then # Not optimal, but better than nothing. Only proper fix # is suddoers.d: SUDOERS=/etc/sudoers sed -i -e "/NOPASSWD:\/usr\/sbin\/rapid-tunneling/d" /etc/sudoers fi service httpd reload %files %defattr(-, root, root, 0755) %doc README README.html ChangeLog %{_sbindir}/rapid-tunneling %{_sbindir}/rapid-tunneling-status %{_mandir}/man8/rapid-tunneling.8* %{_mandir}/man8/rapid-tunneling-status.8* /var/lib/rapid-tunneling %files server %defattr(-, root, root, 0755) %doc README ChangeLog README.html rt_handle_uploaded_key %config /etc/bash_completion.d/rtadm %config(noreplace) /etc/rapid-tunneling/rtadm %{_datadir}/rapid-tunneling/support_env %{_datadir}/rapid-tunneling/bin/rtadm %{_datadir}/rapid-tunneling/bin/rt-from-remote /var/lib/rapid-tunneling %files gui %defattr(-, root, root, 0755) %{_datadir}/rapid-tunneling/www %config(noreplace) /etc/rapid-tunneling/gui.htpasswd %config /etc/httpd/conf.d/rapid-tunneling.conf %config /etc/sudoers.d/rapid-tunneling %changelog * Tue May 15 2012 Tzafrir Cohen 1.14-1 - Do generate home directory in rapid-tunneling-server. * Mon Dec 19 2011 Tzafrir Cohen 1.13-1 - Basically only a rebuild as tarball in 1.12 was broken. * Mon Dec 19 2011 Tzafrir Cohen 1.12-1 - Removed separate rapid-tunneling "user". - Work around a bug in centos5 sudo: no more permanent "connecting". - Separate sudoers file added for e.g. Centos6. * Tue Jun 14 2011 Tzafrir Cohen 1.11-1 - Only create rapid-tunneling user in scripts of -gui - Don't delete created users (rpmlint, Elad) - Dependency and misc. cleanups (rpmlint, Elad) - License is GPL2+ (Elad) - Do include README and upstream Changelog. * Sun Oct 3 2010 Tzafrir Cohen 1.10-1 - Get rid if the dedicated sshd. * Sun Jan 31 2010 Diego Iastrubni 1.02-1 - Fixed busybox path in rapid-recovery script under Centos * Sun Feb 01 2009 Alex Landau 1.01-1 - Added password protection in the GUI. * Sun Dec 14 2008 Alex Landau 1.0-1 - Initial RPM release.