Compare commits

..

39 commits

Author SHA1 Message Date
Till Maas
dff0e8db49 2017-04-30: Retired orphaned package, because it was orphaned for
more than six weeks.
2017-04-30 17:22:08 +02:00
Fedora Release Engineering
9550946e35 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 18:21:08 +00:00
Ding-Yi Chen
8ad225078b - Use resteasy client instead of resteasy 2016-08-02 22:51:52 +10:00
Ding-Yi Chen
82b543b23c - Require zanata-api-3.9.1-2, which has correct dependency. 2016-07-26 10:43:27 +10:00
Ding-Yi Chen
88d327d090 - Require zanata-api-3.9.1-2, which has correct dependency. 2016-07-26 10:40:46 +10:00
Ding-Yi Chen
cce9e69728 - Upstream update to version 3.9.1 2016-07-18 16:34:07 +10:00
Ding-Yi Chen
99f9540930 - Upstream update to version 3.9.1 2016-07-18 16:22:43 +10:00
Ding-Yi Chen
29f7911f55 - Upstream update to version 3.9.1 2016-07-18 11:54:09 +10:00
Ding-Yi Chen
fcd3d31d06 - Upstream update to version 3.9.1 2016-07-18 11:50:51 +10:00
Ding-Yi Chen
3102f1e895 - Upstream update to 3.8.4 2016-04-20 11:31:08 +10:00
Fedora Release Engineering
3219beee8d - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-05 04:02:41 +00:00
Ding-Yi Chen
62d3a1d7cc - Fix the case that alternative does not point to 1.8.0 or later. 2015-11-26 17:00:25 +10:00
Ding-Yi Chen
476eab306e - Upgrade to upstream version 3.8.1
- Now require Java 1.8
2015-11-23 09:47:38 +10:00
Ding-Yi Chen
9be3662883 Release zanata-client-3.7.4-1 2015-08-10 14:50:39 +10:00
Ding-Yi Chen
7563306bde fix(dependency): zanata-parent version should be 24 2015-08-10 14:14:22 +10:00
Ding-Yi Chen
6f93a5184e Update spec for 3.7.3 2015-07-14 13:18:18 +10:00
Dennis Gilmore
7def194f1d - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-19 04:42:38 +00:00
Ding-Yi Chen
94da71d185 Upstream update to 3.6.0 2015-03-31 14:55:49 +10:00
Ding-Yi Chen
302f7ef876 Update to 3.4.2 2015-03-03 15:25:18 +10:00
Ding-Yi Chen
2f0061c7ec Remove patch 0 2015-02-02 17:28:11 +10:00
Ding-Yi Chen
c76e3bcd6a Merge branch 'master' into f20
Conflicts:
	.gitignore
	sources
	zanata-client.spec
2015-02-02 17:24:56 +10:00
Ding-Yi Chen
7f4990f028 Update sources 2015-02-02 16:47:30 +10:00
Ding-Yi Chen
2fab54a549 Upstream update to 3.4.1 2015-02-02 16:43:03 +10:00
Patrick Huang
f2086ad191 Add version restriction and fix exec script classpath 2014-07-27 21:27:22 -04:00
Patrick Huang
1a7f2b4a89 add version restriction to certain dependencies 2014-07-20 20:51:00 -04:00
Patrick Huang
cdb6ad9ff1 patch for SNI 2014-07-18 00:06:47 -04:00
Patrick Huang
9994561df3 remove xom dependency and add SNI fix 2014-07-18 00:05:24 -04:00
Dennis Gilmore
ccdb632e73 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 12:59:53 -05:00
Patrick Huang
6de0f0e217 upgrade to latest upstream 2014-06-01 21:50:27 -04:00
Patrick Huang
3ebb7cc072 upload source 2014-06-01 21:43:51 -04:00
Patrick Huang
f4d39fbc53 upgrade to latest upstream 2014-06-01 21:42:59 -04:00
Michael Simacek
df57a39881 Use Requires: java-headless rebuild (#1067528)
Signed-off-by: Michael Simacek <msimacek@redhat.com>
Signed-off-by: Mikolaj Izdebski <mizdebsk@redhat.com>
2014-03-28 21:10:03 +01:00
Patrick Huang
88387e3dce upgrade to latest upstream version 2014-01-29 19:14:55 -05:00
Patrick Huang
b934003541 update to latest upstream 2013-09-03 20:45:37 -04:00
Patrick Huang
f92c6ff46c upload source 2013-08-28 21:30:02 -04:00
Patrick Huang
829d9529ad Upstream update for newer version of RESTEasy 2013-08-28 20:28:25 -04:00
Patrick Huang
b71fa12bc9 upstream source 2013-08-27 22:58:27 -04:00
Patrick Huang
1b885e8980 upstream update 2013-08-27 22:55:02 -04:00
Dennis Gilmore
b19d2f154f - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-04 04:41:50 -05:00
6 changed files with 3 additions and 359 deletions

1
.gitignore vendored
View file

@ -1 +0,0 @@
/client-2.2.0.zip

3
dead.package Normal file
View file

@ -0,0 +1,3 @@
2017-04-30: Retired orphaned package, because it was orphaned for
more than six weeks.

View file

@ -1,13 +0,0 @@
diff --git zanata-client-commands/src/main/java/org/zanata/client/commands/push/PushCommand.java zanata-client-commands/src/main/java/org/zanata/client/commands/push/PushCommand.java
index a625bc1..46e0ab1 100644
--- zanata-client-commands/src/main/java/org/zanata/client/commands/push/PushCommand.java
+++ zanata-client-commands/src/main/java/org/zanata/client/commands/push/PushCommand.java
@@ -646,7 +646,7 @@ public class PushCommand extends PushPullCommand<PushOptions>
}
else
{
- log.info("pushing target doc [name={} size={} client-locale={}] to server [locale={}] (skipped due to dry run)", srcDoc.getName(), targetDoc.getTextFlowTargets().size(), locale.getLocalLocale(), locale.getLocale());
+ log.info("pushing target doc [name={} size={} client-locale={}] to server [locale={}] (skipped due to dry run)", new Object[] {srcDoc.getName(), targetDoc.getTextFlowTargets().size(), locale.getLocalLocale(), locale.getLocale()});
}
}

