Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/3.8.0' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
timwhite committed Jan 10, 2016
2 parents 3ea9567 + 7602daa commit 0bfb7e0
Show file tree
Hide file tree
Showing 707 changed files with 40,008 additions and 166,959 deletions.
1 change: 0 additions & 1 deletion .bzrignore

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
DONORS
files/usr/share/grase/www/*/templates_c/
files/usr/share/grase/vendor/
files/usr/share/grase/www/vendor/
22 changes: 22 additions & 0 deletions Makefile
@@ -0,0 +1,22 @@
COMPOSER_FILES = files/usr/share/grase/composer.json files/usr/share/grase/composer.lock files/usr/share/grase/vendor/
BOWER_FILES = files/usr/share/grase/bower.json
VERSION = $(shell sed -n '/grase-www-portal/s/[^ ]* (//;s/).*//p;q' debian/changelog)

all: bower composer
#files/usr/share/grase/src/includes/constants.php: debian/changelog
sed -i 's/APPLICATION_VERSION", "[^"]*"/APPLICATION_VERSION", "$(VERSION)"/' files/usr/share/grase/src/includes/constants.php
chmod 0440 sudo/grase-www-portal

bower:
mkdir -p ext-libs/bower
cp $(BOWER_FILES) ext-libs/bower
cd ext-libs/bower; /usr/local/bin/bower install

composer:
cd files/usr/share/grase/; /usr/local/bin/composer install
mkdir -p ext-libs/composer
cp -r $(COMPOSER_FILES) ext-libs/composer/
rm -fr files/usr/share/grase/vendor

clean:
rm -fr ext-libs
13 changes: 13 additions & 0 deletions README.md
@@ -0,0 +1,13 @@
# Grase Hotspot

The GRASE Hotspot is a project that glues individual components together easily, and provides a nice simple interface to administer the hotspot. With a lot of time and effort, most people can follow the tutorials on the internet and setup up MySQL, FreeRadius, CoovaChilli, Squid and any other optional components, and setup a Captive Portal Hotspot. But as soon as one component changes, for example FreeRadius changed how it’s config files are handled, the whole system breaks and the tutorial doesn’t help.

The GRASE Hotspot takes all the hard work out of keeping the individual components glued together, and provides a nice simple interface to manage the Hotspot and it’s users. As components change, the project is updated so the glue stays together.

## Installation

See the Wiki page <https://github.com/GraseHotspot/grase-www-portal/wiki/Installation>

### grase-www-portal package/repository

This is the main Grase Hotspot package. It contains the web interface, and depends on the config packages.
8 changes: 8 additions & 0 deletions debian/CONTRIBUTORS
Expand Up @@ -10,6 +10,7 @@ Gilbert Robert <robert:prolibre.com>
Silverio Santos <SSantos:web.de>
Zoccali Giovanni <Gianny.78:libero.it>
S. Schneeweiß <SeanSnowWhite:aol.com>
Asen Ivanov <asen:hotgate.net>

# Donors
Glyn Pollington <Glyn.Pollington:hp.com>
Expand All @@ -21,3 +22,10 @@ Maryono <yho1979:gmail.com>
David Hansen <scrugio:gmail.com>
Steffen Krämer <skraemer:hotel-felsentor.de>
Sean Schneeweiss <thesnowwhites:aol.com>
Joël Niederwipper <j_niederwipper:yahoo.de>
Brian Gueldner <briangueldner:gmail.com>
Stefan Krakkai <info:sck-ict.com>
Thomas Crosbie <tcrosbie7:gmail.com>

# Hardware Donations
Josef Himmelbauer <JHimmelbauer:EDV-Himmelbauer.at>
2 changes: 1 addition & 1 deletion debian/README
Expand Up @@ -4,4 +4,4 @@ The Debian Package grase-www-portal
This package installs the webapps that make up the portal. UAM, Radmin,
and Usermin.

