Gentoo Archives: gentoo-commits

From: "Alfredo Tupone (tupone)" <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-apps/liquid_feedback_frontend/files: postinstall-en.txt myconfig.lua lqfb-apache.conf lqfb.example.com.conf
Date: Tue, 28 May 2013 12:52:03
Message-Id: 20130528125156.A4C502171D@flycatcher.gentoo.org
1 tupone 13/05/28 12:51:56
2
3 Added: postinstall-en.txt myconfig.lua lqfb-apache.conf
4 lqfb.example.com.conf
5 Log:
6 Nuw package
7
8 (Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key 0145142D)
9
10 Revision Changes Path
11 1.1 www-apps/liquid_feedback_frontend/files/postinstall-en.txt
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/liquid_feedback_frontend/files/postinstall-en.txt?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/liquid_feedback_frontend/files/postinstall-en.txt?rev=1.1&content-type=text/plain
15
16 Index: postinstall-en.txt
17 ===================================================================
18 0. DATABASE SETUP
19
20 To use Liquid Feedback you have to follow these
21 simple steps, which have to be done as the postgres system user (or
22 which ever is the database superuser):
23
24 $ createuser liquid_feedback
25 and answer the following
26 Shall the new role be a superuser? (y/n) n
27 Shall the new role be allowed to create databases? (y/n) y
28 Shall the new role be allowed to create more new roles? (y/n) n
29
30 $ psql
31 postgres=# ALTER USER liquid_feedback WITH PASSWORD 'the_new_password';
32
33 $ createdb -U liquid_feedback liquid_feedback
34 $ psql -U liquid_feedback liquid_feedback
35 liquid_feedback=# \i ${MY_INSTALLDIR}/liquid_feedback_core/core.sql
36 liquid_feedback=# \i ${MY_INSTALLDIR}/liquid_feedback_core/init.sql
37 INSERT INTO system_setting (member_ttl) VALUES ('1 year');
38 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 hour', 20, 6);
39 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (false, '1 day', 80, 12);
40 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 hour', 200, 60);
41 INSERT INTO contingent (polling, time_frame, text_entry_limit, initiative_limit) VALUES (true, '1 day', 800, 120);
42 INSERT INTO policy (index, name, admission_time, discussion_time, verification_time, voting_time, issue_quorum_num, issue_quorum_den, initiative_quorum_num, initiative_quorum_den) VALUES (1, 'Default policy', '8 days', '15 days', '8 days', '15 days', 10, 100, 10, 100);
43
44 cd /var/liquid_feedback_frontend
45 /usr/lib/webmcp/framework/bin/webmcp_shell myconfig
46 Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
47 > member = Member:by_id(1)
48 > member:set_password("type-password-here")
49 > member:save()
50 > os.exit()
51
52 Ensure that "lf_update dbname=liquid_feedback" and
53 "lf_update_suggestion_order dbname=liquid_feedback" are called
54 regularly! It is required to run these commands regularly
55 (i.e. every 5 minutes via cron) to update cached supporter counts,
56 to change the state of issues when neccessary, to calculate the
57 result of votings, etc. If you wish, copy the created lf_update
58 and lf_update_suggestion_order files to /usr/local/bin or a
59 similar directory.
60
61 It is possible to run these two commands in parallel, if a setup
62 requires splitting the load to multiple processor cores. In other
63 cases it is recommended to run "lf_update" first, and then
64 "lf_update_suggestion_order".
65
66 To create an export file, which is containing all but private data,
67 you may use the lf_export shell-script:
68 $ lf_export liquid_feedback export.sql.gz
69
70
71
72
73 1.1 www-apps/liquid_feedback_frontend/files/myconfig.lua
74
75 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/liquid_feedback_frontend/files/myconfig.lua?rev=1.1&view=markup
76 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/liquid_feedback_frontend/files/myconfig.lua?rev=1.1&content-type=text/plain
77
78 Index: myconfig.lua
79 ===================================================================
80 config.absolute_base_url = "https://lqfb.example.com/lf"
81 config.instance_name = "lf"
82 config.database = { engine='postgresql', dbname='liquid_feedback', user='liquid_feedback', password='xxx'}
83 config.enable_debug_trace = true
84
85 execute.config("init")
86
87 config.formatting_engine_executeables = {
88 rocketwiki= "rocketwiki-lqfb",
89 compat = "rocketwiki-lqfb-compat"
90 }
91
92 -- Checkbox(es) the user has to accept while registering
93 --
94 --
95 ----
96 --------------------------------------------------------------------------
97 config.use_terms_checkboxes = {
98 {
99 name = "terms_of_use_v1",
100 html = "I accept the terms of use.",
101 not_accepted_error = "You have to accept the terms of use to be able to regi ster."
102 },
103 -- {
104 -- name = "extra_terms_of_use_v1",
105 -- html = "I accept the extra terms of use.",
106 -- not_accepted_error = "You have to accept the extra terms of use to be able to register."
107 -- }
108 }
109
110
111
112 1.1 www-apps/liquid_feedback_frontend/files/lqfb-apache.conf
113
114 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/liquid_feedback_frontend/files/lqfb-apache.conf?rev=1.1&view=markup
115 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/liquid_feedback_frontend/files/lqfb-apache.conf?rev=1.1&content-type=text/plain
116
117 Index: lqfb-apache.conf
118 ===================================================================
119 RewriteEngine on
120
121 RewriteRule ^/$ /lf/ [R]
122
123 RewriteRule ^/lf/static/(.*)$ /lf/static/$1 [L,PT]
124
125 RewriteCond %{QUERY_STRING} (.*)?
126 RewriteRule ^/lf/$ /lf/webmcp-wrapper.lua?_webmcp_urldepth=0&_webmcp_module=index&_webmcp_view=index&%1 [PT]
127
128 RewriteCond %{QUERY_STRING} (.*)?
129 RewriteRule ^/lf/([^/]+)/$ /lf/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=index&%1 [PT]
130
131 RewriteCond %{QUERY_STRING} (.*)?
132 RewriteRule ^/lf/([^/]+)/([^/\.]+)$ /lf/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_action=$2&%1 [PT]
133
134 RewriteCond %{QUERY_STRING} (.*)?
135 RewriteRule ^/lf/([^/]+)/([^/\.]+)\.([^/]+)$ /lf/webmcp-wrapper.lua?_webmcp_urldepth=1&_webmcp_module=$1&_webmcp_view=$2&_webmcp_suffix=$3&%1 [PT]
136
137 RewriteCond %{QUERY_STRING} (.*)?
138 RewriteRule ^/lf/([^/]+)/([^/]+)/([^/\.]+)\.([^/]+)$ /lf/webmcp-wrapper.lua?_webmcp_urldepth=2&_webmcp_module=$1&_webmcp_view=$2&_webmcp_id=$3&_webmcp_suffix=$4&%1 [PT]
139
140 Alias /lf/static /var/lib/liquid_feedback_frontend/static
141
142 ScriptAlias /lf/ /usr/lib/webmcp/framework/cgi-bin/
143
144 <Directory "/var/lib/liquid_feedback_frontend/static">
145 AllowOverride None
146 Order allow,deny
147 Allow from all
148 </Directory>
149
150 <Directory "/usr/lib/webmcp/framework/cgi-bin">
151 AllowOverride None
152 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
153 Order allow,deny
154 Allow from all
155 </Directory>
156
157 <Location /lf>
158 SetEnv WEBMCP_APP_BASEPATH '/var/lib/liquid_feedback_frontend'
159 </Location>
160
161
162
163 1.1 www-apps/liquid_feedback_frontend/files/lqfb.example.com.conf
164
165 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/liquid_feedback_frontend/files/lqfb.example.com.conf?rev=1.1&view=markup
166 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/liquid_feedback_frontend/files/lqfb.example.com.conf?rev=1.1&content-type=text/plain
167
168 Index: lqfb.example.com.conf
169 ===================================================================
170 <VirtualHost *:80>
171 ServerName lqfb.example.com
172
173 RewriteEngine On
174 RewriteRule (.*) https://lqfb.example.com%{REQUEST_URI}
175 </VirtualHost>
176
177 <VirtualHost *:443>
178 ServerName lqfb.example.com
179
180 SSLEngine on
181 SSLProtocol all -SSLv2
182 SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
183 SSLCertificateFile /etc/ssl/apache2/wildcard/server.crt
184 SSLCertificateKeyFile /etc/ssl/apache2/wildcard/server.key
185
186 include /usr/share/liquid_feedback_frontend/lqfb-apache.conf
187
188 <Location /lf>
189 SetEnv WEBMCP_CONFIG_NAME 'myconfig'
190 </Location>
191
192 ErrorLog /var/log/apache2/lqfb.example.com-error.log
193 </VirtualHost>