summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice van der Pot <griffon26@gentoo.org>2007-08-06 17:49:04 +0000
committerMaurice van der Pot <griffon26@gentoo.org>2007-08-06 17:49:04 +0000
commitb4fab09d8f3a5fc59b865d2d35b5f4353fe0de6b (patch)
treed07b8385f182008c2fc8f9f73fce54d977127c2f /net-proxy/http-replicator
parentFixed initial owner/permission problem reported in bug #187883. (diff)
downloadhistorical-b4fab09d8f3a5fc59b865d2d35b5f4353fe0de6b.tar.gz
historical-b4fab09d8f3a5fc59b865d2d35b5f4353fe0de6b.tar.bz2
historical-b4fab09d8f3a5fc59b865d2d35b5f4353fe0de6b.zip
Added http-replicator revision with new repcacheman that handles the new Manifest format (bug #186487)
Package-Manager: portage-2.1.3_rc9
Diffstat (limited to 'net-proxy/http-replicator')
-rw-r--r--net-proxy/http-replicator/ChangeLog13
-rw-r--r--net-proxy/http-replicator/Manifest27
-rw-r--r--net-proxy/http-replicator/files/digest-http-replicator-3.0-r13
-rwxr-xr-xnet-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44201
-rw-r--r--net-proxy/http-replicator/http-replicator-3.0-r1.ebuild61
5 files changed, 296 insertions, 9 deletions
diff --git a/net-proxy/http-replicator/ChangeLog b/net-proxy/http-replicator/ChangeLog
index a21b7450c026..997ebfa9759c 100644
--- a/net-proxy/http-replicator/ChangeLog
+++ b/net-proxy/http-replicator/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for net-proxy/http-replicator
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/http-replicator/ChangeLog,v 1.15 2007/07/10 18:25:50 griffon26 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/http-replicator/ChangeLog,v 1.16 2007/08/06 17:49:04 griffon26 Exp $
+
+*http-replicator-3.0-r1 (06 Aug 2007)
+
+ 06 Aug 2007; Maurice van der Pot <griffon26@gentoo.org>
+ +files/http-replicator-3.0-repcacheman-0.44,
+ +http-replicator-3.0-r1.ebuild:
+ This new revision includes an updated repcacheman that can work with the new
+ Manifest2 format as specified in GLEP44. Thanks to Jakob Truelsen
+ <antialize@gmail.com> for reporting the problem (bug #186487) and
+ Tom Poplawski <poplawtm@earthlink.net> for releasing a new version
+ of repcacheman.
10 Jul 2007; Maurice van der Pot <griffon26@gentoo.org>
+files/http-replicator-3.0-sighup.patch, files/http-replicator-3.0.init,
diff --git a/net-proxy/http-replicator/Manifest b/net-proxy/http-replicator/Manifest
index 3fc453f14272..5ea0dce133ec 100644
--- a/net-proxy/http-replicator/Manifest
+++ b/net-proxy/http-replicator/Manifest
@@ -13,6 +13,10 @@ AUX http-replicator-3.0-repcacheman-0.33 6225 RMD160 a655250dd747beb6fe5cd3cb58c
MD5 20a9fbec924f5e4ade7b3e98009e3560 files/http-replicator-3.0-repcacheman-0.33 6225
RMD160 a655250dd747beb6fe5cd3cb58cb85a924756905 files/http-replicator-3.0-repcacheman-0.33 6225
SHA256 abdce2b0f307c7ae3dad6caee6b7f032696c0ce1fab98cc8f7a952ce4f53293b files/http-replicator-3.0-repcacheman-0.33 6225
+AUX http-replicator-3.0-repcacheman-0.44 5327 RMD160 5545856f99674ff7bb7aedd946284904e525d6f2 SHA1 8168528d7062ff00b6a9189b5ab8d6651b76155a SHA256 28d45098bf29ce050aa94b47c9a5fee28f5f083a8bf213f90044881092125bbe
+MD5 9dd9b2b03ee2a05252e099985de3adf9 files/http-replicator-3.0-repcacheman-0.44 5327
+RMD160 5545856f99674ff7bb7aedd946284904e525d6f2 files/http-replicator-3.0-repcacheman-0.44 5327
+SHA256 28d45098bf29ce050aa94b47c9a5fee28f5f083a8bf213f90044881092125bbe files/http-replicator-3.0-repcacheman-0.44 5327
AUX http-replicator-3.0-sighup.patch 998 RMD160 e8ebcc4ae54764f7ea939273a898ede18066ca87 SHA1 dc009dc57ca654c0190b9c726bd2879fb2ed8934 SHA256 71038c1f0e601bdbc20693d4928afdd13366a48786cf068b58711e097bfcce76
MD5 fad25749aa104d55641b2b0e885e6322 files/http-replicator-3.0-sighup.patch 998
RMD160 e8ebcc4ae54764f7ea939273a898ede18066ca87 files/http-replicator-3.0-sighup.patch 998
@@ -26,14 +30,18 @@ MD5 2a2f7f4272ef7e8e1bfe171b0c2d7c1f files/http-replicator-3.0.init 762
RMD160 03e486936fd711a8cf9bfd629407d9a120e579fd files/http-replicator-3.0.init 762
SHA256 63e64c4e55b3395619aab3fa3154255d36144af371d4ea0789884148845e2cdb files/http-replicator-3.0.init 762
DIST http-replicator_3.0.tar.gz 19481 RMD160 cb26c8e55df3dfbbf20bb08f62f3d0ac89191e68 SHA1 0af80e4de264c80b66c0a616af999da420df771f SHA256 a7499b980531636d349ce2cace14692fed2e747d23ad0c48cbc68b84369e2d98
+EBUILD http-replicator-3.0-r1.ebuild 1940 RMD160 7165b909cba3f3dae4e4155a6896d2aa62d8510e SHA1 98b6c633cc0240b5e07f7af746901fbea0a8582e SHA256 67c41b3b9af4f782ae527474183a61774485139dba6e9b3f47b81370c5008f29
+MD5 8930aac1f2bdbe36933b14f98630cc72 http-replicator-3.0-r1.ebuild 1940
+RMD160 7165b909cba3f3dae4e4155a6896d2aa62d8510e http-replicator-3.0-r1.ebuild 1940
+SHA256 67c41b3b9af4f782ae527474183a61774485139dba6e9b3f47b81370c5008f29 http-replicator-3.0-r1.ebuild 1940
EBUILD http-replicator-3.0.ebuild 1934 RMD160 5bcab6349c368ce716a0fa2bac5a95351abc3689 SHA1 ba089cd2ac3aba4989b5775c15ad618c9f6c10f3 SHA256 ddccc53fdb5b54721fc400c51b73015cc003dbf88680c75342ef02429978c0b4
MD5 64dbcc61014037b1de10b260d4314cf5 http-replicator-3.0.ebuild 1934
RMD160 5bcab6349c368ce716a0fa2bac5a95351abc3689 http-replicator-3.0.ebuild 1934
SHA256 ddccc53fdb5b54721fc400c51b73015cc003dbf88680c75342ef02429978c0b4 http-replicator-3.0.ebuild 1934
-MISC ChangeLog 2881 RMD160 3b0065c9ffda336619f2426527bd75b784c1d776 SHA1 9508c390929aed86cabc6ddf5158562c0af88f54 SHA256 8b8b18e1e0bcdf51d341e3f4ecb1507beafa8366c8cd1d106ab88d8aba66d360
-MD5 ff2ca16a07abb3e6ddcc815baf88a5b3 ChangeLog 2881
-RMD160 3b0065c9ffda336619f2426527bd75b784c1d776 ChangeLog 2881
-SHA256 8b8b18e1e0bcdf51d341e3f4ecb1507beafa8366c8cd1d106ab88d8aba66d360 ChangeLog 2881
+MISC ChangeLog 3364 RMD160 30c77b9690d6611c08a986b9dcc9c552ff0b3e85 SHA1 a4b4c70ed660efc67dc84d43307d67ee3683bc0e SHA256 0e9e9cc7ba0850d4cbd794a154a8639960b4b220c0be83b384aa9ce77cf2a2cb
+MD5 6b35f28f5eb97f4b657f5f92e558d9e4 ChangeLog 3364
+RMD160 30c77b9690d6611c08a986b9dcc9c552ff0b3e85 ChangeLog 3364
+SHA256 0e9e9cc7ba0850d4cbd794a154a8639960b4b220c0be83b384aa9ce77cf2a2cb ChangeLog 3364
MISC metadata.xml 227 RMD160 125266cd9f70c3363b95f8cafb269831182e64fd SHA1 c915ed723f874f24c32b96f22778390715e60d77 SHA256 4a4ffece3d4de0d1311ec96e7001a11e40cf3558d0aab7ed5ea0d3a6b29fbb34
MD5 eae37ad8073b8190842199931528eecc metadata.xml 227
RMD160 125266cd9f70c3363b95f8cafb269831182e64fd metadata.xml 227
@@ -41,10 +49,13 @@ SHA256 4a4ffece3d4de0d1311ec96e7001a11e40cf3558d0aab7ed5ea0d3a6b29fbb34 metadata
MD5 2b88869ff8557ffc40a86e2038eefbcb files/digest-http-replicator-3.0 256
RMD160 6c0895be4847cec1873c855a6fb04ff70b6a8369 files/digest-http-replicator-3.0 256
SHA256 5ae4510802aa59aeea1329df4a82b4ab0370f0ffa9ddabe84f55c51e55e946ce files/digest-http-replicator-3.0 256
+MD5 2b88869ff8557ffc40a86e2038eefbcb files/digest-http-replicator-3.0-r1 256
+RMD160 6c0895be4847cec1873c855a6fb04ff70b6a8369 files/digest-http-replicator-3.0-r1 256
+SHA256 5ae4510802aa59aeea1329df4a82b4ab0370f0ffa9ddabe84f55c51e55e946ce files/digest-http-replicator-3.0-r1 256
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.4 (GNU/Linux)
+Version: GnuPG v2.0.5 (GNU/Linux)
-iD8DBQFGk885MGnpIbeahxwRAiMTAJ9/KHlWubi9dNXJpmfqtgNqaFMcjwCgqQhc
-q8y8BVvm4XQg+Xz7quJ1eAE=
-=8OTc
+iD8DBQFGt18dMGnpIbeahxwRAukDAJ9/zAK21UcTzyFDuwkRJHriJbc1HQCgh+JZ
+WFCwSt8myQU1w9zv4oMMG7w=
+=HOMy
-----END PGP SIGNATURE-----
diff --git a/net-proxy/http-replicator/files/digest-http-replicator-3.0-r1 b/net-proxy/http-replicator/files/digest-http-replicator-3.0-r1
new file mode 100644
index 000000000000..46d6443e3432
--- /dev/null
+++ b/net-proxy/http-replicator/files/digest-http-replicator-3.0-r1
@@ -0,0 +1,3 @@
+MD5 7d8d69175a5dc3d470273b1e508a27f3 http-replicator_3.0.tar.gz 19481
+RMD160 cb26c8e55df3dfbbf20bb08f62f3d0ac89191e68 http-replicator_3.0.tar.gz 19481
+SHA256 a7499b980531636d349ce2cace14692fed2e747d23ad0c48cbc68b84369e2d98 http-replicator_3.0.tar.gz 19481
diff --git a/net-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44 b/net-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44
new file mode 100755
index 000000000000..b200a7be48f8
--- /dev/null
+++ b/net-proxy/http-replicator/files/http-replicator-3.0-repcacheman-0.44
@@ -0,0 +1,201 @@
+#! /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','.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 -rf " + distdir +'*'
+
diff --git a/net-proxy/http-replicator/http-replicator-3.0-r1.ebuild b/net-proxy/http-replicator/http-replicator-3.0-r1.ebuild
new file mode 100644
index 000000000000..67dcd72616ad
--- /dev/null
+++ b/net-proxy/http-replicator/http-replicator-3.0-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/http-replicator/http-replicator-3.0-r1.ebuild,v 1.1 2007/08/06 17:49:04 griffon26 Exp $
+
+inherit eutils
+
+DESCRIPTION="Proxy cache for Gentoo packages"
+HOMEPAGE="http://gertjan.freezope.org/replicator/"
+SRC_URI="http://gertjan.freezope.org/replicator/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE=""
+
+DEPEND=">=dev-lang/python-2.3"
+
+src_compile() {
+ epatch "${FILESDIR}/http-replicator-3.0-sighup.patch"
+ einfo "No compilation necessary"
+}
+
+src_install(){
+ # Daemon and repcacheman into /usr/bin
+ exeinto /usr/bin
+ doexe http-replicator
+ newexe "${FILESDIR}/http-replicator-3.0-callrepcacheman-0.1" repcacheman
+ if has_version '>=sys-apps/portage-2.0.51'; then
+ newexe "${FILESDIR}/http-replicator-3.0-repcacheman-0.44" repcacheman.py
+ else
+ newexe "${FILESDIR}/http-replicator-3.0-repcacheman-0.21" repcacheman.py
+ fi
+
+ # init.d scripts
+ newinitd "${FILESDIR}/http-replicator-3.0.init" http-replicator
+ newconfd "${FILESDIR}/http-replicator-3.0.conf" http-replicator
+
+ # 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() {
+ einfo
+ einfo "Before starting http-replicator, please follow the next few steps:"
+ einfo "- modify /etc/conf.d/http-replicator if required"
+ einfo "- run /usr/bin/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/make.conf starts with several"
+ einfo " good http mirrors"
+ einfo
+ einfo "For more information please refer to the following forum thread:"
+ einfo " http://forums.gentoo.org/viewtopic-t-173226.html"
+ einfo
+}