From fd387fc61e7bd8ff61eda24c40c9339fb74612ff Mon Sep 17 00:00:00 2001 From: Stanislav Ochotnicky Date: Tue, 18 May 2010 13:53:07 +0000 Subject: [PATCH] Complete rebase of log4j to version 1.2.16 with cleanups, change to maven build system, dropping gcj and more --- .cvsignore | 2 +- 0001-logfactor5-changed-userdir.patch | 56 ++++ 0002-Remove-version-dependencies.patch | 41 +++ 0003-Removed-example-in-wrong-place.patch | 95 ++++++ 0004-Remove-mvn-release-plugin.patch | 36 +++ 0005-Remove-mvn-source-plugin.patch | 36 +++ 0006-Remove-mvn-clirr-plugin.patch | 40 +++ 0007-Remove-mvn-rat-plugin.patch | 35 +++ ...Remove-ant-contrib-from-dependencies.patch | 28 ++ 0009-Remove-ant-run-of-tests.patch | 39 +++ 0010-Fix-javadoc-link.patch | 26 ++ log4j-chainsaw.desktop | 5 +- log4j-javadoc-xlink.patch | 12 - log4j-jmx-Agent.patch | 37 --- log4j-logfactor5-userdir.patch | 46 --- log4j-logfactor5.desktop | 5 +- log4j-mx4j-tools.patch | 11 - log4j.spec | 282 ++++++++---------- sources | 2 +- 19 files changed, 555 insertions(+), 279 deletions(-) create mode 100644 0001-logfactor5-changed-userdir.patch create mode 100644 0002-Remove-version-dependencies.patch create mode 100644 0003-Removed-example-in-wrong-place.patch create mode 100644 0004-Remove-mvn-release-plugin.patch create mode 100644 0005-Remove-mvn-source-plugin.patch create mode 100644 0006-Remove-mvn-clirr-plugin.patch create mode 100644 0007-Remove-mvn-rat-plugin.patch create mode 100644 0008-Remove-ant-contrib-from-dependencies.patch create mode 100644 0009-Remove-ant-run-of-tests.patch create mode 100644 0010-Fix-javadoc-link.patch delete mode 100644 log4j-javadoc-xlink.patch delete mode 100644 log4j-jmx-Agent.patch delete mode 100644 log4j-logfactor5-userdir.patch delete mode 100644 log4j-mx4j-tools.patch diff --git a/.cvsignore b/.cvsignore index b3ff5b4..00a19f0 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -logging-log4j-1.2.14.tar.gz +apache-log4j-1.2.16.tar.gz diff --git a/0001-logfactor5-changed-userdir.patch b/0001-logfactor5-changed-userdir.patch new file mode 100644 index 0000000..95aa5fa --- /dev/null +++ b/0001-logfactor5-changed-userdir.patch @@ -0,0 +1,56 @@ +From bf8f55bbc9baddcb67d0b89edd859f93ce3c949f Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Mon, 17 May 2010 12:57:36 +0200 +Subject: [PATCH 01/10] logfactor5 changed userdir + +--- + .../lf5/viewer/configure/ConfigurationManager.java | 2 +- + .../log4j/lf5/viewer/configure/MRUFileManager.java | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/main/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java b/src/main/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java +index a94ffab..81191f2 100644 +--- a/src/main/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java ++++ b/src/main/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java +@@ -344,7 +344,7 @@ public class ConfigurationManager extends Object { + String home = System.getProperty("user.home"); + String sep = System.getProperty("file.separator"); + +- return home + sep + "lf5" + sep + CONFIG_FILE_NAME; ++ return home + sep + ".logfactor5" + sep + CONFIG_FILE_NAME; + } + + //-------------------------------------------------------------------------- +diff --git a/src/main/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java b/src/main/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java +index 6ff275d..ca40d5a 100644 +--- a/src/main/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java ++++ b/src/main/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java +@@ -175,14 +175,14 @@ public class MRUFileManager { + + /** + * Creates the directory where the MRU file list will be written. +- * The "lf5" directory is created in the Documents and Settings ++ * The ".logfactor5" directory is created in the Documents and Settings + * directory on Windows 2000 machines and where ever the user.home + * variable points on all other platforms. + */ + public static void createConfigurationDirectory() { + String home = System.getProperty("user.home"); + String sep = System.getProperty("file.separator"); +- File f = new File(home + sep + "lf5"); ++ File f = new File(home + sep + ".logfactor5"); + if (!f.exists()) { + try { + f.mkdir(); +@@ -268,7 +268,7 @@ public class MRUFileManager { + String home = System.getProperty("user.home"); + String sep = System.getProperty("file.separator"); + +- return home + sep + "lf5" + sep + CONFIG_FILE_NAME; ++ return home + sep + ".logfactor5" + sep + CONFIG_FILE_NAME; + } + + /** +-- +1.6.6.1 + diff --git a/0002-Remove-version-dependencies.patch b/0002-Remove-version-dependencies.patch new file mode 100644 index 0000000..32acb01 --- /dev/null +++ b/0002-Remove-version-dependencies.patch @@ -0,0 +1,41 @@ +From 9f84b1a71df2f7ba035db8f5af109a1d4120fa58 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Mon, 17 May 2010 13:48:31 +0200 +Subject: [PATCH 02/10] Remove version dependencies + +this is to remove (unneeded) versioned dependencies until we upgrade maven +--- + pom.xml | 3 --- + 1 files changed, 0 insertions(+), 3 deletions(-) + +diff --git a/pom.xml b/pom.xml +index 977ca83..ae0d95e 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -95,7 +95,6 @@ target platform and specify -Dntdll_target=msbuild on the mvn command line. + + + maven-surefire-plugin +- 2.5 + + tests + plain +@@ -149,7 +148,6 @@ target platform and specify -Dntdll_target=msbuild on the mvn command line. + + + maven-compiler-plugin +- 2.1 + + 1.3 + 1.1 +@@ -332,7 +330,6 @@ target platform and specify -Dntdll_target=msbuild on the mvn command line. + + + maven-javadoc-plugin +- 2.6.1 + + true + UTF-8 +-- +1.6.6.1 + diff --git a/0003-Removed-example-in-wrong-place.patch b/0003-Removed-example-in-wrong-place.patch new file mode 100644 index 0000000..b1634a5 --- /dev/null +++ b/0003-Removed-example-in-wrong-place.patch @@ -0,0 +1,95 @@ +From 1b2981ccd96ed575bab75a61bce5c01900916ee7 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Mon, 17 May 2010 13:49:49 +0200 +Subject: [PATCH 03/10] Removed example in wrong place + +this caused velocity to fail +--- + .../log4j/xml/examples/doc-files/XMLSample.java | 75 -------------------- + 1 files changed, 0 insertions(+), 75 deletions(-) + delete mode 100644 src/main/javadoc/org/apache/log4j/xml/examples/doc-files/XMLSample.java + +diff --git a/src/main/javadoc/org/apache/log4j/xml/examples/doc-files/XMLSample.java b/src/main/javadoc/org/apache/log4j/xml/examples/doc-files/XMLSample.java +deleted file mode 100644 +index 8ea09f2..0000000 +--- a/src/main/javadoc/org/apache/log4j/xml/examples/doc-files/XMLSample.java ++++ /dev/null +@@ -1,75 +0,0 @@ +-/* +- * Licensed to the Apache Software Foundation (ASF) under one or more +- * contributor license agreements. See the NOTICE file distributed with +- * this work for additional information regarding copyright ownership. +- * The ASF licenses this file to You under the Apache License, Version 2.0 +- * (the "License"); you may not use this file except in compliance with +- * the License. You may obtain a copy of the License at +- * +- * http://www.apache.org/licenses/LICENSE-2.0 +- * +- * Unless required by applicable law or agreed to in writing, software +- * distributed under the License is distributed on an "AS IS" BASIS, +- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +- * See the License for the specific language governing permissions and +- * limitations under the License. +- */ +- +-package org.apache.log4j.xml.examples; +- +-import org.apache.log4j.xml.DOMConfigurator; +-import org.apache.log4j.Logger; +- +-/** +- +- This example code shows how to +- read an XML based configuration file using a DOM parser. +- +-

