From 29e99f3dee6935bf1b0bcd945b3568c68e25cd2b Mon Sep 17 00:00:00 2001 From: Alexander Miroshnichenko Date: Mon, 7 Jun 2021 14:43:54 +0300 Subject: [PATCH] www-apps/gitea: Bump version 1.14.2 --- www-apps/gitea/Manifest | 11 +- www-apps/gitea/files/app.ini | 4 - .../files/{gitea.initd-r2 => gitea.initd-r3} | 6 +- .../{gitea.service-r1 => gitea.service-r2} | 10 +- www-apps/gitea/gitea-1.14.2.ebuild | 129 ++++++++++++++++++ www-apps/gitea/gitea-1.8.1.ebuild | 85 ------------ www-apps/gitea/metadata.xml | 12 +- 7 files changed, 151 insertions(+), 106 deletions(-) delete mode 100644 www-apps/gitea/files/app.ini rename www-apps/gitea/files/{gitea.initd-r2 => gitea.initd-r3} (73%) rename www-apps/gitea/files/{gitea.service-r1 => gitea.service-r2} (61%) create mode 100644 www-apps/gitea/gitea-1.14.2.ebuild delete mode 100644 www-apps/gitea/gitea-1.8.1.ebuild diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest index 70ca8ce..c119292 100644 --- a/www-apps/gitea/Manifest +++ b/www-apps/gitea/Manifest @@ -1,7 +1,6 @@ -AUX app.ini 67 BLAKE2B 4ec7b8217486047b419202b3a8a7172ac21ae0e5ad9224cd4f010be730ac5cda9d05bf06dcba2d06f8809900094b3b007ef98dd4ea20a125fb7d3db279f53e4a SHA512 93f6f7cf49dd1ece56f7da711adbb58cc38a503527aeea140837d74456ee6f550a089e897d9cb94382e1eb3f5a5cbe4a61362534463eada08a91f314da0f2108 AUX gitea.confd-r1 243 BLAKE2B 87caa8371f53f52b0a85f720342f9f358dedec9240ab78998655a03df6bf3f301fe077afabdca1b1895dbcab2fa05748735d6f38f9b3ad53534fe8ae6e72db49 SHA512 485dc9d0b86d0a7b3ba958aac9de1129aa0ffbb47219419d38811f2accca2539e49dd93cc4a24b21f1c3802b024aa8449f54e320e8a16197f201532edeca6836 -AUX gitea.initd-r2 736 BLAKE2B abb2733808783b3654b51493451950c07237c005897c630f8ce095f0bacb7f1e59c61f0f1663c5daddcab08121c54eaba4de953d6e03ce1c7b405d0e7de597b6 SHA512 42321bbfaa844ef246b825d36bc1b8227b34d4cb7a5c4ced706203c40dd345e4c163e18bfdaa4899154d6c405f8e42b9b7ea0657e048c496ede1976d958d2228 -AUX gitea.service-r1 557 BLAKE2B 0d255654da33fb9155a6bc29896ab164597667c252b680e2b945109163c09feaa88c28776277a9c7f00d6b5b66cb24bda50e99dde354a5d18ed61597fb1ce917 SHA512 cabe0a1b5a5f435f4fa5b3c20fb76ad1b248463fa681e55a4ae66b027f00574c1fcb65f1841c0bc52b7188a02c0fc05bfa9b11931d26c5efce6b988d4b7a8f57 -DIST gitea-1.8.1.tar.gz 24304805 BLAKE2B 4300125da2116218c0609bb8974b2abea22593161dd60e12390eea7e60865df40a089126748b3f5c9e856b2c59fdb6a4b9997c6d0bb9743ceb0c413c41caa903 SHA512 b583ba21ae9c896d527d299d5a14f7b99e40b474da7ca40521487f0459c877da9c21825b40dc0f981af7813bcabca11f62d8076cc1e401adda57d0e0505b96ce -EBUILD gitea-1.8.1.ebuild 2441 BLAKE2B 017544ba40e11c49b62ac5657c59c836cacbe8c57164c0549bc34609072d3bd3aae5834c0166f600d38cfebc7805a0ad63bac57b66daa7df1dfde5c74d047f9c SHA512 32792428fe7f93f597c22134a9d946b31eed9424c065c8fc0f74896a6c6c3283df0c7d29da93e23c70f841498f6d9dc5cf1740aeae247c6c5583aedcd128150e -MISC metadata.xml 563 BLAKE2B 00090c9965433ee21c5ebb4cd7ff83f3c16a870acd9da92842a53349a4bf38dc1239be17ec7545e5b0a44c07e2c93d3dbff599b37fcd4366a2ff41952cb513cb SHA512 fbf0fca0af8b73494e20a965f99f101e7ed08927b8b303189f69586e59b57bdc07781353b9bbd9ba904a53efa85fa91e4a76341ca2083cf9f6769448de700222 +AUX gitea.initd-r3 802 BLAKE2B 2e33e95f7d2762986184d45b0bbb250cc5e04fffc4e4b006233b28e5b57be69eef1d83441adebe2b94681585edaf77f9da4eb97930f91e75c1b1a5cd8d137633 SHA512 5ff2e653180a0601734fcd055dfffdfdc12363736ed2e56c8576c802398b90f4025b44002cbb9a3fd1e0c2d4c169f62d460381c6c549746d3390e55fc1c677d1 +AUX gitea.service-r2 734 BLAKE2B 84825b8198e9495e2803ca3702e6a631fb269c5c8fb4ff4246465a5bd7f7d796b0c3eaea72d0a25cef4f5d38d27a6c99a1b6d41f489749bef322a4ac93cfdd12 SHA512 287670f196bf6353dbdeb6ac37b4ac73693e16a6a3a83f57e7179ccb64364d1d85950a2ddd0a77238a3d218afdaacc8ba849c2810a7ba1238c7277074d1ebe39 +DIST gitea-1.14.2.tar.gz 117884130 BLAKE2B 75ae36ade602bcbdcc59cd3f75f60ab5fbde713399b1d8b83f29b2bee044c9a5dc83fbae8f372f62c991edeef7237a5a96a9f6b4cda0ae1db93d6596377e1a98 SHA512 073ff6d718522c1b8d2746379d6d0051dd18db89331604c1cc252bcedbad04e75a1f402bdd37fea05d21e6b5d24f43ebf9e70748f8522996fdf8eb133d2a3e38 +EBUILD gitea-1.14.2.ebuild 3459 BLAKE2B 4f0552782f2a6917127e9d0279dd01a586ae93edef050bd218fa9f71b5bf5259d3d60fc5b924b279add899aff3c722efb5a5f765367bf3439314663af2135600 SHA512 addc33481ada8a104d4f87926c4b7a0c4988f08370ce90b673b8827abb112acdbfc37c7c43bf42693101343f458f02bd23d82a1c2c05a6116846747c98a803c0 +MISC metadata.xml 669 BLAKE2B 081a892f3f74992c0bfba4da4ad2fcaa42e2331b787607f63f4b6df2b88f8955cd39e85fb380ac42260197c553fce553845659a2cb7ec868c19ab651406be2ac SHA512 4f13893712a51a03c829403f6a093763b7ef92094cb6e700a30a15006ab8aa7bcae090a4a478e544692adf09d34bf477fe7bc38943447bfec8e4dc122d8ab912 diff --git a/www-apps/gitea/files/app.ini b/www-apps/gitea/files/app.ini deleted file mode 100644 index 5dd998f..0000000 --- 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/files/gitea.initd-r2 b/www-apps/gitea/files/gitea.initd-r3 similarity index 73% rename from www-apps/gitea/files/gitea.initd-r2 rename to www-apps/gitea/files/gitea.initd-r3 index 24cac0b..680ae83 100644 --- a/www-apps/gitea/files/gitea.initd-r2 +++ b/www-apps/gitea/files/gitea.initd-r3 @@ -15,8 +15,8 @@ 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}" +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-r1 b/www-apps/gitea/files/gitea.service-r2 similarity index 61% rename from www-apps/gitea/files/gitea.service-r1 rename to www-apps/gitea/files/gitea.service-r2 index 73f9243..1931b46 100644 --- a/www-apps/gitea/files/gitea.service-r1 +++ b/www-apps/gitea/files/gitea.service-r2 @@ -8,7 +8,13 @@ AssertPathIsReadWrite=/var/lib/gitea After=network.target Requires=network.target After=mysqld.service -After=postgresql.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 @@ -16,7 +22,7 @@ After=redis.service User=git Group=git -Environment="GITEA_WORK_DIR=/var/lib/gitea GITEA_CUSTOM=/var/lib/gitea/custom" +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 diff --git a/www-apps/gitea/gitea-1.14.2.ebuild b/www-apps/gitea/gitea-1.14.2.ebuild new file mode 100644 index 0000000..a687557 --- /dev/null +++ b/www-apps/gitea/gitea-1.14.2.ebuild @@ -0,0 +1,129 @@ +# 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 +} diff --git a/www-apps/gitea/gitea-1.8.1.ebuild b/www-apps/gitea/gitea-1.8.1.ebuild deleted file mode 100644 index 7905bbf..0000000 --- a/www-apps/gitea/gitea-1.8.1.ebuild +++ /dev/null @@ -1,85 +0,0 @@ -# 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 ~arm64" - -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 -} diff --git a/www-apps/gitea/metadata.xml b/www-apps/gitea/metadata.xml index df58a68..5066856 100644 --- a/www-apps/gitea/metadata.xml +++ b/www-apps/gitea/metadata.xml @@ -1,19 +1,19 @@ - - xdch47@posteo.de - Felix Neumärker - - + nemunaire@nemunai.re Pierre-Olivier Mercier - + proxy-maint@gentoo.org Proxy Maintainers go-gitea/gitea + + User and group management via acct-*/git packages + Build the client code, instead of using a precompiled one +