Skip to content
Snippets Groups Projects
Commit bd927556 authored by Jonas Smedegaard's avatar Jonas Smedegaard
Browse files

Import Upstream version 0.5.4

parent ccd078f8
Branches upstream
Tags upstream/0.5.4
No related merge requests found
0.5.4 (2017-05-29)
* Add limit_rate to example mirror.list (fixes #72)
* Fix use of uninitialized value $config{"options"} warning (fixes #68,
Debian bug #851979, #859601)
* Fix warning on repository without md5sum (fixes #66)
* Write SHA1 and SHA256 in addition to MD5
* Also download xz-compressed Components-$arch.yml.xz (fixes #69)
0.5.3 (2017-01-06)
* Add support for 'deb [arch=amd64] ...' format (fixes #32, #65)
* Create directories including their parents
......
VERSION := 0.5.3
VERSION := 0.5.4
DIST := apt-mirror CHANGELOG LICENSE Makefile mirror.list postmirror.sh README.md .perltidyrc
BASE_PATH := /var/spool/apt-mirror
PREFIX ?= /usr/local
......
......@@ -294,7 +294,7 @@ sub parse_config_line
if ( $line =~ $pattern_deb_line ) {
$config{'type'} = $+{type};
$config{'arch'} = $+{arch};
$config{'options'} = $+{options};
$config{'options'} = $+{options} ? $+{options} : "";
$config{'uri'} = $+{uri};
$config{'components'} = $+{components};
if ( $config{'options'} =~ /arch=((?<arch>[\w\-]+)[,]*)/g ) {
......@@ -666,7 +666,7 @@ sub find_dep11_files_in_release
if ( @parts == 3 )
{
my ( $sha1, $size, $filename ) = @parts;
if ( $filename =~ m{^$component/dep11/(Components-${arch}\.yml|icons-[^./]+\.tar)\.gz$} )
if ( $filename =~ m{^$component/dep11/(Components-${arch}\.yml|icons-[^./]+\.tar)\.(gz|bz2|xz)$} )
{
add_url_to_download( $dist_uri . $filename, $size );
}
......@@ -729,6 +729,8 @@ foreach ( keys %urls_to_download )
open FILES_ALL, ">" . get_variable("var_path") . "/ALL" or die("apt-mirror: can't write to intermediate file (ALL)");
open FILES_NEW, ">" . get_variable("var_path") . "/NEW" or die("apt-mirror: can't write to intermediate file (NEW)");
open FILES_MD5, ">" . get_variable("var_path") . "/MD5" or die("apt-mirror: can't write to intermediate file (MD5)");
open FILES_SHA1, ">" . get_variable("var_path") . "/SHA1" or die("apt-mirror: can't write to intermediate file (SHA1)");
open FILES_SHA256, ">" . get_variable("var_path") . "/SHA256" or die("apt-mirror: can't write to intermediate file (SHA256)");
my %stat_cache = ();
......@@ -813,7 +815,9 @@ sub process_index
{ # Packages index
$skipclean{ remove_double_slashes( $path . "/" . $lines{"Filename:"} ) } = 1;
print FILES_ALL remove_double_slashes( $path . "/" . $lines{"Filename:"} ) . "\n";
print FILES_MD5 $lines{"MD5sum:"} . " " . remove_double_slashes( $path . "/" . $lines{"Filename:"} ) . "\n";
print FILES_MD5 $lines{"MD5sum:"} . " " . remove_double_slashes( $path . "/" . $lines{"Filename:"} ) . "\n" if defined $lines{"MD5sum:"};
print FILES_SHA1 $lines{"SHA1:"} . " " . remove_double_slashes( $path . "/" . $lines{"Filename:"} ) . "\n" if defined $lines{"SHA1:"};
print FILES_SHA256 $lines{"SHA256:"} . " " . remove_double_slashes( $path . "/" . $lines{"Filename:"} ) . "\n" if defined $lines{"SHA256:"};
if ( need_update( $mirror . "/" . $lines{"Filename:"}, $lines{"Size:"} ) )
{
print FILES_NEW remove_double_slashes( $uri . "/" . $lines{"Filename:"} ) . "\n";
......@@ -887,6 +891,8 @@ print "]\n\n";
close FILES_ALL;
close FILES_NEW;
close FILES_MD5;
close FILES_SHA1;
close FILES_SHA256;
######################################################################################
## Main download
......
......@@ -6,6 +6,7 @@ set postmirror_script $var_path/postmirror.sh
set defaultarch i386
set run_postmirror 0
set nthreads 20
set limit_rate 100m
set _tilde 0
# Use --unlink with wget (for use with hardlinked directories)
set unlink 1
......
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