View file

@ -1,151 +0,0 @@
diff --git zanata-rest-client/pom.xml zanata-rest-client/pom.xml
index 3fb3b24..d1467df 100644
--- zanata-rest-client/pom.xml
+++ zanata-rest-client/pom.xml
@@ -24,6 +24,10 @@
<groupId>org.zanata</groupId>
<artifactId>zanata-common-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ </dependency>
<dependency>
<groupId>junit</groupId>
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 9133412..44c1dae 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
@@ -1,14 +1,28 @@
package org.zanata.rest.client;
+import java.io.IOException;
+import java.net.InetSocketAddress;
import java.net.MalformedURLException;
+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 org.apache.commons.beanutils.PropertyUtils;
+import org.apache.http.client.HttpClient;
+import org.apache.http.conn.ClientConnectionManager;
+import org.apache.http.conn.ConnectTimeoutException;
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.params.HttpParams;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.jboss.resteasy.client.ClientExecutor;
import org.jboss.resteasy.client.ClientRequestFactory;
import org.jboss.resteasy.client.ClientResponse;
+import org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor;
import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
import org.slf4j.Logger;
@@ -19,6 +33,9 @@ import org.zanata.rest.service.AsynchronousProcessResource;
import org.zanata.rest.service.CopyTransResource;
import org.zanata.rest.service.StatisticsResource;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.TrustManager;
import javax.ws.rs.core.Response;
public class ZanataProxyFactory implements ITranslationResourcesFactory
@@ -45,7 +62,7 @@ public class ZanataProxyFactory implements ITranslationResourcesFactory
{
this(base, username, apiKey, null, clientApiVersion, false);
}
-
+
public ZanataProxyFactory(URI base, String username, String apiKey, VersionInfo clientApiVersion, boolean logHttp)
{
this(base, username, apiKey, null, clientApiVersion, logHttp);
@@ -54,10 +71,10 @@ public class ZanataProxyFactory implements ITranslationResourcesFactory
public ZanataProxyFactory(URI base, String username, String apiKey, ClientExecutor executor, VersionInfo clientApiVersion,
boolean logHttp)
{
- crf = new ClientRequestFactory(executor, null, fixBase(base));
+ crf = new ClientRequestFactory(createClientExecutor(), null, fixBase(base));
registerPrefixInterceptor(new TraceDebugInterceptor(logHttp));
registerPrefixInterceptor(new ApiKeyHeaderDecorator(username, apiKey, clientApiVersion.getVersionNo()));
-
+
clientVersion = clientApiVersion.getVersionNo();
String clientTimestamp = clientApiVersion.getBuildTimeStamp();
IVersionResource iversion = createIVersionResource();
@@ -86,6 +103,50 @@ public class ZanataProxyFactory implements ITranslationResourcesFactory
}
}
+ private static ClientExecutor createClientExecutor() {
+ try {
+ final SSLContext sslContext = SSLContext.getInstance("TLS");
+
+ sslContext.init(null, null, new SecureRandom());
+
+ // NB: This factory is a workaround to enable SNI with
+ // httpcomponents-client 4.2; not needed for 4.3
+ SSLSocketFactory factory = new SSLSocketFactory(sslContext) {
+ @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);
+ }
+ };
+
+ HttpClient client = new DefaultHttpClient();
+
+ ClientConnectionManager manager = client.getConnectionManager();
+ manager.getSchemeRegistry().register(
+ new Scheme("https", 443, factory));
+ return new ApacheHttpClient4Executor(client);
+
+ } catch (Exception e) {
+ log.warn("error creating SSL client", e);
+ }
+ return null;
+ }
+
public <T> T createProxy(Class<T> clazz, URI baseUri)
{
log.debug("{} proxy uri: {}", clazz.getSimpleName(), baseUri);
@@ -244,7 +305,8 @@ public class ZanataProxyFactory implements ITranslationResourcesFactory
public ISourceDocResource getSourceDocResource(String projectSlug, String versionSlug)
{
- return createProxy(ISourceDocResource.class, getResourceURI(projectSlug, versionSlug));
+ return createProxy(ISourceDocResource.class, getResourceURI(projectSlug,
+ versionSlug));
}
public IFileResource getFileResource()
@@ -317,7 +379,7 @@ public class ZanataProxyFactory implements ITranslationResourcesFactory
{
crf.getPrefixInterceptors().registerInterceptor(interceptor);
}
-
+
protected IVersionResource createIVersionResource()
{
URL url;

View file

@ -1 +0,0 @@
a63d56d4a11fa48f7fbda5f0efbe0cf9 client-2.2.0.zip

View file

@ -1,193 +0,0 @@
%global shortname client
%global submodule_rest zanata-rest-%{shortname}
%global submodule_commands zanata-%{shortname}-commands
%global submodule_cli zanata-cli
Name: zanata-%{shortname}
Version: 2.2.0
Release: 4%{?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
Patch0: sni-for-client-2.2.0.patch
BuildArch: noarch
BuildRequires: maven-local
BuildRequires: maven-dependency-plugin
BuildRequires: maven-enforcer-plugin
BuildRequires: maven-surefire-plugin
BuildRequires: maven-surefire-provider-testng
BuildRequires: maven-surefire-provider-junit4
# dependencies in zanata-rest-client
BuildRequires: zanata-parent
BuildRequires: zanata-api
BuildRequires: junit
BuildRequires: resteasy
# dependencies in zanata-common-commands
BuildRequires: zanata-common
BuildRequires: mockito
BuildRequires: apache-commons-configuration
BuildRequires: log4j
BuildRequires: args4j
BuildRequires: openprops
BuildRequires: apache-commons-collections
BuildRequires: guava
BuildRequires: hamcrest
BuildRequires: apache-commons-lang
BuildRequires: apache-commons-codec
BuildRequires: apache-commons-io
BuildRequires: opencsv
BuildRequires: ant
# dependencies in zanata-cli
BuildRequires: exec-maven-plugin
Requires: jpackage-utils
Requires: java
Requires: slf4j
Requires: zanata-api
Requires: resteasy
Requires: zanata-common
Requires: apache-commons-configuration
Requires: log4j
Requires: args4j
Requires: openprops
Requires: apache-commons-collections
Requires: guava
Requires: apache-commons-lang
Requires: apache-commons-codec
Requires: apache-commons-io
Requires: opencsv
Requires: ant
%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 submodules:
%{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}
%patch0
%build
# -Dmaven.local.debug=true
# we delete all test class under f19 because of hamcrest compatibility issue
find . -type f -name "*Test.java" | xargs rm
%mvn_build -- -Dmdep.analyze.skip=true -DskipTests
# local offline maven can not resolve each module,
# we have to disable our own module and generate classpath one by one
cd %{submodule_rest}
mvn-rpmbuild dependency:build-classpath -DincludeScope=compile -Dmdep.outputFile=target/%{submodule_rest}-classpath.txt
cd ..
%pom_remove_dep org.zanata:%{submodule_rest} %{submodule_commands}
cd %{submodule_commands}
mvn-rpmbuild dependency:build-classpath -DincludeScope=compile -Dmdep.outputFile=target/%{submodule_commands}-classpath.txt
cd ..
%pom_remove_dep org.zanata:%{submodule_commands} %{submodule_cli}
cd %{submodule_cli}
mvn-rpmbuild dependency:build-classpath -DincludeScope=compile -Dmdep.outputFile=target/%{submodule_cli}-classpath.txt
%install
%mvn_install
rest_cp=$(cat %{submodule_rest}/target/%{submodule_rest}-classpath.txt)
commands_cp=$(cat %{submodule_commands}/target/%{submodule_commands}-classpath.txt)
cli_cp=$(cat %{submodule_cli}/target/%{submodule_cli}-classpath.txt)
%global CLASSPATH $rest_cp:$commands_cp:$cli_cp
mkdir -p %{buildroot}%{_bindir}
install -d -m 755 %{buildroot}%{_bindir}
# 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}/%{submodule_rest} %{name}/%{submodule_commands} %{name}/%{submodule_cli} 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 Jul 22 2014 Patrick Huang <pahuang@redhat.com> 2.2.0-4
- Patch to fix SNI problem
* Fri Nov 01 2013 Ding-Yi Chen <dchen@redhat.com> 2.2.0-3
- Fixes Bug 1025112 - zanata-cli: Incorrect BASE_JARS
* 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