* [gentoo-commits] repo/gentoo:master commit in: net-proxy/http-replicator/files/, net-proxy/http-replicator/
@ 2019-02-28 12:11 Tony Vroon
0 siblings, 0 replies; 2+ messages in thread
From: Tony Vroon @ 2019-02-28 12:11 UTC (permalink / raw
To: gentoo-commits
commit: 97f0d18a976f63155e49686779c9eb75d539fa8a
Author: Tony Vroon <chainsaw <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 28 12:03:28 2019 +0000
Commit: Tony Vroon <chainsaw <AT> gentoo <DOT> org>
CommitDate: Thu Feb 28 12:03:28 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97f0d18a
net-proxy/http-replicator: Revert 3.0 branch removal
This reverts commit 3b8b8f6ec45e0220e5b841c96f89f52c6c5e02a5.
The 4.0 branch does not implement --alias which means it is not a
drop-in replacement to 3.0 in all cases.
Please speak to me or file me a bug if you have any change requirements
for the 3.x branch ebuilds. I will action them.
Requested-By: Matthew Ogilvie
Signed-Off-By: Tony Vroon <chainsaw <AT> gentoo.org>
Closes: https://bugs.gentoo.org/676758
net-proxy/http-replicator/Manifest | 1 +
.../http-replicator-3-missing-directory.patch | 51 ++++++++++++
.../http-replicator-3-unique-cache-name.patch | 31 ++++++++
.../files/http-replicator-3.0-sighup.patch | 20 +++++
.../http-replicator/files/http-replicator-3.0.conf | 46 +++++++++++
.../http-replicator/files/http-replicator-3.0.init | 20 +++++
.../http-replicator/http-replicator-3.0-r7.ebuild | 93 ++++++++++++++++++++++
7 files changed, 262 insertions(+)
diff --git a/net-proxy/http-replicator/Manifest b/net-proxy/http-replicator/Manifest
index 8c075058ba4..460a0f3b65b 100644
--- a/net-proxy/http-replicator/Manifest
+++ b/net-proxy/http-replicator/Manifest
@@ -1 +1,2 @@
+DIST http-replicator_3.0.tar.gz 39291 BLAKE2B a97d8b6b32f5d4ca4feefa9abaa7da7cb6570f76566c79d7371134c0edd74b2333a02480deff02fa1bf5b6cd6f2bfbfe4aaa649633d70bd2efbdd22701422651 SHA512 d98a608c38201db6f2d8ba809a4777ab5588f5ed395882bdf542c2788df1770c61a2de160604c09297d847f2c73463ba0530d7f2c2e482467f8e8f35be068d57
DIST http-replicator_4.0alpha2.tgz 27575 BLAKE2B 48138bc8fa9695ddb31ce89c4638adda4a1d1b58c904cd98d0ee1dbab006f79ef7d19495db8eb4de0113f8e45da425950524c48ec9e3e864d8595ccdef9f7cfa SHA512 437e0cc881af0cb8f84bfd1366bb6edeee4f76112c4b2ac2af4bcb8809462852b96e9c99e04c8f370492c9e1eb33ddc68a85c4f09b073694242cd6c05b4d3a6c
diff --git a/net-proxy/http-replicator/files/http-replicator-3-missing-directory.patch b/net-proxy/http-replicator/files/http-replicator-3-missing-directory.patch
new file mode 100644
index 00000000000..37c2ce2361f
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3-missing-directory.patch
@@ -0,0 +1,51 @@
+Author: Matthew Ogilvie
+Date: Sat Jan 17 09:24:34 2015 -0700
+
+ add some suggestions to the missing-directory error message
+
+ Also wait until directory confirmed before forking.
+
+ See gentoo bug 502574 and bug 442874
+
+diff --git a/http-replicator b/http-replicator
+index bbc163c..81e254d 100755
+--- a/http-replicator
++++ b/http-replicator
+@@ -636,13 +636,6 @@ def main ():
+ parser.error('user %r does not exist' % options.user)
+ except OSError:
+ parser.error('no permission for changing to user %r' % options.user)
+- pid = os.fork() # fork process
+- if pid: # parent process
+- pidfile.write(str(pid)) # store child's pid
+- pidfile.close()
+- return
+- else:
+- signal.signal(signal.SIGHUP, signal.SIG_IGN)
+ else:
+ handler = logging.StreamHandler(sys.stdout) # log to stdout
+ handler.setFormatter(logging.Formatter('%(levelname)s: %(name)s %(message)s'))
+@@ -651,10 +644,22 @@ def main ():
+ try:
+ os.chdir(options.dir) # change to cache directory
+ except OSError:
+- parser.error('invalid directory %r' % options.dir)
++ parser.error('invalid directory %r\n' \
++ 'Try running repcacheman, and/or see\n' \
++ 'http://forums.gentoo.org/viewtopic-t-173226.html' \
++ % options.dir)
+ if not os.access(os.curdir, os.R_OK | os.W_OK): # check permissions for cache directory
+ parser.error('no read/write permission for directory %r' % options.dir)
+
++ if options.daemon:
++ pid = os.fork() # fork process
++ if pid: # parent process
++ pidfile.write(str(pid)) # store child's pid
++ pidfile.close()
++ return
++ else:
++ signal.signal(signal.SIGHUP, signal.SIG_IGN)
++
+ sys.stdout = sys.stderr = open('/dev/null', 'w') # redirect all output to bit bucket
+ logging.root.name = 'HttpReplicator'
+ try:
diff --git a/net-proxy/http-replicator/files/http-replicator-3-unique-cache-name.patch b/net-proxy/http-replicator/files/http-replicator-3-unique-cache-name.patch
new file mode 100644
index 00000000000..3ad0529ed16
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3-unique-cache-name.patch
@@ -0,0 +1,31 @@
+Author: Matthew Ogilvie
+Date: Sun Dec 28 20:14:15 2014 -0700
+
+ honor x-unique-cache-name header in flat mode, if present
+
+ This allows things like different versions of the adobe-flash
+ downloader that are given different names in a flat download
+ directory (like in gentoo) to work in an http-replicator cache
+ as well. As long as the fetcher passes the custom name through
+ the experimental header...
+
+ See gentoo bug # 442874
+
+diff --git a/http-replicator b/http-replicator
+index 19ae427..befe9f2 100755
+--- a/http-replicator
++++ b/http-replicator
+@@ -311,7 +311,12 @@ class HttpClient (Http):
+ self.log.info('requested range: bytes %s to %s' % self.range) # log request
+
+ head = ''
+- for tail in self.path.split('/'): # iterate over items in path
++ adjUrlPath = self.path
++ if not self.direct and self.flat:
++ uniqueCacheName = body.get('x-unique-cache-name')
++ if uniqueCacheName:
++ adjUrlPath = uniqueCacheName
++ for tail in adjUrlPath.split('/'): # iterate over items in path
+ head = os.path.join(head, tail) # build target path
+ if head in self.alias: # path up till now hos an alias
+ head = self.alias[head] # replace by alias
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0-sighup.patch b/net-proxy/http-replicator/files/http-replicator-3.0-sighup.patch
new file mode 100644
index 00000000000..969bbc91f9d
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3.0-sighup.patch
@@ -0,0 +1,20 @@
+--- a/http-replicator 2007-07-09 20:09:44.000000000 +0200
++++ b/http-replicator 2007-07-09 20:11:48.433913445 +0200
+@@ -5,7 +5,7 @@
+ # Because of this the server runs as a single process, multiplexing I/O with its various client and server connections within a single process/thread.
+ # According to the readme <http://www.nightmare.com/medusa/README.html> this means it is capable of smoother and higher performance than most other servers, while placing a dramatically reduced load on the server machine.
+
+-import asyncore, socket, os, time, calendar, sys, re, optparse, logging
++import asyncore, socket, os, time, calendar, sys, re, optparse, logging, signal
+
+ # LISTENER
+ #
+@@ -636,6 +636,8 @@
+ pidfile.write(str(pid)) # store child's pid
+ pidfile.close()
+ return
++ else:
++ signal.signal(signal.SIGHUP, signal.SIG_IGN)
+ else:
+ handler = logging.StreamHandler(sys.stdout) # log to stdout
+ handler.setFormatter(logging.Formatter('%(levelname)s: %(name)s %(message)s'))
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0.conf b/net-proxy/http-replicator/files/http-replicator-3.0.conf
new file mode 100644
index 00000000000..35671fd262c
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3.0.conf
@@ -0,0 +1,46 @@
+## Config file for http-replicator
+## sourced by init scripts automatically
+## GENERAL_OPTS used by repcacheman
+## DAEMON_OPTS used by http-replicator
+
+
+## Set the cache dir
+GENERAL_OPTS="--dir /var/cache/http-replicator"
+
+## Change UID/GID to user after opening the log and pid file.
+## 'user' must have read/write access to cache dir:
+GENERAL_OPTS="$GENERAL_OPTS --user portage"
+
+## Don't change or comment this out:
+DAEMON_OPTS="$GENERAL_OPTS"
+
+## Do you need a proxy to reach the internet?
+## This will forward requests to an external proxy server:
+## Use one of the following, not both:
+#DAEMON_OPTS="$DAEMON_OPTS --external somehost:1234"
+#DAEMON_OPTS="$DAEMON_OPTS --external username:password@host:port"
+
+## Local dir to serve clients. Great for serving binary packages
+## See PKDIR and PORTAGE_BINHOST settings in 'man make.conf'
+## --alias /path/to/serve:location will make /path/to/serve
+## browsable at http://http-replicator.com:port/location
+DAEMON_OPTS="$DAEMON_OPTS --alias /usr/portage/packages:packages"
+
+## Dir to hold the log file:
+DAEMON_OPTS="$DAEMON_OPTS --log /var/log/http-replicator.log"
+
+## Make the log messages less and less verbose.
+## Up to four times to make it extremely quiet.
+#DAEMON_OPTS="$DAEMON_OPTS --quiet"
+#DAEMON_OPTS="$DAEMON_OPTS --quiet"
+
+## Make the log messages extra verbose for debugging.
+#DAEMON_OPTS="$DAEMON_OPTS --debug"
+
+## The ip addresses from which access is allowed. Can be used as many times
+## as necessary. Access from localhost is allowed by default.
+DAEMON_OPTS="$DAEMON_OPTS --ip 192.168.*.*"
+DAEMON_OPTS="$DAEMON_OPTS --ip 10.*.*.*"
+
+## The proxy port on which the server listens for http requests:
+DAEMON_OPTS="$DAEMON_OPTS --port 8080"
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0.init b/net-proxy/http-replicator/files/http-replicator-3.0.init
new file mode 100644
index 00000000000..7fc3d5e108d
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3.0.init
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Http-Replicator"
+ start-stop-daemon --start --pidfile /var/run/http-replicator.pid --name http-replicator \
+ --exec /usr/bin/http-replicator -- -s -f --pid /var/run/http-replicator.pid --daemon $DAEMON_OPTS
+ eend $? "Failed to start Http-Replicator"
+}
+
+stop() {
+ ebegin "Stopping Http-Replicator"
+ start-stop-daemon --stop --pidfile /var/run/http-replicator.pid --name http-replicator --signal 2
+ eend $? "Failed to stop Http-Replicator"
+}
diff --git a/net-proxy/http-replicator/http-replicator-3.0-r7.ebuild b/net-proxy/http-replicator/http-replicator-3.0-r7.ebuild
new file mode 100644
index 00000000000..68405a1f8c1
--- /dev/null
+++ b/net-proxy/http-replicator/http-replicator-3.0-r7.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="https://sourceforge.net/projects/http-replicator"
+SRC_URI="mirror://sourceforge/http-replicator/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 hppa ppc ~sparc x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/http-replicator-3.0-sighup.patch"
+ "${FILESDIR}/http-replicator-3-unique-cache-name.patch"
+ "${FILESDIR}/http-replicator-3-missing-directory.patch"
+)
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_install() {
+ # Daemon and repcacheman into /usr/bin
+ python_scriptinto /usr/bin
+ python_doscript http-replicator
+ python_newscript "${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
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-proxy/http-replicator/files/, net-proxy/http-replicator/
@ 2020-03-19 7:38 Mikle Kolyada
0 siblings, 0 replies; 2+ messages in thread
From: Mikle Kolyada @ 2020-03-19 7:38 UTC (permalink / raw
To: gentoo-commits
commit: f8c30fbcc4a8853d6d44f21b969363b766303b33
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 19 07:37:46 2020 +0000
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Thu Mar 19 07:37:46 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8c30fbc
net-proxy/http-replicator: remove last-rited pkg
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
net-proxy/http-replicator/Manifest | 1 -
.../files/http-replicator-3.0-callrepcacheman-0.1 | 3 -
.../files/http-replicator-3.0-repcacheman-0.44-r2 | 201 ---------------------
.../files/http-replicator-4.0_alpha2-ipv6.patch | 68 -------
.../files/http-replicator-4.0_alpha2-r2.conf | 46 -----
.../files/http-replicator-4.0_alpha2-r3-pid.patch | 101 -----------
.../files/http-replicator-4.0_alpha2-r3.init | 21 ---
.../http-replicator/files/http-replicator.service | 11 --
.../files/http-replicator.service.conf | 3 -
.../http-replicator-4.0_alpha2-r7.ebuild | 78 --------
net-proxy/http-replicator/metadata.xml | 8 -
11 files changed, 541 deletions(-)
diff --git a/net-proxy/http-replicator/Manifest b/net-proxy/http-replicator/Manifest
deleted file mode 100644
index 8c075058ba4..00000000000
--- a/net-proxy/http-replicator/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST http-replicator_4.0alpha2.tgz 27575 BLAKE2B 48138bc8fa9695ddb31ce89c4638adda4a1d1b58c904cd98d0ee1dbab006f79ef7d19495db8eb4de0113f8e45da425950524c48ec9e3e864d8595ccdef9f7cfa SHA512 437e0cc881af0cb8f84bfd1366bb6edeee4f76112c4b2ac2af4bcb8809462852b96e9c99e04c8f370492c9e1eb33ddc68a85c4f09b073694242cd6c05b4d3a6c
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0-callrepcacheman-0.1 b/net-proxy/http-replicator/files/http-replicator-3.0-callrepcacheman-0.1
deleted file mode 100644
index 14cd0a70a53..00000000000
--- a/net-proxy/http-replicator/files/http-replicator-3.0-callrepcacheman-0.1
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/bash
-source /etc/conf.d/http-replicator
-/usr/bin/repcacheman.py $GENERAL_OPTS
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44-r2 b/net-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44-r2
deleted file mode 100644
index 35d0a9e39fa..00000000000
--- a/net-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44-r2
+++ /dev/null
@@ -1,201 +0,0 @@
-#! /usr/bin/python
-#
-# repcacheman ver 0.44
-#
-# Cache Manager for Http-Replicator
-# deletes duplicate files in PORTDIR.
-# imports authenticated (checksum + listed in portage)
-# files from PORTDIR to replicator's cache directory.
-#
-# Uses portage to perform checksum and database functions.
-# All else, Copyright(C)2004-2007 Tom Poplawski (poplawtm@earthlink.net)
-# Distributed under the terms of the GNU General Public License v2
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-import portage.manifest
-import portage.checksum
-import portage.exception
-import portage
-import string
-import os
-import pwd,sys,optparse
-
-if os.getuid():
- print"Must be root"
- sys.exit(1)
-
-# Parse Options
-
-parser = optparse.OptionParser()
-parser.add_option('-d', '--dir', type='string', default="/var/cache/http-replicator", help='http-replicators cache DIR')
-parser.add_option('-u','--user', type='string', default="portage", help='http-replicator USER')
-options, args = parser.parse_args() # parse command line
-
-if options.user:
- try:
- uid=pwd.getpwnam(options.user)[2]
- gid=pwd.getpwnam(options.user)[3]
- except:
- print "User \'" + options.user + "\' Doesn't exist on system - edit config or add user to system."
- sys.exit(1)
-else:
- print "Error\n\tunable to get USER from /etc/http-replicator.conf"
- sys.exit(1)
-
-# dir is replicator's cache directory
-dir=options.dir+"/"
-
-if os.path.isdir(dir) :
- newdir=0
-else :
- print"\n\nBegin Http-Replicator Setup...."
- try:
- os.makedirs(dir)
- print "\tcreated " + dir
- newdir=1
- except:
- print "\tcreate " + dir + " failed"
- print '\terror:', sys.exc_info()[1]
- sys.exit(1)
- try:
- os.chown(dir,uid,gid)
- print "\tchanged owner of " + dir + " to " + options.user
- except:
- print "\tchange owner " + dir + " to " + options.user + " failed:"
- print '\terror:', sys.exc_info()[1]
-
-print "\n\nReplicator's cache directory: " + dir
-
-# Import Portage settings
-
-distdir=portage.settings["DISTDIR"]+"/"
-if distdir:
- print "Portage's DISTDIR: " + distdir
-else:
- print"Unable to get Portage's DISTDIR"
- sys.exit(1)
-
-# Start Work
-
-print "\nComparing directories...."
-
-# Create filecmp object
-import filecmp
-dc=filecmp.dircmp (distdir,dir,['cvs-src','git-src','hg-src','egit-src','.locks'])
-print "Done!"
-
-dupes=dc.common
-deleted=0
-
-if dupes:
- print "\nDeleting duplicate file(s) in " + distdir
-
- for s in dupes:
- print s
- try:
- os.remove(distdir + s )
- deleted +=1
- except:
- print "\tdelete " + distdir + s + " failed:"
- print '\terror:', sys.exc_info()[1]
-
- print "Done!"
-
-
-newfiles=dc.left_only
-nf=len(dc.left_only)
-
-if nf:
- print "\nNew files in DISTDIR:"
- for s in newfiles:
- print s
- print"\nChecking authenticity and integrity of new files..."
- added=0
- errors=0
- badsum=0
-
-# search all packages
-
- for mycp in portage.db["/"]["porttree"].dbapi.cp_all():
- manifest = portage.manifest.Manifest("/usr/portage/" + mycp , distdir)
- if manifest == None:
- portage.writemsg("Missing manifest: %s\n" % mycpv)
-
- remove=[]
- for file in newfiles:
- if manifest.hasFile("DIST",file):
- try:
- myok, myreason = manifest.checkFileHashes("DIST",file)
-
- try:
- os.rename(distdir+file,dir+file)
- added += 1
- except:
- try:
- import shutil
- shutil.copyfile(distdir+file,dir+file)
- added += 1
- os.remove(distdir+file)
- except:
- print "\tmove/copy " + file + " failed:"
- print '\terror:', sys.exc_info()[1]
- errors+=1
-
- try:
- os.chown(dir+file,uid,gid)
- except:
- print "\tchown " + file + " failed:"
- print '\terror:', sys.exc_info()[1]
- errors +=1
-
- remove.append( file )
-
- except portage.exception.DigestException, e:
- print("\n!!! Digest verification failed:")
- print("!!! %s" % e.value[0])
- print("!!! Reason: %s" % e.value[1])
- print("!!! Got: %s" % e.value[2])
- print("!!! Expected: %s" % e.value[3])
- badsum+=1
- if remove:
- for rf in remove:
- newfiles.remove ( rf )
-
-
-print "\nSUMMARY:"
-print "Found " + str(len(dupes)) + " duplicate file(s)"
-if deleted:
- print "\tDeleted " + str(deleted) + " dupe(s)"
-
-if nf:
- print "Found " + str(nf) + " new file(s)"
- print "\tAdded " + str(added) + " of those file(s) to the cache"
-
- print "Rejected " +str(len(newfiles)) + " File(s) - ",
- print str(badsum) + " failed checksum(s)"
- for s in newfiles:
- print "\t%s" %s
- if errors:
- print "Encountered " +str(errors) + " errors"
-# if badsum:
-# print str(badsum) + " partial/corrupted file(s)"
-
-if newdir:
- print"\n\nexecute:\n/etc/init.d/http-replicator start"
- print"to run http-replicator.\n\nexecute:\nrc-update add http-replicator default"
- print"to make http-replicator start at boot"
- print"\n\nexecute:\n/usr/bin/repcacheman\nafter emerge's on the server to delete"
- print"dup files and add new files to the cache"
-
-print "\n\nHTTP-Replicator requires you delete any partial downloads in " + distdir
-print "run rm -f " + distdir +'*'
-
diff --git a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-ipv6.patch b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-ipv6.patch
deleted file mode 100644
index 906844fd958..00000000000
--- a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-ipv6.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-diff -ur a/fiber.py b/fiber.py
---- a/fiber.py 2018-10-27 12:52:10.536264605 -0400
-+++ b/fiber.py 2018-10-27 12:57:26.688730570 -0400
-@@ -180,10 +180,10 @@
- os.dup2( nul.fileno(), sys.stdin.fileno() )
-
-
--def spawn( generator, port, debug, log, pidfile ):
-+def spawn( generator, port, debug, log, pidfile, listenfamily ):
-
- try:
-- listener = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
-+ listener = socket.socket( listenfamily, socket.SOCK_STREAM )
- listener.setblocking( 0 )
- listener.setsockopt( socket.SOL_SOCKET, socket.SO_REUSEADDR, listener.getsockopt( socket.SOL_SOCKET, socket.SO_REUSEADDR ) | 1 )
- listener.bind( ( '', port ) )
-diff -ur a/http-replicator b/http-replicator
---- a/http-replicator 2018-10-27 12:52:10.542931816 -0400
-+++ b/http-replicator 2018-10-27 12:59:36.345978943 -0400
-@@ -9,7 +9,7 @@
-
- def Replicator( client, address ):
-
-- print 'Accepted request from %s:%i' % address
-+ print 'Accepted request from [%s]:%i' % address[0:2]
-
- request = Request.HttpRequest()
- while not request.Protocol:
-@@ -60,4 +60,4 @@
- print 'Transaction successfully completed'
-
-
--fiber.spawn( Replicator, Params.PORT, Params.DEBUG, Params.LOG, Params.PIDFILE )
-+fiber.spawn( Replicator, Params.PORT, Params.DEBUG, Params.LOG, Params.PIDFILE, Params.LISTENFAMILY )
-diff -ur a/Params.py b/Params.py
---- a/Params.py 2018-10-27 12:52:10.549599026 -0400
-+++ b/Params.py 2018-10-27 12:55:31.772685822 -0400
-@@ -9,6 +9,7 @@
- TIMEOUT = 15
- PIDFILE = False
- FAMILY = socket.AF_INET
-+LISTENFAMILY = socket.AF_INET
- FLAT = False
- STATIC = False
- ONLINE = True
-@@ -63,6 +64,7 @@
- sys.exit( 'Error: %s requires a positive numerical argument' % _arg )
- elif _arg in ( '-6', '--ipv6' ):
- FAMILY = socket.AF_UNSPEC
-+ LISTENFAMILY = socket.AF_INET6
- elif _arg == '--flat':
- FLAT = True
- elif _arg == '--static':
-diff --git a/Protocol.py b/Protocol.py
---- a/Protocol.py
-+++ b/Protocol.py
-@@ -13,7 +13,7 @@ def connect( addr ):
-
- family, socktype, proto, canonname, sockaddr = DNSCache[ addr ][ 0 ]
-
-- print 'Connecting to %s:%i' % sockaddr
-+ print 'Connecting to [%s]:%i' % sockaddr[0:2]
- sock = socket.socket( family, socktype, proto )
- sock.setblocking( 0 )
- sock.connect_ex( sockaddr )
---
-2.18.1
-
diff --git a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r2.conf b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r2.conf
deleted file mode 100644
index cea7c9632a3..00000000000
--- a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r2.conf
+++ /dev/null
@@ -1,46 +0,0 @@
-## Configuration file for HTTP Replicator automatically sourced by init script.
-
-#################
-## REPCACHEMAN ##
-#################
-
-## Set the cache dir.
-GENERAL_OPTS="--dir /var/cache/http-replicator/"
-
-## Change UID/GID to user after opening the log and pid file.
-## 'user' must have read/write access to cache dir.
-GENERAL_OPTS="$GENERAL_OPTS --user portage"
-
-#####################
-## HTTP-REPLICATOR ##
-#####################
-
-## Specify which file to log too, use /dev/null to disable.
-LOG_FILE="/var/log/http-replicator.log"
-
-# Set cache root directory.
-DAEMON_OPTS="--root /var/cache/http-replicator/"
-
-## Try IPv6 addresses if available.
-# DAEMON_OPTS="$DAEMON_OPTS --ipv6"
-
-## The proxy port on which the server listens for http requests, default 8080.
-# DAEMON_OPTS="$DAEMON_OPTS --port 8080"
-
-## Break connection after so many seconds of inactivity, default 15.
-# DAEMON_OPTS="$DAEMON_OPTS --timeout 15"
-
-## Limit download rate at a fixed K/s.
-# DAEMON_OPTS="$DAEMON_OPTS --limit RATE"
-
-## Do you need the proxy to work offline, never connecting to a server?
-# DAEMON_OPTS="$DAEMON_OPTS --offline"
-
-## Show http headers and other info in log messages.
-# DAEMON_OPTS="$DAEMON_OPTS --verbose"
-
-## Switch from gather to debug output module.
-# DAEMON_OPTS="$DAEMON_OPTS --debug"
-
-## More options (eg --flat and --static) are listed in `http-replicator --help`,
-## the --daemon parameter is automatically passed by the init script.
\ No newline at end of file
diff --git a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3-pid.patch b/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3-pid.patch
deleted file mode 100644
index a1cf5eddbfc..00000000000
--- a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3-pid.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-Bring back the --pid functionality of 3.x, needed for our init script.
-
-Patch contributed by Nikita Kozlov (klnikita / klnikita_ on IRC).
-
-Slight adjustments made to use --pid instead of --pidfile and reordered --help.
-
-URL: https://dpaste.org/Menvq/
-BUG: https://bugs.gentoo.org/show_bug.cgi?id=472422
-
---- a/fiber.py
-+++ b/fiber.py
-@@ -136,11 +136,13 @@
- self.__stdout.flush()
- self.__newline = string.endswith( '\n' )
-
-
--def fork( output ):
-+def fork( output, pidfile ):
-
- try:
-+ if pidfile:
-+ pidout = open(pidfile, 'w') # open pid file for writing
- log = open( output, 'w' )
- nul = open( '/dev/null', 'r' )
- pid = os.fork()
- except IOError, e:
-@@ -166,17 +168,20 @@
- print 'error:', e
- sys.exit( 1 )
-
- if pid:
-+ if pidfile:
-+ pidout.write(str(pid))
-+ pidout.close()
- print pid
- sys.exit( 0 )
-
- os.dup2( log.fileno(), sys.stdout.fileno() )
- os.dup2( log.fileno(), sys.stderr.fileno() )
- os.dup2( nul.fileno(), sys.stdin.fileno() )
-
-
--def spawn( generator, port, debug, log ):
-+def spawn( generator, port, debug, log, pidfile ):
-
- try:
- listener = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
- listener.setblocking( 0 )
-@@ -187,9 +192,9 @@
- print 'error: failed to create socket:', e
- sys.exit( 1 )
-
- if log:
-- fork( log )
-+ fork( log, pidfile )
-
- if debug:
- myFiber = DebugFiber
- else:
---- a/http-replicator
-+++ b/http-replicator
-@@ -59,5 +59,5 @@
-
- print 'Transaction successfully completed'
-
-
--fiber.spawn( Replicator, Params.PORT, Params.DEBUG, Params.LOG )
-+fiber.spawn( Replicator, Params.PORT, Params.DEBUG, Params.LOG, Params.PIDFILE )
---- a/Params.py
-+++ b/Params.py
-@@ -6,8 +6,9 @@
- PORT = 8080
- ROOT = os.getcwd() + os.sep
- VERBOSE = 0
- TIMEOUT = 15
-+PIDFILE = False
- FAMILY = socket.AF_INET
- FLAT = False
- STATIC = False
- ONLINE = True
-@@ -21,8 +22,9 @@
-
- options:
-+ --pid FILE write process ID to FILE
- -h --help show this help message and exit
- -p --port PORT listen on this port for incoming connections, default %(PORT)i
- -r --root DIR set cache root directory, default current: %(ROOT)s
- -v --verbose show http headers and other info
- -t --timeout SEC break connection after so many seconds of inactivity, default %(TIMEOUT)i
- -6 --ipv6 try ipv6 addresses if available
-@@ -74,8 +76,10 @@
- except:
- sys.exit( 'Error: %s requires a numerical argument' % _arg )
- elif _arg == '--daemon':
- LOG = _args.next()
-+ elif _arg == '--pid':
-+ PIDFILE = _args.next()
- elif _arg == '--debug':
- DEBUG = True
- else:
- sys.exit( 'Error: invalid option %r' % _arg )
\ No newline at end of file
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
deleted file mode 100644
index 3dc4297855c..00000000000
--- a/net-proxy/http-replicator/files/http-replicator-4.0_alpha2-r3.init
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-depend() {
- need net
-}
-
-start() {
- ebegin "Starting HTTP Replicator"
- start-stop-daemon --start --pidfile /var/run/http-replicator.pid \
- --name http-replicator --exec /usr/bin/http-replicator -- --static \
- --flat --daemon $LOG_FILE $DAEMON_OPTS --pid /var/run/http-replicator.pid
- eend $? "Failed to start HTTP Replicator"
-}
-
-stop() {
- ebegin "Stopping HTTP Replicator"
- start-stop-daemon --stop --pidfile /var/run/http-replicator.pid --name http-replicator --signal 2
- eend $? "Failed to stop HTTP Replicator"
-}
diff --git a/net-proxy/http-replicator/files/http-replicator.service b/net-proxy/http-replicator/files/http-replicator.service
deleted file mode 100644
index 6a2a7e5f5df..00000000000
--- a/net-proxy/http-replicator/files/http-replicator.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[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
deleted file mode 100644
index da7445d080c..00000000000
--- a/net-proxy/http-replicator/files/http-replicator.service.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# 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-4.0_alpha2-r7.ebuild b/net-proxy/http-replicator/http-replicator-4.0_alpha2-r7.ebuild
deleted file mode 100644
index c43d5f02663..00000000000
--- a/net-proxy/http-replicator/http-replicator-4.0_alpha2-r7.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-PYTHON_COMPAT=( python2_7 )
-
-inherit python-r1 readme.gentoo-r1 systemd
-
-MY_P="${PN}_${PV/_/}"
-
-DESCRIPTION="Proxy cache for Gentoo packages"
-HOMEPAGE="https://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"
-IUSE=""
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="${PYTHON_DEPS}
- sys-apps/portage[${PYTHON_USEDEP}]
-"
-DEPEND="${RDEPEND}"
-
-S="${WORKDIR}/${MY_P}"
-
-# Tests downloads files as well as breaks, should be turned into local tests.
-RESTRICT="test"
-
-DISABLE_AUTOFORMATTING="yes"
-DOC_CONTENTS="
-Before starting ${PN}, please follow the next few steps:
-
-- Modify /etc/conf.d/${PN} if required.
-- Run \`repcacheman\` to set up the cache.
-- Add HTTP_PROXY=\"http://serveraddress:8080\" to make.conf on
-the server as well as on the client machines.
-- Make sure GENTOO_MIRRORS in /etc/portage/make.conf
-starts with several good HTTP mirrors.
-
-For more information please refer to the following forum thread:
-https://forums.gentoo.org/viewtopic-t-173226.html
-
-Starting with 4.x releases, the conf.d parameters have changed.
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-4.0_alpha2-r3-pid.patch
- "${FILESDIR}"/${PN}-4.0_alpha2-ipv6.patch #669078
-)
-
-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
- readme.gentoo_create_doc
-}
-
-pkg_postinst() {
- readme.gentoo_print_elog
-}
diff --git a/net-proxy/http-replicator/metadata.xml b/net-proxy/http-replicator/metadata.xml
deleted file mode 100644
index 2700375c94e..00000000000
--- a/net-proxy/http-replicator/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <!-- maintainer-needed -->
- <upstream>
- <remote-id type="sourceforge">http-replicator</remote-id>
- </upstream>
-</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-19 7:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-28 12:11 [gentoo-commits] repo/gentoo:master commit in: net-proxy/http-replicator/files/, net-proxy/http-replicator/ Tony Vroon
-- strict thread matches above, loose matches on Subject: below --
2020-03-19 7:38 Mikle Kolyada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox