[excalibur-logkit] 01/32: Merge excalibur-logkit from Ubuntu
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Thu Mar 29 00:30:43 BST 2018
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository excalibur-logkit.
commit 7bf94cd4f5dce286340e92c1a248d65d30e9d8e3
Author: Onkar Shinde <onkarshinde at ubuntu.com>
Date: Tue Aug 11 20:13:36 2009 +0000
Merge excalibur-logkit from Ubuntu
---
debian/README.source | 35 +++++
debian/changelog | 41 ++++++
debian/compat | 1 +
debian/control | 17 +++
debian/copyright | 16 +++
debian/patches/01_implement_abstract_methods.patch | 18 +++
debian/patches/02_fix_build_xml.patch | 34 +++++
debian/patches/03_add_constructor.patch | 158 +++++++++++++++++++++
debian/patches/04_disable_unit_test.patch | 19 +++
debian/rules | 13 ++
debian/watch | 2 +
11 files changed, 354 insertions(+)
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..85880c2
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,35 @@
+This package uses CDBS (and therefore simple-patchsys.mk) in order to
+apply patches to the upstream source. Patches are stored in
+debian/patches and their filenames usually end in .patch or .diff .
+For further details, see the man page for cdbs-edit-patch.
+
+All commands described below should be run from the top directory of the
+package source tree, unless otherwise stated.
+
+ * To generate the fully patched source, in a form ready for
+ editing, that would be built to create Debian packages, run:
+
+ make -f debian/rules apply-patches
+
+ Note: It has been proposed that, in future, this should happen
+ automatically when you run dpkg-source -x on a CDBS
+ simple-patchsys.mk source package. However, this proposal has
+ apparently not yet been implemented, so for now you have to do
+ it yourself like this.
+
+ * To modify the source and save those modifications so that
+ they will be applied when building the package, pick a
+ suitably informative patch file name, for example
+ 01_add_README.source_file.patch, and then run:
+
+ cdbs-edit-patch 01_add_README.source_file.patch
+
+ This will place you in a new shell in a temporary copy of the
+ source tree. Make your desired modifications to it, and then
+ exit the shell to create the patch file containing them (this
+ file will appear in debian/patches).
+
+ * To remove source modifications that are currently being
+ applied when building the package, run:
+
+ make -f debian/rules reverse-patches
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..eee7406
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,41 @@
+excalibur-logkit (2.0-1) unstable; urgency=low
+
+ * Merge from Ubuntu. (Closes: #541111)
+ * debian/control
+ - Set maintainer to Debian Java Maintainers. Add myself as uploader.
+ - Add alternate build and runtime dependency on libjboss-j2ee-java as the
+ geronimo package is not present in Debian yet.
+ * debian/rules
+ - Add jboss-j2ee to DEB_JARS.
+ * debian/patches/04_disable_unit_test.patch
+ - Disable a unit test that fails randomly.
+
+ -- Onkar Shinde <onkarshinde at ubuntu.com> Wed, 12 Aug 2009 00:34:29 +0530
+
+excalibur-logkit (2.0-0ubuntu3) karmic; urgency=low
+
+ * debian/copyright
+ - Add separate 'License' section as same license applies to all the files.
+
+ -- Onkar Shinde <onkarshinde at ubuntu.com> Tue, 21 Jul 2009 14:45:25 +0530
+
+excalibur-logkit (2.0-0ubuntu2) karmic; urgency=low
+
+ * debian/patches
+ - 03_add_constructor.patch
+ * Add construtor, taken from upstream svn, to SMTPOutputLogTarget.java.
+ Needed by excalibur-logger.
+
+ -- Onkar Shinde <onkarshinde at ubuntu.com> Thu, 16 Jul 2009 01:23:53 +0530
+
+excalibur-logkit (2.0-0ubuntu1) karmic; urgency=low
+
+ * Initial release.
+ * debian/patches
+ - 01_implement_abstract_methods.patch
+ * Implement methods 'unwrap', 'isWrapperFor', throw
+ UnsupportedOperationException.
+ - 02_fix_build_xml.patch
+ * Fix two problems in build.xml.
+
+ -- Onkar Shinde <onkarshinde at ubuntu.com> Fri, 10 Jul 2009 02:31:21 +0530
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7ed6ff8
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..3f9c3a9
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,17 @@
+Source: excalibur-logkit
+Section: java
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Uploaders: Onkar Shinde <onkarshinde at ubuntu.com>
+Build-Depends: debhelper (>=5), cdbs, ant
+Build-Depends-Indep: default-jdk, ant-optional, junit, libgeronimo-jms-1.1-spec-java | libjboss-j2ee-java, libgnumail-java, liblog4j1.2-java, libservlet2.4-java
+Standards-Version: 3.8.2
+Homepage: http://excalibur.apache.org/
+
+Package: libexcalibur-logkit-java
+Architecture: all
+Depends: ${misc:Depends}, default-jre-headless | java2-runtime-headless, libgeronimo-jms-1.1-spec-java | libjboss-j2ee-java, libgnumail-java, liblog4j1.2-java, libservlet2.4-java
+Description: Lightweight and fast designed logging toolkit for Java
+ Excalibur Logkit (previously avalon logkit) is a lightweight, fast, securely
+ designed logging toolkit. It is designed to integrate into existing
+ applications. Logkit is more lightweight than Log4j.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..77eccfe
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,16 @@
+Format-Specification: http://dep.debian.net/deps/dep5/
+Name: excalibur-logkit
+Maintainer: The Apache Software Foundation
+Source: http://excalibur.apache.org/
+
+Files: *
+Copyright: 2004, The Apache Software Foundation
+License: Apache-2.0
+
+Files: debian/*
+Copyright: 2009, Onkar Shinde <onkarshinde at ubuntu.com>
+License: Apache-2.0
+
+License: Apache-2.0
+ On Debian systems the full text of the Apache-2.0 license can be found in the
+ `/usr/share/common-licenses/Apache-2.0' file.
diff --git a/debian/patches/01_implement_abstract_methods.patch b/debian/patches/01_implement_abstract_methods.patch
new file mode 100644
index 0000000..87cc383
--- /dev/null
+++ b/debian/patches/01_implement_abstract_methods.patch
@@ -0,0 +1,18 @@
+diff -Nur -x '*.orig' -x '*~' excalibur-logkit-2.0/src/java/org/apache/log/output/db/DefaultDataSource.java excalibur-logkit-2.0.new/src/java/org/apache/log/output/db/DefaultDataSource.java
+--- excalibur-logkit-2.0/src/java/org/apache/log/output/db/DefaultDataSource.java 2004-04-11 21:44:07.000000000 +0530
++++ excalibur-logkit-2.0.new/src/java/org/apache/log/output/db/DefaultDataSource.java 2009-07-10 00:37:07.000000000 +0530
+@@ -111,4 +111,14 @@
+ {
+ m_logWriter = logWriter;
+ }
++
++ public Object unwrap(Class iface) throws java.sql.SQLException
++ {
++ throw new UnsupportedOperationException();
++ }
++
++ public boolean isWrapperFor(Class iface) throws java.sql.SQLException
++ {
++ throw new UnsupportedOperationException();
++ }
+ }
diff --git a/debian/patches/02_fix_build_xml.patch b/debian/patches/02_fix_build_xml.patch
new file mode 100644
index 0000000..7c55057
--- /dev/null
+++ b/debian/patches/02_fix_build_xml.patch
@@ -0,0 +1,34 @@
+diff -Nur -x '*.orig' -x '*~' excalibur-logkit-2.0/build.xml excalibur-logkit-2.0.new/build.xml
+--- excalibur-logkit-2.0/build.xml 2004-04-11 21:44:07.000000000 +0530
++++ excalibur-logkit-2.0.new/build.xml 2009-07-10 01:06:21.000000000 +0530
+@@ -64,7 +64,7 @@
+ </fileset>
+ </copy>
+ <copy todir="${classesdir}">
+- <fileset dir="home/niclas/dev/opensource">
++ <fileset dir=".">
+ <include name="LICENSE.txt">
+ </include>
+ </fileset>
+@@ -105,12 +105,12 @@
+ </include>
+ </fileset>
+ </copy>
+- <copy todir="${testclassesdir}">
++ <!--copy todir="${testclassesdir}">
+ <fileset dir="src/test/conf">
+ <include name="**/*">
+ </include>
+ </fileset>
+- </copy>
++ </copy-->
+ </target>
+ <target name="jar" description="o Create the jar" depends="compile,test">
+ <jar jarfile="target/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
+@@ -228,4 +228,4 @@
+ <unjar dest="${maven.home}" src="${user.home}/maven-install-latest.jar">
+ </unjar>
+ </target>
+-</project>
+\ No newline at end of file
++</project>
diff --git a/debian/patches/03_add_constructor.patch b/debian/patches/03_add_constructor.patch
new file mode 100644
index 0000000..63e4cdf
--- /dev/null
+++ b/debian/patches/03_add_constructor.patch
@@ -0,0 +1,158 @@
+diff -Nur -x '*.orig' -x '*~' excalibur-logkit-2.0/src/java/org/apache/log/output/net/SMTPOutputLogTarget.java excalibur-logkit-2.0.new/src/java/org/apache/log/output/net/SMTPOutputLogTarget.java
+--- excalibur-logkit-2.0/src/java/org/apache/log/output/net/SMTPOutputLogTarget.java 2004-04-11 21:44:07.000000000 +0530
++++ excalibur-logkit-2.0.new/src/java/org/apache/log/output/net/SMTPOutputLogTarget.java 2009-07-16 01:28:11.000000000 +0530
+@@ -58,6 +58,23 @@
+
+ // Buffer containing current mail
+ private StringBuffer m_buffer;
++
++ /** The time that the first log entry in the current buffer arrived. */
++ private long m_bufferTime;
++
++ /** The maximun delay that a message will be allowed to wait in the queue
++ * before being sent. */
++ private long m_maxDelayTime;
++
++ /** Runner thread which is responsible for sending batched log entries in
++ * the background. */
++ private Thread m_runner;
++
++ /** Flag which will be set in the close method when it is time to shutdown. */
++ private boolean m_shutdown;
++
++ /** Flag which controls whether debug is enabled for each message. */
++ private boolean m_debug;
+
+ /** SMTPOutputLogTarget constructor.
+ *
+@@ -68,7 +85,17 @@
+ * @param toAddresses addresses logs should be sent to
+ * @param fromAddress address logs say they come from
+ * @param subject subject line logs should use
+- * @param maxMsgSize maximum size of any log mail, in units of log events
++ * @param maxMsgSize maximum size of any log mail, in units of log events.
++ * If this is greater than one but maxDelayTime is 0 then
++ * log events may stay queued for a long period of time
++ * if less than the specified number of messages are
++ * logged. Any unset messages will be sent when the
++ * target is closed.
++ * @param maxDelayTime specifies the longest delay in seconds that a log
++ * entry will be queued before being sent. Setting
++ * this to a value larger than 0 will cause a
++ * background thread to be used to queue up and send
++ * messages. Ignored if maxMsgSize is 1 or less.
+ * @param formatter log formatter to use
+ */
+ public SMTPOutputLogTarget(
+@@ -77,6 +104,7 @@
+ final Address fromAddress,
+ final String subject,
+ final int maxMsgSize,
++ final int maxDelayTime,
+ final Formatter formatter )
+ {
+ super( formatter );
+@@ -87,11 +115,103 @@
+ m_fromAddress = fromAddress;
+ m_subject = subject;
+ m_session = session;
++ m_maxDelayTime = maxDelayTime * 1000;
++
++ if ( ( m_maxDelayTime > 0 ) && ( m_maxMsgSize > 1 ) )
++ {
++ // Create a runner thread which will
++ m_runner = new Thread( "SMTPOutputLogTarget_Queue_Daemon" )
++ {
++ public void run()
++ {
++ try
++ {
++ //System.out.println( "SMTPOutputLogTarget runner Started." );
++ synchronized( SMTPOutputLogTarget.this )
++ {
++ try
++ {
++ do
++ {
++ // Wait up to a second for notification that a message is
++ // available.
++ try
++ {
++ SMTPOutputLogTarget.this.wait( 1000 );
++ }
++ catch ( InterruptedException e )
++ {
++ // Ignore.
++ }
++
++ // Is a message waiting?
++ if ( m_message != null )
++ {
++ // Is the message big enough to send or been
++ // waiting long enough?
++ long now = System.currentTimeMillis();
++ if ( m_shutdown || ( m_msgSize >= m_maxMsgSize ) ||
++ ( now - m_bufferTime >= m_maxDelayTime ) )
++ {
++ // Time to send the message.
++ send();
++ }
++ }
++ }
++ while ( !m_shutdown );
++ }
++ finally
++ {
++ //System.out.println( "SMTPOutputLogTarget runner Completed." );
++ m_runner = null;
++
++ // The close method waits for this to complete.
++ SMTPOutputLogTarget.this.notifyAll();
++ }
++ }
++ }
++ catch ( Throwable t )
++ {
++ getErrorHandler().error(
++ "Unexpected error in the SMTPOutputLogTarget queue daemon", t, null );
++ }
++ }
++ };
++ m_runner.setDaemon( true );
++ m_runner.start();
++ }
+
+ // ready for business
+ open();
+ }
+
++ /** SMTPOutputLogTarget constructor.
++ *
++ * It creates a logkit output target capable of logging to SMTP
++ * (ie. email, email gateway) targets.
++ *
++ * @param session mail session to be used
++ * @param toAddresses addresses logs should be sent to
++ * @param fromAddress address logs say they come from
++ * @param subject subject line logs should use
++ * @param maxMsgSize maximum size of any log mail, in units of log events.
++ * Log events may stay queued for a long period of time
++ * if less than the specified number of messages are
++ * logged. Any unset messages will be sent when the
++ * target is closed.
++ * @param formatter log formatter to use
++ */
++ public SMTPOutputLogTarget(
++ final Session session,
++ final Address[] toAddresses,
++ final Address fromAddress,
++ final String subject,
++ final int maxMsgSize,
++ final Formatter formatter )
++ {
++ this( session, toAddresses, fromAddress, subject, maxMsgSize, 0, formatter );
++ }
++
+ /** Method to write data to the log target.
+ *
+ * Logging data is stored in
diff --git a/debian/patches/04_disable_unit_test.patch b/debian/patches/04_disable_unit_test.patch
new file mode 100644
index 0000000..dfdcf18
--- /dev/null
+++ b/debian/patches/04_disable_unit_test.patch
@@ -0,0 +1,19 @@
+diff -Nur -x '*.orig' -x '*~' excalibur-logkit-2.0/src/test/org/apache/log/output/test/RevolvingFileStrategyTestCase.java excalibur-logkit-2.0.new/src/test/org/apache/log/output/test/RevolvingFileStrategyTestCase.java
+--- excalibur-logkit-2.0/src/test/org/apache/log/output/test/RevolvingFileStrategyTestCase.java 2004-04-11 21:44:07.000000000 +0530
++++ excalibur-logkit-2.0.new/src/test/org/apache/log/output/test/RevolvingFileStrategyTestCase.java 2009-08-12 01:32:56.000000000 +0530
+@@ -152,6 +152,7 @@
+ assertEquals( "rotation", 5, strategy.getCurrentRotation() );
+ }
+
++ /*
+ public void testFullRotation()
+ throws Exception
+ {
+@@ -172,6 +173,7 @@
+
+ assertEquals( "rotation", 0, strategy.getCurrentRotation() );
+ }
++ */
+
+ public void testFullRotationWithOlder()
+ throws Exception
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..3c844fd
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+include /usr/share/cdbs/1/class/ant.mk
+
+JAVA_HOME_DIRS := /usr/lib/jvm/default-java
+DEB_JARS := ant-junit geronimo-jms-1.1-spec gnumail.jar jboss-j2ee junit log4j-1.2 servlet-api-2.4
+DEB_ANT_ARGS := -Dnoget=true -Dfinal.name=excalibur-logkit-${DEB_UPSTREAM_VERSION} -Dant.build.javac.source=1.4 -Dant.build.javac.target=1.4
+
+install/libexcalibur-logkit-java::
+ dh_install target/excalibur-logkit-${DEB_UPSTREAM_VERSION}.jar usr/share/java/
+ dh_link usr/share/java/excalibur-logkit-${DEB_UPSTREAM_VERSION}.jar usr/share/java/excalibur-logkit.jar
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..544410c
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=2
+http://www.apache.org/dist/excalibur/excalibur-logkit/source/excalibur-logkit-([\d\.]+).dev.*-src\.tar\.gz
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/excalibur-logkit.git
More information about the pkg-java-commits
mailing list