Sample XML files sample1.xml +- and sample2.xml are provided. +- +- +-

Note that the log4j.dtd is not in the local directory. +- It is found by the class loader. +- +- @author Ceki Gülcü +- +-*/ +-public class XMLSample { +- +- static Logger cat = Logger.getLogger(XMLSample.class); +- +- public +- static +- void main(String argv[]) { +- +- if(argv.length == 1) +- init(argv[0]); +- else +- Usage("Wrong number of arguments."); +- sample(); +- } +- +- static +- void Usage(String msg) { +- System.err.println(msg); +- System.err.println( "Usage: java " + XMLSample.class.getName() + +- "configFile"); +- System.exit(1); +- } +- +- static +- void init(String configFile) { +- DOMConfigurator.configure(configFile); +- } +- +- static +- void sample() { +- int i = -1; +- cat.debug("Message " + ++i); +- cat.warn ("Message " + ++i); +- cat.error("Message " + ++i); +- Exception e = new Exception("Just testing"); +- cat.debug("Message " + ++i, e); +- } +-} +-- +1.6.6.1 + diff --git a/0004-Remove-mvn-release-plugin.patch b/0004-Remove-mvn-release-plugin.patch new file mode 100644 index 0000000..3066966 --- /dev/null +++ b/0004-Remove-mvn-release-plugin.patch @@ -0,0 +1,36 @@ +From a725a6c0a74429c490affd351189673646d7ffec Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Mon, 17 May 2010 13:53:18 +0200 +Subject: [PATCH 04/10] Remove mvn-release-plugin + +for now this is included in current mvn in Fedora. Remove once +release-plugin is separate +--- + pom.xml | 11 ----------- + 1 files changed, 0 insertions(+), 11 deletions(-) + +diff --git a/pom.xml b/pom.xml +index ae0d95e..f98a700 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -351,17 +351,6 @@ target platform and specify -Dntdll_target=msbuild on the mvn command line. + + + +- maven-release-plugin +- 2.0-beta-9 +- +- +- package site-deploy assembly:attached deploy +- +- +- + maven-source-plugin + 2.1.1 + +-- +1.6.6.1 + diff --git a/0005-Remove-mvn-source-plugin.patch b/0005-Remove-mvn-source-plugin.patch new file mode 100644 index 0000000..f159f67 --- /dev/null +++ b/0005-Remove-mvn-source-plugin.patch @@ -0,0 +1,36 @@ +From ef230e88b5381bb2cb2ef257846412b610b4e111 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Mon, 17 May 2010 13:55:19 +0200 +Subject: [PATCH 05/10] Remove mvn-source-plugin + +for now this is included in current mvn in Fedora. Remove once +source-plugin is separate +--- + pom.xml | 11 ----------- + 1 files changed, 0 insertions(+), 11 deletions(-) + +diff --git a/pom.xml b/pom.xml +index f98a700..c273581 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -350,17 +350,6 @@ target platform and specify -Dntdll_target=msbuild on the mvn command line. + + + +- +- maven-source-plugin +- 2.1.1 +- +- +- +- jar +- +- +- +- + +- +- org.codehaus.mojo +- clirr-maven-plugin +- 2.2.2 +- +- 1.2.15 +- +- + + org.codehaus.mojo + rat-maven-plugin +-- +1.6.6.1 + diff --git a/0007-Remove-mvn-rat-plugin.patch b/0007-Remove-mvn-rat-plugin.patch new file mode 100644 index 0000000..4a46f1f --- /dev/null +++ b/0007-Remove-mvn-rat-plugin.patch @@ -0,0 +1,35 @@ +From 16fb799c20651dfbaf2bdbc7e6e55f598e44b27c Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Mon, 17 May 2010 14:03:31 +0200 +Subject: [PATCH 07/10] Remove mvn-rat-plugin + +for now this is included in current mvn in Fedora. Remove once +rat-plugin is separate +--- + pom.xml | 10 ---------- + 1 files changed, 0 insertions(+), 10 deletions(-) + +diff --git a/pom.xml b/pom.xml +index 6e32bb7..cb76444 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -351,16 +351,6 @@ target platform and specify -Dntdll_target=msbuild on the mvn command line. + + + +- org.codehaus.mojo +- rat-maven-plugin +- 1.0-alpha-3 +- +- +- tests/witness/** +- +- +- +- + org.apache.felix + maven-bundle-plugin + 2.0.1 +-- +1.6.6.1 + diff --git a/0008-Remove-ant-contrib-from-dependencies.patch b/0008-Remove-ant-contrib-from-dependencies.patch new file mode 100644 index 0000000..5dae9e8 --- /dev/null +++ b/0008-Remove-ant-contrib-from-dependencies.patch @@ -0,0 +1,28 @@ +From c42e2e3263ed639c0fd4cb545ad38f0f15bf05a8 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Mon, 17 May 2010 14:53:10 +0200 +Subject: [PATCH 08/10] Remove ant-contrib from dependencies + +--- + pom.xml | 5 ----- + 1 files changed, 0 insertions(+), 5 deletions(-) + +diff --git a/pom.xml b/pom.xml +index cb76444..6d00cf6 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -285,11 +285,6 @@ target platform and specify -Dntdll_target=msbuild on the mvn command line. + 1.6.5 + + +- ant-contrib +- ant-contrib +- 1.0b2 +- +- + ant + ant-junit + 1.6.5 +-- +1.6.6.1 + diff --git a/0009-Remove-ant-run-of-tests.patch b/0009-Remove-ant-run-of-tests.patch new file mode 100644 index 0000000..5c6fa35 --- /dev/null +++ b/0009-Remove-ant-run-of-tests.patch @@ -0,0 +1,39 @@ +From 31d2056b3f625115ad0f26c7e11ab6273cd4c285 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Mon, 17 May 2010 15:34:19 +0200 +Subject: [PATCH 09/10] Remove ant run of tests + +--- + pom.xml | 16 ---------------- + 1 files changed, 0 insertions(+), 16 deletions(-) + +diff --git a/pom.xml b/pom.xml +index 6d00cf6..406fa43 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -220,22 +220,6 @@ target platform and specify -Dntdll_target=msbuild on the mvn command line. + run + + +- +- test +- runAll +- +- +- +- +- +- +- +- +- +- +- run +- +- + + + site +-- +1.6.6.1 + diff --git a/0010-Fix-javadoc-link.patch b/0010-Fix-javadoc-link.patch new file mode 100644 index 0000000..44a7cc2 --- /dev/null +++ b/0010-Fix-javadoc-link.patch @@ -0,0 +1,26 @@ +From 4753784d3e8ed5ec9973f67e9017bcb7ef41b4b1 Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Tue, 18 May 2010 15:07:00 +0200 +Subject: [PATCH 10/10] Fix javadoc link + +--- + build.xml | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/build.xml b/build.xml +index 54bad8f..c775a68 100644 +--- a/build.xml ++++ b/build.xml +@@ -517,8 +517,7 @@ + -->' + bottom="Copyright 2000-2007 Apache Software Foundation."> + +- +- ++ + + + +-- +1.6.6.1 + diff --git a/log4j-chainsaw.desktop b/log4j-chainsaw.desktop index 3376a81..6b7042d 100644 --- a/log4j-chainsaw.desktop +++ b/log4j-chainsaw.desktop @@ -2,8 +2,7 @@ Name=Chainsaw Comment=Log4j log viewer Exec=chainsaw -Icon=chainsaw.png +Icon=chainsaw Terminal=false Type=Application -Encoding=UTF-8 -Categories=GNOME;Application;Development;X-JPackage; +Categories=GNOME;Application;Development;X-JPackage;GTK; diff --git a/log4j-javadoc-xlink.patch b/log4j-javadoc-xlink.patch deleted file mode 100644 index 6c73564..0000000 --- a/log4j-javadoc-xlink.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- build.xml.sav 2006-04-03 19:34:39.000000000 +0200 -+++ build.xml 2006-04-03 19:35:22.000000000 +0200 -@@ -434,8 +434,7 @@ - header="<b>Log4j ${version}</b>" - bottom="Copyright 2000-2005 Apache Software Foundation."> - -- -- -+ - - - diff --git a/log4j-jmx-Agent.patch b/log4j-jmx-Agent.patch deleted file mode 100644 index 4bf2356..0000000 --- a/log4j-jmx-Agent.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- src/java/org/apache/log4j/jmx/Agent.java.sav 2006-09-14 09:04:18.000000000 +0200 -+++ src/java/org/apache/log4j/jmx/Agent.java 2007-04-18 15:40:59.000000000 +0200 -@@ -19,7 +19,7 @@ - import javax.management.ObjectName; - import javax.management.MBeanServer; - import javax.management.MBeanServerFactory; --import com.sun.jdmk.comm.HtmlAdaptorServer; -+import mx4j.tools.adaptor.http.HttpAdaptor; - - import org.apache.log4j.Logger; - -@@ -36,7 +36,7 @@ - void start() { - - MBeanServer server = MBeanServerFactory.createMBeanServer(); -- HtmlAdaptorServer html = new HtmlAdaptorServer(); -+ HttpAdaptor html = new HttpAdaptor(8082); - - try { - log.info("Registering HtmlAdaptorServer instance."); -@@ -46,9 +46,14 @@ - server.registerMBean(hdm, new ObjectName("log4j:hiearchy=default")); - - } catch(Exception e) { -- log.error("Problem while regitering MBeans instances.", e); -+ log.error("Problem while registering MBeans instances.", e); -+ return; -+ } -+ try { -+ html.start(); -+ } catch(java.io.IOException ioe) { -+ log.error("Problem while starting HtmlAdaptorServer (HttpAdaptor).", ioe); - return; - } -- html.start(); - } - } diff --git a/log4j-logfactor5-userdir.patch b/log4j-logfactor5-userdir.patch deleted file mode 100644 index c095e51..0000000 --- a/log4j-logfactor5-userdir.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- src/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java.sav 2006-04-03 19:30:42.000000000 +0200 -+++ src/java/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java 2006-04-03 19:31:35.000000000 +0200 -@@ -340,7 +340,7 @@ - String home = System.getProperty("user.home"); - String sep = System.getProperty("file.separator"); - -- return home + sep + "lf5" + sep + CONFIG_FILE_NAME; -+ return home + sep + ".logfactor5" + sep + CONFIG_FILE_NAME; - } - - //-------------------------------------------------------------------------- ---- src/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java.sav 2006-04-03 19:32:18.000000000 +0200 -+++ src/java/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java 2006-04-03 19:32:40.000000000 +0200 -@@ -166,14 +166,14 @@ - - /** - * Creates the directory where the MRU file list will be written. -- * The "lf5" directory is created in the Documents and Settings -+ * The ".logfactor5" directory is created in the Documents and Settings - * directory on Windows 2000 machines and where ever the user.home - * variable points on all other platforms. - */ - public static void createConfigurationDirectory() { - String home = System.getProperty("user.home"); - String sep = System.getProperty("file.separator"); -- File f = new File(home + sep + "lf5"); -+ File f = new File(home + sep + ".logfactor5"); - if (!f.exists()) { - try { - f.mkdir(); -@@ -259,7 +259,7 @@ - String home = System.getProperty("user.home"); - String sep = System.getProperty("file.separator"); - -- return home + sep + "lf5" + sep + CONFIG_FILE_NAME; -+ return home + sep + ".logfactor5" + sep + CONFIG_FILE_NAME; - } - - /** -@@ -281,4 +281,4 @@ - //-------------------------------------------------------------------------- - // Nested Top-Level Classes or Interfaces - //-------------------------------------------------------------------------- --} -\ No newline at end of file -+} diff --git a/log4j-logfactor5.desktop b/log4j-logfactor5.desktop index df6bad9..9671520 100644 --- a/log4j-logfactor5.desktop +++ b/log4j-logfactor5.desktop @@ -2,8 +2,7 @@ Name=LogFactor5 Comment=Graphical user interface for managing log4j log messages Exec=logfactor5 -Icon=logfactor5.png +Icon=logfactor5 Terminal=false Type=Application -Encoding=UTF-8 -Categories=GNOME;Application;Development;X-JPackage; +Categories=GNOME;Application;Development;X-JPackage;GTK; diff --git a/log4j-mx4j-tools.patch b/log4j-mx4j-tools.patch deleted file mode 100644 index 3e9795b..0000000 --- a/log4j-mx4j-tools.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- build.xml.sav2 2007-04-18 15:15:09.000000000 +0200 -+++ build.xml 2007-04-18 15:15:38.000000000 +0200 -@@ -139,7 +139,7 @@ - - -- -+ - - - diff --git a/log4j.spec b/log4j.spec index 57d29fb..b332445 100644 --- a/log4j.spec +++ b/log4j.spec @@ -1,48 +1,16 @@ -# Copyright (c) 2000-2007, JPackage Project -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the -# distribution. -# 3. Neither the name of the JPackage Project nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -%define _with_gcj_support 1 - -%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}} -%define bootstrap %{?_with_bootstrap:1}%{!?_with_bootstrap:%{?_without_bootstrap:0}%{!?_without_bootstrap:%{?_bootstrap:%{_bootstrap}}%{!?_bootstrap:0}}} - -%define section free +%global bootstrap %{?_with_bootstrap:1}%{!?_with_bootstrap:%{?_without_bootstrap:0}%{!?_without_bootstrap:%{?_bootstrap:%{_bootstrap}}%{!?_bootstrap:0}}} Name: log4j -Version: 1.2.14 -Release: 6.3%{?dist} +Version: 1.2.16 +Release: 1%{?dist} Epoch: 0 Summary: Java logging package +BuildArch: noarch License: ASL 2.0 -URL: http://logging.apache.org/log4j -Source0: http://www.apache.org/dist/logging/log4j/1.2.14/logging-log4j-1.2.14.tar.gz +Group: Development/Libraries +URL: http://logging.apache.org/%{name} +Source0: http://www.apache.org/dist/logging/%{name}/%{version}/apache-%{name}-%{version}.tar.gz # Converted from src/java/org/apache/log4j/lf5/viewer/images/lf5_small_icon.gif Source1: %{name}-logfactor5.png Source2: %{name}-logfactor5.sh @@ -52,126 +20,143 @@ Source4: %{name}-chainsaw.png Source5: %{name}-chainsaw.sh Source6: %{name}-chainsaw.desktop Source7: %{name}.catalog -Patch0: %{name}-logfactor5-userdir.patch -Patch1: %{name}-javadoc-xlink.patch -Patch2: %{name}-mx4j-tools.patch -Patch3: %{name}-jmx-Agent.patch -BuildRequires: jpackage-utils >= 0:1.6 -BuildRequires: ant -%if ! %{bootstrap} -#Use classpathx-jaf for now -#BuildRequires: geronimo-jaf-1.0.2-api -BuildRequires: classpathx-jaf -BuildRequires: classpathx-mail -# Use JMS for now -#BuildRequires: geronimo-jms-1.1-api -BuildRequires: jms -BuildRequires: mx4j -%endif -BuildRequires: jndi -BuildRequires: java-javadoc +Patch0: 0001-logfactor5-changed-userdir.patch +Patch1: 0002-Remove-version-dependencies.patch +Patch2: 0003-Removed-example-in-wrong-place.patch +Patch3: 0004-Remove-mvn-release-plugin.patch +Patch4: 0005-Remove-mvn-source-plugin.patch +Patch5: 0006-Remove-mvn-clirr-plugin.patch +Patch6: 0007-Remove-mvn-rat-plugin.patch +Patch7: 0008-Remove-ant-contrib-from-dependencies.patch +Patch8: 0009-Remove-ant-run-of-tests.patch +Patch9: 0010-Fix-javadoc-link.patch + BuildRequires: %{__perl} +BuildRequires: java >= 1:1.6.0 +BuildRequires: jpackage-utils >= 0:1.6 +BuildRequires: javamail +BuildRequires: geronimo-jms +BuildRequires: geronimo-parent-poms +BuildRequires: desktop-file-utils +BuildRequires: jpackage-utils >= 0:1.7.2 +BuildRequires: maven-plugin-bundle +BuildRequires: maven-surefire-maven-plugin +BuildRequires: maven-surefire-provider-junit +BuildRequires: maven2-plugin-ant +BuildRequires: maven2-plugin-antrun +BuildRequires: maven2-plugin-assembly +BuildRequires: maven2-plugin-compiler +BuildRequires: maven2-plugin-idea +BuildRequires: maven2-plugin-install +BuildRequires: maven2-plugin-jar +BuildRequires: maven2-plugin-javadoc +BuildRequires: maven2-plugin-resources +BuildRequires: maven2-plugin-site + + +Requires: java >= 1:1.6.0 Requires: jpackage-utils >= 0:1.6 +Requires(post): jpackage-utils +Requires(postun): jpackage-utils Requires: xml-commons-apis Requires: jaxp_parser_impl -Group: System/Logging -%if ! %{gcj_support} -BuildArch: noarch -%endif -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot - -%if %{gcj_support} -BuildRequires: java-gcj-compat-devel -Requires(post): java-gcj-compat -Requires(postun): java-gcj-compat -%endif +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description Log4j is a tool to help the programmer output log statements to a variety of output targets. %package manual -Summary: Manual for %{name} -Group: System/Logging +Summary: Developer manual for %{name} +Group: Documentation +Requires: %{name}-javadoc = %{version}-%{release} %description manual -Documentation for %{name}. +%{summary}. %package javadoc -Summary: Javadoc for %{name} -Group: System/Logging -# for /bin/rm and /bin/ln -Requires(post): coreutils -Requires(postun): coreutils +Summary: API documentation for %{name} +Group: Documentation %description javadoc -Javadoc for %{name}. +%{summary}. %prep -%setup -q -n logging-%{name}-%{version} -%patch0 -b .sav -%patch1 -b .sav -%patch2 -b .sav2 -%patch3 -b .sav -%{__perl} -pi -e 's/\r//g' LICENSE -%{__perl} -pi -e 's/\r//g' NOTICE +%setup -q -n apache-%{name}-%{version} +# see patch files themselves for reasons for applying +%patch0 -p1 -b .logfactor-home +%patch1 -p1 -b .remove-dep-version +%patch2 -p1 -b .remove-example +%patch3 -p1 -b .remove-mvn-release +%patch4 -p1 -b .remove-mvn-source +%patch5 -p1 -b .remove-mvn-clirr +%patch6 -p1 -b .remove-mvn-rat +%patch7 -p1 -b .remove-and-contrib +%patch8 -p1 -b .remove-tests +%patch9 -p1 -b .xlink-javadoc + +sed -i 's/\r//g' LICENSE NOTICE site/css/*.css site/xref/*.css \ + site/xref-test/*.css + +# fix encoding of mailbox files +for i in contribs/JimMoore/mail*;do + iconv --from=ISO-8859-1 --to=UTF-8 "$i" > new + mv new "$i" +done # remove all the stuff we'll build ourselves find . \( -name "*.jar" -o -name "*.class" \) -exec %__rm -f {} \; %__rm -rf docs/api -%build -# javac.source=1.1 doesn't work with Sun's 1.4.2_09/1.5.0_05 -%ant \ - -Djavamail.jar=$(build-classpath javamail/mailapi) \ - -Dactivation.jar=$(build-classpath jaf) \ - -Djaxp.jaxp.jar.jar=$(build-classpath jaxp_parser_impl) \ - -Djms.jar=$(build-classpath jms) \ - -Djmx.jar=$(build-classpath mx4j/mx4j) \ - -Djmx-extra.jar=$(build-classpath mx4j/mx4j-tools) \ - -Djndi.jar=$(build-classpath jndi) \ - -Djavac.source=1.2 \ - -Djdk.javadoc=%{_javadocdir}/java \ - jar javadoc +%build +export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository +mkdir -p $MAVEN_REPO_LOCAL + +# we don't need javadoc:javadoc because build system is broken and +# builds javadoc when install-ing +# also note that maven.test.skip doesn't really work and we had to +# patch ant run of tests out of pom +mvn-jpp -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ + -Dmaven.test.skip=true \ + install %install -%__rm -rf %{buildroot} +rm -rf %{buildroot} # jars -%__mkdir_p %{buildroot}%{_javadir} -%__cp -a dist/lib/%{name}-%{version}.jar %{buildroot}%{_javadir} +#install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} +install -pD -T -m 644 target/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar (cd %{buildroot}%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) # javadoc -%__mkdir_p %{buildroot}%{_javadocdir}/%{name}-%{version} -%__cp -a docs/api/* %{buildroot}%{_javadocdir}/%{name}-%{version} -(cd %{buildroot}%{_javadocdir} && %__ln_s %{name}-%{version} %{name}) -%__rm -rf docs/api -ln -s %{_javadocdir}/log4j docs/api +install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} +ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # scripts -%__mkdir_p %{buildroot}%{_bindir} -%__install -p -m 755 %{SOURCE2} %{buildroot}%{_bindir}/logfactor5 -%__install -p -m 755 %{SOURCE5} %{buildroot}%{_bindir}/chainsaw +install -pD -T -m 755 %{SOURCE2} %{buildroot}%{_bindir}/logfactor5 +install -pD -T -m 755 %{SOURCE5} %{buildroot}%{_bindir}/chainsaw # freedesktop.org menu entries and icons -%__mkdir_p %{buildroot}%{_datadir}/{applications,pixmaps} -%__cp -a %{SOURCE1} \ - %{buildroot}%{_datadir}/pixmaps/logfactor5.png -%__cp -a %{SOURCE3} \ - %{buildroot}%{_datadir}/applications/jpackage-logfactor5.desktop -%__cp -a %{SOURCE4} \ - %{buildroot}%{_datadir}/pixmaps/chainsaw.png -%__cp -a %{SOURCE6} \ - %{buildroot}%{_datadir}/applications/jpackage-chainsaw.desktop +install -pD -T -m 755 %{SOURCE1} \ + %{buildroot}%{_datadir}/pixmaps/logfactor5.png +desktop-file-install \ + --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ + %{SOURCE3} + +install -pD -T -m 755 %{SOURCE4} \ + %{buildroot}%{_datadir}/pixmaps/chainsaw.png +desktop-file-install \ + --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ + %{SOURCE6} + # DTD and the SGML catalog (XML catalog handled in scriptlets) -%__mkdir_p %{buildroot}%{_datadir}/sgml/%{name} -%__cp -a src/java/org/apache/log4j/xml/log4j.dtd \ - %{buildroot}%{_datadir}/sgml/%{name} -%__cp -a %{SOURCE7} \ +install -pD -T -m 644 src/main/javadoc/org/apache/log4j/xml/doc-files/log4j.dtd \ + %{buildroot}%{_datadir}/sgml/%{name}/log4j.dtd +install -pD -T -m 644 %{SOURCE7} \ %{buildroot}%{_datadir}/sgml/%{name}/catalog # fix perl location @@ -179,9 +164,6 @@ ln -s %{_javadocdir}/log4j docs/api contribs/KitchingSimon/udpserver.pl -%if %{gcj_support} -%{_bindir}/aot-compile-rpm -%endif %clean %__rm -rf %{buildroot} @@ -200,12 +182,6 @@ if [ -x %{_bindir}/xmlcatalog -a -w %{_sysconfdir}/xml/catalog ]; then > /dev/null || : fi -%if %{gcj_support} -if [ -x %{_bindir}/rebuild-gcj-db ] -then - %{_bindir}/rebuild-gcj-db -fi -%endif %preun if [ $1 -eq 0 ]; then @@ -215,12 +191,6 @@ if [ $1 -eq 0 ]; then fi fi -%if %{gcj_support} -if [ -x %{_bindir}/rebuild-gcj-db ] -then - %{_bindir}/rebuild-gcj-db -fi -%endif %postun # Note that we're using versioned catalog, so this is always ok. @@ -230,49 +200,31 @@ if [ -x %{_bindir}/install-catalog -a -d %{_sysconfdir}/sgml ]; then %{_datadir}/sgml/%{name}/catalog > /dev/null || : fi -%if %{gcj_support} -if [ -x %{_bindir}/rebuild-gcj-db ] -then - %{_bindir}/rebuild-gcj-db -fi -%endif - -%post javadoc -%__rm -f %{_javadocdir}/%{name} -%__ln_s %{name}-%{version} %{_javadocdir}/%{name} - -%postun javadoc -if [ $1 -eq 0 ]; then - %__rm -f %{_javadocdir}/%{name} -fi - - %files %defattr(-,root,root,-) -%doc LICENSE -%doc NOTICE +%doc LICENSE NOTICE %{_bindir}/* %{_javadir}/* %{_datadir}/applications/* %{_datadir}/pixmaps/* %{_datadir}/sgml/%{name} -%if %{gcj_support} -%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}-%{version}.jar.* -%endif - %files manual -%defattr(0644,root,root,0755) -%doc docs/* contribs +%defattr(-,root,root,-) +%doc site/*.html site/css site/images/ site/xref site/xref-test contribs %files javadoc -%defattr(0644,root,root,0755) -%dir %{_javadocdir}/%{name}-%{version} -%{_javadocdir}/%{name}-%{version}/* -%ghost %dir %{_javadocdir}/%{name} +%defattr(-,root,root,-) +%doc %{_javadocdir}/%{name}-%{version} +%doc %{_javadocdir}/%{name} %changelog +* Mon May 17 2010 Stanislav Ochotnicky - 0:1.2.16-1 +- Complete re-working of whole ebuild to work with maven +- Rebase to new version +- Drop gcj support + * Sat Jul 25 2009 Fedora Release Engineering - 0:1.2.14-6.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index 1fc05cc..09881bd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -7d8d02888b93e6f8d67b8e5f746196ae logging-log4j-1.2.14.tar.gz +8e331a930d0b56280a1c66a00621b3a3 apache-log4j-1.2.16.tar.gz