Compare commits

...

No commits in common. 'c8-stream-201801' and 'i8c-stream-201902' have entirely different histories.

2
.gitignore vendored

@ -1 +1 @@
SOURCES/javamail-1.5.2-src.zip
SOURCES/javamail-1.6.2.tar.gz

@ -1 +1 @@
3848b70a4d3a6b04c17a7c8ab8210ae72684ed38 SOURCES/javamail-1.5.2-src.zip
e6dd4e61e0f8c32dacbb502de8b19d52c1f70c3a SOURCES/javamail-1.6.2.tar.gz

@ -0,0 +1,40 @@
From 158e5fdcc7cbe38067a8e83d975cfe32999e650d Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Wed, 23 Oct 2019 12:55:51 +0200
Subject: [PATCH] Disable tests that use networking
---
.../test/java/com/sun/mail/util/WriteTimeoutSocketTest.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java b/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java
index b1d80d3..b04c827 100644
--- a/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java
+++ b/mail/src/test/java/com/sun/mail/util/WriteTimeoutSocketTest.java
@@ -62,6 +62,7 @@ import com.sun.mail.test.TestSocketFactory;
import com.sun.mail.test.TestSSLSocketFactory;
import org.junit.Test;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.rules.Timeout;
import static org.junit.Assert.fail;
@@ -111,6 +112,7 @@ public final class WriteTimeoutSocketTest {
* Test write timeouts with SSL sockets.
*/
@Test
+ @Ignore
public void testSSL() {
final Properties properties = new Properties();
properties.setProperty("mail.imap.host", "localhost");
@@ -127,6 +129,7 @@ public final class WriteTimeoutSocketTest {
* Test write timeouts with a custom SSL socket factory.
*/
@Test
+ @Ignore
public void testSSLSocketFactory() throws Exception {
final Properties properties = new Properties();
properties.setProperty("mail.imap.host", "localhost");
--
2.21.0

@ -1,12 +1,14 @@
Name: javamail
Version: 1.5.2
Release: 7%{?dist}
Version: 1.6.2
Release: 2%{?dist}
Summary: Java Mail API
License: CDDL-1.0 or GPLv2 with exceptions
URL: http://www.oracle.com/technetwork/java/javamail
BuildArch: noarch
Source: https://java.net/projects/javamail/downloads/download/source/javamail-%{version}-src.zip
Source: https://github.com/javaee/javamail/archive/JAVAMAIL-1_6_2.tar.gz#/%{name}-%{version}.tar.gz
Patch0: 0000-Disable-tests-that-use-networking.patch
BuildRequires: maven-local
BuildRequires: mvn(junit:junit)
@ -26,27 +28,38 @@ Provides: javax.mail
The JavaMail API provides a platform-independent and protocol-independent
framework to build mail and messaging applications.
%package javadoc
Summary: Javadoc for %{name}
%description javadoc
%{summary}.
%prep
%setup -q -c
pushd javamail-JAVAMAIL-1_6_2
find -name module-info.java -delete
mv * ..
popd
rm -rf javamail-JAVAMAIL-1_6_2
%patch0 -p1
# -Werror is harmful - harmless compiler warnings cause build failure
%pom_xpath_remove "pom:arg[text()='-Werror']" mail
# Use bundled fork of JAF which is not available in OpenJDK 11
%pom_change_dep javax.activation:activation com.sun.mail:android-activation:\${mail.version} mail
cp -p {android/,}mail/src/main/java/com/sun/mail/handlers/handler_base.java
add_dep() {
%pom_xpath_inject pom:project "<dependencies/>" ${2}
%pom_add_dep com.sun.mail:${1}:%{version}:provided ${2}
}
# Test requires full JAF and does not work with bundled JAF
rm -f mail/src/test/java/com/sun/mail/handlers/TextXmlTest.java
add_dep smtp mailapi
add_dep javax.mail smtp
add_dep javax.mail pop3
add_dep javax.mail imap
add_dep javax.mail mailapijar
# Disable unneeded modules
%pom_disable_module mail android
%pom_disable_module dsn
# Unneeded plugin
%pom_remove_plugin :animal-sniffer-maven-plugin android
# Remove profiles containing demos and other stuff that is not
# supposed to be deployable.
@ -55,8 +68,7 @@ add_dep javax.mail mailapijar
# osgiversion-maven-plugin is used to set ${mail.osgiversion} property
# based on ${project.version}. We don't have osgiversion plugin in
# Fedora so we'll set ${mail.osgiversion} explicitly.
%pom_remove_plugin org.glassfish.hk2:osgiversion-maven-plugin
%pom_remove_dep javax.activation:activation
%pom_remove_plugin -r org.glassfish.hk2:osgiversion-maven-plugin
%pom_xpath_inject /pom:project/pom:properties "<mail.osgiversion>%{version}</mail.osgiversion>"
%pom_xpath_inject /pom:project/pom:build/pom:plugins/pom:plugin/pom:configuration/pom:instructions "<_nouses>true</_nouses>"
@ -67,8 +79,7 @@ add_dep javax.mail mailapijar
%mvn_file "com.sun.mail:{javax.mail}" %{name}/@1 %{name}/mail
%build
# Some tests fail on Koji due to networking limitations
%mvn_build -- -Dmaven.test.failure.ignore=true
%mvn_build
%install
%mvn_install
@ -85,6 +96,18 @@ ln -sf ../%{name}/javax.mail.jar %{buildroot}%{_javadir}/javax.mail/
%doc mail/src/main/resources/META-INF/LICENSE.txt
%changelog
* Tue May 07 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.6.2-2
- Rebuilt for MSVSphere 8.9
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.6.2-2
- Mass rebuild for javapackages-tools 201902
* Wed Oct 23 2019 Marian Koncek <mkoncek@redhat.com> - 1.6.2-1
- Update to upstream version 1.6.2
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.5.2-8
- Mass rebuild for javapackages-tools 201901
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

Loading…
Cancel
Save