diff options
author | Austin English <wizardedit@gentoo.org> | 2016-05-03 14:03:54 -0500 |
---|---|---|
committer | Austin English <wizardedit@gentoo.org> | 2016-05-03 14:17:01 -0500 |
commit | dfe567177d7f561dc921497110e7f65b63701bb9 (patch) | |
tree | 443f3e7f69c272040dda6bab3b5105184e34f2b5 /net-proxy/http-replicator | |
parent | net-proxy/havp: remove old version (diff) | |
download | gentoo-dfe567177d7f561dc921497110e7f65b63701bb9.tar.gz gentoo-dfe567177d7f561dc921497110e7f65b63701bb9.tar.bz2 gentoo-dfe567177d7f561dc921497110e7f65b63701bb9.zip |
net-proxy/http-replicator: use #!/sbin/openrc-run instead of #!/sbin/runscript
Gentoo-Bug: https://bugs.gentoo.org/573846
Package-Manager: portage-2.2.26
Diffstat (limited to 'net-proxy/http-replicator')
4 files changed, 158 insertions, 4 deletions
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0.init b/net-proxy/http-replicator/files/http-replicator-3.0.init index 85f773ed7339..1aac72b7f0f3 100644 --- a/net-proxy/http-replicator/files/http-replicator-3.0.init +++ b/net-proxy/http-replicator/files/http-replicator-3.0.init @@ -1,5 +1,5 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Technologies, Inc. +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ diff --git a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init index b1eae998553e..21d1aede6c75 100644 --- a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init +++ b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init @@ -1,5 +1,5 @@ -#!/sbin/runscript -# Copyright 1999-2013 Gentoo Technologies, Inc. +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ diff --git a/net-proxy/http-replicator/http-replicator-3.0-r6.ebuild b/net-proxy/http-replicator/http-replicator-3.0-r6.ebuild new file mode 100644 index 000000000000..70b763efdccf --- /dev/null +++ b/net-proxy/http-replicator/http-replicator-3.0-r6.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +PYTHON_COMPAT=( python2_7 ) # not 2.6 bug #33907, not 3.0 bug #411083 +inherit eutils python-single-r1 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" + +PATCHES=( + "${FILESDIR}/http-replicator-3.0-sighup.patch" + "${FILESDIR}/http-replicator-3-unique-cache-name.patch" + "${FILESDIR}/http-replicator-3-missing-directory.patch" +) + +src_install(){ + python-single-r1_pkg_setup + + # Daemon and repcacheman into /usr/bin + python_scriptinto /usr/bin + python_doexe http-replicator + python_newexe "${FILESDIR}/http-replicator-3.0-repcacheman-0.44-r2" repcacheman.py + + exeinto /usr/bin + newexe "${FILESDIR}/http-replicator-3.0-callrepcacheman-0.1" repcacheman + + # 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 + + # 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() { + elog + ewarn "Before starting http-replicator, please follow the next few steps:" + elog "- Modify /etc/conf.d/http-replicator if required." + ewarn "- Run /usr/bin/repcacheman to set up the cache." + elog "- Add http_proxy=\"http://serveraddress:8080\" to make.conf on" + elog " the server as well as on the client machines." + elog "- Make sure FETCHCOMMAND adds the X-unique-cache-name header to" + elog " HTTP requests in make.conf (or maybe portage will add it to" + elog " the default make.globals someday). Example:" + elog ' FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" --header=\"X-unique-cache-name: \${FILE}\" \"\${URI}\""' + elog ' RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" --header=\"X-unique-cache-name: \${FILE}\" \"\${URI}\""' + elog "- Arrange to periodically run repcacheman on this server," + elog " to clean up the local /usr/portage/distfiles directory." + elog "- Arrange to periodically run something like the following" + elog " on this server. 'eclean' is in app-portage/gentoolkit." + elog " ( export DISTDIR=/var/cache/http-replicator/" + elog " eclean -i distfiles )" + elog "- Even with FETCHCOMMAND fixing most cases, occasionally" + elog " an older invalid version of a file may end up in the cache," + elog " causing checksum failures when portage tries to fetch" + elog " it. To recover, either use eclean (above), manually delete" + elog " the relevant file from the cache, or temporarily comment" + elog " out the http_proxy setting. Commenting only requires" + elog " access to client config, not server cache." + elog "- Make sure GENTOO_MIRRORS in /etc/portage/make.conf starts" + elog " with several good http mirrors." + elog + elog "For more information please refer to the following forum thread:" + elog " http://forums.gentoo.org/viewtopic-t-173226.html" + elog +} diff --git a/net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild b/net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild new file mode 100644 index 000000000000..607e3e2c11ab --- /dev/null +++ b/net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +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_foreach_impl python_doscript http-replicator + + newbin "${FILESDIR}"/${PN}-3.0-callrepcacheman-0.1 repcacheman + + python_foreach_impl python_domodule *.py + + python_foreach_impl python_newscript "${FILESDIR}"/${PN}-3.0-repcacheman-0.44-r2 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() { + echo + 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 " https://forums.gentoo.org/viewtopic-t-173226.html" + einfo + einfo "Starting with 4.x releases, the conf.d parameters have changed." + echo +} |