Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package MirrorCache for openSUSE:Factory checked in at 2026-06-10 16:15:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/MirrorCache (Old) and /work/SRC/openSUSE:Factory/.MirrorCache.new.2375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "MirrorCache" Wed Jun 10 16:15:45 2026 rev:59 rq:1358517 version:1.105 Changes: -------- --- /work/SRC/openSUSE:Factory/MirrorCache/MirrorCache.changes 2025-11-13 18:17:34.014469821 +0100 +++ /work/SRC/openSUSE:Factory/.MirrorCache.new.2375/MirrorCache.changes 2026-06-10 16:19:15.933644084 +0200 @@ -1,0 +2,7 @@ +Wed Jun 03 10:31:11 UTC 2026 - Andrii Nikitin <[email protected]> + +- Update to version 1.105: + * Add ua to avoid_countries for ru and by + * Extend list of sanctioning countries for ru and by mirrors + +------------------------------------------------------------------- Old: ---- MirrorCache-1.104.obscpio New: ---- MirrorCache-1.105.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ MirrorCache.spec ++++++ --- /var/tmp/diff_new_pack.sZQUG0/_old 2026-06-10 16:19:17.137693981 +0200 +++ /var/tmp/diff_new_pack.sZQUG0/_new 2026-06-10 16:19:17.137693981 +0200 @@ -1,7 +1,7 @@ # # spec file for package MirrorCache # -# Copyright (c) 2021,2025 SUSE LLC +# Copyright (c) 2021-2026 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,10 +20,19 @@ %define mirrorcache_services %{mirrorcache_services_restart} mirrorcache-hypnotoad.service %define assetpack_requires perl(CSS::Minifier::XS) >= 0.01 perl(JavaScript::Minifier::XS) >= 0.11 perl(Mojolicious::Plugin::AssetPack) >= 1.36 perl(IO::Socket::SSL) %define common_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(POSIX) perl(Sort::Versions) perl(URI::Escape) perl(XML::Writer) perl(base) perl(constant) perl(diagnostics) perl(strict) perl(warnings) shadow perl(Net::DNS) perl(LWP::Protocol::https) perl(Digest::SHA) perl(Config::IniFiles) -%define main_requires %{assetpack_requires} perl(Mojolicious::Plugin::RenderFile) perl(Mojolicious::Static) perl(Net::OpenID::Consumer) rubygem(sass) -%define build_requires %{assetpack_requires} rubygem(sass) tidy sysuser-shadow sysuser-tools +%if 0%{?suse_version} < 1570 +# SLE <= 15 has older Perl not providing a sufficiently recent +# ExtUtils::ParseXS needed by ExtUtils::CppGuess +# See https://progress.opensuse.org/issues/162500 for details +%define sass_requires rubygem(sass) +%else +# The following line is generated from dependencies.yaml +%define sass_requires perl(CSS::Sass) +%endif +%define main_requires %{assetpack_requires} perl(Mojolicious::Plugin::RenderFile) perl(Mojolicious::Static) perl(Net::OpenID::Consumer) %{sass_requires} +%define build_requires %{assetpack_requires} %{sass_requires} tidy sysuser-shadow sysuser-tools Name: MirrorCache -Version: 1.104 +Version: 1.105 Release: 0 Summary: WebApp to redirect and manage mirrors License: GPL-2.0-or-later @@ -63,7 +72,6 @@ ln -s ../sbin/service %{buildroot}%{_sbindir}/rcmirrorcache ln -s ../sbin/service %{buildroot}%{_sbindir}/rcmirrorcache-hypnotoad ln -s ../sbin/service %{buildroot}%{_sbindir}/rcmirrorcache-backstage -ln -s ../sbin/service %{buildroot}%{_sbindir}/rcmirrorcache-backstage-exec ln -s ../sbin/service %{buildroot}%{_sbindir}/rcmirrorcache-backstage-hashes ln -s ../sbin/service %{buildroot}%{_sbindir}/rcmirrorcache-subtree install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf ++++++ MirrorCache-1.104.obscpio -> MirrorCache-1.105.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.104/lib/MirrorCache/Datamodule.pm new/MirrorCache-1.105/lib/MirrorCache/Datamodule.pm --- old/MirrorCache-1.104/lib/MirrorCache/Datamodule.pm 2025-11-06 15:13:54.000000000 +0100 +++ new/MirrorCache-1.105/lib/MirrorCache/Datamodule.pm 2026-06-03 12:27:59.000000000 +0200 @@ -483,6 +483,14 @@ } } +my $sanctioned_countries = { + map { $_ => 1 } qw( + al ad au bs ca is jp li fm mc me nz mk no sm sg kr ch tw ua gb us + at be bg hr cy cz dk ee fi fr de gr hu ie it lv lt lu mt nl pl pt ro sk si es se + je ai vg gi + ) +}; + sub _init_location($self) { my $query = $self->c->req->url->query; if (my $p = $query->param('IP')) { @@ -510,7 +518,8 @@ } my $p = $query->param('AVOID_COUNTRY'); my @avoid_countries = (); - @avoid_countries = ('by', 'ru') if $country eq 'ua'; + @avoid_countries = ('by', 'ru') if $sanctioned_countries->{$country}; + @avoid_countries = ('ua') if $country eq 'ru' || $country eq 'by'; if ($p) { for my $c (split ',', $p) { next unless length($c) == 2; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.104/t/environ/20-sanctioned-countries.sh new/MirrorCache-1.105/t/environ/20-sanctioned-countries.sh --- old/MirrorCache-1.104/t/environ/20-sanctioned-countries.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/MirrorCache-1.105/t/environ/20-sanctioned-countries.sh 2026-06-03 12:27:59.000000000 +0200 @@ -0,0 +1,79 @@ +#!lib/test-in-container-environ.sh +set -ex + +mc=$(environ mc $(pwd)) + +$mc/start + +ru=$(environ ap6) +by=$(environ ap7) +de=$(environ ap8) + +for x in $mc $ru $by $de; do + mkdir -p $x/dt/test + echo "content" > $x/dt/test/file.txt +done + +$ru/start +$by/start +$de/start + +# Configure mirrors +# ap6 -> ru +$mc/sql "insert into server(hostname,urldir,enabled,country,region) select '$($ru/print_address)','','t','ru','eu'" +# ap7 -> by +$mc/sql "insert into server(hostname,urldir,enabled,country,region) select '$($by/print_address)','','t','by','eu'" +# ap8 -> de +$mc/sql "insert into server(hostname,urldir,enabled,country,region) select '$($de/print_address)','','t','de','eu'" + +$mc/backstage/job -e folder_sync -a '["/test"]' +$mc/backstage/job -e mirror_scan -a '["/test"]' +$mc/backstage/shoot + +# Test 1: Request from UA (sanctioned country) +# Expectation: RU and BY mirrors are avoided. DE mirror is used. +echo "Testing request from UA..." +out=$($mc/curl "/download/test/file.txt.metalink?COUNTRY=ua") + +if echo "$out" | grep -q "$($ru/print_address)"; then + echo "FAIL: UA request got RU mirror" + exit 1 +fi +if echo "$out" | grep -q "$($by/print_address)"; then + echo "FAIL: UA request got BY mirror" + exit 1 +fi +if ! echo "$out" | grep -q "$($de/print_address)"; then + echo "FAIL: UA request did not get DE mirror" + exit 1 +fi + +# Test 2: Request from DE (sanctioning country) +# Expectation: RU and BY mirrors are avoided. +echo "Testing request from DE..." +out_de=$($mc/curl "/download/test/file.txt.metalink?COUNTRY=de") + +if echo "$out_de" | grep -q "$($ru/print_address)"; then + echo "FAIL: DE request got RU mirror" + exit 1 +fi +if echo "$out_de" | grep -q "$($by/print_address)"; then + echo "FAIL: DE request got BY mirror" + exit 1 +fi +if ! echo "$out_de" | grep -q "$($de/print_address)"; then + echo "FAIL: DE request did not get DE mirror" + exit 1 +fi + +# Test 3: Request from RU +# Expectation: RU mirror is available. +echo "Testing request from RU..." +out_ru=$($mc/curl "/download/test/file.txt.metalink?COUNTRY=ru") + +if ! echo "$out_ru" | grep -q "$($ru/print_address)"; then + echo "FAIL: RU request did not get RU mirror" + exit 1 +fi + +echo "success" \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MirrorCache-1.104/t/lib/Dockerfile.environ.mariadb.experimental new/MirrorCache-1.105/t/lib/Dockerfile.environ.mariadb.experimental --- old/MirrorCache-1.104/t/lib/Dockerfile.environ.mariadb.experimental 2025-11-06 15:13:54.000000000 +0100 +++ new/MirrorCache-1.105/t/lib/Dockerfile.environ.mariadb.experimental 2026-06-03 12:27:59.000000000 +0200 @@ -4,8 +4,10 @@ ENV LANG en_US.UTF-8 RUN zypper -n in curl # rpm --import needs curl atm +RUN curl -IL https://mirror.mariadb.org/yum/11.8/sles15-amd64/repodata/repomd.xml RUN zypper ar -f http://cdn.opensuse.org/repositories/openSUSE:infrastructure:MirrorCache/15.6 mc -RUN zypper ar -f https://mirror.mariadb.org/yum/11.4/sles15-amd64 mariadb +# RUN zypper ar -f https://mirror.mariadb.org/yum/11.8/sles15-amd64 mariadb +RUN zypper ar -f https://mirror.netcologne.de/mariadb/mariadb-11.8.8/yum/sles/15.7/x86_64 mariadb RUN rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB RUN zypper --gpg-auto-import-keys ref ++++++ MirrorCache.obsinfo ++++++ --- /var/tmp/diff_new_pack.sZQUG0/_old 2026-06-10 16:19:17.789721001 +0200 +++ /var/tmp/diff_new_pack.sZQUG0/_new 2026-06-10 16:19:17.793721167 +0200 @@ -1,5 +1,5 @@ name: MirrorCache -version: 1.104 -mtime: 1762438434 -commit: 207d61237c0597f8f4ff9d7ad12c4f9cb5d5cd1f +version: 1.105 +mtime: 1780482479 +commit: 1c75c08bbf7c8be45f96787882d949380060c48b ++++++ cache.tar.xz ++++++
