Compare commits

...

No commits in common. "stream-javapackages-tools-201801-rhel-8.9.0" and "c8-stream-201902" have entirely different histories.

9 changed files with 504 additions and 150 deletions

76
.gitignore vendored
View File

@ -1,75 +1 @@
/javapackages-0.3.0.tar.xz SOURCES/5.3.1.tar.gz
/javapackages-0.3.1.tar.xz
/javapackages-0.4.0.tar.xz
/javapackages-0.4.1.tar.xz
/javapackages-0.5.0.tar.xz
/javapackages-0.6.0.tar.xz
/javapackages-0.7.0.tar.xz
/javapackages-0.7.2.tar.xz
/javapackages-0.7.4.tar.xz
/javapackages-0.7.5.tar.xz
/javapackages-0.8.0.tar.xz
/javapackages-0.8.1.tar.xz
/javapackages-0.8.2.tar.xz
/javapackages-0.8.3.tar.xz
/javapackages-0.9.0.tar.xz
/javapackages-0.9.1.tar.xz
/javapackages-0.10.0.tar.xz
/javapackages-0.10.1.tar.xz
/javapackages-0.11.0.tar.xz
/javapackages-0.11.1.tar.xz
/javapackages-0.11.2.tar.xz
/javapackages-0.12.0.tar.xz
/javapackages-0.12.1.tar.xz
/javapackages-0.12.2.tar.xz
/javapackages-0.12.3.tar.xz
/javapackages-0.12.4.tar.xz
/javapackages-0.12.5.tar.xz
/javapackages-0.12.6.tar.xz
/javapackages-2f13366e47a0a687160fe3c555e5588af49a7566.tar.bz2
/javapackages-0.13.0.tar.xz
/javapackages-0.13.1.tar.xz
/javapackages-0.13.2.tar.xz
/javapackages-0.13.3.tar.xz
/javapackages-0.13.4.tar.xz
/javapackages-0.13.5.tar.xz
/javapackages-0.13.6.tar.xz
/javapackages-0.13.7.tar.xz
/javapackages-0.14.0.tar.xz
/javapackages-0.14.1.tar.xz
/javapackages-0.15.0.tar.xz
/javapackages-2.0.0.tar.xz
/javapackages-2.0.1.tar.xz
/javapackages-3.0.0.tar.xz
/javapackages-3.0.1.tar.xz
/javapackages-3.0.2.tar.xz
/javapackages-3.0.3.tar.xz
/javapackages-3.0.4.tar.xz
/javapackages-3.1.0.tar.xz
/javapackages-3.1.1.tar.xz
/javapackages-3.1.2.tar.xz
/javapackages-3.2.0.tar.xz
/javapackages-3.2.1.tar.xz
/javapackages-3.2.2.tar.xz
/javapackages-3.2.3.tar.xz
/javapackages-3.2.4.tar.xz
/javapackages-3.3.0.tar.xz
/javapackages-3.3.1.tar.xz
/javapackages-3.4.0.tar.xz
/javapackages-3.4.1.tar.xz
/javapackages-3.4.2.tar.xz
/javapackages-3.5.0.tar.xz
/javapackages-4.0.0.tar.xz
/javapackages-4.1.0.tar.xz
/javapackages-4.2.0.tar.xz
/javapackages-4.3.0.tar.xz
/javapackages-4.3.1.tar.xz
/javapackages-4.3.2.tar.xz
/javapackages-4.4.0.tar.xz
/javapackages-4.5.0.tar.xz
/javapackages-4.6.0.tar.xz
/javapackages-4.7.0.tar.xz
/5.0.0.tar.gz
/5.1.0.tar.gz
/5.2.0.tar.gz
/5.3.0.tar.gz

View File

@ -0,0 +1 @@
4814361a6ea3fd5d427be7a3110c84cee621ed2f SOURCES/5.3.1.tar.gz

View File

@ -0,0 +1,245 @@
From 760c3e7a568295ded8229b06e651915c78475ccd Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 26 Apr 2019 00:50:00 +0200
Subject: [PATCH 1/3] Move python modules under java-utils directory
---
depgenerators/javadoc.req | 3 +++
depgenerators/maven.prov | 2 ++
depgenerators/maven.req | 2 ++
depgenerators/osgi.prov | 2 ++
depgenerators/osgi.req | 2 ++
java-utils/builddep.py | 2 ++
java-utils/maven_depmap.py | 2 ++
java-utils/mvn_alias.py | 2 ++
java-utils/mvn_artifact.py | 4 +++-
java-utils/mvn_build.py | 2 ++
java-utils/mvn_compat_version.py | 2 ++
java-utils/mvn_config.py | 2 ++
java-utils/mvn_file.py | 2 ++
java-utils/mvn_package.py | 2 ++
java-utils/pom_editor.py | 2 ++
java-utils/request-artifact.py | 2 ++
16 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/depgenerators/javadoc.req b/depgenerators/javadoc.req
index 4d182e2e..8528ee05 100755
--- a/depgenerators/javadoc.req
+++ b/depgenerators/javadoc.req
@@ -32,6 +32,9 @@
# Authors: Michael Simacek <msimacek@redhat.com>
# Michal Srb <msrb@redhat.com>
+import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.common.config import get_config
config = get_config()
diff --git a/depgenerators/maven.prov b/depgenerators/maven.prov
index 1448cbf6..c794dbea 100755
--- a/depgenerators/maven.prov
+++ b/depgenerators/maven.prov
@@ -34,6 +34,8 @@
import sys
import traceback
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.cache.metadata import MetadataCache
from javapackages.common.util import kill_parent_process, init_rpmgen, get_logger
diff --git a/depgenerators/maven.req b/depgenerators/maven.req
index b3597f78..912d5f98 100755
--- a/depgenerators/maven.req
+++ b/depgenerators/maven.req
@@ -37,6 +37,8 @@ import re
import sys
import traceback
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.common.config import get_config
from javapackages.common.util import (kill_parent_process,
init_rpmgen,
diff --git a/depgenerators/osgi.prov b/depgenerators/osgi.prov
index baef6e48..7ed423a2 100755
--- a/depgenerators/osgi.prov
+++ b/depgenerators/osgi.prov
@@ -34,6 +34,8 @@
import sys
import os
import traceback
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.cache.osgi import OSGiCache
from javapackages.common.util import kill_parent_process, init_rpmgen, get_logger
diff --git a/depgenerators/osgi.req b/depgenerators/osgi.req
index 3cb53302..79dcaaa8 100755
--- a/depgenerators/osgi.req
+++ b/depgenerators/osgi.req
@@ -34,6 +34,8 @@
import sys
import os
import traceback
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.cache.osgi import OSGiCache
from javapackages.common.util import kill_parent_process, init_rpmgen, get_logger
diff --git a/java-utils/builddep.py b/java-utils/builddep.py
index fda36d2d..48d0963d 100644
--- a/java-utils/builddep.py
+++ b/java-utils/builddep.py
@@ -33,6 +33,8 @@
import optparse
import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
ArtifactValidationException)
from javapackages.common.util import args_to_unicode
diff --git a/java-utils/maven_depmap.py b/java-utils/maven_depmap.py
index 92e0ff4c..9f1472a6 100644
--- a/java-utils/maven_depmap.py
+++ b/java-utils/maven_depmap.py
@@ -46,6 +46,8 @@ import zipfile
from time import gmtime, strftime
from copy import deepcopy
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.maven.pom import POM
from javapackages.metadata.artifact import MetadataArtifact
from javapackages.metadata.alias import MetadataAlias
diff --git a/java-utils/mvn_alias.py b/java-utils/mvn_alias.py
index 4979a17a..962a35f0 100644
--- a/java-utils/mvn_alias.py
+++ b/java-utils/mvn_alias.py
@@ -33,6 +33,8 @@
import optparse
import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
ArtifactValidationException)
from javapackages.xmvn.xmvn_config import XMvnConfig
diff --git a/java-utils/mvn_artifact.py b/java-utils/mvn_artifact.py
index d135adf2..51339d4b 100644
--- a/java-utils/mvn_artifact.py
+++ b/java-utils/mvn_artifact.py
@@ -32,6 +32,9 @@
from __future__ import print_function
+import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.metadata.metadata import Metadata
from javapackages.metadata.artifact import MetadataArtifact
from javapackages.metadata.dependency import MetadataDependency
@@ -45,7 +48,6 @@ from javapackages.xmvn.xmvn_resolve import (XMvnResolve, ResolutionRequest,
from javapackages.common.util import args_to_unicode
from javapackages.common.exception import JavaPackagesToolsException
-import sys
import os
import lxml.etree
from optparse import OptionParser
diff --git a/java-utils/mvn_build.py b/java-utils/mvn_build.py
index 98479962..4d5f54f7 100644
--- a/java-utils/mvn_build.py
+++ b/java-utils/mvn_build.py
@@ -37,6 +37,8 @@ import optparse
import subprocess
import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.maven.artifact import Artifact
from javapackages.xmvn.xmvn_config import XMvnConfig
from javapackages.common.util import args_to_unicode, command_exists
diff --git a/java-utils/mvn_compat_version.py b/java-utils/mvn_compat_version.py
index e4afdbd7..d63dcf99 100644
--- a/java-utils/mvn_compat_version.py
+++ b/java-utils/mvn_compat_version.py
@@ -33,6 +33,8 @@
import optparse
import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
ArtifactValidationException)
from javapackages.xmvn.xmvn_config import XMvnConfig
diff --git a/java-utils/mvn_config.py b/java-utils/mvn_config.py
index 7597761e..f7930985 100644
--- a/java-utils/mvn_config.py
+++ b/java-utils/mvn_config.py
@@ -33,6 +33,8 @@
import sys
import optparse
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.xmvn.xmvn_config import XMvnConfig
from javapackages.common.util import args_to_unicode
from javapackages.common.exception import JavaPackagesToolsException
diff --git a/java-utils/mvn_file.py b/java-utils/mvn_file.py
index 39d1348f..40ae156e 100644
--- a/java-utils/mvn_file.py
+++ b/java-utils/mvn_file.py
@@ -33,6 +33,8 @@
import optparse
import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
ArtifactValidationException)
from javapackages.xmvn.xmvn_config import XMvnConfig, XMvnConfigException
diff --git a/java-utils/mvn_package.py b/java-utils/mvn_package.py
index b74da128..2a2f4619 100644
--- a/java-utils/mvn_package.py
+++ b/java-utils/mvn_package.py
@@ -33,6 +33,8 @@
import optparse
import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.maven.artifact import (Artifact, ArtifactFormatException,
ArtifactValidationException)
from javapackages.xmvn.xmvn_config import XMvnConfig
diff --git a/java-utils/pom_editor.py b/java-utils/pom_editor.py
index 82a555b8..6c09665c 100644
--- a/java-utils/pom_editor.py
+++ b/java-utils/pom_editor.py
@@ -11,6 +11,8 @@ import io
from lxml import etree
from os import path
from textwrap import dedent
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.common.exception import JavaPackagesToolsException
# all macro fuctions that can be called from external world
diff --git a/java-utils/request-artifact.py b/java-utils/request-artifact.py
index 68cb1119..55dfd985 100644
--- a/java-utils/request-artifact.py
+++ b/java-utils/request-artifact.py
@@ -35,6 +35,8 @@ from __future__ import print_function
import sys
+sys.path.insert(0, '/usr/share/java-utils/')
+sys.path.insert(0, '/opt/rh/rh-maven36/root/usr/share/java-utils/')
from javapackages.common.mock import (InstallationException, ConnectionException,
install_maven_artifact)
--
2.21.0

