From edc5e22392db0b552fda7db1642b304fe648d31170ff9c5eaf84435e6ef18a4c Mon Sep 17 00:00:00 2001 From: Elisei Roca Date: Thu, 12 Aug 2021 12:43:25 +0000 Subject: [PATCH] Accepting request 911818 from home:eroca:branches:MirrorCache * Switch to manual in _service for the sources (to be able to submit to factory) * Add changesgenerate service so that `osc service manualrun` - gets new sources, extracts everything from dist/rpm - create a changes file entry (still needs to be checked as it puts changes from previous releases) * Add complete changelog OBS-URL: https://build.opensuse.org/request/show/911818 OBS-URL: https://build.opensuse.org/package/show/openSUSE:infrastructure:MirrorCache/MirrorCache?expand=0&rev=12 --- MirrorCache-1.006.obscpio | 3 + ...pfilesd.conf => MirrorCache-tmpfilesd.conf | 0 ...orCache-user.conf => MirrorCache-user.conf | 0 MirrorCache.changes | 131 +++++++++++++++++- MirrorCache.obsinfo | 5 + ...s_scm:MirrorCache.spec => MirrorCache.spec | 0 _service | 12 +- _service:obs_scm:MirrorCache-1.006.obscpio | 3 - _service:obs_scm:MirrorCache.changes | 9 -- _service:obs_scm:MirrorCache.obsinfo | 5 - _service:obs_scm:MirrorCache.spec | 92 ------------ 11 files changed, 141 insertions(+), 119 deletions(-) create mode 100644 MirrorCache-1.006.obscpio rename _service:obs_scm:MirrorCache-tmpfilesd.conf => MirrorCache-tmpfilesd.conf (100%) rename _service:obs_scm:MirrorCache-user.conf => MirrorCache-user.conf (100%) create mode 100644 MirrorCache.obsinfo rename _service:set_version:obs_scm:MirrorCache.spec => MirrorCache.spec (100%) delete mode 100644 _service:obs_scm:MirrorCache-1.006.obscpio delete mode 100644 _service:obs_scm:MirrorCache.changes delete mode 100644 _service:obs_scm:MirrorCache.obsinfo delete mode 100644 _service:obs_scm:MirrorCache.spec diff --git a/MirrorCache-1.006.obscpio b/MirrorCache-1.006.obscpio new file mode 100644 index 0000000..3b13183 --- /dev/null +++ b/MirrorCache-1.006.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae70139a63a340772884ee935a185d247a23441b19c9094def0667e34a03236a +size 671756 diff --git a/_service:obs_scm:MirrorCache-tmpfilesd.conf b/MirrorCache-tmpfilesd.conf similarity index 100% rename from _service:obs_scm:MirrorCache-tmpfilesd.conf rename to MirrorCache-tmpfilesd.conf diff --git a/_service:obs_scm:MirrorCache-user.conf b/MirrorCache-user.conf similarity index 100% rename from _service:obs_scm:MirrorCache-user.conf rename to MirrorCache-user.conf diff --git a/MirrorCache.changes b/MirrorCache.changes index 0ea0954..de11b8c 100644 --- a/MirrorCache.changes +++ b/MirrorCache.changes @@ -1,9 +1,126 @@ -0.3 2021-04-24 - - Remove column db_sync_for_country from /app/folder +------------------------------------------------------------------- +Thu Aug 12 11:42:34 UTC 2021 - andrii.nikitin@suse.com -0.2 2021-04-22 - - Add table 'demand' for tracking mirror scans per country +- Update to version 1.006: + * Fix a small but significant typo + * Tests: add rsync to Dockerfile + * Add metalink content-type and content-disposition -0.1 2021-04-21 - - Start of change log - - Add automatic deployment of DB +- Update to version 1.005: + * Use hostname_vpn if defined for mirror scan + * Add support for requests over vpn + * Use the Digest::SHA builtin module (#175) + * Replace Sort::Naturally with Sort::Versions (#174) + * Do not show /download path in mirrorlist when TOP_FOLDERS is set + * Add mirrorcache-backstage-hashes.service + * Log no miss for mirrorlist requests from country outside of region of subsidiary + * Add test_local, test_docker and test_systemd to Makefile + * Add column mirrorlist to stat table + * Add concept of project + +- Update to version 1.006: + * Fix a small but significant typo + * Tests: add rsync to Dockerfile + * Add metalink content-type and content-disposition + +- Update to version 1.005: + * Use hostname_vpn if defined for mirror scan + * Add support for requests over vpn: + parameter MIRRORCACHE_REDIRECT_VPN and new column server.hostname_vpn + * Use the Digest::SHA builtin module + * Improve file sorting by using Sort::Versions instead of Sort::Naturally + +- Update to version 1.004: + * Do not show /download path in mirrorlist when TOP_FOLDERS is set + * Add mirrorcache-backstage-hashes.service + +- Update to version 1.003: + * Log no miss for mirrorlist requests from country outside of region of subsidiary + * Add test_local, test_docker and test_systemd to Makefile + * Add column mirrorlist to stat table + * Add concept of project + * Log miss if a mirror has newer file in pedantic mode + * Improve detecting unversioned files + * Show checksums in mirrorlist when available + * Dont redirect to subsidiary requests for media.1/media and repomd.xml + +- Update to version 1.002: + * Enforce pedantic mode unless file is versioned (#165) + * Fix stat reporting as miss when ROOT_COUNTRY is set + * Include subsidiaries in mirrorlist + * Add task which imports hashes from HEADQUARTER + +- Update to version 1.001: + * t: Fix test redirect from landing page when TOP_FOLDERS is set + * Verify size on mirrors for files with -Current suffix + * Fix redirect to https when mirror doesnt have it + +- Update to version 1.0: + * Add /rest/mystat 'My Statistics' menu item + * Schedule jobs from stat (#158) + * Fix Datamodule unsafe usage in async rendering + * Fix render greeting on landing page when TOP_FOLDERS is set + +- Update to version 0.9: + * UI: Add branding capability and footer info + * Render landing page if TOP_FOLDERS is set + * Truncate country code to two letters + * Log trailing slash in stat + * Fix double stats when no mirror in country + * t: Replace repo in docker to openSUSE:infrastructure + * salt: switch test to use 15.3 + +- Update to version 0.8: + * Fix remote render dir when not in DB + * Add mirrors list page, reference it in file listing 'Metadata' column + * UI: Show title on every page + * Do not require /downloads path when TOP_FOLDERS is set + * Fix error "time_bad_sig: Return_to signature is not valid." during openid login + * Optimize /rest/stat (#148) + * Fix url for task MirrorCheckFromStat when metalink + * Add country region everywhere + * Performance improvements + * Set $app->secrets early + * dist: remove obsolete parts in salt + +- Update to version 0.7: + * Collect file hashes when HASHES_COLLECT is set + * Collect file stats in RootLocal + * Reduce permanent tasks' guard lifespan + * Improve file sorting in UI + * Switch to colspan instead of multiple + * Use POST when logging out + * Use only class "name" for content that is too long + * Fix wrong redirect when no mirror for media.1/media + * Fix filtering audit logs by id + +- Update to version 0.6: + * Permanently set MOJO_LISTEN to http://*:__port + * docs: update guide on running docker tests + * dist: rework creation of mirrorcache user and its home dir (#127) + * Add job mirror_scan_from_stat to ensure quality of responses + * t: Rename folder environs -> environ + * t: Switch to the new reworked environ framework + * Consider 403 code as server is reachable + * Add MIRRORCACHE_AUTH_URL, fake auth for testing + * Add audit log (#122) + * ui: css wrap only filename + +- Update to version 0.5: + * Adjust github address to openSUSE + * Obsolete MIRRORCACHE_FALLBACK_REDIRECT in favor of MIRRORCACHE_REDIRECT + +- Update to version 0.4: + * Add favicon and initial version of logo + * Support nginx file origin with autoindex + +- Update to version 0.3: + * Remove column db_sync_for_country from /app/folder + +- Update to version 0.2: + * Introduce timeout of folder rescan per country + * Also dont scan every country when scan of two countries was requested + +- Update to version 0.1: + * Auto deploy db on start + \ No newline at end of file diff --git a/MirrorCache.obsinfo b/MirrorCache.obsinfo new file mode 100644 index 0000000..64bf45a --- /dev/null +++ b/MirrorCache.obsinfo @@ -0,0 +1,5 @@ +name: MirrorCache +version: 1.006 +mtime: 1628205973 +commit: 0010da5ce6ddc72e208f12d5dd579990e1bb4bae + diff --git a/_service:set_version:obs_scm:MirrorCache.spec b/MirrorCache.spec similarity index 100% rename from _service:set_version:obs_scm:MirrorCache.spec rename to MirrorCache.spec diff --git a/_service b/_service index 074eed2..a7b7b56 100644 --- a/_service +++ b/_service @@ -1,11 +1,17 @@ - - dist/rpm/* + + dist/rpm/MirrorCache.spec + dist/rpm/MirrorCache-user.conf + dist/rpm/MirrorCache-tmpfilesd.conf git://github.com/openSUSE/MirrorCache.git @PARENT_TAG@ + @PARENT_TAG@ + git + enable + andrii.nikitin@suse.com - + xz diff --git a/_service:obs_scm:MirrorCache-1.006.obscpio b/_service:obs_scm:MirrorCache-1.006.obscpio deleted file mode 100644 index c627fca..0000000 --- a/_service:obs_scm:MirrorCache-1.006.obscpio +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5468a003c316f48765a9c5fd460663b37889dc91b14755fde05f0e7d8af84f4 -size 671756 diff --git a/_service:obs_scm:MirrorCache.changes b/_service:obs_scm:MirrorCache.changes deleted file mode 100644 index 0ea0954..0000000 --- a/_service:obs_scm:MirrorCache.changes +++ /dev/null @@ -1,9 +0,0 @@ -0.3 2021-04-24 - - Remove column db_sync_for_country from /app/folder - -0.2 2021-04-22 - - Add table 'demand' for tracking mirror scans per country - -0.1 2021-04-21 - - Start of change log - - Add automatic deployment of DB diff --git a/_service:obs_scm:MirrorCache.obsinfo b/_service:obs_scm:MirrorCache.obsinfo deleted file mode 100644 index 598937b..0000000 --- a/_service:obs_scm:MirrorCache.obsinfo +++ /dev/null @@ -1,5 +0,0 @@ -name: MirrorCache -version: 1.006 -mtime: 1628148416 -commit: 2093fd2adec591ab1274d10dacf22b2340539a78 - diff --git a/_service:obs_scm:MirrorCache.spec b/_service:obs_scm:MirrorCache.spec deleted file mode 100644 index f8e5c1b..0000000 --- a/_service:obs_scm:MirrorCache.spec +++ /dev/null @@ -1,92 +0,0 @@ -# -# spec file for package MirrorCache -# -# Copyright (c) 2021 SUSE LLC -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via https://bugs.opensuse.org/ -# - - -%define mirrorcache_services mirrorcache.service mirrorcache-backstage.service mirrorcache-backstage-hashes.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: 0.1 -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 -BuildRequires: %{build_requires} -Requires: %{main_requires} -Requires: perl(Minion) >= 10.0 -BuildArch: noarch -%sysusers_requires - -%description -Mirror redirector web service, which automatically scans the main server and mirrors - -%prep -%setup -q - -%build -# make {?_smp_mflags} -%sysusers_generate_pre %{SOURCE1} %{name} - -%check - -%install -%make_install -# DEST_DIR={_datadir} -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 - -%pre -f %{name}.pre -%service_add_pre %{mirrorcache_services} - -%post -%tmpfiles_create %{_tmpfilesdir}/%{name}.conf -%service_add_post %{mirrorcache_services} - -%preun -%service_del_preun %{mirrorcache_services} - -%postun -%service_del_postun %{mirrorcache_services} - -%files -%doc README.asciidoc -%license LICENSE -%{_sbindir}/rcmirrorcache -%{_sbindir}/rcmirrorcache-backstage -%{_sbindir}/rcmirrorcache-backstage-hashes -%{_sysusersdir}/%{name}.conf -%{_tmpfilesdir}/%{name}.conf -%ghost %dir %attr(0750,mirrorcache,-) %{_localstatedir}/lib/mirrorcache/ -# init -%dir %{_unitdir} -%{_unitdir}/mirrorcache.service -%{_unitdir}/mirrorcache-backstage.service -%{_unitdir}/mirrorcache-backstage-hashes.service -# web libs -%{_datadir}/mirrorcache -%attr(-,mirrorcache,-) %{_datadir}/mirrorcache/assets/cache - -%changelog