Skip to content

Commit 26df9d8

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: [skip ci] Updated licenses and gitignores Move the captcha script loader to the template which really needs it (go-gitea#28718) Suggest to use Type=simple for systemd service (go-gitea#28717) Fix incorrect URL for "Reference in New Issue" (go-gitea#28716) Avoid unnecessary 500 panic when a commit doesn't exist (go-gitea#28719) [skip ci] Updated translations via Crowdin Improve frontend guideline (go-gitea#28711) Fix panic when parsing empty pgsql host (go-gitea#28708) Add merge arrow direction and update styling (go-gitea#28523)
2 parents d8b40bf + f4ea8d9 commit 26df9d8

File tree

22 files changed

+329
-26
lines changed

22 files changed

+329
-26
lines changed

contrib/systemd/gitea.service

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ After=network.target
5252
# Uncomment the next line if you have repos with lots of files and get a HTTP 500 error because of that
5353
# LimitNOFILE=524288:524288
5454
RestartSec=2s
55-
Type=notify
55+
Type=simple
5656
User=git
5757
Group=git
5858
WorkingDirectory=/var/lib/gitea/
@@ -62,7 +62,6 @@ WorkingDirectory=/var/lib/gitea/
6262
ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini
6363
Restart=always
6464
Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea
65-
WatchdogSec=30s
6665
# If you install Git to directory prefix other than default PATH (which happens
6766
# for example if you install other versions of Git side-to-side with
6867
# distribution version), uncomment below line and add that prefix to PATH

docs/content/contributing/guidelines-frontend.en-us.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ We recommend [Google HTML/CSS Style Guide](https://google.github.io/styleguide/h
4848
10. Avoid mixing different events in one event listener, prefer to use individual event listeners for every event.
4949
11. Custom event names are recommended to use `ce-` prefix.
5050
12. Gitea's tailwind-style CSS classes use `gt-` prefix (`gt-relative`), while Gitea's own private framework-level CSS classes use `g-` prefix (`g-modal-confirm`).
51+
13. Avoid inline scripts & styles as much as possible, it's recommended to put JS code into JS files and use CSS classes. If inline scripts & styles are unavoidable, explain the reason why it can't be avoided.
5152

5253
### Accessibility / ARIA
5354

5455
In history, Gitea heavily uses Fomantic UI which is not an accessibility-friendly framework.
55-
Gitea uses some patches to make Fomantic UI more accessible (see the `aria.js` and `aria.md`),
56+
Gitea uses some patches to make Fomantic UI more accessible (see `aria.md` and related JS files),
5657
but there are still many problems which need a lot of work and time to fix.
5758

5859
### Framework Usage

modules/graceful/manager_common.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import (
1010
"time"
1111
)
1212

13+
// FIXME: it seems that there is a bug when using systemd Type=notify: the "Install Page" (INSTALL_LOCK=false) doesn't notify properly.
14+
// At the moment, no idea whether it also affects Windows Service, or whether it's a regression bug. It needs to be investigated later.
15+
1316
type systemdNotifyMsg string
1417

1518
const (

modules/setting/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func getPostgreSQLConnectionString(dbHost, dbUser, dbPasswd, dbName, dbsslMode s
168168
RawQuery: dbParam,
169169
}
170170
query := connURL.Query()
171-
if dbHost[0] == '/' { // looks like a unix socket
171+
if strings.HasPrefix(dbHost, "/") { // looks like a unix socket
172172
query.Add("host", dbHost)
173173
connURL.Host = ":" + port
174174
}

modules/setting/database_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ func Test_getPostgreSQLConnectionString(t *testing.T) {
6565
SSLMode string
6666
Output string
6767
}{
68+
{
69+
Host: "", // empty means default
70+
Output: "postgres://:@127.0.0.1:5432?sslmode=",
71+
},
6872
{
6973
Host: "/tmp/pg.sock",
7074
User: "testuser",

options/license/Apache-1.1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Apache License 1.1
1+
The Apache Software License, Version 1.1
22

33
Copyright (c) 2000 The Apache Software Foundation. All rights reserved.
44

@@ -14,8 +14,8 @@ Alternately, this acknowledgment may appear in the software itself, if and where
1414

1515
4. The names "Apache" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [email protected].
1616

17-
5. Products derived from this software may not be called "Apache" [ex. "Jakarta," "Apache," or "Apache Commons,"] nor may "Apache" [ex. the names] appear in their name, without prior written permission of the Apache Software Foundation.
17+
5. Products derived from this software may not be called "Apache" nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation.
1818

19-
THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2020

21-
This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation. For more information on the Apache Software Foundation, please see http://www.apache.org/. Portions of this software are based upon public domain software originally written at the National Center for Supercomputing Applications, University of Illinois, Urbana-Champaign.
21+
This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. Portions of this software are based upon public domain software originally written at the National Center for Supercomputing Applications, University of Illinois, Urbana-Champaign.

options/license/BSD-Systemics-W3Works

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Copyright (C) 1995, 1996 Systemics Ltd (http://www.systemics.com/)
2+
3+
Modifications and Current Implimentation Copyright (C) 2000 W3Works, LLC.
4+
5+
All rights reserved.
6+
7+
Current implimentation contains modifications made by W3Works, LLC. The
8+
modifications remain copyright of W3Works, LLC and attribution for these
9+
modification should be made to W3Works, LLC. These modifications and
10+
this copyright must remain with this package.
11+
12+
Additions to the Restrictions set out below are:
13+
1. All advertising materials mentioning features or use of this software
14+
must display the following acknowledgement:
15+
This product inculdes software developed by W3Works, LLC (http://www.w3works.com)
16+
17+
NO ADDITIONAL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
18+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19+
ARE EXTENDED BY THIS DISTRIBUTION.
20+
21+
Any subsequent derrivations of this package must retainl this copyright.
22+
23+
24+
Original Copyright Below
25+
26+
This library and applications are FREE FOR COMMERCIAL AND NON-COMMERCIAL USE
27+
as long as the following conditions are adhered to.
28+
29+
Copyright remains with Systemics Ltd, and as such any Copyright notices
30+
in the code are not to be removed. If this code is used in a product,
31+
Systemics should be given attribution as the author of the parts used.
32+
This can be in the form of a textual message at program startup or
33+
in documentation (online or textual) provided with the package.
34+
35+
Redistribution and use in source and binary forms, with or without
36+
modification, are permitted provided that the following conditions
37+
are met:
38+
1. Redistributions of source code must retain the copyright
39+
notice, this list of conditions and the following disclaimer.
40+
2. Redistributions in binary form must reproduce the above copyright
41+
notice, this list of conditions and the following disclaimer in the
42+
documentation and/or other materials provided with the distribution.
43+
3. All advertising materials mentioning features or use of this software
44+
must display the following acknowledgement:
45+
This product includes software developed by Systemics Ltd (http://www.systemics.com/)
46+
47+
THIS SOFTWARE IS PROVIDED BY SYSTEMICS LTD ``AS IS'' AND
48+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
50+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
51+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
52+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
53+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
54+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
55+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
56+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
57+
SUCH DAMAGE.
58+
59+
The licence and distribution terms for any publically available version or
60+
derivative of this code cannot be changed. i.e. this code cannot simply be
61+
copied and put under another distribution licence
62+
[including the GNU Public Licence.]

options/license/Bison-exception-1.24

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
As a special exception, when this file is copied by Bison into a
2+
Bison output file, you may use that output file without restriction.
3+
This special exception was added by the Free Software Foundation
4+
in version 1.24 of Bison.

0 commit comments

Comments
 (0)