public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrice Clement" <monsieurp@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
Date: Fri, 15 Mar 2019 22:42:33 +0000 (UTC)	[thread overview]
Message-ID: <1552689734.5bd278c49c6680eedced51e9b6d910d7098bf159.monsieurp@gentoo> (raw)

commit:     5bd278c49c6680eedced51e9b6d910d7098bf159
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Mar 15 09:12:53 2019 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Fri Mar 15 22:42:14 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd278c4

www-apps/gitea: bump to 1.7.4.

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11371
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 www-apps/gitea/Manifest             |  1 +
 www-apps/gitea/files/gitea.initd-r1 |  5 +--
 www-apps/gitea/files/gitea.service  |  8 +++--
 www-apps/gitea/gitea-1.7.4.ebuild   | 67 +++++++++++++++++++++++++++++++++++++
 4 files changed, 76 insertions(+), 5 deletions(-)

diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 5f6259a7c33..4065ddacc5d 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1 +1,2 @@
 DIST gitea-1.5.2.tar.gz 18866286 BLAKE2B a9a31fa6a310dcb6debd9399f234262214021d72adda52af959e6d9d692d5902ff6955a9802bf60212cecb2a0146c4905952d44643aa83e49c645d32541907c2 SHA512 ef91c881b3cb81d79d182b78c95624f24d63e21daa2d6e561fca79edba0ad588fae7c55503f900a8f05c566ed3bff92a9c4385fc7e5c701a80749d2a8c58b599
+DIST gitea-1.7.4.tar.gz 20858340 BLAKE2B 81d896d313abe25bc1a5becd16249c2ce39ab45d9f40ccf3a565b6777847c7256d5b131f597be237df57513a207978e23480ad3c6087bbc588afe8bbcd46d5c9 SHA512 eede6d410529b1facf65061256e48fee7d459aa12d8c55346d3ad78004a45b7bf667536979fe92270a85901102fd9cddb8183490e16f912b742e799ca912e370

diff --git a/www-apps/gitea/files/gitea.initd-r1 b/www-apps/gitea/files/gitea.initd-r1
index 837164aa014..6f957d426c0 100644
--- a/www-apps/gitea/files/gitea.initd-r1
+++ b/www-apps/gitea/files/gitea.initd-r1
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 2016-2018 Gentoo Foundation
+# Copyright 2016-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 description="Gitea, a self-hosted Git service"
@@ -11,7 +11,8 @@ command="/usr/bin/gitea web"
 command_args="${command_args:--config /var/lib/gitea/conf/app.ini}"
 command_background="true"
 start_stop_daemon_args="--user ${user} --group ${group} \
-	-e GITEA_WORK_DIR=/var/lib/gitea
+	-e GITEA_WORK_DIR=${GITEA_WORK_DIR:-/var/lib/gitea} \
+	-e GITEA_CUSTOM=${GITEA_CUSTOM:-/var/lib/gitea} \
 	--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
 	--stderr /var/log/${SVCNAME}/${SVCNAME}.log"
 

diff --git a/www-apps/gitea/files/gitea.service b/www-apps/gitea/files/gitea.service
index 3fdbc1fd0c3..733e05ea1ed 100644
--- a/www-apps/gitea/files/gitea.service
+++ b/www-apps/gitea/files/gitea.service
@@ -1,6 +1,6 @@
 [Unit]
 Description=Gitea service
-Documentation=https://gitea.io
+Documentation=https://docs.gitea.io/
 
 AssertPathIsDirectory=/var/lib/gitea
 AssertPathIsReadWrite=/var/lib/gitea
@@ -8,13 +8,15 @@ AssertPathIsReadWrite=/var/lib/gitea
 After=network.target
 Requires=network.target
 After=mysqld.service
-Requires=mysqld.service
+After=postgresql.service
+After=memcached.service
+After=redis.service
 
 [Service]
 User=git
 Group=git
 
-Environment="GITEA_CUSTOM=/var/lib/gitea"
+Environment="GITEA_WORK_DIR=/var/lib/gitea GITEA_CUSTOM=/var/lib/gitea"
 WorkingDirectory=/var/lib/gitea
 ExecStart=/usr/bin/gitea web -c /var/lib/gitea/conf/app.ini
 

diff --git a/www-apps/gitea/gitea-1.7.4.ebuild b/www-apps/gitea/gitea-1.7.4.ebuild
new file mode 100644
index 00000000000..6508562a68b
--- /dev/null
+++ b/www-apps/gitea/gitea-1.7.4.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit golang-build golang-vcs-snapshot systemd user
+
+EGO_PN="code.gitea.io/gitea"
+KEYWORDS="~amd64 ~arm"
+
+DESCRIPTION="A painless self-hosted Git service, written in Go"
+HOMEPAGE="https://github.com/go-gitea/gitea"
+SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+
+DEPEND="
+	dev-go/go-bindata
+	sys-libs/pam
+"
+RDEPEND="
+	dev-vcs/git
+	sys-libs/pam
+"
+
+pkg_setup() {
+	enewgroup git
+	enewuser git -1 /bin/bash /var/lib/gitea git
+}
+
+src_prepare() {
+	default
+	sed -i -e "s/\"main.Version.*$/\"main.Version=${PV}\"/"\
+		-e "s/-ldflags '-s/-ldflags '/" src/${EGO_PN}/Makefile || die
+}
+
+src_compile() {
+	GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} generate
+	TAGS="bindata pam sqlite" LDFLAGS="" CGO_LDFLAGS="" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} build
+}
+
+src_install() {
+	diropts -m0750 -o git -g git
+	keepdir /var/log/gitea /var/lib/gitea /var/lib/gitea/data
+	pushd src/${EGO_PN} >/dev/null || die
+	dobin gitea
+	insinto /var/lib/gitea/conf
+	newins custom/conf/app.ini.sample app.ini.example
+	popd >/dev/null || die
+	newinitd "${FILESDIR}"/gitea.initd-r1 gitea
+	newconfd "${FILESDIR}"/gitea.confd gitea
+	systemd_dounit "${FILESDIR}/gitea.service"
+}
+
+pkg_postinst() {
+	if [[ ! -e "${EROOT}/var/lib/gitea/conf/app.ini" ]]; then
+		elog "No app.ini found, copying initial config over"
+		cp "${FILESDIR}"/app.ini "${EROOT}"/var/lib/gitea/conf/ || die
+		chown git:git /var/lib/gitea/conf/app.ini
+		elog "Please make sure that your 'git' user has the correct homedir (/var/lib/gitea)."
+	else
+		elog "app.ini found, please check example 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
+}


             reply	other threads:[~2019-03-15 22:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 22:42 Patrice Clement [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-16  0:29 [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/ Yixun Lan
2024-06-06 22:08 Yixun Lan
2024-01-13 11:10 Yixun Lan
2023-11-17  1:51 Yixun Lan
2021-06-21 22:36 Sam James
2021-06-21 22:36 Sam James
2020-01-06 10:39 Joonas Niilola
2019-11-07  5:42 Joonas Niilola
2019-06-07 13:26 Michał Górny
2019-04-21 21:45 Michał Górny
2016-12-25 21:06 Manuel Rüger
2016-12-25 20:53 Manuel Rüger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1552689734.5bd278c49c6680eedced51e9b6d910d7098bf159.monsieurp@gentoo \
    --to=monsieurp@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox