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 BAD08158043 for ; Fri, 23 Feb 2024 03:37:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B2DABE2A7D; Fri, 23 Feb 2024 03:37:02 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8E84DE2A7D for ; Fri, 23 Feb 2024 03:37:02 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 490613431C8 for ; Fri, 23 Feb 2024 03:37:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A7043E5F for ; Fri, 23 Feb 2024 03:36:59 +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: <1708659360.aac4ab4ccd5de0afbf545d5fdf9206cfd3d42309.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.6.0.ebuild X-VCS-Directories: www-apps/forgejo/ X-VCS-Committer: artemis X-VCS-Committer-Name: Artemis Everfree X-VCS-Revision: aac4ab4ccd5de0afbf545d5fdf9206cfd3d42309 X-VCS-Branch: dev Date: Fri, 23 Feb 2024 03:36:59 +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: 67f407dc-e0b5-4826-a569-615a5927488e X-Archives-Hash: 18aad317819caf0bea5e7b223e549e9e commit: aac4ab4ccd5de0afbf545d5fdf9206cfd3d42309 Author: Artemis Everfree artemis sh> AuthorDate: Fri Feb 23 03:35:23 2024 +0000 Commit: Artemis Everfree artemis sh> CommitDate: Fri Feb 23 03:36:00 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=aac4ab4c www-apps/forgejo: add 1.21.6.0 Signed-off-by: Artemis Everfree artemis.sh> www-apps/forgejo/Manifest | 1 + www-apps/forgejo/forgejo-1.21.6.0.ebuild | 136 +++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+) diff --git a/www-apps/forgejo/Manifest b/www-apps/forgejo/Manifest index 2e46d41c91..448273b2cd 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 0000000000..96b0995014 --- /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" +}