aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtemis Everfree <artemis@artemis.sh>2024-02-22 19:35:23 -0800
committerArtemis Everfree <artemis@artemis.sh>2024-02-22 19:36:00 -0800
commitaac4ab4ccd5de0afbf545d5fdf9206cfd3d42309 (patch)
tree9170b8f0c831f3f87f38433d01dd4397b585a51b /www-apps
parentgui-apps/hyprland-plugins: treeclean (diff)
downloadguru-aac4ab4ccd5de0afbf545d5fdf9206cfd3d42309.tar.gz
guru-aac4ab4ccd5de0afbf545d5fdf9206cfd3d42309.tar.bz2
guru-aac4ab4ccd5de0afbf545d5fdf9206cfd3d42309.zip
www-apps/forgejo: add 1.21.6.0
Signed-off-by: Artemis Everfree <artemis@artemis.sh>
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/forgejo/Manifest1
-rw-r--r--www-apps/forgejo/forgejo-1.21.6.0.ebuild136
2 files changed, 137 insertions, 0 deletions
diff --git a/www-apps/forgejo/Manifest b/www-apps/forgejo/Manifest
index 2e46d41c9..448273b2c 100644
--- a/www-apps/forgejo/Manifest
+++ b/www-apps/forgejo/Manifest
@@ -1,3 +1,4 @@
DIST forgejo-1.20.5.0.tar.gz 55539985 BLAKE2B 09830af9cfac13e3ca790cd54fd884f1d3cfa1e18b7d8c07517c669fe15e28a3074777ad2f031533aab4a9812fd9e580eeaa6be7d88b68fce2ccfdfbd258d37e SHA512 db42ae29fb5005a2ebf3474784fbec15bbae25c255ead00c7aa6227f844a608cd52c146b215ffec6b7e6ead5f001c37d459b01695c224c0edb519cb71c249eb5
DIST forgejo-1.20.6.0.tar.gz 55539743 BLAKE2B d44fcaec52b164099a221f2172faab8fe078b5fdaf8c9910042278f6276f4ff557d2a527a5159a0bb157f773ffcc91595d2183e1be53b97187cb35ee684fa7ce SHA512 047b41b3192053df8c0f37675c087bc5fbed9967e8f23cab35bede76071129e6f18ec0561a0415a2eaa2010877dedfd15a231f050a1738fca1a5e437f89e93b5
DIST forgejo-1.21.5.0.tar.gz 58775082 BLAKE2B 05b5ee8a394ad2968769cda82b0caa368d6a0fa81686c67e3384ad8b69b43acfd53702af3ff383f05c6b2a4a2e191fb77ca7bd4755ce231451c21c97cc79e270 SHA512 947870af1601dcad9ed08157c0dc8971e333646b1ff1312592f408896e6a87804ed4dc1a22af87d1948fd64a34ec5af0209bad23fb742bb585244588b11062cf
+DIST forgejo-1.21.6.0.tar.gz 58787727 BLAKE2B 7d3b77b05771261986a7623a79f9eee1525c723eb5bb2cdb9c7a66ee12bc5fb352ab5857aece92359d397ded4b57cb5ce31ca98cba0d45871f237a27bb009bb7 SHA512 298544a8301bc2415b0cbad943316ac4b2b17b3ab15927d707a34e48fe04d327756c8febe3a8e942c1fd1edd3c92109ddcaf6a12e31d360d4fc82575e9f18565
diff --git a/www-apps/forgejo/forgejo-1.21.6.0.ebuild b/www-apps/forgejo/forgejo-1.21.6.0.ebuild
new file mode 100644
index 000000000..96b099501
--- /dev/null
+++ b/www-apps/forgejo/forgejo-1.21.6.0.ebuild
@@ -0,0 +1,136 @@
+# 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
+
+MY_PV="$(ver_cut 1-3)-$(ver_cut 4)"
+DESCRIPTION="A self-hosted lightweight software forge"
+HOMEPAGE="https://forgejo.org/ https://codeberg.org/forgejo/forgejo"
+
+SRC_URI="https://codeberg.org/forgejo/forgejo/releases/download/v${MY_PV}/forgejo-src-${MY_PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86"
+S="${WORKDIR}/${PN}-src-${MY_PV}"
+
+LICENSE="Apache-2.0 BSD BSD-2 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
+ !www-apps/gitea" # until acct-user/git[forgejo]
+
+DOCS=(
+ custom/conf/app.example.ini CONTRIBUTING.md README.md
+)
+FILECAPS=(
+ -m 711 cap_net_bind_service+ep usr/bin/forgejo
+)
+
+RESTRICT="test"
+
+src_prepare() {
+ default
+
+ local sedcmds=(
+ -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
+ -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/forgejo#"
+ -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#"
+ )
+
+ 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
+}
+
+src_configure() {
+ # bug 832756 - PIE build issues
+ filter-flags -fPIE
+ filter-ldflags -fPIE -pie
+}
+
+src_compile() {
+ local forgejo_tags=(
+ bindata
+ $(usev pam)
+ $(usex sqlite 'sqlite sqlite_unlock_notify' '')
+ )
+ local forgejo_settings=(
+ "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/forgejo/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=(
+ DRONE_TAG="${PV}"
+ LDFLAGS="-extldflags \"${LDFLAGS}\" ${forgejo_settings[*]}"
+ TAGS="${forgejo_tags[*]}"
+ )
+
+ GOFLAGS=""
+ if use pie ; then
+ GOFLAGS+="-buildmode=pie"
+ fi
+
+ # need to set -j1 or build fails due to a race condition between MAKE jobs.
+ # this does not actually impact build parallelism, because the go compiler
+ # will still build everything in parallel when it's invoked.
+ env "${makeenv[@]}" emake -j1 EXTRA_GOFLAGS="${GOFLAGS}" backend
+}
+
+src_install() {
+ cp gitea forgejo
+ dobin forgejo
+
+ einstalldocs
+
+ newconfd "${FILESDIR}/forgejo.confd-r1" forgejo
+ newinitd "${FILESDIR}/forgejo.initd-r3" forgejo
+ newtmpfiles - forgejo.conf <<-EOF
+ d /run/forgejo 0755 git git
+ EOF
+ systemd_newunit "${FILESDIR}"/forgejo.service-r3 forgejo.service
+
+ insinto /etc/forgejo
+ newins custom/conf/app.example.ini app.ini
+ if use acct; then
+ fowners root:git /etc/forgejo/{,app.ini}
+ fperms g+w,o-rwx /etc/forgejo/{,app.ini}
+
+ diropts -m0750 -o git -g git
+ keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
+ keepdir /var/log/forgejo
+ fi
+}
+
+pkg_postinst() {
+ fcaps_pkg_postinst
+ tmpfiles_process forgejo.conf
+
+ ewarn "${PN} ${MY_PV} will continue to use /var/lib/gitea as the default home,"
+ ewarn "as acct-user/git[gitea] depends on it, and acct-user[forgejo] does not"
+ ewarn "exist yet."
+ ewarn ""
+ ewarn "1.21.x includes changes that may require manual intervention when"
+ ewarn "upgrading from 1.20.x:"
+ ewarn ""
+ ewarn "> Git branches are stored in the databases to reduce the calls to a"
+ ewarn "> git process and improve performances. After upgrading, login as an"
+ ewarn "> admin, go to the /admin page and click run Sync missed branches"
+ ewarn "> from git data to databases. If this is not done there will be"
+ ewarn "> messages such as LoadBranches: branch does not exist in the logs."
+ ewarn ""
+ ewarn "See https://codeberg.org/forgejo/forgejo/src/branch/forgejo/RELEASE-NOTES.md#1-21-1-0"
+ ewarn "for more information"
+}