From 0ef5e5655aa6ab16034885b6f6f067ca86d45cacdb24b7de7444d0ec24c1dbf7 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 25 May 2021 06:57:18 +0000 Subject: [PATCH 1/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=88 --- javapackages-tools.changes | 8 ++++++++ javapackages-tools.spec | 9 ++++++--- sorted-aliases.patch | 11 +++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 sorted-aliases.patch diff --git a/javapackages-tools.changes b/javapackages-tools.changes index 6bfd391..059cb2c 100644 --- a/javapackages-tools.changes +++ b/javapackages-tools.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue May 25 06:55:37 UTC 2021 - Fridrich Strba + +- Added patch: + * sorted-aliases.patch + + Always output aliases in alphabetical order in order to + have reproducible builds (bsc#1110028) + ------------------------------------------------------------------- Thu Mar 25 16:27:58 UTC 2021 - Ben Greiner diff --git a/javapackages-tools.spec b/javapackages-tools.spec index 76e3a50..40fb53d 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -1,7 +1,7 @@ # -# spec file for package javapackages-tools +# spec file # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -45,6 +45,8 @@ Patch1: python-optional.patch #PATCH-FIX-SUSE: SUSE did not bump epoch of openjdk packages, whereas Fedora did # Avoid generating unresolvable requires Patch2: suse-no-epoch.patch +#PATCH-FIX-SUSE: Sort the aliases to avoid unnecessary difference between packages +Patch3: sorted-aliases.patch BuildRequires: asciidoc BuildRequires: fdupes BuildRequires: perl @@ -101,7 +103,6 @@ Requires: javapackages-tools = %{version} This package contains files needed by local mode for Gradle, which allows artifact resolution using XMvn resolver. - %package -n javapackages-ivy Summary: Local mode for Apache Ivy (files) Group: Development/Languages/Java @@ -124,6 +125,7 @@ Module for handling, querying and manipulating of various files for Java packaging in Linux distributions %else + %package -n python3-javapackages Summary: Module for handling various files for Java packaging Group: Development/Languages/Java @@ -241,6 +243,7 @@ popd %files -n javapackages-filesystem -f files-filesystem %else + %files -n javapackages-local -f files-local %dir %{_datadir}/java-utils diff --git a/sorted-aliases.patch b/sorted-aliases.patch new file mode 100644 index 0000000..111461a --- /dev/null +++ b/sorted-aliases.patch @@ -0,0 +1,11 @@ +--- javapackages-5.3.1/java-utils/maven_depmap.py 2019-06-14 12:26:27.000000000 +0200 ++++ javapackages-5.3.1/java-utils/maven_depmap.py 2021-05-25 07:21:15.947065331 +0200 +@@ -180,7 +180,7 @@ + + aliases = additions.split(',') + result = list() +- for a in aliases: ++ for a in sorted(aliases): + alias = MetadataAlias.from_mvn_str(a) + alias.extension = artifact.extension + result.append(alias) From d68afaf5e1b3d417ce742ee215fb91eb9a81f4aa3a62cc5b65fb5bfc79f72ca5 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Wed, 26 May 2021 18:31:31 +0000 Subject: [PATCH 2/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=89 --- javapackages-tools.changes | 8 ------- javapackages-tools.spec | 44 ++++++++++++++++++-------------------- sorted-aliases.patch | 11 ---------- 3 files changed, 21 insertions(+), 42 deletions(-) delete mode 100644 sorted-aliases.patch diff --git a/javapackages-tools.changes b/javapackages-tools.changes index 059cb2c..6bfd391 100644 --- a/javapackages-tools.changes +++ b/javapackages-tools.changes @@ -1,11 +1,3 @@ -------------------------------------------------------------------- -Tue May 25 06:55:37 UTC 2021 - Fridrich Strba - -- Added patch: - * sorted-aliases.patch - + Always output aliases in alphabetical order in order to - have reproducible builds (bsc#1110028) - ------------------------------------------------------------------- Thu Mar 25 16:27:58 UTC 2021 - Ben Greiner diff --git a/javapackages-tools.spec b/javapackages-tools.spec index 40fb53d..d8b4b3f 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -30,6 +30,25 @@ Name: javapackages-tools-%{flavor} %else Name: javapackages-tools %endif +%if %{with python} +%if 0%{?suse_version} >= 1550 +# TW: generate subpackages for every python3 flavor +%define python_subpackage_only 1 +%else +%python_subpackages +%define python_sitelib %{python3_sitelib} +%define python_files() -n python3-%{**} +%endif +BuildRequires: %{python_module lxml} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six} +BuildRequires: python-rpm-macros +BuildArch: noarch +%else +Provides: mvn(com.sun:tools) = SYSTEM +Provides: mvn(sun.jdk:jconsole) = SYSTEM +%endif Version: 5.3.1 Release: 0 Summary: Macros and scripts for Java packaging support @@ -45,40 +64,19 @@ Patch1: python-optional.patch #PATCH-FIX-SUSE: SUSE did not bump epoch of openjdk packages, whereas Fedora did # Avoid generating unresolvable requires Patch2: suse-no-epoch.patch -#PATCH-FIX-SUSE: Sort the aliases to avoid unnecessary difference between packages -Patch3: sorted-aliases.patch BuildRequires: asciidoc BuildRequires: fdupes BuildRequires: perl BuildRequires: rpm BuildRequires: xmlto -%if %{with python} -BuildRequires: javapackages-filesystem -%else -Requires: javapackages-filesystem = %{version}-%{release} -%endif # Used on too many places Provides: jpackage-utils = %{version} Obsoletes: %{name}-doc Obsoletes: jpackage-utils < %{version} %if %{with python} -BuildRequires: %{python_module lxml} -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six} -BuildRequires: python-rpm-macros -BuildArch: noarch -%if 0%{?suse_version} >= 1550 -# TW: generate subpackages for every python3 flavor -%define python_subpackage_only 1 -%python_subpackages +BuildRequires: javapackages-filesystem %else -%define python_sitelib %python3_sitelib -%define python_files() -n python3-%{**} -%endif -%else -Provides: mvn(com.sun:tools) = SYSTEM -Provides: mvn(sun.jdk:jconsole) = SYSTEM +Requires: javapackages-filesystem = %{version}-%{release} %endif %description diff --git a/sorted-aliases.patch b/sorted-aliases.patch deleted file mode 100644 index 111461a..0000000 --- a/sorted-aliases.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- javapackages-5.3.1/java-utils/maven_depmap.py 2019-06-14 12:26:27.000000000 +0200 -+++ javapackages-5.3.1/java-utils/maven_depmap.py 2021-05-25 07:21:15.947065331 +0200 -@@ -180,7 +180,7 @@ - - aliases = additions.split(',') - result = list() -- for a in aliases: -+ for a in sorted(aliases): - alias = MetadataAlias.from_mvn_str(a) - alias.extension = artifact.extension - result.append(alias) From e80d1cd5176d77864b94b3e6a250bb0508871f9fe1056460103deee089ea3127 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 31 May 2021 12:06:45 +0000 Subject: [PATCH 3/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=90 --- javapackages-tools.spec | 49 ++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/javapackages-tools.spec b/javapackages-tools.spec index d8b4b3f..76e3a50 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -1,7 +1,7 @@ # -# spec file +# spec file for package javapackages-tools # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -30,25 +30,6 @@ Name: javapackages-tools-%{flavor} %else Name: javapackages-tools %endif -%if %{with python} -%if 0%{?suse_version} >= 1550 -# TW: generate subpackages for every python3 flavor -%define python_subpackage_only 1 -%else -%python_subpackages -%define python_sitelib %{python3_sitelib} -%define python_files() -n python3-%{**} -%endif -BuildRequires: %{python_module lxml} -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six} -BuildRequires: python-rpm-macros -BuildArch: noarch -%else -Provides: mvn(com.sun:tools) = SYSTEM -Provides: mvn(sun.jdk:jconsole) = SYSTEM -%endif Version: 5.3.1 Release: 0 Summary: Macros and scripts for Java packaging support @@ -69,14 +50,33 @@ BuildRequires: fdupes BuildRequires: perl BuildRequires: rpm BuildRequires: xmlto +%if %{with python} +BuildRequires: javapackages-filesystem +%else +Requires: javapackages-filesystem = %{version}-%{release} +%endif # Used on too many places Provides: jpackage-utils = %{version} Obsoletes: %{name}-doc Obsoletes: jpackage-utils < %{version} %if %{with python} -BuildRequires: javapackages-filesystem +BuildRequires: %{python_module lxml} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six} +BuildRequires: python-rpm-macros +BuildArch: noarch +%if 0%{?suse_version} >= 1550 +# TW: generate subpackages for every python3 flavor +%define python_subpackage_only 1 +%python_subpackages %else -Requires: javapackages-filesystem = %{version}-%{release} +%define python_sitelib %python3_sitelib +%define python_files() -n python3-%{**} +%endif +%else +Provides: mvn(com.sun:tools) = SYSTEM +Provides: mvn(sun.jdk:jconsole) = SYSTEM %endif %description @@ -101,6 +101,7 @@ Requires: javapackages-tools = %{version} This package contains files needed by local mode for Gradle, which allows artifact resolution using XMvn resolver. + %package -n javapackages-ivy Summary: Local mode for Apache Ivy (files) Group: Development/Languages/Java @@ -123,7 +124,6 @@ Module for handling, querying and manipulating of various files for Java packaging in Linux distributions %else - %package -n python3-javapackages Summary: Module for handling various files for Java packaging Group: Development/Languages/Java @@ -241,7 +241,6 @@ popd %files -n javapackages-filesystem -f files-filesystem %else - %files -n javapackages-local -f files-local %dir %{_datadir}/java-utils From 276cef97c510a50b794216f7906f1e0f606bbec54bff6d281e20642c4593db8d Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 26 Jul 2021 16:42:20 +0000 Subject: [PATCH 4/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=91 --- javapackages-tools.spec | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/javapackages-tools.spec b/javapackages-tools.spec index 76e3a50..be6ba0f 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -1,7 +1,7 @@ # -# spec file for package javapackages-tools +# spec file # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -78,6 +78,9 @@ BuildArch: noarch Provides: mvn(com.sun:tools) = SYSTEM Provides: mvn(sun.jdk:jconsole) = SYSTEM %endif +%if ! 0%{?suse_version} +BuildArch: noarch +%endif %description This package provides macros and scripts to support Java packaging. @@ -101,7 +104,6 @@ Requires: javapackages-tools = %{version} This package contains files needed by local mode for Gradle, which allows artifact resolution using XMvn resolver. - %package -n javapackages-ivy Summary: Local mode for Apache Ivy (files) Group: Development/Languages/Java @@ -124,6 +126,7 @@ Module for handling, querying and manipulating of various files for Java packaging in Linux distributions %else + %package -n python3-javapackages Summary: Module for handling various files for Java packaging Group: Development/Languages/Java @@ -150,7 +153,13 @@ This package provides non-essential macros and scripts to support Java packaging %prep %setup -q -n javapackages-%{version} -%autopatch -p1 +%if 0%{?suse_version} +%patch0 -p1 +%endif +%patch1 -p1 +%if 0%{?suse_version} +%patch2 -p1 +%endif # The usr/lib is hardcoded in configuration files too new_dir=$(echo %{_libdir} | sed 's#/##') @@ -241,6 +250,7 @@ popd %files -n javapackages-filesystem -f files-filesystem %else + %files -n javapackages-local -f files-local %dir %{_datadir}/java-utils From a8f08fa3e2718da81878da75dad5cefc8bba51d32069acc22cb35e610cb5d6c4 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Mon, 26 Jul 2021 17:11:18 +0000 Subject: [PATCH 5/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=92 --- javapackages-tools.changes | 5 +++++ javapackages-tools.spec | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/javapackages-tools.changes b/javapackages-tools.changes index 6bfd391..bd898cc 100644 --- a/javapackages-tools.changes +++ b/javapackages-tools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jul 26 16:43:02 UTC 2021 - Fridrich Strba + +- Don't use SUSE patches when not building on any of SUSE platforms + ------------------------------------------------------------------- Thu Mar 25 16:27:58 UTC 2021 - Ben Greiner diff --git a/javapackages-tools.spec b/javapackages-tools.spec index be6ba0f..be4cfe3 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -65,7 +65,6 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: python-rpm-macros -BuildArch: noarch %if 0%{?suse_version} >= 1550 # TW: generate subpackages for every python3 flavor %define python_subpackage_only 1 @@ -78,7 +77,7 @@ BuildArch: noarch Provides: mvn(com.sun:tools) = SYSTEM Provides: mvn(sun.jdk:jconsole) = SYSTEM %endif -%if ! 0%{?suse_version} +%if ! 0%{?suse_version} || %{with python} BuildArch: noarch %endif From 658c4d5f7a578964b3fae965d23d3dca1bd787e6f8811b9632e89ba3d6a1bf19 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 27 Jul 2021 06:13:54 +0000 Subject: [PATCH 6/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=93 --- javapackages-tools.changes | 5 ----- javapackages-tools.spec | 12 ++---------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/javapackages-tools.changes b/javapackages-tools.changes index bd898cc..6bfd391 100644 --- a/javapackages-tools.changes +++ b/javapackages-tools.changes @@ -1,8 +1,3 @@ -------------------------------------------------------------------- -Mon Jul 26 16:43:02 UTC 2021 - Fridrich Strba - -- Don't use SUSE patches when not building on any of SUSE platforms - ------------------------------------------------------------------- Thu Mar 25 16:27:58 UTC 2021 - Ben Greiner diff --git a/javapackages-tools.spec b/javapackages-tools.spec index be4cfe3..787569e 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -65,6 +65,7 @@ BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: python-rpm-macros +BuildArch: noarch %if 0%{?suse_version} >= 1550 # TW: generate subpackages for every python3 flavor %define python_subpackage_only 1 @@ -77,9 +78,6 @@ BuildRequires: python-rpm-macros Provides: mvn(com.sun:tools) = SYSTEM Provides: mvn(sun.jdk:jconsole) = SYSTEM %endif -%if ! 0%{?suse_version} || %{with python} -BuildArch: noarch -%endif %description This package provides macros and scripts to support Java packaging. @@ -152,13 +150,7 @@ This package provides non-essential macros and scripts to support Java packaging %prep %setup -q -n javapackages-%{version} -%if 0%{?suse_version} -%patch0 -p1 -%endif -%patch1 -p1 -%if 0%{?suse_version} -%patch2 -p1 -%endif +%autopatch -p1 # The usr/lib is hardcoded in configuration files too new_dir=$(echo %{_libdir} | sed 's#/##') From 4df04af0cb16566cf9c7c70157f543cc169a87699fa6fb6ed2f0c74227743f22 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Tue, 27 Jul 2021 13:40:16 +0000 Subject: [PATCH 7/7] OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=94 --- _service | 14 -------------- javapackages-tools.changes | 5 +++++ javapackages-tools.spec | 4 ++++ 3 files changed, 9 insertions(+), 14 deletions(-) delete mode 100644 _service diff --git a/_service b/_service deleted file mode 100644 index 897ebef..0000000 --- a/_service +++ /dev/null @@ -1,14 +0,0 @@ - - - https://github.com/fedora-java/javapackages.git - git - enable - javapackages - 5.2.0+git%cd.%h - - - *.tar - xz - - - diff --git a/javapackages-tools.changes b/javapackages-tools.changes index 6bfd391..ddf943a 100644 --- a/javapackages-tools.changes +++ b/javapackages-tools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 27 13:39:39 UTC 2021 - Fridrich Strba + +- Do not run tests on SLE12, since python3-test is not accessible + ------------------------------------------------------------------- Thu Mar 25 16:27:58 UTC 2021 - Ben Greiner diff --git a/javapackages-tools.spec b/javapackages-tools.spec index 787569e..65ce216 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -61,7 +61,9 @@ Obsoletes: %{name}-doc Obsoletes: jpackage-utils < %{version} %if %{with python} BuildRequires: %{python_module lxml} +%if 0%{?suse_version} > 1320 BuildRequires: %{python_module pytest} +%endif BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: python-rpm-macros @@ -216,6 +218,7 @@ rm -rf %{buildroot}%{_datadir}/fedora-review/ %fdupes %{buildroot}/%{_prefix} +%if 0%{?suse_version} > 1320 %check # reference: ./check, but we don't want to check coverage and don't need old nose ( @@ -233,6 +236,7 @@ pushd ./test %pytest popd %endif +%endif %if !%{with python} %files -f files-tools