From 1bb31d518d432b4af31a9361458a597c736bc0139bb803b7e0c5ccdc6c102ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 18 May 2017 20:41:28 +0000 Subject: [PATCH] - Split to python and non-python edition for smaller depgraph - Add patch python-optional.patch - Split to python and non-python edition for smaller depgraph - Add patch python-optional.patch - Update to version 4.7.0+git20170331.ef4057e7: * Reimplement abs2rel in Python * Don't expand {scl} in macro definitions * Install expanded rpmfc attr files * [spec] Avoid file conflicts between in SCL * Fix macros.d directory ownership * Make %ant macro enable SCL when needed * [spec] Fix file conflicts between SCL and non-SCL packages * Fix ownership of ivyxmldir * [test] Force locale for python processes * Don't include timestamp in generated pom.properties - Remove patch merged by upstream: * create_valid_xml_comments.patch - Remove patch suse-macros-install-location.patch * We switch to /usr/lib/ location for macros - Try to reduce some dependencies bsc#1036025 - Refresh patch suse-use-libdir.patch - Add create_valid_xml_comments.patch python-lxml 3.5.0 introduces validation for xml comments, and one of the comments created in this package were not valid. This patch fixes the problem. It backported from upstream and should be in the next release. https://github.com/mizdebsk/javapackages/commit/84211c0ee761e93ee507f5d37e9fc80ec377e89d OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=35 --- javapackages-tools-extras.changes | 169 ++++++++++++++++++++++++++ javapackages-tools-extras.spec | 193 ++++++++++++++++++++++++++++++ javapackages-tools.changes | 6 + javapackages-tools.spec | 68 +++++++++-- pre_checkin.sh | 13 ++ python-optional.patch | 35 ++++++ 6 files changed, 474 insertions(+), 10 deletions(-) create mode 100644 javapackages-tools-extras.changes create mode 100644 javapackages-tools-extras.spec create mode 100644 pre_checkin.sh create mode 100644 python-optional.patch diff --git a/javapackages-tools-extras.changes b/javapackages-tools-extras.changes new file mode 100644 index 0000000..4d48c2a --- /dev/null +++ b/javapackages-tools-extras.changes @@ -0,0 +1,169 @@ +------------------------------------------------------------------- +Thu May 18 20:11:39 UTC 2017 - tchvatal@suse.com + +- Split to python and non-python edition for smaller depgraph +- Add patch python-optional.patch + +------------------------------------------------------------------- +Thu May 18 19:40:26 UTC 2017 - tchvatal@suse.com + +- Update to version 4.7.0+git20170331.ef4057e7: + * Reimplement abs2rel in Python + * Don't expand {scl} in macro definitions + * Install expanded rpmfc attr files + * [spec] Avoid file conflicts between in SCL + * Fix macros.d directory ownership + * Make %ant macro enable SCL when needed + * [spec] Fix file conflicts between SCL and non-SCL packages + * Fix ownership of ivyxmldir + * [test] Force locale for python processes + * Don't include timestamp in generated pom.properties +- Remove patch merged by upstream: + * create_valid_xml_comments.patch +- Remove patch suse-macros-install-location.patch + * We switch to /usr/lib/ location for macros +- Try to reduce some dependencies bsc#1036025 +- Refresh patch suse-use-libdir.patch + +------------------------------------------------------------------- +Fri Feb 12 15:21:42 UTC 2016 - toddrme2178@gmail.com + +- Add create_valid_xml_comments.patch + python-lxml 3.5.0 introduces validation for xml comments, and + one of the comments created in this package were not valid. + This patch fixes the problem. It backported from upstream and + should be in the next release. + https://github.com/mizdebsk/javapackages/commit/84211c0ee761e93ee507f5d37e9fc80ec377e89d + +------------------------------------------------------------------- +Mon Feb 8 20:23:42 UTC 2016 - tchvatal@suse.com + +- Version update to 4.6.0: + * various bugfixes for maven tooling + * introduction to gradle-local package for gradle packaging + +------------------------------------------------------------------- +Wed Apr 1 08:40:57 UTC 2015 - tchvatal@suse.com + +- Drop dependency over source-highlight as it causes build cycle + +------------------------------------------------------------------- +Tue Mar 31 10:28:12 UTC 2015 - tchvatal@suse.com + +- Try to break buildcycle detected on Factory + +------------------------------------------------------------------- +Wed Mar 18 10:44:29 UTC 2015 - tchvatal@suse.com + +- Fix build on SLE11 + +------------------------------------------------------------------- +Tue Mar 17 14:39:51 UTC 2015 - tchvatal@suse.com + +- Use python-devel instead of pkgconfig to build on sle11 + +------------------------------------------------------------------- +Tue Mar 17 14:02:21 UTC 2015 - tchvatal@suse.com + +- Add python-javapackages as requirement for main package + +------------------------------------------------------------------- +Tue Mar 17 13:35:17 UTC 2015 - tchvatal@suse.com + +- Update requires on python packages to properly have all the needed + dependencies on runtime + +------------------------------------------------------------------- +Tue Mar 17 09:34:37 UTC 2015 - tchvatal@suse.com + +- Install macros to /etc/rpm as we do in SUSE: + * suse-macros-install-location.patch +- Cleanup with spec-cleaner + +------------------------------------------------------------------- +Fri Jan 23 20:59:04 UTC 2015 - mailaender@opensuse.org + +- Drop patches + * depgen.patch + * javapackages-2.0.1-fix-bashisms.patch + * javapackages-2.0.1-java9.patch + * maven_depmap-no-attribute-exit.patch +- Remove hacky workarounds +- Fix rpmlint errors +- Enable maven-local +- Avoid unsatisfiable dependencies +- Enable unit tests +- Update to version 4.4.0 + +------------------------------------------------------------------- +Mon Dec 8 13:02:05 UTC 2014 - fstrba@suse.com + +- Added patch: + * javapackages-2.0.1-java9.patch: create directories for java, + so that ant build works +- Add virtual provide jpackage-utils-java9 to be able to + distinguish the presence of java9 compatibility + +------------------------------------------------------------------- +Thu Oct 16 11:12:00 UTC 2014 - Led + +- fix bashisms +- Added patches: + * javapackages-2.0.1-fix-bashisms.patch + +------------------------------------------------------------------- +Mon Mar 10 13:52:26 UTC 2014 - darin@darins.net + +- maven_depmap-no-attribute-exit.patch: SLES patch for ZipFile + having no attribute '__exit__' which was causing ecj build + failures + +------------------------------------------------------------------- +Thu Mar 6 13:54:16 UTC 2014 - darin@darins.net + +- set correct libxslt package when building for SLES + +------------------------------------------------------------------- +Fri Nov 8 17:06:25 UTC 2013 - aj@ajaissle.de + +- BuildRequires xz +- Remove '/etc/java' and '/usr/share/java' from file list (both owned by system) +- Url changed + +------------------------------------------------------------------- +Wed Sep 11 15:50:05 UTC 2013 - schwab@suse.de + +- depgen.patch: drain stdin in dependency generator + +------------------------------------------------------------------- +Wed Aug 21 07:56:17 UTC 2013 - mvyskocil@suse.com + +- update to 2.0.1 + * Fix creation of artifact aliases, resolves: rhbz#988462 +- Update to upstream version 2.0.0 + * Merge functionality of jpackage-utils + * Provide and obsolete jpackage-utils + * %%add_maven_depmap macro now injects pom.properties to every JAR + * %%add_to_maven_depmap and %%update_maven_depmap macros were removed + * maven2jpp-mapdeps.xsl template has been removed + * Macros related to installation of icons and desktop files were removed + * 14 new manual pages were added + * Documentation specific to JPackage was removed + * Add BuildRequires: asciidoc, xmlto + * Add lua to Requires + * Add python-xml to Requires for xml.dom.minidom + +------------------------------------------------------------------- +Fri Jul 12 09:35:17 UTC 2013 - mvyskocil@suse.com + +- make maven-local package build optional to not add unsatisfied + dependencies to Factory + +------------------------------------------------------------------- +Tue Jul 2 14:06:39 UTC 2013 - mvyskocil@suse.com + +- Create javapackages-tools 0.15.0 from fc20 + * Added depmap for tools.jar + * Added support for versioned autorequires + * New plugin metadata from Maven Central + * move to independent package from jpackage-utils diff --git a/javapackages-tools-extras.spec b/javapackages-tools-extras.spec new file mode 100644 index 0000000..2097dc8 --- /dev/null +++ b/javapackages-tools-extras.spec @@ -0,0 +1,193 @@ +# +# spec file for package javapackages-tools-extras +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%bcond_without python +Name: javapackages-tools-extras +Version: 4.7.0+git20170331.ef4057e7 +Release: 0 +Summary: Macros and scripts for Java packaging support +License: BSD-3-Clause +Group: Development/Languages/Java +Url: https://github.com/mizdebsk/javapackages +# Latest tag is missing, quite often needs patches, use service +Source: javapackages-%{version}.tar.xz +#PATCH-FIX-SUSE: SUSE does store jvm related things in libdir - ie /usr/lib64 on 64bits +# where Fedora use jpackage convention - usr/lib everywhere +Patch0: suse-use-libdir.patch +#PATCH-FIX-SUSE: allow building without python to reduce depgraph +Patch1: python-optional.patch +BuildRequires: asciidoc +BuildRequires: fdupes +BuildRequires: rpm +BuildRequires: xmlto +BuildRequires: xz +Obsoletes: %{name}-doc +%if %{with python} +BuildRequires: python3-lxml +BuildRequires: python3-nose +BuildRequires: python3-setuptools +BuildRequires: python3-six +%endif + +%description +This package provides macros and scripts to support Java packaging. + +%if %{with python} +%package -n maven-local +Summary: Macros and scripts for Maven packaging support +Group: Development/Languages/Java +Requires: %{name} = %{version} +Requires: javapackages-local = %{version} + +%description -n maven-local +This package provides macros and scripts to support packaging Maven artifacts. + +%package -n gradle-local +Summary: Local mode for Gradle +Group: Development/Languages/Java +Requires: %{name} = %{version} +Requires: javapackages-local = %{version} + +%description -n gradle-local +This package implements local mode for Gradle, which allows artifact +resolution using XMvn resolver. + +%package -n ivy-local +Summary: Local mode for Apache Ivy +Group: Development/Languages/Java +Requires: %{name} = %{version} +Requires: ant +Requires: javapackages-local = %{version} + +%description -n ivy-local +This package implements local mode fow Apache Ivy, which allows +artifact resolution using XMvn resolver. + +%package -n python3-javapackages +Summary: Module for handling various files for Java packaging +Group: Development/Languages/Java +Requires: python3-lxml +Requires: python3-six +Obsoletes: python-javapackages + +%description -n python3-javapackages +Module for handling, querying and manipulating of various files for Java +packaging in Linux distributions + +%package -n javapackages-local +Summary: Non-essential macros and scripts for Java packaging support +Group: Development/Languages/Java +Requires: %{name} = %{version} +Requires: python3-javapackages = %{version} + +%description -n javapackages-local +This package provides non-essential macros and scripts to support Java packaging. +%endif + +%prep +%setup -q -n javapackages-%{version} +%autopatch -p1 + +%build +%configure \ +%if %{with python} + --pyinterpreter=python3 +%else + --pyinterpreter=%{nil} +%endif +./build +%if %{with python} +pushd python +python3 setup.py build +popd +%endif + +%install +./install +sed -e 's/.[17]$/&.gz/' -e 's/.py$/&*/' -i files-* + +%if %{with python} +pushd python +python3 setup.py install --root %{buildroot} +popd +# kill all the common files +files=" +%{_bindir}/build-classpath +%{_bindir}/build-classpath-directory +%{_bindir}/build-jar-repository +%{_bindir}/check-binary-files +%{_bindir}/clean-binary-files +%{_bindir}/create-jar-links +%{_bindir}/diff-jars +%{_bindir}/find-jar +%{_bindir}/rebuild-jar-repository +%{_bindir}/shade-jar +%{_sysconfdir}/java/font.properties +%{_sysconfdir}/java/java.conf +%{_datadir}/java-utils/java-functions +%{_datadir}/java-utils/java-wrapper +%{_datadir}/java-utils/scl-enable +%{_prefix}/lib/rpm/macros.d/macros.jpackage +%{_mandir}/man1/build-classpath.1 +%{_mandir}/man1/build-jar-repository.1 +%{_mandir}/man1/diff-jars.1 +%{_mandir}/man1/rebuild-jar-repository.1 +%{_mandir}/man1/shade-jar.1 +%{_mandir}/man1/find-jar.1 +%{_datadir}/maven-metadata/javapackages-metadata.xml +%{_datadir}/xmvn/configuration.xml +" +for i in $files; do + rm -rf %{buildroot}/$i +done +%endif + +rm -rf %{buildroot}%{_datadir}/fedora-review/ + +%fdupes %{buildroot}/%{_prefix} + +%check +./check + +%if !%{with python} +%files -f files-common +%defattr(-,root,root,-) +%doc LICENSE +%else +%files -n javapackages-local -f files-local +%defattr(-,root,root,-) +%dir %{_datadir}/java-utils + +%files -n maven-local -f files-maven +%defattr(-,root,root,-) + +%files -n gradle-local -f files-gradle +%defattr(-,root,root) +%dir %{_datadir}/gradle-local + +%files -n ivy-local -f files-ivy +%defattr(-,root,root,-) +%dir %{_sysconfdir}/ant.d + +%files -n python3-javapackages +%defattr(-,root,root,-) +%doc LICENSE +%{python3_sitelib}/javapackages* +%endif + +%changelog diff --git a/javapackages-tools.changes b/javapackages-tools.changes index ea7dace..4d48c2a 100644 --- a/javapackages-tools.changes +++ b/javapackages-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 18 20:11:39 UTC 2017 - tchvatal@suse.com + +- Split to python and non-python edition for smaller depgraph +- Add patch python-optional.patch + ------------------------------------------------------------------- Thu May 18 19:40:26 UTC 2017 - tchvatal@suse.com diff --git a/javapackages-tools.spec b/javapackages-tools.spec index c43bd3d..adceb21 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -16,6 +16,7 @@ # +%bcond_with python Name: javapackages-tools Version: 4.7.0+git20170331.ef4057e7 Release: 0 @@ -28,24 +29,25 @@ Source: javapackages-%{version}.tar.xz #PATCH-FIX-SUSE: SUSE does store jvm related things in libdir - ie /usr/lib64 on 64bits # where Fedora use jpackage convention - usr/lib everywhere Patch0: suse-use-libdir.patch +#PATCH-FIX-SUSE: allow building without python to reduce depgraph +Patch1: python-optional.patch BuildRequires: asciidoc BuildRequires: fdupes -BuildRequires: python3-lxml -BuildRequires: python3-nose -BuildRequires: python3-setuptools -BuildRequires: python3-six BuildRequires: rpm BuildRequires: xmlto BuildRequires: xz Obsoletes: %{name}-doc -# Even tho python is split it is required for most of the operations. -# All the binaries used for most builds are in python now. -# Only if package does not contain anything except macro usage it is not needed -Requires: python3-javapackages = %{version} +%if %{with python} +BuildRequires: python3-lxml +BuildRequires: python3-nose +BuildRequires: python3-setuptools +BuildRequires: python3-six +%endif %description This package provides macros and scripts to support Java packaging. +%if %{with python} %package -n maven-local Summary: Macros and scripts for Maven packaging support Group: Development/Languages/Java @@ -91,9 +93,11 @@ packaging in Linux distributions Summary: Non-essential macros and scripts for Java packaging support Group: Development/Languages/Java Requires: %{name} = %{version} +Requires: python3-javapackages = %{version} %description -n javapackages-local This package provides non-essential macros and scripts to support Java packaging. +%endif %prep %setup -q -n javapackages-%{version} @@ -101,16 +105,57 @@ This package provides non-essential macros and scripts to support Java packaging %build %configure \ +%if %{with python} --pyinterpreter=python3 +%else + --pyinterpreter=%{nil} +%endif ./build +%if %{with python} +pushd python +python3 setup.py build +popd +%endif %install ./install sed -e 's/.[17]$/&.gz/' -e 's/.py$/&*/' -i files-* +%if %{with python} pushd python -python3 setup.py install -O1 --skip-build --root %{buildroot} +python3 setup.py install --root %{buildroot} popd +# kill all the common files +files=" +%{_bindir}/build-classpath +%{_bindir}/build-classpath-directory +%{_bindir}/build-jar-repository +%{_bindir}/check-binary-files +%{_bindir}/clean-binary-files +%{_bindir}/create-jar-links +%{_bindir}/diff-jars +%{_bindir}/find-jar +%{_bindir}/rebuild-jar-repository +%{_bindir}/shade-jar +%{_sysconfdir}/java/font.properties +%{_sysconfdir}/java/java.conf +%{_datadir}/java-utils/java-functions +%{_datadir}/java-utils/java-wrapper +%{_datadir}/java-utils/scl-enable +%{_prefix}/lib/rpm/macros.d/macros.jpackage +%{_mandir}/man1/build-classpath.1 +%{_mandir}/man1/build-jar-repository.1 +%{_mandir}/man1/diff-jars.1 +%{_mandir}/man1/rebuild-jar-repository.1 +%{_mandir}/man1/shade-jar.1 +%{_mandir}/man1/find-jar.1 +%{_datadir}/maven-metadata/javapackages-metadata.xml +%{_datadir}/xmvn/configuration.xml +" +for i in $files; do + rm -rf %{buildroot}/$i +done +%endif rm -rf %{buildroot}%{_datadir}/fedora-review/ @@ -119,12 +164,14 @@ rm -rf %{buildroot}%{_datadir}/fedora-review/ %check ./check +%if !%{with python} %files -f files-common %defattr(-,root,root,-) %doc LICENSE - +%else %files -n javapackages-local -f files-local %defattr(-,root,root,-) +%dir %{_datadir}/java-utils %files -n maven-local -f files-maven %defattr(-,root,root,-) @@ -141,5 +188,6 @@ rm -rf %{buildroot}%{_datadir}/fedora-review/ %defattr(-,root,root,-) %doc LICENSE %{python3_sitelib}/javapackages* +%endif %changelog diff --git a/pre_checkin.sh b/pre_checkin.sh new file mode 100644 index 0000000..582788b --- /dev/null +++ b/pre_checkin.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +master="javapackages-tools.spec" +slave="javapackages-tools-extras.spec" +cp $master $slave +sed -i \ + -e 's:%bcond_with python:%bcond_without python:' \ + -e 's/Name: javapackages-tools/Name: javapackages-tools-extras/' \ + $slave + +# changelogs + +cp javapackages-tools.changes javapackages-tools-extras.changes diff --git a/python-optional.patch b/python-optional.patch new file mode 100644 index 0000000..035f489 --- /dev/null +++ b/python-optional.patch @@ -0,0 +1,35 @@ +Index: javapackages-4.7.0+git20170331.ef4057e7/build +=================================================================== +--- javapackages-4.7.0+git20170331.ef4057e7.orig/build ++++ javapackages-4.7.0+git20170331.ef4057e7/build +@@ -141,5 +141,3 @@ manpage build-classpath + manpage build-jar-repository + manpage rebuild-jar-repository + manpage shade-jar +- +-(cd ./python && "${pyinterpreter}" setup.py build) +Index: javapackages-4.7.0+git20170331.ef4057e7/configure +=================================================================== +--- javapackages-4.7.0+git20170331.ef4057e7.orig/configure ++++ javapackages-4.7.0+git20170331.ef4057e7/configure +@@ -83,7 +83,6 @@ test -z "${libdir}" && rpmconfigdir="${p + test -z "${rpmconfigdir}" && rpmconfigdir="${prefix}/lib/rpm" + + test -z "${m2home}" && m2home="${datadir}/xmvn" +-test -z "${pyinterpreter}" && pyinterpreter=$(which python) + test -z "${abrtlibdir}" && abrtlibdir="${prefix}/lib/abrt-java-connector" + + eval $(sed -n 's/^%_\('"$vars_re"'\)\ *\(.*\)$/\1="\2"/;T;s/%{_\(.*}\)/${\1/;p' macros.d/macros.jpackage) +Index: javapackages-4.7.0+git20170331.ef4057e7/install +=================================================================== +--- javapackages-4.7.0+git20170331.ef4057e7.orig/install ++++ javapackages-4.7.0+git20170331.ef4057e7/install +@@ -207,8 +207,3 @@ exec >files-gradle + inst_exec target/gradle-local "${bindir}" + inst_data gradle/init.gradle "${datadir}/gradle-local" + inst_data target/gradle_build.7 "${mandir}/man7" +- +-exec >files-python +-(cd ./python && "${pyinterpreter}" setup.py install -O1 --skip-build --prefix "${prefix}" --root "${DEST}") >&2 +-echo "${prefix}/lib/python?.?/site-packages/javapackages" +-echo "${prefix}/lib/python?.?/site-packages/javapackages-*.egg-info"