Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-proxy/http-replicator/, net-proxy/http-replicator/files/
Date: Tue, 03 May 2016 19:17:58
Message-Id: 1462303021.dfe567177d7f561dc921497110e7f65b63701bb9.wizardedit@gentoo
1 commit: dfe567177d7f561dc921497110e7f65b63701bb9
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 3 19:03:54 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Tue May 3 19:17:01 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfe56717
7
8 net-proxy/http-replicator: use #!/sbin/openrc-run instead of #!/sbin/runscript
9
10 Gentoo-Bug: https://bugs.gentoo.org/573846
11
12 Package-Manager: portage-2.2.26
13
14 .../http-replicator/files/http-replicator-3.0.init | 4 +-
15 .../files/http-replicator-4.0_alpha2-r3.init | 4 +-
16 .../http-replicator/http-replicator-3.0-r6.ebuild | 85 ++++++++++++++++++++++
17 .../http-replicator-4.0_alpha2-r5.ebuild | 69 ++++++++++++++++++
18 4 files changed, 158 insertions(+), 4 deletions(-)
19
20 diff --git a/net-proxy/http-replicator/files/http-replicator-3.0.init b/net-proxy/http-replicator/files/http-replicator-3.0.init
21 index 85f773e..1aac72b 100644
22 --- a/net-proxy/http-replicator/files/http-replicator-3.0.init
23 +++ b/net-proxy/http-replicator/files/http-replicator-3.0.init
24 @@ -1,5 +1,5 @@
25 -#!/sbin/runscript
26 -# Copyright 1999-2004 Gentoo Technologies, Inc.
27 +#!/sbin/openrc-run
28 +# Copyright 1999-2016 Gentoo Foundation
29 # Distributed under the terms of the GNU General Public License v2
30 # $Id$
31
32
33 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
34 index b1eae99..21d1aed 100644
35 --- a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init
36 +++ b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init
37 @@ -1,5 +1,5 @@
38 -#!/sbin/runscript
39 -# Copyright 1999-2013 Gentoo Technologies, Inc.
40 +#!/sbin/openrc-run
41 +# Copyright 1999-2016 Gentoo Foundation
42 # Distributed under the terms of the GNU General Public License v2
43 # $Id$
44
45
46 diff --git a/net-proxy/http-replicator/http-replicator-3.0-r6.ebuild b/net-proxy/http-replicator/http-replicator-3.0-r6.ebuild
47 new file mode 100644
48 index 0000000..70b763e
49 --- /dev/null
50 +++ b/net-proxy/http-replicator/http-replicator-3.0-r6.ebuild
51 @@ -0,0 +1,85 @@
52 +# Copyright 1999-2016 Gentoo Foundation
53 +# Distributed under the terms of the GNU General Public License v2
54 +# $Id$
55 +
56 +EAPI=6
57 +PYTHON_COMPAT=( python2_7 ) # not 2.6 bug #33907, not 3.0 bug #411083
58 +inherit eutils python-single-r1 systemd
59 +
60 +MY_P="${PN}_${PV}"
61 +
62 +DESCRIPTION="Proxy cache for Gentoo packages"
63 +HOMEPAGE="http://sourceforge.net/projects/http-replicator"
64 +SRC_URI="mirror://sourceforge/http-replicator/${MY_P}.tar.gz"
65 +S="${WORKDIR}/${MY_P}"
66 +
67 +LICENSE="GPL-2"
68 +SLOT="0"
69 +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
70 +
71 +PATCHES=(
72 + "${FILESDIR}/http-replicator-3.0-sighup.patch"
73 + "${FILESDIR}/http-replicator-3-unique-cache-name.patch"
74 + "${FILESDIR}/http-replicator-3-missing-directory.patch"
75 +)
76 +
77 +src_install(){
78 + python-single-r1_pkg_setup
79 +
80 + # Daemon and repcacheman into /usr/bin
81 + python_scriptinto /usr/bin
82 + python_doexe http-replicator
83 + python_newexe "${FILESDIR}/http-replicator-3.0-repcacheman-0.44-r2" repcacheman.py
84 +
85 + exeinto /usr/bin
86 + newexe "${FILESDIR}/http-replicator-3.0-callrepcacheman-0.1" repcacheman
87 +
88 + # init.d scripts
89 + newinitd "${FILESDIR}/http-replicator-3.0.init" http-replicator
90 + newconfd "${FILESDIR}/http-replicator-3.0.conf" http-replicator
91 +
92 + systemd_dounit "${FILESDIR}"/http-replicator.service
93 + systemd_install_serviced "${FILESDIR}"/http-replicator.service.conf
94 +
95 + # Docs
96 + dodoc README debian/changelog
97 +
98 + # Man Page - Not Gentooified yet
99 + doman http-replicator.1
100 +
101 + insinto /etc/logrotate.d
102 + newins debian/logrotate http-replicator
103 +}
104 +
105 +pkg_postinst() {
106 + elog
107 + ewarn "Before starting http-replicator, please follow the next few steps:"
108 + elog "- Modify /etc/conf.d/http-replicator if required."
109 + ewarn "- Run /usr/bin/repcacheman to set up the cache."
110 + elog "- Add http_proxy=\"http://serveraddress:8080\" to make.conf on"
111 + elog " the server as well as on the client machines."
112 + elog "- Make sure FETCHCOMMAND adds the X-unique-cache-name header to"
113 + elog " HTTP requests in make.conf (or maybe portage will add it to"
114 + elog " the default make.globals someday). Example:"
115 + elog ' FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" --header=\"X-unique-cache-name: \${FILE}\" \"\${URI}\""'
116 + elog ' RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O \"\${DISTDIR}/\${FILE}\" --header=\"X-unique-cache-name: \${FILE}\" \"\${URI}\""'
117 + elog "- Arrange to periodically run repcacheman on this server,"
118 + elog " to clean up the local /usr/portage/distfiles directory."
119 + elog "- Arrange to periodically run something like the following"
120 + elog " on this server. 'eclean' is in app-portage/gentoolkit."
121 + elog " ( export DISTDIR=/var/cache/http-replicator/"
122 + elog " eclean -i distfiles )"
123 + elog "- Even with FETCHCOMMAND fixing most cases, occasionally"
124 + elog " an older invalid version of a file may end up in the cache,"
125 + elog " causing checksum failures when portage tries to fetch"
126 + elog " it. To recover, either use eclean (above), manually delete"
127 + elog " the relevant file from the cache, or temporarily comment"
128 + elog " out the http_proxy setting. Commenting only requires"
129 + elog " access to client config, not server cache."
130 + elog "- Make sure GENTOO_MIRRORS in /etc/portage/make.conf starts"
131 + elog " with several good http mirrors."
132 + elog
133 + elog "For more information please refer to the following forum thread:"
134 + elog " http://forums.gentoo.org/viewtopic-t-173226.html"
135 + elog
136 +}
137
138 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
139 new file mode 100644
140 index 0000000..607e3e2
141 --- /dev/null
142 +++ b/net-proxy/http-replicator/http-replicator-4.0_alpha2-r5.ebuild
143 @@ -0,0 +1,69 @@
144 +# Copyright 1999-2016 Gentoo Foundation
145 +# Distributed under the terms of the GNU General Public License v2
146 +# $Id$
147 +
148 +EAPI="5"
149 +
150 +PYTHON_COMPAT=( python2_7 )
151 +
152 +inherit eutils python-r1 systemd
153 +
154 +MY_P="${PN}_${PV/_/}"
155 +
156 +DESCRIPTION="Proxy cache for Gentoo packages"
157 +HOMEPAGE="http://sourceforge.net/projects/http-replicator"
158 +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
159 +
160 +LICENSE="GPL-2"
161 +SLOT="0"
162 +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
163 +
164 +S="${WORKDIR}/${MY_P}"
165 +
166 +# Tests downloads files as well as breaks, should be turned into local tests.
167 +RESTRICT="test"
168 +
169 +src_prepare() {
170 + epatch "${FILESDIR}"/${PN}-4.0_alpha2-r3-pid.patch
171 +}
172 +
173 +src_test() {
174 + ./unit-test && die
175 +}
176 +
177 +src_install(){
178 + python_foreach_impl python_doscript http-replicator
179 +
180 + newbin "${FILESDIR}"/${PN}-3.0-callrepcacheman-0.1 repcacheman
181 +
182 + python_foreach_impl python_domodule *.py
183 +
184 + python_foreach_impl python_newscript "${FILESDIR}"/${PN}-3.0-repcacheman-0.44-r2 repcacheman.py
185 +
186 + newinitd "${FILESDIR}"/${PN}-4.0_alpha2-r3.init http-replicator
187 + newconfd "${FILESDIR}"/${PN}-4.0_alpha2-r2.conf http-replicator
188 +
189 + systemd_dounit "${FILESDIR}"/http-replicator.service
190 + systemd_install_serviced "${FILESDIR}"/http-replicator.service.conf
191 +
192 + dodoc README.user README.devel RELNOTES
193 +}
194 +
195 +pkg_postinst() {
196 + echo
197 + einfo "Before starting ${PN}, please follow the next few steps:"
198 + einfo
199 + einfo "- Modify /etc/conf.d/${PN} if required."
200 + einfo "- Run \`repcacheman\` to set up the cache."
201 + einfo "- Add HTTP_PROXY=\"http://serveraddress:8080\" to make.conf on"
202 + einfo " the server as well as on the client machines."
203 + einfo "- Make sure GENTOO_MIRRORS in /etc/portage/make.conf"
204 + einfo " starts with several good HTTP mirrors."
205 + einfo
206 + einfo "For more information please refer to the following forum thread:"
207 + einfo
208 + einfo " https://forums.gentoo.org/viewtopic-t-173226.html"
209 + einfo
210 + einfo "Starting with 4.x releases, the conf.d parameters have changed."
211 + echo
212 +}