Fossil SCM

Enhancements to the CGI extension documentation. Update the 2.10 change log to mention this enhancement and other changes.

drh 2019-07-27 17:11 trunk
Commit dfa5d50971c757a027917495de12e49a329efb3311770f6e50e6203ce000ddb2
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,11 +1,17 @@
11
<title>Change Log</title>
22
33
<a name='v2_10'></a>
44
<h2>Changes for Version 2.10 (pending)</h2>
55
6
+ * Added support for [./serverext.wiki|CGI-based Server Extensions].
7
+ * Enhance the hierarchical display of Forum threads to do less
8
+ indentation and to provide links back to the previous message
9
+ in the thread. Provide sequential numbers for all messages in
10
+ a forum thread.
611
* Change the default [./hashpolicy.wiki|hash policy] to SHA3.
12
+ * Documentation improvements
713
814
<a name='v2_9'></a>
915
<h2>Changes for Version 2.9 (2019-07-13)</h2>
1016
1117
* Added the [/help?cmd=git|fossil git export] command and instructions
1218
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,11 +1,17 @@
1 <title>Change Log</title>
2
3 <a name='v2_10'></a>
4 <h2>Changes for Version 2.10 (pending)</h2>
5
 
 
 
 
 
6 * Change the default [./hashpolicy.wiki|hash policy] to SHA3.
 
