diff -Nru debmirror-2.33ubuntu1/debian/changelog debmirror-2.34ubuntu1/debian/changelog --- debmirror-2.33ubuntu1/debian/changelog 2020-08-22 15:18:46.000000000 +0300 +++ debmirror-2.34ubuntu1/debian/changelog 2021-04-26 15:00:09.000000000 +0300 @@ -1,3 +1,33 @@ +debmirror (1:2.34ubuntu1) impish; urgency=medium + + * Merge from Debian testing (LP: #1926120). Remaining changes: + - debian/{control,rules}: Add quilt for patch management. + - Debian bug 455082: + + default-settings.patch: change rsync defaults. + + silence-errors.patch: throw away find errors. + + drop-redundant-rsync.patch: clean up logic in rsync batching. + + check_file-return.patch: report why a file needs to sync. + - Debian bug 576576: + + skip-installer.patch: allow specific releases to be skipped. + - ubuntu-settings.patch: Changed defaults to download Ubuntu, + replaced most instances of Debian with Ubuntu in the + documentation. + + -- Valters Jansons Mon, 26 Apr 2021 15:00:09 +0300 + +debmirror (1:2.34) unstable; urgency=medium + + [ Debian Janitor ] + * Bump debhelper from old 9 to 12. + * Fix day-of-week for changelog entry 20040926. + + [ Colin Watson ] + * Avoid two-argument open. + * Avoid bareword file handles. + * Correct example in debmirror(1) (closes: #970435). + + -- Colin Watson Sat, 06 Feb 2021 17:33:50 +0000 + debmirror (1:2.33ubuntu1) hirsute; urgency=medium * Resynchronise with Debian. (LP: #1892110) Remaining changes: @@ -988,7 +1018,7 @@ * Copy meta files in cases where hardlinks fail (afs) (Closes: #267956) * Unlink meta files before download (Closes: #264504) - -- Goswin von Brederlow Sun, 16 Sep 2004 14:29:34 +0200 + -- Goswin von Brederlow Thu, 16 Sep 2004 14:29:34 +0200 debmirror (20040802) unstable; urgency=low diff -Nru debmirror-2.33ubuntu1/debian/control debmirror-2.34ubuntu1/debian/control --- debmirror-2.33ubuntu1/debian/control 2020-08-22 15:18:46.000000000 +0300 +++ debmirror-2.34ubuntu1/debian/control 2021-04-26 14:59:12.000000000 +0300 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Colin Watson -Build-Depends: debhelper-compat (= 9), perl (>= 5.10), libnet-perl, libdigest-md5-perl, libdigest-sha-perl, liblockfile-simple-perl, libwww-perl (>= 5.815), perl (>= 5.22) | libnet-inet6glue-perl, quilt (>> 0.48-1) +Build-Depends: debhelper-compat (= 12), perl (>= 5.10), libnet-perl, libdigest-md5-perl, libdigest-sha-perl, liblockfile-simple-perl, libwww-perl (>= 5.815), perl (>= 5.22) | libnet-inet6glue-perl, quilt (>> 0.48-1) Standards-Version: 3.9.8 Vcs-Git: https://salsa.debian.org/debian/debmirror.git Vcs-Browser: https://salsa.debian.org/debian/debmirror diff -Nru debmirror-2.33ubuntu1/debian/patches/check_file-return.patch debmirror-2.34ubuntu1/debian/patches/check_file-return.patch --- debmirror-2.33ubuntu1/debian/patches/check_file-return.patch 2020-08-22 15:18:46.000000000 +0300 +++ debmirror-2.34ubuntu1/debian/patches/check_file-return.patch 2021-04-26 15:00:09.000000000 +0300 @@ -14,9 +14,9 @@ return 0; } my $disksize = -s _; -@@ -1696,11 +1697,16 @@ - open HANDLE, $filename or die "$filename: $!"; - $summer->addfile(*HANDLE); +@@ -1697,11 +1698,16 @@ + $summer->addfile($handle); + close $handle; return 1 if $checksum eq $summer->hexdigest; + say(sprintf("Mismatch '$filename': sum is %s, expected %s", $summer->hexdigest, $checksum)) + if ($verbose); diff -Nru debmirror-2.33ubuntu1/debian/patches/silence-errors.patch debmirror-2.34ubuntu1/debian/patches/silence-errors.patch --- debmirror-2.33ubuntu1/debian/patches/silence-errors.patch 2020-08-22 15:18:46.000000000 +0300 +++ debmirror-2.34ubuntu1/debian/patches/silence-errors.patch 2021-04-26 15:00:09.000000000 +0300 @@ -24,7 +24,7 @@ } if ($res != 0) { -@@ -2942,7 +2942,7 @@ +@@ -2945,7 +2945,7 @@ my $ignore; $ignore = "(".join("|", @ignores).")" if @ignores; # Remove all files in the mirror that we don't know about @@ -33,7 +33,7 @@ chomp $file; $file=~s:^\./::; next if (@di_dists && $file =~ m:installer-\w(-|\w)*/current/images/:); -@@ -3085,11 +3085,11 @@ +@@ -3088,11 +3088,11 @@ sub di_cleanup { # Clean up obsolete files @@ -47,7 +47,7 @@ chomp $file; $file=~s:^\./::; if (! exists $di_files{$image_dir} || ! exists $di_files{$image_dir}{$file}) { -@@ -3105,7 +3105,7 @@ +@@ -3108,7 +3108,7 @@ # Clean up temporary D-I files (silently) if (-d "$tempdir/d-i") { chdir("$tempdir/d-i") or die "unable to chdir($tempdir/d-i): $!\n"; diff -Nru debmirror-2.33ubuntu1/debian/patches/skip-installer.patch debmirror-2.34ubuntu1/debian/patches/skip-installer.patch --- debmirror-2.33ubuntu1/debian/patches/skip-installer.patch 2020-08-22 15:18:46.000000000 +0300 +++ debmirror-2.34ubuntu1/debian/patches/skip-installer.patch 2021-04-26 15:00:09.000000000 +0300 @@ -43,7 +43,7 @@ # Display configuration. $|=1 if $debug; -@@ -2950,11 +2957,15 @@ +@@ -2953,11 +2960,15 @@ di_cleanup() if @di_dists; } diff -Nru debmirror-2.33ubuntu1/debian/patches/ubuntu-settings.patch debmirror-2.34ubuntu1/debian/patches/ubuntu-settings.patch --- debmirror-2.33ubuntu1/debian/patches/ubuntu-settings.patch 2020-08-22 15:18:46.000000000 +0300 +++ debmirror-2.34ubuntu1/debian/patches/ubuntu-settings.patch 2021-04-26 15:00:09.000000000 +0300 @@ -51,7 +51,7 @@ =item B<-d>, B<--dist>=I -Specify the distribution (etch, lenny, squeeze, sid) of Debian to -+Specify the distribution (lucid, oneiric, precise) of Ubuntu to ++Specify the distribution (bionic, focal, impish) of Ubuntu to mirror. This switch may be used multiple times, and multiple distributions may be specified at once, separated by commas. @@ -69,13 +69,13 @@ debmirror /srv/mirror/debian -Make a mirror of i386 and sparc binaries, main only, and include both unstable --and testing versions of Debian; download from 'ftp.kernel.org': +-and testing versions of Debian; download from 'ftp.nl.debian.org': +Make a mirror of i386 and amd64 binaries, main and universe only, and include +both LTS and latest versions of Ubuntu; download from 'archive.ubuntu.com': - debmirror -a i386,sparc -d sid -d etch -s main --nosource \ - -h ftp.nl.debian.org --progress $HOME/mirror/debian -+ debmirror -a i386,amd64 -d lucid -d precise -s main,universe --nosource \ ++ debmirror -a i386,amd64 -d focal -d impish -s main,universe --nosource \ + -h archive.ubuntu.com --progress $HOME/mirror/debian Make a mirror using rsync (rsync server is 'ftp.debian.org::debian'), @@ -117,14 +117,14 @@ # If the user entered nothing, provide defaults. @dists=split(/,/,join(',',@dists)); -@dists=qw(sid) unless @dists; -+@dists=qw(precise) unless @dists; ++@dists=qw(impish) unless @dists; @sections=split(/,/,join(',',@sections)); -@sections=qw(main contrib non-free main/debian-installer) unless @sections; +@sections=qw(main main/debian-installer universe restricted multiverse) unless @sections; @arches=split(/,/,join(',',@arches)); @arches=qw(i386) unless @arches; @arches=() if (join(',',@arches) eq "none"); -@@ -3310,7 +3310,7 @@ +@@ -3313,7 +3313,7 @@ by Colin Watson . The author disclaims any responsibility for any mangling of your system, @@ -150,7 +150,7 @@ $download_method="ftp"; -@dists="sid"; -@sections="main,main/debian-installer,contrib,non-free"; -+@dists="precise"; ++@dists="impish"; +@sections="main,main/debian-installer,universe,restricted,multiverse"; @arches="i386"; # @ignores=""; diff -Nru debmirror-2.33ubuntu1/debmirror debmirror-2.34ubuntu1/debmirror --- debmirror-2.33ubuntu1/debmirror 2020-08-22 15:18:46.000000000 +0300 +++ debmirror-2.34ubuntu1/debmirror 2021-04-26 15:00:09.000000000 +0300 @@ -535,7 +535,7 @@ debmirror /srv/mirror/debian Make a mirror of i386 and sparc binaries, main only, and include both unstable -and testing versions of Debian; download from 'ftp.kernel.org': +and testing versions of Debian; download from 'ftp.nl.debian.org': debmirror -a i386,sparc -d sid -d etch -s main --nosource \ -h ftp.nl.debian.org --progress $HOME/mirror/debian @@ -1046,9 +1046,9 @@ foreach my $dist (keys %distset) { next unless exists $distset{$dist}{mirror}; # Parse the Release and extract the files listed for all checksum types. - if (open RELEASE, "<$tempdir/dists/$dist/Release") { + if (open my $release, "<", "$tempdir/dists/$dist/Release") { my $checksum_type; - while () { + while (<$release>) { if (/^(MD5Sum|SHA\d+):/) { $checksum_type=$1; } @@ -1058,7 +1058,7 @@ $file_lists{"$tempdir/dists/$dist/$filename"}{size} = $size; } } - close RELEASE; + close $release; } } @@ -1211,9 +1211,9 @@ foreach my $file (@package_files) { next if (!-f $file); - open(FILE, "<", $file) or die "$file: $!"; + open(my $fh, "<", $file) or die "$file: $!"; for (;;) { - unless (defined( $_ = )) { + unless (defined( $_ = <$fh> )) { last if eof; die "$file: $!" if $!; } @@ -1258,15 +1258,15 @@ } $empty_mirror = 0; } - close(FILE); + close($fh); } foreach my $file (@source_files) { next if (!-f $file); - open(FILE, "<", $file) or die "$file: $!"; + open(my $fh, "<", $file) or die "$file: $!"; SOURCE: for (;;) { my $stanza; - unless (defined( $stanza = )) { + unless (defined( $stanza = <$fh> )) { last if eof; die "$file: $!" if $!; } @@ -1346,7 +1346,7 @@ } $empty_mirror = 0; } - close(FILE); + close($fh); } # Sanity check to avoid completely nuking a mirror. @@ -1578,9 +1578,9 @@ my $trace_dists = join(' ', @dists); my $trace_arches = join(' ', @arches); $trace_arches .= ' source' if $do_source; - open OUT, ">$tracefile" or die "$tracefile: $!"; - print OUT `LC_ALL=C date -u`; - print OUT <', $tracefile or die "$tracefile: $!"; + print $out `LC_ALL=C date -u`; + print $out <addfile(*HANDLE); + open my $handle, "<", $filename or die "$filename: $!"; + $summer->addfile($handle); + close $handle; return 1 if $checksum eq $summer->hexdigest; } else { @@ -1726,8 +1727,9 @@ if (-f "$filename.gz") { system_redirect_io("gzip -d", "$filename.gz", "$filename"); if ($size == -s $filename) { - open HANDLE, $filename or die "$filename: $!"; - $digest->addfile(*HANDLE); + open my $handle, "<", $filename or die "$filename: $!"; + $digest->addfile($handle); + close $handle; $ret = ($sha1 eq $digest->hexdigest); } unlink ($filename); @@ -2348,12 +2350,12 @@ if (-f "$tdir/Release") { my $buf = ""; - if (open RELEASE, "<$tdir/Release") { - while () { + if (open my $release, "<", "$tdir/Release") { + while (<$release>) { last if /^MD5Sum:/; $buf = $buf . $_; } - close RELEASE; + close $release; } $_ = $buf; @@ -2811,21 +2813,20 @@ sub fetch_and_apply_diffs { my ($fetch_only, $subdir, $type) = @_; - local (*INDEX, *FILE); my (%history_sha1, %history_size, %diff_sha1, %diff_size); my ($current_sha1, $current_size, $sha1, $size, $file, $digest, $ret); my $t = $num_errors; # Parse DiffIndex file - open(INDEX, "$tempdir/$subdir/$type.diff/Index") or die "$tempdir/$subdir/$type.diff/Index: $!"; - $_ = ; + open(my $index, "<", "$tempdir/$subdir/$type.diff/Index") or die "$tempdir/$subdir/$type.diff/Index: $!"; + $_ = <$index>; while (defined($_)) { if (m/^SHA1-Current:/m) { ($current_sha1, $current_size) = m/^SHA1-Current:\s+([A-Za-z0-9]+)\s+(\d+)/m; - $_ = ; + $_ = <$index>; } elsif (m/^SHA1-History:/m) { - while (defined($_ = )) { + while (defined($_ = <$index>)) { last if (!m/^\s/m); ($sha1, $size, $file) = m/^\s+([A-Za-z0-9]+)\s+(\d+)\s+(.*)/m; $history_sha1{$file} = $sha1; @@ -2833,7 +2834,7 @@ } } elsif (m/^SHA1-Patches:/m) { - while (defined($_ = )) { + while (defined($_ = <$index>)) { last if (!m/^\s/m); ($sha1, $size, $file) = m/^\s+([A-Za-z0-9]+)\s+(\d+)\s+(.*)/m; $diff_sha1{$file} = $sha1; @@ -2841,10 +2842,10 @@ } } else { - $_ = ; + $_ = <$index>; } } - close(INDEX); + close($index); # Download diff files as necessary $ret = 1; @@ -2869,9 +2870,10 @@ return if ($fetch_only || ! $ret); # Apply diff files - open(FILE, "$tempdir/$subdir/$type") or return; + open(my $fh, "<", "$tempdir/$subdir/$type") or return; $digest = Digest::SHA->new(1); - $digest->addfile(*FILE); + $digest->addfile($fh); + close($fh); $sha1 = $digest->hexdigest; $size = -s "$tempdir/$subdir/$type"; foreach $file (sort keys %history_sha1) { @@ -2881,9 +2883,10 @@ unlink "$tempdir/$subdir/$type"; return; } - open(FILE, "$tempdir/$subdir/$type") or return; + open(my $fh, "<", "$tempdir/$subdir/$type") or return; $digest = Digest::SHA->new(1); - $digest->addfile(*FILE); + $digest->addfile($fh); + close($fh); $sha1 = $digest->hexdigest; $size = -s "$tempdir/$subdir/$type"; say("$subdir/$type patched with $subdir/$type.diff/$file.gz"); @@ -3016,8 +3019,8 @@ local $/; undef $/; # Read whole file - open(FILE, "<", "$tdir/$image_dir/MD5SUMS") or die "$tdir/$image_dir/MD5SUMS: $!"; - $_ = ; + open(my $fh, "<", "$tdir/$image_dir/MD5SUMS") or die "$tdir/$image_dir/MD5SUMS: $!"; + $_ = <$fh>; while (m/^([A-Za-z0-9]{32} .*)/mg) { my ($md5sum, $filename) = split(' ', $1, 3); $filename =~ s:^\./::; @@ -3034,7 +3037,7 @@ $di_files{$image_dir}{$filename}{status} = 0; } } - close(FILE); + close($fh); } } }