Hello community, here is the log from the commit of package tomcat_apparmor checked in at Tue May 22 01:02:52 CEST 2007. -------- --- tomcat_apparmor/tomcat_apparmor.changes 2007-01-30 01:30:39.000000000 +0100 +++ /mounts/work_src_done/STABLE/tomcat_apparmor/tomcat_apparmor.changes 2007-05-21 23:31:50.506757000 +0200 @@ -1,0 +2,7 @@ +Mon May 21 23:30:34 CEST 2007 - dreynolds@suse.de + +- Ported plugin to tomcat5.5: +- Changes to logging interface +- Changes to request pipeline + +------------------------------------------------------------------- Old: ---- tomcat_apparmor-2.0-161.tar.gz New: ---- tomcat_apparmor-2.0.2-688.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tomcat_apparmor.spec ++++++ --- /var/tmp/diff_new_pack.H11937/_old 2007-05-22 01:02:42.000000000 +0200 +++ /var/tmp/diff_new_pack.H11937/_new 2007-05-22 01:02:42.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package tomcat_apparmor (Version 2.0) +# spec file for package tomcat_apparmor (Version 2.0.2) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -14,22 +14,22 @@ %if ! %{?distro:1}0 %define distro suse %endif -Summary: Tomcat 5 plugin for AppArmor change_hat -Version: 2.0 -Release: 30 -Group: System/Libraries -Source0: %{name}-%{version}-161.tar.gz -License: GNU General Public License (GPL) -BuildRoot: %{_tmppath}/%{name}-%{version}-build -URL: http://developer.novell.com/wiki/index.php/Novell_AppArmor -Prereq: tomcat5, servletapi5, libapparmor -BuildRequires: ant apparmor-docs java java2-devel-packages libapparmor servletapi5 tomcat5 %if %{distro} == "suse" -%define CATALINA_HOME /usr/share/tomcat5 +%define CATALINA_HOME /usr/share/tomcat55 %endif %define APPARMOR_DOC_DIR /usr/share/doc/packages/apparmor-docs/ %define JNI_SO libJNIChangeHat.so %define JAR_FILE changeHatValve.jar +Summary: Tomcat 5 plugin for AppArmor change_hat +Version: 2.0.2 +Release: 1 +Group: System/Libraries +Source0: %{name}-%{version}-688.tar.gz +License: GNU General Public License (GPL) +BuildRoot: %{_tmppath}/%{name}-%{version}-build +URL: http://developer.novell.com/wiki/index.php/Novell_AppArmor +Prereq: tomcat55, servletapi5, libapparmor +BuildRequires: ant apparmor-docs java java2-devel-packages libapparmor servletapi5 tomcat55 %description tomcat_apparmor - is a plugin for Apache Tomcat version 5.x that @@ -46,16 +46,13 @@ %prep %setup -q -# set lib path correctly -sed -i -e 's|INCLUDE=/usr/lib/jvm/java/include|INCLUDE=%{_libdir}/jvm/java/include|g' src/jni_src/Makefile %build [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} -ant -Ddist=${RPM_BUILD_DIR}/%{name}-%{version} -Dtarget=1.4 jar jni_so +ant -Dinstall_lib=%{_lib} -Dcatalina_home=%{CATALINA_HOME} -Ddist=${RPM_BUILD_DIR}/%{name}-%{version} -Dtarget=1.4 jar jni_so %install -export LIB=%{_lib} -ant -Dlib=%{_lib} -Ddist=${RPM_BUILD_DIR}/%{name}-%{version} -Dversion=%{version} -Drelease=%{release} -Dcatalina_home=%{CATALINA_HOME} -Dinstall_root=${RPM_BUILD_ROOT} -Dinstall_lib=%{_lib} install_jar install_jni +ant -Ddist=${RPM_BUILD_DIR}/%{name}-%{version} -Dversion=%{version} -Drelease=%{release} -Dcatalina_home=%{CATALINA_HOME} -Dinstall_root=${RPM_BUILD_ROOT} -Dinstall_lib=%{_lib} install_jar install_jni mkdir -p ${RPM_BUILD_ROOT}%{APPARMOR_DOC_DIR} install ${RPM_BUILD_DIR}/%{name}-%{version}/README.tomcat_apparmor ${RPM_BUILD_ROOT}%{APPARMOR_DOC_DIR} @@ -75,7 +72,11 @@ %postun ldconfig -%changelog -n tomcat_apparmor +%changelog +* Mon May 21 2007 - dreynolds@suse.de +- Ported plugin to tomcat5.5: +- Changes to logging interface +- Changes to request pipeline * Tue Jan 30 2007 - ro@suse.de - remove self-provides * Tue Nov 21 2006 - dbornkessel@suse.de ++++++ tomcat_apparmor-2.0-161.tar.gz -> tomcat_apparmor-2.0.2-688.tar.gz ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/build.xml new/tomcat_apparmor-2.0.2/build.xml --- old/tomcat_apparmor-2.0/build.xml 2006-10-11 19:42:22.000000000 +0200 +++ new/tomcat_apparmor-2.0.2/build.xml 2007-05-21 22:59:34.000000000 +0200 @@ -18,10 +18,10 @@ <include name="**/*.jar"/> </fileset> - <fileset id="tomcat.jars" dir="/usr/share/tomcat5/server/lib"> + <fileset id="tomcat.jars" dir="${catalina_home}/server/lib"> <include name="**/*.jar"/> </fileset> - <fileset id="servlet.jars" dir="/usr/share/tomcat5/common/lib"> + <fileset id="servlet.jars" dir="${catalina_home}/common/lib"> <include name="**/*.jar"/> </fileset> @@ -54,6 +54,7 @@ <target name="jni_so" depends="compile" description="Build JNI library"> <mkdir dir="${dist}"/> <exec dir="${jni_src}" executable="/usr/bin/make"> + <arg value="LIB=${install_lib}"/> <arg value="DESTDIR=${dist}"/> <arg value="VERSION=${version}"/> <arg value="RELEASE=${release}"/> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/common/apparmor.css new/tomcat_apparmor-2.0.2/common/apparmor.css --- old/tomcat_apparmor-2.0/common/apparmor.css 1970-01-01 01:00:00.000000000 +0100 +++ new/tomcat_apparmor-2.0.2/common/apparmor.css 2007-04-25 23:43:55.000000000 +0200 @@ -0,0 +1,30 @@ +BODY {background:rgb(000,000,000); color:rgb(225,225,225); +margin-left: 1%; margin-right: 5%} +H1 {color:rgb(240,240,240); font-size:115%;} +H2 {color:rgb(240,240,240); font-size:109%;} +H3 {color:rgb(240,240,240); font-size:104%;} +TD.sidebar {width:18em; background:rgb(020,020,020); vertical-align:top;} +TD.main {width:250em; background:rgb(020,020,020); padding-top:5px; +padding-bottom:5px; padding-left:10px; padding-right:10px; } +TD.sidebarhead {background:rgb(038,038,038);} +TD.footer {background:rgb(020,020,020); padding:5px; } +TD.block {background: #9c9c9c; color:rgb(000,000,000)} + +P {font-size:102%} +P {margin-left:.5em; margin-right:.5em} +P {color:rgb(225,225,225)} + +P.sidebar {font-size:98% } +P.sidebarhead {font-size:98%; font-weight:bold; } + +UL {font-size:102%} +UL {margin-left:.5em; margin-right:.5em} +UL {color:rgb(225,225,225)} + +IMG {border:none} + +:link, :visited, :active { text-decoration:underline; } + +:link { color: white } +:visited { color: rgb(225,225,225)} +:active { color: gray } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/common/Make-po.rules new/tomcat_apparmor-2.0.2/common/Make-po.rules --- old/tomcat_apparmor-2.0/common/Make-po.rules 1970-01-01 01:00:00.000000000 +0100 +++ new/tomcat_apparmor-2.0.2/common/Make-po.rules 2007-04-25 23:43:55.000000000 +0200 @@ -0,0 +1,45 @@ +# $Id: Make-po.rules 238 2006-11-15 09:22:15Z steve-beattie $ +# ------------------------------------------------------------------ +# +# Copyright (C) 2002-2005 Novell/SUSE +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public +# License published by the Free Software Foundation. +# +# ------------------------------------------------------------------ +# +# The including makefile needs to define LANG, which lists the lang +# files to include; e.g. LANG=en_US de_DE, where en_US.po and de_DE.po +# exist +LOCALEDIR=/usr/share/locale + +XGETTEXT_ARGS=--copyright-holder="NOVELL, Inc." --msgid-bugs-address=apparmor-general@forge.novell.com -d ${NAME} + +# When making the .pot file, it's expected that the parent Makefile will +# pass in the list of sources in the SOURCES variable +PARENT_SOURCES=$(foreach source, ${SOURCES}, ../${source}) + +LANGS=$(patsubst %.po, %, $(wildcard *.po)) +TARGET_MOS=$(foreach lang, $(filter-out $(DISABLED_LANGS),$(LANGS)), ${lang}.mo) + +.PHONY: all +all: ${TARGET_MOS} + +${NAME}.pot: ${PARENT_SOURCES} + xgettext ${XGETTEXT_ARGS} ${PARENT_SOURCES} -o $@ + +%.mo: %.po + msgfmt -c -o $@ $< + +.PHONY: install +install: ${TARGET_MOS} + mkdir -p $(DESTDIR)/${LOCALEDIR} + for lang in ${LANGS} ; do \ + mkdir -p ${DESTDIR}/${LOCALEDIR}/$${lang}/LC_MESSAGES ; \ + install -m 644 $${lang}.mo ${DESTDIR}/${LOCALEDIR}/$${lang}/LC_MESSAGES/${NAME}.mo ; \ + done + +.PHONY: clean +clean: + rm -f *.mo Make.rules diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/common/Make.rules new/tomcat_apparmor-2.0.2/common/Make.rules --- old/tomcat_apparmor-2.0/common/Make.rules 1970-01-01 01:00:00.000000000 +0100 +++ new/tomcat_apparmor-2.0.2/common/Make.rules 2007-04-25 23:43:55.000000000 +0200 @@ -0,0 +1,287 @@ +# $Id: Make.rules 537 2007-04-03 21:12:16Z steve-beattie $ +# ------------------------------------------------------------------ +# +# Copyright (C) 2002-2005 Novell/SUSE +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 of the GNU General Public +# License published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, contact Novell, Inc. +# ------------------------------------------------------------------ +# Make.rules - common make targets and variables for building the SHASS +# product. +# +# NOTES: +# - must define the package NAME before including this file. +# - After checking in to cvs, you'll need to delele the hardlinked +# Make.rules files that already exist in the individual application +# directories + +DISTRIBUTION=AppArmor +VERSION=2.0.2 + +# OVERRIDABLE variables +# Set these variables before including Make.rules to change its behavior +# SPECFILE - for packages that have a non-standard specfile name +# EXTERNAL_PACKAGE - for packages that have upstream versions that +# we're locally modifying (e.g. imnxcerttool/gnutls). +# +# use 'make BUILDIR=/some/where/else/' to override the /usr/src/redhat +# location -- it *should* pick out the right thing to do based on the +# .rpmmacros file, but you can still use BUILDDIR to override that. +TESTBUILDDIR=$(shell [ -f ${HOME}/.rpmmacros ] && awk '/^%_topdir/ {print $$2}' ${HOME}/.rpmmacros) +ifndef BUILDDIR +BUILDDIR=$(shell if [ -d "${TESTBUILDDIR}" ] ; then \ + echo ${TESTBUILDDIR} | sed "s^/$$^^" ; \ + elif [ -d "/usr/src/redhat" ] ; then \ + echo "/usr/src/redhat" ; \ + elif [ -d "/usr/src/packages" ] ; then \ + echo "/usr/src/packages" ; \ + else \ + echo "/tmp/${NAME}" ; \ + fi ;) +endif +RPMHOSTVENDOR=$(shell rpm --eval "%{_host_vendor}") +ifndef DISTRO +DISTRO=$(shell if [ -f /etc/slackware-version ] ; then \ + echo slackware ; \ + elif [ -f /etc/debian_version ] ; then \ + echo debian ;\ + elif [ ${RPMHOSTVENDOR} = "suse" ] ; then \ + echo suse ;\ + elif [ ${RPMHOSTVENDOR} = "redhat" ] ; then \ + echo rhel4 ;\ + else \ + echo unknown ;\ + fi) +endif +RPMARG=--define "_topdir $(BUILDDIR:/=)" \ + --define "vendor NOVELL, Inc." \ + --define "distribution ${DISTRIBUTION}" \ + --define "debug_package %{nil}" \ + --define "immunix_version ${VERSION}" \ + $(shell [ -d ${BUILDDIR}/BUILDROOT ] && echo --define \"buildroot $(BUILDDIR:/=)/BUILDROOT\") \ + $(shell [ -n "${DISTRO}" ] && echo --define \"distro ${DISTRO}\") + +#REPO_VERSION=$(shell if [ -x /usr/bin/svn ] ; then \ +# if ! /usr/bin/svn info -r HEAD . 2> /dev/null | grep "^Last Changed Rev:" | sed "s/^Last Changed Rev: //" ; then \ +# /usr/bin/svn info . 2> /dev/null | grep "^Last Changed Rev:" | sed "s/^Last Changed Rev: //" ; \ +# fi ; \ +# fi) +REPO_VERSION=$(shell if [ -x /usr/bin/svn ] ; then \ + /usr/bin/svn info . 2> /dev/null | grep "^Last Changed Rev:" | sed "s/^Last Changed Rev: //" ; \ + fi) +REPO_URL=$(shell if [ -x /usr/bin/svn ] ; then \ + /usr/bin/svn info . 2> /dev/null | grep "^URL:" | sed "s/^URL: //" ; \ + fi) +COMMON_REPO_URL=$(shell if [ -x /usr/bin/svn ] ; then \ + /usr/bin/svn info $(COMMONDIR) 2> /dev/null | grep "^URL:" | sed "s/^URL: //" ; \ + fi) + +ifdef EXTERNAL_PACKAGE +RPMARG+=--define "_sourcedir $(shell pwd)" +endif + +ifndef SPECFILE +SPECFILE = $(NAME).spec +endif +RELEASE = $(shell rpm -q --specfile --define "_sourcedir ." ${RPMARG} --qf "%{RELEASE}" ${SPECFILE}) +RELEASE_DIR = $(NAME)-$(VERSION) +TARBALL = $(NAME)-$(VERSION)-${REPO_VERSION}.tar.gz +TAR = /bin/tar czvp -h --exclude .svn --exclude CVS --exclude .cvsignore --exclude ${TARBALL} --exclude ${RELEASE_DIR}/${RELEASE_DIR} $(shell test -f ${NAME}.exclude && echo "-X ${NAME}.exclude") +LDCONFIG = /sbin/ldconfig + +CVSPKG_VERSION=$(shell rpm -q --specfile --define "_sourcedir ." ${RPMARG} ${SPECFILE} | head -1 | tr "." "_") + +RPMSUBDIRS=SOURCES SPECS BUILD BUILDROOT SRPMS RPMS/i386 RPMS/i586 \ + RPMS/i686 RPMS/athlon RPMS/noarch RPMS/x86_64 +BUILDRPMSUBDIRS=$(foreach subdir, $(RPMSUBDIRS), $(BUILDDIR:/=)/$(subdir)) + +.PHONY: cvs_tag +cvs_tag: + cvs tag IMMUNIX-${CVSPKG_VERSION} + +.PHONY: checkin +checkin: + if cvs -q up -d | grep -q "^\?" ; then echo "Hey! You have" \ + "files in the directory you have not added into cvs."; exit 1; \ + fi + cvs ci + make cvs_tag + +ifdef EXTERNAL_PACKAGE +.PHONY: rpm +rpm: clean $(BUILDRPMSUBDIRS) + rpmbuild -ba ${RPMARG} ${SPECFILE} + +else +.PHONY: rpm +rpm: clean $(TARBALL) $(BUILDRPMSUBDIRS) + cp $(TARBALL) $(BUILDDIR)/SOURCES/ + cp ${SPECFILE} $(BUILDDIR)/SPECS/ + rpmbuild -ba ${RPMARG} ${SPECFILE} + +.PHONY: ${SPECFILE} +${SPECFILE}: ${SPECFILE}.in + sed -e "s/@@immunix_version@@/${VERSION}/g" \ + -e "s/@@repo_version@@/${REPO_VERSION}/g" $< > $@ + +${TARBALL}: clean ${SPECFILE} + -rm -rf $(RELEASE_DIR) + mkdir $(RELEASE_DIR) + $(TAR) . | tar xz -C $(RELEASE_DIR) + $(TAR) -f $@ $(RELEASE_DIR) + rm -rf $(RELEASE_DIR) + +.PHONY: tarball +tarball: clean $(TARBALL) + +.PHONY: dist +dist: clean $(SPECFILE) + -rm -rf $(RELEASE_DIR) + svn export -r $(REPO_VERSION) $(REPO_URL) $(RELEASE_DIR) + svn export $(COMMON_REPO_URL) $(RELEASE_DIR)/common + make -C $(RELEASE_DIR) $(SPECFILE) REPO_VERSION=${REPO_VERSION} COMMONDIR_EXISTS=false + $(TAR) -f $(TARBALL) $(RELEASE_DIR) + rm -rf $(RELEASE_DIR) + +endif + +.PHONY: version +.SILENT: version +version: + rpm -q --define "_sourcedir ." ${RPMARG} --specfile ${SPECFILE} + +.PHONY: build_dir +build_dir: $(BUILDRPMSUBDIRS) + +$(BUILDRPMSUBDIRS): + mkdir -p $(BUILDRPMSUBDIRS) + +.PHONY: _clean +.SILENT: _clean +_clean: + -rm -f ${NAME}-${VERSION}-*.tar.gz + -rm -f ${MANPAGES} ${HTMLMANPAGES} pod2htm*.tmp + +# ===================== +# manpages +# ===================== + +POD2MAN = /usr/bin/pod2man +POD2HTML = /usr/bin/pod2html +MANDIR = /usr/share/man +DOCDIR = /usr/share/doc/${NAME}-${VERSION} + +# get list of directory numbers based on definition of MANPAGES variable +MANDIRS=$(sort $(foreach dir, 1 2 3 4 5 6 7 8, $(patsubst %.${dir}, ${dir}, $(filter %.${dir}, ${MANPAGES})))) +HTMLMANPAGES=$(foreach manpage, ${MANPAGES}, ${manpage}.html) + +.PHONY: install_manpages +install_manpages: $(MANPAGES) + $(foreach dir, ${MANDIRS}, \ + install -d ${DESTDIR}/${MANDIR}/man${dir} ; \ + install -m 644 $(filter %.${dir}, ${MANPAGES}) ${DESTDIR}/${MANDIR}/man${dir}; \ + $(foreach aa_page, $(filter %.${dir}, ${AA_MANPAGES}), \ + ln -sf $(aa_page) ${DESTDIR}/${MANDIR}/man${dir}/${aa_page:%=aa-%};)) + +%.1: %.pod + $(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=1 > $@ + +%.2: %.pod + $(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=2 > $@ + +%.3: %.pod + $(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=3 > $@ + +%.4: %.pod + $(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=4 > $@ + +%.5: %.pod + $(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=5 > $@ + +%.6: %.pod + $(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=6 > $@ + +%.7: %.pod + $(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=7 > $@ + +%.8: %.pod + $(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=8 > $@ + +%.1.html: %.pod + $(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@ + +%.2.html: %.pod + $(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@ + +%.3.html: %.pod + $(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@ + +%.4.html: %.pod + $(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@ + +%.5.html: %.pod + $(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@ + +%.6.html: %.pod + $(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@ + +%.7.html: %.pod + $(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@ + +%.8.html: %.pod + $(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@ + +# ===================== +# Slackware poo +# ===================== +.PHONY: slack +slack: + rm -rf ${BUILDDIR} + mkdir -p ${BUILDDIR}/install + make install DESTDIR=${BUILDDIR} DISTRO=slackware + # comment line is there so grep always has something to match + ( echo "# install script pulled from ${SPECFILE}" ; rpm -q --specfile --define "_sourcedir ." ${RPMARG} --qf "%{POSTIN}\n" ${SPECFILE}) | grep -v "^(none)$$" >> ${BUILDDIR}/install/doinst.sh + ( cd ${BUILDDIR} && makepkg -l y -c y -p ${PWD}/${NAME}-${VERSION}-${RELEASE}.tgz ) + +# ===================== +# Debian poo +# ===================== +.PHONY: deb +deb: ${TARBALL} + rm -rf ${BUILDDIR} + mkdir -p ${BUILDDIR} + tar -xvzf ${TARBALL} -C ${BUILDDIR} + ( cd ${BUILDDIR}/${RELEASE_DIR} && sh -c "DEBFULLNAME='NOVELL, Inc' dh_make -e apparmor-general@forge.novell.com --library -f ~/svn/immunix/immunix/libimmunix/libimmunix-2.0.tar.gz << EOM \ +\ +EOM" ) + make ${NAME}-deb -C ${BUILDDIR}/${RELEASE_DIR} + # ( cd ${BUILDDIR}/${RELEASE_DIR} && dpkg-buildpackage -b -sd -rfakeroot) + +DEBIAN_DISTRO=stable + +DEB_CHANGELOG_OUTPUT="${NAME} (${VERSION}-${RELEASE}) ${DEBIAN_DISTRO}; urgency=low\n\ + \n * Automatically generated by the AppArmor Build System.\n\ + \n -- AppArmor Development Team <apparmor-general@forge.novell.com> $(shell date -R)" + + +.PHONY: debian/changelog +debian/changelog: + echo -e ${DEB_CHANGELOG_OUTPUT} > $@ + +A2PS_ARGS=-Ec -g --line-numbers=1 +ENSCRIPT_ARGS=-C -2jGr -f Courier6 -E +%.c.ps: %.c + #a2ps ${A2PS_ARGS} $< -o $@ + enscript ${ENSCRIPT_ARGS} -o $@ $< + +%.pm.ps: %.pm + enscript ${ENSCRIPT_ARGS} -o $@ $< diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/Makefile new/tomcat_apparmor-2.0.2/Makefile --- old/tomcat_apparmor-2.0/Makefile 2006-10-11 19:42:09.000000000 +0200 +++ new/tomcat_apparmor-2.0.2/Makefile 2007-05-21 22:59:34.000000000 +0200 @@ -18,27 +18,24 @@ all: COMMONDIR=../../../common/ -include Make.rules +include common/Make.rules COMMONDIR_EXISTS=$(strip $(shell [ -d ${COMMONDIR} ] && echo true)) ifeq ($(COMMONDIR_EXISTS), true) -Make.rules: $(COMMONDIR)/Make.rules - ln -f $(COMMONDIR)/Make.rules . - -po/Make.rules: $(COMMONDIR)/Make-po.rules - make -C po Make.rules +common/Make.rules: $(COMMONDIR)/Make.rules + ln -sf $(COMMONDIR) . endif LIB = lib -CATALINA_HOME = /usr/share/tomcat5 +CATALINA_HOME = /usr/share/tomcat55 + -# By default build 1.4 bytecode -all: - ant -Dtarget=1.4 jar jni_so +all: + ant -Dcatalina_home=${CATALINA_HOME} -Dtarget=1.5 jar jni_so clean: ant clean - rm -f tomcat_apparmor.spec tomcat_apparmor-*.tar.gz + rm -f tomcat_apparmor.spec ${NAME}-*.tar.gz Make.rules install: $(SPECFILE) ant -Dversion=$(VERSION) -Drelease=$(RELEASE) -Dcatalina_home=${CATALINA_HOME} -Dinstall_lib=${LIB} install_jar install_jni diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/Make.rules new/tomcat_apparmor-2.0.2/Make.rules --- old/tomcat_apparmor-2.0/Make.rules 2006-10-06 20:08:44.000000000 +0200 +++ new/tomcat_apparmor-2.0.2/Make.rules 1970-01-01 01:00:00.000000000 +0100 @@ -1,197 +0,0 @@ -# $Id: Make.rules 11 2006-04-12 21:19:42Z steve-beattie $ -# ------------------------------------------------------------------ -# -# Copyright (C) 2002-2005 Novell/SUSE -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public -# License published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# ------------------------------------------------------------------ -# Make.rules - common make targets and variables for building the SHASS -# product. -# -# NOTES: -# - must define the package NAME before including this file. -# - After checking in to cvs, you'll need to delele the hardlinked -# Make.rules files that already exist in the individual application -# directories - -DISTRIBUTION=Novell AppArmor -VERSION=2.0 - -# OVERRIDABLE variables -# Set these variables before including Make.rules to change its behavior -# SPECFILE - for packages that have a non-standard specfile name -# EXTERNAL_PACKAGE - for packages that have upstream versions that -# we're locally modifying (e.g. imnxcerttool/gnutls). -# -# use 'make BUILDIR=/some/where/else/' to override the /usr/src/redhat -# location -- it *should* pick out the right thing to do based on the -# .rpmmacros file, but you can still use BUILDDIR to override that. -TESTBUILDDIR=$(shell [ -f ${HOME}/.rpmmacros ] && awk '/^%_topdir/ {print $$2}' ${HOME}/.rpmmacros) -ifdef BUILDDIR -#BUILDDIR:=$(BUILDDIR,/=) -else -BUILDDIR=$(shell if [ -d "${TESTBUILDDIR}" ] ; then \ - echo ${TESTBUILDDIR} | sed "s^/$$^^" ; \ - elif [ -d "/usr/src/redhat" ] ; then \ - echo "/usr/src/redhat" ; \ - elif [ -d "/usr/src/packages" ] ; then \ - echo "/usr/src/packages" ; \ - else \ - echo "/tmp/${NAME}" ; \ - fi ;) -endif -RPMHOSTVENDOR=$(shell rpm --eval "%{_host_vendor}") -ifndef DISTRO -DISTRO=$(shell if [ -f /etc/slackware-version ] ; then \ - echo slackware ; \ - elif [ -f /etc/debian_version ] ; then \ - echo debian ;\ - elif [ ${RPMHOSTVENDOR} = "suse" ] ; then \ - echo suse ;\ - elif [ ${RPMHOSTVENDOR} = "redhat" ] ; then \ - echo rhel4 ;\ - else \ - echo unknown ;\ - fi) -endif -RPMARG=--define "_topdir ${BUILDDIR}" \ - --define "vendor NOVELL, Inc." \ - --define "distribution ${DISTRIBUTION}" \ - --define "debug_package %{nil}" \ - --define "immunix_version ${VERSION}" \ - $(shell [ -d ${BUILDDIR}/BUILDROOT ] && echo --define \"buildroot ${BUILDDIR}/BUILDROOT\") \ - $(shell [ -n "${DISTRO}" ] && echo --define \"distro ${DISTRO}\") - -#REPO_VERSION=$(shell if [ -x /usr/bin/svn ] ; then \ -# if ! /usr/bin/svn info -r HEAD . 2> /dev/null | grep "^Last Changed Rev:" | sed "s/^Last Changed Rev: //" ; then \ -# /usr/bin/svn info . 2> /dev/null | grep "^Last Changed Rev:" | sed "s/^Last Changed Rev: //" ; \ -# fi ; \ -# fi) -REPO_VERSION=$(shell if [ -x /usr/bin/svn ] ; then \ - /usr/bin/svn info . 2> /dev/null | grep "^Last Changed Rev:" | sed "s/^Last Changed Rev: //" ; \ - fi) - -ifdef EXTERNAL_PACKAGE -RPMARG+=--define "_sourcedir $(shell pwd)" -endif - -ifndef SPECFILE -SPECFILE = $(NAME).spec -endif -RELEASE = $(shell rpm -q --specfile --define "_sourcedir ." ${RPMARG} --qf "%{RELEASE}" ${SPECFILE}) -RELEASE_DIR = $(NAME)-$(VERSION) -TARBALL = $(NAME)-$(VERSION)-${REPO_VERSION}.tar.gz -TAR = /bin/tar czvp --exclude .svn --exclude CVS --exclude .cvsignore --exclude ${TARBALL} --exclude ${RELEASE_DIR}/${RELEASE_DIR} $(shell test -f ${NAME}.exclude && echo "-X ${NAME}.exclude") - -CVSPKG_VERSION=$(shell rpm -q --specfile --define "_sourcedir ." ${RPMARG} ${SPECFILE} | head -1 | tr "." "_") - -RPMSUBDIRS=SOURCES SPECS BUILD BUILDROOT SRPMS RPMS/i386 RPMS/i586 \ - RPMS/i686 RPMS/athlon RPMS/noarch RPMS/x86_64 -BUILDRPMSUBDIRS=$(foreach subdir, $(RPMSUBDIRS), $(BUILDDIR)/$(subdir)) - -.PHONY: cvs_tag -cvs_tag: - cvs tag IMMUNIX-${CVSPKG_VERSION} - -.PHONY: checkin -checkin: - if cvs -q up -d | grep -q "^\?" ; then echo "Hey! You have" \ - "files in the directory you have not added into cvs."; exit 1; \ - fi - cvs ci - make cvs_tag - -ifdef EXTERNAL_PACKAGE -.PHONY: rpm -rpm: clean $(BUILDRPMSUBDIRS) - rpmbuild -ba ${RPMARG} ${SPECFILE} - -else -.PHONY: rpm -rpm: clean $(TARBALL) $(BUILDRPMSUBDIRS) - cp $(TARBALL) $(BUILDDIR)/SOURCES/ - cp ${SPECFILE} $(BUILDDIR)/SPECS/ - rpmbuild -ba ${RPMARG} ${SPECFILE} - -.PHONY: ${SPECFILE} -${SPECFILE}: ${SPECFILE}.in - sed -e "s/@@immunix_version@@/${VERSION}/g" \ - -e "s/@@repo_version@@/${REPO_VERSION}/g" $< > $@ - -${TARBALL}: clean ${SPECFILE} - -rm -rf $(RELEASE_DIR) - mkdir $(RELEASE_DIR) - $(TAR) . | tar xz -C $(RELEASE_DIR) - $(TAR) -f $@ $(RELEASE_DIR) - rm -rf $(RELEASE_DIR) - -.PHONY: tarball -tarball: clean $(TARBALL) -endif - -.PHONY: version -.SILENT: version -version: - rpm -q --define "_sourcedir ." ${RPMARG} --specfile ${SPECFILE} - -.PHONY: build_dir -build_dir: $(BUILDRPMSUBDIRS) - -$(BUILDRPMSUBDIRS): - mkdir -p $(BUILDRPMSUBDIRS) - -# ===================== -# Slackware poo -# ===================== -.PHONY: slack -slack: - rm -rf ${BUILDDIR} - mkdir -p ${BUILDDIR}/install - make install DESTDIR=${BUILDDIR} DISTRO=slackware - # comment line is there so grep always has something to match - ( echo "# install script pulled from ${SPECFILE}" ; rpm -q --specfile --define "_sourcedir ." ${RPMARG} --qf "%{POSTIN}\n" ${SPECFILE}) | grep -v "^(none)$$" >> ${BUILDDIR}/install/doinst.sh - ( cd ${BUILDDIR} && makepkg -l y -c y -p ${PWD}/${NAME}-${VERSION}-${RELEASE}.tgz ) - -# ===================== -# Debian poo -# ===================== -.PHONY: deb -deb: ${TARBALL} - rm -rf ${BUILDDIR} - mkdir -p ${BUILDDIR} - tar -xvzf ${TARBALL} -C ${BUILDDIR} - ( cd ${BUILDDIR}/${RELEASE_DIR} && sh -c "DEBFULLNAME='NOVELL, Inc' dh_make -e apparmor-general@forge.novell.com --library -f ~/svn/immunix/immunix/libimmunix/libimmunix-2.0.tar.gz << EOM \ -\ -EOM" ) - make ${NAME}-deb -C ${BUILDDIR}/${RELEASE_DIR} - # ( cd ${BUILDDIR}/${RELEASE_DIR} && dpkg-buildpackage -b -sd -rfakeroot) - -DEBIAN_DISTRO=stable - -DEB_CHANGELOG_OUTPUT="${NAME} (${VERSION}-${RELEASE}) ${DEBIAN_DISTRO}; urgency=low\n\ - \n * Automatically generated by the AppArmor Build System.\n\ - \n -- AppArmor Development Team <apparmor-general@forge.novell.com> $(shell date -R)" - - -.PHONY: debian/changelog -debian/changelog: - echo -e ${DEB_CHANGELOG_OUTPUT} > $@ - -A2PS_ARGS=-Ec -g --line-numbers=1 -ENSCRIPT_ARGS=-C -2jGr -f Courier6 -E -%.c.ps: %.c - #a2ps ${A2PS_ARGS} $< -o $@ - enscript ${ENSCRIPT_ARGS} -o $@ $< - -%.pm.ps: %.pm - enscript ${ENSCRIPT_ARGS} -o $@ $< diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/src/com/novell/apparmor/catalina/valves/ChangeHatValve.java new/tomcat_apparmor-2.0.2/src/com/novell/apparmor/catalina/valves/ChangeHatValve.java --- old/tomcat_apparmor-2.0/src/com/novell/apparmor/catalina/valves/ChangeHatValve.java 2006-10-13 23:19:59.000000000 +0200 +++ new/tomcat_apparmor-2.0.2/src/com/novell/apparmor/catalina/valves/ChangeHatValve.java 2007-05-21 22:59:34.000000000 +0200 @@ -1,11 +1,11 @@ -/* ------------------------------------------------------------------ - * - * Copyright (C) 2002-2005 Novell/SUSE - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License published by the Free Software Foundation. - * +/* ------------------------------------------------------------------ + * + * Copyright (C) 2002-2007 Novell/SUSE + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License published by the Free Software Foundation. + * * ------------------------------------------------------------------ */ package com.novell.apparmor.catalina.valves; @@ -13,10 +13,7 @@ import com.novell.apparmor.JNIChangeHat; import java.io.IOException; import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import org.apache.catalina.HttpRequest; import org.apache.catalina.Container; -import org.apache.catalina.HttpResponse; import org.apache.catalina.valves.ValveBase; import java.security.SecureRandom; @@ -28,9 +25,9 @@ private static String DEFAULT_HAT = "DEFAULT"; private static int SERVLET_PATH_MEDIATION = 0; private static int URI_MEDIATION = 1; - + private int mediationType = ChangeHatValve.SERVLET_PATH_MEDIATION; - + /* * * Property setter called during the parsing of the server.xml. @@ -53,18 +50,18 @@ this.mediationType = ChangeHatValve.SERVLET_PATH_MEDIATION; } } - + /* * * Return an int value representing the currently configured * <code>mediationType</code> for this instance. * */ - int getMediationType() { + public int getMediationType() { return this.mediationType; } - - + + /* * * Return an instance of <code>SecureRandom</code> creating one if necessary @@ -76,7 +73,7 @@ } return ChangeHatValve.randomNumberGenerator; } - + /* * * Call to return a random cookie from the <code>SecureRandom</code> PRNG @@ -85,13 +82,15 @@ int getCookie() { SecureRandom rnd = getRndGen(); if ( rnd == null ) { - this.getContainer().getLogger().log( "[APPARMOR] can't initialize SecureRandom for cookie generation for change_hat() call.", container.getLogger().ERROR); + this.getContainer().getLogger().error( + "[APPARMOR] can't initialize SecureRandom for cookie" + + " generation for change_hat() call."); return 0; } return rnd.nextInt(); } - - + + /* * * Call out to AppArmor change_hat(2) to change the security @@ -110,82 +109,71 @@ * @exception ServletException if a servlet error has occurred * */ - public void invoke( org.apache.catalina.Request request, - org.apache.catalina.Response response, - org.apache.catalina.ValveContext context ) + public void invoke( org.apache.catalina.connector.Request request, + org.apache.catalina.connector.Response response ) throws IOException, ServletException { - + Container container = this.getContainer(); int cookie, result; boolean inSubHat = false; - container.getLogger().log(this.getClass().toString() + - "[APPARMOR] Request received [" + request.getInfo() - + "]", container.getLogger().DEBUG); - - if ( !( request instanceof HttpRequest) - || !(response instanceof HttpResponse) ) { - container.getLogger().log(this.getClass().toString() - + "[APPARMOR] Non HttpRequest received. Not changing context. " - + "[" + request.getInfo() + "]", container.getLogger().ERROR); - context.invokeNext(request, response); - return; - } - - HttpRequest httpRequest = (HttpRequest) request; - HttpServletRequest servletRequest = (HttpServletRequest) - httpRequest.getRequest(); - + container.getLogger().debug(this.getClass().toString() + + "[APPARMOR] Request received [" + request.getInfo() + + "]"); + String hatname = ChangeHatValve.DEFAULT_HAT;; if ( getMediationType() == ChangeHatValve.SERVLET_PATH_MEDIATION ) { - hatname = servletRequest.getServletPath(); + hatname = request.getServletPath(); } else if ( getMediationType() == ChangeHatValve.URI_MEDIATION ) { - hatname = servletRequest.getRequestURI(); + hatname = request.getRequestURI(); } - + /* * Select the AppArmor container for this request: - * - * 1. try hat name from either URI or ServletPath + * + * 1. try hat name from either URI or ServletPath * (based on configuration) - * - * 2. try hat name of the defined DEFAULT_HAT - * + * + * 2. try hat name of the defined DEFAULT_HAT + * * 3. run in the current AppArmor context */ - + cookie = getCookie(); - container.getLogger().log("[APPARMOR] ChangeHat to [" + hatname - + "] cookie [" + cookie + "]", container.getLogger().DEBUG); + if ( hatname == null || "".equals(hatname) ) { + hatname = ChangeHatValve.DEFAULT_HAT; + } + container.getLogger().debug("[APPARMOR] ChangeHat to [" + hatname + + "] cookie [" + cookie + "]"); + result = changehat_wrapper.changehat_in(hatname, cookie); + if ( result == JNIChangeHat.EPERM ) { - container.getLogger().log("[APPARMOR] change_hat valve " + + container.getLogger().error("[APPARMOR] change_hat valve " + "configured but Tomcat process is not confined by an " + - "AppArmor profile.", container.getLogger().ERROR); - context.invokeNext(request, response); + "AppArmor profile."); + getNext().invoke(request, response); } else { if ( result == JNIChangeHat.EACCES ) { - changehat_wrapper.changehat_out(cookie); - result = changehat_wrapper.changehat_in(ChangeHatValve.DEFAULT_HAT, - cookie); - if ( result != 0 ) { - changehat_wrapper.changehat_out(cookie); - container.getLogger().log("[APPARMOR] ChangeHat to [" + hatname - + "] failed. Running in parent context.", - container.getLogger().ERROR); - } else { - inSubHat = true; - } - } else if ( result != 0 ) { - changehat_wrapper.changehat_out(cookie); - container.getLogger().log("[APPARMOR] ChangeHat to [" + hatname - + "] failed. Running in parent context.", - container.getLogger().ERROR); - } else { - inSubHat = true; - } - context.invokeNext(request, response); - if ( inSubHat ) changehat_wrapper.changehat_out(cookie); + changehat_wrapper.changehat_out(cookie); + result = changehat_wrapper.changehat_in(ChangeHatValve.DEFAULT_HAT, + cookie); + if ( result != 0 ) { + changehat_wrapper.changehat_out(cookie); + container.getLogger().error("[APPARMOR] ChangeHat to [" + hatname + + "] failed. Running in parent context."); + } else { + inSubHat = true; + } + } else if ( result != 0 ) { + changehat_wrapper.changehat_out(cookie); + container.getLogger().error("[APPARMOR] ChangeHat to [" + hatname + + "] failed. Running in parent context."); + } else { + inSubHat = true; + } + getNext().invoke(request, response); + if ( inSubHat ) changehat_wrapper.changehat_out(cookie); } } } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/src/jni_src/JNIChangeHat.c new/tomcat_apparmor-2.0.2/src/jni_src/JNIChangeHat.c --- old/tomcat_apparmor-2.0/src/jni_src/JNIChangeHat.c 2006-10-06 20:07:51.000000000 +0200 +++ new/tomcat_apparmor-2.0.2/src/jni_src/JNIChangeHat.c 2007-05-21 22:59:05.000000000 +0200 @@ -22,8 +22,13 @@ (JNIEnv *env, jobject obj, jstring hatnameUTF, jint token) { - int len = (*env)->GetStringLength(env, hatnameUTF); + int len; jint result = 0; + + if ( hatnameUTF == NULL ) { + return ( EINVAL ); + } + len = (*env)->GetStringLength(env, hatnameUTF); if ( len > 0 ) { if ( len > 128 ) { len = 128; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/src/jni_src/Makefile new/tomcat_apparmor-2.0.2/src/jni_src/Makefile --- old/tomcat_apparmor-2.0/src/jni_src/Makefile 2006-10-12 05:36:22.000000000 +0200 +++ new/tomcat_apparmor-2.0.2/src/jni_src/Makefile 2007-05-21 22:59:34.000000000 +0200 @@ -1,15 +1,15 @@ -INCLUDE=/usr/lib/jvm/java/include -TOP=../.. -CLASSPATH=${TOP}/build -CFLAGS=-g -O2 -Wall -Wstrict-prototypes -Wl,-soname,$@.${SO_VERS} -pipe -fpic -D_REENTRANT -INCLUDES=-I$(INCLUDE) -I$(INCLUDE)/linux -CLASSFILE=${CLASSPATH}/com/novell/apparmor/${JAVA_CLASSNAME}.class -DESTDIR=${TOP}/dist -SO_VERS = 1 -LIB = lib/ -LIBDIR = /usr/${LIB} -JAVA_CLASSNAME=JNIChangeHat -TARGET=lib${JAVA_CLASSNAME} +TOP = ../.. +CLASSPATH = ${TOP}/build +LIB = lib/ +LIBDIR = /usr/${LIB} +INCLUDE = ${LIBDIR}/jvm/java/include +CFLAGS = -g -O2 -Wall -Wstrict-prototypes -Wl,-soname,$@.${SO_VERS} -pipe -fpic -D_REENTRANT +INCLUDES = -I$(INCLUDE) -I$(INCLUDE)/linux +CLASSFILE = ${CLASSPATH}/com/novell/apparmor/${JAVA_CLASSNAME}.class +DESTDIR = ${TOP}/dist +SO_VERS = 1 +JAVA_CLASSNAME = JNIChangeHat +TARGET = lib${JAVA_CLASSNAME} all: ${TARGET}.so diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/tomcat_apparmor.spec new/tomcat_apparmor-2.0.2/tomcat_apparmor.spec --- old/tomcat_apparmor-2.0/tomcat_apparmor.spec 2006-10-17 17:56:44.000000000 +0200 +++ new/tomcat_apparmor-2.0.2/tomcat_apparmor.spec 2007-05-21 23:07:20.000000000 +0200 @@ -22,19 +22,25 @@ %define distro suse %endif +%if %{distro} == "suse" +%define CATALINA_HOME /usr/share/tomcat5 +%endif +%define APPARMOR_DOC_DIR /usr/share/doc/packages/apparmor-docs/ +%define JNI_SO libJNIChangeHat.so +%define JAR_FILE changeHatValve.jar + Summary: Tomcat 5 plugin for AppArmor change_hat Name: tomcat_apparmor -Version: 2.0 -Release: 161 +Version: 2.0.2 +Release: 688 Group: System/Libraries -Source0: %{name}-%{version}-161.tar.gz +Source0: %{name}-%{version}-688.tar.gz License: LGPL BuildRoot: %{?_tmppath:}%{!?_tmppath:/var/tmp}/%{name}-%{version}-build Url: http://developer.novell.com/wiki/index.php/Novell_AppArmor -Prereq: tomcat5, servletapi5, libapparmor -BuildRequires: tomcat5, servletapi5 ant, java, libapparmor, java2-devel-packages, apparmor-docs -Provides: tomcat_apparmor +Prereq: tomcat55, servletapi5, libapparmor +BuildRequires: tomcat55, servletapi5, ant, java, libapparmor, java2-devel-packages, apparmor-docs %description tomcat_apparmor - is a plugin for Apache Tomcat version 5.x that provides @@ -43,13 +49,6 @@ container. The AppArmor containers, or "hats", can be created for invidual URL processing or per servlet. -%if %{distro} == "suse" -%define CATALINA_HOME /usr/share/tomcat5 -%endif -%define APPARMOR_DOC_DIR /usr/share/doc/packages/apparmor-docs/ -%define JNI_SO libJNIChangeHat.so -%define JAR_FILE changeHatValve.jar - %prep %setup -q @@ -57,7 +56,7 @@ %build [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} -ant -Ddist=${RPM_BUILD_DIR}/%{name}-%{version} -Dtarget=1.4 jar jni_so +ant -Dinstall_lib=%{_lib} -Dcatalina_home=%{CATALINA_HOME} -Ddist=${RPM_BUILD_DIR}/%{name}-%{version} -Dtarget=1.4 jar jni_so %install ant -Ddist=${RPM_BUILD_DIR}/%{name}-%{version} -Dversion=%{version} -Drelease=%{release} -Dcatalina_home=%{CATALINA_HOME} -Dinstall_root=${RPM_BUILD_ROOT} -Dinstall_lib=%{_lib} install_jar install_jni diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/tomcat_apparmor-2.0/tomcat_apparmor.spec.in new/tomcat_apparmor-2.0.2/tomcat_apparmor.spec.in --- old/tomcat_apparmor-2.0/tomcat_apparmor.spec.in 2006-10-17 17:48:33.000000000 +0200 +++ new/tomcat_apparmor-2.0.2/tomcat_apparmor.spec.in 2007-05-21 22:59:34.000000000 +0200 @@ -22,6 +22,13 @@ %define distro suse %endif +%if %{distro} == "suse" +%define CATALINA_HOME /usr/share/tomcat5 +%endif +%define APPARMOR_DOC_DIR /usr/share/doc/packages/apparmor-docs/ +%define JNI_SO libJNIChangeHat.so +%define JAR_FILE changeHatValve.jar + Summary: Tomcat 5 plugin for AppArmor change_hat Name: tomcat_apparmor @@ -32,9 +39,8 @@ License: LGPL BuildRoot: %{?_tmppath:}%{!?_tmppath:/var/tmp}/%{name}-%{version}-build Url: http://developer.novell.com/wiki/index.php/Novell_AppArmor -Prereq: tomcat5, servletapi5, libapparmor -BuildRequires: tomcat5, servletapi5 ant, java, libapparmor, java2-devel-packages, apparmor-docs -Provides: tomcat_apparmor +Prereq: tomcat55, servletapi5, libapparmor +BuildRequires: tomcat55, servletapi5, ant, java, libapparmor, java2-devel-packages, apparmor-docs %description tomcat_apparmor - is a plugin for Apache Tomcat version 5.x that provides @@ -43,13 +49,6 @@ container. The AppArmor containers, or "hats", can be created for invidual URL processing or per servlet. -%if %{distro} == "suse" -%define CATALINA_HOME /usr/share/tomcat5 -%endif -%define APPARMOR_DOC_DIR /usr/share/doc/packages/apparmor-docs/ -%define JNI_SO libJNIChangeHat.so -%define JAR_FILE changeHatValve.jar - %prep %setup -q @@ -57,7 +56,7 @@ %build [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} -ant -Ddist=${RPM_BUILD_DIR}/%{name}-%{version} -Dtarget=1.4 jar jni_so +ant -Dinstall_lib=%{_lib} -Dcatalina_home=%{CATALINA_HOME} -Ddist=${RPM_BUILD_DIR}/%{name}-%{version} -Dtarget=1.4 jar jni_so %install ant -Ddist=${RPM_BUILD_DIR}/%{name}-%{version} -Dversion=%{version} -Drelease=%{release} -Dcatalina_home=%{CATALINA_HOME} -Dinstall_root=${RPM_BUILD_ROOT} -Dinstall_lib=%{_lib} install_jar install_jni ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de