version bump www-apps/gitea-1.13.0
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
[log]
|
||||
MODE = file
|
||||
LEVEL = Info
|
||||
ROOT_PATH = /var/log/gitea
|
@@ -1,139 +0,0 @@
|
||||
|
||||
#Patch to make gitea logging less verbose.
|
||||
|
||||
diff --git a/modules/log/flags.go b/modules/log/flags.go
|
||||
index 992fc62dd..5578a1b6b 100644
|
||||
--- a/modules/log/flags.go
|
||||
+++ b/modules/log/flags.go
|
||||
@@ -31,7 +31,7 @@ const (
|
||||
Lmedfile = Lshortfile | Llongfile
|
||||
|
||||
// LstdFlags is the initial value for the standard logger
|
||||
- LstdFlags = Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial
|
||||
+ LstdFlags = Ldate | Ltime | Llevelinitial
|
||||
)
|
||||
|
||||
var flagFromString = map[string]int{
|
||||
|
||||
|
||||
#Just patching the tests to keep working with the patch above (avoid using LstdFlags)
|
||||
|
||||
diff --git a/modules/log/conn_test.go b/modules/log/conn_test.go
|
||||
index cc3d758fa..295bee37f 100644
|
||||
--- a/modules/log/conn_test.go
|
||||
+++ b/modules/log/conn_test.go
|
||||
@@ -40,7 +40,7 @@ func TestConnLogger(t *testing.T) {
|
||||
|
||||
prefix := "TestPrefix "
|
||||
level := INFO
|
||||
- flags := LstdFlags | LUTC | Lfuncname
|
||||
+ flags := Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial | LUTC | Lfuncname
|
||||
|
||||
logger := NewConn()
|
||||
connLogger := logger.(*ConnLogger)
|
||||
@@ -112,7 +112,7 @@ func TestConnLoggerCloseBeforeSend(t *testing.T) {
|
||||
|
||||
prefix := "TestPrefix "
|
||||
level := INFO
|
||||
- flags := LstdFlags | LUTC | Lfuncname
|
||||
+ flags := Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial | LUTC | Lfuncname
|
||||
|
||||
logger := NewConn()
|
||||
|
||||
@@ -126,7 +126,7 @@ func TestConnLoggerFailConnect(t *testing.T) {
|
||||
|
||||
prefix := "TestPrefix "
|
||||
level := INFO
|
||||
- flags := LstdFlags | LUTC | Lfuncname
|
||||
+ flags := Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial | LUTC | Lfuncname
|
||||
|
||||
logger := NewConn()
|
||||
|
||||
@@ -169,7 +169,7 @@ func TestConnLoggerClose(t *testing.T) {
|
||||
|
||||
prefix := "TestPrefix "
|
||||
level := INFO
|
||||
- flags := LstdFlags | LUTC | Lfuncname
|
||||
+ flags := Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial | LUTC | Lfuncname
|
||||
|
||||
logger := NewConn()
|
||||
connLogger := logger.(*ConnLogger)
|
||||
diff --git a/modules/log/console_test.go b/modules/log/console_test.go
|
||||
index a028b5b87..e4fec760a 100644
|
||||
--- a/modules/log/console_test.go
|
||||
+++ b/modules/log/console_test.go
|
||||
@@ -33,7 +33,7 @@ func TestConsoleLoggerMinimalConfig(t *testing.T) {
|
||||
},
|
||||
}
|
||||
prefix := ""
|
||||
- flags := LstdFlags
|
||||
+ flags := LstdFlags
|
||||
|
||||
cw := NewConsoleLogger()
|
||||
realCW := cw.(*ConsoleLogger)
|
||||
@@ -64,7 +64,7 @@ func TestConsoleLogger(t *testing.T) {
|
||||
}
|
||||
prefix := "TestPrefix "
|
||||
level := INFO
|
||||
- flags := LstdFlags | LUTC | Lfuncname
|
||||
+ flags := Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial | LUTC | Lfuncname
|
||||
|
||||
cw := NewConsoleLogger()
|
||||
realCW := cw.(*ConsoleLogger)
|
||||
diff --git a/modules/log/file_test.go b/modules/log/file_test.go
|
||||
index 38279315a..dc8d291ed 100644
|
||||
--- a/modules/log/file_test.go
|
||||
+++ b/modules/log/file_test.go
|
||||
@@ -24,7 +24,7 @@ func TestFileLoggerFails(t *testing.T) {
|
||||
|
||||
prefix := "TestPrefix "
|
||||
level := INFO
|
||||
- flags := LstdFlags | LUTC | Lfuncname
|
||||
+ flags := Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial | LUTC | Lfuncname
|
||||
//filename := filepath.Join(tmpDir, "test.log")
|
||||
|
||||
fileLogger := NewFileLogger()
|
||||
@@ -52,7 +52,7 @@ func TestFileLogger(t *testing.T) {
|
||||
|
||||
prefix := "TestPrefix "
|
||||
level := INFO
|
||||
- flags := LstdFlags | LUTC | Lfuncname
|
||||
+ flags := Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial | LUTC | Lfuncname
|
||||
filename := filepath.Join(tmpDir, "test.log")
|
||||
|
||||
fileLogger := NewFileLogger()
|
||||
@@ -155,7 +155,7 @@ func TestCompressFileLogger(t *testing.T) {
|
||||
|
||||
prefix := "TestPrefix "
|
||||
level := INFO
|
||||
- flags := LstdFlags | LUTC | Lfuncname
|
||||
+ flags := Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial | LUTC | Lfuncname
|
||||
filename := filepath.Join(tmpDir, "test.log")
|
||||
|
||||
fileLogger := NewFileLogger()
|
||||
diff --git a/modules/log/smtp_test.go b/modules/log/smtp_test.go
|
||||
index 216d55521..15075dd41 100644
|
||||
--- a/modules/log/smtp_test.go
|
||||
+++ b/modules/log/smtp_test.go
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
func TestSMTPLogger(t *testing.T) {
|
||||
prefix := "TestPrefix "
|
||||
level := INFO
|
||||
- flags := LstdFlags | LUTC | Lfuncname
|
||||
+ flags := Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial | LUTC | Lfuncname
|
||||
username := "testuser"
|
||||
password := "testpassword"
|
||||
host := "testhost"
|
||||
diff --git a/modules/log/writer_test.go b/modules/log/writer_test.go
|
||||
index 886dd58fb..df2f6e698 100644
|
||||
--- a/modules/log/writer_test.go
|
||||
+++ b/modules/log/writer_test.go
|
||||
@@ -41,7 +41,7 @@ func TestBaseLogger(t *testing.T) {
|
||||
b := WriterLogger{
|
||||
out: c,
|
||||
Level: INFO,
|
||||
- Flags: LstdFlags | LUTC,
|
||||
+ Flags: Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial | LUTC,
|
||||
Prefix: prefix,
|
||||
}
|
||||
location, _ := time.LoadLocation("EST")
|
@@ -1,46 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 796a0e3..2c6a6ef 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -97,7 +97,7 @@ vet:
|
||||
|
||||
.PHONY: generate
|
||||
generate:
|
||||
- GO111MODULE=on $(GO) generate $(PACKAGES)
|
||||
+ GO111MODULE=on $(GO) generate -mod=vendor $(PACKAGES)
|
||||
|
||||
.PHONY: generate-swagger
|
||||
generate-swagger:
|
||||
diff --git a/modules/options/options.go b/modules/options/options.go
|
||||
index 723dd54..62e8c04 100644
|
||||
--- a/modules/options/options.go
|
||||
+++ b/modules/options/options.go
|
||||
@@ -5,7 +5,6 @@
|
||||
package options
|
||||
|
||||
//go:generate go run -mod=vendor main.go
|
||||
-//go:generate go fmt bindata.go
|
||||
|
||||
type directorySet map[string][]string
|
||||
|
||||
diff --git a/modules/public/public.go b/modules/public/public.go
|
||||
index 8362b42..df70275 100644
|
||||
--- a/modules/public/public.go
|
||||
+++ b/modules/public/public.go
|
||||
@@ -18,7 +18,6 @@ import (
|
||||
)
|
||||
|
||||
//go:generate go run -mod=vendor main.go
|
||||
-//go:generate go fmt bindata.go
|
||||
|
||||
// Options represents the available options to configure the macaron handler.
|
||||
type Options struct {
|
||||
diff --git a/modules/templates/templates.go b/modules/templates/templates.go
|
||||
index e7fe3b2..af6bf01 100644
|
||||
--- a/modules/templates/templates.go
|
||||
+++ b/modules/templates/templates.go
|
||||
@@ -5,4 +5,3 @@
|
||||
package templates
|
||||
|
||||
//go:generate go run -mod=vendor main.go
|
||||
-//go:generate go fmt bindata.go
|
@@ -1,2 +0,0 @@
|
||||
# arguments for gitea
|
||||
command_args="--config /var/lib/gitea/conf/app.ini"
|
@@ -1,25 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2016-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
description="Gitea, a self-hosted Git service"
|
||||
pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
|
||||
user=${user:-git}
|
||||
group=${group:-git}
|
||||
|
||||
command="/usr/bin/gitea web"
|
||||
command_args="${command_args:--config /var/lib/gitea/conf/app.ini}"
|
||||
command_background="true"
|
||||
start_stop_daemon_args="--user ${user} --group ${group} \
|
||||
-e GITEA_WORK_DIR=/var/lib/gitea
|
||||
--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
|
||||
--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
after net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
[Unit]
|
||||
Description=Gitea service
|
||||
Documentation=https://gitea.io
|
||||
|
||||
AssertPathIsDirectory=/var/lib/gitea
|
||||
AssertPathIsReadWrite=/var/lib/gitea
|
||||
|
||||
After=network.target
|
||||
Requires=network.target
|
||||
After=mysqld.service
|
||||
Requires=mysqld.service
|
||||
|
||||
[Service]
|
||||
User=git
|
||||
Group=git
|
||||
|
||||
Environment="GITEA_CUSTOM=/var/lib/gitea"
|
||||
WorkingDirectory=/var/lib/gitea
|
||||
ExecStart=/usr/bin/gitea web -c /var/lib/gitea/conf/app.ini
|
||||
|
||||
Restart=always
|
||||
PrivateTmp=true
|
||||
Nice=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user