Accepting request 845720 from home:mateialbu:branches:Java:packages

- Add source url for tomcat-serverxml-tool
- Fix typo in tomcat-webapps %postun that caused /examples
  context to remain in server.xml when package was removed
- Remove tomcat-9.0.init and /usr/lib/tmpfiles.d/tomcat.conf from
  package. They're not used anymore becuse of systemd (bsc#1178396)

OBS-URL: https://build.opensuse.org/request/show/845720
OBS-URL: https://build.opensuse.org/package/show/Java:packages/tomcat?expand=0&rev=212
This commit is contained in:
Matei Albu
2020-11-03 13:23:42 +00:00
committed by Git OBS Bridge
parent a14e7a9e0d
commit 5fc16cd0d0
4 changed files with 18 additions and 16 deletions

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bcfb8ac5f9f02359be4dd81ba5feac083f23ffab2b4eee4f79932035d4e642af
size 9260

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:345bbc4b2ab711d90c9c182fc1d09d0664f1421499d741f1ae1c6ad602ce2f67
size 1969

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Nov 3 10:08:03 UTC 2020 - Matei Albu <malbu@suse.com>
- Add source url for tomcat-serverxml-tool
- Fix typo in tomcat-webapps %postun that caused /examples
context to remain in server.xml when package was removed
- Remove tomcat-9.0.init and /usr/lib/tmpfiles.d/tomcat.conf from
package. They're not used anymore becuse of systemd (bsc#1178396)
-------------------------------------------------------------------
Fri Oct 30 17:05:52 UTC 2020 - Matei Albu <malbu@suse.com>

View File

@@ -24,6 +24,7 @@
%define minor_version 0
%define micro_version 36
%define packdname apache-tomcat-%{version}-src
%define serverxmltool_version 1.0
# FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/
%global basedir /srv/%{name}
%define appdir %{basedir}/webapps
@@ -51,7 +52,6 @@ Group: Productivity/Networking/Web/Servers
URL: https://tomcat.apache.org
Source0: https://archive.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz
Source1: %{name}-%{major_version}.%{minor_version}.conf
Source2: %{name}-%{major_version}.%{minor_version}.init
Source3: %{name}-%{major_version}.%{minor_version}.sysconfig
Source4: %{name}-%{major_version}.%{minor_version}.wrapper
Source5: %{name}-%{major_version}.%{minor_version}.logrotate
@@ -64,7 +64,7 @@ Source21: tomcat-functions
Source30: tomcat-preamble
Source31: tomcat-server
Source32: tomcat-named.service
Source33: tomcat-serverxml-tool.tar.gz
Source33: https://gitlab.suse.de/galaxy/tomcat-serverxml-tool/-/archive/%{serverxmltool_version}/tomcat-serverxml-tool-%{serverxmltool_version}.tar.gz
Source34: tomcat-serverxml-tool.sh.in
Source1000: tomcat-rpmlintrc
Source1001: https://archive.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz.asc
@@ -323,9 +323,9 @@ jar cf ../../../../../../../../output/build/webapps/docs/appdev/sample/sample.wa
popd
popd
pushd %{_builddir}/tomcat-serverxml-tool
pushd %{_builddir}/tomcat-serverxml-tool-%{serverxmltool_version}/src
javac -source %{javac_target} -target %{javac_target} com/suse/tcserverxml/ApplyStylesheet.java
jar cfe serverxmltool.jar com.suse.tcserverxml.ApplyStylesheet com/suse/tcserverxml/ApplyStylesheet.class com/suse/tcserverxml/add-context.xslt com/suse/tcserverxml/remove-context.xslt
jar cfe %{_builddir}/tomcat-serverxml-tool-%{serverxmltool_version}/serverxmltool.jar com.suse.tcserverxml.ApplyStylesheet com/suse/tcserverxml/ApplyStylesheet.class com/suse/tcserverxml/add-context.xslt com/suse/tcserverxml/remove-context.xslt
popd
%install
@@ -577,13 +577,8 @@ ln -s -f %{_sysconfdir}/alternatives/jsp %{buildroot}%{_javadir}/%{name}-jsp.jar
# It will be changed anyways to the correct symlink by update-alternatives.
ln -s -f %{_sysconfdir}/alternatives/servlet.jar %{buildroot}%{_javadir}/servlet.jar
mkdir -p %{buildroot}%{_tmpfilesdir}
cat > %{buildroot}%{_tmpfilesdir}/%{name}.conf <<EOF
f /run/%{name}.pid 0644 tomcat tomcat -
EOF
# Install tool used to edit server.xml
pushd %{_builddir}/tomcat-serverxml-tool
pushd %{_builddir}/tomcat-serverxml-tool-%{serverxmltool_version}
cat %{SOURCE34} | sed 's#@LIBEXECDIR@#%{_libexecdir}#g' >tomcat-serverxml-tool.sh
install -m 0755 tomcat-serverxml-tool.sh \
%{buildroot}%{_libexecdir}/%{name}/serverxml-tool.sh
@@ -601,7 +596,6 @@ popd
%service_add_post %{name}.service
%service_add_post %{name}@.service
%{fillup_only %{name}}
%tmpfiles_create %_tmpfilesdir/%{name}.conf
%preun
%service_del_preun %{name}.service
@@ -683,7 +677,7 @@ rm -f \
if [ $1 -eq 0 ]; then # uninstall only
%{serverxmltool} remove %{tomcatappdir}/ROOT /
%{serverxmltool} remove %{tomcatappdir}/sample /sample
%{serverxmltool} remove %{tomcatappdir}/examples /example
%{serverxmltool} remove %{tomcatappdir}/examples /examples
fi
%post admin-webapps
@@ -749,7 +743,6 @@ fi
%attr(0644,root,tomcat) %config(noreplace) %{confdir}/web.xml
%attr(0644,root,tomcat) %config(noreplace) %{confdir}/jaspic-providers.xml
%attr(0755,root,tomcat) %dir %{homedir}
%attr(0644,root,tomcat) %{_tmpfilesdir}/%{name}.conf
%attr(0644,root,tomcat) %{bindir}/bootstrap.jar
%attr(0644,root,tomcat) %{bindir}/catalina-tasks.xml
%{homedir}/lib