Update to 1.1.33
This commit is contained in:
parent
176bba57a9
commit
9f3d2ebbd2
@ -1,8 +0,0 @@
|
|||||||
import org.apache.tomcat.jni.Library;
|
|
||||||
|
|
||||||
public class CheckLibrary {
|
|
||||||
|
|
||||||
public static void main(String[] a) throws Exception{
|
|
||||||
Library.initialize(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,16 +1,16 @@
|
|||||||
--- netty-tcnative-netty-tcnative-1.1.30.Fork2/src/main/java/org/apache/tomcat/jni/Library (copy).java
|
--- netty-tcnative-netty-tcnative-parent-1.1.33.Fork26/openssl-dynamic/src/main/java/org/apache/tomcat/jni/Library.java.orig 2020-01-09 11:01:40.309218963 +0100
|
||||||
+++ netty-tcnative-netty-tcnative-1.1.30.Fork2/src/main/java/org/apache/tomcat/jni/Library.java
|
+++ netty-tcnative-netty-tcnative-parent-1.1.33.Fork26/openssl-dynamic/src/main/java/org/apache/tomcat/jni/Library.java 2020-01-09 11:04:45.202196578 +0100
|
||||||
@@ -24,7 +24,7 @@
|
@@ -26,7 +26,7 @@
|
||||||
public final class Library {
|
public final class Library {
|
||||||
|
|
||||||
/* Default library names */
|
/* Default library names */
|
||||||
- private static final String [] NAMES = {"tcnative-1", "libtcnative-1"};
|
- private static final String [] NAMES = {"netty-tcnative", "libnetty-tcnative", "netty-tcnative-1", "libnetty-tcnative-1"};
|
||||||
+ private static final String [] NAMES = {"netty-tcnative", "libnetty-tcnative", "netty-tcnative-1", "libnetty-tcnative-1"};
|
+ private static final String [] NAMES = {"netty-tcnative", "libnetty-tcnative", "netty-tcnative-1", "libnetty-tcnative-1", "tcnative-1", "libtcnative-1"};
|
||||||
/*
|
/*
|
||||||
* A handle to the unique Library singleton instance.
|
* A handle to the unique Library singleton instance.
|
||||||
*/
|
*/
|
||||||
@@ -36,8 +36,9 @@
|
@@ -38,22 +38,20 @@
|
||||||
boolean loaded = false;
|
String [] paths = path.split(File.pathSeparator);
|
||||||
StringBuilder err = new StringBuilder();
|
StringBuilder err = new StringBuilder();
|
||||||
for (int i = 0; i < NAMES.length; i++) {
|
for (int i = 0; i < NAMES.length; i++) {
|
||||||
+ String name = "@PATH@/" + NAMES[i] + ".so";
|
+ String name = "@PATH@/" + NAMES[i] + ".so";
|
||||||
@ -18,23 +18,20 @@
|
|||||||
- System.loadLibrary(NAMES[i]);
|
- System.loadLibrary(NAMES[i]);
|
||||||
+ System.load(name);
|
+ System.load(name);
|
||||||
loaded = true;
|
loaded = true;
|
||||||
}
|
} catch (ThreadDeath t) {
|
||||||
catch (Throwable t) {
|
throw t;
|
||||||
@@ -47,16 +48,10 @@
|
} catch (VirtualMachineError t) {
|
||||||
if (t instanceof VirtualMachineError) {
|
throw t;
|
||||||
throw (VirtualMachineError) t;
|
} catch (Throwable t) {
|
||||||
}
|
|
||||||
- String name = System.mapLibraryName(NAMES[i]);
|
- String name = System.mapLibraryName(NAMES[i]);
|
||||||
- String path = System.getProperty("java.library.path");
|
- for (int j = 0; j < paths.length; j++) {
|
||||||
- String sep = System.getProperty("path.separator");
|
|
||||||
- String [] paths = path.split(sep);
|
|
||||||
- for (int j=0; j<paths.length; j++) {
|
|
||||||
- java.io.File fd = new java.io.File(paths[j] , name);
|
- java.io.File fd = new java.io.File(paths[j] , name);
|
||||||
+ java.io.File fd = new java.io.File(name);
|
+ java.io.File fd = new java.io.File(name);
|
||||||
if (fd.exists()) {
|
if (fd.exists()) {
|
||||||
t.printStackTrace();
|
// File exists but failed to load
|
||||||
|
throw new RuntimeException(t);
|
||||||
}
|
}
|
||||||
- }
|
- }
|
||||||
if ( i > 0)
|
if (i > 0) {
|
||||||
err.append(", ");
|
err.append(", ");
|
||||||
err.append(t.getMessage());
|
}
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
--- netty-tcnative-netty-tcnative-1.1.30.Fork2/src/main/native-package/m4/custom.m4
|
|
||||||
+++ netty-tcnative-netty-tcnative-1.1.30.Fork2/src/main/native-package/m4/custom.m4
|
|
||||||
@@ -47,7 +47,7 @@
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Update the compiler/linker flags to add APR and OpenSSL to the build path.
|
|
||||||
- CFLAGS="$CFLAGS $TCN_OPENSSL_INC $APR_INCLUDES"
|
|
||||||
+ CFLAGS="$CFLAGS $TCN_OPENSSL_INC $APR_INCLUDES -D_LARGEFILE64_SOURCE"
|
|
||||||
CXXFLAGS="$CXXFLAGS $TCN_OPENSSL_INC $APR_INCLUDES"
|
|
||||||
LDFLAGS="$LDFLAGS $TCN_OPENSSL_LIBS $APR_LIBS"
|
|
||||||
AC_SUBST(CFLAGS)
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
netty-tcnative-parent-1.1.33.Fork26.tar.gz
Normal file
BIN
netty-tcnative-parent-1.1.33.Fork26.tar.gz
Normal file
Binary file not shown.
@ -1,26 +1,24 @@
|
|||||||
%global name_reltag .Fork2
|
%global namedreltag .Fork26
|
||||||
%global name_ver %{version}%{name_reltag}
|
%global namedversion %{version}%{?namedreltag}
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: netty-tcnative
|
Name: netty-tcnative
|
||||||
Version: 1.1.30
|
Version: 1.1.33
|
||||||
Release: 13
|
Release: 1
|
||||||
Summary: Fork of Tomcat Native with improved OpenSSL and mavenized build
|
Summary: Fork of Tomcat Native with improved OpenSSL and mavenized build
|
||||||
License: ASL 2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/netty/netty/wiki/Forked-Tomcat-Native
|
URL: https://github.com/netty/netty/wiki/Forked-Tomcat-Native
|
||||||
Source0: https://github.com/netty/netty-tcnative/archive/%{name}-%{name_ver}.tar.gz
|
Source0: https://github.com/netty/netty-tcnative/archive/%{name}-parent-%{namedversion}.tar.gz
|
||||||
Source1: CheckLibrary.java
|
Source1: fixLibNames.patch.in
|
||||||
Patch1: i388aprFix.patch
|
BuildRequires: fdupes
|
||||||
Patch2: fixLibNames.patch.in
|
BuildRequires: libtcnative-1-0
|
||||||
|
BuildRequires: maven-local
|
||||||
BuildRequires: apr-devel autoconf automake compat-openssl10-devel glibc-devel
|
BuildRequires: mvn(io.netty:netty-parent:pom:)
|
||||||
BuildRequires: libtool maven-antrun-plugin maven-hawtjni-plugin maven-local
|
|
||||||
BuildRequires: maven-plugin-build-helper maven-plugin-bundle
|
|
||||||
BuildRequires: maven-remote-resources-plugin maven-source-plugin netty
|
|
||||||
BuildRequires: sonatype-oss-parent
|
|
||||||
BuildRequires: mvn(kr.motd.maven:os-maven-plugin)
|
BuildRequires: mvn(kr.motd.maven:os-maven-plugin)
|
||||||
|
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
|
||||||
Provides: netty-tcnative-javadoc
|
BuildRequires: mvn(org.apache.maven.plugins:maven-remote-resources-plugin)
|
||||||
Obsoletes: netty-tcnative-javadoc
|
BuildRequires: sonatype-oss-parent maven-plugin-build-helper python3-lxml python3 python3-cssselect
|
||||||
|
Requires: libtcnative-1-0
|
||||||
|
|
||||||
%description
|
%description
|
||||||
netty-tcnative is a fork of Tomcat Native. It includes a set of changes
|
netty-tcnative is a fork of Tomcat Native. It includes a set of changes
|
||||||
@ -32,37 +30,42 @@ To minimize the maintenance burden, we create a dedicated branch for each stable
|
|||||||
upstream release and apply our own changes on top of it, while keeping the
|
upstream release and apply our own changes on top of it, while keeping the
|
||||||
number of maintained branches to minimum
|
number of maintained branches to minimum
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
Summary: API documentation for %{name}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{name}-%{name_ver}
|
%setup -q -n %{name}-%{name}-parent-%{namedversion}
|
||||||
%patch1 -p1
|
|
||||||
patch=`mktemp`
|
patch=`mktemp`
|
||||||
sed "s;@PATH@;%{_libdir}/%{name};g" < %{PATCH2} > $patch
|
sed "s;@PATH@;%{_libdir};g" < %{SOURCE1} > $patch
|
||||||
patch -p1 < $patch
|
patch -p1 < $patch
|
||||||
|
|
||||||
|
%pom_disable_module openssl-static
|
||||||
|
%pom_disable_module boringssl-static
|
||||||
|
%pom_disable_module libressl-static
|
||||||
|
|
||||||
|
%pom_remove_plugin :maven-enforcer-plugin .
|
||||||
|
%pom_remove_plugin :maven-antrun-plugin . openssl-dynamic
|
||||||
|
%pom_remove_plugin :maven-hawtjni-plugin openssl-dynamic
|
||||||
|
%pom_xpath_remove pom:project/pom:profiles openssl-dynamic
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%set_build_flags
|
%{mvn_build} -f -- -Dsource=7
|
||||||
%mvn_build -f
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%mvn_install
|
%mvn_install
|
||||||
mkdir -p %{buildroot}%{_libdir}/%{name}/
|
%fdupes -s %{buildroot}%{_javadocdir}
|
||||||
cp target/native-build/target/lib/lib%{name}-%{name_ver}.so %{buildroot}%{_libdir}/%{name}/lib%{name}.so
|
|
||||||
|
|
||||||
|
|
||||||
%check
|
|
||||||
javac -d . -cp %{buildroot}%{_jnidir}/%{name}/%{name}.jar %{SOURCE1}
|
|
||||||
|
|
||||||
|
|
||||||
%files -f .mfiles
|
%files -f .mfiles
|
||||||
%doc %{_javadocdir}/%{name}
|
|
||||||
%dir %{_jnidir}/%{name}
|
|
||||||
%dir %{_libdir}/%{name}
|
|
||||||
%dir %{_mavenpomdir}/%{name}
|
|
||||||
%{_libdir}/%{name}/lib%{name}.so
|
|
||||||
|
|
||||||
|
%files javadoc -f .mfiles-javadoc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jun 28 2020 yaokai13 <yaokai13@huawei.com> - 1.1.33-1
|
||||||
|
- Update to 1.1.33-1
|
||||||
|
|
||||||
* Fri Dec 6 2019 huyan <hu.huyan@huawei.com> - 1.1.30-13
|
* Fri Dec 6 2019 huyan <hu.huyan@huawei.com> - 1.1.30-13
|
||||||
- Package Initialization
|
- Package Initialization
|
||||||
|
|||||||
4
netty-tcnative.yaml
Normal file
4
netty-tcnative.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: https://github.com/netty/netty-tcnative.git
|
||||||
|
tag_prefix: "^"
|
||||||
|
seperator: "netty-tcnative-"
|
||||||
Loading…
x
Reference in New Issue
Block a user