diff --git a/0001-Avoid-by-and-ru-mrrors-for-ua-requests.patch b/0001-Avoid-by-and-ru-mrrors-for-ua-requests.patch deleted file mode 100644 index 19f1ee6..0000000 --- a/0001-Avoid-by-and-ru-mrrors-for-ua-requests.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 7d9346897af13e5e5ca1752b7a9cfb5718305228 Mon Sep 17 00:00:00 2001 -From: Andrii Nikitin -Date: Thu, 1 Sep 2022 14:11:40 +0200 -Subject: [PATCH] Avoid by and ru mrrors for ua requests - ---- - lib/MirrorCache/Datamodule.pm | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -diff --git a/lib/MirrorCache/Datamodule.pm b/lib/MirrorCache/Datamodule.pm -index 5e5c2d8..7fb4cfd 100644 ---- a/lib/MirrorCache/Datamodule.pm -+++ b/lib/MirrorCache/Datamodule.pm -@@ -322,8 +322,18 @@ sub _init_location($self) { - $region = lc($p); - } - } -- if (my $p = $query->param('AVOID_COUNTRY')) { -+ $country = substr(lc($country), 0, 2) if $country; -+ $country = $country // ''; -+ my $p = $query->param('AVOID_COUNTRY'); -+ if ($p || $country eq 'ua') { - my @avoid_countries = (); -+ if ($country eq 'ua') { -+ if ($p) { -+ $p = $p . ',by,ru'; -+ } else { -+ $p = 'by,ru'; -+ } -+ } - for my $c (split ',', $p) { - next unless length($c) == 2; - $c = lc($c); -@@ -331,8 +341,8 @@ sub _init_location($self) { - $country = '' if $c eq lc($country // ''); - } - $self->_avoid_countries(\@avoid_countries); -- } -- $country = substr($country, 0, 2) if $country; -+ } -+ - $self->_country($country // ''); - $self->_region($region // ''); - } --- -2.35.3 - diff --git a/MirrorCache-1.039.obscpio b/MirrorCache-1.039.obscpio deleted file mode 100644 index ab5274f..0000000 --- a/MirrorCache-1.039.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e369406301d0dd98e368258ba2f24c664a9137194ecd7e4c70024217fecefd5a -size 976396 diff --git a/MirrorCache-1.040.obscpio b/MirrorCache-1.040.obscpio new file mode 100644 index 0000000..e262d2d --- /dev/null +++ b/MirrorCache-1.040.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5e79d1f08a8c8c09ac377d9a6130a6464182e3ee6fdd6baef262969a6827ac6 +size 978956 diff --git a/MirrorCache.changes b/MirrorCache.changes index c4b2852..f417437 100644 --- a/MirrorCache.changes +++ b/MirrorCache.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Sep 22 14:41:52 UTC 2022 - Andrii Nikitin + +- Update to version 1.040: + * Add parameter METALINK_GREEDY (#300) + * Optimization: assume package managers never want to render dir (#300) + * Fix mirror picked despite disabled in server_project table (#301) + * Avoid by and ru mirrors for ua requests (#298) + ------------------------------------------------------------------- Thu Sep 1 14:29:10 UTC 2022 - Elisei Roca diff --git a/MirrorCache.obsinfo b/MirrorCache.obsinfo index f6760ba..17fc69d 100644 --- a/MirrorCache.obsinfo +++ b/MirrorCache.obsinfo @@ -1,4 +1,4 @@ name: MirrorCache -version: 1.039 -mtime: 1661519611 -commit: 056db65ee5963af81f5b04c526dcc3f8df31e682 +version: 1.040 +mtime: 1663852168 +commit: 0545f63bb7a47082d6847ce218e9827fecd21e95 diff --git a/MirrorCache.spec b/MirrorCache.spec index 4d0de04..8cb86cb 100644 --- a/MirrorCache.spec +++ b/MirrorCache.spec @@ -22,7 +22,7 @@ %define main_requires %{assetpack_requires} perl(Carp) perl(DBD::Pg) >= 3.7.4 perl(DBI) >= 1.632 perl(DBIx::Class) >= 0.082801 perl(DBIx::Class::DynamicDefault) perl(DateTime) perl(Encode) perl(Time::Piece) perl(Time::Seconds) perl(Time::ParseDate) perl(DateTime::Format::Pg) perl(Exporter) perl(File::Basename) perl(LWP::UserAgent) perl(Mojo::Base) perl(Mojo::ByteStream) perl(Mojo::IOLoop) perl(Mojo::JSON) perl(Mojo::Pg) perl(Mojo::URL) perl(Mojo::Util) perl(Mojolicious::Commands) perl(Mojolicious::Plugin) perl(Mojolicious::Plugin::RenderFile) perl(Mojolicious::Static) perl(Net::OpenID::Consumer) perl(POSIX) perl(Sort::Versions) perl(URI::Escape) perl(XML::Writer) perl(base) perl(constant) perl(diagnostics) perl(strict) perl(warnings) shadow rubygem(sass) perl(Net::DNS) perl(LWP::Protocol::https) perl(Digest::SHA) %define build_requires %{assetpack_requires} rubygem(sass) tidy sysuser-shadow sysuser-tools Name: MirrorCache -Version: 1.039 +Version: 1.040 Release: 0 Summary: WebApp to redirect and manage mirrors License: GPL-2.0-or-later @@ -34,7 +34,6 @@ Source2: %{name}-user.conf Source3: %{name}-tmpfilesd.conf # use update-cache (or tools/generate-packed-assets) to generate/update cache.tar.xz Source101: update-cache.sh -Patch0: 0001-Avoid-by-and-ru-mrrors-for-ua-requests.patch BuildRequires: %{build_requires} Requires: %{main_requires} Requires: perl(Minion) >= 10.0 @@ -46,7 +45,6 @@ Mirror redirector web service, which automatically scans the main server and mir %prep %setup -q -a1 -%patch0 -p1 %build # make {?_smp_mflags}