From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2E11B1581B7 for ; Sat, 3 Feb 2024 23:29:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 59778E2C3F; Sat, 3 Feb 2024 23:29:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 314ABE2C3E for ; Sat, 3 Feb 2024 23:29:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0ECBD343271 for ; Sat, 3 Feb 2024 23:29:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9ACAF134C for ; Sat, 3 Feb 2024 23:29:33 +0000 (UTC) From: "Artemis Everfree" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Artemis Everfree" Message-ID: <1707002897.8010ec9244b789153722622cf8a13ab1af194697.artemis@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: www-apps/forgejo/ X-VCS-Repository: repo/proj/guru X-VCS-Files: www-apps/forgejo/Manifest www-apps/forgejo/forgejo-1.21.5.0.ebuild www-apps/forgejo/metadata.xml X-VCS-Directories: www-apps/forgejo/ X-VCS-Committer: artemis X-VCS-Committer-Name: Artemis Everfree X-VCS-Revision: 8010ec9244b789153722622cf8a13ab1af194697 X-VCS-Branch: dev Date: Sat, 3 Feb 2024 23:29:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e21cdac0-45db-4211-a12c-754dec97fd08 X-Archives-Hash: fc63022888dea638ad9928168452e7ec commit: 8010ec9244b789153722622cf8a13ab1af194697 Author: Artemis Everfree artemis sh> AuthorDate: Sat Feb 3 23:28:17 2024 +0000 Commit: Artemis Everfree artemis sh> CommitDate: Sat Feb 3 23:28:17 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=8010ec92 www-apps/forgejo: add 1.21.5.0 Signed-off-by: Artemis Everfree artemis.sh> www-apps/forgejo/Manifest | 1 + www-apps/forgejo/forgejo-1.21.5.0.ebuild | 136 +++++++++++++++++++++++++++++++ www-apps/forgejo/metadata.xml | 1 + 3 files changed, 138 insertions(+) diff --git a/www-apps/forgejo/Manifest b/www-apps/forgejo/Manifest index 26ae99e4df..22e15ac435 100644 --- a/www-apps/forgejo/Manifest +++ b/www-apps/forgejo/Manifest @@ -1,3 +1,4 @@ DIST forgejo-1.19.4.0.tar.gz 60635393 BLAKE2B 7fe8e10f7aae8371c4a540290bb24c67a0521080eb58c7749c95d977320781e2e11ba754a42a333c706d243cf0170178dd62da5338540576d214f281b3da6daa SHA512 4870a7804c3cefab4aac38f30ac60874d9a7359b29e8f765ee9a1f41bc543fdd445a21c6e808f864c56ce22f79f6038b15eec4325c556ef6288ad6635977533f 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 diff --git a/www-apps/forgejo/forgejo-1.21.5.0.ebuild b/www-apps/forgejo/forgejo-1.21.5.0.ebuild new file mode 100644 index 0000000000..96b0995014 --- /dev/null +++ b/www-apps/forgejo/forgejo-1.21.5.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" +} diff --git a/www-apps/forgejo/metadata.xml b/www-apps/forgejo/metadata.xml index 6b7bf3b346..11aeec6101 100644 --- a/www-apps/forgejo/metadata.xml +++ b/www-apps/forgejo/metadata.xml @@ -9,6 +9,7 @@ https://codeberg.org/forgejo/forgejo/releases https://codeberg.org/forgejo/forgejo/issues + forgejo/forgejo User and group management via acct-*/git packages