diff --git a/0001-Avoid-by-and-ru-mrrors-for-ua-requests.patch b/0001-Avoid-by-and-ru-mrrors-for-ua-requests.patch new file mode 100644 index 0000000..19f1ee6 --- /dev/null +++ b/0001-Avoid-by-and-ru-mrrors-for-ua-requests.patch @@ -0,0 +1,47 @@ +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.037.obscpio b/MirrorCache-1.037.obscpio deleted file mode 100644 index 033d240..0000000 --- a/MirrorCache-1.037.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b445288e7ddb032061eb93b277853b856320c5ceabe89e1e7cf01be7b8bd6334 -size 972812 diff --git a/MirrorCache-1.039.obscpio b/MirrorCache-1.039.obscpio new file mode 100644 index 0000000..ab5274f --- /dev/null +++ b/MirrorCache-1.039.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e369406301d0dd98e368258ba2f24c664a9137194ecd7e4c70024217fecefd5a +size 976396 diff --git a/MirrorCache.changes b/MirrorCache.changes index 710576e..c4b2852 100644 --- a/MirrorCache.changes +++ b/MirrorCache.changes @@ -1,3 +1,31 @@ +------------------------------------------------------------------- +Thu Sep 1 14:29:10 UTC 2022 - Elisei Roca + +- Update assets cache + +------------------------------------------------------------------- +Thu Sep 1 14:09:37 UTC 2022 - Elisei Roca + +- Add temporary patch to avoid by and ru mirrors for ua requests + * 0001-Avoid-by-and-ru-mrrors-for-ua-requests.patch + +------------------------------------------------------------------- +Fri Aug 26 13:17:22 UTC 2022 - Andrii Nikitin + +- Update to version 1.039: + * Fix editing columns with underscore in /app (#297) + * Fix mirror report links in header (#297) + +------------------------------------------------------------------- +Wed Aug 24 08:12:10 UTC 2022 - Andrii Nikitin + +- Update to version 1.038: + * Control order of projects in mirrors report (#294) + * Include subsidiary url into region in /report/mirrors (#295) + * Add mirror report links to header in openSUSE template (#296) + * Add operator to mirrors report (#296) + * Add column sponsor to server table (#296) + ------------------------------------------------------------------- Thu Aug 11 15:10:05 UTC 2022 - Andrii Nikitin @@ -8,10 +36,10 @@ Thu Aug 11 15:10:05 UTC 2022 - Andrii Nikitin Fri Aug 05 12:14:42 UTC 2022 - Andrii Nikitin - Update to version 1.036: - * Fix mirrors report when missing folders (#288) - * Tweak systemd files (#291) - * Rework mirrors report (#290) - * Rescan if no country hit (#292) + * Fix mirrors report when missing folders (#288) + * Tweak systemd files (#291) + * Rework mirrors report (#290) + * Rescan if no country hit (#292) ------------------------------------------------------------------- Thu Jun 23 04:55:11 UTC 2022 - Andrii Nikitin diff --git a/MirrorCache.obsinfo b/MirrorCache.obsinfo index fc7e456..f6760ba 100644 --- a/MirrorCache.obsinfo +++ b/MirrorCache.obsinfo @@ -1,4 +1,4 @@ name: MirrorCache -version: 1.037 -mtime: 1660224542 -commit: 5281a9c79509f79aec972de25f37d12b0e099b85 +version: 1.039 +mtime: 1661519611 +commit: 056db65ee5963af81f5b04c526dcc3f8df31e682 diff --git a/MirrorCache.spec b/MirrorCache.spec index fbbfbc3..4d0de04 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.037 +Version: 1.039 Release: 0 Summary: WebApp to redirect and manage mirrors License: GPL-2.0-or-later @@ -34,6 +34,7 @@ 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 @@ -45,6 +46,7 @@ Mirror redirector web service, which automatically scans the main server and mir %prep %setup -q -a1 +%patch0 -p1 %build # make {?_smp_mflags} diff --git a/cache.tar.xz b/cache.tar.xz index 37b228c..da5ff95 100644 --- a/cache.tar.xz +++ b/cache.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ea726b688be35fb589e3ccfb99b851a4671447b167d5aa8574bf59bcaf81b73 -size 1035689 +oid sha256:8b9a45ba24087e5ee4521e23e87dbb9181967f3b971b08e23de3a8c96d9be454 +size 971064