Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/http-replicator/
Date: Sat, 08 Oct 2016 10:30:38
Message-Id: 1475921596.821f1a72fa97d8980cbd354772aa6af08f3f227e.pacho@gentoo
1 commit: 821f1a72fa97d8980cbd354772aa6af08f3f227e
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 8 10:13:16 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 8 10:13:16 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=821f1a72
7
8 net-proxy/http-replicator: Fix python2 usage when python3 is default interpreter (#595434)
9
10 Package-Manager: portage-2.3.1
11
12 .../http-replicator/http-replicator-3.0-r7.ebuild | 85 ++++++++++++++++++++++
13 1 file changed, 85 insertions(+)
14
15 diff --git a/net-proxy/http-replicator/http-replicator-3.0-r7.ebuild b/net-proxy/http-replicator/http-replicator-3.0-r7.ebuild
16 new file mode 100644
17 index 00000000..827a718
18 --- /dev/null
19 +++ b/net-proxy/http-replicator/http-replicator-3.0-r7.ebuild
20 @@ -0,0 +1,85 @@
21 +# Copyright 1999-2016 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=6
26 +PYTHON_COMPAT=( python2_7 ) # not 2.6 bug #33907, not 3.0 bug #411083
27 +inherit eutils python-single-r1 systemd
28 +
29 +MY_P="${PN}_${PV}"
30 +
31 +DESCRIPTION="Proxy cache for Gentoo packages"
32 +HOMEPAGE="https://sourceforge.net/projects/http-replicator"
33 +SRC_URI="mirror://sourceforge/http-replicator/${MY_P}.tar.gz"
34 +S="${WORKDIR}/${MY_P}"
35 +
36 +LICENSE="GPL-2"
37 +SLOT="0"
38 +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
39 +
40 +PATCHES=(
41 + "${FILESDIR}/http-replicator-3.0-sighup.patch"
42 + "${FILESDIR}/http-replicator-3-unique-cache-name.patch"
43 + "${FILESDIR}/http-replicator-3-missing-directory.patch"
44 +)
45 +
46 +src_install(){
47 + python-single-r1_pkg_setup
48 +
49 + # Daemon and repcacheman into /usr/bin
50 + python_scriptinto /usr/bin
51 + python_doscript http-replicator
52 + python_newscript "${FILESDIR}/http-replicator-3.0-repcacheman-0.44-r2" repcacheman.py
53 +
54 + exeinto /usr/bin
55 + newexe "${FILESDIR}/http-replicator-3.0-callrepcacheman-0.1" repcacheman
56 +
57 + # init.d scripts
58 + newinitd "${FILESDIR}/http-replicator-3.0.init" http-replicator
59 + newconfd "${FILESDIR}/http-replicator-3.0.conf" http-replicator
60 +
61 + systemd_dounit "${FILESDIR}"/http-replicator.service
62 + systemd_install_serviced "${FILESDIR}"/http-replicator.service.conf
63 +
64 + # Docs
65 + dodoc README debian/changelog
66 +
67 + # Man Page - Not Gentooified yet
68 + doman http-replicator.1
69 +
70 + insinto /etc/logrotate.d
71 + newins debian/logrotate http-replicator
72 +}
73 +
74 +pkg_postinst() {
75 + elog
76 + ewarn "Before starting http-replicator, please follow the next few steps:"
77 + elog "- Modify /etc/conf.d/http-replicator if required."
78 + ewarn "- Run /usr/bin/repcacheman to set up the cache."
79 + elog "- Add http_proxy=\"http://serveraddress:8080\" to make.conf on"
80 + elog " the server as well as on the client machines."
81 + elog "- Make sure FETCHCOMMAND adds the X-unique-cache-name header to"
82 + elog " HTTP requests in make.conf (or maybe portage will add it to"
83 + elog " the default make.globals someday). Example:"
84 + elog ' FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" --header=\"X-unique-cache-name: \${FILE}\" \"\${URI}\""'
85 + elog ' RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" --header=\"X-unique-cache-name: \${FILE}\" \"\${URI}\""'
86 + elog "- Arrange to periodically run repcacheman on this server,"
87 + elog " to clean up the local /usr/portage/distfiles directory."
88 + elog "- Arrange to periodically run something like the following"
89 + elog " on this server. 'eclean' is in app-portage/gentoolkit."
90 + elog " ( export DISTDIR=/var/cache/http-replicator/"
91 + elog " eclean -i distfiles )"
92 + elog "- Even with FETCHCOMMAND fixing most cases, occasionally"
93 + elog " an older invalid version of a file may end up in the cache,"
94 + elog " causing checksum failures when portage tries to fetch"
95 + elog " it. To recover, either use eclean (above), manually delete"
96 + elog " the relevant file from the cache, or temporarily comment"
97 + elog " out the http_proxy setting. Commenting only requires"
98 + elog " access to client config, not server cache."
99 + elog "- Make sure GENTOO_MIRRORS in /etc/portage/make.conf starts"
100 + elog " with several good http mirrors."
101 + elog
102 + elog "For more information please refer to the following forum thread:"
103 + elog " http://forums.gentoo.org/viewtopic-t-173226.html"
104 + elog
105 +}