diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-06-07 00:08:01 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-06-07 00:08:01 +0100 |
commit | 941687623283212199cbe6e36f7d61b89d6222b2 (patch) | |
tree | ba7fb5198fd46b0b501a9c4362be2c26738408ad /www-apps/gitea | |
parent | 44cec61076bf2bbb3cea1fc89943dd6818a5acc5 (diff) |
gentoo auto-resync : 07:06:2024 - 00:08:01
Diffstat (limited to 'www-apps/gitea')
-rw-r--r-- | www-apps/gitea/Manifest | 13 | ||||
-rw-r--r-- | www-apps/gitea/files/gitea-1.22.0-fix-missing-memcache-import.diff | 18 | ||||
-rw-r--r-- | www-apps/gitea/files/gitea-1.22.0-go-chi-memcache-package.diff | 121 | ||||
-rw-r--r-- | www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff | 20 | ||||
-rw-r--r-- | www-apps/gitea/gitea-1.21.11.ebuild | 2 | ||||
-rw-r--r-- | www-apps/gitea/gitea-1.21.8.ebuild | 147 | ||||
-rw-r--r-- | www-apps/gitea/gitea-1.22.0.ebuild (renamed from www-apps/gitea/gitea-1.21.10.ebuild) | 61 | ||||
-rw-r--r-- | www-apps/gitea/metadata.xml | 1 |
8 files changed, 204 insertions, 179 deletions
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest index 1fc8be1bd650..627f2cf15350 100644 --- a/www-apps/gitea/Manifest +++ b/www-apps/gitea/Manifest @@ -1,10 +1,11 @@ +AUX gitea-1.22.0-fix-missing-memcache-import.diff 525 BLAKE2B 735cb4a792ef9ab6b9f0053e9dbfb3b637799f8c658c8fb0c4cb388052e5bdc307a4074b547620da684f61d46de13678a792db8a6e0f100c780d5f2fd2164b7f SHA512 13d21265144d9e6fbb0d93e28f651dc08fc97e28247ede25512d436bcc5c0c7f24ec9f1044d1604bf685deb945c6a7872f371af5f5ff16546329c871286bfc32 +AUX gitea-1.22.0-go-chi-memcache-package.diff 3561 BLAKE2B 52a83684a9545f8324bd2ffecf09d3e04b06f870387bdbea70d5afba8e642b80731a7ecf7b786b805d0563d26ae45e85515949769ec704a324e958a570c8913d SHA512 88c250f5becb8048288ae80a41baffeac2c4c32163d9ae3dddc4470ea164ba3aa15ee7c2de652d153312ee383c1120f256312934d3c7e6c123057321ffff703b +AUX gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff 778 BLAKE2B 7ef997fcc6aa375c93f93dd369e2906b0d6b0059fd6ee1c0bad6cf05022d41599d762a4fc4b4160e4de102741f189c58fed03ee98dccaa5e5d0c6235f1835d49 SHA512 c1c7c610e29e0f78290c95bd12770e6793a1b62ce6d4c09762c6eed0d1c9463106be078bcfa69f6a5a9e4c109894c054024510eaef5d6d15131b372312dcbcbc AUX gitea.confd-r1 243 BLAKE2B 87caa8371f53f52b0a85f720342f9f358dedec9240ab78998655a03df6bf3f301fe077afabdca1b1895dbcab2fa05748735d6f38f9b3ad53534fe8ae6e72db49 SHA512 485dc9d0b86d0a7b3ba958aac9de1129aa0ffbb47219419d38811f2accca2539e49dd93cc4a24b21f1c3802b024aa8449f54e320e8a16197f201532edeca6836 AUX gitea.initd-r3 802 BLAKE2B 2e33e95f7d2762986184d45b0bbb250cc5e04fffc4e4b006233b28e5b57be69eef1d83441adebe2b94681585edaf77f9da4eb97930f91e75c1b1a5cd8d137633 SHA512 5ff2e653180a0601734fcd055dfffdfdc12363736ed2e56c8576c802398b90f4025b44002cbb9a3fd1e0c2d4c169f62d460381c6c549746d3390e55fc1c677d1 AUX gitea.service-r4 730 BLAKE2B 0a1f799bf341f1a067f417aa21c1ce5c3168fe523081ef1711483d469da71699a2c163f1db008f7724329d6b6a819b1cdc76bc16309691522ebfc5dc9dfa7476 SHA512 cdd13299115e632bc474f24af6d4114b36be6489e11dd8c46b22fbd3f122194d4891cd2452f1654ef9256978fa4d0b6c11c08e386138a6cba29ea69945de8797 -DIST gitea-1.21.10.tar.gz 53972181 BLAKE2B 564e5ee1b7ddb737dc35a712810c3958788457a307db51ecf84fc65b2a69f6b21110e134172c64693cc4bd49c3c6243d4444328ae9a9724e81b06f09df7cd279 SHA512 3129a1b379308195725906fd3c12722099e51662e56e3f488e5114bd531c71f9319e6f170cd227660a1a7f4d30d4d88686b4fc74c28f040d4c9b1a4c6acfba9b DIST gitea-1.21.11.tar.gz 54029294 BLAKE2B 93fb0ea4118baefeb36283b7168759d318fede528b56a9167961763267181bb283bf9849ce5f57a9950b16047f3b98998b4cd0e92443a23aef4cf15589cc8628 SHA512 ba35d1710bc03ff05bf2490e233bf3b4bd9e002113885b4d2a3193288773c16ad0f2426d4ed64d26b7c49112a02838e67da32167f51c4c08fa4f23738bd78285 -DIST gitea-1.21.8.tar.gz 53901461 BLAKE2B e20f509037e5bb674696fb9bdc9b3eb58443f0481f5db2936a69775adcd8c1b53ad7103bae6ba4de2e852ef50218b8bd89dae174d19e0879d04f169e890af71b SHA512 e895d67ab0c086fdef6aab6548ed06696054bb0a8103818c14f5f038a6fc6310178473038fa76752341a50196916ce3845b785f25ab66383bdf44ce8eac87461 -EBUILD gitea-1.21.10.ebuild 4747 BLAKE2B 8bb5e67a507e3d8b1253cc4321f9d0742ab0e2a4321aa869e1dce2a27bb6acc2cd4d04c3e87c96e0549987497d42ad9601ed7ad5d583294a217f94d5a23c4cac SHA512 4a3194e2ebeb1bb23b21a5a22bdb44427bc9ed1a15a2824ecbf70e00eddbd3838689f00d80c1618df590456cf7c6ddb6d2e51e92d9d285d45ae69fffeb9df826 -EBUILD gitea-1.21.11.ebuild 4747 BLAKE2B 8bb5e67a507e3d8b1253cc4321f9d0742ab0e2a4321aa869e1dce2a27bb6acc2cd4d04c3e87c96e0549987497d42ad9601ed7ad5d583294a217f94d5a23c4cac SHA512 4a3194e2ebeb1bb23b21a5a22bdb44427bc9ed1a15a2824ecbf70e00eddbd3838689f00d80c1618df590456cf7c6ddb6d2e51e92d9d285d45ae69fffeb9df826 -EBUILD gitea-1.21.8.ebuild 4746 BLAKE2B b14f2f55bf6d344cf9eec51018baac9294d72fc135dd85bc4792fdd96fbccd2bd62f923b7f8f70e2d667a2c6304777beb58ecd5bb0361f1c87136b0e4ad1216c SHA512 087db4bfab0dda1840b5e205121275915d939084ec551236e98b10690860524caaf5226ce9cbce9f460c3223a4e5931ec7184a9b6f99e5625309429b7b2ee9a7 -MISC metadata.xml 674 BLAKE2B ef13e93b317da43177365b0b0378aec52a1c7cbdc57b69815520d4dc4e1f98c043dc3eee059d06990dcb7c6549ad2db7150786e542486e957ba1ab63e21118fa SHA512 a4eb5d192dff7967c2ff5f94135c60d13ff52a7dffbf42c9d3c50efd3df0833d129580e895caed9148cb2d9df85da17d94d0cbdc43341d05df8917ea238a87eb +DIST gitea-1.22.0.tar.gz 54603268 BLAKE2B f021fedf77ec6ab41221a8e73d6b48fc215c15053bb62ff288a5dc6a7d11a5acd4d7ee0cbfb40aee2b60011d83fc57f1011013b7d78556c3a84a2743ba90389b SHA512 8e9585d6224f49c2f21b855911c2ac4ded64b8b31c4eb28fbe39801908693a87aad2e9096bf812c30163faa8a8102fd01ec3240bd64debf5633c70568aec4b49 +EBUILD gitea-1.21.11.ebuild 4746 BLAKE2B b14f2f55bf6d344cf9eec51018baac9294d72fc135dd85bc4792fdd96fbccd2bd62f923b7f8f70e2d667a2c6304777beb58ecd5bb0361f1c87136b0e4ad1216c SHA512 087db4bfab0dda1840b5e205121275915d939084ec551236e98b10690860524caaf5226ce9cbce9f460c3223a4e5931ec7184a9b6f99e5625309429b7b2ee9a7 +EBUILD gitea-1.22.0.ebuild 5685 BLAKE2B 0eeefb6984d8a8982ef058085f2ddf3b0c0a9589b48f32b8a59de7651cefcf5591e26879edc75e78fcf1426b510c6ee540eff3ff66a75f5856da4a9ae3ebee4e SHA512 633b8a07aead76ea36eebf95ae446405516123585d0a8a69965d7eb84b976c3497445147b734dc4cba510355c12ee16a3a5a9473d35ae77234ba6a6d0bce3ed5 +MISC metadata.xml 754 BLAKE2B 0880dba11ea8bd584aa4dbebd94fbb5073e2ece2694152d7c1c7b8eaf531fbc0d314d98405c050e31a025e7031fd2476129347fc4a3643ffd0cc38aeebbee676 SHA512 58f218fac259cf5d11f288f079786323f1e76cd5e5e7503b4efe68ae86fb9d8d76773b1a9eed4872dabb9cf20f337509fc52d20bba7c60d7fb83b04adffa0e30 diff --git a/www-apps/gitea/files/gitea-1.22.0-fix-missing-memcache-import.diff b/www-apps/gitea/files/gitea-1.22.0-fix-missing-memcache-import.diff new file mode 100644 index 000000000000..1ad5d50bf047 --- /dev/null +++ b/www-apps/gitea/files/gitea-1.22.0-fix-missing-memcache-import.diff @@ -0,0 +1,18 @@ +https://github.com/go-gitea/gitea/issues/31102 +https://github.com/go-gitea/gitea/pull/31105 + +Fix missing memcache import + +diff --git a/modules/cache/cache.go b/modules/cache/cache.go +index 2ca77bdb29f3..075367115803 100644 +--- a/modules/cache/cache.go ++++ b/modules/cache/cache.go +@@ -8,6 +8,8 @@ import ( + "time" + + "code.gitea.io/gitea/modules/setting" ++ ++ _ "gitea.com/go-chi/cache/memcache" //nolint:depguard // memcache plugin for cache, it is required for config "ADAPTER=memcache" + ) + + var defaultCache StringCache diff --git a/www-apps/gitea/files/gitea-1.22.0-go-chi-memcache-package.diff b/www-apps/gitea/files/gitea-1.22.0-go-chi-memcache-package.diff new file mode 100644 index 000000000000..f3ebbe6fc73f --- /dev/null +++ b/www-apps/gitea/files/gitea-1.22.0-go-chi-memcache-package.diff @@ -0,0 +1,121 @@ +https://github.com/go-gitea/gitea/issues/31102 +https://github.com/go-gitea/gitea/pull/31105 + +add the missing memcache package in the vendor dir, +binding to patch ./gitea-1.22.0-fix-missing-memcache-import.diff + +diff --git a/vendor/gitea.com/go-chi/cache/memcache/memcache.go b/vendor/gitea.com/go-chi/cache/memcache/memcache.go +new file mode 100644 +index 00000000..7c7cd225 +--- /dev/null ++++ b/vendor/gitea.com/go-chi/cache/memcache/memcache.go +@@ -0,0 +1,97 @@ ++// Copyright 2013 Beego Authors ++// Copyright 2014 The Macaron Authors ++// ++// Licensed under the Apache License, Version 2.0 (the "License"): you may ++// not use this file except in compliance with the License. You may obtain ++// a copy of the License at ++// ++// http://www.apache.org/licenses/LICENSE-2.0 ++// ++// Unless required by applicable law or agreed to in writing, software ++// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT ++// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the ++// License for the specific language governing permissions and limitations ++// under the License. ++ ++package cache ++ ++import ( ++ "strings" ++ ++ "github.com/bradfitz/gomemcache/memcache" ++ "github.com/unknwon/com" ++ ++ "gitea.com/go-chi/cache" ++) ++ ++// MemcacheCacher represents a memcache cache adapter implementation. ++type MemcacheCacher struct { ++ c *memcache.Client ++} ++ ++func NewItem(key string, data []byte, expire int32) *memcache.Item { ++ return &memcache.Item{ ++ Key: key, ++ Value: data, ++ Expiration: expire, ++ } ++} ++ ++// Put puts value into cache with key and expire time. ++// If expired is 0, it lives forever. ++func (c *MemcacheCacher) Put(key string, val interface{}, expire int64) error { ++ return c.c.Set(NewItem(key, []byte(com.ToStr(val)), int32(expire))) ++} ++ ++// Get gets cached value by given key. ++func (c *MemcacheCacher) Get(key string) interface{} { ++ item, err := c.c.Get(key) ++ if err != nil { ++ return nil ++ } ++ return string(item.Value) ++} ++ ++// Delete deletes cached value by given key. ++func (c *MemcacheCacher) Delete(key string) error { ++ return c.c.Delete(key) ++} ++ ++// Incr increases cached int-type value by given key as a counter. ++func (c *MemcacheCacher) Incr(key string) error { ++ _, err := c.c.Increment(key, 1) ++ return err ++} ++ ++// Decr decreases cached int-type value by given key as a counter. ++func (c *MemcacheCacher) Decr(key string) error { ++ _, err := c.c.Decrement(key, 1) ++ return err ++} ++ ++// IsExist returns true if cached value exists. ++func (c *MemcacheCacher) IsExist(key string) bool { ++ _, err := c.c.Get(key) ++ return err == nil ++} ++ ++// Flush deletes all cached data. ++func (c *MemcacheCacher) Flush() error { ++ return c.c.FlushAll() ++} ++ ++// StartAndGC starts GC routine based on config string settings. ++// AdapterConfig: 127.0.0.1:9090;127.0.0.1:9091 ++func (c *MemcacheCacher) StartAndGC(opt cache.Options) error { ++ c.c = memcache.New(strings.Split(opt.AdapterConfig, ";")...) ++ return nil ++} ++ ++// Ping tests if the cache is alive. ++func (c *MemcacheCacher) Ping() error { ++ return cache.GenericPing(c) ++} ++ ++func init() { ++ cache.Register("memcache", &MemcacheCacher{}) ++} +diff --git a/vendor/modules.txt b/vendor/modules.txt +index 144a505d..6cb3f48b 100644 +--- a/vendor/modules.txt ++++ b/vendor/modules.txt +@@ -40,6 +40,7 @@ gitea.com/go-chi/binding + # gitea.com/go-chi/cache v0.2.0 + ## explicit; go 1.11 + gitea.com/go-chi/cache ++gitea.com/go-chi/cache/memcache + # gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098 + ## explicit; go 1.21 + gitea.com/go-chi/captcha diff --git a/www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff b/www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff new file mode 100644 index 000000000000..78459f6e3359 --- /dev/null +++ b/www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff @@ -0,0 +1,20 @@ +https://github.com/go-gitea/gitea/issues/31163 +https://github.com/go-gitea/gitea/pull/31164 + +A quick fix to workaround 500 error: +FindRecentlyPushedNewBranches, branch does not exist [repo_id: 64 name: main] + +diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go +index e1498c0d581e..386ef7be5ce8 100644 +--- a/routers/web/repo/view.go ++++ b/routers/web/repo/view.go +@@ -1047,8 +1047,7 @@ func renderHomeCode(ctx *context.Context) { + baseRepoPerm.CanRead(unit_model.TypePullRequests) { + ctx.Data["RecentlyPushedNewBranches"], err = git_model.FindRecentlyPushedNewBranches(ctx, ctx.Doer, opts) + if err != nil { +- ctx.ServerError("FindRecentlyPushedNewBranches", err) +- return ++ log.Error("FindRecentlyPushedNewBranches failed: %v", err) + } + } + } diff --git a/www-apps/gitea/gitea-1.21.11.ebuild b/www-apps/gitea/gitea-1.21.11.ebuild index 7a37bd3df1e3..df7f876a0823 100644 --- a/www-apps/gitea/gitea-1.21.11.ebuild +++ b/www-apps/gitea/gitea-1.21.11.ebuild @@ -13,7 +13,7 @@ if [[ ${PV} == *9999 ]]; then EGIT_REPO_URI="https://github.com/go-gitea/gitea.git" else SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86" + KEYWORDS="amd64 ~arm ~arm64 ~loong ~riscv ~x86" fi S="${WORKDIR}/${PN}-src-${PV}" diff --git a/www-apps/gitea/gitea-1.21.8.ebuild b/www-apps/gitea/gitea-1.21.8.ebuild deleted file mode 100644 index df7f876a0823..000000000000 --- a/www-apps/gitea/gitea-1.21.8.ebuild +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright 2016-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit fcaps go-module tmpfiles systemd flag-o-matic user-info - -DESCRIPTION="A painless self-hosted Git service" -HOMEPAGE="https://gitea.com https://github.com/go-gitea/gitea" - -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/go-gitea/gitea.git" -else - SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="amd64 ~arm ~arm64 ~loong ~riscv ~x86" -fi - -S="${WORKDIR}/${PN}-src-${PV}" - -LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT MPL-2.0" -SLOT="0" -IUSE="+acct pam sqlite pie" - -DEPEND=" - acct? ( - acct-group/git - acct-user/git[gitea] ) - pam? ( sys-libs/pam )" -RDEPEND="${DEPEND} - dev-vcs/git" -BDEPEND=">=dev-lang/go-1.21:=" - -DOCS=( - custom/conf/app.example.ini CHANGELOG.md CONTRIBUTING.md README.md -) -FILECAPS=( - -m 711 cap_net_bind_service+ep usr/bin/gitea -) - -RESTRICT="test" - -src_prepare() { - default - - sed -i -e "s#^MODE = console#MODE = file#" custom/conf/app.example.ini || die -} - -src_configure() { - # bug 832756 - PIE build issues - filter-flags -fPIE - filter-ldflags -fPIE -pie -} - -src_compile() { - local gitea_tags - local -a gitea_settings makeenv - - # The space-separated list of the -tags flag is deprecated, please - # always use the comma-separated list in the future. - gitea_tags="bindata" - gitea_tags+="$(usex pam ',pam' '')" - gitea_tags+="$(usex sqlite ',sqlite,sqlite_unlock_notify' '')" - - 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" - ) - - makeenv=( - LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[*]}" - TAGS="${gitea_tags}" - ) - - if [[ ${PV} != *9999 ]]; then - # Use variable STORED_VERSION_FILE (the "${S}/VERSION" file) to set version, - # and prevent executing git command when it's not a live version. - makeenv+=( GITHUB_REF_NAME="" ) - fi - - if use pie ; then - # Please check the supported platforms when a new keyword request opened, - # refer to file: 'go/src/internal/platform/supported.go'. - # When PIE buildmode is not supported by internal linker, the external - # linker will be used automatically, refer to: - # https://github.com/golang/go/blob/ed817f1c4055a559a94afffecbb91c78e4f39942/src/cmd/link/internal/ld/config.go#L149 - makeenv+=( EXTRA_GOFLAGS="-buildmode=pie" ) - fi - - env "${makeenv[@]}" emake backend -} - -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-r4 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 - - # It is not guaranteed that the git user and group always exist (due to the acct USE Flag), - # but for convenience, the tmpfile uses the git user and group by default. - # To avoid installation errors, a condition needs to be added here: - # if there is no git user or group, the installation of tmpfile will be skipped - # and the user will be notified to handle it by themselves. - if egetent passwd git &>/dev/null && \ - egetent group git &>/dev/null; then - tmpfiles_process gitea.conf - else - eerror "Unable to install the tmpfile for gitea due to the git user or group is missing," - eerror "please install tmpfile manually or rebuild this package with USE flag 'acct'." - eerror "You can simply copy the default tmpfile from '/usr/lib/tmpfiles.d/gitea.conf'" - eerror "to higher priority path '/etc/tmpfiles.d/gitea.conf', and correct it with" - eerror "the right User and Group value (see tmpfiles.d(5) for details), then execute:" - eerror " # systemd-tmpfiles --create /etc/tmpfiles.d/gitea.conf" - eerror "to install it." - fi - - if [[ -n ${REPLACING_VERSIONS} ]] && ver_test "${REPLACING_VERSIONS}" -lt 1.21; then - ewarn "Since 1.21.0:" - ewarn " 1. The built-in SSH server will now only accept SSH user" - ewarn " certificates, not server certificates. This behaviour matches OpenSSH." - ewarn " 2. The options of the subcommand must follow the subcommand now." - ewarn " 3. Remove 'CHARSET' config option for MySQL, always use 'utf8mb4'." - ewarn "For other breaking changes, see <https://github.com/go-gitea/gitea/releases/tag/v1.21.0>." - fi -} diff --git a/www-apps/gitea/gitea-1.21.10.ebuild b/www-apps/gitea/gitea-1.22.0.ebuild index 7a37bd3df1e3..dec2601480a6 100644 --- a/www-apps/gitea/gitea-1.21.10.ebuild +++ b/www-apps/gitea/gitea-1.22.0.ebuild @@ -8,19 +8,12 @@ inherit fcaps go-module tmpfiles systemd flag-o-matic user-info DESCRIPTION="A painless self-hosted Git service" HOMEPAGE="https://gitea.com https://github.com/go-gitea/gitea" -if [[ ${PV} == *9999 ]]; then - inherit git-r3 - EGIT_REPO_URI="https://github.com/go-gitea/gitea.git" -else - SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86" -fi - +SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}/${PN}-src-${PV}" - LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT MPL-2.0" SLOT="0" -IUSE="+acct pam sqlite pie" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86" +IUSE="+acct gogit pam sqlite pie" DEPEND=" acct? ( @@ -28,8 +21,8 @@ DEPEND=" acct-user/git[gitea] ) pam? ( sys-libs/pam )" RDEPEND="${DEPEND} - dev-vcs/git" -BDEPEND=">=dev-lang/go-1.21:=" + !gogit? ( dev-vcs/git )" +BDEPEND=">=dev-lang/go-1.22:=" DOCS=( custom/conf/app.example.ini CHANGELOG.md CONTRIBUTING.md README.md @@ -40,6 +33,14 @@ FILECAPS=( RESTRICT="test" +# The problems that can be fixed by the following patches has been fixed +# upstream, so these ALL patches should be removed in the next release. +PATCHES=( + "${FILESDIR}/${P}-go-chi-memcache-package.diff" + "${FILESDIR}/${P}-fix-missing-memcache-import.diff" + "${FILESDIR}/${P}-ignore-findrecentlypushednewbranches-err.diff" +) + src_prepare() { default @@ -59,6 +60,7 @@ src_compile() { # The space-separated list of the -tags flag is deprecated, please # always use the comma-separated list in the future. gitea_tags="bindata" + gitea_tags+="$(usex gogit ',gogit' '')" gitea_tags+="$(usex pam ',pam' '')" gitea_tags+="$(usex sqlite ',sqlite,sqlite_unlock_notify' '')" @@ -73,12 +75,6 @@ src_compile() { TAGS="${gitea_tags}" ) - if [[ ${PV} != *9999 ]]; then - # Use variable STORED_VERSION_FILE (the "${S}/VERSION" file) to set version, - # and prevent executing git command when it's not a live version. - makeenv+=( GITHUB_REF_NAME="" ) - fi - if use pie ; then # Please check the supported platforms when a new keyword request opened, # refer to file: 'go/src/internal/platform/supported.go'. @@ -136,12 +132,27 @@ pkg_postinst() { eerror "to install it." fi - if [[ -n ${REPLACING_VERSIONS} ]] && ver_test "${REPLACING_VERSIONS}" -lt 1.21; then - ewarn "Since 1.21.0:" - ewarn " 1. The built-in SSH server will now only accept SSH user" - ewarn " certificates, not server certificates. This behaviour matches OpenSSH." - ewarn " 2. The options of the subcommand must follow the subcommand now." - ewarn " 3. Remove 'CHARSET' config option for MySQL, always use 'utf8mb4'." - ewarn "For other breaking changes, see <https://github.com/go-gitea/gitea/releases/tag/v1.21.0>." + if [[ -n ${REPLACING_VERSIONS} ]]; then + if ver_test "${REPLACING_VERSIONS}" -lt 1.21; then + ewarn "Since version 1.21.0:" + ewarn " 1. The built-in SSH server will now only accept SSH user" + ewarn " certificates, not server certificates. This behaviour matches OpenSSH." + ewarn " 2. The options of the subcommand must follow the subcommand now." + ewarn " 3. Remove 'CHARSET' config option for MySQL, always use 'utf8mb4'." + ewarn "For other breaking changes, see <https://github.com/go-gitea/gitea/releases/tag/v1.21.0>." + fi + if ver_test "${REPLACING_VERSIONS}" -lt 1.22; then + ewarn "Since version 1.22.0:" + ewarn " 1. Minimum database requirements updated to MySQL 8.0, PostgreSQL 12, and MSSQL 2012." + ewarn " 2. There are a lot of refactoring changes related to customizing templates." + ewarn " 3. The default duration of the 'Remember login' feature has been" + ewarn " changed from one week to one month." + ewarn " 4. Enhanced auth token/remember me, the obsolete setting" + ewarn " '[security].COOKIE_USERNAME' has been removed." + ewarn " 5. For MinIO storage, adds a prefix path for all MinIO storage" + ewarn " and override base path will override the path." + ewarn " 6. Now use a more restricted sanitizer for the repository description." + ewarn "For more details, see <https://github.com/go-gitea/gitea/releases/tag/v1.22.0>." + fi fi } diff --git a/www-apps/gitea/metadata.xml b/www-apps/gitea/metadata.xml index 1443204ea795..007dbafc9b14 100644 --- a/www-apps/gitea/metadata.xml +++ b/www-apps/gitea/metadata.xml @@ -18,5 +18,6 @@ </upstream> <use> <flag name="acct">User and group management via acct-*/git packages</flag> + <flag name="gogit">(EXPERIMENTAL) Use go-git variants of Git commands.</flag> </use> </pkgmetadata> |