Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.2:Update
tomcat6
tomcat6.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tomcat6.spec of Package tomcat6
# # spec file for package tomcat6 # # Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # %define section free %define jspspec 2.1 %define major_version 6 %define minor_version 0 %define macro_version 20 %define packdname apache-tomcat-%{version}-src %define servletspec 2.5 %define tcuid 91 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/ %define appdir /srv/%{name}/webapps %define bindir %{_datadir}/%{name}/bin %define confdir %{_sysconfdir}/%{name} %define homedir %{_datadir}/%{name} %define libdir %{_javadir}/%{name} %define logdir %{_localstatedir}/log/%{name} %define tempdir %{_localstatedir}/cache/%{name}/temp %define workdir %{_localstatedir}/cache/%{name} Name: tomcat6 Version: %{major_version}.%{minor_version}.%{macro_version} Release: 24.<RELEASE33> Summary: Apache Servlet/JSP Engine, RI for Servlet 2.5/JSP 2.1 API Group: Productivity/Networking/Web/Servers License: Apache Software License .. Url: http://tomcat.apache.org Source0: http://www.apache.org/dist/tomcat/tomcat-6/v%{version}/src/%{packdname}.tar.bz2 Source1: %{name}-%{major_version}.%{minor_version}.conf Source2: %{name}-%{major_version}.%{minor_version}.init # sysconfig removal - bnc#471639 #Source3: %{name}-%{major_version}.%{minor_version}.sysconfig Source4: %{name}-%{major_version}.%{minor_version}.wrapper Patch0: %{name}-%{major_version}.%{minor_version}.bootstrap-MANIFEST.MF.patch #PATCH-FIX-UPSTREAM: bao#47316, bnc#542634 Patch1: tomcat6-bug47316.patch #PATCH-FIX-UPSTREAM: bnc#575083 Patch2: apache-tomcat-CVE-2009-2693-CVE-2009-2901-CVE-2009-2902.patch #PATCH-FIX-UPSTREAM: http://svn.apache.org/viewvc?view=revision&revision=936540 Patch3: apache-tomcat-CVE-2010-1157.patch #PATCH-FIX-UPSTREAM: http://svn.apache.org/viewvc?view=revision&revision=958977 Patch4: apache-tomcat-CVE-2010-2227.patch #PATCH-FIX-UPSTREAM: http://svn.apache.org/viewvc?view=revision&revision=1037779 Patch5: apache-tomcat-CVE-2010-4172.patch #PATCH-FIX-UPSTREAM: http://svn.apache.org/viewvc?view=revision&revision=1022560 Patch6: apache-tomcat-CVE-2010-3781.patch #PATCH-FIX-UPSTREAM: http://svn.apache.org/viewvc?view=revision&revision=1066315 Patch7: apache-tomcat-CVE-2011-0013.patch #PATCH-FIX-UPSTREAM: http://svn.apache.org/viewvc?view=revision&revision=1066313 Patch8: apache-tomcat-CVE-2011-0534.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch BuildRequires: ant BuildRequires: ant-trax BuildRequires: ecj >= 3.2.2 BuildRequires: findutils BuildRequires: jakarta-commons-collections BuildRequires: jakarta-commons-daemon BuildRequires: java-devel >= 1.5.0 BuildRequires: jpackage-utils >= 1.7.0 BuildRequires: junit BuildRequires: sed %if %defined suse_version BuildRequires: unzip BuildRequires: jakarta-taglibs-standard >= 1.1 BuildRequires: fdupes PreReq: jpackage-utils Recommends: libtcnative-1-0 %endif Requires(pre): %{_sbindir}/groupadd Requires(pre): %{_sbindir}/useradd Requires: jakarta-commons-daemon Requires: jakarta-commons-logging Requires: %{name}-lib = %{version}-%{release} Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Requires(post): findutils Requires(post): coreutils %description Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process. Tomcat is developed in an open and participatory environment and released under the Apache Software License version 2.0. Tomcat is intended to be a collaboration of the best-of-breed developers from around the world. %package admin-webapps License: Apache Software License .. Group: Productivity/Networking/Web/Servers Summary: The host-manager and manager web applications for Apache Tomcat Requires: %{name} = %{version}-%{release} %description admin-webapps The host-manager and manager web applications for Apache Tomcat %package docs-webapp License: Apache Software License .. Group: Productivity/Networking/Web/Servers Summary: The docs web application for Apache Tomcat Requires: %{name} = %{version}-%{release} %description docs-webapp The docs web application for Apache Tomcat %package javadoc License: Apache Software License .. Group: Productivity/Networking/Web/Servers Summary: Javadoc generated documentation for Apache Tomcat %description javadoc Javadoc generated documentation for Apache Tomcat %package jsp-2_1-api License: Apache Software License .. Group: Productivity/Networking/Web/Servers Summary: Apache Tomcat JSP API implementation classes Provides: %{name}-jsp-2.1-api Requires: %{name}-servlet-2_5-api = %{version}-%{release} Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives %description jsp-2_1-api Apache Tomcat JSP API implementation classes %package lib License: Apache Software License .. Group: Productivity/Networking/Web/Servers Summary: Libraries needed to run the Tomcat Web container Requires: %{name}-jsp-2_1-api = %{version}-%{release} Requires: %{name}-servlet-2_5-api = %{version}-%{release} Requires(post): ecj >= 3.2.2 Requires(post): jakarta-commons-collections-tomcat5 Requires(post): jakarta-commons-dbcp-tomcat5 Requires(post): jakarta-commons-pool-tomcat5 Requires(preun): %{__rm} %description lib Libraries needed to run the Tomcat Web container %package servlet-2_5-api License: Apache Software License .. Group: Productivity/Networking/Web/Servers Summary: Apache Tomcat Servlet API implementation classes Provides: %{name}-servlet-2.5-api Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives %description servlet-2_5-api Apache Tomcat Servlet API implementation classes %package webapps License: Apache Software License .. Group: Productivity/Networking/Web/Servers Summary: The ROOT and examples web applications for Apache Tomcat Requires: %{name} = %{version}-%{release} Requires(post): jakarta-taglibs-standard >= 1.1 %description webapps The ROOT and examples web applications for Apache Tomcat %prep %setup -q -c -T -a 0 %patch0 -p1 %patch1 -b .bug47316 %patch2 -p1 -b .bnc575083 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p0 -b .CVE-2010-3781 %patch7 -p0 -b .CVE-2011-0013 %patch8 -p0 -b .CVE-2011-0534 %build pushd ${RPM_BUILD_DIR}/%{name}-%{version}/%{packdname} # remove pre-built binaries and windows files find . \( -name "*.bat" -o -name "*.class" -o -name "*.gz" -o \ -name "*.jar" -o -name "*.zip" \) | xargs -t %{__rm} -f # we don't care about the tarballs and we're going to replace # tomcat-dbcp.jar with jakarta-commons-{collections,dbcp,pool}-tomcat5.jar # so just create a dummy file for later removal touch HACK %if %defined suse_version export CLASSPATH="$(build-classpath xalan-j2-serializer)" export ANT_OPTS=-Xmx500M %endif # who needs a build.properties file anyway ant -Dbase.path="${RPM_BUILD_DIR}/%{name}-%{version}/%{packdname}" \ -Dbuild.compiler="modern" \ -Dcommons-collections.jar="$(build-classpath commons-collections)" \ -Dcommons-daemon.jar="$(build-classpath commons-daemon)" \ -Dcommons-daemon.jsvc.tar.gz="HACK" \ -Djasper-jdt.jar="$(build-classpath ecj)" \ -Djdt.jar="$(build-classpath ecj)" \ -Dtomcat-dbcp.jar="HACK" \ -Dtomcat-native.tar.gz="HACK" \ -Dversion="%{version}" \ -Dversion.build="%{macro_version}" \ -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 # javadoc generation ant -f dist.xml dist-prepare ant -f dist.xml dist-source ant -f dist.xml dist-javadoc # remove some jars that we'll replace with symlinks later %{__rm} output/build/bin/commons-daemon.jar \ output/build/lib/ecj.jar # remove the cruft we created %{__rm} output/build/bin/HACK \ output/build/bin/tomcat-native.tar.gz \ output/build/lib/HACK popd %install # build initial path structure %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_bindir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d %if ! %defined suse_version %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig %endif %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{appdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{bindir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{confdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{libdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{logdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{homedir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{tempdir} %{__install} -d -m 0755 ${RPM_BUILD_ROOT}%{workdir} # move things into place pushd ${RPM_BUILD_DIR}/%{name}-%{version}/%{packdname}/output/build %{__mv} bin/*.{jar,xml} ${RPM_BUILD_ROOT}%{bindir} %{__mv} conf/*.{policy,properties,xml} ${RPM_BUILD_ROOT}%{confdir} %{__mv} lib/*.jar ${RPM_BUILD_ROOT}%{libdir} %{__mv} webapps/* ${RPM_BUILD_ROOT}%{appdir} popd # javadoc pushd ${RPM_BUILD_DIR}/%{name}-%{version}/%{packdname}/output/dist/webapps %{__mv} docs/api/* ${RPM_BUILD_ROOT}%{_javadocdir}/%{name} popd %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" %{SOURCE1} \ %if %defined suse_version -e "s|\@\@\@JAVAHOME\@\@\@|/etc/alternatives/jre|g" \ %endif > ${RPM_BUILD_ROOT}%{confdir}/%{name}.conf # bnc#471639 %if ! %defined suse_version %{__sed} -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \ -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" %{SOURCE3} \ > ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name} %endif %{__install} -m 0644 %{SOURCE2} \ ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/%{name} %{__install} -m 0644 %{SOURCE4} \ ${RPM_BUILD_ROOT}%{_bindir}/d%{name} # create jsp and servlet API symlinks pushd ${RPM_BUILD_ROOT}%{_javadir} %{__mv} %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api-%{version}.jar %{__mv} %{name}/servlet-api.jar \ %{name}-servlet-%{servletspec}-api-%{version}.jar %{__ln_s} %{name}-jsp-%{jspspec}-api-%{version}.jar \ %{name}-jsp-%{jspspec}-api.jar %{__ln_s} %{name}-servlet-%{servletspec}-api-%{version}.jar \ %{name}-servlet-%{servletspec}-api.jar popd pushd ${RPM_BUILD_ROOT}%{libdir} # fix up jars to include version number for i in *.jar; do j="$(echo $i | %{__sed} -e 's,\.jar$,,')" %{__mv} ${j}.jar ${j}-%{version}.jar %{__ln_s} ${j}-%{version}.jar ${j}.jar done # symlink JSP and servlet API jars %{__ln_s} ../%{name}-jsp-%{jspspec}-api-%{version}.jar . %{__ln_s} ../%{name}-servlet-%{servletspec}-api-%{version}.jar . popd pushd ${RPM_BUILD_ROOT}%{bindir} # fix up jars to include version number for i in *.jar; do j="$(echo $i | %{__sed} -e 's,\.jar$,,')" %{__mv} ${j}.jar ${j}-%{version}.jar %{__ln_s} ${j}-%{version}.jar ${j}.jar done popd # symlink to the FHS locations where we've installed things pushd ${RPM_BUILD_ROOT}%{homedir} %{__ln_s} %{appdir} webapps %{__ln_s} %{confdir} conf %{__ln_s} %{libdir} lib %{__ln_s} %{logdir} logs %{__ln_s} %{tempdir} temp %{__ln_s} %{workdir} work popd # bnc#424675 install -d -m 0755 ${RPM_BUILD_ROOT}%{workdir}/Catalina %{__ln_s} %{workdir}/Catalina ${RPM_BUILD_ROOT}/%{confdir}/Catalina # bnc#418664 install -d -m 0755 ${RPM_BUILD_ROOT}/%{_sysconfdir}/ant.d/ echo "tomcat6/catalina-ant" > ${RPM_BUILD_ROOT}/%{_sysconfdir}/ant.d/catalina-ant %if %defined suse_version %fdupes $RPM_BUILD_ROOT /srv/%{name} install -d -m 755 $RPM_BUILD_ROOT/%{_sbindir} ln -sf %{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name} #bnc#565901 ln -sf %{_bindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh %endif %clean %{__rm} -rf $RPM_BUILD_ROOT %pre # add the tomcat user and group %if %defined suse_version %{_sbindir}/groupadd -r tomcat 2>/dev/null || : %{_sbindir}/useradd -c "Apache Tomcat" -g tomcat \ -s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || : %else %{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || : %{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \ -s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || : %endif %post %if %defined suse_version # Usage: VARIABLE_NAME VARIABLE_VALUE function import_var { MSG="### Imported value from %{_sysconfdir}/sysconfig/%{name}. ###" if [ ! -z "$2" ]; then if [ `grep "^$1" %{confdir}/%{name}.conf` ]; then # add a comment with a previous value sed -i "s@^$1.*@&\n\n$MSG\n#$1=$2@" %{confdir}/%{name}.conf else # move the value echo -e "\n$MSG\n$1=\"$2\"" >> %{confdir}/%{name}.conf fi fi } # sysconfig removal - bnc#471639 if [ -f /etc/sysconfig/%{name} ]; then source %{_sysconfdir}/sysconfig/%{name} import_var JAVA_HOME "$JAVA_HOME" import_var JAVA_OPTS "$JAVA_OPTS" import_var CATALINA_OPTS "$CATALINA_OPTS" echo "Merged settings from '%{_sysconfdir}/sysconfig/%{name}' to '%{confdir}/%{name}.conf'" mv %{_sysconfdir}/sysconfig/%{name} %{_sysconfdir}/%{name}/%{name}.sysconfig.save fi # clean workdir of tomcat6's webapps - bnc#655440#c14 (cd %{workdir}/Catalina/localhost &> /dev/null && \ find _ ROOT docs examples host-manager manager -name '*.java' -or -name '*.class' 2>/dev/null | xargs rm -f) || : %else # install but don't activate /sbin/chkconfig --add %{name} %endif %post jsp-2_1-api %{_sbindir}/update-alternatives --install %{_javadir}/jsp.jar jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20100 %post lib # HACK! The commons-dbcp-tomcat5 needs the tomcat6-lib to build, but tomcat6 # needs this only as post/un dependency to create a symlink, not for build of # itself. This is mainly for succesfully build, in the production case it # should not happen! build-jar-repository %{libdir} \ commons-collections-tomcat5 \ commons-dbcp-tomcat5 \ commons-pool-tomcat5 \ ecj 2>&1 || exit 0 %post servlet-2_5-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar 20500 %post webapps build-jar-repository %{appdir}/examples/WEB-INF/lib \ taglibs-core.jar taglibs-standard.jar 2>&1 %preun # clean tempdir and workdir on removal or upgrade ## % {__rm} -fr %{workdir}/* # %{tempdir}/* %if %defined suse_version %stop_on_removal %{name} %else if [ "$1" = "0" ]; then [ -f /var/lock/subsys/%{name} ] && %{_sysconfdir}/init.d/%{name} stop [ -f %{_sysconfdir}/init.d/%{name} ] && /sbin/chkconfig --del %{name} fi %endif %preun lib if [ "$1" = "0" ]; then %{__rm} -f \ %{libdir}/\[commons-collections-tomcat5\].jar \ %{libdir}/\[commons-dbcp-tomcat5\].jar \ %{libdir}/\[commons-pool-tomcat5\].jar \ %{libdir}/\[ecj\].jar >/dev/null 2>&1 fi %if %defined suse_version %postun %restart_on_update %{name} %insserv_cleanup %endif %postun jsp-2_1-api if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove jsp \ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar fi %postun servlet-2_5-api if [ "$1" = "0" ]; then %{_sbindir}/update-alternatives --remove servlet \ %{_javadir}/%{name}-servlet-%{servletspec}-api.jar fi %files %defattr(0644,root,root,0755) %doc %{packdname}/{LICENSE,NOTICE,RELEASE*} %attr(755,root,root) %{_bindir}/d%{name} %attr(0770,root,tomcat) %dir %{_localstatedir}/log/%{name} %attr(755,root,root) %{_sysconfdir}/init.d/%{name} %if %{defined suse_version} #bnc#565901 %attr(0755,root,root) %{bindir}/catalina.sh %endif %if ! %defined suse_version %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %endif %attr(0775,root,tomcat) %dir %{appdir} %dir %{confdir} %config(noreplace) %{confdir}/%{name}.conf %config(noreplace) %{confdir}/*.policy %config(noreplace) %{confdir}/*.properties %config(noreplace) %{confdir}/context.xml %config(noreplace) %{confdir}/server.xml %attr(660,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml %config(noreplace) %{confdir}/web.xml %attr(0775,root,tomcat) %dir %{tempdir} %attr(0775,root,tomcat) %dir %{workdir} %{homedir} %dir /srv/%{name} %{_sbindir}/rc%{name} #bnc#424675 %attr(0775,root,tomcat) %dir %{workdir}/Catalina %{confdir}/Catalina %files admin-webapps %defattr(0644,root,root,0755) %{appdir}/host-manager %{appdir}/manager %files docs-webapp %defattr(0644,root,root,0755) %{appdir}/docs %files javadoc %defattr(0644,root,root,0755) %{_javadocdir}/%{name} %files jsp-2_1-api %defattr(0644,root,root,0755) %{_javadir}/%{name}-jsp*.jar %files lib %defattr(0644,root,root,0755) %{libdir} # bnc#418664 %config(noreplace) %{_sysconfdir}/ant.d %files servlet-2_5-api %defattr(0644,root,root,0755) %{_javadir}/%{name}-servlet*.jar %files webapps %defattr(0644,root,root,0755) #bnc#520532 %config(noreplace) %{appdir}/ROOT %{appdir}/examples %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor