diff options
author | Mikle Kolyada <zlogene@gentoo.org> | 2020-03-19 10:37:46 +0300 |
---|---|---|
committer | Mikle Kolyada <zlogene@gentoo.org> | 2020-03-19 10:37:46 +0300 |
commit | f8c30fbcc4a8853d6d44f21b969363b766303b33 (patch) | |
tree | f91e2fb9a69ac5fb6808753ab0d7d980e9510edc /net-proxy | |
parent | dev-python/asciitable: remove last-rited pkg (diff) | |
download | gentoo-f8c30fbcc4a8853d6d44f21b969363b766303b33.tar.gz gentoo-f8c30fbcc4a8853d6d44f21b969363b766303b33.tar.bz2 gentoo-f8c30fbcc4a8853d6d44f21b969363b766303b33.zip |
net-proxy/http-replicator: remove last-rited pkg
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'net-proxy')
11 files changed, 0 insertions, 541 deletions
diff --git a/net-proxy/http-replicator/Manifest b/net-proxy/http-replicator/Manifest deleted file mode 100644 index 8c075058ba40..000000000000 --- 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 14cd0a70a53b..000000000000 --- 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 35d0a9e39fa2..000000000000 --- 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 906844fd9586..000000000000 --- 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 cea7c9632a34..000000000000 --- 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 a1cf5eddbfcb..000000000000 --- 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 3dc4297855c2..000000000000 --- 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 6a2a7e5f5dff..000000000000 --- 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 da7445d080c4..000000000000 --- 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 c43d5f026639..000000000000 --- 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 2700375c94e8..000000000000 --- 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> |