Skip to content

Commit

Permalink
fix empty repo rewrite rule
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Aug 11, 2023
1 parent 3fda81d commit ecb2831
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
1 change: 1 addition & 0 deletions susemanager.changes.mbussolotto.move_empty
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- move /srv/www/htdoc/pub/repositories to /usr/share/susemanager/gpg/repositories
2 changes: 2 additions & 0 deletions susemanager/empty-repo.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RewriteRule ^/pub/repositories/empty/(.*)$ /gpg/repositories/empty/$1 [L,PT]
RewriteRule ^/pub/repositories/empty-deb/(.*)$ /gpg/repositories/empty-deb/$1 [L,PT]
32 changes: 19 additions & 13 deletions susemanager/susemanager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
%global salt_group root
%global serverdir %{_sharedstatedir}
%global wwwroot %{_localstatedir}/www
%global wwwdocroot %{wwwroot}/html
%endif

%if 0%{?suse_version}
Expand All @@ -41,9 +40,10 @@
%global salt_group salt
%global serverdir /srv
%global wwwroot %{serverdir}/www
%global wwwdocroot %{wwwroot}/htdocs
%endif

%global reporoot %{_datarootdir}/susemanager/gpg/

%global debug_package %{nil}

Name: susemanager
Expand Down Expand Up @@ -156,6 +156,7 @@ Requires: spacewalk-backend-sql
Requires: spacewalk-common
Requires: susemanager-build-keys
Requires: susemanager-sync-data
Requires: uyuni-build-keys
BuildRequires: docbook-utils

%description tools
Expand Down Expand Up @@ -189,13 +190,15 @@ install -m 0644 etc/logrotate.d/susemanager-tools %{buildroot}/%{_sysconfdir}/lo
install -m 0644 etc/slp.reg.d/susemanager.reg %{buildroot}/%{_sysconfdir}/slp.reg.d
make -C src install PREFIX=$RPM_BUILD_ROOT PYTHON_BIN=%{pythonX} MANDIR=%{_mandir}
install -d -m 755 %{buildroot}/%{wwwroot}/os-images/
mkdir -p %{buildroot}/etc/apache2/conf.d
install empty-repo.conf %{buildroot}/etc/apache2/conf.d/empty-repo.conf

# empty repo for rhel base channels
mkdir -p %{buildroot}%{wwwdocroot}/pub/repositories/
cp -r pub/empty %{buildroot}%{wwwdocroot}/pub/repositories/
mkdir -p %{buildroot}%{reporoot}/repositories/
cp -r pub/empty %{buildroot}%{reporoot}/repositories/

# empty repo for Ubuntu base fake channel
cp -r pub/empty-deb %{buildroot}%{wwwdocroot}/pub/repositories/
cp -r pub/empty-deb %{buildroot}%{reporoot}/repositories/

# YaST configuration
mkdir -p %{buildroot}%{_datadir}/YaST2/clients
Expand Down Expand Up @@ -324,11 +327,13 @@ sed -i '/You can access .* via https:\/\//d' /tmp/motd 2> /dev/null ||:
%dir %{pythonsmroot}/susemanager
%dir %{_prefix}/share/rhn/
%dir %{_datadir}/susemanager
%dir %{wwwdocroot}/pub
%dir %{wwwdocroot}/pub/repositories
%dir %{wwwdocroot}/pub/repositories/empty
%dir %{wwwdocroot}/pub/repositories/empty/repodata
%dir %{wwwdocroot}/pub/repositories/empty-deb
%dir %{reporoot}
%dir %{reporoot}/repositories
%dir %{reporoot}/repositories/empty
%dir %{reporoot}/repositories/empty/repodata
%dir %{reporoot}/repositories/empty-deb
%dir /etc/apache2
%dir /etc/apache2/conf.d
%config(noreplace) %{_sysconfdir}/logrotate.d/susemanager-tools
%{_prefix}/share/rhn/config-defaults/rhn_*.conf
%attr(0755,root,root) %{_bindir}/mgr-salt-ssh
Expand All @@ -351,8 +356,9 @@ sed -i '/You can access .* via https:\/\//d' /tmp/motd 2> /dev/null ||:
%{_datadir}/susemanager/__pycache__/
%endif
%{_mandir}/man8/mgr-sync.8*
%{wwwdocroot}/pub/repositories/empty/repodata/*.xml*
%{wwwdocroot}/pub/repositories/empty-deb/Packages
%{wwwdocroot}/pub/repositories/empty-deb/Release
%{reporoot}/repositories/empty/repodata/*.xml*
%{reporoot}/repositories/empty-deb/Packages
%{reporoot}/repositories/empty-deb/Release
/etc/apache2/conf.d/empty-repo.conf

%changelog

0 comments on commit ecb2831

Please sign in to comment.