Skip to content
Snippets Groups Projects
Commit 9958a3b6 authored by Brandon Holtsclaw's avatar Brandon Holtsclaw
Browse files

Imported Upstream version 0.4.8

parent 61d938d9
No related branches found
No related tags found
No related merge requests found
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
......
......@@ -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);
......
#!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/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment