From 6c2c899d600b4264a6d2876b854672015438dbda Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Thu, 5 Mar 2009 08:24:45 +0000 Subject: Get rid of content directly under /var/www * Web interface files now reside under /usr/share/rapid-tunneling/www . * On Debian package: just remove the /var/www/support link. * Thus usage of apache configuration is mandatory. * On rpm: also restart apache. git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6827 283159da-0705-0410-b60c-f2062b4bb6ad --- Makefile | 3 +-- debian/TODO.Debian | 5 ----- debian/control | 6 +++++- debian/rapid-tunneling-gui.links | 1 - rapid-tunneling.conf | 3 ++- rapid-tunneling.spec | 9 ++++----- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index fb584ae..6fce990 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,7 @@ SOURCES = Makefile $(SPEC) $(SCRIPTS) $(CONFIGS) $(INIT_D) $(GUI) \ SBINDIR = /usr/sbin MANDIR = /usr/share/man/man8 BINDIR = /usr/share/rapid-tunneling/bin -WWWROOT = /var/www/html -WWWHOME = $(WWWROOT)/support +WWWHOME = /usr/share/rapid-tunneling/www VER = $(shell awk '/^Version: / {print $$2}' $(SPEC)| head -n 1) RPM_REL = $(shell awk '/^Release: / {print $$2}' $(SPEC)| head -n 1) diff --git a/debian/TODO.Debian b/debian/TODO.Debian index 04c9fc0..b152052 100644 --- a/debian/TODO.Debian +++ b/debian/TODO.Debian @@ -4,11 +4,6 @@ If we do, we must use the current useradd command. If we don't: use adduser. The web interface only assumes that there's such a user. * Do we delete users on purge? -* A symlink under /var/www is only good as a quick hack. - According to the draft webapps policy we should not rely on /var/www/ - to be the web root. But this means that the package will not work out - of the box. Anybody who I asked seems to dismiss this issue. I don't. - http://webapps-common.alioth.debian.org/draft/html/ch-httpd.html#s-httpd-register-symlinks * Reload the httpd after installing the GUI package for the password to take effect. * This password doesn't buy us much, anyway. diff --git a/debian/control b/debian/control index dd136da..213d6ce 100644 --- a/debian/control +++ b/debian/control @@ -27,11 +27,15 @@ Description: RapidTunneling (tm) server Package: rapid-tunneling-gui Architecture: all -Depends: ${misc:Depends}, rapid-tunneling, sudo, +Depends: ${misc:Depends}, rapid-tunneling, sudo, libapache2-mod-php5 | php5-cgi | libapache-mod-php5 +Recommends: apache2 Description: Xorcom RapidTunneling (tm) web 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. + . + Should work with any httpd that supports PHP, but any one other than + apache2 will require manual configuration. diff --git a/debian/rapid-tunneling-gui.links b/debian/rapid-tunneling-gui.links index b1f383a..4857aea 100644 --- a/debian/rapid-tunneling-gui.links +++ b/debian/rapid-tunneling-gui.links @@ -1,2 +1 @@ -/usr/share/rapid-tunneling/www /var/www/support /etc/rapid-tunneling/apache2-rapid-tunneling.conf /etc/apache2/conf.d/rapid-tunneling.conf diff --git a/rapid-tunneling.conf b/rapid-tunneling.conf index 7f17156..22a3218 100644 --- a/rapid-tunneling.conf +++ b/rapid-tunneling.conf @@ -1,4 +1,5 @@ - +Alias /support /usr/share/rapid-tunneling/www + AuthUserFile /etc/rapid-tunneling/gui.htpasswd AuthName "RapidTunneling(tm)" AuthType Basic diff --git a/rapid-tunneling.spec b/rapid-tunneling.spec index 94d380f..5ed12cb 100644 --- a/rapid-tunneling.spec +++ b/rapid-tunneling.spec @@ -10,8 +10,6 @@ Requires: openssh-clients busybox gnupg BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -%define webroot /var/www/html/support - %description RapidTunneling (tm) allows remote access to machines behind firewalls and NAT routers via SSH port forwarding. @@ -92,9 +90,9 @@ TEXT="Defaults>$user !lecture $user ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling $user ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling-status" if ! fgrep -q "$TEXT" $SUDOERS; then echo "$TEXT" >> $SUDOERS; fi -# FIXME: reload apache +service httpd reload -%preun gui +%postun gui if [ "$1" = 0 ]; then SUDOERS=/etc/sudoers user="asterisk" @@ -103,6 +101,7 @@ $user ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling $user ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling-status" fgrep -v "$TEXT" $SUDOERS > ${SUDOERS}.tmp && cp ${SUDOERS}.tmp $SUDOERS && rm ${SUDOERS}.tmp fi +service httpd reload %files %defattr(-, root, root, 0755) @@ -124,7 +123,7 @@ fi %files gui %defattr(-, root, root, 0755) -%{webroot}/ +%{_datadir}/rapid-tunneling/www %config(noreplace) /etc/rapid-tunneling/gui.htpasswd %config /etc/httpd/conf.d/rapid-tunneling.conf -- cgit v1.2.3