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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AAFFE138334 for ; Sun, 21 Apr 2019 21:45:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A2AEAE08AC; Sun, 21 Apr 2019 21:45:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 73CE7E08AC for ; Sun, 21 Apr 2019 21:45:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3FB06341C16 for ; Sun, 21 Apr 2019 21:45:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7B719566 for ; Sun, 21 Apr 2019 21:45:26 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1555882387.d8b847da354d330a40a67a2971bbb851744a4ec2.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-apps/gitea/Manifest www-apps/gitea/files/gitea.confd-r1 www-apps/gitea/files/gitea.initd-r2 www-apps/gitea/files/gitea.service-r1 www-apps/gitea/gitea-1.7.6.ebuild X-VCS-Directories: www-apps/gitea/ www-apps/gitea/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: d8b847da354d330a40a67a2971bbb851744a4ec2 X-VCS-Branch: master Date: Sun, 21 Apr 2019 21:45:26 +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: 3824f530-deb3-4d78-b0f9-84383158afc3 X-Archives-Hash: 19d17adcb59da77134c5341cb79856c2 commit: d8b847da354d330a40a67a2971bbb851744a4ec2 Author: Tomas Mozes gmail com> AuthorDate: Sun Mar 17 00:27:22 2019 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Apr 21 21:33:07 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8b847da www-apps/gitea: bump to 1.7.6 Thanks to Felix Neumärker and Pierre-Olivier Mercier for patches. Closes: https://bugs.gentoo.org/680590 Signed-off-by: Tomáš Mózes gmail.com> Closes: https://github.com/gentoo/gentoo/pull/11387 Signed-off-by: Michał Górny gentoo.org> www-apps/gitea/Manifest | 1 + www-apps/gitea/files/gitea.confd-r1 | 14 ++++++ www-apps/gitea/files/gitea.initd-r2 | 22 +++++++++ www-apps/gitea/files/gitea.service-r1 | 28 ++++++++++++ www-apps/gitea/gitea-1.7.6.ebuild | 85 +++++++++++++++++++++++++++++++++++ 5 files changed, 150 insertions(+) diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest index 4ed8383cb25..9cdebf87da2 100644 --- a/www-apps/gitea/Manifest +++ b/www-apps/gitea/Manifest @@ -1 +1,2 @@ DIST gitea-1.7.4.tar.gz 20858340 BLAKE2B 81d896d313abe25bc1a5becd16249c2ce39ab45d9f40ccf3a565b6777847c7256d5b131f597be237df57513a207978e23480ad3c6087bbc588afe8bbcd46d5c9 SHA512 eede6d410529b1facf65061256e48fee7d459aa12d8c55346d3ad78004a45b7bf667536979fe92270a85901102fd9cddb8183490e16f912b742e799ca912e370 +DIST gitea-1.7.6.tar.gz 20868421 BLAKE2B bdd623c09f628a56df9e2c36958d94582707ffeaeb45960fd1ea0d50a8083458683f28ab2c398ac1e939ba6b011ba6a83cc02abd98e9b9ff131bda8fd224c66c SHA512 ad39969b5f1246875c006c72f2ea711772f29bfb9c687510efbd2089c9f88e9d218d14b03111715179b2e0f72f85731f22dd46fc022e224be73b7e73e798236b diff --git a/www-apps/gitea/files/gitea.confd-r1 b/www-apps/gitea/files/gitea.confd-r1 new file mode 100644 index 00000000000..19018c1c645 --- /dev/null +++ b/www-apps/gitea/files/gitea.confd-r1 @@ -0,0 +1,14 @@ +# Gitea configuration +GITEA_CONF="/etc/gitea/app.ini" + +# Gitea user +GITEA_USER="git" + +# Gitea group +GITEA_GROUP="git" + +# Gitea working directory +GITEA_WORK_DIR="/var/lib/gitea" + +# Gitea custom directory +GITEA_CUSTOM="${GITEA_WORK_DIR}/custom" diff --git a/www-apps/gitea/files/gitea.initd-r2 b/www-apps/gitea/files/gitea.initd-r2 new file mode 100644 index 00000000000..24cac0b41f2 --- /dev/null +++ b/www-apps/gitea/files/gitea.initd-r2 @@ -0,0 +1,22 @@ +#!/sbin/openrc-run +# Copyright 2016-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Gitea, a self-hosted Git service" + +: ${GITEA_CONF:=/etc/gitea/app.ini} +: ${GITEA_USER:=git} +: ${GITEA_GROUP:=git} +: ${GITEA_WORK_DIR:=/var/lib/gitea} +: ${GITEA_CUSTOM:=${GITEA_WORK_DIR}/custom} + +command="/usr/bin/gitea web" +command_args="--config ${GITEA_CONF}" +command_background="true" +command_user="${GITEA_USER}:${GITEA_GROUP}" +error_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.err" +output_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log" +pidfile="/run/${RC_SVCNAME}.pid" +required_files="${GITEA_CONF}" +start_stop_daemon_args="-e GITEA_WORK_DIR=${GITEA_WORK_DIR} \ + -e GITEA_CUSTOM=${GITEA_CUSTOM}" diff --git a/www-apps/gitea/files/gitea.service-r1 b/www-apps/gitea/files/gitea.service-r1 new file mode 100644 index 00000000000..73f924337fd --- /dev/null +++ b/www-apps/gitea/files/gitea.service-r1 @@ -0,0 +1,28 @@ +[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.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 web --config /etc/gitea/app.ini + +Restart=always +PrivateTmp=true +Nice=5 + +[Install] +WantedBy=multi-user.target diff --git a/www-apps/gitea/gitea-1.7.6.ebuild b/www-apps/gitea/gitea-1.7.6.ebuild new file mode 100644 index 00000000000..f62591346a4 --- /dev/null +++ b/www-apps/gitea/gitea-1.7.6.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit golang-vcs-snapshot systemd user + +EGO_PN="code.gitea.io/gitea" +KEYWORDS="~amd64 ~arm" + +DESCRIPTION="A painless self-hosted Git service" +HOMEPAGE="https://gitea.io" +SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +IUSE="pam sqlite" + +COMMON_DEPEND="pam? ( sys-libs/pam )" +DEPEND="${COMMON_DEPEND} + dev-go/go-bindata" +RDEPEND="${COMMON_DEPEND} + dev-vcs/git" + +DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md ) +S="${WORKDIR}/${P}/src/${EGO_PN}" + +pkg_setup() { + enewgroup git + enewuser git -1 /bin/bash /var/lib/gitea git +} + +gitea_make() { + local my_tags=( + bindata + $(usev pam) + $(usex sqlite 'sqlite sqlite_unlock_notify' '') + ) + local my_makeopt=( + DRONE_TAG=${PV} + TAGS="${my_tags[@]}" + ) + GOPATH=${WORKDIR}/${P}:$(get_golibdir_gopath) emake "${my_makeopt[@]}" "$1" +} + +src_compile() { + gitea_make generate + gitea_make build +} + +src_test() { + gitea_make test +} + +src_install() { + einstalldocs + dobin gitea + newconfd "${FILESDIR}"/gitea.confd-r1 gitea + newinitd "${FILESDIR}"/gitea.initd-r2 gitea + systemd_newunit "${FILESDIR}"/gitea.service-r1 gitea.service + diropts -m0750 -o git -g git + keepdir /etc/gitea + keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data + keepdir /var/log/gitea +} + +pkg_postinst() { + ewarn "The configuration path has been changed to ${EROOT}/etc/gitea/app.ini." + ewarn "Please adapt the gitea-repositories hooks and ssh authorized_keys." + ewarn "Depending on your configuration you should run something like:" + ewarn "sed -i -e 's#/var/lib/gitea/conf/app.ini#/etc/gitea/app.ini#' \\" + ewarn " /var/lib/gitea/gitea-repositories/*/*/hooks/*/* \\" + ewarn " /var/lib/gitea/.ssh/authorized_keys" + + if [[ ! -e "${EROOT}/etc/gitea/app.ini" ]]; then + elog "No app.ini found, copying initial config over" + cp "${FILESDIR}"/app.ini "${EROOT}"/etc/gitea/ || die + chown git:git "${EROOT}"/etc/gitea/app.ini || die + elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitea)." + else + elog "app.ini found, please check the sample file for possible changes" + ewarn "Please note that environment variables have been changed:" + ewarn "GITEA_WORK_DIR is set to /var/lib/gitea (previous value: unset)" + ewarn "GITEA_CUSTOM is set to '\$GITEA_WORK_DIR/custom' (previous: /var/lib/gitea)" + fi +}