-- Tim White <tim@hotspot.purewhite.id.au> Sun, 25 Apr 2010 05:38:26 +0800
-- Tim White <tim@grasehotspot.org> Sun, 25 Apr 2010 05:38:26 +0800
41 changes: 40 additions & 1 deletion debian/changelog
@@ -1,9 +1,48 @@
grase-www-portal (3.8.0) purewhite; urgency=low

[ Tim White ]
* Some report updates
* "Free Access" user auto create and login (TOS style login)
* Auto refresh of sessions page (Fixes #23)
* Change how batches are created to prevent errors and also check for
uniqueness of usernames
* Fix up some database logging
* Added 'Cron' function to delete all users who have no remaining time limit
(append ?deleteoutoftimeusers=1 to the end of the cron url)
* Added 'Cron' function to delete all users who have no remaining data limit
(append ?deleteoutofdatausers=1 to the end of the cron url)
* Fix bug in CRON logging timestamp
* Migrating report charts to Google Chart API
* Fix CRON job that deletes expired users, it was missing users who expired
at the start of the month
* Install and use Composer and Bower to manage external dependencies
* Decrease Admin interval to 10 minutes to allow settings to take effect
sooner
* Added batch deletion
* Removed TCPDF (and print to PDF) due to it being a very specific use case
without customisations. It'll be easier to do pixel perfect layout with CSV
export and mailmerge software.
* Added printing of group users (Fixes #41)
* Ability to customise CSS for printing of tickets
* Added DHCP leases page to see current output of chilli_query
* Hidden Advanced Settings Page
* Make username/password length customisable
* Cleanup old settings
* Use Smarty3 from Composer instead of Debian/Ubuntu packages
* Bring Account comments into sessions page (Fixes #98)
* Fix LAN/WAN display issues (Closes #126)
* Use referrer meta tag to only send Origin, and not the full URL when clicking links to prevent things like MAC addresses from leaking. (Closes #100)
* Simultaneous Use can now be a number instead of a boolean (Closes #3)
* New Login page look


-- Tim White <tim@grasehotspot.org> Sun, 10 Jan 2016 19:56:55 +1000

grase-www-portal (3.7.7.11) purewhite; urgency=medium

* Backport Freelogin code (TOS Accept code)

-- Tim White <tim@grasehotspot.org> Sun, 17 Aug 2014 19:29:55 +1000

grase-www-portal (3.7.7.10) purewhite; urgency=medium

* Actually bump version number
Expand Down
2 changes: 1 addition & 1 deletion debian/control
@@ -1,7 +1,7 @@
Source: grase-www-portal
Section: unknown
Priority: extra
Maintainer: Tim White <tim@hotspot.purewhite.id.au>
Maintainer: Tim White <tim@grasehotspot.org>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.8.3
Homepage: <insert the upstream URL, if relevant>
Expand Down
18 changes: 15 additions & 3 deletions debian/control.in
@@ -1,14 +1,14 @@
Source: grase-www-portal
Section: net
Priority: extra
Maintainer: Tim White <tim@hotspot.purewhite.id.au>
Maintainer: Tim White <tim@grasehotspot.org>
Build-Depends: @cdbs@, config-package-dev
Standards-Version: 3.9.1
Homepage: http://hotspot.purewhite.id.au/
Homepage: http://grasehotspot.org/

Package: grase-www-portal
Architecture: all
Depends: ${misc:Depends}, grase-conf-freeradius (>= 1.6), php5-cli, php5, php-mdb2-driver-mysql, php-mdb2, php-auth, php5-intl, smarty, php-gettext, javascript-common, grase-conf-apache2 | grase-conf-nginx, dbconfig-common, mysql-client, mysql-server, libjs-codemirror, gzip
Depends: ${misc:Depends}, grase-conf-freeradius (>= 1.9.4), php5-cli, php5, php-mdb2-driver-mysql, php-mdb2, php-auth, php5-intl, php-gettext, javascript-common, grase-conf-apache2 | grase-conf-nginx, dbconfig-common, mysql-client, mysql-server, gzip, grase-www-portal-ext-libs (= ${binary:Version}), wget
Provides: ${diverted-files}
Conflicts: ${diverted-files}
Description: Portal files for the GRASE Hotspot System
Expand All @@ -17,3 +17,15 @@ Description: Portal files for the GRASE Hotspot System
users and other hotspot related tasks.
.
This package provides the portal webapps

Package: grase-www-portal-ext-libs
Architecture: all
Depends: ${misc:Depends}
Provides: ${diverted-files}
Conflicts: ${diverted-files}
Description: External Libraries for the GRASE Hotspot System
The GRASE Hotspot System binds together CoovaChilli, Freeradius, MySQL,
and other systems as well as providing an administrative frontend to managing
users and other hotspot related tasks.
.
This package provides the external libraries for the portal webapps
8 changes: 4 additions & 4 deletions debian/copyright
@@ -1,14 +1,14 @@
This work was packaged for Debian by:

Timothy White <hotspot@hotspot.purewhite.id.au> on Sun, 25 Apr 2010 05:38:26 +0800
Timothy White <tim@grasehotspot.org> on Sun, 25 Apr 2010 05:38:26 +0800

Upstream Author(s):

Timothy White <hotspot@hotspot.purewhite.id.au>
Timothy White <tim@grasehotspot.org>

Copyright:

Copyright (C) 2008 Timothy White
Copyright (C) 2008-2014 Timothy White

License:

Expand All @@ -30,7 +30,7 @@ Public License version 3 can be found in '/usr/share/common-licenses/GPL-3'.

The Debian packaging is:

Copyright (C) 2010 Timothy White <hotspot@hotspot.purewhite.id.au>
Copyright (C) 2010 Timothy White <tim@grasehotspot.org>

and is licensed under the GPL version 3, see above.

2 changes: 2 additions & 0 deletions debian/grase-www-portal-ext-libs.install
@@ -0,0 +1,2 @@
ext-libs/composer/vendor/* /usr/share/grase/vendor/
ext-libs/bower/bower_components/* /usr/share/grase/www/vendor/
13 changes: 2 additions & 11 deletions debian/grase-www-portal.cron.d
Expand Up @@ -4,18 +4,9 @@
# m h dom mon dow command

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#MAILTO=hotspot@hotspot.purewhite.id.au
#MAILTO=
## NEEDS USERNAME
#@daily root /root/system/install/upgrade_script.sh
#@reboot root /usr/share/grase/www/radmin/scripts/radius_stale > /dev/null
#@daily root /usr/share/grase/www/radmin/scripts/radius_stale > /dev/null
#3 5 1,2 * * root /usr/share/grase/www/radmin/scripts/radius_stale > /dev/null
#17 5 1,2 * * root /usr/share/grase/www/radmin/scripts/radius_monthly_acct
#37 3 3 * * root /usr/share/grase/www/radmin/scripts/radius_old_users
@monthly nobody /usr/share/grase/www/radmin/scripts/mirror_common_apps.sh
#30 2 * * * root /usr/share/grase/www/radmin/scripts/avast_mirror

@daily root /usr/share/grase/www/radmin/scripts/mysql_backup
@daily root /usr/share/grase/scripts/mysql_backup

# Most cron scripts have moved to PHP classes actived by cron.php
@hourly nobody wget -q http://127.0.0.1/grase/radmin/cron.php -O -
Expand Down
1 change: 1 addition & 0 deletions debian/grase-www-portal.install
@@ -1 +1,2 @@
files/* /
sudo/grase-www-portal /etc/sudoers.d/
41 changes: 30 additions & 11 deletions debian/postinst
Expand Up @@ -27,14 +27,29 @@ if [ "$action" != configure ]
exit 0
fi

install_composer_deps(){ # Install composer and install/upgrade dependencies
cd /usr/share/grase/
if [ ! -e 'composer.phar' ]; then
php -r "readfile('https://getcomposer.org/installer');" | php
fi
php composer.phar self-update
php composer.phar install
}

install_bower_deps(){ # Install Bower and install/upgrade depenencies
cd /usr/share/grase/
npm install -g bower
bower update
}

call_cron(){ # Call cron so certain upgrades can occur
wget -q http://127.0.0.1/grase/radmin/cron.php -O - || true
}

fix_dir_perms(){
chgrp www-data -R /usr/share/grase/www/ || true
chmod ag+rw -R /usr/share/grase/www/images/logo.png /usr/share/grase/www/radmin/templates_c /usr/share/grase/www/uam/templates_c || true
chmod a+rw -R /usr/share/grase/www/public/* || true
chgrp www-data -R /usr/share/grase/www/ || true
chmod ag+rw -R /usr/share/grase/www/radmin/templates_c /usr/share/grase/www/uam/templates_c >/dev/null 2>&1 || true
chmod ag+rw /usr/share/grase/www/images || true

}

Expand All @@ -46,13 +61,11 @@ copy_favicon(){
cp -n /usr/share/grase/www/favicon.ico /var/www/favicon.ico || true
}

link_logo(){
#if [[ ! -a /usr/share/grase/www/images/logo.png ]]
#then

# Don't worry about tests, will fail silently
ln -s graselogo.png /usr/share/grase/www/images/logo.png > /dev/null || true
#fi
unlink_logo(){
if [ -h /usr/share/grase/www/images/logo.png ]
then
rm /usr/share/grase/www/images/logo.png > /dev/null || true
fi

}

Expand All @@ -66,10 +79,16 @@ if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
dpkg-maintscript-helper rm_conffile /etc/apache2/conf.d/grase.conf -- "$@"
fi

link_logo
# Shouldn't need to link the logo thanks to new rewrites
unlink_logo

clear_template_cache

#install_composer_deps

# Debian 7 doesn't have npm easily installable
#install_bower_deps

fix_dir_perms

copy_favicon
Expand Down
11 changes: 11 additions & 0 deletions debian/rules
Expand Up @@ -2,6 +2,8 @@

DEB_AUTO_UPDATE_DEBIAN_CONTROL = true

export DH_OPTIONS=-X.git

#DEB_DIVERT_EXTENSION = .grase
# Replace some base files with simple replacements.
#DEB_DIVERT_FIiLES_grase-monit-conf += \
Expand All @@ -15,6 +17,15 @@ DEB_AUTO_UPDATE_DEBIAN_CONTROL = true
# These files are installed via dh_install from the files/ directory
# (see debian/grase-conf-monit.install)

DEB_FIXPERMS_EXCLUDE := /etc/sudoers.d/grase-www-portal

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/config-package.mk

build: build-stamp

build-stamp:
dh_testdir
$(MAKE)
touch $@

3 changes: 3 additions & 0 deletions files/usr/share/grase/.bowerrc
@@ -0,0 +1,3 @@
{
"directory" : "www/vendor/"
}
11 changes: 11 additions & 0 deletions files/usr/share/grase/bower.json
@@ -0,0 +1,11 @@
{
"name": "Grase Hotspot",
"dependencies": {
"bootstrap": "*",
"fontawesome": "*",
"jquery": "<2.*",
"jquery.tablesorter": "*",
"codemirror": "v3.*",
"codemirror-ui": "https://github.com/jagthedrummer/codemirror-ui.git#~0.0.14"
}
}
24 changes: 24 additions & 0 deletions files/usr/share/grase/composer.json
@@ -0,0 +1,24 @@
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GraseHotspot/smarty-gettext"
}
],
"require": {
"smarty-gettext/smarty-gettext": "@dev",
"smarty/smarty": "3.1.*"
},
"autoload":
{
"psr-4":
{
"Grase\\": "src/Grase/"
},
"files": [
"src/includes/constants.php",
"src/includes/grase-bootstrap.php"
],
"classmap" : ["www/radmin/classes/"]
}
}

0 comments on commit 0bfb7e0

Please sign in to comment.