From f9006fd2e1959669fce652499328cad5ceed80502d557b83ff45009c2b3faba7 Mon Sep 17 00:00:00 2001 From: Andrii Nikitin Date: Thu, 16 Sep 2021 08:52:52 +0000 Subject: [PATCH] Accepting request 919463 from home:eroca:MirrorCache2 - Update to version 1.008 - Improve packaging, the conf.env is now in /etc/mirrorcache/ * Add script to generate and update cache.tar.xz OBS-URL: https://build.opensuse.org/request/show/919463 OBS-URL: https://build.opensuse.org/package/show/openSUSE:infrastructure:MirrorCache/MirrorCache?expand=0&rev=18 --- MirrorCache-1.007.obscpio | 3 --- MirrorCache-1.008.obscpio | 3 +++ MirrorCache-tmpfilesd.conf | 2 +- MirrorCache.changes | 17 +++++++++++++++++ MirrorCache.obsinfo | 6 +++--- MirrorCache.spec | 26 ++++++++++++++++---------- _service | 3 ++- cache.tar.xz | 3 +++ update-cache.sh | 20 ++++++++++++++++++++ 9 files changed, 65 insertions(+), 18 deletions(-) delete mode 100644 MirrorCache-1.007.obscpio create mode 100644 MirrorCache-1.008.obscpio create mode 100644 cache.tar.xz create mode 100644 update-cache.sh diff --git a/MirrorCache-1.007.obscpio b/MirrorCache-1.007.obscpio deleted file mode 100644 index 5709d80..0000000 --- a/MirrorCache-1.007.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8bdb7dabd1be54bb0fa24bddceb74104955dde8261746968f7e8f7bbdf356e5 -size 686604 diff --git a/MirrorCache-1.008.obscpio b/MirrorCache-1.008.obscpio new file mode 100644 index 0000000..1eee83d --- /dev/null +++ b/MirrorCache-1.008.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:788349e4a72fc6615061802c383c73d875224ae9dff85056920782a83d37efa6 +size 705548 diff --git a/MirrorCache-tmpfilesd.conf b/MirrorCache-tmpfilesd.conf index 9bcfe10..1b80935 100644 --- a/MirrorCache-tmpfilesd.conf +++ b/MirrorCache-tmpfilesd.conf @@ -1,2 +1,2 @@ # Type Path Mode UID GID Age Argument -d /var/lib/mirrorcache 0750 mirrorcache - - - +d /var/lib/mirrorcache 0750 mirrorcache mirrorcache - - diff --git a/MirrorCache.changes b/MirrorCache.changes index 800bfcf..1b70824 100644 --- a/MirrorCache.changes +++ b/MirrorCache.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Thu Sep 16 08:20:18 UTC 2021 - Andrii Nikitin + +- Update to version 1.008: + * Add GeoIP support for IP2Location db format + * Scan all mirrors when mirrorlist is requested + * Always render content of directory on disk for local root + * Cleanup server_capability_check more aggressively + * Add json format for listing content of directory + * Add experimental subtree feature + * Add experimental MIRRORCACHE_PROXY_URL variable + * Fix rendering when local folder has broken symbolic links + * Fix multiroot location in task folder_hashes_create + +- Improve packaging, the conf.env is now in /etc/mirrorcache/ + * Add script to generate and update cache.tar.xz + ------------------------------------------------------------------- Fri Sep 10 17:17:16 UTC 2021 - Elisei Roca diff --git a/MirrorCache.obsinfo b/MirrorCache.obsinfo index 082c5ae..539eff5 100644 --- a/MirrorCache.obsinfo +++ b/MirrorCache.obsinfo @@ -1,5 +1,5 @@ name: MirrorCache -version: 1.007 -mtime: 1631173530 -commit: e100d02a2e350932299ee611f7461535648c23f1 +version: 1.008 +mtime: 1631779118 +commit: 796d62620536fedae51d7345b37b8aac5a1d3c1d diff --git a/MirrorCache.spec b/MirrorCache.spec index 0c61c0a..509c9e5 100644 --- a/MirrorCache.spec +++ b/MirrorCache.spec @@ -16,20 +16,23 @@ # -%define mirrorcache_services mirrorcache.service mirrorcache-backstage.service mirrorcache-backstage-hashes.service +%define mirrorcache_services mirrorcache.service mirrorcache-backstage.service mirrorcache-backstage-hashes.service mirrorcache-subtree.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 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.007 +Version: 1.008 Release: 0 Summary: WebApp to redirect and manage mirrors License: GPL-2.0-or-later Group: Productivity/Networking/Web/Servers URL: https://github.com/openSUSE/MirrorCache -Source: %{name}-%{version}.tar.xz -Source1: %{name}-user.conf -Source2: %{name}-tmpfilesd.conf +Source0: %{name}-%{version}.tar.xz +Source1: cache.tar.xz +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 BuildRequires: %{build_requires} Requires: %{main_requires} Requires: perl(Minion) >= 10.0 @@ -40,11 +43,11 @@ BuildArch: noarch Mirror redirector web service, which automatically scans the main server and mirrors %prep -%setup -q +%setup -q -a1 %build # make {?_smp_mflags} -%sysusers_generate_pre %{SOURCE1} %{name} +%sysusers_generate_pre %{SOURCE2} %{name} %check @@ -55,8 +58,9 @@ mkdir -p %{buildroot}%{_sbindir} ln -s ../sbin/service %{buildroot}%{_sbindir}/rcmirrorcache ln -s ../sbin/service %{buildroot}%{_sbindir}/rcmirrorcache-backstage ln -s ../sbin/service %{buildroot}%{_sbindir}/rcmirrorcache-backstage-hashes -install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf -install -D -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf +ln -s ../sbin/service %{buildroot}%{_sbindir}/rcmirrorcache-subtree +install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf +install -D -m 0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/%{name}.conf %pre -f %{name}.pre %service_add_pre %{mirrorcache_services} @@ -77,16 +81,18 @@ install -D -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf %{_sbindir}/rcmirrorcache %{_sbindir}/rcmirrorcache-backstage %{_sbindir}/rcmirrorcache-backstage-hashes +%{_sbindir}/rcmirrorcache-subtree %{_sysusersdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf +%config(noreplace) %attr(-,root,mirrorcache) %{_sysconfdir}/mirrorcache/ %ghost %dir %attr(0750,mirrorcache,-) %{_localstatedir}/lib/mirrorcache/ # init %dir %{_unitdir} %{_unitdir}/mirrorcache.service %{_unitdir}/mirrorcache-backstage.service %{_unitdir}/mirrorcache-backstage-hashes.service +%{_unitdir}/mirrorcache-subtree.service # web libs %{_datadir}/mirrorcache -%attr(-,mirrorcache,-) %{_datadir}/mirrorcache/assets/cache %changelog diff --git a/_service b/_service index e8a80e3..8d9db8d 100644 --- a/_service +++ b/_service @@ -3,12 +3,13 @@ dist/rpm/MirrorCache.spec dist/rpm/MirrorCache-user.conf dist/rpm/MirrorCache-tmpfilesd.conf + dist/rpm/update-cache.sh git://github.com/openSUSE/MirrorCache.git @PARENT_TAG@ @PARENT_TAG@ git enable - andrii.nikitin@suse.com + Andrii Nikitin <andrii.nikitin@suse.com> diff --git a/cache.tar.xz b/cache.tar.xz new file mode 100644 index 0000000..f865d4b --- /dev/null +++ b/cache.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0e834748f621d66a685b939914e103ef306187e881e8e5edbf229f8fa4efbf3 +size 952732 diff --git a/update-cache.sh b/update-cache.sh new file mode 100644 index 0000000..bb54fd5 --- /dev/null +++ b/update-cache.sh @@ -0,0 +1,20 @@ +#! /bin/sh + +set -e + +export LC_ALL='en_US.UTF-8' +export LANG='en_US.UTF-8' +osc up +rm -f _service\:* +rm -f *.tar *.cpio +osc service lr +# special call for tar buildtime service +osc service lr tar + +SD=$PWD +cd MirrorCache +tools/generate-packed-assets +tar cvjf ../cache.tar.xz assets/cache assets/assetpack.db + +cd "$SD" +osc up