Do not create parent dirs for pom.properties
- Resolves: rhbz#1031769
This commit is contained in:
parent
7865f437c4
commit
7e233832ce
@ -0,0 +1,35 @@
|
|||||||
|
From 91b94a33235e86adf7678cef4652551fccc251d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
||||||
|
Date: Tue, 19 Nov 2013 10:28:03 +0100
|
||||||
|
Subject: [PATCH 1/2] Revert creating parent directories for pom.properties
|
||||||
|
|
||||||
|
Since we can't properly create directories let's just leave it up as default
|
||||||
|
permissions. At least it will not cause problems for various tooling
|
||||||
|
|
||||||
|
Fixes: rhbz#1031769
|
||||||
|
---
|
||||||
|
java-utils/maven_depmap.py | 8 --------
|
||||||
|
1 file changed, 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/java-utils/maven_depmap.py b/java-utils/maven_depmap.py
|
||||||
|
index e15b5ff..13ff219 100644
|
||||||
|
--- a/java-utils/maven_depmap.py
|
||||||
|
+++ b/java-utils/maven_depmap.py
|
||||||
|
@@ -303,14 +303,6 @@ def append_if_missing(archive_name, file_name, file_contents):
|
||||||
|
archive = zipfile.ZipFile(archive_name, 'a')
|
||||||
|
try:
|
||||||
|
if file_name not in archive.namelist():
|
||||||
|
- path = os.path.dirname(file_name)
|
||||||
|
- while True:
|
||||||
|
- if not path:
|
||||||
|
- break
|
||||||
|
- subdir = path + os.path.sep
|
||||||
|
- if subdir not in archive.namelist():
|
||||||
|
- archive.writestr(subdir, '')
|
||||||
|
- path, tail = os.path.split(path)
|
||||||
|
archive.writestr(file_name, file_contents)
|
||||||
|
finally:
|
||||||
|
archive.close()
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
48
0002-Update-testsuite-for-rhbz-1031769.patch
Normal file
48
0002-Update-testsuite-for-rhbz-1031769.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
diff --git a/test/maven_depmap_test.py b/test/maven_depmap_test.py
|
||||||
|
index f5d4760..2129c1d 100644
|
||||||
|
--- a/test/maven_depmap_test.py
|
||||||
|
+++ b/test/maven_depmap_test.py
|
||||||
|
@@ -226,21 +226,6 @@ class TestMavenDepmap(unittest.TestCase):
|
||||||
|
depmap)
|
||||||
|
self.assertEqual(report, '', report)
|
||||||
|
|
||||||
|
- @mvn_depmap('a:b:12', 'usr/foo/share/java/.out_archive.jar')
|
||||||
|
- def test_compare_jar(self, stdout, stderr, return_value, depmap):
|
||||||
|
- self.assertEqual(return_value, 0, stderr)
|
||||||
|
- got, want = self.check_archive(inspect.currentframe().f_code.co_name,
|
||||||
|
- 'usr/foo/share/java/.out_archive.jar')
|
||||||
|
- self.assertEqual(got, want)
|
||||||
|
-
|
||||||
|
- #test case for rhbz#1012982
|
||||||
|
- @mvn_depmap('x:y:war:z:0.1', 'usr/foo/share/java/.out_archive-z.war')
|
||||||
|
- def test_compare_jar_class_ext(self, stdout, stderr, return_value, depmap):
|
||||||
|
- self.assertEqual(return_value, 0, stderr)
|
||||||
|
- got, want = self.check_archive(inspect.currentframe().f_code.co_name,
|
||||||
|
- 'usr/foo/share/java/.out_archive-z.war')
|
||||||
|
- self.assertEqual(got, want)
|
||||||
|
-
|
||||||
|
@mvn_depmap('a:b:12', 'usr/share/java/already-has-pom-properties.jar')
|
||||||
|
def test_compare_jar_unmodified(self, stdout, stderr, return_value, depmap):
|
||||||
|
self.assertEqual(return_value, 0, stderr)
|
||||||
|
@@ -248,21 +233,6 @@ class TestMavenDepmap(unittest.TestCase):
|
||||||
|
'usr/share/java/already-has-pom-properties.jar', keep_comments=True)
|
||||||
|
self.assertEqual(got, want)
|
||||||
|
|
||||||
|
- @mvn_depmap('x:y:0.1', 'usr/share/java/already-has-pom-properties.jar')
|
||||||
|
- def test_compare_jar_modified(self, stdout, stderr, return_value, depmap):
|
||||||
|
- self.assertEqual(return_value, 0, stderr)
|
||||||
|
- got, want = self.check_archive(inspect.currentframe().f_code.co_name,
|
||||||
|
- 'usr/share/java/already-has-pom-properties.jar')
|
||||||
|
- self.assertEqual(got, want)
|
||||||
|
-
|
||||||
|
- @mvn_depmap('/builddir/build/BUILDROOT/pkg-2.5.2-2.fc21.x86_64/x:y:0.1',
|
||||||
|
- 'usr/share/java/already-has-pom-properties.jar')
|
||||||
|
- def test_rhbz1012245(self, stdout, stderr, return_value, depmap):
|
||||||
|
- self.assertEqual(return_value, 0, stderr)
|
||||||
|
- got, want = self.check_archive('test_compare_jar_modified',
|
||||||
|
- 'usr/share/java/already-has-pom-properties.jar')
|
||||||
|
- self.assertEqual(got, want)
|
||||||
|
-
|
||||||
|
@mvn_depmap('x:y:jar:z:0.1', 'usr/share/java/commons-io-z.jar',
|
||||||
|
['-a', 'a:b:war:c:12'])
|
||||||
|
def test_classifier(self, stdout, stderr, return_value, depmap):
|
@ -1,6 +1,6 @@
|
|||||||
Name: javapackages-tools
|
Name: javapackages-tools
|
||||||
Version: 3.4.1
|
Version: 3.4.1
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
|
|
||||||
Summary: Macros and scripts for Java packaging support
|
Summary: Macros and scripts for Java packaging support
|
||||||
|
|
||||||
@ -8,6 +8,10 @@ License: BSD
|
|||||||
URL: https://fedorahosted.org/javapackages/
|
URL: https://fedorahosted.org/javapackages/
|
||||||
Source0: https://fedorahosted.org/released/javapackages/javapackages-%{version}.tar.xz
|
Source0: https://fedorahosted.org/released/javapackages/javapackages-%{version}.tar.xz
|
||||||
|
|
||||||
|
# rhbz#1031769
|
||||||
|
Patch1: 0001-Revert-creating-parent-directories-for-pom.propertie.patch
|
||||||
|
Patch2: 0002-Update-testsuite-for-rhbz-1031769.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: jpackage-utils
|
BuildRequires: jpackage-utils
|
||||||
@ -88,6 +92,8 @@ Requires: fedora-review
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n javapackages-%{version}
|
%setup -q -n javapackages-%{version}
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
@ -128,6 +134,10 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 19 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.4.1-2
|
||||||
|
- Do not create parent dirs for pom.properties
|
||||||
|
- Resolves: rhbz#1031769
|
||||||
|
|
||||||
* Tue Nov 05 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.4.1-1
|
* Tue Nov 05 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.4.1-1
|
||||||
- Update to upstream bugfix release 3.4.1
|
- Update to upstream bugfix release 3.4.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user