commit
0a9f96c329
80
logback-1.1.7-jetty.patch
Normal file
80
logback-1.1.7-jetty.patch
Normal file
@ -0,0 +1,80 @@
|
||||
diff -Nru logback-1.1.7/logback-access/pom.xml logback-1.1.7.jetty/logback-access/pom.xml
|
||||
--- logback-1.1.7/logback-access/pom.xml 2016-03-29 22:09:38.000000000 +0200
|
||||
+++ logback-1.1.7.jetty/logback-access/pom.xml 2016-06-23 17:18:59.640249538 +0200
|
||||
@@ -46,6 +46,12 @@
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
+ <groupId>org.eclipse.jetty</groupId>
|
||||
+ <artifactId>jetty-util</artifactId>
|
||||
+ <scope>compile</scope>
|
||||
+ <optional>true</optional>
|
||||
+ </dependency>
|
||||
+ <dependency>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>janino</artifactId>
|
||||
<scope>compile</scope>
|
||||
@@ -173,4 +179,4 @@
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
-</project>
|
||||
\ Manca newline alla fine del file
|
||||
+</project>
|
||||
diff -Nru logback-1.1.7/logback-access/src/main/java/ch/qos/logback/access/jetty/RequestLogImpl.java logback-1.1.7.jetty/logback-access/src/main/java/ch/qos/logback/access/jetty/RequestLogImpl.java
|
||||
--- logback-1.1.7/logback-access/src/main/java/ch/qos/logback/access/jetty/RequestLogImpl.java 2016-02-25 22:15:50.000000000 +0100
|
||||
+++ logback-1.1.7.jetty/logback-access/src/main/java/ch/qos/logback/access/jetty/RequestLogImpl.java 2016-06-23 17:04:46.410310065 +0200
|
||||
@@ -210,11 +210,6 @@
|
||||
started = false;
|
||||
}
|
||||
|
||||
- @Override
|
||||
- public boolean isRunning() {
|
||||
- return started;
|
||||
- }
|
||||
-
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
@@ -228,26 +223,6 @@
|
||||
return started;
|
||||
}
|
||||
|
||||
- @Override
|
||||
- public boolean isStarting() {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean isStopping() {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean isStopped() {
|
||||
- return !started;
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public boolean isFailed() {
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
public boolean isQuiet() {
|
||||
return quiet;
|
||||
}
|
||||
@@ -311,13 +286,7 @@
|
||||
return fai.getFilterChainDecision(event);
|
||||
}
|
||||
|
||||
- @Override
|
||||
- public void addLifeCycleListener(Listener listener) {
|
||||
- // we'll implement this when asked
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public void removeLifeCycleListener(Listener listener) {
|
||||
+ public void log(Request request, int status, long written) {
|
||||
// we'll implement this when asked
|
||||
}
|
||||
|
||||
57
logback-1.1.7-servlet.patch
Normal file
57
logback-1.1.7-servlet.patch
Normal file
@ -0,0 +1,57 @@
|
||||
diff -Nru logback-1.1.7/logback-access/src/main/java/ch/qos/logback/access/servlet/TeeServletInputStream.java logback-1.1.7.servlet/logback-access/src/main/java/ch/qos/logback/access/servlet/TeeServletInputStream.java
|
||||
--- logback-1.1.7/logback-access/src/main/java/ch/qos/logback/access/servlet/TeeServletInputStream.java 2016-02-25 22:15:50.000000000 +0100
|
||||
+++ logback-1.1.7.servlet/logback-access/src/main/java/ch/qos/logback/access/servlet/TeeServletInputStream.java 2016-06-23 17:00:02.886622532 +0200
|
||||
@@ -18,6 +18,7 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
+import javax.servlet.ReadListener;
|
||||
import javax.servlet.ServletInputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@@ -71,4 +71,19 @@
|
||||
byte[] getInputBuffer() {
|
||||
return inputBuffer;
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isReady() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isFinished() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setReadListener(ReadListener listener) {
|
||||
+ throw new UnsupportedOperationException("Not implemented yet.");
|
||||
+ }
|
||||
}
|
||||
diff -Nru logback-1.1.7/logback-access/src/main/java/ch/qos/logback/access/servlet/TeeServletOutputStream.java logback-1.1.7.servlet/logback-access/src/main/java/ch/qos/logback/access/servlet/TeeServletOutputStream.java
|
||||
--- logback-1.1.7/logback-access/src/main/java/ch/qos/logback/access/servlet/TeeServletOutputStream.java 2016-02-25 22:15:50.000000000 +0100
|
||||
+++ logback-1.1.7.servlet/logback-access/src/main/java/ch/qos/logback/access/servlet/TeeServletOutputStream.java 2016-06-23 16:56:24.056883117 +0200
|
||||
@@ -18,6 +18,7 @@ import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.ServletResponse;
|
||||
+import javax.servlet.WriteListener;
|
||||
|
||||
public class TeeServletOutputStream extends ServletOutputStream {
|
||||
|
||||
@@ -82,4 +82,14 @@
|
||||
underlyingStream.flush();
|
||||
baosCopy.flush();
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isReady() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setWriteListener(WriteListener listener) {
|
||||
+ throw new UnsupportedOperationException("Not implemented yet.");
|
||||
+ }
|
||||
}
|
||||
15
logback-1.1.7-tomcat.patch
Normal file
15
logback-1.1.7-tomcat.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -Nru logback-1.1.7/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java logback-1.1.7.tomcat/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java
|
||||
--- logback-1.1.7/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java 2016-03-11 09:16:10.000000000 +0100
|
||||
+++ logback-1.1.7.tomcat/logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java 2016-06-23 17:21:04.765375897 +0200
|
||||
@@ -328,11 +328,6 @@
|
||||
return aai.detachAppender(name);
|
||||
}
|
||||
|
||||
- @Override
|
||||
- public String getInfo() {
|
||||
- return "Logback's implementation of ValveBase";
|
||||
- }
|
||||
-
|
||||
// Methods from ContextBase:
|
||||
@Override
|
||||
public StatusManager getStatusManager() {
|
||||
143
logback.spec
Normal file
143
logback.spec
Normal file
@ -0,0 +1,143 @@
|
||||
Name: logback
|
||||
Version: 1.1.7
|
||||
Release: 6
|
||||
Summary: A Java logging library
|
||||
License: LGPLv2 or EPL
|
||||
URL: http://logback.qos.ch/
|
||||
Source0: https://github.com/qos-ch/logback/archive/v_%{version}.tar.gz
|
||||
|
||||
# servlet 3.1 support
|
||||
Patch0001: %{name}-1.1.7-servlet.patch
|
||||
# Remove deprecate methods,otherwise it will cause compilation to fail
|
||||
Patch0002: %{name}-1.1.7-jetty.patch
|
||||
Patch0003: %{name}-1.1.7-tomcat.patch
|
||||
|
||||
BuildRequires: java-devel >= 1:1.6.0 maven-local mvn(javax.mail:mail)
|
||||
BuildRequires: mvn(javax.servlet:javax.servlet-api) mvn(junit:junit) mvn(log4j:log4j:1.2.17)
|
||||
BuildRequires: mvn(org.apache.ant:ant-junit) mvn(org.apache.felix:maven-bundle-plugin)
|
||||
BuildRequires: mvn(org.apache.felix:org.apache.felix.main)
|
||||
BuildRequires: mvn(org.apache.geronimo.specs:geronimo-jms_1.1_spec)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
|
||||
BuildRequires: mvn(org.apache.tomcat:tomcat-catalina) mvn(org.apache.tomcat:tomcat-coyote)
|
||||
BuildRequires: mvn(org.codehaus.gmavenplus:gmavenplus-plugin) mvn(org.codehaus.groovy:groovy-all)
|
||||
BuildRequires: mvn(org.codehaus.janino:janino) mvn(org.eclipse.jetty:jetty-server)
|
||||
BuildRequires: mvn(org.eclipse.jetty:jetty-util) mvn(org.fusesource:fusesource-pom:pom:)
|
||||
BuildRequires: mvn(org.fusesource.jansi:jansi) mvn(org.slf4j:slf4j-api) mvn(org.slf4j:slf4j-ext)
|
||||
BuildRequires: mvn(antlr:antlr) mvn(commons-cli:commons-cli) mvn(org.ow2.asm:asm-all)
|
||||
BuildRequires: mvn(org.slf4j:slf4j-nop)
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
Logback is intended as a successor to the popular log4j project.
|
||||
|
||||
Logback's architecture is sufficiently generic so as to apply under
|
||||
different circumstances. At present time, logback is divided into
|
||||
three modules, logback-core, logback-classic and logback-access.
|
||||
|
||||
The logback-core module lays the groundwork for the other two modules. The
|
||||
logback-classic module can be assimilated to a significantly improved
|
||||
version of log4j. Moreover, logback-classic natively implements the SLF4J
|
||||
API so that you can readily switch back and forth between logback and other
|
||||
logging frameworks such as log4j or java.util.logging (JUL).
|
||||
|
||||
The logback-access module integrates with Servlet containers, such as
|
||||
Tomcat and Jetty, to provide HTTP-access log functionality. Note that you
|
||||
could easily build your own module on top of logback-core.
|
||||
|
||||
%package help
|
||||
Summary: Javadoc for %{name}
|
||||
Provides: %{name}-javadoc = %{version}-%{release}
|
||||
Obsoletes: %{name}-javadoc < %{version}-%{release}
|
||||
|
||||
%description help
|
||||
API documentation for the Logback library
|
||||
|
||||
%package access
|
||||
Summary: Logback-access module for Servlet integration
|
||||
|
||||
%description access
|
||||
The logback-access module is integrated with servlet containers
|
||||
(such as Tomcat and Jetty) to provide HTTP-access logging capabilities.
|
||||
Note that you can easily build your own modules on top of logback-core.
|
||||
|
||||
%package examples
|
||||
Summary: Logback Examples Module
|
||||
|
||||
%description examples
|
||||
logback-examples module.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-v_%{version}
|
||||
find . -name "*.class" -delete
|
||||
find . -name "*.cmd" -delete
|
||||
find . -name "*.jar" -delete
|
||||
|
||||
%pom_remove_plugin :maven-source-plugin
|
||||
%pom_remove_plugin :findbugs-maven-plugin
|
||||
%pom_remove_plugin -r :maven-dependency-plugin
|
||||
%pom_remove_plugin -r :cobertura-maven-plugin
|
||||
|
||||
sed -i 's/\r//' LICENSE.txt README.txt
|
||||
|
||||
%pom_change_dep -r :servlet-api javax.servlet:javax.servlet-api:3.1.0
|
||||
sed -i 's#javax.servlet.*;version="2.5"#javax.servlet.*;version="3.1"#' %{name}-access/pom.xml
|
||||
|
||||
rm -r %{name}-*/src/test/java/*
|
||||
%pom_xpath_remove -r "pom:dependency[pom:type = 'test-jar']"
|
||||
%pom_xpath_remove -r "pom:dependency[pom:scope = 'test']"
|
||||
|
||||
%pom_xpath_remove -r "pom:plugin[pom:artifactId = 'maven-jar-plugin']/pom:executions"
|
||||
|
||||
%pom_xpath_remove "pom:project/pom:profiles/pom:profile[pom:id = 'host-orion']" %{name}-access
|
||||
%pom_xpath_remove "pom:project/pom:profiles" %{name}-classic
|
||||
|
||||
%pom_xpath_remove "pom:project/pom:profiles/pom:profile[pom:id = 'javadocjar']"
|
||||
|
||||
%pom_disable_module logback-site
|
||||
|
||||
%pom_xpath_remove "pom:build/pom:extensions"
|
||||
|
||||
%pom_remove_plugin :maven-compiler-plugin logback-classic
|
||||
%pom_add_plugin org.codehaus.gmavenplus:gmavenplus-plugin:1.5 logback-classic "
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>generateStubs</goal>
|
||||
<goal>testGenerateStubs</goal>
|
||||
<!--goal>compile</goal>
|
||||
<goal>testCompile</goal-->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>"
|
||||
|
||||
%mvn_package ":%{name}-access" access
|
||||
%mvn_package ":%{name}-examples" examples
|
||||
|
||||
%build
|
||||
|
||||
%mvn_build -f -- -Dorg.slf4j:slf4j-api:jar=$(build-classpath slf4j/api) \
|
||||
-Dorg.apache.felix:org.apache.felix.main:jar=$(build-classpath felix/org.apache.felix.main)
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}/examples
|
||||
cp -r %{name}-examples/pom.xml %{name}-examples/src %{buildroot}%{_datadir}/%{name}/examples
|
||||
|
||||
%files -f .mfiles
|
||||
%doc README.txt
|
||||
%license LICENSE.txt
|
||||
|
||||
%files access -f .mfiles-access
|
||||
%license LICENSE.txt
|
||||
|
||||
%files examples -f .mfiles-examples
|
||||
%license LICENSE.txt
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%files help -f .mfiles-javadoc
|
||||
|
||||
%changelog
|
||||
* Wed Mar 4 2020 dingyiming <dingyiming3@huawei.com> - 1.1.7-6
|
||||
- Package init
|
||||
BIN
v_1.1.7.tar.gz
Normal file
BIN
v_1.1.7.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user