summaryrefslogtreecommitdiff
path: root/www-apps/gitea
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-11-17 04:54:15 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-11-17 04:54:15 +0000
commit04a96556dc0036655ac429edf598cc48febe294b (patch)
tree6577b5fabfcb1cee8eac4db1da2a0df03e5406a8 /www-apps/gitea
parentb7a94956953b9eb949dbf7a2b05fff47558c99a8 (diff)
gentoo auto-resync : 17:11:2023 - 04:54:15
Diffstat (limited to 'www-apps/gitea')
-rw-r--r--www-apps/gitea/Manifest5
-rw-r--r--www-apps/gitea/files/gitea.service-r434
-rw-r--r--www-apps/gitea/gitea-1.21.0.ebuild128
-rw-r--r--www-apps/gitea/metadata.xml13
4 files changed, 178 insertions, 2 deletions
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index a68c6fb0572e..4955cebeb45c 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1,8 +1,11 @@
AUX gitea.confd-r1 243 BLAKE2B 87caa8371f53f52b0a85f720342f9f358dedec9240ab78998655a03df6bf3f301fe077afabdca1b1895dbcab2fa05748735d6f38f9b3ad53534fe8ae6e72db49 SHA512 485dc9d0b86d0a7b3ba958aac9de1129aa0ffbb47219419d38811f2accca2539e49dd93cc4a24b21f1c3802b024aa8449f54e320e8a16197f201532edeca6836
AUX gitea.initd-r3 802 BLAKE2B 2e33e95f7d2762986184d45b0bbb250cc5e04fffc4e4b006233b28e5b57be69eef1d83441adebe2b94681585edaf77f9da4eb97930f91e75c1b1a5cd8d137633 SHA512 5ff2e653180a0601734fcd055dfffdfdc12363736ed2e56c8576c802398b90f4025b44002cbb9a3fd1e0c2d4c169f62d460381c6c549746d3390e55fc1c677d1
AUX gitea.service-r3 732 BLAKE2B 8227349f9ffe5dbf7c59efc3b1e250bf8184a72d37958c0ce0a2d8affabaadcb6aaf271b1402c7ac127b80d534f4f72b888ccdce7aa5f7a7cf86a0efe0e719e0 SHA512 7c8aa33dcea56b6fccac23095f7b84225f1c85541cd5eb3536d2901e638c391e025bd9db28bd10c26ef91e5a8fe2d12a878040cf21d4b983858a19f2cac7d1b0
+AUX gitea.service-r4 730 BLAKE2B 0a1f799bf341f1a067f417aa21c1ce5c3168fe523081ef1711483d469da71699a2c163f1db008f7724329d6b6a819b1cdc76bc16309691522ebfc5dc9dfa7476 SHA512 cdd13299115e632bc474f24af6d4114b36be6489e11dd8c46b22fbd3f122194d4891cd2452f1654ef9256978fa4d0b6c11c08e386138a6cba29ea69945de8797
DIST gitea-1.20.4.tar.gz 50489949 BLAKE2B 1c14ec9f784cbbe3f67872b5344df209009bd32dc624b8e0351c2050ffa90657556ec6bd77b69acdb7a7506918aafbbb72a97839d92c2b39241c308ebeb4e565 SHA512 5e08959e0ff421898aebcb7640ab0869c1cabd82c84254c94024d2da16f91755e183b477a190a7b1987a5ab9ae7787c85d37fb9db990bddda937a4200777ed7c
DIST gitea-1.20.5.tar.gz 50448780 BLAKE2B d8a1dc6bc147a06adc9280ea5d75d8cf039d447d96b4cd4ca6b35b11af5ed71df73d36b4c102f5b8ded2ba85efaea6104b31a4f39ab66c8a0c98cd36e826b734 SHA512 360a7a7bf0a51ea6d1fbcdfb35c5c3492b4fc6e29a9b60d0e6c6d01257d4743c580cf907293df8a4244750c5afe9ba1b33b2a898a18dd9e13947c58116ba3021
+DIST gitea-1.21.0.tar.gz 53744981 BLAKE2B 45c6172260fe616927ae03795245db7d15fc0a09f93d2fe974bb040d940e495bbed10710c643a8f9e85f156ccff9a2e34c905a26d4dcdf6317654ed5cda9ce2f SHA512 b3b5a72d7ebe119c975f0e7fcb4b4174582b866bdf4775181975a0b10904b5b54f8b6a1d865c75554e6d6998fe9f6d7846c3ebf5552926f1919f8cf986e798e6
EBUILD gitea-1.20.4.ebuild 2875 BLAKE2B aa6c8b9a42b7586d88f831e2195d6249ed81123b71e392326bf957ebfe46a83144c67c0ca441b7e27d4892ddfd5807d885c372e8f49a4eccb288480e6f50d1ec SHA512 1d46cf5da23f784fcb915ea8cc40faaa8c7238e5938c9dbb82ca9ed7aa9bf23c2ff8a8d28c647658529a462e601f8c81c75bfd9a353218be1f55370d17ad11b8
EBUILD gitea-1.20.5.ebuild 2876 BLAKE2B d9d4521eb5950b607882c8ed9cf1b04108839c9f23be019013cf3428796a26f45b1ae0a80a716962b09fedc244977ccae23de94c694e52a9ae70837664af8c02 SHA512 9ff3ff99e9890bbf3aea8a4c199dfe41711ae8d7b001ba6b7014d5ff36403182bd386cada2ddab844237dab2afd9917acc1c3ce7c064a8cb5503c57ad7aea0cd
-MISC metadata.xml 339 BLAKE2B 6117542b37ffbb9dc5aa2420c5846c95864b632cb35e1c69acea24d0eaed05767b0c3607a58bc9ab8e54596927072f1c7c5cb795ee44d076b7ac027d0ee65a58 SHA512 9b05184ccba06361a7dfdecced7ad53d887065763bbbc736aedc791d9089f146f99fbbd6a483bdaf47a6ee5d4965dfc2a66e6990bea1beb599baf621c2c16471
+EBUILD gitea-1.21.0.ebuild 3622 BLAKE2B 2e8b5bd63196bfb1aac6959aca5f0a6cd603a95be91a5410a326fe2905ecdbac1fa4d52c6f6ee2dc00134fba664970506ac619dfa498dc07b72e07e72638f251 SHA512 03af4dece0f479291097ea5e5fa8cd550ed916d6dde35af6910fbb05104ee270d81efae197c257f88261ab67d2eaef79767f4621473dd48b6a0a230fd31582dd
+MISC metadata.xml 674 BLAKE2B ef13e93b317da43177365b0b0378aec52a1c7cbdc57b69815520d4dc4e1f98c043dc3eee059d06990dcb7c6549ad2db7150786e542486e957ba1ab63e21118fa SHA512 a4eb5d192dff7967c2ff5f94135c60d13ff52a7dffbf42c9d3c50efd3df0833d129580e895caed9148cb2d9df85da17d94d0cbdc43341d05df8917ea238a87eb
diff --git a/www-apps/gitea/files/gitea.service-r4 b/www-apps/gitea/files/gitea.service-r4
new file mode 100644
index 000000000000..3fa73aaf1db8
--- /dev/null
+++ b/www-apps/gitea/files/gitea.service-r4
@@ -0,0 +1,34 @@
+[Unit]
+Description=Gitea service
+Documentation=https://docs.gitea.io/
+
+AssertPathIsDirectory=/var/lib/gitea
+AssertPathIsReadWrite=/var/lib/gitea
+
+After=network.target
+Requires=network.target
+After=mysqld.service
+After=postgresql-10.service
+After=postgresql-11.service
+After=postgresql-12.service
+After=postgresql-13.service
+After=postgresql-14.service
+After=postgresql-15.service
+After=postgresql-16.service
+After=memcached.service
+After=redis.service
+
+[Service]
+User=git
+Group=git
+
+Environment="GITEA_WORK_DIR=/var/lib/gitea" "GITEA_CUSTOM=/var/lib/gitea/custom"
+WorkingDirectory=/var/lib/gitea
+ExecStart=/usr/bin/gitea --config /etc/gitea/app.ini web
+
+Restart=always
+PrivateTmp=true
+Nice=5
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-apps/gitea/gitea-1.21.0.ebuild b/www-apps/gitea/gitea-1.21.0.ebuild
new file mode 100644
index 000000000000..fce72a8ba35f
--- /dev/null
+++ b/www-apps/gitea/gitea-1.21.0.ebuild
@@ -0,0 +1,128 @@
+# Copyright 2016-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fcaps go-module tmpfiles systemd flag-o-matic
+
+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 ~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
+ tmpfiles_process gitea.conf
+
+ 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>."
+}
diff --git a/www-apps/gitea/metadata.xml b/www-apps/gitea/metadata.xml
index c5a8b29fd81a..1443204ea795 100644
--- a/www-apps/gitea/metadata.xml
+++ b/www-apps/gitea/metadata.xml
@@ -1,7 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <!-- maintainer-needed -->
+ <maintainer type="person" proxied="yes">
+ <email>i@bitbili.net</email>
+ <name>Ryan Qian</name>
+ </maintainer>
+ <maintainer type="person" proxied="proxy">
+ <email>dlan@gentoo.org</email>
+ <name>Yixun Lan</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
<upstream>
<remote-id type="github">go-gitea/gitea</remote-id>
</upstream>