7
8 <a name='v2_9'></a>
9 <h2>Changes for Version 2.9 (2019-07-13)</h2>
10
11 * Added the [/help?cmd=git|fossil git export] command and instructions
12
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,11 +1,17 @@
1 <title>Change Log</title>
2
3 <a name='v2_10'></a>
4 <h2>Changes for Version 2.10 (pending)</h2>
5
6 * Added support for [./serverext.wiki|CGI-based Server Extensions].
7 * Enhance the hierarchical display of Forum threads to do less
8 indentation and to provide links back to the previous message
9 in the thread. Provide sequential numbers for all messages in
10 a forum thread.
11 * Change the default [./hashpolicy.wiki|hash policy] to SHA3.
12 * Documentation improvements
13
14 <a name='v2_9'></a>
15 <h2>Changes for Version 2.9 (2019-07-13)</h2>
16
17 * Added the [/help?cmd=git|fossil git export] command and instructions
18
+29 -13
--- www/serverext.wiki
+++ www/serverext.wiki
@@ -15,19 +15,19 @@
1515
[https://sqlite.org/src/ext/checklist|checklist application] on
1616
the [https://sqlite.org/|SQLite] project. The checklist
1717
helps the SQLite developers track which release tests have passed,
1818
or failed, or are still to be done. The checklist program began as a
1919
stand-alone CGI which kept its own private user database and implemented
20
-its on permissions and login system. By converting checklist into
20
+its own permissions and login system. By converting checklist into
2121
a Fossil extension, the same login that works for the
2222
[https://sqlite.org/src|main SQLite source repository] also works
2323
for the checklist. And permission to change elements of the checklist
2424
is based on permission to check-in to the main source repository.
2525
2626
<h2>2.0 How It Works</h2>
2727
28
-Extensions are disabled by default.
28
+CGI Extensions are disabled by default.
2929
An administrator activates the CGI extension mechanism by specifying
3030
an "Extension Root Directory" or "extroot" as part of the server setup.
3131
If the Fossil server is itself run as CGI, then add a line to the CGI
3232
script file that says:
3333
@@ -78,13 +78,15 @@
7878
Then it takes the leftover "/checklist" part and appends it to the
7979
"extroot" to get the filename "/sqlite-src-ext/checklist". Fossil finds
8080
that file to be executable, so it runs it as CGI and returns the result.
8181
8282
The /sqlite-src-ext/checklist file is a
83
-[https://wapp.tcl.tk|Wapp program]. The complete source code to the
83
+[https://wapp.tcl.tk|Wapp program]. The current source code to the
8484
this program can be seen at
85
-[https://www.sqlite.org/src/ext/checklist/self].
85
+[https://www.sqlite.org/src/ext/checklist/self] and
86
+historical versions are available at
87
+[https://sqlite.org/docsrc/finfo/misc/checklist.tcl].
8688
8789
There is a cascade of CGIs happening here. The webserver that receives
8890
the initial HTTP request runs Fossil as a CGI based on the
8991
"https://sqlite.org/src" portion of the URL. The Fossil instance then
9092
runs the checklist sub-CGI based on the "/ext/checklists" suffix. The
@@ -144,11 +146,22 @@
144146
* SCRIPT_NAME
145147
* SERVER_NAME
146148
* SERVER_PORT
147149
* SERVER_PROTOCOL
148150
149
-In addition, Fossil adds the following environment variables:
151
+Do a web search for
152
+"[https://duckduckgo.com/?q=cgi+environment_variables|cgi environment variables]"
153
+to find more detail about what each of the above variables mean and how
154
+they are used.
155
+Live listings of the values of some or all of these environment variables
156
+can be found at links like these:
157
+
158
+ * [https://fossil-scm.org/home/test_env]
159
+ * [https://sqlite.org/src/ext/checklist/env]
160
+
161
+In addition to the standard CGI environment variables listed above,
162
+Fossil adds the following:
150163
151164
* FOSSIL_CAPABILITIES
152165
* FOSSIL_REPOSITORY
153166
* FOSSIL_USER
154167
@@ -158,16 +171,19 @@
158171
[/setup_ulist_notes|Fossil capability letters] that
159172
indicate what permissions the user has on the Fossil repository.
160173
The FOSSIL_REPOSITORY environment variable gives the filename of the
161174
Fossil repository that is running.
162175
163
-The [https://sqlite.org/ext/checklist|checklist application] uses the
176
+The [https://sqlite.org/src/ext/checklist|checklist application] uses the
164177
FOSSIL_USER environment variable to determine the name of the user and
165178
the FOSSIL_CAPABILITIES variable to determine if the user is allowed to
166179
mark off changes to the checklist. Only users with check-in permission
167180
to the Fossil repository are allowed to mark off checklist items. That
168181
means that the FOSSIL_CAPABILITIES string must contain the letter "i".
182
+Search for "FOSSIL_CAPABILITIES" in the
183
+[https://sqlite.org/src/ext/checklist/self|source listing] to see how
184
+this happens.
169185
170186
If the HTTP request includes content (for example if this is a POST request)
171187
then the CONTENT_LENGTH value will be positive and the data for the content
172188
will be readable on standard input.
173189
@@ -192,14 +208,15 @@
192208
Those that Fossil does not understand are simply relayed back to up the
193209
line to the requester.
194210
195211
Fossil takes special action with some content types. If the Content-Type
196212
is "application/x-fossil-wiki" or "application/x-markdown" then Fossil
197
-converts the content from Fossil-wiki or Markdown into HTML, adding its
198
-own header and footer text according to the repository skin. If the
199
-content-type is "text/html", that is normally passed straight through
200
-unchanged. However, if the HTML content is of the form:
213
+converts the content from [/wiki_rules|Fossil-Wiki] or
214
+[/md_rules|Markdown] into HTML, adding its
215
+own header and footer text according to the repository skin. Content
216
+of type "text/html" is normally passed straight through
217
+unchanged. However, if the text/html content is of the form:
201218
202219
<blockquote><verbatim>
203220
<div class='fossil-doc' data-title='DOCUMENT TITLE'>
204221
... HTML content there ...
205222
</div>
@@ -210,11 +227,11 @@
210227
then Fossil will adds its own header and footer to the HTML. The
211228
page title contained in the added header will be extracted from the
212229
"data-title" attribute.
213230
214231
Except for the three cases noted above, Fossil makes no changes or
215
-additions to the CGI-generated content, but simply passes the verbatim
232
+additions to the CGI-generated content. Fossil just passes the verbatim
216233
content back up the stack towards the requester.
217234
218235
<h2>5.0 Filename Restrictions</h2>
219236
220237
For security reasons, Fossil places restrictions on the names of files
@@ -230,12 +247,11 @@
230247
directories whose names begin with "." or "-" are ignored.
231248
232249
If a CGI program requires separate data files, it is safe to put those
233250
files in the same directory as the CGI program itself as long as the names
234251
of the data files contain special characters that cause them to be ignored
235
-by Fossil. For example, ensure that all datafile begin with "-" or
236
-end with ",data" or "~data".
252
+by Fossil.
237253
238254
<h2>6.0 Trouble-Shooting Hints</h2>
239255
240256
Remember that the /ext will return any file in the extroot directory
241257
hierarchy as static content if the file is readable but not executable.
242258
--- www/serverext.wiki
+++ www/serverext.wiki
@@ -15,19 +15,19 @@
15 [https://sqlite.org/src/ext/checklist|checklist application] on
16 the [https://sqlite.org/|SQLite] project. The checklist
17 helps the SQLite developers track which release tests have passed,
18 or failed, or are still to be done. The checklist program began as a
19 stand-alone CGI which kept its own private user database and implemented
20 its on permissions and login system. By converting checklist into
21 a Fossil extension, the same login that works for the
22 [https://sqlite.org/src|main SQLite source repository] also works
23 for the checklist. And permission to change elements of the checklist
24 is based on permission to check-in to the main source repository.
25
26 <h2>2.0 How It Works</h2>
27
28 Extensions are disabled by default.
29 An administrator activates the CGI extension mechanism by specifying
30 an "Extension Root Directory" or "extroot" as part of the server setup.
31 If the Fossil server is itself run as CGI, then add a line to the CGI
32 script file that says:
33
@@ -78,13 +78,15 @@
78 Then it takes the leftover "/checklist" part and appends it to the
79 "extroot" to get the filename "/sqlite-src-ext/checklist". Fossil finds
80 that file to be executable, so it runs it as CGI and returns the result.
81
82 The /sqlite-src-ext/checklist file is a
83 [https://wapp.tcl.tk|Wapp program]. The complete source code to the
84 this program can be seen at
85 [https://www.sqlite.org/src/ext/checklist/self].
 
 
86
87 There is a cascade of CGIs happening here. The webserver that receives
88 the initial HTTP request runs Fossil as a CGI based on the
89 "https://sqlite.org/src" portion of the URL. The Fossil instance then
90 runs the checklist sub-CGI based on the "/ext/checklists" suffix. The
@@ -144,11 +146,22 @@
144 * SCRIPT_NAME
145 * SERVER_NAME
146 * SERVER_PORT
147 * SERVER_PROTOCOL
148
149 In addition, Fossil adds the following environment variables:
 
 
 
 
 
 
 
 
 
 
 
150
151 * FOSSIL_CAPABILITIES
152 * FOSSIL_REPOSITORY
153 * FOSSIL_USER
154
@@ -158,16 +171,19 @@
158 [/setup_ulist_notes|Fossil capability letters] that
159 indicate what permissions the user has on the Fossil repository.
160 The FOSSIL_REPOSITORY environment variable gives the filename of the
161 Fossil repository that is running.
162
163 The [https://sqlite.org/ext/checklist|checklist application] uses the
164 FOSSIL_USER environment variable to determine the name of the user and
165 the FOSSIL_CAPABILITIES variable to determine if the user is allowed to
166 mark off changes to the checklist. Only users with check-in permission
167 to the Fossil repository are allowed to mark off checklist items. That
168 means that the FOSSIL_CAPABILITIES string must contain the letter "i".
 
 
 
169
170 If the HTTP request includes content (for example if this is a POST request)
171 then the CONTENT_LENGTH value will be positive and the data for the content
172 will be readable on standard input.
173
@@ -192,14 +208,15 @@
192 Those that Fossil does not understand are simply relayed back to up the
193 line to the requester.
194
195 Fossil takes special action with some content types. If the Content-Type
196 is "application/x-fossil-wiki" or "application/x-markdown" then Fossil
197 converts the content from Fossil-wiki or Markdown into HTML, adding its
198 own header and footer text according to the repository skin. If the
199 content-type is "text/html", that is normally passed straight through
200 unchanged. However, if the HTML content is of the form:
 
201
202 <blockquote><verbatim>
203 <div class='fossil-doc' data-title='DOCUMENT TITLE'>
204 ... HTML content there ...
205 </div>
@@ -210,11 +227,11 @@
210 then Fossil will adds its own header and footer to the HTML. The
211 page title contained in the added header will be extracted from the
212 "data-title" attribute.
213
214 Except for the three cases noted above, Fossil makes no changes or
215 additions to the CGI-generated content, but simply passes the verbatim
216 content back up the stack towards the requester.
217
218 <h2>5.0 Filename Restrictions</h2>
219
220 For security reasons, Fossil places restrictions on the names of files
@@ -230,12 +247,11 @@
230 directories whose names begin with "." or "-" are ignored.
231
232 If a CGI program requires separate data files, it is safe to put those
233 files in the same directory as the CGI program itself as long as the names
234 of the data files contain special characters that cause them to be ignored
235 by Fossil. For example, ensure that all datafile begin with "-" or
236 end with ",data" or "~data".
237
238 <h2>6.0 Trouble-Shooting Hints</h2>
239
240 Remember that the /ext will return any file in the extroot directory
241 hierarchy as static content if the file is readable but not executable.
242
--- www/serverext.wiki
+++ www/serverext.wiki
@@ -15,19 +15,19 @@
15 [https://sqlite.org/src/ext/checklist|checklist application] on
16 the [https://sqlite.org/|SQLite] project. The checklist
17 helps the SQLite developers track which release tests have passed,
18 or failed, or are still to be done. The checklist program began as a
19 stand-alone CGI which kept its own private user database and implemented
20 its own permissions and login system. By converting checklist into
21 a Fossil extension, the same login that works for the
22 [https://sqlite.org/src|main SQLite source repository] also works
23 for the checklist. And permission to change elements of the checklist
24 is based on permission to check-in to the main source repository.
25
26 <h2>2.0 How It Works</h2>
27
28 CGI Extensions are disabled by default.
29 An administrator activates the CGI extension mechanism by specifying
30 an "Extension Root Directory" or "extroot" as part of the server setup.
31 If the Fossil server is itself run as CGI, then add a line to the CGI
32 script file that says:
33
@@ -78,13 +78,15 @@
78 Then it takes the leftover "/checklist" part and appends it to the
79 "extroot" to get the filename "/sqlite-src-ext/checklist". Fossil finds
80 that file to be executable, so it runs it as CGI and returns the result.
81
82 The /sqlite-src-ext/checklist file is a
83 [https://wapp.tcl.tk|Wapp program]. The current source code to the
84 this program can be seen at
85 [https://www.sqlite.org/src/ext/checklist/self] and
86 historical versions are available at
87 [https://sqlite.org/docsrc/finfo/misc/checklist.tcl].
88
89 There is a cascade of CGIs happening here. The webserver that receives
90 the initial HTTP request runs Fossil as a CGI based on the
91 "https://sqlite.org/src" portion of the URL. The Fossil instance then
92 runs the checklist sub-CGI based on the "/ext/checklists" suffix. The
@@ -144,11 +146,22 @@
146 * SCRIPT_NAME
147 * SERVER_NAME
148 * SERVER_PORT
149 * SERVER_PROTOCOL
150
151 Do a web search for
152 "[https://duckduckgo.com/?q=cgi+environment_variables|cgi environment variables]"
153 to find more detail about what each of the above variables mean and how
154 they are used.
155 Live listings of the values of some or all of these environment variables
156 can be found at links like these:
157
158 * [https://fossil-scm.org/home/test_env]
159 * [https://sqlite.org/src/ext/checklist/env]
160
161 In addition to the standard CGI environment variables listed above,
162 Fossil adds the following:
163
164 * FOSSIL_CAPABILITIES
165 * FOSSIL_REPOSITORY
166 * FOSSIL_USER
167
@@ -158,16 +171,19 @@
171 [/setup_ulist_notes|Fossil capability letters] that
172 indicate what permissions the user has on the Fossil repository.
173 The FOSSIL_REPOSITORY environment variable gives the filename of the
174 Fossil repository that is running.
175
176 The [https://sqlite.org/src/ext/checklist|checklist application] uses the
177 FOSSIL_USER environment variable to determine the name of the user and
178 the FOSSIL_CAPABILITIES variable to determine if the user is allowed to
179 mark off changes to the checklist. Only users with check-in permission
180 to the Fossil repository are allowed to mark off checklist items. That
181 means that the FOSSIL_CAPABILITIES string must contain the letter "i".
182 Search for "FOSSIL_CAPABILITIES" in the
183 [https://sqlite.org/src/ext/checklist/self|source listing] to see how
184 this happens.
185
186 If the HTTP request includes content (for example if this is a POST request)
187 then the CONTENT_LENGTH value will be positive and the data for the content
188 will be readable on standard input.
189
@@ -192,14 +208,15 @@
208 Those that Fossil does not understand are simply relayed back to up the
209 line to the requester.
210
211 Fossil takes special action with some content types. If the Content-Type
212 is "application/x-fossil-wiki" or "application/x-markdown" then Fossil
213 converts the content from [/wiki_rules|Fossil-Wiki] or
214 [/md_rules|Markdown] into HTML, adding its
215 own header and footer text according to the repository skin. Content
216 of type "text/html" is normally passed straight through
217 unchanged. However, if the text/html content is of the form:
218
219 <blockquote><verbatim>
220 <div class='fossil-doc' data-title='DOCUMENT TITLE'>
221 ... HTML content there ...
222 </div>
@@ -210,11 +227,11 @@
227 then Fossil will adds its own header and footer to the HTML. The
228 page title contained in the added header will be extracted from the
229 "data-title" attribute.
230
231 Except for the three cases noted above, Fossil makes no changes or
232 additions to the CGI-generated content. Fossil just passes the verbatim
233 content back up the stack towards the requester.
234
235 <h2>5.0 Filename Restrictions</h2>
236
237 For security reasons, Fossil places restrictions on the names of files
@@ -230,12 +247,11 @@
247 directories whose names begin with "." or "-" are ignored.
248
249 If a CGI program requires separate data files, it is safe to put those
250 files in the same directory as the CGI program itself as long as the names
251 of the data files contain special characters that cause them to be ignored
252 by Fossil.
 
253
254 <h2>6.0 Trouble-Shooting Hints</h2>
255
256 Remember that the /ext will return any file in the extroot directory
257 hierarchy as static content if the file is readable but not executable.
258

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button