View File

@ -0,0 +1,48 @@
From 48f5467fea8006cf0fe091d28fd879e6aed5a4b1 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Fri, 28 Jun 2019 14:53:26 +0200
Subject: [PATCH 2/3] Enable namespaced dependency generation
---
depgenerators/fileattrs/javadoc.attr | 2 +-
depgenerators/fileattrs/maven.attr | 4 ++--
depgenerators/fileattrs/osgi.attr | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/depgenerators/fileattrs/javadoc.attr b/depgenerators/fileattrs/javadoc.attr
index bdaeffa5..109b8015 100644
--- a/depgenerators/fileattrs/javadoc.attr
+++ b/depgenerators/fileattrs/javadoc.attr
@@ -1,3 +1,3 @@
%__javadoc_requires %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/javadoc@{scl_suffix}.req
-%__javadoc_requires_opts %{?scl:--scl %{?scl}}
+%__javadoc_requires_opts %{?scl:--scl %{scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
%__javadoc_path ^%{_javadocdir}/.[^/]*$
diff --git a/depgenerators/fileattrs/maven.attr b/depgenerators/fileattrs/maven.attr
index 2f722eb1..44644ca5 100644
--- a/depgenerators/fileattrs/maven.attr
+++ b/depgenerators/fileattrs/maven.attr
@@ -1,5 +1,5 @@
%__maven_provides %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/maven@{scl_suffix}.prov
-%__maven_provides_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}}
+%__maven_provides_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
%__maven_requires %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/maven@{scl_suffix}.req
-%__maven_requires_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}}
+%__maven_requires_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
%__maven_path ^%{_datadir}/maven-metadata/.*
diff --git a/depgenerators/fileattrs/osgi.attr b/depgenerators/fileattrs/osgi.attr
index 7c3ea03d..3ccc8b65 100644
--- a/depgenerators/fileattrs/osgi.attr
+++ b/depgenerators/fileattrs/osgi.attr
@@ -1,5 +1,5 @@
%__osgi_provides %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/osgi@{scl_suffix}.prov
-%__osgi_provides_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}}
-%__osgi_requires %{!?scl:%{_rpmconfigdir}/osgi@{scl_suffix}.req}%{?scl:%{_root_bindir}/true}
-%__osgi_requires_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}}
+%__osgi_provides_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
+%__osgi_requires %{!?module_prefix:%{_rpmconfigdir}/osgi@{scl_suffix}.req}%{?module_prefix:true}
+%__osgi_requires_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))}
%__osgi_path ^(.*\\.jar|((%{_prefix}/lib(64)?|%{_datadir})/.*/META-INF/MANIFEST.MF))$
--
2.21.0

