version bump www-apps/gitea-1.13.0

This commit is contained in:
Micha Glave 2020-12-08 21:20:49 +01:00
parent 1071cedc81
commit 274123062a
8 changed files with 134 additions and 248 deletions

View File

@ -1,12 +1,8 @@
AUX 1.12-fix-vendoring.patch 430 BLAKE2B 897214736e27f49023c8de9da5e7caa3612947f381d10e1bfd9fca2a6f4cfdcefb7fd6a70fb972e9db1c8a84deb592f585d0c6beda66b551b6e65cdce33e73d6 SHA512 9b2678c373dfb18e53be53b99e2cebdb656f777f850c6f9b67e29d52011edc320fb7d14045fef08b0b3b70959784070264f1cdfae70937097977b2865c8c71b5 AUX 1.12-fix-vendoring.patch 430 BLAKE2B 897214736e27f49023c8de9da5e7caa3612947f381d10e1bfd9fca2a6f4cfdcefb7fd6a70fb972e9db1c8a84deb592f585d0c6beda66b551b6e65cdce33e73d6 SHA512 9b2678c373dfb18e53be53b99e2cebdb656f777f850c6f9b67e29d52011edc320fb7d14045fef08b0b3b70959784070264f1cdfae70937097977b2865c8c71b5
AUX app.ini 67 BLAKE2B 4ec7b8217486047b419202b3a8a7172ac21ae0e5ad9224cd4f010be730ac5cda9d05bf06dcba2d06f8809900094b3b007ef98dd4ea20a125fb7d3db279f53e4a SHA512 93f6f7cf49dd1ece56f7da711adbb58cc38a503527aeea140837d74456ee6f550a089e897d9cb94382e1eb3f5a5cbe4a61362534463eada08a91f314da0f2108
AUX gitea-logflags.patch 4568 BLAKE2B 280697f7ca87c3c985aef0462f63f431860411ad7c39e462e5a63607ef076b116c27d2090f894095193dad33918f1fad1767489d45ae80f9699dddf65141ceb9 SHA512 aa09b233402ecb450cab13ed08786c1b8dc72a944efe69792bcf95d6109dd41b73abae95c3048bf339c8bb7849b3a20edb473388c052d32e00f7fb8b9381138d
AUX gitea-mod-vendor.patch 1273 BLAKE2B 3067b17a972b92d0c402af4336ee41daa2f09d389a6e8bf218d33b103230bf8bb4b7003977447cc00293f8941f5002676398d4d755548e114e59cbb3840af8cc SHA512 12d8e0d2cb0998d31f8077f1498205bfee07e0df74926251f1ca38b9824c11246c07e413fc20beaed9ae49cac3d329468432f3fd2d5b25292c5bd656a88c7cc8
AUX gitea.confd 74 BLAKE2B 656800d35c8f0075005e7e9e5c804292f9884663f89f653426064a20cfbcb518f736bd94947a03bce5adad670fb6150d93026999d6d5395f37a85666b6663a2f SHA512 3e05bad19cd924c4375d9ca6fc57142ba4b5ec897a1c789c3fc9710dfcfee209a199c95040eece089ad93e0357486ab98fad0c448a61e318646b7a71845e9a25
AUX gitea.confd-r1 243 BLAKE2B 87caa8371f53f52b0a85f720342f9f358dedec9240ab78998655a03df6bf3f301fe077afabdca1b1895dbcab2fa05748735d6f38f9b3ad53534fe8ae6e72db49 SHA512 485dc9d0b86d0a7b3ba958aac9de1129aa0ffbb47219419d38811f2accca2539e49dd93cc4a24b21f1c3802b024aa8449f54e320e8a16197f201532edeca6836 AUX gitea.confd-r1 243 BLAKE2B 87caa8371f53f52b0a85f720342f9f358dedec9240ab78998655a03df6bf3f301fe077afabdca1b1895dbcab2fa05748735d6f38f9b3ad53534fe8ae6e72db49 SHA512 485dc9d0b86d0a7b3ba958aac9de1129aa0ffbb47219419d38811f2accca2539e49dd93cc4a24b21f1c3802b024aa8449f54e320e8a16197f201532edeca6836
AUX gitea.initd-r1 688 BLAKE2B eb2341dee53f3fd92c49137855615d9ae7ca77efc396e2d2ed8b624ed2776c7522455a469c00172ecbbe2151ccab476baa0c779baf8a39f63348bdc7ebbd29c2 SHA512 4a6bba463c9abafcb6fc9f3854efd1a69fb3b213c2b34ff6a233f90db535c2ab0f375a0809e4c4be6651ed60d7696a54148a5ee9192567d70ca6a5203a8d3266
AUX gitea.initd-r3 802 BLAKE2B 2e33e95f7d2762986184d45b0bbb250cc5e04fffc4e4b006233b28e5b57be69eef1d83441adebe2b94681585edaf77f9da4eb97930f91e75c1b1a5cd8d137633 SHA512 5ff2e653180a0601734fcd055dfffdfdc12363736ed2e56c8576c802398b90f4025b44002cbb9a3fd1e0c2d4c169f62d460381c6c549746d3390e55fc1c677d1 AUX gitea.initd-r3 802 BLAKE2B 2e33e95f7d2762986184d45b0bbb250cc5e04fffc4e4b006233b28e5b57be69eef1d83441adebe2b94681585edaf77f9da4eb97930f91e75c1b1a5cd8d137633 SHA512 5ff2e653180a0601734fcd055dfffdfdc12363736ed2e56c8576c802398b90f4025b44002cbb9a3fd1e0c2d4c169f62d460381c6c549746d3390e55fc1c677d1
AUX gitea.service 472 BLAKE2B 4c728e2987d0c0a86e65d4b9c1a59f6193ff8a3f9b066991a06f495ad1c5586b3497c71fca1cce5b65f167af09343e7bf3215ee5e8fdefa539e384198d2d88d6 SHA512 6666fe3b4cdbb78a58db4a6bf47a15e6be9ab30b666c6eb77a9e8a002d8c0abd510fc75ef463a11ee6892ab12c98943774616072cb64fd9f2fa42ff8f676aa95
AUX gitea.service-r2 734 BLAKE2B 84825b8198e9495e2803ca3702e6a631fb269c5c8fb4ff4246465a5bd7f7d796b0c3eaea72d0a25cef4f5d38d27a6c99a1b6d41f489749bef322a4ac93cfdd12 SHA512 287670f196bf6353dbdeb6ac37b4ac73693e16a6a3a83f57e7179ccb64364d1d85950a2ddd0a77238a3d218afdaacc8ba849c2810a7ba1238c7277074d1ebe39 AUX gitea.service-r2 734 BLAKE2B 84825b8198e9495e2803ca3702e6a631fb269c5c8fb4ff4246465a5bd7f7d796b0c3eaea72d0a25cef4f5d38d27a6c99a1b6d41f489749bef322a4ac93cfdd12 SHA512 287670f196bf6353dbdeb6ac37b4ac73693e16a6a3a83f57e7179ccb64364d1d85950a2ddd0a77238a3d218afdaacc8ba849c2810a7ba1238c7277074d1ebe39
DIST gitea-1.12.5.tar.gz 135163038 BLAKE2B b3194cd02faed429f447c52e48534b0e6ce348bfe5c226b5064b00517a708f69e2044ebec79cf6b0ea24e7da361a3f1303795b8ce821fd73dd285c9014d218d7 SHA512 7e546cafe7406206a4a7e3a65df5cf2a1ff149be94196f813cb9021dbd267672804e4752608a1148ec98b39840a51efa5010a44812ae31260882a5114a0d880c DIST gitea-1.12.5.tar.gz 135163038 BLAKE2B b3194cd02faed429f447c52e48534b0e6ce348bfe5c226b5064b00517a708f69e2044ebec79cf6b0ea24e7da361a3f1303795b8ce821fd73dd285c9014d218d7 SHA512 7e546cafe7406206a4a7e3a65df5cf2a1ff149be94196f813cb9021dbd267672804e4752608a1148ec98b39840a51efa5010a44812ae31260882a5114a0d880c
DIST gitea-1.13.0.tar.gz 150897624 BLAKE2B b09d3a695a399bfff813f45faf7435eb0b512d448e8329142d8131be786e0dee822a8491c58c8537545350162c89db39cbaaa0ba58c467f2494137f1313a9fec SHA512 bdcc1d3f53ba2b8a6c9964bc15449d3ea237853dfeb2f1da1e4c9f68fb5f09188b3fcef9a1c004ea774003181a85758eb95cff909cc39f6caa611b0505628739
EBUILD gitea-1.12.5.ebuild 3625 BLAKE2B e7f8ffd05f79982a5b8a7e2d44e1a25c702e1b32ab7993a083ade16b06be5723920014adace64212e96f43a93108b5f6c8b6524351c2f35de5c63e9395bbd461 SHA512 840e3737d07ee8be438e22bb1b4781715ed439fcd9eeda598d06c4793505b6caacf58e49bccdf1677a9d363b63aedc78705541238ac386175a76b657dd7f6909 EBUILD gitea-1.12.5.ebuild 3625 BLAKE2B e7f8ffd05f79982a5b8a7e2d44e1a25c702e1b32ab7993a083ade16b06be5723920014adace64212e96f43a93108b5f6c8b6524351c2f35de5c63e9395bbd461 SHA512 840e3737d07ee8be438e22bb1b4781715ed439fcd9eeda598d06c4793505b6caacf58e49bccdf1677a9d363b63aedc78705541238ac386175a76b657dd7f6909
EBUILD gitea-1.13.0.ebuild 3577 BLAKE2B 85172bcb4d4c85325bcdccbbaadbfe99a212b68dc7e9ee834cbb35351c120ff1ce070484bda03cf3d989f47c8e439b34cdd527334a63137603b955eb1ceffd58 SHA512 f9f561e358b70335b97be4ba7c32adc6e74b1beca6008546729b84b4837018866190437f8a53823ec6da21a1dfb4fe246eae2c1e6674e32cae5fc1fb69346467

