|
|
|
@ -1,10 +1,9 @@
|
|
|
|
|
%global archiversion %(echo %{version} | tr . _ )
|
|
|
|
|
|
|
|
|
|
%bcond_without dtd
|
|
|
|
|
|
|
|
|
|
Name: log4j12
|
|
|
|
|
Version: 1.2.17
|
|
|
|
|
Release: 22%{?dist}
|
|
|
|
|
Release: 24%{?dist}
|
|
|
|
|
Summary: Java logging package
|
|
|
|
|
License: ASL 2.0
|
|
|
|
|
URL: http://logging.apache.org/log4j/1.2/
|
|
|
|
@ -17,9 +16,10 @@ Patch0: 0001-logfactor5-changed-userdir.patch
|
|
|
|
|
Patch1: 0009-Fix-tests.patch
|
|
|
|
|
Patch2: 0010-Fix-javadoc-link.patch
|
|
|
|
|
Patch3: 0001-Backport-fix-for-CVE-2017-5645.patch
|
|
|
|
|
Patch4: sun-reflect-filter-jdk11.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: maven-local
|
|
|
|
|
BuildRequires: mvn(ant-contrib:ant-contrib)
|
|
|
|
|
BuildRequires: mvn(com.sun.mail:android-activation)
|
|
|
|
|
BuildRequires: mvn(javax.mail:mail)
|
|
|
|
|
BuildRequires: mvn(junit:junit)
|
|
|
|
|
BuildRequires: mvn(org.apache.ant:ant-junit)
|
|
|
|
@ -30,7 +30,6 @@ BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
|
|
|
|
|
BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin)
|
|
|
|
|
BuildRequires: mvn(oro:oro)
|
|
|
|
|
|
|
|
|
|
Obsoletes: log4j <= 0:1.2.17-14
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Log4j is a tool to help the programmer output log statements to a
|
|
|
|
@ -54,6 +53,7 @@ rm -rf docs/api
|
|
|
|
|
%patch1 -p1 -b .fix-tests
|
|
|
|
|
%patch2 -p1 -b .xlink-javadoc
|
|
|
|
|
%patch3 -p1
|
|
|
|
|
%patch4 -p1
|
|
|
|
|
|
|
|
|
|
# Remove unavailable plugin
|
|
|
|
|
%pom_remove_plugin :clirr-maven-plugin
|
|
|
|
@ -67,6 +67,9 @@ rm -rf docs/api
|
|
|
|
|
# Remove openejb from dependencies
|
|
|
|
|
%pom_remove_dep org.apache.openejb:javaee-api
|
|
|
|
|
|
|
|
|
|
%pom_remove_dep :ant-contrib
|
|
|
|
|
%pom_remove_dep sun.jdk:tools
|
|
|
|
|
|
|
|
|
|
# Fix ant gId
|
|
|
|
|
sed -i.ant "s|groupId>ant<|groupId>org.apache.ant<|g" pom.xml
|
|
|
|
|
|
|
|
|
@ -97,14 +100,6 @@ for i in contribs/JimMoore/mail*;do
|
|
|
|
|
mv new "$i"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Needed by tests
|
|
|
|
|
mkdir -p tests/lib/
|
|
|
|
|
(cd tests/lib/
|
|
|
|
|
ln -s `build-classpath jakarta-oro`
|
|
|
|
|
ln -s `build-classpath javamail/mail`
|
|
|
|
|
ln -s `build-classpath junit`
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
%mvn_compat_version log4j:log4j 1.2.17 1.2.16 1.2.15 1.2.14 1.2.13 1.2.12 12
|
|
|
|
|
# Remove Microsoft Windows platform specific files
|
|
|
|
|
rm -r src/main/java/org/apache/log4j/nt/NTEventLogAppender.java \
|
|
|
|
@ -117,68 +112,41 @@ sed -i '/TelnetAppenderTest/d' tests/src/java/org/apache/log4j/CoreTestSuite.jav
|
|
|
|
|
%mvn_file log4j:log4j log4j %{name}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
# Needed by tests
|
|
|
|
|
mkdir -p tests/lib/
|
|
|
|
|
(cd tests/lib/
|
|
|
|
|
ln -s `build-classpath jakarta-oro`
|
|
|
|
|
ln -s `build-classpath javamail/mail`
|
|
|
|
|
ln -s `build-classpath javamail/android-activation`
|
|
|
|
|
ln -s `build-classpath junit`
|
|
|
|
|
)
|
|
|
|
|
%mvn_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%mvn_install -X
|
|
|
|
|
|
|
|
|
|
# log4j-1 symlink for use with build-classpath et al.
|
|
|
|
|
install -d -m 755 %{buildroot}%{_javadir}/
|
|
|
|
|
ln -s log4j-%{version}.jar %{buildroot}%{_javadir}/log4j-1.jar
|
|
|
|
|
|
|
|
|
|
%if %{with dtd}
|
|
|
|
|
# DTD and the SGML catalog (XML catalog handled in scriptlets)
|
|
|
|
|
install -pD -T -m 644 src/main/javadoc/org/apache/log4j/xml/doc-files/log4j.dtd \
|
|
|
|
|
%{buildroot}%{_datadir}/sgml/log4j/log4j.dtd
|
|
|
|
|
install -pD -T -m 644 %{SOURCE1} \
|
|
|
|
|
%{buildroot}%{_datadir}/sgml/log4j/catalog
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
# Note that we're using versioned catalog, so this is always ok.
|
|
|
|
|
if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
|
|
|
|
|
%{_bindir}/install-catalog --add \
|
|
|
|
|
%{_sysconfdir}/sgml/log4j-%{version}-%{release}.cat \
|
|
|
|
|
%{_datadir}/sgml/log4j/catalog > /dev/null || :
|
|
|
|
|
fi
|
|
|
|
|
if [ -x %{_bindir}/xmlcatalog -a -w %{_sysconfdir}/xml/catalog ]; then
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --add public "-//APACHE//DTD LOG4J 1.2//EN" \
|
|
|
|
|
file://%{_datadir}/sgml/log4j/log4j.dtd %{_sysconfdir}/xml/catalog \
|
|
|
|
|
> /dev/null
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --add system log4j.dtd \
|
|
|
|
|
file://%{_datadir}/sgml/log4j/log4j.dtd %{_sysconfdir}/xml/catalog \
|
|
|
|
|
> /dev/null || :
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
|
if [ -x %{_bindir}/xmlcatalog -a -w %{_sysconfdir}/xml/catalog ]; then
|
|
|
|
|
%{_bindir}/xmlcatalog --noout --del \
|
|
|
|
|
file://%{_datadir}/sgml/log4j/log4j.dtd \
|
|
|
|
|
%{_sysconfdir}/xml/catalog > /dev/null || :
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
# Note that we're using versioned catalog, so this is always ok.
|
|
|
|
|
if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then
|
|
|
|
|
%{_bindir}/install-catalog --remove \
|
|
|
|
|
%{_sysconfdir}/sgml/log4j-%{version}-%{release}.cat \
|
|
|
|
|
%{_datadir}/sgml/log4j/catalog > /dev/null || :
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%endif # with dtd
|
|
|
|
|
|
|
|
|
|
%files -f .mfiles
|
|
|
|
|
%{_javadir}/log4j-1.jar
|
|
|
|
|
%if %{with dtd}
|
|
|
|
|
%{_datadir}/sgml/log4j
|
|
|
|
|
%endif
|
|
|
|
|
%license LICENSE NOTICE
|
|
|
|
|
|
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
|
|
|
%license LICENSE NOTICE
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue May 07 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.2.17-24
|
|
|
|
|
- Rebuilt for MSVSphere 8.9
|
|
|
|
|
|
|
|
|
|
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.17-24
|
|
|
|
|
- Mass rebuild for javapackages-tools 201902
|
|
|
|
|
|
|
|
|
|
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.2.17-23
|
|
|
|
|
- Mass rebuild for javapackages-tools 201901
|
|
|
|
|
|
|
|
|
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.17-22
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|