www-apps/gitea: Added option to allow binding to privileged ports
Some checks failed
the build failed
Some checks failed
the build failed
Package-Manager: Portage-2.3.40, Repoman-2.3.9 Manifest-Sign-Key: 3555266864CA6D7FF45AA6E7CFC39497F1B26E07
This commit is contained in:
parent
26f8381dde
commit
2d54d732d4
|
@ -8,12 +8,13 @@ AUX gitea.initd-r1 688 BLAKE2B eb2341dee53f3fd92c49137855615d9ae7ca77efc396e2d2e
|
||||||
AUX gitea.logrotated 87 BLAKE2B 373830ddd6eed0ce2f0f7b1dab14e4a253e5a56a73f477cfadbc6deec373846d4df2d697735391581771699d5a6513acb0e14a446873de01eba10d19e3a6bd88 SHA512 798f3fc33026f19dd31ffa78b9b1ed313d7b82b19c047f509e896c1798b2925a1bb7c4998d98a6b47e728979bf7132fb1c2a80eb7fda096a763d6791631cb6d4
|
AUX gitea.logrotated 87 BLAKE2B 373830ddd6eed0ce2f0f7b1dab14e4a253e5a56a73f477cfadbc6deec373846d4df2d697735391581771699d5a6513acb0e14a446873de01eba10d19e3a6bd88 SHA512 798f3fc33026f19dd31ffa78b9b1ed313d7b82b19c047f509e896c1798b2925a1bb7c4998d98a6b47e728979bf7132fb1c2a80eb7fda096a763d6791631cb6d4
|
||||||
AUX gitea.service 472 BLAKE2B 4c728e2987d0c0a86e65d4b9c1a59f6193ff8a3f9b066991a06f495ad1c5586b3497c71fca1cce5b65f167af09343e7bf3215ee5e8fdefa539e384198d2d88d6 SHA512 6666fe3b4cdbb78a58db4a6bf47a15e6be9ab30b666c6eb77a9e8a002d8c0abd510fc75ef463a11ee6892ab12c98943774616072cb64fd9f2fa42ff8f676aa95
|
AUX gitea.service 472 BLAKE2B 4c728e2987d0c0a86e65d4b9c1a59f6193ff8a3f9b066991a06f495ad1c5586b3497c71fca1cce5b65f167af09343e7bf3215ee5e8fdefa539e384198d2d88d6 SHA512 6666fe3b4cdbb78a58db4a6bf47a15e6be9ab30b666c6eb77a9e8a002d8c0abd510fc75ef463a11ee6892ab12c98943774616072cb64fd9f2fa42ff8f676aa95
|
||||||
DIST gitea-1.5.0.tar.gz 18847969 BLAKE2B 59da59a3d08c64c066204f4764f14c4b257495aba7800e9d6ebfcab5ad12402ce6cd17f14ec2187f994b46d83cf587422d7b711ceea4a99cc366105bd374daa1 SHA512 06cbcadc138496abf500b8d219d0770c5f6b8af419f9c3733596ee7e20cb50235815433979b2b1daa0a6117e6eb84de9678667236549e018079c49b793f22d68
|
DIST gitea-1.5.0.tar.gz 18847969 BLAKE2B 59da59a3d08c64c066204f4764f14c4b257495aba7800e9d6ebfcab5ad12402ce6cd17f14ec2187f994b46d83cf587422d7b711ceea4a99cc366105bd374daa1 SHA512 06cbcadc138496abf500b8d219d0770c5f6b8af419f9c3733596ee7e20cb50235815433979b2b1daa0a6117e6eb84de9678667236549e018079c49b793f22d68
|
||||||
|
EBUILD gitea-1.5.0-r1.ebuild 2078 BLAKE2B 49275496ff19a765c9cbf5735ac5e845e8929cd5feaa06f86ecafc851904c4eee3c290e54efe3d1253a5a6ab59342631f557194c9a18b61ce05df838e366e6c2 SHA512 0b421237d185f4117a07782ebcdc8908025e87b2f680065bdccc79ab6448a5fcae69497b80d118586842003ce4ac59939fa21be549fd4562b20ec13782c427d5
|
||||||
EBUILD gitea-1.5.0.ebuild 1896 BLAKE2B 026de80a45a7c8460a337074552348a008168329a6004095e35b2ff61de4b10c77131f35b3b6c471975c8bd80826cd9aa261ad914130eb8133446a335bc2211d SHA512 79523a1d09df95268a462c3a210e71ee4a1c485aa290af5d4d38c163f95400681b207fe6c3bab7c9985c6371f73be4779f4ccaa52db2ec60a3a0c7ebc1ec3362
|
EBUILD gitea-1.5.0.ebuild 1896 BLAKE2B 026de80a45a7c8460a337074552348a008168329a6004095e35b2ff61de4b10c77131f35b3b6c471975c8bd80826cd9aa261ad914130eb8133446a335bc2211d SHA512 79523a1d09df95268a462c3a210e71ee4a1c485aa290af5d4d38c163f95400681b207fe6c3bab7c9985c6371f73be4779f4ccaa52db2ec60a3a0c7ebc1ec3362
|
||||||
MISC metadata.xml 248 BLAKE2B 0f4a45d414249f9410a61d8545ba052db41e3d74516e34bff0ca5547cae55db7eefffb2c23d840c979bdea0b927da36f7a56441cbc6053291d65bd39af2421bd SHA512 0f6384333cf38e52e6a67db43f3a78723d2a0d3446da27e7972f15244d96ae41f0e428d937538d4fa52aa70dc9c92920672d4e237b481dbbdff1d9d8c325b33d
|
MISC metadata.xml 363 BLAKE2B ab235f6b884680f4d064cae732d35c801a22621f6198fa5ac602cd97a479c1799105605449f1f36319646db463daa1399d94c122e73ef2ebd6045efd0a94e990 SHA512 64ff18a1d82b7774385df7708b4bf6201e2508c961cb1fa2dc4de2a8a0fc477a0d388782dbbf50befa7f4787f5d5fb6a986a4631009cf8dcebe4c83f17405865
|
||||||
-----BEGIN PGP SIGNATURE-----
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCW26MjgAKCRDPw5SX8bJu
|
iHUEAREIAB0WIQQ1VSZoZMptf/RapufPw5SX8bJuBwUCW4aBzwAKCRDPw5SX8bJu
|
||||||
B1gXAP90vyDYsNAVGVYlO0Na6R6WM///1oib8XzEeoY2N1h62QD+PpN1WdLSm/2w
|
BxrBAQCLX2nbxxmvkUT7cY2WQWpWQRe6i20bjS6rmbxrh5aELQD8CYi2uFnMM5CH
|
||||||
ycBFXL9H1cnQqwP29FQOZ1T9hd38UdA=
|
h49T5E8W+1SHi1vLgm/JXX+0UYGf0pU=
|
||||||
=HbOC
|
=d6es
|
||||||
-----END PGP SIGNATURE-----
|
-----END PGP SIGNATURE-----
|
||||||
|
|
67
www-apps/gitea/gitea-1.5.0-r1.ebuild
Normal file
67
www-apps/gitea/gitea-1.5.0-r1.ebuild
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
# Copyright 1999-2018 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
|
EAPI=6
|
||||||
|
inherit user systemd golang-build golang-vcs-snapshot
|
||||||
|
|
||||||
|
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"
|
||||||
|
IUSE="-allow_privileged_ports"
|
||||||
|
|
||||||
|
DEPEND="dev-go/go-bindata
|
||||||
|
allow_privileged_ports? ( sys-libs/libcap )"
|
||||||
|
RDEPEND="dev-vcs/git"
|
||||||
|
|
||||||
|
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="-fno-PIC" 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
|
||||||
|
newins custom/conf/app.ini.sample app.ini.example
|
||||||
|
popd || die
|
||||||
|
newinitd "${FILESDIR}"/gitea.initd-r1 gitea
|
||||||
|
newconfd "${FILESDIR}"/gitea.confd gitea
|
||||||
|
keepdir /var/log/gitea /var/lib/gitea/data
|
||||||
|
fowners -R git:git /var/log/gitea /var/lib/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
|
||||||
|
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
|
||||||
|
|
||||||
|
if use allow_privileged_ports; then
|
||||||
|
ewarn test
|
||||||
|
setcap CAP_NET_BIND_SERVICE=+ep "${EROOT}/usr/bin/gitea"
|
||||||
|
fi
|
||||||
|
}
|
|
@ -5,4 +5,7 @@
|
||||||
<email>gentoo@tastytea.de</email>
|
<email>gentoo@tastytea.de</email>
|
||||||
<name>tastytea</name>
|
<name>tastytea</name>
|
||||||
</maintainer>
|
</maintainer>
|
||||||
|
<use>
|
||||||
|
<flag name="allow_privileged_ports">Allow binding to privileged ports (less than 1024)</flag>
|
||||||
|
</use>
|
||||||
</pkgmetadata>
|
</pkgmetadata>
|
||||||
|
|
Reference in New Issue
Block a user