* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2016-12-25 20:53 Manuel Rüger
0 siblings, 0 replies; 13+ messages in thread
From: Manuel Rüger @ 2016-12-25 20:53 UTC (permalink / raw
To: gentoo-commits
commit: 50929e7f8b9281b23126cea5a231110c36e267b1
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 25 20:53:19 2016 +0000
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Sun Dec 25 20:53:19 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50929e7f
www-apps/gitea: Move config file to /var/lib/gitea, further misc fixes
Package-Manager: portage-2.3.3
www-apps/gitea/files/gitea.confd | 2 +-
www-apps/gitea/files/gitea.initd | 2 +-
www-apps/gitea/gitea-1.0.0-r1.ebuild | 62 ++++++++++++++++++++++++++++++++++++
3 files changed, 64 insertions(+), 2 deletions(-)
diff --git a/www-apps/gitea/files/gitea.confd b/www-apps/gitea/files/gitea.confd
index cb99b52..8b1710b 100644
--- a/www-apps/gitea/files/gitea.confd
+++ b/www-apps/gitea/files/gitea.confd
@@ -1,2 +1,2 @@
# arguments for gitea
-command_args="--config /etc/gitea/app.ini"
+command_args="--config /var/lib/gitea/conf/app.ini"
diff --git a/www-apps/gitea/files/gitea.initd b/www-apps/gitea/files/gitea.initd
index 05565f6..a9aaac7 100644
--- a/www-apps/gitea/files/gitea.initd
+++ b/www-apps/gitea/files/gitea.initd
@@ -9,7 +9,7 @@ user=${user:-${SVCNAME}}
group=${group:-${SVCNAME}}
command="/usr/bin/gitea web"
-command_args="${command_args:--config /etc/gitea/app.ini}"
+command_args="${command_args:--config /var/lib/gitea/conf/app.ini}"
command_background="true"
start_stop_daemon_args="--user ${user} --group ${group} \
--stdout /var/log/${SVCNAME}/${SVCNAME}.log \
diff --git a/www-apps/gitea/gitea-1.0.0-r1.ebuild b/www-apps/gitea/gitea-1.0.0-r1.ebuild
new file mode 100644
index 00000000..8283d50
--- /dev/null
+++ b/www-apps/gitea/gitea-1.0.0-r1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="code.gitea.io/gitea/..."
+EGIT_COMMIT="6aacf4d2f09631359b99df562b4bf31dcef44ea3"
+ARCHIVE_URI="https://github.com/go-gitea/gitea/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64"
+
+DESCRIPTION="A painless self-hosted Git service, written in Go, forked from gogs"
+HOMEPAGE="https://github.com/go-gitea/gitea"
+SRC_URI="${ARCHIVE_URI}"
+
+LICENSE="MIT"
+SLOT="0/${PVR}"
+IUSE=""
+
+DEPEND="dev-go/go-bindata"
+RDEPEND="dev-vcs/git"
+
+pkg_setup() {
+ enewgroup gitea
+ enewuser gitea -1 /bin/bash /var/lib/gitea gitea
+}
+
+src_prepare() {
+ default
+ local GITEA_PREFIX=${EPREFIX}/var/lib/gitea
+ sed -i -e "s/git rev-parse --short HEAD/echo ${EGIT_COMMIT:0:7}/"\
+ -e "s/^LDFLAGS += -X \"main.Version.*$/LDFLAGS += -X \"main.Version=${PV}\"/"\
+ -e "s/-ldflags '-s/-ldflags '/" src/${EGO_PN%/*}/Makefile || die
+ sed -i -e "s#RUN_USER = git#RUN_USER = gitea#"\
+ -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${GITEA_PREFIX}/data#"\
+ -e "s#^PATH = data/gitea.db#PATH = ${GITEA_PREFIX}/data/gitea.db#"\
+ -e "s#^PROVIDER_CONFIG = data/sessions#PROVIDER_CONFIG = ${GITEA_PREFIX}/data/sessions#"\
+ -e "s#^AVATAR_UPLOAD_PATH = data/avatars#AVATAR_UPLOAD_PATH = ${GITEA_PREFIX}/data/avatars#"\
+ -e "s#^TEMP_PATH = data/tmp/uploads#TEMP_PATH = ${GITEA_PREFIX}/data/tmp/uploads#"\
+ -e "s#^PATH = data/attachments#PATH = ${GITEA_PREFIX}/data/attachments#"\
+ -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#" src/${EGO_PN%/*}/conf/app.ini || die
+}
+
+src_compile() {
+ GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN%/*} generate
+ TAGS="bindata pam sqlite" LDFLAGS="" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN%/*} build
+}
+
+src_install() {
+ pushd src/${EGO_PN%/*} || die
+ dobin gitea
+ insinto /var/lib/gitea/conf
+ doins conf/app.ini
+ popd || die
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/gitea.logrotated gitea
+ newinitd "${FILESDIR}"/gitea.initd gitea
+ newconfd "${FILESDIR}"/gitea.confd gitea
+ keepdir /var/log/gitea /var/lib/gitea/data
+ fowners -R gitea:gitea /var/log/gitea /var/lib/gitea/
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2016-12-25 21:06 Manuel Rüger
0 siblings, 0 replies; 13+ messages in thread
From: Manuel Rüger @ 2016-12-25 21:06 UTC (permalink / raw
To: gentoo-commits
commit: 0fefadf11c8c0028f95fed9c2fa9dfdbf0fd8f24
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 25 21:05:50 2016 +0000
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Sun Dec 25 21:05:50 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fefadf1
www-apps/gitea: Use git user by default
Package-Manager: portage-2.3.3
www-apps/gitea/files/gitea.logrotated | 2 +-
www-apps/gitea/{gitea-1.0.0-r1.ebuild => gitea-1.0.0-r2.ebuild} | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/www-apps/gitea/files/gitea.logrotated b/www-apps/gitea/files/gitea.logrotated
index 4ddfdf0..ec6ddfe 100644
--- a/www-apps/gitea/files/gitea.logrotated
+++ b/www-apps/gitea/files/gitea.logrotated
@@ -1,5 +1,5 @@
/var/log/gitea/* {
- su gitea gitea
+ su git git
missingok
size 5M
rotate 3
diff --git a/www-apps/gitea/gitea-1.0.0-r1.ebuild b/www-apps/gitea/gitea-1.0.0-r2.ebuild
similarity index 89%
rename from www-apps/gitea/gitea-1.0.0-r1.ebuild
rename to www-apps/gitea/gitea-1.0.0-r2.ebuild
index 8283d50..ca6a3eb 100644
--- a/www-apps/gitea/gitea-1.0.0-r1.ebuild
+++ b/www-apps/gitea/gitea-1.0.0-r2.ebuild
@@ -22,8 +22,8 @@ DEPEND="dev-go/go-bindata"
RDEPEND="dev-vcs/git"
pkg_setup() {
- enewgroup gitea
- enewuser gitea -1 /bin/bash /var/lib/gitea gitea
+ enewgroup git
+ enewuser git -1 /bin/bash /var/lib/gitea git
}
src_prepare() {
@@ -32,8 +32,7 @@ src_prepare() {
sed -i -e "s/git rev-parse --short HEAD/echo ${EGIT_COMMIT:0:7}/"\
-e "s/^LDFLAGS += -X \"main.Version.*$/LDFLAGS += -X \"main.Version=${PV}\"/"\
-e "s/-ldflags '-s/-ldflags '/" src/${EGO_PN%/*}/Makefile || die
- sed -i -e "s#RUN_USER = git#RUN_USER = gitea#"\
- -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${GITEA_PREFIX}/data#"\
+ sed -i -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${GITEA_PREFIX}/data#"\
-e "s#^PATH = data/gitea.db#PATH = ${GITEA_PREFIX}/data/gitea.db#"\
-e "s#^PROVIDER_CONFIG = data/sessions#PROVIDER_CONFIG = ${GITEA_PREFIX}/data/sessions#"\
-e "s#^AVATAR_UPLOAD_PATH = data/avatars#AVATAR_UPLOAD_PATH = ${GITEA_PREFIX}/data/avatars#"\
@@ -58,5 +57,5 @@ src_install() {
newinitd "${FILESDIR}"/gitea.initd gitea
newconfd "${FILESDIR}"/gitea.confd gitea
keepdir /var/log/gitea /var/lib/gitea/data
- fowners -R gitea:gitea /var/log/gitea /var/lib/gitea/
+ fowners -R git:git /var/log/gitea /var/lib/gitea/
}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2019-03-15 22:42 Patrice Clement
0 siblings, 0 replies; 13+ messages in thread
From: Patrice Clement @ 2019-03-15 22:42 UTC (permalink / raw
To: gentoo-commits
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
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2019-04-21 21:45 Michał Górny
0 siblings, 0 replies; 13+ messages in thread
From: Michał Górny @ 2019-04-21 21:45 UTC (permalink / raw
To: gentoo-commits
commit: d8b847da354d330a40a67a2971bbb851744a4ec2
Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sun Mar 17 00:27:22 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> 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 <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11387
Signed-off-by: Michał Górny <mgorny <AT> 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
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2019-06-07 13:26 Michał Górny
0 siblings, 0 replies; 13+ messages in thread
From: Michał Górny @ 2019-06-07 13:26 UTC (permalink / raw
To: gentoo-commits
commit: 05b7acaa3d40b21b40f56cc8541f6c74d9eaa02e
Author: Felix Neumärker <xdch47 <AT> posteo <DOT> de>
AuthorDate: Wed Apr 24 06:25:13 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 7 13:17:46 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05b7acaa
www-apps/gitea: bump to 1.8.2 + fix systemd service
Closes: https://bugs.gentoo.org/671596
Closes: https://bugs.gentoo.org/684196
Closes: https://bugs.gentoo.org/685616
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Felix Neumärker <xdch47 <AT> posteo.de>
Closes: https://github.com/gentoo/gentoo/pull/11977
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
www-apps/gitea/Manifest | 1 +
www-apps/gitea/files/gitea.initd-r3 | 22 +++++++
www-apps/gitea/files/gitea.service-r2 | 34 +++++++++++
www-apps/gitea/gitea-1.8.2.ebuild | 104 ++++++++++++++++++++++++++++++++++
4 files changed, 161 insertions(+)
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 4bc7d85e617..7b0f2c8349b 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1 +1,2 @@
DIST gitea-1.8.0.tar.gz 24268907 BLAKE2B b46a17733fc7bd0f228620bdfadf0d596ea56fca6e685afab7734e794c1f87c5e004529ca3d69e907d516bcb83563565b1d8c32501f1c2c0f9295ca028d96ad0 SHA512 eebbe2f77ed2e4c3562f48a6fa647e6f2a0492c5b6ea4f13542a5ef82e94a357a8d53897aa013107b5f735d2aff9d719893b5724de44831c43998c2e9c6e78d7
+DIST gitea-1.8.2.tar.gz 24321492 BLAKE2B 48a718edd1d607e4f8ee2a301bdd907f2a233be515fa327eac9cfb50cdbc024e5f90e6e86e95056c256cb35497c5a3b2ab5fa4a068a22b28c1a3d2b94780da7a SHA512 23ef63c1cea276800a19fe04b87b4baa421e1202260b4ec55614a77ee54c0bc9e5db6dad7f98791c4d902b2d4cb15f4facc4d201631cf2ef7cefd0ff996753be
diff --git a/www-apps/gitea/files/gitea.initd-r3 b/www-apps/gitea/files/gitea.initd-r3
new file mode 100644
index 00000000000..680ae834e23
--- /dev/null
+++ b/www-apps/gitea/files/gitea.initd-r3
@@ -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"
+pidfile="/run/${RC_SVCNAME}.pid"
+required_files="${GITEA_CONF}"
+start_stop_daemon_args="-d ${GITEA_WORK_DIR}"
+start_stop_daemon_args="${start_stop_daemon_args} -e GITEA_WORK_DIR=${GITEA_WORK_DIR}"
+start_stop_daemon_args="${start_stop_daemon_args} -e GITEA_CUSTOM=${GITEA_CUSTOM}"
diff --git a/www-apps/gitea/files/gitea.service-r2 b/www-apps/gitea/files/gitea.service-r2
new file mode 100644
index 00000000000..1931b46c73c
--- /dev/null
+++ b/www-apps/gitea/files/gitea.service-r2
@@ -0,0 +1,34 @@
+[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-9.3.service
+After=postgresql-9.4.service
+After=postgresql-9.5.service
+After=postgresql-9.6.service
+After=postgresql-10.service
+After=postgresql-11.service
+After=postgresql-12.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.8.2.ebuild b/www-apps/gitea/gitea-1.8.2.ebuild
new file mode 100644
index 00000000000..bdefa9b6352
--- /dev/null
+++ b/www-apps/gitea/gitea-1.8.2.ebuild
@@ -0,0 +1,104 @@
+# 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"
+
+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"
+KEYWORDS="~amd64 ~arm ~arm64"
+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[@]}" "$@"
+}
+
+src_prepare() {
+ default
+ sed -i \
+ -e "s#^RUN_MODE = dev#RUN_MODE = prod#" \
+ -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#" \
+ -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#" \
+ -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#" \
+ -e "s#^APP_ID =#;APP_ID =#" \
+ -e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#" \
+ custom/conf/app.ini.sample || die
+ if use sqlite ; then
+ sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die
+ fi
+
+ gitea_make generate
+}
+
+src_compile() {
+ gitea_make build
+}
+
+src_test() {
+ gitea_make test
+}
+
+src_install() {
+ dobin gitea
+
+ einstalldocs
+
+ newconfd "${FILESDIR}"/gitea.confd-r1 gitea
+ newinitd "${FILESDIR}"/gitea.initd-r3 gitea
+ systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
+
+ insinto /etc/gitea
+ newins custom/conf/app.ini.sample app.ini
+ fowners root:git /etc/gitea/{,app.ini}
+ fperms g+w,o-rwx /etc/gitea/{,app.ini}
+
+ diropts -m0750 -o git -g git
+ keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
+ keepdir /var/log/gitea
+}
+
+pkg_postinst() {
+ if [[ -e "${EROOT}/var/lib/gitea/conf/app.ini" ]]; then
+ ewarn "The configuration path has been changed to ${EROOT}/etc/gitea/app.ini."
+ ewarn "Please move your configuration from ${EROOT}/var/lib/gitea/conf/app.ini"
+ ewarn "and adapt the gitea-repositories hooks and ssh authorized_keys."
+ ewarn "Depending on your configuration you should run something like:"
+ ewarn "sed -i -e 's#${EROOT}/var/lib/gitea/conf/app.ini#${EROOT}/etc/gitea/app.ini#' \\"
+ ewarn " /var/lib/gitea/gitea-repositories/*/*/hooks/*/* \\"
+ ewarn " /var/lib/gitea/.ssh/authorized_keys"
+ fi
+}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2019-11-07 5:42 Joonas Niilola
0 siblings, 0 replies; 13+ messages in thread
From: Joonas Niilola @ 2019-11-07 5:42 UTC (permalink / raw
To: gentoo-commits
commit: 0632e600cea736adec48417e0885d3860dcd1270
Author: Felix Neumärker <xdch47 <AT> posteo <DOT> de>
AuthorDate: Fri Aug 2 10:28:30 2019 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Nov 7 05:42:29 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0632e600
www-apps/gitea: bump to 1.9.5
Closes: https://bugs.gentoo.org/687148
Closes: https://bugs.gentoo.org/690838
Closes: https://bugs.gentoo.org/693536
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Felix Neumärker <xdch47 <AT> posteo.de>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
www-apps/gitea/Manifest | 1 +
www-apps/gitea/files/gitea-logflags.patch | 13 ++++
www-apps/gitea/files/gitea-mod-vendor.patch | 46 ++++++++++++
www-apps/gitea/gitea-1.9.5.ebuild | 111 ++++++++++++++++++++++++++++
www-apps/gitea/metadata.xml | 7 +-
5 files changed, 174 insertions(+), 4 deletions(-)
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 131fa9008c2..9ee165318d1 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1,3 +1,4 @@
DIST gitea-1.8.0.tar.gz 24268907 BLAKE2B b46a17733fc7bd0f228620bdfadf0d596ea56fca6e685afab7734e794c1f87c5e004529ca3d69e907d516bcb83563565b1d8c32501f1c2c0f9295ca028d96ad0 SHA512 eebbe2f77ed2e4c3562f48a6fa647e6f2a0492c5b6ea4f13542a5ef82e94a357a8d53897aa013107b5f735d2aff9d719893b5724de44831c43998c2e9c6e78d7
DIST gitea-1.8.2.tar.gz 24321492 BLAKE2B 48a718edd1d607e4f8ee2a301bdd907f2a233be515fa327eac9cfb50cdbc024e5f90e6e86e95056c256cb35497c5a3b2ab5fa4a068a22b28c1a3d2b94780da7a SHA512 23ef63c1cea276800a19fe04b87b4baa421e1202260b4ec55614a77ee54c0bc9e5db6dad7f98791c4d902b2d4cb15f4facc4d201631cf2ef7cefd0ff996753be
DIST gitea-1.8.3.tar.gz 24320679 BLAKE2B 9ef901ef7e1cb6ffa9a2aa082798b7a18ac2a6fdb4379082df3f942d767a27fd3915c7a4d2cb1af6f502a8cde3c1c98557c42d4c0ef60be7bdad78d8931035e0 SHA512 f6019fbfc056e4c7176222ccaca1cf638bd1f52323de54fcddc618129aeb778674f6e305de60e7d17b69505ad65439445ee6b5e368afdf0a6fbace7407acb495
+DIST gitea-1.9.5.tar.gz 25355286 BLAKE2B 8b733651de64fcafa7b41a6fc812fcad8ac7311a7e7acc679ec7dab759175ec13a096902aece209a3fef31eefd3a99493e13f7c9792e1e41b5a1c3376680d3ca SHA512 f7a04d3bb37a33da15290355f3f02ff4c1b737e8458cf65f731c870ac9e452243b1fdacc5f74accf963fb00cdd200dd31191058eb1d6dda8b1033846a961c7d3
diff --git a/www-apps/gitea/files/gitea-logflags.patch b/www-apps/gitea/files/gitea-logflags.patch
new file mode 100644
index 00000000000..331bd3d046b
--- /dev/null
+++ b/www-apps/gitea/files/gitea-logflags.patch
@@ -0,0 +1,13 @@
+diff --git a/modules/log/flags.go b/modules/log/flags.go
+index 992fc62..5578a1b 100644
+--- a/modules/log/flags.go
++++ b/modules/log/flags.go
+@@ -31,7 +31,7 @@ const (
+ Lmedfile = Lshortfile | Llongfile
+
+ // LstdFlags is the initial value for the standard logger
+- LstdFlags = Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial
++ LstdFlags = Ldate | Ltime | Llevelinitial
+ )
+
+ var flagFromString = map[string]int{
diff --git a/www-apps/gitea/files/gitea-mod-vendor.patch b/www-apps/gitea/files/gitea-mod-vendor.patch
new file mode 100644
index 00000000000..c501e20adb9
--- /dev/null
+++ b/www-apps/gitea/files/gitea-mod-vendor.patch
@@ -0,0 +1,46 @@
+diff --git a/Makefile b/Makefile
+index 796a0e3..2c6a6ef 100644
+--- a/Makefile
++++ b/Makefile
+@@ -97,7 +97,7 @@ vet:
+
+ .PHONY: generate
+ generate:
+- GO111MODULE=on $(GO) generate $(PACKAGES)
++ GO111MODULE=on $(GO) generate -mod=vendor $(PACKAGES)
+
+ .PHONY: generate-swagger
+ generate-swagger:
+diff --git a/modules/options/options.go b/modules/options/options.go
+index 723dd54..62e8c04 100644
+--- a/modules/options/options.go
++++ b/modules/options/options.go
+@@ -5,7 +5,6 @@
+ package options
+
+ //go:generate go run -mod=vendor main.go
+-//go:generate go fmt bindata.go
+
+ type directorySet map[string][]string
+
+diff --git a/modules/public/public.go b/modules/public/public.go
+index 8362b42..df70275 100644
+--- a/modules/public/public.go
++++ b/modules/public/public.go
+@@ -18,7 +18,6 @@ import (
+ )
+
+ //go:generate go run -mod=vendor main.go
+-//go:generate go fmt bindata.go
+
+ // Options represents the available options to configure the macaron handler.
+ type Options struct {
+diff --git a/modules/templates/templates.go b/modules/templates/templates.go
+index e7fe3b2..af6bf01 100644
+--- a/modules/templates/templates.go
++++ b/modules/templates/templates.go
+@@ -5,4 +5,3 @@
+ package templates
+
+ //go:generate go run -mod=vendor main.go
+-//go:generate go fmt bindata.go
diff --git a/www-apps/gitea/gitea-1.9.5.ebuild b/www-apps/gitea/gitea-1.9.5.ebuild
new file mode 100644
index 00000000000..5b022012714
--- /dev/null
+++ b/www-apps/gitea/gitea-1.9.5.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit golang-vcs-snapshot tmpfiles systemd
+
+EGO_PN="code.gitea.io/gitea"
+
+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="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64"
+IUSE="+acct pam sqlite"
+
+BDEPEND="<dev-lang/go-1.13"
+COMMON_DEPEND="
+ acct? (
+ acct-group/git
+ acct-user/git[gitea]
+ )
+ pam? ( sys-libs/pam )"
+DEPEND="${COMMON_DEPEND}"
+RDEPEND="${COMMON_DEPEND}
+ dev-vcs/git"
+
+DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md )
+S="${WORKDIR}/${P}/src/${EGO_PN}"
+
+PATCHES=( "${FILESDIR}/gitea-mod-vendor.patch" "${FILESDIR}/gitea-logflags.patch" )
+
+gitea_make() {
+ local my_tags=(
+ bindata
+ $(usev pam)
+ $(usex sqlite 'sqlite sqlite_unlock_notify' '')
+ )
+ local my_makeopt=(
+ DRONE_TAG=${PV}
+ TAGS="${my_tags[@]}"
+ LDFLAGS="-extldflags \"${LDFLAGS}\""
+ )
+ GOPATH=${WORKDIR}/${P}:$(get_golibdir_gopath) emake "${my_makeopt[@]}" "$@"
+}
+
+src_prepare() {
+ default
+
+ local sedcmds=(
+ -e "s#^RUN_MODE = dev#RUN_MODE = prod#"
+ -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
+ -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
+ -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#"
+ -e "s#^APP_ID =#;APP_ID =#"
+ -e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#"
+ )
+
+ sed -i "${sedcmds[@]}" custom/conf/app.ini.sample || die
+ if use sqlite ; then
+ sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die
+ fi
+
+ gitea_make generate
+}
+
+src_compile() {
+ gitea_make build
+}
+
+src_install() {
+ dobin gitea
+
+ einstalldocs
+
+ newconfd "${FILESDIR}/gitea.confd-r1" gitea
+ newinitd "${FILESDIR}/gitea.initd-r3" gitea
+ newtmpfiles - gitea.conf <<-EOF
+ d /run/gitea 0755 git git
+ EOF
+ systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
+
+ insinto /etc/gitea
+ newins custom/conf/app.ini.sample app.ini
+ if use acct ; then
+ fowners root:git /etc/gitea/{,app.ini}
+ fperms g+w,o-rwx /etc/gitea/{,app.ini}
+
+ diropts -m0750 -o git -g git
+ keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
+ keepdir /var/log/gitea
+ fi
+}
+
+pkg_postinst() {
+ if [[ -e "${EROOT}/var/lib/gitea/conf/app.ini" ]]; then
+ ewarn "The configuration path has been changed to ${EROOT}/etc/gitea/app.ini."
+ ewarn "Please move your configuration from ${EROOT}/var/lib/gitea/conf/app.ini"
+ ewarn "and adapt the gitea-repositories hooks and ssh authorized_keys."
+ ewarn "Depending on your configuration you should run something like:"
+ ewarn "sed -i -e 's#${EROOT}/var/lib/gitea/conf/app.ini#${EROOT}/etc/gitea/app.ini#' \\"
+ ewarn " /var/lib/gitea/gitea-repositories/*/*/hooks/*/* \\"
+ ewarn " /var/lib/gitea/.ssh/authorized_keys"
+ fi
+}
diff --git a/www-apps/gitea/metadata.xml b/www-apps/gitea/metadata.xml
index df58a68c26f..f492ced05e4 100644
--- a/www-apps/gitea/metadata.xml
+++ b/www-apps/gitea/metadata.xml
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>xdch47@posteo.de</email>
- <name>Felix Neumärker</name>
- </maintainer>
<maintainer type="person">
<email>nemunaire@nemunai.re</email>
<name>Pierre-Olivier Mercier</name>
@@ -16,4 +12,7 @@
<upstream>
<remote-id type="github">go-gitea/gitea</remote-id>
</upstream>
+ <use>
+ <flag name="acct">User and group management via acct-*/git packages</flag>
+ </use>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2020-01-06 10:39 Joonas Niilola
0 siblings, 0 replies; 13+ messages in thread
From: Joonas Niilola @ 2020-01-06 10:39 UTC (permalink / raw
To: gentoo-commits
commit: 30cdc92952e6ccfc173cef4ac5d6308c9eca138c
Author: Felix Neumärker <xdch47 <AT> posteo <DOT> de>
AuthorDate: Thu Jan 2 14:06:32 2020 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Jan 6 10:39:23 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30cdc929
www-apps/gitea: remove old
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Felix Neumärker <xdch47 <AT> posteo.de>
Closes: https://github.com/gentoo/gentoo/pull/14217
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
www-apps/gitea/Manifest | 2 -
www-apps/gitea/files/app.ini | 4 --
www-apps/gitea/gitea-1.10.1.ebuild | 134 -------------------------------------
www-apps/gitea/gitea-1.9.5.ebuild | 111 ------------------------------
4 files changed, 251 deletions(-)
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 863830c3343..069baafbcea 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1,3 +1 @@
-DIST gitea-1.10.1.tar.gz 30146802 BLAKE2B d566e58bc8031c6ff2741861c93deb1cc0bbe2236cfa8d1f054e1453d39b294ae55bd3bae46373efa39cd0b5bc9dfc248ecc0c64642eb4df68fb01042ef1c692 SHA512 d7baea6ac9aca3a3226d36325000c71c886d560eeecb2fdbed924b4924db34882cdd82d07120e3c7175a6d87140a1f63cc575c3be44513e08f8e557856b39acd
DIST gitea-1.10.2.tar.gz 30141486 BLAKE2B b6797a6bff7ec8a174f49bf9606cbab65ae5d3fe96ad6be381ea708cd73b6664588b5d80b2f6114ae09a9a202a606b4b4be6b3f224fdf2ea31c42e44b9f29813 SHA512 b378d02f27bb03ffd1a8ace2da8d827e07e023a02de4b1b4b354659316539ea38bf2735aa01fb1f997b05f7bb557394d0b6d15a1974747d86826ec1af02efb27
-DIST gitea-1.9.5.tar.gz 25355286 BLAKE2B 8b733651de64fcafa7b41a6fc812fcad8ac7311a7e7acc679ec7dab759175ec13a096902aece209a3fef31eefd3a99493e13f7c9792e1e41b5a1c3376680d3ca SHA512 f7a04d3bb37a33da15290355f3f02ff4c1b737e8458cf65f731c870ac9e452243b1fdacc5f74accf963fb00cdd200dd31191058eb1d6dda8b1033846a961c7d3
diff --git a/www-apps/gitea/files/app.ini b/www-apps/gitea/files/app.ini
deleted file mode 100644
index 5dd998f60ee..00000000000
--- a/www-apps/gitea/files/app.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[log]
-MODE = file
-LEVEL = Info
-ROOT_PATH = /var/log/gitea
diff --git a/www-apps/gitea/gitea-1.10.1.ebuild b/www-apps/gitea/gitea-1.10.1.ebuild
deleted file mode 100644
index ebc72d5057b..00000000000
--- a/www-apps/gitea/gitea-1.10.1.ebuild
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} != 9999* ]] ; then
- SCM="golang-vcs-snapshot"
-else
- SCM="git-r3"
-fi
-
-inherit golang-base tmpfiles systemd ${SCM}
-unset SCM
-
-EGO_PN="code.gitea.io/gitea"
-
-DESCRIPTION="A painless self-hosted Git service"
-HOMEPAGE="https://gitea.io"
-
-if [[ ${PV} != 9999* ]] ; then
- SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64"
-else
- EGIT_REPO_URI="https://github.com/go-gitea/gitea"
- EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}"
- has test ${FEATURES} && EGIT_MIN_CLONE_TYPE="mirror"
-fi
-
-LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
-SLOT="0"
-IUSE="+acct pam sqlite"
-
-BDEPEND="dev-lang/go"
-DEPEND="pam? ( sys-libs/pam )"
-RDEPEND="${DEPEND}
- acct? (
- acct-group/git
- acct-user/git[gitea]
- )
- dev-vcs/git"
-
-DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md )
-S="${WORKDIR}/${P}/src/${EGO_PN}"
-
-PATCHES=( "${FILESDIR}/gitea-logflags.patch" )
-
-gitea_make() {
- local gitea_tags=(
- bindata
- $(usev pam)
- $(usex sqlite 'sqlite sqlite_unlock_notify' '')
- )
- local gitea_settings=(
- "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/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=(
- TAGS="${gitea_tags[@]}"
- LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[@]}"
- GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)"
- )
- [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${PV}")
-
- env "${makeenv[@]}" emake "$@"
-}
-
-src_prepare() {
- default
-
- local sedcmds=(
- -e "s#^RUN_MODE = dev#RUN_MODE = prod#"
- -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
- -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
- -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#"
- -e "s#^APP_ID =#;APP_ID =#"
- -e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#"
- )
-
- sed -i "${sedcmds[@]}" custom/conf/app.ini.sample || die
- if use sqlite ; then
- sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die
- fi
-
- gitea_make generate
-}
-
-src_compile() {
- gitea_make build
-}
-
-src_test() {
- if has network-sandbox ${FEATURES}; then
- einfo "Remove tests which are known to fail with network-sandbox enabled."
- rm ./modules/migrations/github_test.go || die
- fi
-
- if [[ ${PV} != 9999* ]] ; then
- einfo "Remove tests which depend on gitea git-repo."
- rm ./modules/git/blob_test.go || die
- rm ./modules/git/repo_test.go || die
- fi
-
- default
-}
-
-src_install() {
- dobin gitea
-
- einstalldocs
-
- newconfd "${FILESDIR}/gitea.confd-r1" gitea
- newinitd "${FILESDIR}/gitea.initd-r3" gitea
- newtmpfiles - gitea.conf <<-EOF
- d /run/gitea 0755 git git
- EOF
- systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
-
- insinto /etc/gitea
- newins custom/conf/app.ini.sample app.ini
- if use acct ; then
- fowners root:git /etc/gitea/{,app.ini}
- fperms g+w,o-rwx /etc/gitea/{,app.ini}
-
- diropts -m0750 -o git -g git
- keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
- keepdir /var/log/gitea
- fi
-}
diff --git a/www-apps/gitea/gitea-1.9.5.ebuild b/www-apps/gitea/gitea-1.9.5.ebuild
deleted file mode 100644
index 5b022012714..00000000000
--- a/www-apps/gitea/gitea-1.9.5.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit golang-vcs-snapshot tmpfiles systemd
-
-EGO_PN="code.gitea.io/gitea"
-
-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="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64"
-IUSE="+acct pam sqlite"
-
-BDEPEND="<dev-lang/go-1.13"
-COMMON_DEPEND="
- acct? (
- acct-group/git
- acct-user/git[gitea]
- )
- pam? ( sys-libs/pam )"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}
- dev-vcs/git"
-
-DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md )
-S="${WORKDIR}/${P}/src/${EGO_PN}"
-
-PATCHES=( "${FILESDIR}/gitea-mod-vendor.patch" "${FILESDIR}/gitea-logflags.patch" )
-
-gitea_make() {
- local my_tags=(
- bindata
- $(usev pam)
- $(usex sqlite 'sqlite sqlite_unlock_notify' '')
- )
- local my_makeopt=(
- DRONE_TAG=${PV}
- TAGS="${my_tags[@]}"
- LDFLAGS="-extldflags \"${LDFLAGS}\""
- )
- GOPATH=${WORKDIR}/${P}:$(get_golibdir_gopath) emake "${my_makeopt[@]}" "$@"
-}
-
-src_prepare() {
- default
-
- local sedcmds=(
- -e "s#^RUN_MODE = dev#RUN_MODE = prod#"
- -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
- -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
- -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#"
- -e "s#^APP_ID =#;APP_ID =#"
- -e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#"
- )
-
- sed -i "${sedcmds[@]}" custom/conf/app.ini.sample || die
- if use sqlite ; then
- sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die
- fi
-
- gitea_make generate
-}
-
-src_compile() {
- gitea_make build
-}
-
-src_install() {
- dobin gitea
-
- einstalldocs
-
- newconfd "${FILESDIR}/gitea.confd-r1" gitea
- newinitd "${FILESDIR}/gitea.initd-r3" gitea
- newtmpfiles - gitea.conf <<-EOF
- d /run/gitea 0755 git git
- EOF
- systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
-
- insinto /etc/gitea
- newins custom/conf/app.ini.sample app.ini
- if use acct ; then
- fowners root:git /etc/gitea/{,app.ini}
- fperms g+w,o-rwx /etc/gitea/{,app.ini}
-
- diropts -m0750 -o git -g git
- keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
- keepdir /var/log/gitea
- fi
-}
-
-pkg_postinst() {
- if [[ -e "${EROOT}/var/lib/gitea/conf/app.ini" ]]; then
- ewarn "The configuration path has been changed to ${EROOT}/etc/gitea/app.ini."
- ewarn "Please move your configuration from ${EROOT}/var/lib/gitea/conf/app.ini"
- ewarn "and adapt the gitea-repositories hooks and ssh authorized_keys."
- ewarn "Depending on your configuration you should run something like:"
- ewarn "sed -i -e 's#${EROOT}/var/lib/gitea/conf/app.ini#${EROOT}/etc/gitea/app.ini#' \\"
- ewarn " /var/lib/gitea/gitea-repositories/*/*/hooks/*/* \\"
- ewarn " /var/lib/gitea/.ssh/authorized_keys"
- fi
-}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2021-06-21 22:36 Sam James
0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2021-06-21 22:36 UTC (permalink / raw
To: gentoo-commits
commit: 414ae1cb1a4f9159bc0af30d9e106655f900c8ae
Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re>
AuthorDate: Thu Jun 3 06:55:35 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 21 22:30:01 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=414ae1cb
www-apps/gitea: update service file for newer postgresql
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Pierre-Olivier Mercier <nemunaire <AT> nemunai.re>
Signed-off-by: Sam James <sam <AT> gentoo.org>
www-apps/gitea/files/gitea.service-r3 | 34 ++++++++++++++++++++++++++++++++++
www-apps/gitea/gitea-9999.ebuild | 4 ++--
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/www-apps/gitea/files/gitea.service-r3 b/www-apps/gitea/files/gitea.service-r3
new file mode 100644
index 00000000000..0867ba63782
--- /dev/null
+++ b/www-apps/gitea/files/gitea.service-r3
@@ -0,0 +1,34 @@
+[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-9.5.service
+After=postgresql-9.6.service
+After=postgresql-10.service
+After=postgresql-11.service
+After=postgresql-12.service
+After=postgresql-13.service
+After=postgresql-14.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-9999.ebuild b/www-apps/gitea/gitea-9999.ebuild
index b975338d0ff..6a4eaea9959 100644
--- a/www-apps/gitea/gitea-9999.ebuild
+++ b/www-apps/gitea/gitea-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -101,7 +101,7 @@ src_install() {
newtmpfiles - gitea.conf <<-EOF
d /run/gitea 0755 git git
EOF
- systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
+ systemd_newunit "${FILESDIR}"/gitea.service-r3 gitea.service
insinto /etc/gitea
newins custom/conf/app.example.ini app.ini
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2021-06-21 22:36 Sam James
0 siblings, 0 replies; 13+ messages in thread
From: Sam James @ 2021-06-21 22:36 UTC (permalink / raw
To: gentoo-commits
commit: 0226cb38b5d333022568ee6db0ece783bce678f9
Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re>
AuthorDate: Thu Jun 3 07:11:55 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 21 22:30:02 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0226cb38
www-apps/gitea: drop old
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Pierre-Olivier Mercier <nemunaire <AT> nemunai.re>
Closes: https://github.com/gentoo/gentoo/pull/21099
Signed-off-by: Sam James <sam <AT> gentoo.org>
www-apps/gitea/Manifest | 1 -
www-apps/gitea/files/gitea.service-r2 | 34 ---------
www-apps/gitea/gitea-1.13.7.ebuild | 129 ----------------------------------
3 files changed, 164 deletions(-)
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 719f20e2bf5..56b6dfcf5f4 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1,2 +1 @@
-DIST gitea-1.13.7.tar.gz 151035143 BLAKE2B 349018a127337251d55e8681c6c509e195905b978711f60a031b5cb55c1cc6fe5c1312eaef6c3343c3a963b748adf3ef88b6b35176279f517c946f74532f2fcd SHA512 018948d4d40f41c01bc8d9fd74b1d170a8cd7a82402913ee1d11dc283a4946971f76356640213d79877160c29b58b9c393a7d761da695545939db50a3f137f7e
DIST gitea-1.14.2.tar.gz 117884130 BLAKE2B 75ae36ade602bcbdcc59cd3f75f60ab5fbde713399b1d8b83f29b2bee044c9a5dc83fbae8f372f62c991edeef7237a5a96a9f6b4cda0ae1db93d6596377e1a98 SHA512 073ff6d718522c1b8d2746379d6d0051dd18db89331604c1cc252bcedbad04e75a1f402bdd37fea05d21e6b5d24f43ebf9e70748f8522996fdf8eb133d2a3e38
diff --git a/www-apps/gitea/files/gitea.service-r2 b/www-apps/gitea/files/gitea.service-r2
deleted file mode 100644
index 1931b46c73c..00000000000
--- a/www-apps/gitea/files/gitea.service-r2
+++ /dev/null
@@ -1,34 +0,0 @@
-[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-9.3.service
-After=postgresql-9.4.service
-After=postgresql-9.5.service
-After=postgresql-9.6.service
-After=postgresql-10.service
-After=postgresql-11.service
-After=postgresql-12.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.13.7.ebuild b/www-apps/gitea/gitea-1.13.7.ebuild
deleted file mode 100644
index a68755728ea..00000000000
--- a/www-apps/gitea/gitea-1.13.7.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit fcaps go-module tmpfiles systemd
-MY_PV="${PV/_rc/-rc}"
-
-DESCRIPTION="A painless self-hosted Git service"
-HOMEPAGE="https://gitea.io"
-
-if [[ ${PV} != 9999* ]] ; then
- SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${MY_PV}/gitea-src-${MY_PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~arm ~arm64"
- S="${WORKDIR}"
-else
- EGIT_REPO_URI="https://github.com/go-gitea/gitea"
- inherit git-r3
- S="${WORKDIR}/${P}"
-fi
-
-LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
-SLOT="0"
-IUSE="+acct build-client pam sqlite"
-
-BDEPEND="build-client? ( >=net-libs/nodejs-10[npm] )"
-COMMON_DEPEND="
- acct? (
- acct-group/git
- acct-user/git[gitea] )
- pam? ( sys-libs/pam )"
-DEPEND="${COMMON_DEPEND}"
-RDEPEND="${COMMON_DEPEND}
- dev-vcs/git"
-
-DOCS=(
- custom/conf/app.example.ini CONTRIBUTING.md README.md
-)
-FILECAPS=(
- cap_net_bind_service+ep usr/bin/gitea
-)
-
-RESTRICT="test"
-QA_PRESTRIPPED="usr/bin/gitea"
-
-src_prepare() {
- default
-
- local sedcmds=(
- -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
- -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
- -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
-
- einfo "Remove tests which are known to fail with network-sandbox enabled."
- rm ./modules/migrations/github_test.go || die
-
- einfo "Remove tests which depend on gitea git-repo."
- rm ./modules/git/blob_test.go || die
- rm ./modules/git/repo_test.go || die
-
- # Remove already build assets (like frontend part)
- use build-client && emake clean-all
-}
-
-src_compile() {
- local gitea_tags=(
- bindata
- $(usev pam)
- $(usex sqlite 'sqlite sqlite_unlock_notify' '')
- )
- local gitea_settings=(
- "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/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=(
- TAGS="${gitea_tags[*]}"
- LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[*]}"
- )
- [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${MY_PV}")
-
- if use build-client; then
- # -j1 as Makefile doesn't handle dependancy correctly, and is not
- # useful as golang compiler don't use this info.
- env "${makeenv[@]}" emake -j1 build
- else
- env "${makeenv[@]}" emake backend
- fi
-}
-
-src_install() {
- dobin gitea
-
- einstalldocs
-
- newconfd "${FILESDIR}/gitea.confd-r1" gitea
- newinitd "${FILESDIR}/gitea.initd-r3" gitea
- newtmpfiles - gitea.conf <<-EOF
- d /run/gitea 0755 git git
- EOF
- systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
-
- insinto /etc/gitea
- newins custom/conf/app.example.ini app.ini
- if use acct ; then
- fowners root:git /etc/gitea/{,app.ini}
- fperms g+w,o-rwx /etc/gitea/{,app.ini}
-
- diropts -m0750 -o git -g git
- keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
- keepdir /var/log/gitea
- fi
-}
-
-pkg_postinst() {
- fcaps_pkg_postinst
- go-module_pkg_postinst
- tmpfiles_process gitea.conf
-}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2023-11-17 1:51 Yixun Lan
0 siblings, 0 replies; 13+ messages in thread
From: Yixun Lan @ 2023-11-17 1:51 UTC (permalink / raw
To: gentoo-commits
commit: 7bf41879db42ed6108bdcd9b08b4c5a10b90d22a
Author: Ryan Qian <i <AT> bitbili <DOT> net>
AuthorDate: Tue Nov 14 21:14:05 2023 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Nov 17 01:49:06 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bf41879
www-apps/gitea: update the systemd service file for new postgresql versions
Closes: https://github.com/gentoo/gentoo/pull/33825
Signed-off-by: Ryan Qian <i <AT> bitbili.net>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
www-apps/gitea/files/gitea.service-r4 | 34 ++++++++++++++++++++++++++++++++++
www-apps/gitea/gitea-1.21.0.ebuild | 2 +-
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/www-apps/gitea/files/gitea.service-r4 b/www-apps/gitea/files/gitea.service-r4
new file mode 100644
index 000000000000..3fa73aaf1db8
--- /dev/null
+++ b/www-apps/gitea/files/gitea.service-r4
@@ -0,0 +1,34 @@
+[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-10.service
+After=postgresql-11.service
+After=postgresql-12.service
+After=postgresql-13.service
+After=postgresql-14.service
+After=postgresql-15.service
+After=postgresql-16.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 --config /etc/gitea/app.ini web
+
+Restart=always
+PrivateTmp=true
+Nice=5
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-apps/gitea/gitea-1.21.0.ebuild b/www-apps/gitea/gitea-1.21.0.ebuild
index c3878c4ba16b..fce72a8ba35f 100644
--- a/www-apps/gitea/gitea-1.21.0.ebuild
+++ b/www-apps/gitea/gitea-1.21.0.ebuild
@@ -101,7 +101,7 @@ src_install() {
newtmpfiles - gitea.conf <<-EOF
d /run/gitea 0755 git git
EOF
- systemd_newunit "${FILESDIR}"/gitea.service-r3 gitea.service
+ systemd_newunit "${FILESDIR}"/gitea.service-r4 gitea.service
insinto /etc/gitea
newins custom/conf/app.example.ini app.ini
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2024-01-13 11:10 Yixun Lan
0 siblings, 0 replies; 13+ messages in thread
From: Yixun Lan @ 2024-01-13 11:10 UTC (permalink / raw
To: gentoo-commits
commit: 9624621806fb75c1fe861720d27888ebd89b37bb
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 13 11:08:42 2024 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Jan 13 11:09:57 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96246218
www-apps/gitea: drop 1.20.6
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
www-apps/gitea/Manifest | 1 -
www-apps/gitea/files/gitea.service-r3 | 34 ---------
www-apps/gitea/gitea-1.20.6.ebuild | 131 ----------------------------------
3 files changed, 166 deletions(-)
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 3ebb0f9ea093..5c096f065b7b 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1,3 +1,2 @@
-DIST gitea-1.20.6.tar.gz 50473256 BLAKE2B 0b26e38815dc1bf16c6f50c0b4cd7e6c3c3e0900056beda6177cb7fd1df1378e89a6ca47228f3fef2f6176eb5054d1bfb999ba1a1314a5915dbbff62f0f1365a SHA512 fb0a979bdaaec25512f70cbcb1907d5e649eff2d0795a6bb5fe9e582ada1f132ca649dd594ccd24051fa6e2e0fd3b94effc66475ab2f9faeb03cebd4c657336a
DIST gitea-1.21.2.tar.gz 53795805 BLAKE2B ee85aae28325df59aa7fefcda5e3ec4216f79e115972fcbea543b189c6f8fe2bb2f7d23f27cd2418c7f50e474177398e4cd925474ca5d68fe3bab64a2cf785b7 SHA512 809254dfe420fb97697855d2aa815344b56d316edaec140598526fc7728275ca9a10179093b8d036cce0947684234a0aa2fa7febdd1bbdf7f831a249cc16ba4a
DIST gitea-1.21.3.tar.gz 53775315 BLAKE2B 0baae678e3ad75129f753d0e1eadf83b06008da5041f6859f985facc78f223284f17cad0e8858c9c8a7d6ca34042c7cb19f69fa30a560170a60b3548bdef8f6b SHA512 f55336d4067d9403c5556a8a641ca805c13e3c7dbc60a684329cb9f3a886c0ebb10a3318dc9c4c3251e1bd0bcc0821fe40575d9ada1779012a850d592acdabd1
diff --git a/www-apps/gitea/files/gitea.service-r3 b/www-apps/gitea/files/gitea.service-r3
deleted file mode 100644
index 0867ba637824..000000000000
--- a/www-apps/gitea/files/gitea.service-r3
+++ /dev/null
@@ -1,34 +0,0 @@
-[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-9.5.service
-After=postgresql-9.6.service
-After=postgresql-10.service
-After=postgresql-11.service
-After=postgresql-12.service
-After=postgresql-13.service
-After=postgresql-14.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.20.6.ebuild b/www-apps/gitea/gitea-1.20.6.ebuild
deleted file mode 100644
index 528d3b3a10f7..000000000000
--- a/www-apps/gitea/gitea-1.20.6.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# 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 user-info
-
-DESCRIPTION="A painless self-hosted Git service"
-HOMEPAGE="https://gitea.com https://github.com/go-gitea/gitea"
-
-if [[ ${PV} == *9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/go-gitea/gitea.git"
-else
- SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~riscv ~x86"
-fi
-
-S="${WORKDIR}/${PN}-src-${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"
-
-DOCS=(
- custom/conf/app.example.ini CONTRIBUTING.md README.md
-)
-FILECAPS=(
- -m 711 cap_net_bind_service+ep usr/bin/gitea
-)
-
-RESTRICT="test"
-
-src_prepare() {
- default
-
- sed -i -e "s#^MODE = console#MODE = file#" 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 gitea_tags=(
- bindata
- $(usev pam)
- $(usex sqlite 'sqlite sqlite_unlock_notify' '')
- )
- local gitea_settings=(
- "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/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}\" ${gitea_settings[*]}"
- TAGS="${gitea_tags[*]}"
- )
-
- GOFLAGS=""
- if use pie ; then
- GOFLAGS+="-buildmode=pie"
- fi
-
- env "${makeenv[@]}" emake EXTRA_GOFLAGS="${GOFLAGS}" backend
-}
-
-src_install() {
- dobin gitea
-
- einstalldocs
-
- newconfd "${FILESDIR}/gitea.confd-r1" gitea
- newinitd "${FILESDIR}/gitea.initd-r3" gitea
- newtmpfiles - gitea.conf <<-EOF
- d /run/gitea 0755 git git
- EOF
- systemd_newunit "${FILESDIR}"/gitea.service-r3 gitea.service
-
- insinto /etc/gitea
- newins custom/conf/app.example.ini app.ini
- if use acct; then
- fowners root:git /etc/gitea/{,app.ini}
- fperms g+w,o-rwx /etc/gitea/{,app.ini}
-
- diropts -m0750 -o git -g git
- keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
- keepdir /var/log/gitea
- fi
-}
-
-pkg_postinst() {
- fcaps_pkg_postinst
-
- # It is not guaranteed that the git user and group always exist (due to the acct USE Flag),
- # but for convenience, the tmpfile uses the git user and group by default.
- # To avoid installation errors, a condition needs to be added here:
- # if there is no git user or group, the installation of tmpfile will be skipped
- # and the user will be notified to handle it by themselves.
- if egetent passwd git &>/dev/null && \
- egetent group git &>/dev/null; then
- tmpfiles_process gitea.conf
- else
- eerror "Unable to install the tmpfile for gitea due to the git user or group is missing,"
- eerror "please install tmpfile manually or rebuild this package with USE flag 'acct'."
- eerror "You can simply copy the default tmpfile from '/usr/lib/tmpfiles.d/gitea.conf'"
- eerror "to higher priority path '/etc/tmpfiles.d/gitea.conf', and correct it with"
- eerror "the right User and Group value (see tmpfiles.d(5) for details), then execute:"
- eerror " # systemd-tmpfiles --create /etc/tmpfiles.d/gitea.conf"
- eerror "to install it."
- fi
-
- ewarn "The default JWT signing algorithm changed in 1.15.0 from HS256 (symmetric) to"
- ewarn "RS256 (asymmetric). Gitea OAuth2 tokens (and potentially client secrets) will"
- ewarn "need to be regenerated unless you change your JWT_SIGNING_ALGORITHM back to HS256."
- ewarn "For other breaking changes, see <https://github.com/go-gitea/gitea/releases/tag/v1.15.0>."
-}
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2024-06-06 22:08 Yixun Lan
0 siblings, 0 replies; 13+ messages in thread
From: Yixun Lan @ 2024-06-06 22:08 UTC (permalink / raw
To: gentoo-commits
commit: 8f30ea59cf0c6f20feaa59d87687a76058e18d13
Author: Ryan Qian <i <AT> bitbili <DOT> net>
AuthorDate: Thu Jun 6 17:57:01 2024 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Jun 6 22:07:33 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f30ea59
www-apps/gitea: add 1.22.0
also adds an experimental USE flag 'gogit', which is used as
an alternative of the 'git' command
Closes: https://bugs.gentoo.org/933692
Closes: https://github.com/gentoo/gentoo/pull/37058
Signed-off-by: Ryan Qian <i <AT> bitbili.net>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
www-apps/gitea/Manifest | 1 +
.../gitea-1.22.0-fix-missing-memcache-import.diff | 18 +++
.../gitea-1.22.0-go-chi-memcache-package.diff | 121 ++++++++++++++++
...0-ignore-findrecentlypushednewbranches-err.diff | 20 +++
www-apps/gitea/gitea-1.22.0.ebuild | 158 +++++++++++++++++++++
www-apps/gitea/metadata.xml | 1 +
6 files changed, 319 insertions(+)
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 7aadba4baa40..227226bcbe66 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1,3 +1,4 @@
DIST gitea-1.21.10.tar.gz 53972181 BLAKE2B 564e5ee1b7ddb737dc35a712810c3958788457a307db51ecf84fc65b2a69f6b21110e134172c64693cc4bd49c3c6243d4444328ae9a9724e81b06f09df7cd279 SHA512 3129a1b379308195725906fd3c12722099e51662e56e3f488e5114bd531c71f9319e6f170cd227660a1a7f4d30d4d88686b4fc74c28f040d4c9b1a4c6acfba9b
DIST gitea-1.21.11.tar.gz 54029294 BLAKE2B 93fb0ea4118baefeb36283b7168759d318fede528b56a9167961763267181bb283bf9849ce5f57a9950b16047f3b98998b4cd0e92443a23aef4cf15589cc8628 SHA512 ba35d1710bc03ff05bf2490e233bf3b4bd9e002113885b4d2a3193288773c16ad0f2426d4ed64d26b7c49112a02838e67da32167f51c4c08fa4f23738bd78285
DIST gitea-1.21.8.tar.gz 53901461 BLAKE2B e20f509037e5bb674696fb9bdc9b3eb58443f0481f5db2936a69775adcd8c1b53ad7103bae6ba4de2e852ef50218b8bd89dae174d19e0879d04f169e890af71b SHA512 e895d67ab0c086fdef6aab6548ed06696054bb0a8103818c14f5f038a6fc6310178473038fa76752341a50196916ce3845b785f25ab66383bdf44ce8eac87461
+DIST gitea-1.22.0.tar.gz 54603268 BLAKE2B f021fedf77ec6ab41221a8e73d6b48fc215c15053bb62ff288a5dc6a7d11a5acd4d7ee0cbfb40aee2b60011d83fc57f1011013b7d78556c3a84a2743ba90389b SHA512 8e9585d6224f49c2f21b855911c2ac4ded64b8b31c4eb28fbe39801908693a87aad2e9096bf812c30163faa8a8102fd01ec3240bd64debf5633c70568aec4b49
diff --git a/www-apps/gitea/files/gitea-1.22.0-fix-missing-memcache-import.diff b/www-apps/gitea/files/gitea-1.22.0-fix-missing-memcache-import.diff
new file mode 100644
index 000000000000..1ad5d50bf047
--- /dev/null
+++ b/www-apps/gitea/files/gitea-1.22.0-fix-missing-memcache-import.diff
@@ -0,0 +1,18 @@
+https://github.com/go-gitea/gitea/issues/31102
+https://github.com/go-gitea/gitea/pull/31105
+
+Fix missing memcache import
+
+diff --git a/modules/cache/cache.go b/modules/cache/cache.go
+index 2ca77bdb29f3..075367115803 100644
+--- a/modules/cache/cache.go
++++ b/modules/cache/cache.go
+@@ -8,6 +8,8 @@ import (
+ "time"
+
+ "code.gitea.io/gitea/modules/setting"
++
++ _ "gitea.com/go-chi/cache/memcache" //nolint:depguard // memcache plugin for cache, it is required for config "ADAPTER=memcache"
+ )
+
+ var defaultCache StringCache
diff --git a/www-apps/gitea/files/gitea-1.22.0-go-chi-memcache-package.diff b/www-apps/gitea/files/gitea-1.22.0-go-chi-memcache-package.diff
new file mode 100644
index 000000000000..f3ebbe6fc73f
--- /dev/null
+++ b/www-apps/gitea/files/gitea-1.22.0-go-chi-memcache-package.diff
@@ -0,0 +1,121 @@
+https://github.com/go-gitea/gitea/issues/31102
+https://github.com/go-gitea/gitea/pull/31105
+
+add the missing memcache package in the vendor dir,
+binding to patch ./gitea-1.22.0-fix-missing-memcache-import.diff
+
+diff --git a/vendor/gitea.com/go-chi/cache/memcache/memcache.go b/vendor/gitea.com/go-chi/cache/memcache/memcache.go
+new file mode 100644
+index 00000000..7c7cd225
+--- /dev/null
++++ b/vendor/gitea.com/go-chi/cache/memcache/memcache.go
+@@ -0,0 +1,97 @@
++// Copyright 2013 Beego Authors
++// Copyright 2014 The Macaron Authors
++//
++// Licensed under the Apache License, Version 2.0 (the "License"): you may
++// not use this file except in compliance with the License. You may obtain
++// a copy of the License at
++//
++// http://www.apache.org/licenses/LICENSE-2.0
++//
++// Unless required by applicable law or agreed to in writing, software
++// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
++// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
++// License for the specific language governing permissions and limitations
++// under the License.
++
++package cache
++
++import (
++ "strings"
++
++ "github.com/bradfitz/gomemcache/memcache"
++ "github.com/unknwon/com"
++
++ "gitea.com/go-chi/cache"
++)
++
++// MemcacheCacher represents a memcache cache adapter implementation.
++type MemcacheCacher struct {
++ c *memcache.Client
++}
++
++func NewItem(key string, data []byte, expire int32) *memcache.Item {
++ return &memcache.Item{
++ Key: key,
++ Value: data,
++ Expiration: expire,
++ }
++}
++
++// Put puts value into cache with key and expire time.
++// If expired is 0, it lives forever.
++func (c *MemcacheCacher) Put(key string, val interface{}, expire int64) error {
++ return c.c.Set(NewItem(key, []byte(com.ToStr(val)), int32(expire)))
++}
++
++// Get gets cached value by given key.
++func (c *MemcacheCacher) Get(key string) interface{} {
++ item, err := c.c.Get(key)
++ if err != nil {
++ return nil
++ }
++ return string(item.Value)
++}
++
++// Delete deletes cached value by given key.
++func (c *MemcacheCacher) Delete(key string) error {
++ return c.c.Delete(key)
++}
++
++// Incr increases cached int-type value by given key as a counter.
++func (c *MemcacheCacher) Incr(key string) error {
++ _, err := c.c.Increment(key, 1)
++ return err
++}
++
++// Decr decreases cached int-type value by given key as a counter.
++func (c *MemcacheCacher) Decr(key string) error {
++ _, err := c.c.Decrement(key, 1)
++ return err
++}
++
++// IsExist returns true if cached value exists.
++func (c *MemcacheCacher) IsExist(key string) bool {
++ _, err := c.c.Get(key)
++ return err == nil
++}
++
++// Flush deletes all cached data.
++func (c *MemcacheCacher) Flush() error {
++ return c.c.FlushAll()
++}
++
++// StartAndGC starts GC routine based on config string settings.
++// AdapterConfig: 127.0.0.1:9090;127.0.0.1:9091
++func (c *MemcacheCacher) StartAndGC(opt cache.Options) error {
++ c.c = memcache.New(strings.Split(opt.AdapterConfig, ";")...)
++ return nil
++}
++
++// Ping tests if the cache is alive.
++func (c *MemcacheCacher) Ping() error {
++ return cache.GenericPing(c)
++}
++
++func init() {
++ cache.Register("memcache", &MemcacheCacher{})
++}
+diff --git a/vendor/modules.txt b/vendor/modules.txt
+index 144a505d..6cb3f48b 100644
+--- a/vendor/modules.txt
++++ b/vendor/modules.txt
+@@ -40,6 +40,7 @@ gitea.com/go-chi/binding
+ # gitea.com/go-chi/cache v0.2.0
+ ## explicit; go 1.11
+ gitea.com/go-chi/cache
++gitea.com/go-chi/cache/memcache
+ # gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098
+ ## explicit; go 1.21
+ gitea.com/go-chi/captcha
diff --git a/www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff b/www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff
new file mode 100644
index 000000000000..78459f6e3359
--- /dev/null
+++ b/www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff
@@ -0,0 +1,20 @@
+https://github.com/go-gitea/gitea/issues/31163
+https://github.com/go-gitea/gitea/pull/31164
+
+A quick fix to workaround 500 error:
+FindRecentlyPushedNewBranches, branch does not exist [repo_id: 64 name: main]
+
+diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
+index e1498c0d581e..386ef7be5ce8 100644
+--- a/routers/web/repo/view.go
++++ b/routers/web/repo/view.go
+@@ -1047,8 +1047,7 @@ func renderHomeCode(ctx *context.Context) {
+ baseRepoPerm.CanRead(unit_model.TypePullRequests) {
+ ctx.Data["RecentlyPushedNewBranches"], err = git_model.FindRecentlyPushedNewBranches(ctx, ctx.Doer, opts)
+ if err != nil {
+- ctx.ServerError("FindRecentlyPushedNewBranches", err)
+- return
++ log.Error("FindRecentlyPushedNewBranches failed: %v", err)
+ }
+ }
+ }
diff --git a/www-apps/gitea/gitea-1.22.0.ebuild b/www-apps/gitea/gitea-1.22.0.ebuild
new file mode 100644
index 000000000000..dec2601480a6
--- /dev/null
+++ b/www-apps/gitea/gitea-1.22.0.ebuild
@@ -0,0 +1,158 @@
+# Copyright 2016-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fcaps go-module tmpfiles systemd flag-o-matic user-info
+
+DESCRIPTION="A painless self-hosted Git service"
+HOMEPAGE="https://gitea.com https://github.com/go-gitea/gitea"
+
+SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-src-${PV}"
+LICENSE="Apache-2.0 BSD BSD-2 CC0-1.0 ISC MIT MPL-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86"
+IUSE="+acct gogit pam sqlite pie"
+
+DEPEND="
+ acct? (
+ acct-group/git
+ acct-user/git[gitea] )
+ pam? ( sys-libs/pam )"
+RDEPEND="${DEPEND}
+ !gogit? ( dev-vcs/git )"
+BDEPEND=">=dev-lang/go-1.22:="
+
+DOCS=(
+ custom/conf/app.example.ini CHANGELOG.md CONTRIBUTING.md README.md
+)
+FILECAPS=(
+ -m 711 cap_net_bind_service+ep usr/bin/gitea
+)
+
+RESTRICT="test"
+
+# The problems that can be fixed by the following patches has been fixed
+# upstream, so these ALL patches should be removed in the next release.
+PATCHES=(
+ "${FILESDIR}/${P}-go-chi-memcache-package.diff"
+ "${FILESDIR}/${P}-fix-missing-memcache-import.diff"
+ "${FILESDIR}/${P}-ignore-findrecentlypushednewbranches-err.diff"
+)
+
+src_prepare() {
+ default
+
+ sed -i -e "s#^MODE = console#MODE = file#" custom/conf/app.example.ini || die
+}
+
+src_configure() {
+ # bug 832756 - PIE build issues
+ filter-flags -fPIE
+ filter-ldflags -fPIE -pie
+}
+
+src_compile() {
+ local gitea_tags
+ local -a gitea_settings makeenv
+
+ # The space-separated list of the -tags flag is deprecated, please
+ # always use the comma-separated list in the future.
+ gitea_tags="bindata"
+ gitea_tags+="$(usex gogit ',gogit' '')"
+ gitea_tags+="$(usex pam ',pam' '')"
+ gitea_tags+="$(usex sqlite ',sqlite,sqlite_unlock_notify' '')"
+
+ gitea_settings=(
+ "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/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"
+ )
+
+ makeenv=(
+ LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[*]}"
+ TAGS="${gitea_tags}"
+ )
+
+ if use pie ; then
+ # Please check the supported platforms when a new keyword request opened,
+ # refer to file: 'go/src/internal/platform/supported.go'.
+ # When PIE buildmode is not supported by internal linker, the external
+ # linker will be used automatically, refer to:
+ # https://github.com/golang/go/blob/ed817f1c4055a559a94afffecbb91c78e4f39942/src/cmd/link/internal/ld/config.go#L149
+ makeenv+=( EXTRA_GOFLAGS="-buildmode=pie" )
+ fi
+
+ env "${makeenv[@]}" emake backend
+}
+
+src_install() {
+ dobin gitea
+
+ einstalldocs
+
+ newconfd "${FILESDIR}/gitea.confd-r1" gitea
+ newinitd "${FILESDIR}/gitea.initd-r3" gitea
+ newtmpfiles - gitea.conf <<-EOF
+ d /run/gitea 0755 git git
+ EOF
+ systemd_newunit "${FILESDIR}"/gitea.service-r4 gitea.service
+
+ insinto /etc/gitea
+ newins custom/conf/app.example.ini app.ini
+ if use acct; then
+ fowners root:git /etc/gitea/{,app.ini}
+ fperms g+w,o-rwx /etc/gitea/{,app.ini}
+
+ diropts -m0750 -o git -g git
+ keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
+ keepdir /var/log/gitea
+ fi
+}
+
+pkg_postinst() {
+ fcaps_pkg_postinst
+
+ # It is not guaranteed that the git user and group always exist (due to the acct USE Flag),
+ # but for convenience, the tmpfile uses the git user and group by default.
+ # To avoid installation errors, a condition needs to be added here:
+ # if there is no git user or group, the installation of tmpfile will be skipped
+ # and the user will be notified to handle it by themselves.
+ if egetent passwd git &>/dev/null && \
+ egetent group git &>/dev/null; then
+ tmpfiles_process gitea.conf
+ else
+ eerror "Unable to install the tmpfile for gitea due to the git user or group is missing,"
+ eerror "please install tmpfile manually or rebuild this package with USE flag 'acct'."
+ eerror "You can simply copy the default tmpfile from '/usr/lib/tmpfiles.d/gitea.conf'"
+ eerror "to higher priority path '/etc/tmpfiles.d/gitea.conf', and correct it with"
+ eerror "the right User and Group value (see tmpfiles.d(5) for details), then execute:"
+ eerror " # systemd-tmpfiles --create /etc/tmpfiles.d/gitea.conf"
+ eerror "to install it."
+ fi
+
+ if [[ -n ${REPLACING_VERSIONS} ]]; then
+ if ver_test "${REPLACING_VERSIONS}" -lt 1.21; then
+ ewarn "Since version 1.21.0:"
+ ewarn " 1. The built-in SSH server will now only accept SSH user"
+ ewarn " certificates, not server certificates. This behaviour matches OpenSSH."
+ ewarn " 2. The options of the subcommand must follow the subcommand now."
+ ewarn " 3. Remove 'CHARSET' config option for MySQL, always use 'utf8mb4'."
+ ewarn "For other breaking changes, see <https://github.com/go-gitea/gitea/releases/tag/v1.21.0>."
+ fi
+ if ver_test "${REPLACING_VERSIONS}" -lt 1.22; then
+ ewarn "Since version 1.22.0:"
+ ewarn " 1. Minimum database requirements updated to MySQL 8.0, PostgreSQL 12, and MSSQL 2012."
+ ewarn " 2. There are a lot of refactoring changes related to customizing templates."
+ ewarn " 3. The default duration of the 'Remember login' feature has been"
+ ewarn " changed from one week to one month."
+ ewarn " 4. Enhanced auth token/remember me, the obsolete setting"
+ ewarn " '[security].COOKIE_USERNAME' has been removed."
+ ewarn " 5. For MinIO storage, adds a prefix path for all MinIO storage"
+ ewarn " and override base path will override the path."
+ ewarn " 6. Now use a more restricted sanitizer for the repository description."
+ ewarn "For more details, see <https://github.com/go-gitea/gitea/releases/tag/v1.22.0>."
+ fi
+ fi
+}
diff --git a/www-apps/gitea/metadata.xml b/www-apps/gitea/metadata.xml
index 1443204ea795..007dbafc9b14 100644
--- a/www-apps/gitea/metadata.xml
+++ b/www-apps/gitea/metadata.xml
@@ -18,5 +18,6 @@
</upstream>
<use>
<flag name="acct">User and group management via acct-*/git packages</flag>
+ <flag name="gogit">(EXPERIMENTAL) Use go-git variants of Git commands.</flag>
</use>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/
@ 2024-07-16 0:29 Yixun Lan
0 siblings, 0 replies; 13+ messages in thread
From: Yixun Lan @ 2024-07-16 0:29 UTC (permalink / raw
To: gentoo-commits
commit: 151f0d6019f0e8944e9ab5bb5cfbb69f41544bdc
Author: Ryan Tsien <i <AT> bitbili <DOT> net>
AuthorDate: Mon Jul 15 09:31:21 2024 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Jul 16 00:28:25 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=151f0d60
www-apps/gitea: add 1.22.1, drop 1.22.0
Closes: https://github.com/gentoo/gentoo/pull/37564
Signed-off-by: Ryan Tsien <i <AT> bitbili.net>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
www-apps/gitea/Manifest | 2 +-
.../gitea-1.22.0-fix-missing-memcache-import.diff | 18 ---
.../gitea-1.22.0-go-chi-memcache-package.diff | 121 ---------------------
...0-ignore-findrecentlypushednewbranches-err.diff | 20 ----
.../{gitea-1.22.0.ebuild => gitea-1.22.1.ebuild} | 8 --
5 files changed, 1 insertion(+), 168 deletions(-)
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 81b1ecd7eb69..44cac977145e 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -1,2 +1,2 @@
DIST gitea-1.21.11.tar.gz 54029294 BLAKE2B 93fb0ea4118baefeb36283b7168759d318fede528b56a9167961763267181bb283bf9849ce5f57a9950b16047f3b98998b4cd0e92443a23aef4cf15589cc8628 SHA512 ba35d1710bc03ff05bf2490e233bf3b4bd9e002113885b4d2a3193288773c16ad0f2426d4ed64d26b7c49112a02838e67da32167f51c4c08fa4f23738bd78285
-DIST gitea-1.22.0.tar.gz 54603268 BLAKE2B f021fedf77ec6ab41221a8e73d6b48fc215c15053bb62ff288a5dc6a7d11a5acd4d7ee0cbfb40aee2b60011d83fc57f1011013b7d78556c3a84a2743ba90389b SHA512 8e9585d6224f49c2f21b855911c2ac4ded64b8b31c4eb28fbe39801908693a87aad2e9096bf812c30163faa8a8102fd01ec3240bd64debf5633c70568aec4b49
+DIST gitea-1.22.1.tar.gz 54686177 BLAKE2B 78f25cb6cc024b05f9a51eb9692b2eab97b20d28aad7ed56894b31a5e9ea3ed1be00e1ba75abb75b36cbdfc740507321ff036927bb842ade7cc43c90befe027b SHA512 318513a2aaae8d99358a26d44ab51c7a002b74fb11dbd7f9dfdccdd25f707572b075099e59bc3764564e1219069a1f9e6b56c71474ef494531c73e358d76ac6e
diff --git a/www-apps/gitea/files/gitea-1.22.0-fix-missing-memcache-import.diff b/www-apps/gitea/files/gitea-1.22.0-fix-missing-memcache-import.diff
deleted file mode 100644
index 1ad5d50bf047..000000000000
--- a/www-apps/gitea/files/gitea-1.22.0-fix-missing-memcache-import.diff
+++ /dev/null
@@ -1,18 +0,0 @@
-https://github.com/go-gitea/gitea/issues/31102
-https://github.com/go-gitea/gitea/pull/31105
-
-Fix missing memcache import
-
-diff --git a/modules/cache/cache.go b/modules/cache/cache.go
-index 2ca77bdb29f3..075367115803 100644
---- a/modules/cache/cache.go
-+++ b/modules/cache/cache.go
-@@ -8,6 +8,8 @@ import (
- "time"
-
- "code.gitea.io/gitea/modules/setting"
-+
-+ _ "gitea.com/go-chi/cache/memcache" //nolint:depguard // memcache plugin for cache, it is required for config "ADAPTER=memcache"
- )
-
- var defaultCache StringCache
diff --git a/www-apps/gitea/files/gitea-1.22.0-go-chi-memcache-package.diff b/www-apps/gitea/files/gitea-1.22.0-go-chi-memcache-package.diff
deleted file mode 100644
index f3ebbe6fc73f..000000000000
--- a/www-apps/gitea/files/gitea-1.22.0-go-chi-memcache-package.diff
+++ /dev/null
@@ -1,121 +0,0 @@
-https://github.com/go-gitea/gitea/issues/31102
-https://github.com/go-gitea/gitea/pull/31105
-
-add the missing memcache package in the vendor dir,
-binding to patch ./gitea-1.22.0-fix-missing-memcache-import.diff
-
-diff --git a/vendor/gitea.com/go-chi/cache/memcache/memcache.go b/vendor/gitea.com/go-chi/cache/memcache/memcache.go
-new file mode 100644
-index 00000000..7c7cd225
---- /dev/null
-+++ b/vendor/gitea.com/go-chi/cache/memcache/memcache.go
-@@ -0,0 +1,97 @@
-+// Copyright 2013 Beego Authors
-+// Copyright 2014 The Macaron Authors
-+//
-+// Licensed under the Apache License, Version 2.0 (the "License"): you may
-+// not use this file except in compliance with the License. You may obtain
-+// a copy of the License at
-+//
-+// http://www.apache.org/licenses/LICENSE-2.0
-+//
-+// Unless required by applicable law or agreed to in writing, software
-+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-+// License for the specific language governing permissions and limitations
-+// under the License.
-+
-+package cache
-+
-+import (
-+ "strings"
-+
-+ "github.com/bradfitz/gomemcache/memcache"
-+ "github.com/unknwon/com"
-+
-+ "gitea.com/go-chi/cache"
-+)
-+
-+// MemcacheCacher represents a memcache cache adapter implementation.
-+type MemcacheCacher struct {
-+ c *memcache.Client
-+}
-+
-+func NewItem(key string, data []byte, expire int32) *memcache.Item {
-+ return &memcache.Item{
-+ Key: key,
-+ Value: data,
-+ Expiration: expire,
-+ }
-+}
-+
-+// Put puts value into cache with key and expire time.
-+// If expired is 0, it lives forever.
-+func (c *MemcacheCacher) Put(key string, val interface{}, expire int64) error {
-+ return c.c.Set(NewItem(key, []byte(com.ToStr(val)), int32(expire)))
-+}
-+
-+// Get gets cached value by given key.
-+func (c *MemcacheCacher) Get(key string) interface{} {
-+ item, err := c.c.Get(key)
-+ if err != nil {
-+ return nil
-+ }
-+ return string(item.Value)
-+}
-+
-+// Delete deletes cached value by given key.
-+func (c *MemcacheCacher) Delete(key string) error {
-+ return c.c.Delete(key)
-+}
-+
-+// Incr increases cached int-type value by given key as a counter.
-+func (c *MemcacheCacher) Incr(key string) error {
-+ _, err := c.c.Increment(key, 1)
-+ return err
-+}
-+
-+// Decr decreases cached int-type value by given key as a counter.
-+func (c *MemcacheCacher) Decr(key string) error {
-+ _, err := c.c.Decrement(key, 1)
-+ return err
-+}
-+
-+// IsExist returns true if cached value exists.
-+func (c *MemcacheCacher) IsExist(key string) bool {
-+ _, err := c.c.Get(key)
-+ return err == nil
-+}
-+
-+// Flush deletes all cached data.
-+func (c *MemcacheCacher) Flush() error {
-+ return c.c.FlushAll()
-+}
-+
-+// StartAndGC starts GC routine based on config string settings.
-+// AdapterConfig: 127.0.0.1:9090;127.0.0.1:9091
-+func (c *MemcacheCacher) StartAndGC(opt cache.Options) error {
-+ c.c = memcache.New(strings.Split(opt.AdapterConfig, ";")...)
-+ return nil
-+}
-+
-+// Ping tests if the cache is alive.
-+func (c *MemcacheCacher) Ping() error {
-+ return cache.GenericPing(c)
-+}
-+
-+func init() {
-+ cache.Register("memcache", &MemcacheCacher{})
-+}
-diff --git a/vendor/modules.txt b/vendor/modules.txt
-index 144a505d..6cb3f48b 100644
---- a/vendor/modules.txt
-+++ b/vendor/modules.txt
-@@ -40,6 +40,7 @@ gitea.com/go-chi/binding
- # gitea.com/go-chi/cache v0.2.0
- ## explicit; go 1.11
- gitea.com/go-chi/cache
-+gitea.com/go-chi/cache/memcache
- # gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098
- ## explicit; go 1.21
- gitea.com/go-chi/captcha
diff --git a/www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff b/www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff
deleted file mode 100644
index 78459f6e3359..000000000000
--- a/www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff
+++ /dev/null
@@ -1,20 +0,0 @@
-https://github.com/go-gitea/gitea/issues/31163
-https://github.com/go-gitea/gitea/pull/31164
-
-A quick fix to workaround 500 error:
-FindRecentlyPushedNewBranches, branch does not exist [repo_id: 64 name: main]
-
-diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
-index e1498c0d581e..386ef7be5ce8 100644
---- a/routers/web/repo/view.go
-+++ b/routers/web/repo/view.go
-@@ -1047,8 +1047,7 @@ func renderHomeCode(ctx *context.Context) {
- baseRepoPerm.CanRead(unit_model.TypePullRequests) {
- ctx.Data["RecentlyPushedNewBranches"], err = git_model.FindRecentlyPushedNewBranches(ctx, ctx.Doer, opts)
- if err != nil {
-- ctx.ServerError("FindRecentlyPushedNewBranches", err)
-- return
-+ log.Error("FindRecentlyPushedNewBranches failed: %v", err)
- }
- }
- }
diff --git a/www-apps/gitea/gitea-1.22.0.ebuild b/www-apps/gitea/gitea-1.22.1.ebuild
similarity index 94%
rename from www-apps/gitea/gitea-1.22.0.ebuild
rename to www-apps/gitea/gitea-1.22.1.ebuild
index dec2601480a6..dd49814314cb 100644
--- a/www-apps/gitea/gitea-1.22.0.ebuild
+++ b/www-apps/gitea/gitea-1.22.1.ebuild
@@ -33,14 +33,6 @@ FILECAPS=(
RESTRICT="test"
-# The problems that can be fixed by the following patches has been fixed
-# upstream, so these ALL patches should be removed in the next release.
-PATCHES=(
- "${FILESDIR}/${P}-go-chi-memcache-package.diff"
- "${FILESDIR}/${P}-fix-missing-memcache-import.diff"
- "${FILESDIR}/${P}-ignore-findrecentlypushednewbranches-err.diff"
-)
-
src_prepare() {
default
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-07-16 0:29 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-25 21:06 [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/, www-apps/gitea/files/ Manuel Rüger
-- strict thread matches above, loose matches on Subject: below --
2024-07-16 0:29 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
2019-03-15 22:42 Patrice Clement
2016-12-25 20:53 Manuel Rüger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox