Compare commits

...
Sign in to create a new pull request.

17 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
5 changed files with 3 additions and 312 deletions

9
.gitignore vendored
View file

@ -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
View file

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

View file

@ -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();

View file

@ -1 +0,0 @@
fcde95fa1e0b6d75440852c96bf6e987 client-3.6.0.zip

View file

@ -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