summaryrefslogtreecommitdiff
path: root/README.md
blob: aa38c63eb328bd023fd80a855cda68b8441be621 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# GNU Savannah Evaluation Helpr Scripts

## Intro

This is a hodgepodge of script try to heuristically detect copyright and
license statements, together with other requirements for GNU Savannah Hosting.

Official Requirement list:
   https://savannah.gnu.org/register/requirements.php

Unofficial Expansions:
   http://savannah.gnu.org/maintenance/HowToGetYourProjectApprovedQuickly/


## Usage

To check a local directory:

    ./gsv-eval-local.sh  Project-Name   DIRECTORY

To check a remote repository:

    ./gsv-eval-remote.sh output.html 'GNU Hello' \
                         http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz


## Required software for the scripts

    apt-get install git pandoc

NOTE: Pandoc>-1.12 is required.

## Required software for the website

    apt-get install lighttpd python python-dev python-pip redis-server
    pip install flask
    pip install rq
    pip install gunicorn
    pip install requests

## Website setup

    # Evaluation results will be stored here
    sudo mkdir /var/lib/gsv-eval
    # logs will be stored here
    sudo mkdir /var/log/gsv-eval

    # GSV-Eval python+workers likely running as 'www-data'.
    # (if not, change start-up scripts)
    sudo chown www-data:www-data /var/lib/gsv-eval /var/log/gsv-eval
    # For debugging, If needed
    sudo chmod g+w /var/lib/gsv-eval /var/log/gsv-eval

## Testing website manually

Open one terminal, and run:

    $ cd ./website
    $ python gsv_eval_flask.py
    * Running on http://0.0.0.0:5105/
    * Restarting with reloader

Open a second terminal, and run:

    $ cd ./website
    $ LC_ALL=C rqworker
    19:39:05 RQ worker started, version 0.4.6
    19:39:05
    19:39:05 *** Listening on default...

Now visit the website (at <http://0.0.0.0.5105>) and submit a new job.

The output of `rqworker` should show the result of the evaluation.

The results should be stored in `/var/lib/gsv-eval/*.html`.

## Running website

Start the web frontend (it's a webserver listening on 127.0.0.1:5105):

    sudo ./website/gsv-eval-web.sh start

Start the backend:

    sudo ./website/gsv-eval-worker.sh start

To check status:

    ./website/gnu-eval-web.sh status
    ./website/gnu-eval-worker.sh status

To stop:

    sudo ./website/gsv-eval-web.sh stop
    sudo ./website/gsv-eval-worker.sh stop

To monitor logs:

    tail -f /var/log/gsv-eval/*.log

PID files stored in:

    /var/run/gsv-eval/*.pid

## Configure Apache front-end

```
##
## Configuration for GNU-Savannah Evaluation website.
##
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName gnueval.housegordon.org

    ProxyRequests Off
    ProxyPass / http://127.0.0.1:5105/

    ErrorLog ${APACHE_LOG_DIR}/gnueval.error.log
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/gnueval.access.log combined
</VirtualHost>

```

## Configure Lighttpd front-end

```
$HTTP["host"] == "gnueval.housegordon.org" {
    accesslog.filename = "/var/log/lighttpd/gnueval.access.log"
    proxy.server = (""    => (( "host" => "127.0.0.1", "port" => 5105)))
}

```
## License

Copyright (C) 2014 Assaf Gordon (assafgordon@gmail.com)

The scripts are licensed under GPLv3-or-later.