diff --git a/CHANGELOG b/CHANGELOG index 04cb60f77987f1cf4dd1d95261a0b21f4e724ae7..ca10fe631594188e06a7539c5e48e3620e5cd898 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +0.4.8 + * Fix for superfluous errors when mirroring a Flat repo + * Fixed support for repositories with no components. + * Reduced the number of tries wget will try before it fails to 5 + * Fixed loop if wget was not installed, would not die() + * fix stale wget caching due to bad proxy configs + 0.4.7 * Lots of typos fixed * apt-mirror will now try to create needed directorys if they do not exist diff --git a/apt-mirror b/apt-mirror index 02b4946a1f1a966e8c4f096b5b7af3886a4c19aa..d03fe584cdf1edbc73ce2f7da1da3ae536c47616 100755 --- a/apt-mirror +++ b/apt-mirror @@ -75,10 +75,10 @@ deb-src http://example.com/debian stable main contrib non-free Dmitry N. Hramtsov E<lt>hdn@nsu.ruE<gt> -=head1 MAINTAINERS +=head1 CURRENT AUTHORS Dmitry N. Hramtsov E<lt>hdn@nsu.ruE<gt> -Brandon Holtsclaw E<lt>brandon@imbrandon.comE<gt> +Brandon Holtsclaw E<lt>me@brandonholtsclaw.comE<gt> =cut @@ -216,12 +216,9 @@ sub download_urls { die("apt-mirror: can't do fork in download_urls") if $pid < 0; if($pid == 0) { -# print " * Running wget $i...\n"; - exec 'wget', '--limit-rate='.get_variable("limit_rate"), '-t', '0', '-r', '-N', '-l', 'inf', '-o', get_variable("var_path") . "/$stage-log.$i", '-i', get_variable("var_path") . "/$stage-urls.$i"; -# print " * Can't exec $i...\n"; -# unlink get_variable("var_path") . "/URLS.$i"; -# unlink get_variable("var_path") . "/wget-log.$i"; -# exit 1; + exec 'wget', '--no-cache', '--limit-rate='.get_variable("limit_rate"), '-t', '5', '-r', '-N', '-l', 'inf', '-o', get_variable("var_path") . "/$stage-log.$i", '-i', get_variable("var_path") . "/$stage-urls.$i"; + # shouldn't reach this unless exec fails + die("\n\nCould not run wget, please make sure its installed and in your path\n\n"); } push @childrens, $pid; @@ -341,6 +338,8 @@ foreach (@config_sources) { add_url_to_download($url . $_ . "/source/Sources.bz2"); } } else { + add_url_to_download($uri . "/$distribution/Release"); + add_url_to_download($uri . "/$distribution/Release.gpg"); add_url_to_download($uri . "/$distribution/Sources.gz"); add_url_to_download($uri . "/$distribution/Sources.bz2"); } @@ -364,6 +363,8 @@ foreach (@config_binaries) { add_url_to_download($url . $_ . "/binary-" . $arch . "/Packages.bz2"); } } else { + add_url_to_download($uri . "/$distribution/Release"); + add_url_to_download($uri . "/$distribution/Release.gpg"); add_url_to_download($uri . "/$distribution/Packages.gz"); add_url_to_download($uri . "/$distribution/Packages.bz2"); } @@ -453,6 +454,7 @@ sub proceed_index_gz { chomp $package; my (undef, %lines) = split(/^([\w\-]+:)/m, $package); + $lines{"Directory:"} = "" unless defined $lines{"Directory:"}; chomp(%lines); remove_spaces(\%lines); diff --git a/postmirror.sh b/postmirror.sh index 637d4731938a238633f91f3921e518c692f47280..0dfa8ad83765a4a83e50c445e2247cd3bf9a98e2 100644 --- a/postmirror.sh +++ b/postmirror.sh @@ -1,4 +1,13 @@ -#!bin/sh -e +#!/bin/sh -e ## anything in this file gets run AFTER the mirror has been run ## put your custom post mirror operations in here ( like rsyncing the installer files and running clean.sh automaticly ) + +## Example of grabbing the extra translations and installer files from ubuntu ( note rsync needs to be installed +## and in the path for this example to work correctly ) + +#rsync --recursive --times --links --hard-links --delete --delete-after rsync://mirror.anl.gov/ubuntu/dists/lucid/main/debian-installer /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/dists/lucid/main/ +#rsync --recursive --times --links --hard-links --delete --delete-after rsync://mirror.anl.gov/ubuntu/dists/lucid/main/dist-upgrader-all/ /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/dists/lucid/main/ +#rsync --recursive --times --links --hard-links --delete --delete-after rsync://mirror.anl.gov/ubuntu/dists/lucid/main/i18n/ /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/dists/lucid/main/ +#rsync --recursive --times --links --hard-links --delete --delete-after rsync://mirror.anl.gov/ubuntu/dists/lucid/main/installer-amd64/ /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/dists/lucid/main/ +#rsync --recursive --times --links --hard-links --delete --delete-after rsync://mirror.anl.gov/ubuntu/dists/lucid/main/installer-i386/ /var/spool/apt-mirror/mirror/archive.ubuntu.com/ubuntu/dists/lucid/main/