Compare commits
17 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dff0e8db49 | ||
|
|
9550946e35 | ||
|
|
8ad225078b | ||
|
|
82b543b23c | ||
|
|
88d327d090 | ||
|
|
cce9e69728 | ||
|
|
99f9540930 | ||
|
|
29f7911f55 | ||
|
|
fcd3d31d06 | ||
|
|
3102f1e895 | ||
|
|
3219beee8d | ||
|
|
62d3a1d7cc | ||
|
|
476eab306e | ||
|
|
9be3662883 | ||
|
|
7563306bde | ||
|
|
6f93a5184e | ||
|
|
7def194f1d |
5 changed files with 3 additions and 312 deletions
9
.gitignore
vendored
9
.gitignore
vendored
|
|
@ -1,9 +0,0 @@
|
|||
/client-2.2.0.zip
|
||||
/client-3.1.0.zip
|
||||
/client-3.1.1.zip
|
||||
/client-3.1.2.zip
|
||||
/client-3.3.0.zip
|
||||
/client-3.3.2.zip
|
||||
/client-3.4.1.zip
|
||||
/client-3.4.2.zip
|
||||
/client-3.6.0.zip
|
||||
3
dead.package
Normal file
3
dead.package
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
2017-04-30: Retired orphaned package, because it was orphaned for
|
||||
more than six weeks.
|
||||
|
||||
88
sni.patch
88
sni.patch
|
|
@ -1,88 +0,0 @@
|
|||
diff --git pom.xml pom.xml
|
||||
index e605ef1..773e5ca 100644
|
||||
--- pom.xml
|
||||
+++ pom.xml
|
||||
@@ -175,7 +175,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
- <version>4.3.3</version>
|
||||
+ <version>4.2.5</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
diff --git zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
|
||||
index 9a59c61..7d1fb4b 100644
|
||||
--- zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
|
||||
+++ zanata-rest-client/src/main/java/org/zanata/rest/client/ZanataProxyFactory.java
|
||||
@@ -9,6 +9,7 @@ import java.net.Socket;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
+import java.net.UnknownHostException;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
@@ -29,6 +30,7 @@ import org.apache.http.conn.scheme.Scheme;
|
||||
import org.apache.http.conn.ssl.SSLSocketFactory;
|
||||
import org.apache.http.conn.ssl.X509HostnameVerifier;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
+import org.apache.http.params.HttpParams;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
|
||||
import org.jboss.resteasy.client.ClientExecutor;
|
||||
@@ -137,28 +139,34 @@ public class ZanataProxyFactory implements ITranslationResourcesFactory {
|
||||
|
||||
sslContext.init(null, trustAllCerts, new SecureRandom());
|
||||
|
||||
- SSLSocketFactory factory = new SSLSocketFactory(sslContext) {
|
||||
- @Override
|
||||
- public Socket connectSocket(
|
||||
- int connectTimeout,
|
||||
- Socket socket,
|
||||
- HttpHost host,
|
||||
- InetSocketAddress remoteAddress,
|
||||
- InetSocketAddress localAddress,
|
||||
- HttpContext context) throws IOException,
|
||||
- ConnectTimeoutException {
|
||||
- if (socket instanceof SSLSocket) {
|
||||
- try {
|
||||
- PropertyUtils.setProperty(socket, "host",
|
||||
- host.getHostName());
|
||||
- } catch (Exception ex) {
|
||||
- log.warn("Unable to enable SNI; you may have trouble connecting to some secure hosts. Please ensure that you are running Java 1.7 or later.");
|
||||
+ SSLSocketFactory factory;
|
||||
+ if (sslCertDisabled) {
|
||||
+ // avoid triggering the problem described here:
|
||||
+ // https://stackoverflow.com/questions/7615645/ssl-handshake-alert-unrecognized-name-error-since-upgrade-to-java-1-7-0
|
||||
+ factory = new SSLSocketFactory(sslContext);
|
||||
+ } else {
|
||||
+ factory = new SSLSocketFactory(sslContext) {
|
||||
+ // NB: This is only for httpcomponents-client 4.2, not 4.3
|
||||
+ @Override
|
||||
+ public Socket connectSocket(Socket socket,
|
||||
+ InetSocketAddress remoteAddress,
|
||||
+ InetSocketAddress localAddress,
|
||||
+ HttpParams params)
|
||||
+ throws IOException, UnknownHostException,
|
||||
+ ConnectTimeoutException {
|
||||
+ if (socket instanceof SSLSocket) {
|
||||
+ try {
|
||||
+ PropertyUtils.setProperty(socket, "host",
|
||||
+ remoteAddress.getHostName());
|
||||
+ } catch (Exception ex) {
|
||||
+ log.warn("Unable to enable SNI; you may have trouble connecting to some secure hosts. Please ensure that you are running Java 1.7 or later.");
|
||||
+ }
|
||||
}
|
||||
+ return super.connectSocket(socket, remoteAddress,
|
||||
+ localAddress, params);
|
||||
}
|
||||
- return super.connectSocket(connectTimeout, socket, host, remoteAddress,
|
||||
- localAddress, context);
|
||||
- }
|
||||
- };
|
||||
+ };
|
||||
+ }
|
||||
|
||||
HttpClient client = new DefaultHttpClient();
|
||||
|
||||
1
sources
1
sources
|
|
@ -1 +0,0 @@
|
|||
fcde95fa1e0b6d75440852c96bf6e987 client-3.6.0.zip
|
||||
|
|
@ -1,214 +0,0 @@
|
|||
%global shortname client
|
||||
|
||||
%global submodule_rest zanata-rest-%{shortname}
|
||||
%global submodule_commands zanata-%{shortname}-commands
|
||||
%global submodule_cli zanata-cli
|
||||
%global java_version 1.7
|
||||
|
||||
Name: zanata-%{shortname}
|
||||
Version: 3.6.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Zanata client module
|
||||
|
||||
Group: Development/Tools
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/zanata/%{name}
|
||||
Source0: https://github.com/zanata/%{name}/archive/%{shortname}-%{version}.zip
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: resteasy >= 3.0.1
|
||||
BuildRequires: mvn(org.mockito:mockito-core)
|
||||
BuildRequires: mvn(org.apache.commons:commons-exec)
|
||||
BuildRequires: exec-maven-plugin
|
||||
BuildRequires: maven-dependency-plugin
|
||||
BuildRequires: powermock-junit4
|
||||
BuildRequires: powermock-api-mockito
|
||||
BuildRequires: powermock-core
|
||||
BuildRequires: zanata-parent
|
||||
BuildRequires: zanata-api >= 3.3.1
|
||||
BuildRequires: xom
|
||||
BuildRequires: zanata-common >= 3.3.0
|
||||
BuildRequires: args4j >= 2.0.25
|
||||
BuildRequires: opencsv
|
||||
BuildRequires: openprops
|
||||
BuildRequires: jgettext
|
||||
BuildRequires: mvn(com.sun:tools)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-clean-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-deploy-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-install-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-site-plugin)
|
||||
BuildRequires: java-devel >= 1:%{java_version}
|
||||
|
||||
Requires: java-headless >= 1:%{java_version}
|
||||
Requires: resteasy >= 3.0.1
|
||||
Requires: mvn(org.apache.commons:commons-exec)
|
||||
Requires: zanata-api
|
||||
Requires: zanata-common
|
||||
Requires: args4j >= 2.0.25
|
||||
Requires: opencsv
|
||||
Requires: openprops
|
||||
Requires: jgettext
|
||||
Requires: xom
|
||||
|
||||
|
||||
%description
|
||||
Zanata client modules.
|
||||
Holds most of Zanata's client code, including Zanata CLI.
|
||||
It also contains REST stub for interacting with a Zanata server.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadocs for %{name}
|
||||
Group: Documentation
|
||||
Requires: jpackage-utils
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description javadoc
|
||||
This package contains the API documentation for %{shortname}.
|
||||
This includes sub modules:
|
||||
%{submodule_rest}, %{submodule_commands} and %{submodule_cli}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{shortname}-%{version}
|
||||
|
||||
%pom_disable_module zanata-maven-plugin
|
||||
%pom_remove_plugin :appassembler-maven-plugin %{submodule_cli}
|
||||
%pom_remove_plugin :maven-assembly-plugin %{submodule_cli}
|
||||
%pom_remove_plugin :findbugs-maven-plugin
|
||||
%pom_remove_dep org.simpleframework:simple
|
||||
%pom_remove_dep org.simpleframework:simple %{submodule_commands}
|
||||
%pom_remove_dep org.simpleframework:simple %{submodule_cli}
|
||||
%pom_remove_dep org.powermock:powermock-module-junit4 %{submodule_cli}
|
||||
%pom_xpath_inject "pom:dependency[pom:artifactId[text()='zanata-client-commands']]/pom:exclusions" "<exclusion><groupId>com.sun</groupId><artifactId>tools</artifactId></exclusion>" %{submodule_cli}
|
||||
|
||||
# Ensure it compile with supported java version
|
||||
%pom_xpath_inject "pom:plugins" "<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><source>%{java_version}</source><target>%{java_version}</target><fork>true</fork><verbose>true</verbose></configuration></plugin>"
|
||||
|
||||
# simpleframework in fedora is too old
|
||||
rm %{submodule_cli}/src/test/java/org/zanata/client/HTTPMockContainer.java
|
||||
rm %{submodule_cli}/src/test/java/org/zanata/client/ClientToServerTest.java
|
||||
rm %{submodule_commands}/src/test/java/org/zanata/client/commands/HTTPMockContainer.java
|
||||
rm %{submodule_commands}/src/test/java/org/zanata/client/commands/init/InitCommandTest.java
|
||||
rm %{submodule_commands}/src/test/java/org/zanata/client/commands/init/ProjectPromptTest.java
|
||||
rm %{submodule_commands}/src/test/java/org/zanata/client/commands/UpdateCheckerTest.java
|
||||
|
||||
# Fedora does not have powermock-1.6.1 yet
|
||||
rm %{submodule_cli}/src/test/java/org/zanata/client/ZanataClientTest.java
|
||||
rm %{submodule_commands}/src/test/java/org/zanata/client/commands/*.java
|
||||
rm %{submodule_commands}/src/test/java/org/zanata/client/commands/init/*.java
|
||||
rm %{submodule_commands}/src/test/java/org/zanata/client/commands/push/*.java
|
||||
rm %{submodule_commands}/src/test/java/org/zanata/client/commands/pull/*.java
|
||||
|
||||
%build
|
||||
# -Dmaven.local.debug=true
|
||||
%mvn_build -X -G -- -Dmdep.analyze.skip=true -DfailIfNoTests=false -DskipTests=true dependency:build-classpath -DincludeScope=compile -Dmdep.outputFile=%{name}-classpath.txt
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
||||
rest_cp=$(cat %{submodule_rest}/%{name}-classpath.txt)
|
||||
commands_cp=$(cat %{submodule_commands}/%{name}-classpath.txt)
|
||||
cli_cp=$(cat %{submodule_cli}/%{name}-classpath.txt)
|
||||
all_cp=$rest_cp:$commands_cp:$cli_cp
|
||||
|
||||
%global CLASSPATH $all_cp
|
||||
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
|
||||
install -d -m 755 %{buildroot}%{_bindir}
|
||||
|
||||
rm %{buildroot}%{_javadocdir}/%{name}/javadoc.sh
|
||||
|
||||
# create wrapper script
|
||||
# adapted from jpackage_script().
|
||||
# We build CLASSPATH at build time and the script won't be able to access it at runtime
|
||||
############# copied from jpackage_script() ###########################
|
||||
cat > %{buildroot}%{_bindir}/zanata-cli << ZANATA_CLI
|
||||
#!/bin/sh
|
||||
#
|
||||
# {name} script
|
||||
# JPackage Project <http://www.jpackage.org/>
|
||||
|
||||
# Source functions library
|
||||
. %{_javadir}-utils/java-functions
|
||||
|
||||
# Source system prefs
|
||||
if [ -f %{_sysconfdir}/java/%{name}.conf ] ; then
|
||||
. %{_sysconfdir}/java/%{name}.conf
|
||||
fi
|
||||
|
||||
# Source user prefs
|
||||
if [ -f \$HOME/.%{name}rc ] ; then
|
||||
. \$HOME/.%{name}rc
|
||||
fi
|
||||
|
||||
# Configuration
|
||||
MAIN_CLASS=org.zanata.client.ZanataClient
|
||||
BASE_JARS="%{name} slf4j/log4j12 opencsv"
|
||||
CLASSPATH=%{CLASSPATH}
|
||||
|
||||
# Set parameters
|
||||
set_jvm
|
||||
# we have built CLASSPATH above
|
||||
set_classpath \$BASE_JARS
|
||||
|
||||
# Let's start
|
||||
run "\$@"
|
||||
ZANATA_CLI
|
||||
|
||||
chmod 755 %{buildroot}%{_bindir}/zanata-cli
|
||||
#################################################################
|
||||
|
||||
|
||||
%files -f .mfiles
|
||||
%dir %{_javadir}/%{name}
|
||||
%attr(0755,root,root) %{_bindir}/zanata-cli
|
||||
%doc README.txt
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
|
||||
%changelog
|
||||
* Tue Mar 31 2015 Ding-Yi Chen <dchen@redhat.com> 3.6.0-1
|
||||
- Upstream update to 3.6.0
|
||||
- Detail documentation https://github.com/zanata/zanata-client/tree/master/docs
|
||||
|
||||
* Tue Mar 03 2015 Ding-Yi Chen <dchen@redhat.com> 3.4.2-1
|
||||
- Upstream update to 3.4.2
|
||||
- Include licence (LGPL 2.1) in dist archives
|
||||
|
||||
* Mon Feb 02 2015 Ding-Yi Chen <dchen@redhat.com> 3.4.1-1
|
||||
- Upstream update to 3.4.1
|
||||
|
||||
* Mon Jul 28 2014 Patrick Huang <pahuang@redhat.com> 3.3.2-3
|
||||
- Add version restriction and fix exec script classpath
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Mon Jun 02 2014 Patrick Huang <pahuang@redhat.com> 3.3.2-1
|
||||
- Latest upstream version
|
||||
|
||||
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 3.3.0-2
|
||||
- Use Requires: java-headless rebuild (#1067528)
|
||||
|
||||
* Thu Jan 09 2014 Patrick Huang <pahuang@redhat.com> 3.3.0-1
|
||||
- Latest upstream version
|
||||
|
||||
* Wed Aug 28 2013 Patrick Huang <pahuang@redhat.com> 3.1.1-1
|
||||
- Upstream update for newer version of RESTEasy
|
||||
|
||||
* Wed Aug 28 2013 Patrick Huang <pahuang@redhat.com> 3.1.0-1
|
||||
- Upstream update
|
||||
|
||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Thu May 16 2013 Patrick Huang <pahuang@redhat.com> 2.2.0-2
|
||||
- Change license to LGPLv2+
|
||||
|
||||
* Fri Mar 1 2013 Patrick Huang <pahuang@redhat.com> 2.2.0-1
|
||||
- Upstream version update
|
||||
|
||||
* Mon Feb 11 2013 Patrick Huang <pahuang@redhat.com> 2.0.1-1
|
||||
- Initial RPM package
|
||||
Loading…
Add table
Add a link
Reference in a new issue