From 509e540314a418a820dc92b2f51a9ce9f52ff88f Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Tue, 26 Nov 2024 19:40:53 +0300 Subject: [PATCH] import web-assets-5-22.el10 --- .gitignore | 0 .web-assets.metadata | 0 SOURCES/LICENSE | 19 +++ SOURCES/README.devel | 8 ++ SOURCES/httpd-web-assets.conf | 43 +++++++ SOURCES/macros.web-assets | 13 +++ SOURCES/nginx-web-assets.conf | 21 ++++ SPECS/web-assets.spec | 212 ++++++++++++++++++++++++++++++++++ 8 files changed, 316 insertions(+) create mode 100644 .gitignore create mode 100644 .web-assets.metadata create mode 100644 SOURCES/LICENSE create mode 100644 SOURCES/README.devel create mode 100644 SOURCES/httpd-web-assets.conf create mode 100644 SOURCES/macros.web-assets create mode 100644 SOURCES/nginx-web-assets.conf create mode 100644 SPECS/web-assets.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.web-assets.metadata b/.web-assets.metadata new file mode 100644 index 0000000..e69de29 diff --git a/SOURCES/LICENSE b/SOURCES/LICENSE new file mode 100644 index 0000000..17597ed --- /dev/null +++ b/SOURCES/LICENSE @@ -0,0 +1,19 @@ +Copyright 2013 T.C. Hollingsworth + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/SOURCES/README.devel b/SOURCES/README.devel new file mode 100644 index 0000000..b281843 --- /dev/null +++ b/SOURCES/README.devel @@ -0,0 +1,8 @@ +web-assets-devel contains the RPM macros that implement the Fedora Web Assets +and JavaScript packaging policies. + +For more information on packaging Web Assets, see: +https://fedoraproject.org/wiki/Packaging:Web_Assets + +For more information on packaging JavaScript, see: +https://fedoraproject.org/wiki/Packaging:JavaScript diff --git a/SOURCES/httpd-web-assets.conf b/SOURCES/httpd-web-assets.conf new file mode 100644 index 0000000..94784a7 --- /dev/null +++ b/SOURCES/httpd-web-assets.conf @@ -0,0 +1,43 @@ + + Options -Indexes +FollowSymLinks + + # Apache 2.4 + Require all granted + + + # Apache 2.2 + Order deny,allow + Allow from all + + + + + Options -Indexes +FollowSymLinks + + # Apache 2.4 + Require all granted + + + # Apache 2.2 + Order deny,allow + Allow from all + + + + + Options -Indexes + + # Apache 2.4 + Require all granted + + + # Apache 2.2 + Order deny,allow + Allow from all + + + +Alias /.sysassets/fonts /usr/share/fonts +Alias /.sysassets/javascript /usr/share/javascript +Alias /.sysassets/js /usr/share/javascript +Alias /.sysassets /usr/share/web-assets \ No newline at end of file diff --git a/SOURCES/macros.web-assets b/SOURCES/macros.web-assets new file mode 100644 index 0000000..48ca9f9 --- /dev/null +++ b/SOURCES/macros.web-assets @@ -0,0 +1,13 @@ +%_webassetdir %{_datadir}/web-assets +%_jsdir %{_datadir}/javascript + +%js_includes() %{expand: \ +%( + ver=$(rpm -q --qf='%%{version}' -- %1) + if [[ $? -eq 0 ]]; then + echo "Provides: js-includes(%1) = $ver" + else + echo "Provides: js-includes(%1)" + fi +) +} diff --git a/SOURCES/nginx-web-assets.conf b/SOURCES/nginx-web-assets.conf new file mode 100644 index 0000000..6b2b0d0 --- /dev/null +++ b/SOURCES/nginx-web-assets.conf @@ -0,0 +1,21 @@ +# allow access to /.sysassets + +location /.sysassets/fonts { + alias /usr/share/fonts; + autoindex off; +} + +location /.sysassets/javascript { + alias /usr/share/javascript; + autoindex off; +} + +location /.sysassets/js { + alias /usr/share/javascript; + autoindex off; +} + +location /.sysassets/ { + alias /usr/share/web-assets; + autoindex off; +} diff --git a/SPECS/web-assets.spec b/SPECS/web-assets.spec new file mode 100644 index 0000000..33c9d8e --- /dev/null +++ b/SPECS/web-assets.spec @@ -0,0 +1,212 @@ +%bcond_without httpd +%bcond_without nginx + +Name: web-assets +Version: 5 +Release: 22%{?dist} +Summary: A simple framework for bits pushed to browsers +License: MIT +URL: https://fedoraproject.org/wiki/User:Patches/PackagingDrafts/Web_Assets +Source0: LICENSE +Source1: README.devel +Source2: macros.web-assets +Source3: httpd-web-assets.conf +Source4: nginx-web-assets.conf +BuildArch: noarch +BuildRequires: coreutils + +%description +%{summary}. + +%package filesystem +Summary: The basic directory layout for Web Assets +#there's nothing copyrightable about a few directories and symlinks +License: Public Domain +Requires: fonts-filesystem + +%description filesystem +%{summary}. + +%package devel +Summary: RPM macros for Web Assets packaging +License: MIT +Requires: web-assets-filesystem = %{version}-%{release} + +%description devel +%{summary}. + +%if %{with httpd} +%package httpd +Summary: Web Assets aliases for the Apache HTTP daemon +License: MIT +Requires: web-assets-filesystem = %{version}-%{release} +Requires: httpd + +%description httpd +%{summary}. +%endif + +%if %{with nginx} +%package nginx +Summary: Web Assets aliases for the nginx daemon +License: MIT +Requires: web-assets-filesystem = %{version}-%{release} +Requires: nginx + +%description nginx +%{summary}. +%endif + +%prep +%setup -c -T +cp %{SOURCE0} LICENSE +cp %{SOURCE1} README.devel + +%build +#nothing to do + +%install +mkdir -p %{buildroot}%{_datadir}/web-assets +mkdir -p %{buildroot}%{_datadir}/javascript +ln -sf ../javascript %{buildroot}%{_datadir}/web-assets/javascript +ln -sf ../javascript %{buildroot}%{_datadir}/web-assets/js +ln -sf ../fonts %{buildroot}%{_datadir}/web-assets/fonts +install -Dpm0644 %{SOURCE2} %{buildroot}%{_rpmconfigdir}/macros.d/macros.web-assets +%if %{with httpd} +install -Dpm0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/httpd/conf.d/web-assets.conf +%endif +%if %{with nginx} +install -Dpm0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/nginx/default.d/web-assets.conf +%endif + +%if %{with httpd} +%post httpd +[ -x %{_bindir}/systemctl ] && reload-or-try-restart httpd.service || : + +%postun httpd +[ -x %{_bindir}/systemctl ] && reload-or-try-restart httpd.service || : +%endif + +%if %{with nginx} +%post nginx +[ -x %{_bindir}/systemctl ] && systemctl reload-or-try-restart nginx.service || : + +%postun nginx +[ -x %{_bindir}/systemctl ] && systemctl reload-or-try-restart nginx.service || : +%endif + +%files filesystem +%{_datadir}/web-assets +%{_datadir}/javascript + +%files devel +%{_rpmconfigdir}/macros.d/macros.web-assets +%license LICENSE +%doc README.devel + +%if %{with httpd} +%files httpd +%config(noreplace) %{_sysconfdir}/httpd/conf.d/web-assets.conf +%license LICENSE +%endif + +%if %{with nginx} +%files nginx +%config(noreplace) %{_sysconfdir}/nginx/default.d/web-assets.conf +%license LICENSE +%endif + +%changelog +* Tue Nov 26 2024 MSVSphere Packaging Team - 5-22 +- Rebuilt for MSVSphere 10 + +* Mon Jun 24 2024 Troy Dawson - 5-22 +- Bump release for June 2024 mass rebuild + +* Sat Jan 27 2024 Fedora Release Engineering - 5-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 5-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Sat Jan 21 2023 Fedora Release Engineering - 5-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 5-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Mar 23 2022 Petr Pisar - 5-17 +- Make a dependency on systemd optional for restarting httpd + +* Tue Mar 22 2022 Petr Menšík - 5-16 +- Add nginx aliases support + +* Sat Jan 22 2022 Fedora Release Engineering - 5-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 5-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 5-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 5-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jan 31 2020 Fedora Release Engineering - 5-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jul 27 2019 Fedora Release Engineering - 5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 05 2016 Fedora Release Engineering - 5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Mar 19 2014 T.C. Hollingsworth - 5-1 +- switch to dot-prefixed Aliases +- order Aliases for compatibility with older Apache releases +- enable webfonts +- enable symlinks in %%{_webassetdir} and %%{_jsdir} +- re-enable httpd subpackage + +* Sat Aug 24 2013 T.C. Hollingsworth - 4-2 +- tighten dependency on filesystem from other packages +- add brief README to -devel + +* Fri Aug 16 2013 T.C. Hollingsworth - 4-1 +- temporarily disable httpd stuff while we're waiting on sorting out the + directory + +* Tue Jul 30 2013 T.C. Hollingsworth - 3-1 +- rename directories per discussion on lists +- provide a /_sysassets/js shortcut + +* Fri Jul 19 2013 T.C. Hollingsworth - 2-1 +- rename the license now that we have proper git +- prefix httpd-exported directory with an underscore (thanks to Joe Orton) +- add "Require all granted" (thanks to Remi Collet) +- alias /usr/share/javascript explictly + +* Thu Jul 11 2013 T.C. Hollingsworth - 1-1 +- initial package