diff options
author | Pacho Ramos <pacho@gentoo.org> | 2013-12-22 11:07:28 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2013-12-22 11:07:28 +0000 |
commit | a111a8fd56c6d94990e32b960aa621f5d5899b36 (patch) | |
tree | 5718b0daf5bf2a439bebe17782630517accee5ac /net-proxy | |
parent | Version bump. (diff) | |
download | gentoo-2-a111a8fd56c6d94990e32b960aa621f5d5899b36.tar.gz gentoo-2-a111a8fd56c6d94990e32b960aa621f5d5899b36.tar.bz2 gentoo-2-a111a8fd56c6d94990e32b960aa621f5d5899b36.zip |
Add unit file (#492502 by Joerg Neikes)
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'net-proxy')
5 files changed, 167 insertions, 1 deletions
diff --git a/net-proxy/http-replicator/ChangeLog b/net-proxy/http-replicator/ChangeLog index a10c3f25111b..d2447f213233 100644 --- a/net-proxy/http-replicator/ChangeLog +++ b/net-proxy/http-replicator/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-proxy/http-replicator # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/http-replicator/ChangeLog,v 1.40 2013/06/10 14:01:46 tomwij Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-proxy/http-replicator/ChangeLog,v 1.41 2013/12/22 11:07:28 pacho Exp $ + +*http-replicator-4.0_alpha2-r4 (22 Dec 2013) +*http-replicator-3.0-r4 (22 Dec 2013) + + 22 Dec 2013; Pacho Ramos <pacho@gentoo.org> +files/http-replicator.service, + +files/http-replicator.service.conf, +http-replicator-3.0-r4.ebuild, + +http-replicator-4.0_alpha2-r4.ebuild: + Add unit file (#492502 by Joerg Neikes) *http-replicator-4.0_alpha2-r3 (10 Jun 2013) diff --git a/net-proxy/http-replicator/files/http-replicator.service b/net-proxy/http-replicator/files/http-replicator.service new file mode 100644 index 000000000000..6a2a7e5f5dff --- /dev/null +++ b/net-proxy/http-replicator/files/http-replicator.service @@ -0,0 +1,11 @@ +[Unit] +Description=http-replicator daemon +After=network.target + +[Service] +ExecStart=/usr/bin/http-replicator -s -f \ + --dir /var/cache/http-replicator --user portage --log /var/log/http-replicator.log \ + $DAEMON_OPTS + +[Install] +WantedBy=multi-user.target diff --git a/net-proxy/http-replicator/files/http-replicator.service.conf b/net-proxy/http-replicator/files/http-replicator.service.conf new file mode 100644 index 000000000000..da7445d080c4 --- /dev/null +++ b/net-proxy/http-replicator/files/http-replicator.service.conf @@ -0,0 +1,3 @@ +# Set various parameters for http-replicator +[Service] +Environment="DAEMON_OPTS= --alias /usr/portage/packages:packages --ip 192.168.*.* --ip 10.*.*.* --port 8080" diff --git a/net-proxy/http-replicator/http-replicator-3.0-r4.ebuild b/net-proxy/http-replicator/http-replicator-3.0-r4.ebuild new file mode 100644 index 000000000000..1c0ccfcb9c3b --- /dev/null +++ b/net-proxy/http-replicator/http-replicator-3.0-r4.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/http-replicator/http-replicator-3.0-r4.ebuild,v 1.1 2013/12/22 11:07:28 pacho Exp $ + +EAPI=4 +PYTHON_DEPEND="2:2.7:2.7" # not 2.6 bug #33907, not 3.0 bug #411083 +inherit eutils python systemd + +MY_P="${PN}_${PV}" + +DESCRIPTION="Proxy cache for Gentoo packages" +HOMEPAGE="http://sourceforge.net/projects/http-replicator" +SRC_URI="mirror://sourceforge/http-replicator/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_compile() { + epatch "${FILESDIR}/http-replicator-3.0-sighup.patch" + einfo "No compilation necessary" +} + +src_install(){ + # Daemon and repcacheman into /usr/bin + exeinto /usr/bin + doexe http-replicator + newexe "${FILESDIR}/http-replicator-3.0-callrepcacheman-0.1" repcacheman + newexe "${FILESDIR}/http-replicator-3.0-repcacheman-0.44-r2" repcacheman.py + + # init.d scripts + newinitd "${FILESDIR}/http-replicator-3.0.init" http-replicator + newconfd "${FILESDIR}/http-replicator-3.0.conf" http-replicator + + systemd_dounit "${FILESDIR}"/http-replicator.service + systemd_install_serviced "${FILESDIR}"/http-replicator.service.conf + + # not 2.6 bug #33907, not 3.0 bug #411083 + python_convert_shebangs -r 2.7 "${ED}" + + # Docs + dodoc README debian/changelog + + # Man Page - Not Gentooified yet + doman http-replicator.1 + + insinto /etc/logrotate.d + newins debian/logrotate http-replicator +} + +pkg_postinst() { + einfo + einfo "Before starting http-replicator, please follow the next few steps:" + einfo "- modify /etc/conf.d/http-replicator if required" + einfo "- run /usr/bin/repcacheman to set up the cache" + einfo "- add http_proxy=\"http://serveraddress:8080\" to make.conf on" + einfo " the server as well as on the client machines" + einfo "- make sure GENTOO_MIRRORS in /etc/make.conf starts with several" + einfo " good http mirrors" + einfo + einfo "For more information please refer to the following forum thread:" + einfo " http://forums.gentoo.org/viewtopic-t-173226.html" + einfo +} diff --git a/net-proxy/http-replicator/http-replicator-4.0_alpha2-r4.ebuild b/net-proxy/http-replicator/http-replicator-4.0_alpha2-r4.ebuild new file mode 100644 index 000000000000..d370b71af71e --- /dev/null +++ b/net-proxy/http-replicator/http-replicator-4.0_alpha2-r4.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/http-replicator/http-replicator-4.0_alpha2-r4.ebuild,v 1.1 2013/12/22 11:07:28 pacho Exp $ + +EAPI="5" + +# Not 2.6, see bug #33907; not 3.0, see bug #411083. +PYTHON_COMPAT=( python2_7 ) + +inherit eutils python-r1 systemd + +MY_P="${PN}_${PV/_/}" + +DESCRIPTION="Proxy cache for Gentoo packages" +HOMEPAGE="http://sourceforge.net/projects/http-replicator" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86" + +S="${WORKDIR}/${MY_P}" + +# Tests downloads files as well as breaks, should be turned into local tests. +RESTRICT="test" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-4.0_alpha2-r3-pid.patch +} + +src_test() { + ./unit-test && die +} + +src_install(){ + python_export python2_7 EPYTHON PYTHON PYTHON_SITEDIR + + python_scriptinto /usr/bin + python_doscript http-replicator + + exeinto /usr/bin + newexe "${FILESDIR}"/${PN}-3.0-callrepcacheman-0.1 repcacheman + + python_domodule *.py + + cp "${FILESDIR}"/${PN}-3.0-repcacheman-0.44-r2 repcacheman.py || die + python_doscript repcacheman.py + + newinitd "${FILESDIR}"/${PN}-4.0_alpha2-r3.init http-replicator + newconfd "${FILESDIR}"/${PN}-4.0_alpha2-r2.conf http-replicator + + systemd_dounit "${FILESDIR}"/http-replicator.service + systemd_install_serviced "${FILESDIR}"/http-replicator.service.conf + + dodoc README.user README.devel RELNOTES +} + +pkg_postinst() { + einfo + einfo "Before starting ${PN}, please follow the next few steps:" + einfo + einfo "- Modify /etc/conf.d/${PN} if required." + einfo "- Run \`repcacheman\` to set up the cache." + einfo "- Add HTTP_PROXY=\"http://serveraddress:8080\" to make.conf on" + einfo " the server as well as on the client machines." + einfo "- Make sure GENTOO_MIRRORS in /etc/portage/make.conf" + einfo " starts with several good HTTP mirrors." + einfo + einfo "For more information please refer to the following forum thread:" + einfo + einfo " http://forums.gentoo.org/viewtopic-t-173226.html" + einfo + einfo "Starting with 4.x releases, the conf.d parameters have changed." + einfo +} |