diff options
Diffstat (limited to 'www-apps/gitea')
-rw-r--r-- | www-apps/gitea/Manifest | 9 | ||||
-rw-r--r-- | www-apps/gitea/files/1.12-fix-vendoring.patch | 13 | ||||
-rw-r--r-- | www-apps/gitea/gitea-1.11.8.ebuild (renamed from www-apps/gitea/gitea-1.11.6.ebuild) | 2 | ||||
-rw-r--r-- | www-apps/gitea/gitea-1.12.1.ebuild | 126 | ||||
-rw-r--r-- | www-apps/gitea/gitea-9999.ebuild | 105 |
5 files changed, 188 insertions, 67 deletions
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest index 1d1bd673f4d4..a3b9fae58661 100644 --- a/www-apps/gitea/Manifest +++ b/www-apps/gitea/Manifest @@ -1,8 +1,11 @@ +AUX 1.12-fix-vendoring.patch 430 BLAKE2B 897214736e27f49023c8de9da5e7caa3612947f381d10e1bfd9fca2a6f4cfdcefb7fd6a70fb972e9db1c8a84deb592f585d0c6beda66b551b6e65cdce33e73d6 SHA512 9b2678c373dfb18e53be53b99e2cebdb656f777f850c6f9b67e29d52011edc320fb7d14045fef08b0b3b70959784070264f1cdfae70937097977b2865c8c71b5 AUX gitea-logflags.patch 4568 BLAKE2B 280697f7ca87c3c985aef0462f63f431860411ad7c39e462e5a63607ef076b116c27d2090f894095193dad33918f1fad1767489d45ae80f9699dddf65141ceb9 SHA512 aa09b233402ecb450cab13ed08786c1b8dc72a944efe69792bcf95d6109dd41b73abae95c3048bf339c8bb7849b3a20edb473388c052d32e00f7fb8b9381138d AUX gitea.confd-r1 243 BLAKE2B 87caa8371f53f52b0a85f720342f9f358dedec9240ab78998655a03df6bf3f301fe077afabdca1b1895dbcab2fa05748735d6f38f9b3ad53534fe8ae6e72db49 SHA512 485dc9d0b86d0a7b3ba958aac9de1129aa0ffbb47219419d38811f2accca2539e49dd93cc4a24b21f1c3802b024aa8449f54e320e8a16197f201532edeca6836 AUX gitea.initd-r3 802 BLAKE2B 2e33e95f7d2762986184d45b0bbb250cc5e04fffc4e4b006233b28e5b57be69eef1d83441adebe2b94681585edaf77f9da4eb97930f91e75c1b1a5cd8d137633 SHA512 5ff2e653180a0601734fcd055dfffdfdc12363736ed2e56c8576c802398b90f4025b44002cbb9a3fd1e0c2d4c169f62d460381c6c549746d3390e55fc1c677d1 AUX gitea.service-r2 734 BLAKE2B 84825b8198e9495e2803ca3702e6a631fb269c5c8fb4ff4246465a5bd7f7d796b0c3eaea72d0a25cef4f5d38d27a6c99a1b6d41f489749bef322a4ac93cfdd12 SHA512 287670f196bf6353dbdeb6ac37b4ac73693e16a6a3a83f57e7179ccb64364d1d85950a2ddd0a77238a3d218afdaacc8ba849c2810a7ba1238c7277074d1ebe39 -DIST gitea-src-1.11.6.tar.gz 68915319 BLAKE2B 8d8fd34fe38e153aa4af932a83933d0b5ad81a63bf7b7b5be59e64dd82db3282072686979a41fafa3ac2e523f79d6926ed057b2ed18645040bf1c446c6ab04b2 SHA512 57d5214a5e05581c134d42e00ec29fe15f3245a75440fca26c7162937570affc5a2e4ba8e903cb7f15fcb271144183ce5aa473457245f36d52686ea9f1cc93b3 -EBUILD gitea-1.11.6.ebuild 3690 BLAKE2B 0ff7475081d352a4e7877639633d19e3ae9705a5c5525589d3e7168ce2a5b65cf88f5ee21e49158ae8d65a16020f3f437490a7227aed319dea62225e59390c24 SHA512 8e8fd381a2a47e204b3b5f1d60cb9c5b16550ee5b3e2a2e225332e8e6e55fbd21e45e2388560ca42135a40e0ccf862defdc2ad3a7610841dba751a2279411469 -EBUILD gitea-9999.ebuild 3579 BLAKE2B 8bd251e0fe851dc894dbb49aa476f20760f74c245de2df7d9bd026da36115a3f5fabaf7af00f0137ffb363566a2f35b93c2276f1bf6b9c69a2d821f439c79500 SHA512 75836046d9d6e04a438e9128bf5b2cb997ec12edb1f3be9591ceea89374b550317b185e8d5b4bf125de824b25a1e5dbde136521f4b17531f1e97084b0eaf8451 +DIST gitea-1.12.1.tar.gz 135104234 BLAKE2B 36510e25e8c2cc1c718702a7cd0be74bbf5448beb33a90732599a4830b0899b37dfc9a58e3a8ffdb5037e93f185ba3b09a0ac7b8acd629c46b1982d6aeab1ec1 SHA512 6ba8a703272e611aac4c214cd818490a9615a9ab9b64ec22ec2c6331e865226324896f600218fb3b39cea7b6649456db7ff18e1857ece6964ab5d3c6d99c3aec +DIST gitea-src-1.11.8.tar.gz 68927493 BLAKE2B 4e1b1d201848227bd5d5bfac5bbddc291e2f14d7262bb2f8353131b6284520ecda3f844e81c23e95c5cd4ef17a6414e0b3c6adf6e6be5c59f7367c19a2e549d8 SHA512 13216a4d98211eb1a5c319992c9c253ce6f7a7a343ebfdca18802eb599f7300a3c23adbba94784f70ca604751ced5aac7d663a210885554c61a24857de79b6e6 +EBUILD gitea-1.11.8.ebuild 3698 BLAKE2B 8848e4f4e8b104d5c9d84fdf5ce2f06a14a42220dfc9e66845cfb5d546438f9ea2b4345e03f4687ecb0e935bc1c58f5b996657688dfb82a425acbd5519b500e7 SHA512 0c5b5da2758f4677b22e1b2910da9e1c859cb63d8229c52b3170dee2e92a027afc47836cc058f1840cccee08260f53224ed6f85bc099477537561e0b900107bb +EBUILD gitea-1.12.1.ebuild 3484 BLAKE2B 70484a7472390bced7d383df71160a22e3cecef96811aef7ea29f1e67f46b1e56886c97d5737c37df5b7e1ff341f9909fcb5f6c6ec863730a9479128dffb1230 SHA512 deca4c035589312c00727e997ef9e257bd1dd0450eec83b452d37acff82b562fa95ac06c7d8e6b8713d2d0f1b46fe7e9e6eb7d4db6b909b6c752ff28d5a38053 +EBUILD gitea-9999.ebuild 3235 BLAKE2B 893edb722e2f4de3054d8bc3744414a0dca088ecb9b1cfd25bd24a839f0da9653df401db84dfd46221d3d60b3a1010f48d1ff9a3528c5b8035717faf1be8d262 SHA512 5fbfdd2d1ee6bedbb70fd23180d0473d6ddee629ad06225298c4a170a5c3198896f663033cfc0db84b02098b181a2f0f29d120799e3c7cf222de175b29888e4a MISC metadata.xml 639 BLAKE2B ded4337596780b55640ce8db682ac7fcd8b6624147d6f9cf6190d41212b98f77d752b98eb4f6af7e6bbc5472bff5f3eb6ab016325e68e3f2b2284c5b4294d5a3 SHA512 5e6a76f08e5d2161192c35371caeb38f8dc972f478aca0f3f1025852c482f54be9b7ca30dbb1365ac5c7a9902534d74b05d7dc0f21109a752f0446ff5b4191e1 diff --git a/www-apps/gitea/files/1.12-fix-vendoring.patch b/www-apps/gitea/files/1.12-fix-vendoring.patch new file mode 100644 index 000000000000..9baff97307a0 --- /dev/null +++ b/www-apps/gitea/files/1.12-fix-vendoring.patch @@ -0,0 +1,13 @@ +diff --git a/vendor/modules.txt b/vendor/modules.txt +index efbc866..1c34104 100644 +--- a/vendor/modules.txt ++++ b/vendor/modules.txt +@@ -845,6 +845,8 @@ gopkg.in/yaml.v2 + # mvdan.cc/xurls/v2 v2.1.0 + ## explicit + mvdan.cc/xurls/v2 ++# src.techknowlogick.com/xgo v0.0.0-20200602060627-a09175ea9056 ++## explicit + # strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 + ## explicit + strk.kbt.io/projects/go/libravatar diff --git a/www-apps/gitea/gitea-1.11.6.ebuild b/www-apps/gitea/gitea-1.11.8.ebuild index 44802e089f92..555b0028a9ec 100644 --- a/www-apps/gitea/gitea-1.11.6.ebuild +++ b/www-apps/gitea/gitea-1.11.8.ebuild @@ -30,7 +30,7 @@ LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0" SLOT="0" IUSE="+acct build-client pam sqlite" -BDEPEND="dev-lang/go +BDEPEND="<dev-lang/go-1.14.0 build-client? ( >=net-libs/nodejs-10[npm] )" DEPEND="pam? ( sys-libs/pam )" RDEPEND="${DEPEND} diff --git a/www-apps/gitea/gitea-1.12.1.ebuild b/www-apps/gitea/gitea-1.12.1.ebuild new file mode 100644 index 000000000000..18b851d0c981 --- /dev/null +++ b/www-apps/gitea/gitea-1.12.1.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2020 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.ini.sample CONTRIBUTING.md README.md +) +FILECAPS=( + cap_net_bind_service+ep usr/bin/gitea +) +PATCHES=( + "${FILESDIR}/1.12-fix-vendoring.patch" +) + +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 + + 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.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-9999.ebuild b/www-apps/gitea/gitea-9999.ebuild index 0d1559ca4a39..672af6461ca6 100644 --- a/www-apps/gitea/gitea-9999.ebuild +++ b/www-apps/gitea/gitea-9999.ebuild @@ -2,70 +2,42 @@ # 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 fcaps golang-base tmpfiles systemd ${SCM} -unset SCM - -EGO_PN="code.gitea.io/gitea" +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${PV}/gitea-src-${PV}.tar.gz" + 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" - EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}" - has test ${FEATURES} && EGIT_MIN_CLONE_TYPE="mirror" + inherit git-r3 + S="${WORKDIR}/${P}" fi LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0" SLOT="0" IUSE="+acct pam sqlite" -BDEPEND="dev-lang/go - >=net-libs/nodejs-10[npm]" -DEPEND="pam? ( sys-libs/pam )" -RDEPEND="${DEPEND} +BDEPEND=">=net-libs/nodejs-10[npm]" +COMMON_DEPEND=" acct? ( acct-group/git - acct-user/git[gitea] - ) + 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 ) -FILECAPS=( cap_net_bind_service+ep usr/bin/gitea ) -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 -j1 "$@" -} +DOCS=( + custom/conf/app.ini.sample CONTRIBUTING.md README.md +) +FILECAPS=( + cap_net_bind_service+ep usr/bin/gitea +) src_prepare() { default @@ -89,27 +61,34 @@ src_prepare() { sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die fi - # Remove already build assets (like frontend part) - gitea_make clean-all -} + einfo "Remove tests which are known to fail with network-sandbox enabled." + rm ./modules/migrations/github_test.go || die -src_compile() { - gitea_make build + einfo "Remove tests which depend on gitea git-repo." + rm ./modules/git/blob_test.go || die + rm ./modules/git/repo_test.go || die } -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 +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}") - default + # -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 } src_install() { |