From 5497892640ce122aea4dc4993c967a5b0a871cee Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 17 Jul 2020 09:23:59 +0200 Subject: [PATCH] Add separate subpackage with RPM generators --- ...n-modules-under-java-utils-directory.patch | 2 +- ...ble-namespaced-dependency-generation.patch | 2 +- ...al-characters-in-rpmfc-generator-nam.patch | 2 +- ...p-execution-of-various-Maven-plugins.patch | 2 +- ...Don-t-try-to-kill-PID-1-during-tests.patch | 2 +- ...st-Don-t-use-networking-during-tests.patch | 2 +- ...arate-subpackage-with-RPM-generators.patch | 37 +++++++++++++++++++ javapackages-tools.spec | 28 ++++++++++---- 8 files changed, 63 insertions(+), 14 deletions(-) create mode 100644 0007-Add-separate-subpackage-with-RPM-generators.patch diff --git a/0001-Move-python-modules-under-java-utils-directory.patch b/0001-Move-python-modules-under-java-utils-directory.patch index 306c944..50c5ddc 100644 --- a/0001-Move-python-modules-under-java-utils-directory.patch +++ b/0001-Move-python-modules-under-java-utils-directory.patch @@ -1,7 +1,7 @@ From 08f57d72cbc458bb39df76f660889eb6c9131579 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 26 Apr 2019 00:50:00 +0200 -Subject: [PATCH 1/6] Move python modules under java-utils directory +Subject: [PATCH 1/7] Move python modules under java-utils directory --- depgenerators/javadoc.req | 3 +++ diff --git a/0002-Enable-namespaced-dependency-generation.patch b/0002-Enable-namespaced-dependency-generation.patch index df66c19..5f02a34 100644 --- a/0002-Enable-namespaced-dependency-generation.patch +++ b/0002-Enable-namespaced-dependency-generation.patch @@ -1,7 +1,7 @@ From f0b7a9c2bc2cc30047e8d41383debc2745371079 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 28 Jun 2019 14:53:26 +0200 -Subject: [PATCH 2/6] Enable namespaced dependency generation +Subject: [PATCH 2/7] Enable namespaced dependency generation --- depgenerators/fileattrs/javadoc.attr | 2 +- diff --git a/0003-Fix-use-of-illegal-characters-in-rpmfc-generator-nam.patch b/0003-Fix-use-of-illegal-characters-in-rpmfc-generator-nam.patch index d55bbea..0ce10a0 100644 --- a/0003-Fix-use-of-illegal-characters-in-rpmfc-generator-nam.patch +++ b/0003-Fix-use-of-illegal-characters-in-rpmfc-generator-nam.patch @@ -1,7 +1,7 @@ From 5fccf686ca538e620231c424989d800df3534f09 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 2 Sep 2019 18:10:01 +0200 -Subject: [PATCH 3/6] Fix use of illegal characters in rpmfc generator names +Subject: [PATCH 3/7] Fix use of illegal characters in rpmfc generator names --- configure-base.sh | 2 +- diff --git a/0004-Skip-execution-of-various-Maven-plugins.patch b/0004-Skip-execution-of-various-Maven-plugins.patch index ac3b38d..5f479c5 100644 --- a/0004-Skip-execution-of-various-Maven-plugins.patch +++ b/0004-Skip-execution-of-various-Maven-plugins.patch @@ -1,7 +1,7 @@ From d95ecd520fef469dd40d8fa54955928b82fd30ce Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 29 Jun 2019 12:09:25 +0200 -Subject: [PATCH 4/6] Skip execution of various Maven plugins +Subject: [PATCH 4/7] Skip execution of various Maven plugins Resolves: #70 --- diff --git a/0005-test-Don-t-try-to-kill-PID-1-during-tests.patch b/0005-test-Don-t-try-to-kill-PID-1-during-tests.patch index 6842fb6..f10196a 100644 --- a/0005-test-Don-t-try-to-kill-PID-1-during-tests.patch +++ b/0005-test-Don-t-try-to-kill-PID-1-during-tests.patch @@ -1,7 +1,7 @@ From 0372ba445718580298dba5e2faaa0946b5313671 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 18 May 2020 09:11:31 +0200 -Subject: [PATCH 5/6] Don't try to kill PID 1 during tests +Subject: [PATCH 5/7] Don't try to kill PID 1 during tests Normally PID 1 should not be killable, but when running tests in container this is actually possible. diff --git a/0006-test-Don-t-use-networking-during-tests.patch b/0006-test-Don-t-use-networking-during-tests.patch index 177923c..702a8d8 100644 --- a/0006-test-Don-t-use-networking-during-tests.patch +++ b/0006-test-Don-t-use-networking-during-tests.patch @@ -1,7 +1,7 @@ From b96e04f0a19c832e2a37e8d6ee3e85e26874b145 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 16 Jul 2020 16:27:04 +0200 -Subject: [PATCH 6/6] [test] Don't use networking during tests +Subject: [PATCH 6/7] [test] Don't use networking during tests When %_buildhost is not set, RPM will try to call gethostname() and gethostbyname() to determine it. diff --git a/0007-Add-separate-subpackage-with-RPM-generators.patch b/0007-Add-separate-subpackage-with-RPM-generators.patch new file mode 100644 index 0000000..751a696 --- /dev/null +++ b/0007-Add-separate-subpackage-with-RPM-generators.patch @@ -0,0 +1,37 @@ +From 584f36442e18627f8fd459842cca734fa727c911 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Fri, 17 Jul 2020 09:22:41 +0200 +Subject: [PATCH 7/7] Add separate subpackage with RPM generators + +--- + install | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/install b/install +index 9a5f108e..5d233402 100755 +--- a/install ++++ b/install +@@ -165,8 +165,6 @@ fi + + exec >files-local + +-dir "${rpmconfigdir}/fileattrs" +- + inst_exec target/abs2rel "${bindir}" + inst_exec target/xmvn-builddep "${bindir}" + +@@ -222,6 +220,11 @@ inst_data target/pom_xpath_remove.7 "${mandir}/man7" + inst_data target/pom_xpath_replace.7 "${mandir}/man7" + inst_data target/pom_xpath_set.7 "${mandir}/man7" + ++ ++exec >files-generators ++ ++dir "${rpmconfigdir}/fileattrs" ++ + inst_exec target/maven.prov "${rpmconfigdir}" "maven${scl_suffix}.prov" + inst_exec target/maven.req "${rpmconfigdir}" "maven${scl_suffix}.req" + inst_exec target/osgi.prov "${rpmconfigdir}" "osgi${scl_suffix}.prov" +-- +2.26.2 + diff --git a/javapackages-tools.spec b/javapackages-tools.spec index 731b55a..2ad3b4b 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -24,7 +24,7 @@ Name: javapackages-tools Version: 5.3.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Macros and scripts for Java packaging support License: BSD URL: https://github.com/fedora-java/javapackages @@ -41,6 +41,7 @@ Patch3: 0003-Fix-use-of-illegal-characters-in-rpmfc-generator-nam.patch Patch4: 0004-Skip-execution-of-various-Maven-plugins.patch Patch5: 0005-test-Don-t-try-to-kill-PID-1-during-tests.patch Patch6: 0006-test-Don-t-use-networking-during-tests.patch +Patch7: 0007-Add-separate-subpackage-with-RPM-generators.patch BuildRequires: coreutils BuildRequires: which @@ -105,21 +106,26 @@ artifact resolution using XMvn resolver. %package -n javapackages-local Summary: Non-essential macros and scripts for Java packaging support -Requires: %{name} = %{version}-%{release} +Requires: javapackages-generators = %{version}-%{release} Requires: %{_bindir}/xmvn-install Requires: %{_bindir}/xmvn-subst Requires: %{_bindir}/xmvn-resolve # Java build systems don't have hard requirement on java-devel, so it should be there Requires: java-11-openjdk-devel -Requires: %{python_interpreter} -Requires: %{python_prefix}-lxml -Requires: %{python_prefix}-six -Obsoletes: %{python_prefix}-javapackages < %{version}-%{release} -Obsoletes: python-javapackages < %{version}-%{release} %description -n javapackages-local This package provides non-essential macros and scripts to support Java packaging. +%package -n javapackages-generators +Summary: RPM dependency generators for Java packaging support +Requires: %{name} = %{version}-%{release} +Requires: %{python_interpreter} +Requires: %{python_prefix}-lxml +Requires: %{python_prefix}-six + +%description -n javapackages-generators +RPM dependency generators to support Java packaging. + %package -n javapackages-config-maven-3.6 Summary: Configuration files for building maven-3.6 module @@ -142,6 +148,7 @@ OpenJDK 8 toolchain for XMvn %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 sed -i '/^manpage /d' build sed -i '/${mandir}/d' install @@ -185,10 +192,12 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/java/javapackages-config %files -n javapackages-filesystem -f files-filesystem -%files -n javapackages-local -f files-local +%files -n javapackages-generators -f files-generators %{_javadir}-utils/javapackages/ %license LICENSE +%files -n javapackages-local -f files-local + %files -n maven-local %files -n ivy-local -f files-ivy @@ -200,6 +209,9 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/java/javapackages-config %{_datadir}/xmvn/conf %changelog +* Fri Jul 17 2020 Mikolaj Izdebski - 5.3.1-9 +- Add separate subpackage with RPM generators + * Thu Jul 16 2020 Mikolaj Izdebski - 5.3.1-8 - Don't use networking during tests