Fossil SCM

Fix for problem reported on ML: "Fossil CGI mystery: crashing at repositories", by Taras Zakharko. cause of problem: option --empty was re-used for another purpose, renamed to "---docker"

jan.nijtmans 2014-11-04 19:24 trunk
Commit c34003b1a99569846fa9a0f0d3efd67c9dfcb7a9
3 files changed +2 -1 +2 -2 +1 -1
+2 -1
--- Dockerfile
+++ Dockerfile
@@ -24,12 +24,13 @@
2424
2525
USER fossil
2626
2727
ENV HOME /opt/fossil
2828
29
-RUN fossil new --empty -A admin /opt/fossil/repository.fossil
29
+RUN fossil new --docker -A admin /opt/fossil/repository.fossil
3030
RUN fossil user password -R /opt/fossil/repository.fossil admin admin
3131
RUN fossil cache init -R /opt/fossil/repository.fossil
3232
3333
EXPOSE 8080
3434
3535
CMD ["/usr/bin/fossil", "server", "/opt/fossil/repository.fossil"]
36
+
3637
--- Dockerfile
+++ Dockerfile
@@ -24,12 +24,13 @@
24
25 USER fossil
26
27 ENV HOME /opt/fossil
28
29 RUN fossil new --empty -A admin /opt/fossil/repository.fossil
30 RUN fossil user password -R /opt/fossil/repository.fossil admin admin
31 RUN fossil cache init -R /opt/fossil/repository.fossil
32
33 EXPOSE 8080
34
35 CMD ["/usr/bin/fossil", "server", "/opt/fossil/repository.fossil"]
 
36
--- Dockerfile
+++ Dockerfile
@@ -24,12 +24,13 @@
24
25 USER fossil
26
27 ENV HOME /opt/fossil
28
29 RUN fossil new --docker -A admin /opt/fossil/repository.fossil
30 RUN fossil user password -R /opt/fossil/repository.fossil admin admin
31 RUN fossil cache init -R /opt/fossil/repository.fossil
32
33 EXPOSE 8080
34
35 CMD ["/usr/bin/fossil", "server", "/opt/fossil/repository.fossil"]
36
37
+2 -2
--- src/db.c
+++ src/db.c
@@ -1496,11 +1496,10 @@
14961496
** Options:
14971497
** --template FILE copy settings from repository file
14981498
** --admin-user|-A USERNAME select given USERNAME as admin user
14991499
** --date-override DATETIME use DATETIME as time of the initial checkin
15001500
** (default: do not create an initial checkin)
1501
-** --empty create repository without project-id/server-id
15021501
**
15031502
** See also: clone
15041503
*/
15051504
void create_repository_cmd(void){
15061505
char *zPassword;
@@ -1510,12 +1509,13 @@
15101509
int makeServerCodes;
15111510
15121511
zTemplate = find_option("template",0,1);
15131512
zDate = find_option("date-override",0,1);
15141513
zDefaultUser = find_option("admin-user","A",1);
1515
- makeServerCodes = find_option("empty", 0, 0)==0;
1514
+ makeServerCodes = find_option("docker", 0, 0)==0;
15161515
1516
+ find_option("empty", 0, 0); /* deprecated */
15171517
/* We should be done with options.. */
15181518
verify_all_options();
15191519
15201520
if( g.argc!=3 ){
15211521
usage("REPOSITORY-NAME");
15221522
--- src/db.c
+++ src/db.c
@@ -1496,11 +1496,10 @@
1496 ** Options:
1497 ** --template FILE copy settings from repository file
1498 ** --admin-user|-A USERNAME select given USERNAME as admin user
1499 ** --date-override DATETIME use DATETIME as time of the initial checkin
1500 ** (default: do not create an initial checkin)
1501 ** --empty create repository without project-id/server-id
1502 **
1503 ** See also: clone
1504 */
1505 void create_repository_cmd(void){
1506 char *zPassword;
@@ -1510,12 +1509,13 @@
1510 int makeServerCodes;
1511
1512 zTemplate = find_option("template",0,1);
1513 zDate = find_option("date-override",0,1);
1514 zDefaultUser = find_option("admin-user","A",1);
1515 makeServerCodes = find_option("empty", 0, 0)==0;
1516
 
1517 /* We should be done with options.. */
1518 verify_all_options();
1519
1520 if( g.argc!=3 ){
1521 usage("REPOSITORY-NAME");
1522
--- src/db.c
+++ src/db.c
@@ -1496,11 +1496,10 @@
1496 ** Options:
1497 ** --template FILE copy settings from repository file
1498 ** --admin-user|-A USERNAME select given USERNAME as admin user
1499 ** --date-override DATETIME use DATETIME as time of the initial checkin
1500 ** (default: do not create an initial checkin)
 
1501 **
1502 ** See also: clone
1503 */
1504 void create_repository_cmd(void){
1505 char *zPassword;
@@ -1510,12 +1509,13 @@
1509 int makeServerCodes;
1510
1511 zTemplate = find_option("template",0,1);
1512 zDate = find_option("date-override",0,1);
1513 zDefaultUser = find_option("admin-user","A",1);
1514 makeServerCodes = find_option("docker", 0, 0)==0;
1515
1516 find_option("empty", 0, 0); /* deprecated */
1517 /* We should be done with options.. */
1518 verify_all_options();
1519
1520 if( g.argc!=3 ){
1521 usage("REPOSITORY-NAME");
1522
+1 -1
--- src/login.c
+++ src/login.c
@@ -94,11 +94,11 @@
9494
" FROM config"
9595
" WHERE name IN ('project-code','login-group-code')"
9696
" ORDER BY name /*sort*/"
9797
);
9898
}
99
- return zCookieName ? zCookieName : "unknown";
99
+ return zCookieName;
100100
}
101101
102102
/*
103103
** Redirect to the page specified by the "g" query parameter.
104104
** Or if there is no "g" query parameter, redirect to the homepage.
105105
--- src/login.c
+++ src/login.c
@@ -94,11 +94,11 @@
94 " FROM config"
95 " WHERE name IN ('project-code','login-group-code')"
96 " ORDER BY name /*sort*/"
97 );
98 }
99 return zCookieName ? zCookieName : "unknown";
100 }
101
102 /*
103 ** Redirect to the page specified by the "g" query parameter.
104 ** Or if there is no "g" query parameter, redirect to the homepage.
105
--- src/login.c
+++ src/login.c
@@ -94,11 +94,11 @@
94 " FROM config"
95 " WHERE name IN ('project-code','login-group-code')"
96 " ORDER BY name /*sort*/"
97 );
98 }
99 return zCookieName;
100 }
101
102 /*
103 ** Redirect to the page specified by the "g" query parameter.
104 ** Or if there is no "g" query parameter, redirect to the homepage.
105

Keyboard Shortcuts

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