From c63cb7677f16713abfc3d1c4c7194e2a1e293e15 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 28 Jul 2022 12:46:11 +0200 Subject: [PATCH] Initial import from Fedora --- .gitignore | 4 ++ .jakarta-servlet.metadata | 1 + jakarta-servlet.spec | 111 ++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 117 insertions(+) create mode 100644 .jakarta-servlet.metadata create mode 100644 jakarta-servlet.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..d5dbddd 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,4 @@ +/results_* +/*.src.rpm + +/servlet-api-5.0.0.tar.gz diff --git a/.jakarta-servlet.metadata b/.jakarta-servlet.metadata new file mode 100644 index 0000000..23c5862 --- /dev/null +++ b/.jakarta-servlet.metadata @@ -0,0 +1 @@ +1326cf8e9252c36acfb0b9c7f7578d720c9bea82 servlet-api-5.0.0.tar.gz diff --git a/jakarta-servlet.spec b/jakarta-servlet.spec new file mode 100644 index 0000000..a0cbf56 --- /dev/null +++ b/jakarta-servlet.spec @@ -0,0 +1,111 @@ +%bcond_with bootstrap + +Name: jakarta-servlet +Version: 5.0.0 +Release: 11%{?dist} +Summary: Server-side API for handling HTTP requests and responses +# most of the project is EPL-2.0 or GPLv2 w/exceptions, +# but some files still have Apache-2.0 license headers: +# https://github.com/eclipse-ee4j/servlet-api/issues/347 +License: (EPL-2.0 or GPLv2 with exceptions) and ASL 2.0 +URL: https://github.com/eclipse-ee4j/servlet-api +BuildArch: noarch +ExclusiveArch: %{java_arches} noarch + +Source0: https://github.com/eclipse-ee4j/servlet-api/archive/%{version}-RELEASE/servlet-api-%{version}.tar.gz + +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else +BuildRequires: maven-local +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) +%endif + +Provides: glassfish-servlet-api = %{version}-%{release} + +%description +Jakarta Servlet defines a server-side API for handling HTTP requests +and responses. + +%{?javadoc_package} + +%prep +%setup -q -n servlet-api-%{version}-RELEASE + +# remove unnecessary dependency on parent POM +%pom_remove_parent . api + +# do not build specification documentation +%pom_disable_module spec + +# Copy to old package name +# TODO: Remove when all dependencies are migrated from javax.servlet to jakarta.servlet +cp -pr api/src/main/java/jakarta api/src/main/java/javax +sed -i -e 's/jakarta\./javax./g' $(find api/src/main/java/javax -name *.java) +%pom_xpath_replace pom:instructions/pom:Export-Package \ + 'jakarta.servlet.*,javax.servlet.*;version="4.0.0"' api + +# do not install useless parent POM +%mvn_package jakarta.servlet:servlet-parent __noinstall + +# remove unnecessary maven plugins +%pom_remove_plugin -r :formatter-maven-plugin +%pom_remove_plugin -r :impsort-maven-plugin +%pom_remove_plugin -r :maven-enforcer-plugin +%pom_remove_plugin -r :maven-javadoc-plugin +%pom_remove_plugin -r :maven-source-plugin + +# add maven artifact coordinate aliases for backwards compatibility +%mvn_alias jakarta.servlet:jakarta.servlet-api \ + javax.servlet:javax.servlet-api \ + javax.servlet:servlet-api + +# add compat symlink for packages constructing the classpath manually +%mvn_file :{*} %{name}/@1 glassfish-servlet-api + +%build +%mvn_build + +%install +%mvn_install + +%files -f .mfiles +%license LICENSE.md NOTICE.md +%doc README.md + +%changelog +* Thu Jul 21 2022 Fedora Release Engineering - 5.0.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Feb 05 2022 Jiri Vanek - 5.0.0-10 +- Rebuilt for java-17-openjdk as system jdk + +* Thu Jan 20 2022 Fedora Release Engineering - 5.0.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 5.0.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed May 26 2021 Mikolaj Izdebski - 5.0.0-7 +- Re-add provides on glassfish-servlet-api + +* Mon May 17 2021 Mikolaj Izdebski - 5.0.0-6 +- Bootstrap build +- Non-bootstrap build + +* Tue Jan 26 2021 Fedora Release Engineering - 5.0.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Thu Aug 20 2020 Mat Booth - 5.0.0-4 +- Correct mvn_file macro invokation + +* Wed Aug 19 2020 Fabio Valentini - 5.0.0-3 +- Add compat symlink for packages constructing the classpath manually. + +* Wed Aug 19 2020 Mat Booth - 5.0.0-2 +- Also ship the API in the old javax namespace to aid transition + +* Thu Aug 13 2020 Fabio Valentini - 5.0.0-1 +- Initial package renamed from glassfish-servlet-api. + diff --git a/sources b/sources new file mode 100644 index 0000000..b554b24 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (servlet-api-5.0.0.tar.gz) = ff6ab67d99ea06d2fdbe6ea15224009481b280deb62ae552c430d7233838d980d23ea8eb042be2344433eca7e2741d2495ceffe231ba6ab23243860a158b32db