View File

@ -0,0 +1,67 @@
From 0b0f93a4bc050a67e6885a647270a716f3d9cdce Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Mon, 2 Sep 2019 18:10:01 +0200
Subject: [PATCH 3/3] Fix use of illegal characters in rpmfc generator names
---
configure-base.sh | 2 +-
depgenerators/fileattrs/javadoc.attr | 6 +++---
depgenerators/fileattrs/maven.attr | 10 +++++-----
depgenerators/fileattrs/osgi.attr | 10 +++++-----
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/configure-base.sh b/configure-base.sh
index dbfc3e05..4b5a9172 100644
--- a/configure-base.sh
+++ b/configure-base.sh
@@ -64,5 +64,5 @@ test -z "${default_jdk}" && default_jdk="${jvmdir}/java"
test -z "${default_jre}" && default_jre="${jvmdir}/jre"
test -z "${scl_root_relative}" -a -n "${scl_root}" && scl_root_relative=$(sed "s:^/*::" <<<"${scl_root}")
-scl_suffix="${scl:+.$scl}"
+scl_suffix="${scl:+_${scl//-/_}}"
return 0
diff --git a/depgenerators/fileattrs/javadoc.attr b/depgenerators/fileattrs/javadoc.attr
index 109b8015..1f3a8475 100644
--- a/depgenerators/fileattrs/javadoc.attr
+++ b/depgenerators/fileattrs/javadoc.attr
@@ -1,3 +1,3 @@
-%__javadoc_requires %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/javadoc@{scl_suffix}.req
-%__javadoc_requires_opts %{?scl:--scl %{scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
-%__javadoc_path ^%{_javadocdir}/.[^/]*$
+%__javadoc@{scl_suffix}_requires %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/javadoc@{scl_suffix}.req
+%__javadoc@{scl_suffix}_requires_opts %{?scl:--scl %{scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
+%__javadoc@{scl_suffix}_path ^%{_javadocdir}/.[^/]*$
diff --git a/depgenerators/fileattrs/maven.attr b/depgenerators/fileattrs/maven.attr
index 44644ca5..26026658 100644
--- a/depgenerators/fileattrs/maven.attr
+++ b/depgenerators/fileattrs/maven.attr
@@ -1,5 +1,5 @@
-%__maven_provides %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/maven@{scl_suffix}.prov
-%__maven_provides_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
-%__maven_requires %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/maven@{scl_suffix}.req
-%__maven_requires_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
-%__maven_path ^%{_datadir}/maven-metadata/.*
+%__maven@{scl_suffix}_provides %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/maven@{scl_suffix}.prov
+%__maven@{scl_suffix}_provides_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
+%__maven@{scl_suffix}_requires %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/maven@{scl_suffix}.req
+%__maven@{scl_suffix}_requires_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
+%__maven@{scl_suffix}_path ^%{_datadir}/maven-metadata/.*
diff --git a/depgenerators/fileattrs/osgi.attr b/depgenerators/fileattrs/osgi.attr
index 3ccc8b65..8b0f15f7 100644
--- a/depgenerators/fileattrs/osgi.attr
+++ b/depgenerators/fileattrs/osgi.attr
@@ -1,5 +1,5 @@
-%__osgi_provides %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/osgi@{scl_suffix}.prov
-%__osgi_provides_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
-%__osgi_requires %{!?module_prefix:%{_rpmconfigdir}/osgi@{scl_suffix}.req}%{?module_prefix:true}
-%__osgi_requires_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))}
-%__osgi_path ^(.*\\.jar|((%{_prefix}/lib(64)?|%{_datadir})/.*/META-INF/MANIFEST.MF))$
+%__osgi@{scl_suffix}_provides %{?scl:@{javadir}-utils/scl-enable %{?scl_maven} %{scl} -- }%{_rpmconfigdir}/osgi@{scl_suffix}.prov
+%__osgi@{scl_suffix}_provides_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))} %{?scl:--scl %{?scl}} %{?module_prefix:--scl %{_module_name}-%{_module_stream}}
+%__osgi@{scl_suffix}_requires %{!?module_prefix:%{_rpmconfigdir}/osgi@{scl_suffix}.req}%{?module_prefix:true}
+%__osgi@{scl_suffix}_requires_opts --cachedir %{_builddir}/%{?buildsubdir} --rpm-pid %{lua:print(math.floor(posix.getprocessid("pid")))}
+%__osgi@{scl_suffix}_path ^(.*\\.jar|((%{_prefix}/lib(64)?|%{_datadir})/.*/META-INF/MANIFEST.MF))$
--
2.21.0

