Torpage is a helper to portage that allows one to maintain a central server that only contains the distfiles that one actually require. It also takes cares of problems relating to downloading the same distfiles over and over again when maintaining a large number of machines. Torpage takes care of this, for me at least. I'm submitting the ebuild in the hope that other people may also benifit from this work. Reproducible: Always Steps to Reproduce:
Created attachment 39469 [details] ebuild for torpage-0.1
Created attachment 40243 [details] Updated patch for torpage 0.1.2 instead Right, a small bug fix along with various other updates (improved logging, support for using localhost as the torpage server). More explanations at http://www.kroon.co.za/torpage.php
Created attachment 45109 [details] torpage-0.1.3 New ebuild, adjusts to using portage-2.0.51.
Created attachment 54670 [details] ebuild for torpage-0.2.0 Much updated torage package. Solves most of the issues I encountered so far, in addition this one can run on non-gentoo systems (the server at least) permitting the portage tree and a "distfiles" directory is available. There is still a few enhancements to be made, let me know what you think.
Created attachment 54974 [details] ebuild for torpage-0.2.1
Created attachment 56292 [details] torpage-0.2.2 Mainly enhancements to the distfiles_cleanup script.
Created attachment 58393 [details] torpage-0.2.3 ebuild Small bugfix where /etc/make.conf got sourced inappropriately, possibly clobbering a PKGDIR variable.
A couple of comments: -LICENSE should match a license in ${PORTDIR}/licenses -The standard ebuild header has switched to using Copyright 1999-2005 Gentoo Foundation. -the src_compile renaming should be done in src_unpack. I wonder why it is not renamed torpage already in the tarball?
Created attachment 75058 [details] torpage-0.2.3.ebuild Sorry for the time it took, should be ok now.
Oh, as for the renaming, there was work in progress to enable the server to run on other distributions as well. Essentially it's a matter of adding appropriate startup scripts, thus the idea is to let the script-name match the distribution on which to use it.
Created attachment 81369 [details] torpage-0.2.4.ebuild Updated ebuild for new version, now makes use of OpenSSL to perform digesting in order to support a wider range of hashes. There is also a not so minor security fix if you used the authentication stuff, basically you could provide any username and password. Not sure how that slipped through.
Created attachment 136671 [details] torpage-0.2.6.ebuild
(this is an automated message based on filtering criteria that matched this bug) Hello, The Gentoo Team would like to firstly thank you for your ebuild submission. We also apologize for not being able to accommodate you in a timely manner. There are simply too many new packages. Allow me to use this opportunity to introduce you to Gentoo Sunrise. The sunrise overlay[1] is a overlay for Gentoo which we allow trusted users to commit to and all users can have ebuilds reviewed by Gentoo devs for entry into the overlay. So, the sunrise team is suggesting that you look into this and submit your ebuild to the overlay where even *you* can commit to. =) Because this is a mass message, we are also asking you to be patient with us. We anticipate a large number of requests in a short time. Thanks, On behalf of the Gentoo Sunrise Team, Jeremy. [1]: http://www.gentoo.org/proj/en/sunrise/ [2]: http://overlays.gentoo.org/proj/sunrise/wiki/SunriseFaq
Current portage emits: !!! FETCHCOMMAND_TORPAGE does not contain the required ${FILE} parameter. !!! RESUMECOMMAND_TORPAGE does not contain the required ${FILE} parameter. !!! Refer to the make.conf(5) man page for information about how to !!! correctly specify FETCHCOMMAND and RESUMECOMMAND. It think we could simply fix "torpage_fetch" to accept three parametres and change FETCHCOMMAND_TORPAGE/RESUMECOMMAND_TORPAGE to: FETCHCOMMAND_TORPAGE=="/usr/sbin/torpage_fetch \"\${DISTDIR}/\${FILE}\" \"\${URI}\"" RESUMECOMMAND_TORPAGE=="/usr/sbin/torpage_fetch \"\${DISTDIR}/\${FILE}\" \"\${URI}\""
Created attachment 188385 [details, diff] Support FILE parameter in torpage_fetch
Created attachment 235391 [details] torpage-0.2.7.ebuild New version also includes patch for the FILE parameter. Includes a few other random fixes as per the changelog: * Implement lockf based locking. * torpage-lockf * Replace the protocol determination and command determining code. * Only check checksums on startup if we have a non-empty file. * Update lockfile location. * Don't stop checking checksums at first bad checksum. * The default FETCHCOMMAND uses -O in portage now, clone to torpage. * Take a third parameter to torpage_fetch for ${FILE} * Make scripts executable. The two changes that carries real effect is the locking related changes that will now co-operate properly with portage (limited testing last night) and the properly supported ${FILE} parameter.
Created attachment 257338 [details] torpage-0.2.8 Changelog: f0d935c Improved verbose feedback and split OK checking out of loop (solves scope problems) 4144e32 Hack to deal with ${URI} -> ${FILE} rename structures. c57fd6b Make default fetch commands go guiet. 7fd8c11 Export CATEGORY, PN and PF for use by sub-torpage_fetch processes. 927802d Use pipefail so we can log downloader exit codes. 3e36f01 Give a full path to -O instead of messing with -P to wget.
Created attachment 259452 [details, diff] Patch for torpage_server openssl dgst was inserting "(stdin)= " before the hashsums, causing torpage to fail. Using this patch as a quick-fix.
Never versions of ssl adds the tag. I don't see a simpler/easier fix. I've added the patch to my git repository thanks. I can roll a new version if need be but I'd prefer to batch a few more changes - if it's critical for you I'll roll a 0.2.9 version? commit f8f2e95769376ad1f04b9b26d597bb093312cb9e Author: Jaco Kroon <jaco@uls.co.za> Date: Mon Jan 10 12:28:43 2011 +0200 Newer versions of OpenSSL adds a filename tag in front of the actual checksum, just get rid of i diff --git a/sbin/torpage_server b/sbin/torpage_server index f0dc724..fca9bc4 100755 --- a/sbin/torpage_server +++ b/sbin/torpage_server @@ -167,7 +167,7 @@ function has_file() { case $DMETHOD in md[245]|rmd160|mdc2|sha|sha1|sha256|sha512) - local DIGEST_FETCHED_VALUE=$(/usr/bin/openssl dgst -"${DMETHOD}" < " + local DIGEST_FETCHED_VALUE=$(/usr/bin/openssl dgst -"${DMETHOD}" < " [[ "${DIGEST_FETCHED_VALUE}" == "${DVALUE}" ]] && chkres=0 ;; *) The only functional change is that I force the (stdin)= to be at the beginning of the line. Thanks for the diff.
Created attachment 264907 [details] torpage-0.2.9.ebuild Incorporated patches for fixing checksum issue.
This will no longer function. And no plans to repair.