Este contenido sólo se encuentra disponible para miembros premium.
Si deseas hacerte premium, envíanos un mail a registro@algodelinux.com y te informaremos.
Si deseas hacerte premium, envíanos un mail a registro@algodelinux.com y te informaremos.
Lo siento, debes estar conectado para publicar un comentario.
Bufff, chico listo al tener el mirror en una máquina virtual 😉 … yo tengo el apt-mirror en el propio servidor y hasta que cambiemos de versión lo que he hecho es parchear el ejecutable /usr/bin/apt-mirror e incluirle a partir de la línea 611 este código:
######################################################################################
## DEP-11 index download
%urls_to_download = ();
sub find_dep11_files_in_release
{
# Look in the dists/$DIST/Release file for the DEP-11 files that belong
# to the given component.
my $dist_uri = shift;
my $component = shift;
my ( $release_uri, $release_path, $line ) = '';
$release_uri = $dist_uri . "Release";
$release_path = get_variable("skel_path") . "/" . sanitise_uri($release_uri);
unless ( open STREAM, "<$release_path" )
{
warn( "Failed to open Release file from " . $release_uri );
return;
}
my $checksums = 0;
while ( $line = )
{
chomp $line;
if ($checksums)
{
if ( $line =~ /^ +(.*)$/ )
{
my @parts = split( / +/, $1 );
if ( @parts == 3 )
{
my ( $sha1, $size, $filename ) = @parts;
if ( $filename =~ m{^$component/dep11/(Components-[^./]+.yml|icons-[^./]+.tar).gz$} )
{
add_url_to_download( $dist_uri . $filename, $size );
}
}
else
{
warn("Malformed checksum line "$1" in $release_uri");
}
}
else
{
$checksums = 0;
}
}
if ( not $checksums )
{
if ( $line eq "SHA256:" )
{
$checksums = 1;
}
}
}
}
print "Processing DEP-11 indexes: [";
foreach (@config_binaries)
{
my ( $arch, $uri, $distribution, @components ) = @{$_};
print "D";
if (@components)
{
$url = $uri . "/dists/" . $distribution . "/";
my $component;
foreach $component (@components)
{
find_dep11_files_in_release( $url, $component );
}
}
}
print "]nn";
push( @index_urls, sort keys %urls_to_download );
download_urls( "dep11", sort keys %urls_to_download );
foreach ( keys %urls_to_download )
{
s[^(w+)://][];
s[~][%7E]g if get_variable("_tilde");
$skipclean{$_} = 1;
}
##########################################################################################
con esto ya se baja los dichosos DEP-11 y furula !!!
Gracias Esteban.
Saludos.
Chico listo que tiene el mirror en una máquina virtual 😉 … para los terrenales como yo, que tenemos el apt-mirror en el servidor y que hasta que cambiemos de versión, no podremos disfrutar de ese nuevo apt-mirror, podemos parchear el ejecutable /usr/bin/apt-mirror y a partir de la línea 611 añadir este código:
######################################################################################
## DEP-11 index download
%urls_to_download = ();
sub find_dep11_files_in_release
{
# Look in the dists/$DIST/Release file for the DEP-11 files that belong
# to the given component.
my $dist_uri = shift;
my $component = shift;
my ( $release_uri, $release_path, $line ) = '';
$release_uri = $dist_uri . "Release";
$release_path = get_variable("skel_path") . "/" . sanitise_uri($release_uri);
unless ( open STREAM, "<$release_path" )
{
warn( "Failed to open Release file from " . $release_uri );
return;
}
my $checksums = 0;
while ( $line = )
{
chomp $line;
if ($checksums)
{
if ( $line =~ /^ +(.*)$/ )
{
my @parts = split( / +/, $1 );
if ( @parts == 3 )
{
my ( $sha1, $size, $filename ) = @parts;
if ( $filename =~ m{^$component/dep11/(Components-[^./]+.yml|icons-[^./]+.tar).gz$} )
{
add_url_to_download( $dist_uri . $filename, $size );
}
}
else
{
warn("Malformed checksum line "$1" in $release_uri");
}
}
else
{
$checksums = 0;
}
}
if ( not $checksums )
{
if ( $line eq "SHA256:" )
{
$checksums = 1;
}
}
}
}
print "Processing DEP-11 indexes: [";
foreach (@config_binaries)
{
my ( $arch, $uri, $distribution, @components ) = @{$_};
print "D";
if (@components)
{
$url = $uri . "/dists/" . $distribution . "/";
my $component;
foreach $component (@components)
{
find_dep11_files_in_release( $url, $component );
}
}
}
print "]nn";
push( @index_urls, sort keys %urls_to_download );
download_urls( "dep11", sort keys %urls_to_download );
foreach ( keys %urls_to_download )
{
s[^(w+)://][];
s[~][%7E]g if get_variable("_tilde");
$skipclean{$_} = 1;
}
############################################################################################
así se bajará los dichosos dep-11 …
Gracias Esteban.
Saludos.