29
SOURCES/module-config.xml Normal file
View File

@ -0,0 +1,29 @@
<configuration>
<resolverSettings>
<ignoreDuplicateMetadata>false</ignoreDuplicateMetadata>
</resolverSettings>
<artifactManagement>
<rule>
<artifactGlob>
<artifactId>{*}</artifactId>
</artifactGlob>
<files>
<file>@{mns}/@1</file>
</files>
</rule>
</artifactManagement>
<repositories>
<repository>
<id>install-@{mns}</id>
<type>compound</type>
<properties>
<namespace>@{mns}</namespace>
</properties>
<configuration>
<repositories>
<repository>base-install</repository>
</repositories>
</configuration>
</repository>
</repositories>
</configuration>

View File

@ -0,0 +1,11 @@
<toolchains>
<toolchain>
<type>jdk</type>
<provides>
<xmvn>xmvn</xmvn>
</provides>
<configuration>
<jdkHome>/usr/lib/jvm/java-1.8.0-openjdk</jdkHome>
</configuration>
</toolchain>
</toolchains>

View File

@ -6,50 +6,45 @@
# https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation # https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation
%global _python_bytecompile_extra 0 %global _python_bytecompile_extra 0
%bcond_without asciidoc
%bcond_without gradle
%bcond_without tests
%bcond_with xmvn_javadoc
%if 0%{?fedora} || 0%{?rhel} > 7 %if 0%{?fedora} || 0%{?rhel} > 7
%global python_prefix python3 %global python_prefix python3
%global python_interpreter %{__python3} %global python_interpreter %{?__python3}%{!?__python3:dummy}
%global python_sitelib %{python3_sitelib}
%else %else
%global python_prefix python %global python_prefix python
%global python_interpreter %{__python2} %global python_interpreter %{?__python2}%{!?__python2:dummy}
%global python_sitelib %{_prefix}/lib/python2.7/site-packages
%global rpmmacrodir /etc/rpm %global rpmmacrodir /etc/rpm
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e /python-bytecompile/d)
%endif %endif
%global default_jdk %{?_root_prefix}%{!?_root_prefix:%{_prefix}}/lib/jvm/java-1.8.0-openjdk %global default_jdk %{?_root_prefix}%{!?_root_prefix:%{_prefix}}/lib/jvm/java-11-openjdk
%global default_jre %{?_root_prefix}%{!?_root_prefix:%{_prefix}}/lib/jvm/jre-1.8.0-openjdk %global default_jre %{?_root_prefix}%{!?_root_prefix:%{_prefix}}/lib/jvm/jre-11-openjdk
Name: javapackages-tools Name: javapackages-tools
Version: 5.3.0 Version: 5.3.1
Release: 2%{?dist} Release: 7%{?dist}
Summary: Macros and scripts for Java packaging support Summary: Macros and scripts for Java packaging support
License: BSD License: BSD
URL: https://github.com/fedora-java/javapackages URL: https://github.com/fedora-java/javapackages
Source0: https://github.com/fedora-java/javapackages/archive/%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
Source0: https://github.com/fedora-java/javapackages/archive/%{version}.tar.gz
Source1: module-config.xml
Source2: toolchains-openjdk8.xml
Patch1: 0001-Move-python-modules-under-java-utils-directory.patch
Patch2: 0002-Enable-namespaced-dependency-generation.patch
Patch3: 0003-Fix-use-of-illegal-characters-in-rpmfc-generator-nam.patch
BuildRequires: coreutils BuildRequires: coreutils
BuildRequires: which BuildRequires: which
BuildRequires: make BuildRequires: make
%if %{with asciidoc}
BuildRequires: asciidoc
BuildRequires: xmlto
%endif
BuildRequires: %{python_prefix}-devel BuildRequires: %{python_prefix}-devel
BuildRequires: %{python_prefix}-lxml BuildRequires: %{python_prefix}-lxml
BuildRequires: %{python_prefix}-setuptools BuildRequires: %{python_prefix}-setuptools
%if !0%{?_module_build}
# XXX python-nose is not part of any module yet, but it should get
# modularized one day, right? mizdebsk, Sep 2017
BuildRequires: %{python_prefix}-nose BuildRequires: %{python_prefix}-nose
%endif
BuildRequires: %{python_prefix}-six BuildRequires: %{python_prefix}-six
Requires: javapackages-filesystem = %{version}-%{release} Requires: javapackages-filesystem = %{version}-%{release}
@ -57,20 +52,21 @@ Requires: coreutils
Requires: findutils Requires: findutils
Requires: which Requires: which
# default JRE # default JRE
Requires: java-1.8.0-openjdk-headless Requires: java-11-openjdk-headless
Provides: jpackage-utils = %{version}-%{release} Provides: jpackage-utils = %{version}-%{release}
# These could be generated automatically, but then we would need to # These could be generated automatically, but then we would need to
# depend on javapackages-local for dependency generator. # depend on javapackages-local for dependency generator.
Provides: mvn(com.sun:tools) = SYSTEM Provides: mvn(com.sun:tools) = SYSTEM
Provides: mvn(sun.jdk:jconsole) = SYSTEM Provides: mvn(sun.jdk:jconsole) = SYSTEM
# XXX temp provide
Provides: java-headless = 1:11
%description %description
This package provides macros and scripts to support Java packaging. This package provides macros and scripts to support Java packaging.
%package -n javapackages-filesystem %package -n javapackages-filesystem
Summary: Java packages filesystem layout Summary: Java packages filesystem layout
Obsoletes: eclipse-filesystem < 2
Provides: eclipse-filesystem = %{version}-%{release} Provides: eclipse-filesystem = %{version}-%{release}
%description -n javapackages-filesystem %description -n javapackages-filesystem
@ -88,33 +84,12 @@ Requires: xmvn-connector-aether
# sense to explicitly require them in every package built with Maven. # sense to explicitly require them in every package built with Maven.
Requires: mvn(org.apache.maven.plugins:maven-compiler-plugin) Requires: mvn(org.apache.maven.plugins:maven-compiler-plugin)
Requires: mvn(org.apache.maven.plugins:maven-jar-plugin) Requires: mvn(org.apache.maven.plugins:maven-jar-plugin)
%if %{without xmvn_javadoc}
Requires: mvn(org.apache.maven.plugins:maven-javadoc-plugin)
%endif
Requires: mvn(org.apache.maven.plugins:maven-resources-plugin) Requires: mvn(org.apache.maven.plugins:maven-resources-plugin)
Requires: mvn(org.apache.maven.plugins:maven-surefire-plugin) Requires: mvn(org.apache.maven.plugins:maven-surefire-plugin)
# Tests based on JUnit are very common and JUnit itself is small.
# Include JUnit and JUnit provider for Surefire just for convenience.
Requires: mvn(junit:junit)
Requires: mvn(org.apache.maven.surefire:surefire-junit4)
# testng is quite common as well
Requires: mvn(org.apache.maven.surefire:surefire-testng)
%description -n maven-local %description -n maven-local
This package provides macros and scripts to support packaging Maven artifacts. This package provides macros and scripts to support packaging Maven artifacts.
%if %{with gradle}
%package -n gradle-local
Summary: Local mode for Gradle
Requires: %{name} = %{version}-%{release}
Requires: javapackages-local = %{version}-%{release}
Requires: gradle >= 2.2.1-2
Requires: xmvn-connector-gradle
%description -n gradle-local
This package implements local mode for Gradle, which allows artifact
resolution using XMvn resolver.
%endif
%package -n ivy-local %package -n ivy-local
Summary: Local mode for Apache Ivy Summary: Local mode for Apache Ivy
@ -127,16 +102,6 @@ Requires: xmvn-connector-ivy
This package implements local mode for Apache Ivy, which allows This package implements local mode for Apache Ivy, which allows
artifact resolution using XMvn resolver. artifact resolution using XMvn resolver.
%package -n %{python_prefix}-javapackages
Summary: Module for handling various files for Java packaging
Requires: %{python_prefix}-lxml
Requires: %{python_prefix}-six
Obsoletes: python-javapackages < %{version}-%{release}
%description -n %{python_prefix}-javapackages
Module for handling, querying and manipulating of various files for Java
packaging in Linux distributions
%package -n javapackages-local %package -n javapackages-local
Summary: Non-essential macros and scripts for Java packaging support Summary: Non-essential macros and scripts for Java packaging support
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -144,20 +109,40 @@ Requires: xmvn-install
Requires: xmvn-subst Requires: xmvn-subst
Requires: xmvn-resolve Requires: xmvn-resolve
# Java build systems don't have hard requirement on java-devel, so it should be there # Java build systems don't have hard requirement on java-devel, so it should be there
Requires: java-1.8.0-openjdk-devel Requires: java-11-openjdk-devel
Requires: %{python_prefix}-javapackages = %{version}-%{release}
Requires: %{python_interpreter} Requires: %{python_interpreter}
Requires: %{python_prefix}-lxml
Requires: %{python_prefix}-six
Obsoletes: %{python_prefix}-javapackages < %{version}-%{release}
Obsoletes: python-javapackages < %{version}-%{release}
# XXX temp provide
Provides: java-devel = 1:11
%description -n javapackages-local %description -n javapackages-local
This package provides non-essential macros and scripts to support Java packaging. This package provides non-essential macros and scripts to support Java packaging.
%package -n javapackages-config-maven-3.6
Summary: Configuration files for building maven-3.6 module
%description -n javapackages-config-maven-3.6
This package provides configuration files for building maven-3.6 module.
%package -n maven-local-openjdk8
Summary: OpenJDK 8 toolchain for XMvn
Requires: maven-local
Requires: java-1.8.0-openjdk-devel
%description -n maven-local-openjdk8
OpenJDK 8 toolchain for XMvn
%prep %prep
%setup -q -n javapackages-%{version} %setup -q -n javapackages-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%if %{without asciidoc}
sed -i '/^manpage /d' build sed -i '/^manpage /d' build
sed -i '/${mandir}/d' install sed -i '/${mandir}/d' install
%endif
%build %build
%configure --pyinterpreter=%{python_interpreter} \ %configure --pyinterpreter=%{python_interpreter} \
@ -168,42 +153,85 @@ sed -i '/${mandir}/d' install
%install %install
./install ./install
%if %{with xmvn_javadoc} rm -rf %{buildroot}%{python_sitelib}/javapackages-*.egg-info
find %{buildroot}%{python_sitelib}/javapackages -name __pycache__ | xargs rm -rf
mv %{buildroot}%{python_sitelib}/javapackages %{buildroot}%{_javadir}-utils/
find %{buildroot}%{_javadir}-utils/ -name \*.pyc | xargs rm -f
find %{buildroot}%{_javadir}-utils/ -name \*.pyo | xargs rm -f
sed -i 's|mvn_build.py|& --xmvn-javadoc|' $(find %{buildroot} -name 'macros*.fjava') sed -i 's|mvn_build.py|& --xmvn-javadoc|' $(find %{buildroot} -name 'macros*.fjava')
%endif
sed -e 's/.[17]$/&*/' -i files-* sed -e 's/.[17]$/&*/' -i files-*
%if %{without gradle} mkdir -p %{buildroot}%{_datadir}/xmvn/config.d/
%if 0%{?_module_build}
sed s/@{mns}/maven-3.6/g %{SOURCE1} >%{buildroot}%{_datadir}/xmvn/config.d/module-maven-3.6.xml
%endif
rm -rf %{buildroot}%{_bindir}/gradle-local rm -rf %{buildroot}%{_bindir}/gradle-local
rm -rf %{buildroot}%{_datadir}/gradle-local rm -rf %{buildroot}%{_datadir}/gradle-local
rm -rf %{buildroot}%{_mandir}/man7/gradle_build.7 rm -rf %{buildroot}%{_mandir}/man7/gradle_build.7
%endif
%if %{with tests} mkdir -p %{buildroot}%{_datadir}/xmvn/conf/
%if !0%{?_module_build} cp -p %{SOURCE2} %{buildroot}%{_datadir}/xmvn/conf/toolchains.xml
%check %check
./check ./check
%endif
%endif
%files -f files-tools %files -f files-tools
%files -n javapackages-filesystem -f files-filesystem %files -n javapackages-filesystem -f files-filesystem
%files -n javapackages-local -f files-local %files -n javapackages-local -f files-local
%{_javadir}-utils/javapackages/
%license LICENSE
%files -n maven-local %files -n maven-local
%if %{with gradle}
%files -n gradle-local -f files-gradle
%endif
%files -n ivy-local -f files-ivy %files -n ivy-local -f files-ivy
%files -n %{python_prefix}-javapackages -f files-python %files -n javapackages-config-maven-3.6
%license LICENSE %{_datadir}/xmvn/config.d
%files -n maven-local-openjdk8
%{_datadir}/xmvn/conf
%changelog %changelog
* Thu Jan 23 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.1-7
- Add OpenJDK 8 toolchain configuration
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.1-6
- Mass rebuild for javapackages-tools 201902
* Fri Oct 25 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.1-5
- Switch to OpenJDK 11 as default JDK
* Fri Jun 28 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.1-4
- Enable namespaced dependency generation
* Fri Jun 28 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.1-3
- Don't ignore duplicate metadata in namespaced modules
* Fri Jun 28 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.1-2
- Introduce javapackages-config-maven-3.6
* Fri Jun 14 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.1-1
- Update to upstream version 5.3.1
* Mon Jun 10 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.0-7
- Define maven-3.6 install repository
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.0-6
- Mass rebuild for javapackages-tools 201901
* Thu Apr 25 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.0-5
- Move python modules under java-utils directory
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Nov 20 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.0-3
- Make it possible to build SRPM without python-devel installed
* Thu Oct 4 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.0-2 * Thu Oct 4 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 5.3.0-2
- Make javapackages-local require Python interpreter executable path - Make javapackages-local require Python interpreter executable path

View File

@ -1 +0,0 @@
SHA512 (5.3.0.tar.gz) = 41b5398cd276cf10c1e3ce1a8283ab9ef19df8a2ad19db20553ff31e31d26af9f14bb566574a3ee534a9af2cf1f1626086bf551b4bc6ed12bc0082c46b6b7e98