Accepting request 1008401 from openSUSE:infrastructure:MirrorCache

Update to version 1.042

OBS-URL: https://build.opensuse.org/request/show/1008401
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/MirrorCache?expand=0&rev=19
This commit is contained in:
Richard Brown 2022-10-07 23:23:49 +00:00 committed by Git OBS Bridge
commit 308dbcb064
6 changed files with 33 additions and 56 deletions

View File

@ -1,47 +0,0 @@
From 7d9346897af13e5e5ca1752b7a9cfb5718305228 Mon Sep 17 00:00:00 2001
From: Andrii Nikitin <anikitin@suse.de>
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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e369406301d0dd98e368258ba2f24c664a9137194ecd7e4c70024217fecefd5a
size 976396

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5abd76c9dc816e84c479c3f3a0325f346304af1c42ba4feeb13e1dc5a5cbeaf5
size 987148

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
Thu Sep 29 09:47:07 UTC 2022 - Andrii Nikitin <andrii.nikitin@suse.com>
- Update to version 1.042:
* Add support for metalink4 format (#303)
* Add url parameter IP to simulate geo experience (#304)
* t: Fix CI after changes in async rendering in Mojo (#303)
-------------------------------------------------------------------
Tue Sep 27 11:42:51 UTC 2022 - Andrii Nikitin <andrii.nikitin@suse.com>
- Update to version 1.041:
* Fix metalink missing 'verification' tag (#302)
-------------------------------------------------------------------
Thu Sep 22 14:41:52 UTC 2022 - Andrii Nikitin <andrii.nikitin@suse.com>
- 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)
- Remove temporary patch, it is now included in sources
* 0001-Avoid-by-and-ru-mrrors-for-ua-requests.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Sep 1 14:29:10 UTC 2022 - Elisei Roca <eroca@suse.com> Thu Sep 1 14:29:10 UTC 2022 - Elisei Roca <eroca@suse.com>

View File

@ -1,4 +1,4 @@
name: MirrorCache name: MirrorCache
version: 1.039 version: 1.042
mtime: 1661519611 mtime: 1664444483
commit: 056db65ee5963af81f5b04c526dcc3f8df31e682 commit: b79e2f052f85c455161a636b56db7adc31d3ca67

View File

@ -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 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 %define build_requires %{assetpack_requires} rubygem(sass) tidy sysuser-shadow sysuser-tools
Name: MirrorCache Name: MirrorCache
Version: 1.039 Version: 1.042
Release: 0 Release: 0
Summary: WebApp to redirect and manage mirrors Summary: WebApp to redirect and manage mirrors
License: GPL-2.0-or-later License: GPL-2.0-or-later
@ -34,7 +34,6 @@ Source2: %{name}-user.conf
Source3: %{name}-tmpfilesd.conf Source3: %{name}-tmpfilesd.conf
# use update-cache (or tools/generate-packed-assets) to generate/update cache.tar.xz # use update-cache (or tools/generate-packed-assets) to generate/update cache.tar.xz
Source101: update-cache.sh Source101: update-cache.sh
Patch0: 0001-Avoid-by-and-ru-mrrors-for-ua-requests.patch
BuildRequires: %{build_requires} BuildRequires: %{build_requires}
Requires: %{main_requires} Requires: %{main_requires}
Requires: perl(Minion) >= 10.0 Requires: perl(Minion) >= 10.0
@ -46,7 +45,6 @@ Mirror redirector web service, which automatically scans the main server and mir
%prep %prep
%setup -q -a1 %setup -q -a1
%patch0 -p1
%build %build
# make {?_smp_mflags} # make {?_smp_mflags}