View File

@ -1,4 +0,0 @@
[log]
MODE = file
LEVEL = Info
ROOT_PATH = /var/log/gitea

View File

@ -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")

View File

@ -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

View File

@ -1,2 +0,0 @@
# arguments for gitea
command_args="--config /var/lib/gitea/conf/app.ini"

View File

@ -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%/*}"
}

View File

@ -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

View File

@ -0,0 +1,132 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fcaps go-module tmpfiles systemd
MY_PV="${PV/_rc/-rc}"
DESCRIPTION="A painless self-hosted Git service"
HOMEPAGE="https://gitea.io"
if [[ ${PV} != 9999* ]] ; then
SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${MY_PV}/gitea-src-${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64"
S="${WORKDIR}"
else
EGIT_REPO_URI="https://github.com/go-gitea/gitea"
inherit git-r3
S="${WORKDIR}/${P}"
fi
LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
SLOT="0"
IUSE="+acct build-client pam sqlite"
BDEPEND="build-client? ( >=net-libs/nodejs-10[npm] )"
COMMON_DEPEND="
acct? (
acct-group/git
acct-user/git[gitea] )
pam? ( sys-libs/pam )"
DEPEND="${COMMON_DEPEND}"
RDEPEND="${COMMON_DEPEND}
dev-vcs/git"
DOCS=(
custom/conf/app.example.ini CONTRIBUTING.md README.md
)
FILECAPS=(
cap_net_bind_service+ep usr/bin/gitea
)
RESTRICT="test"
QA_PRESTRIPPED="usr/bin/gitea"
src_prepare() {
default
local sedcmds=(
-e "s#^RUN_MODE = dev#RUN_MODE = prod#"
-e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
-e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
-e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${EPREFIX}/var/lib/gitea/data#"
-e "s#^HTTP_ADDR = 0.0.0.0#HTTP_ADDR = 127.0.0.1#"
-e "s#^MODE = console#MODE = file#"
-e "s#^LEVEL = Trace#LEVEL = Info#"
-e "s#^LOG_SQL = true#LOG_SQL = false#"
-e "s#^DISABLE_ROUTER_LOG = false#DISABLE_ROUTER_LOG = true#"
-e "s#^APP_ID =#;APP_ID =#"
-e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#"
)
sed -i "${sedcmds[@]}" custom/conf/app.example.ini || die
if use sqlite ; then
sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.example.ini || die
fi
einfo "Remove tests which are known to fail with network-sandbox enabled."
rm ./modules/migrations/github_test.go || die
einfo "Remove tests which depend on gitea git-repo."
rm ./modules/git/blob_test.go || die
rm ./modules/git/repo_test.go || die
# Remove already build assets (like frontend part)
use build-client && emake clean-all
}
src_compile() {
local gitea_tags=(
bindata
$(usev pam)
$(usex sqlite 'sqlite sqlite_unlock_notify' '')
)
local gitea_settings=(
"-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini"
"-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom"
"-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea"
)
local makeenv=(
TAGS="${gitea_tags[@]}"
LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[@]}"
)
[[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${MY_PV}")
if use build-client; then
# -j1 as Makefile doesn't handle dependancy correctly, and is not
# useful as golang compiler don't use this info.
env "${makeenv[@]}" emake -j1 build
else
env "${makeenv[@]}" emake backend
fi
}
src_install() {
dobin gitea
einstalldocs
newconfd "${FILESDIR}/gitea.confd-r1" gitea
newinitd "${FILESDIR}/gitea.initd-r3" gitea
newtmpfiles - gitea.conf <<-EOF
d /run/gitea 0755 git git
EOF
systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
insinto /etc/gitea
newins custom/conf/app.example.ini app.ini
if use acct ; then
fowners root:git /etc/gitea/{,app.ini}
fperms g+w,o-rwx /etc/gitea/{,app.ini}
diropts -m0750 -o git -g git
keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
keepdir /var/log/gitea
fi
}
pkg_postinst() {
fcaps_pkg_postinst
go-module_pkg_postinst
tmpfiles_process gitea.conf
}