[Bug 922147] New: CVE-2013-0248 jakarta-commons-fileupload, apache-commons-fileupload: /tmp directory used by default for uploaded files (possibility to overwrite arbitrary files) [fedora-all]
by Red Hat Bugzilla
Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=922147
Bug ID: 922147
Summary: CVE-2013-0248 jakarta-commons-fileupload,
apache-commons-fileupload: /tmp directory used by
default for uploaded files (possibility to overwrite
arbitrary files) [fedora-all]
Product: Fedora
Version: 18
Component: apache-commons-fileupload
Keywords: Security, SecurityTracking
Severity: low
Priority: low
Assignee: mizdebsk(a)redhat.com
Reporter: jlieskov(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: java-sig-commits(a)lists.fedoraproject.org,
jerboaa(a)gmail.com, mizdebsk(a)redhat.com,
msrb(a)redhat.com, sochotni(a)redhat.com,
SpikeFedora(a)gmail.com, tradej(a)redhat.com
Blocks: 922146 (CVE-2013-0248)
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of Fedora.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When creating a Bodhi update request, please use the bodhi submission link
noted in the next comment(s). This will include the bug IDs of this
tracking bug as well as the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
Bodhi notes field when available.
Please note: this issue affects multiple supported versions of Fedora.
Only one tracking bug has been filed; please ensure that it is only closed
when all affected versions are fixed.
[bug automatically created by: add-tracking-bugs]
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=i2Ts9FpsI9&a=cc_unsubscribe
9 years, 6 months
[xmvn] Ignore any system dependencies in Tycho projects
by Mikolaj Izdebski
commit 27e6857c01b7e43faf795db5701ac65d2c0600c7
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Thu Dec 4 12:17:33 2014 +0100
Ignore any system dependencies in Tycho projects
...stalling-the-same-attached-artifact-twice.patch | 2 +-
...nstallation-of-attached-Eclipse-artifacts.patch | 2 +-
0003-Fix-conversion-of-Ivy-to-XMvn-artifacts.patch | 2 +-
...-repository-namespace-during-installation.patch | 2 +-
...any-system-dependencies-in-Tycho-projects.patch | 49 ++++++++++++++++++++
xmvn.spec | 7 ++-
6 files changed, 59 insertions(+), 5 deletions(-)
---
diff --git a/0001-Avoid-installing-the-same-attached-artifact-twice.patch b/0001-Avoid-installing-the-same-attached-artifact-twice.patch
index a55449e..dbeb533 100644
--- a/0001-Avoid-installing-the-same-attached-artifact-twice.patch
+++ b/0001-Avoid-installing-the-same-attached-artifact-twice.patch
@@ -1,7 +1,7 @@
From 2464fdd561a5c91adb23ef41b736baca5d2e8c61 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Tue, 9 Sep 2014 15:26:16 +0200
-Subject: [PATCH 1/4] Avoid installing the same attached artifact twice
+Subject: [PATCH 1/5] Avoid installing the same attached artifact twice
---
xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java | 5 ++++-
diff --git a/0002-Fix-installation-of-attached-Eclipse-artifacts.patch b/0002-Fix-installation-of-attached-Eclipse-artifacts.patch
index 720ea37..89c4c9d 100644
--- a/0002-Fix-installation-of-attached-Eclipse-artifacts.patch
+++ b/0002-Fix-installation-of-attached-Eclipse-artifacts.patch
@@ -1,7 +1,7 @@
From 9ff89ed35810a8dce70258c409510c647e2d2334 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Mon, 15 Sep 2014 12:50:21 +0200
-Subject: [PATCH 2/4] Fix installation of attached Eclipse artifacts
+Subject: [PATCH 2/5] Fix installation of attached Eclipse artifacts
---
xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java | 2 +-
diff --git a/0003-Fix-conversion-of-Ivy-to-XMvn-artifacts.patch b/0003-Fix-conversion-of-Ivy-to-XMvn-artifacts.patch
index 5d19c99..6b8e71a 100644
--- a/0003-Fix-conversion-of-Ivy-to-XMvn-artifacts.patch
+++ b/0003-Fix-conversion-of-Ivy-to-XMvn-artifacts.patch
@@ -1,7 +1,7 @@
From f1c21784c270c4fd952bbc4773500982bb12d195 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Tue, 28 Oct 2014 16:55:25 +0100
-Subject: [PATCH 3/4] Fix conversion of Ivy to XMvn artifacts
+Subject: [PATCH 3/5] Fix conversion of Ivy to XMvn artifacts
Classifiers could be lost is some cases when converting Ivy artifact
to XMvn artifact.
diff --git a/0004-Use-topmost-repository-namespace-during-installation.patch b/0004-Use-topmost-repository-namespace-during-installation.patch
index 2b0bb41..cf738c3 100644
--- a/0004-Use-topmost-repository-namespace-during-installation.patch
+++ b/0004-Use-topmost-repository-namespace-during-installation.patch
@@ -1,7 +1,7 @@
From 85c42732a35cdc274c4b4ab0652f7f6c0da6f3ab Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Wed, 26 Nov 2014 14:10:51 +0100
-Subject: [PATCH 4/4] Use topmost repository namespace during installation
+Subject: [PATCH 4/5] Use topmost repository namespace during installation
Resolves: rhbz#1166743
---
diff --git a/0005-Ignore-any-system-dependencies-in-Tycho-projects.patch b/0005-Ignore-any-system-dependencies-in-Tycho-projects.patch
new file mode 100644
index 0000000..6dcf46e
--- /dev/null
+++ b/0005-Ignore-any-system-dependencies-in-Tycho-projects.patch
@@ -0,0 +1,49 @@
+From 280f1d580f9aa1e995ebeb5ab5f6b136714d1767 Mon Sep 17 00:00:00 2001
+From: Mikolaj Izdebski <mizdebsk(a)redhat.com>
+Date: Thu, 4 Dec 2014 12:16:04 +0100
+Subject: [PATCH 5/5] Ignore any system dependencies in Tycho projects
+
+---
+ .../main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java | 12 +-----------
+ 1 file changed, 1 insertion(+), 11 deletions(-)
+
+diff --git a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java
+index 9b04d27..b59ae8b 100644
+--- a/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java
++++ b/xmvn-mojo/src/main/java/org/fedoraproject/xmvn/mojo/InstallMojo.java
+@@ -59,8 +59,6 @@ public class InstallMojo
+ {
+ private static final Set<String> TYCHO_PACKAGING_TYPES = new LinkedHashSet<>();
+
+- private static final Set<String> TYCHO_P2_CLASSIFIERS = new LinkedHashSet<>();
+-
+ static
+ {
+ TYCHO_PACKAGING_TYPES.add( "eclipse-plugin" );
+@@ -69,14 +67,6 @@ public class InstallMojo
+ TYCHO_PACKAGING_TYPES.add( "eclipse-update-site" );
+ TYCHO_PACKAGING_TYPES.add( "eclipse-application" );
+ TYCHO_PACKAGING_TYPES.add( "eclipse-repository" );
+-
+- for ( String packaging : TYCHO_PACKAGING_TYPES )
+- TYCHO_P2_CLASSIFIERS.add( "p2." + packaging );
+- }
+-
+- private static boolean isTychoInjectedDependency( Dependency dependency )
+- {
+- return TYCHO_P2_CLASSIFIERS.contains( dependency.getGroupId() );
+ }
+
+ private static boolean isTychoProject( MavenProject project )
+@@ -120,7 +110,7 @@ public class InstallMojo
+ for ( Dependency dependency : project.getModel().getDependencies() )
+ {
+ // Ignore dependencies injected by Tycho
+- if ( isTychoProject( project ) && isTychoInjectedDependency( dependency ) )
++ if ( isTychoProject( project ) )
+ continue;
+
+ if ( dependency.getScope() != null && dependency.getScope().equals( "system" ) )
+--
+1.9.3
+
diff --git a/xmvn.spec b/xmvn.spec
index 6eb248f..42fcd64 100644
--- a/xmvn.spec
+++ b/xmvn.spec
@@ -4,7 +4,7 @@
Name: xmvn
Version: 2.1.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Local Extensions for Apache Maven
License: ASL 2.0
URL: http://mizdebsk.fedorapeople.org/xmvn
@@ -16,6 +16,7 @@ Patch0: 0001-Avoid-installing-the-same-attached-artifact-twice.patch
Patch1: 0002-Fix-installation-of-attached-Eclipse-artifacts.patch
Patch2: 0003-Fix-conversion-of-Ivy-to-XMvn-artifacts.patch
Patch3: 0004-Use-topmost-repository-namespace-during-installation.patch
+Patch4: 0005-Ignore-any-system-dependencies-in-Tycho-projects.patch
BuildRequires: maven >= 3.2.1-10
BuildRequires: maven-local
@@ -149,6 +150,7 @@ This package provides %{summary}.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%mvn_package :xmvn __noinstall
@@ -298,6 +300,9 @@ end
%doc LICENSE NOTICE
%changelog
+* Thu Dec 4 2014 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 2.1.0-7
+- Ignore any system dependencies in Tycho projects
+
* Wed Nov 26 2014 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 2.1.0-6
- Use topmost repository namespace during installation
- Resolves: rhbz#1166743
9 years, 6 months
[javapackages] [maven.req] Remove unused method
by Michal Srb
commit 5fc1e1d7e62de91fb8c11977369d606b3886548a
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri Dec 5 07:52:37 2014 +0100
[maven.req] Remove unused method
depgenerators/maven.req | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
---
diff --git a/depgenerators/maven.req b/depgenerators/maven.req
index a2799f7..f25a122 100755
--- a/depgenerators/maven.req
+++ b/depgenerators/maven.req
@@ -262,16 +262,6 @@ class TagBuilder(object):
unresolvable.append(deps[i])
return unresolvable
- def _gather_metadata_files(self):
- metadata_paths = []
- for dirname, _, filenames in os.walk(self.metadata_dir):
- for filename in filenames:
- if filename.endswith(".pom"):
- continue
- metadata_paths.append(os.path.join(dirname, filename))
- self.metadata_paths = metadata_paths
- return metadata_paths
-
def _generate_requires_from_pom(self, pom, pom_artifact, pkg_arts):
plugins = pom.plugins
extensions = pom.extensions
9 years, 6 months
[javapackages] Add license headers
by Michal Srb
commit 993bd8ff39928e4b681819b7955f083b56e3b254
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri Dec 5 07:41:47 2014 +0100
Add license headers
python/javapackages/cache/cache.py | 33 +++++++++++++++++++++++++++++++++
python/javapackages/cache/metadata.py | 33 +++++++++++++++++++++++++++++++++
2 files changed, 66 insertions(+), 0 deletions(-)
---
diff --git a/python/javapackages/cache/cache.py b/python/javapackages/cache/cache.py
index 87f2e23..ef41ab6 100644
--- a/python/javapackages/cache/cache.py
+++ b/python/javapackages/cache/cache.py
@@ -1,3 +1,36 @@
+#!/usr/bin/python
+# Copyright (c) 2014, Red Hat, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Red Hat nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Michal Srb <msrb(a)redhat.com>
+
import os
import logging
import pickle
diff --git a/python/javapackages/cache/metadata.py b/python/javapackages/cache/metadata.py
index f090c6b..6592f9c 100644
--- a/python/javapackages/cache/metadata.py
+++ b/python/javapackages/cache/metadata.py
@@ -1,3 +1,36 @@
+#!/usr/bin/python
+# Copyright (c) 2014, Red Hat, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name of the Red Hat nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Michal Srb <msrb(a)redhat.com>
+
import javapackages.common.config as config
from javapackages.metadata.metadata import Metadata, MetadataLoadingException
from javapackages.cache.cache import Cache
9 years, 6 months
[javapackages] [test] Fix javadoc.req test
by Michal Srb
commit 3830233522d42f553915b27247ebdffae4da5f9c
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri Dec 5 07:33:28 2014 +0100
[test] Fix javadoc.req test
test/test_common.py | 69 ++++++++++++++++++++++++++++++++------------------
1 files changed, 44 insertions(+), 25 deletions(-)
---
diff --git a/test/test_common.py b/test/test_common.py
index 98039aa..e5d07f5 100644
--- a/test/test_common.py
+++ b/test/test_common.py
@@ -124,21 +124,24 @@ def call_rpmgen(rpmgen_name, filelist_prefix, filelist, env=None,
config=''):
scriptpath = path.join(DIRPATH, '..', 'depgenerators', rpmgen_name)
stdin = []
- stdin.extend([os.path.abspath(os.path.join(filelist_prefix, x))
- for x in filelist])
+ if not filelist:
+ filelist = ["/dev/null"]
- buildroot = "/dev/null"
+ if filelist_prefix:
+ stdin.extend([os.path.abspath(os.path.join(filelist_prefix, x))
+ for x in filelist])
+ else:
+ stdin = filelist
if not env:
env = {}
- if "RPM_BUILD_ROOT" not in env:
+ buildroot = "/dev/null"
+ if "RPM_BUILD_ROOT" not in env and stdin:
result = re.match(".*?/buildroot/", stdin[0])
if result:
buildroot = os.path.abspath(result.group(0))
- env.update({"RPM_BUILD_ROOT": buildroot})
- else:
- env.update({"RPM_BUILD_ROOT": "/dev/null"})
+ env.update({"RPM_BUILD_ROOT": buildroot})
try:
shutil.rmtree("/tmp/.javapackages_cache/")
@@ -190,30 +193,46 @@ def mavenprov(*args, **kwargs):
def mavenreq(*args, **kwargs):
def test_decorator(fun):
def test_decorated(self):
- if "config" in kwargs:
- config_path = os.path.join(DIRPATH, 'data', 'config', kwargs["config"])
- else:
- config_path = os.path.abspath(os.path.join(DIRPATH, '..', 'etc'))
- kwargs.update({"config": config_path})
- if "javaconfdirs" in kwargs:
- confdirs = [os.path.join(DIRPATH, conf) for conf in kwargs["javaconfdirs"]]
- try:
- env = kwargs["env"]
- except KeyError:
- env = {}
- env.update({"JAVACONFDIRS": os.pathsep.join(confdirs)})
- kwargs.update({"env": env})
- del kwargs["javaconfdirs"]
+ pargs, pkwargs = rpmgen_process_args(args, kwargs)
(stdout, stderr, return_value) = call_rpmgen("maven.req",
"metadata/",
- *args,
- **kwargs)
+ *pargs,
+ **pkwargs)
fun(self, stdout, stderr, return_value)
return test_decorated
return test_decorator
-#def javadocreq(*args, **kwargs):
-# return requires_generator('javadoc.req', *args, **kwargs)
+
+def javadocreq(*args, **kwargs):
+ def test_decorator(fun):
+ def test_decorated(self):
+ pargs, pkwargs = rpmgen_process_args(args, kwargs)
+ (stdout, stderr, return_value) = call_rpmgen("javadoc.req",
+ "",
+ *pargs,
+ **pkwargs)
+ fun(self, stdout, stderr, return_value)
+ return test_decorated
+ return test_decorator
+
+
+def rpmgen_process_args(args, kwargs):
+ if "config" in kwargs:
+ config_path = os.path.join(DIRPATH, 'data', 'config', kwargs["config"])
+ else:
+ config_path = os.path.abspath(os.path.join(DIRPATH, '..', 'etc'))
+ kwargs.update({"config": config_path})
+ if "javaconfdirs" in kwargs:
+ confdirs = [os.path.join(DIRPATH, conf) for conf in kwargs["javaconfdirs"]]
+ try:
+ env = kwargs["env"]
+ except KeyError:
+ env = {}
+ env.update({"JAVACONFDIRS": os.pathsep.join(confdirs)})
+ kwargs.update({"env": env})
+ del kwargs["javaconfdirs"]
+ return args, kwargs
+
def mvn_depmap(pom, jar=None, fnargs=None):
def test_decorator(fun):
9 years, 6 months
[javapackages] Revert "[test] Disable some tests for now" -- it's time to address these failures
by Michal Srb
commit 1f6816c81e4e26bfbc5c076f1d19f78140b66803
Author: Michal Srb <msrb(a)redhat.com>
Date: Fri Dec 5 06:32:33 2014 +0100
Revert "[test] Disable some tests for now" -- it's time to address these failures
This reverts commit 47fb218b7007d1aa43fcc812c7f5316a8276a158.
python/test/metadata_test.py | 266 ++++++++++++++++++++++++++++++++++++++++++
test/maven_req_test.py | 16 ++--
test/run_tests.py | 2 +-
3 files changed, 275 insertions(+), 9 deletions(-)
---
diff --git a/python/test/metadata_test.py b/python/test/metadata_test.py
new file mode 100644
index 0000000..2a90d5e
--- /dev/null
+++ b/python/test/metadata_test.py
@@ -0,0 +1,266 @@
+import os
+import unittest
+
+from javapackages.metadata.metadata import Metadata, MetadataInvalidException
+from javapackages.metadata.artifact import MetadataArtifact
+from javapackages.metadata.skippedartifact import MetadataSkippedArtifact
+from javapackages.metadata.exclusion import MetadataExclusion
+from javapackages.metadata.dependency import MetadataDependency
+
+from test.misc import exception_expected
+
+
+def depmapfile(fname):
+ def test_decorator(fn):
+ def test_decorated(self, *args, **kwargs):
+ main_dir = os.path.dirname(os.path.realpath(__file__))
+ fn(self, Metadata(os.path.join(main_dir, "data", fname)))
+ return test_decorated
+
+ return test_decorator
+
+
+class TestDepmap(unittest.TestCase):
+
+ @exception_expected(IOError)
+ @depmapfile("NULL_FILE.xml")
+ def test_nonexisting_depmap(self, d):
+ self.assertTrue(False, "IOError was expected!")
+
+ @depmapfile("depmap_compat_new.xml")
+ def test_compat_new(self, d):
+ pa = d.get_provided_artifacts()
+ self.assertEqual(len(pa), 2)
+ for a in pa:
+ self.assertTrue(a.is_compat())
+
+ @depmapfile("depmap_compat_new.xml")
+ def test_java_requires(self, d):
+ self.assertEqual(d.get_java_requires(), "1.5")
+
+ @depmapfile("depmap_java_devel.xml")
+ def test_java_devel_requires(self, d):
+ self.assertEqual(d.get_java_requires(), None)
+ self.assertEqual(d.get_java_devel_requires(), "1.5")
+
+ @depmapfile("depmap_compat_new.xml")
+ def test_single_provides(self, d):
+ self.assertEqual(len(d.get_provided_artifacts()), 2)
+
+ @depmapfile("depmap_new_versioned.xml")
+ def test_provided_mappings(self, d):
+ artifacts = d.get_provided_artifacts()
+ self.assertEqual(len(artifacts), 2)
+ self.assertTrue(MetadataArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin",
+ version="2.2",
+ path="/usr/share/java/maven-idea-plugin/maven-idea-plugin.jar",
+ properties={'requiresJava': '1.5'}
+ ) in artifacts)
+ self.assertTrue(MetadataArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin",
+ version="2.2",
+ extension="pom",
+ path="/usr/share/maven-poms/JPP.maven-idea-plugin-maven-idea-plugin.pom")
+ in artifacts)
+
+ @depmapfile("depmap_new_versioned_compressed.xml.gz")
+ def test_compressed_depmap(self, d):
+ artifacts = d.get_provided_artifacts()
+ self.assertEqual(len(artifacts), 2)
+ self.assertTrue(MetadataArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin",
+ version="2.2",
+ path="/usr/share/java/maven-idea-plugin/maven-idea-plugin.jar",
+ properties={'requiresJava': '1.5'}
+ ) in artifacts)
+ self.assertTrue(MetadataArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin",
+ version="2.2",
+ path="/usr/share/maven-poms/JPP.maven-idea-plugin-maven-idea-plugin.pom",
+ extension="pom") in artifacts)
+
+ @depmapfile("depmap_new_compat.xml")
+ def test_provided_versioned(self, d):
+ artifacts = d.get_provided_artifacts()
+ self.assertEqual(len(artifacts), 4)
+ self.assertTrue(MetadataArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin",
+ version="1.4",
+ path="/usr/share/java/maven-idea-plugin/maven-idea-plugin-1.4.jar",
+ compatVersions=set(['1.4'])) in artifacts)
+ self.assertTrue(MetadataArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin",
+ version="1.4",
+ extension="pom",
+ path="/usr/share/maven-poms/JPP.maven-idea-plugin-maven-idea-plugin-1.4.pom",
+ compatVersions=set(["1.4"])) in artifacts)
+ self.assertTrue(MetadataArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin",
+ version="1.4",
+ path="/usr/share/java/maven-idea-plugin/maven-idea-plugin-1.4.jar",
+ compatVersions=set(["1.5"])) in artifacts)
+ self.assertTrue(MetadataArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin",
+ version="1.4",
+ extension="pom",
+ path="/usr/share/maven-poms/JPP.maven-idea-plugin-maven-idea-plugin-1.4.pom",
+ compatVersions=set(["1.5"])) in artifacts)
+
+ @exception_expected(MetadataInvalidException)
+ @depmapfile("depmap_invalid_nover.xml")
+ def test_no_maven_version(self, d):
+ d.get_provided_artifacts()
+
+ @exception_expected(MetadataInvalidException)
+ @depmapfile("depmap_invalid_nover.xml")
+ def test_no_maven_version_mappings(self, d):
+ d.get_provided_artifacts()
+
+ @depmapfile("depmap_compat_new.xml")
+ def test_multiple_requires(self, d):
+ reqs = d.get_required_artifacts()
+ self.assertEqual(len(reqs), 4)
+
+ self.assertTrue(MetadataDependency("org.apache.maven",
+ "maven-project",
+ requestedVersion="12") in reqs)
+
+ self.assertTrue(MetadataDependency("org.codehaus.plexus",
+ "plexus-container-default",
+ requestedVersion="12") in reqs)
+
+ self.assertTrue(MetadataDependency("org.codehaus.plexus",
+ "plexus-utils",
+ requestedVersion="12",
+ extension="war") in reqs)
+
+ self.assertTrue(MetadataDependency("org.apache.maven.wagon",
+ "wagon-provider-api",
+ requestedVersion="12",
+ classifier="test-jar") in reqs)
+
+ @depmapfile("depmap_namespace.xml")
+ def test_namespace(self, d):
+ artifacts = d.get_provided_artifacts()
+ for a in artifacts:
+ self.assertEqual(a.namespace, "ns")
+
+ @depmapfile("depmap_multiple_namespaces.xml")
+ def test_multiple_namespaces(self, d):
+ prov = d.get_provided_artifacts()
+
+ self.assertEqual(len(prov), 6)
+ self.assertTrue(MetadataArtifact("org.codehaus.plexus",
+ "plexus-utils",
+ version="3.0",
+ namespace="codehaus-plexus",
+ path="/usr/share/java/plexus-utils/plexus-utils.jar",
+ properties={'requiresJava': '1.5'}) in prov)
+
+ self.assertTrue(MetadataArtifact("org.codehaus.plexus",
+ "plexus-utils",
+ version="3.0",
+ extension="pom",
+ namespace="codehaus-plexus",
+ path="/usr/share/maven-poms/JPP.plexus-utils-plexus-utils.pom",
+ properties={'requiresJava': '1.5'}) in prov)
+ self.assertTrue(MetadataArtifact("plexus",
+ "plexus-utils",
+ version="1.2",
+ namespace="plexus",
+ path="/usr/share/java/plexus-utils/plexus-utils.jar",
+ properties={'requiresJava': '1.5'}) in prov)
+ self.assertTrue(MetadataArtifact("plexus",
+ "plexus-utils",
+ version="1.2",
+ namespace="plexus",
+ extension="pom",
+ path="/usr/share/maven-poms/JPP.plexus-utils-plexus-utils.pom",
+ properties={'requiresJava': '1.5'}) in prov)
+ self.assertTrue(MetadataArtifact("codehaus",
+ "plexus-utils",
+ version="1.2",
+ namespace="codehaus",
+ path="/usr/share/java/plexus-utils/plexus-utils.jar",
+ properties={'requiresJava': '1.5'}) in prov)
+ self.assertTrue(MetadataArtifact("codehaus",
+ "plexus-utils",
+ version="1.2",
+ namespace="codehaus",
+ extension="pom",
+ path="/usr/share/maven-poms/JPP.plexus-utils-plexus-utils.pom",
+ properties={'requiresJava': '1.5'}) in prov)
+
+ @depmapfile("depmap_namespace_requires.xml")
+ def test_requires_namespace(self, d):
+ reqs = d.get_required_artifacts()
+
+ self.assertEqual(len(reqs), 6)
+
+ self.assertTrue(MetadataDependency("org.apache.maven",
+ "maven-project",
+ requestedVersion="12") in reqs)
+
+ self.assertTrue(MetadataDependency("org.codehaus.plexus",
+ "plexus-utils",
+ requestedVersion="12",
+ namespace="plexus") in reqs)
+
+ self.assertTrue(MetadataDependency("org.codehaus.plexus",
+ "plexus-utils",
+ requestedVersion="12",
+ extension="war",
+ namespace="codehaus") in reqs)
+
+ self.assertTrue(MetadataDependency("org.codehaus.plexus",
+ "plexus-utils",
+ requestedVersion="12",
+ resolvedVersion="0.9",
+ namespace="test") in reqs)
+
+ self.assertTrue(MetadataDependency("org.apache.maven.wagon",
+ "wagon-provider-api",
+ requestedVersion="12",
+ classifier="test-jar") in reqs)
+
+ self.assertTrue(MetadataDependency("org.codehaus.plexus",
+ "plexus-container-default",
+ requestedVersion="12") in reqs)
+
+ @depmapfile("depmap_skipped.xml")
+ def test_skipped(self, d):
+ skipped = d.get_skipped_artifacts()
+
+ self.assertEqual(len(skipped), 3)
+
+ self.assertTrue(MetadataSkippedArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin") in skipped)
+
+ self.assertTrue(MetadataSkippedArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin",
+ extension="war") in skipped)
+
+ self.assertTrue(MetadataSkippedArtifact("org.apache.maven.plugins",
+ "maven-idea-plugin",
+ classifier="test-jar") in skipped)
+
+ @depmapfile("depmap_exclusions.xml")
+ def test_exlusions(self, d):
+ skipped = d.get_excluded_artifacts()
+
+ self.assertEqual(len(skipped), 2)
+
+ self.assertTrue(MetadataExclusion("junit",
+ "junit") in skipped)
+
+ self.assertTrue(MetadataExclusion("org.codehaus.plexus",
+ "plexus-utils") in skipped)
+
+ @exception_expected(MetadataInvalidException)
+ @depmapfile("depmap_incorrect_provides.xml")
+ def test_incorrect_provides(self, d):
+ pass
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/test/maven_req_test.py b/test/maven_req_test.py
index edeaa5d..a4424c7 100644
--- a/test/maven_req_test.py
+++ b/test/maven_req_test.py
@@ -140,14 +140,14 @@ class TestMavenReq(unittest.TestCase):
self.assertEqual(set(want), set(sout))
#test for rhbz#1012980
- #@mavenreq(["require_skipped/buildroot/usr/share/maven-metadata/require.xml"])
- #def test_require_skipped(self, stdout, stderr, return_value):
- # self.assertNotEqual(return_value, 0)
- # self.assertNotEqual(stderr, '')
- # lines = stderr.split('\n')
- # self.assertEqual(True, len(lines) > 1)
- # self.assertEqual(lines[-5], 'org.codehaus.plexus:plexus-ant-factory:1.0 ' \
- # 'required by org.apache.commons-lang:commons-lang')
+ @mavenreq(["require_skipped/buildroot/usr/share/maven-metadata/require.xml"])
+ def test_require_skipped(self, stdout, stderr, return_value):
+ self.assertNotEqual(return_value, 0)
+ self.assertNotEqual(stderr, '')
+ lines = stderr.split('\n')
+ self.assertEqual(True, len(lines) > 1)
+ self.assertEqual(lines[-5], 'org.codehaus.plexus:plexus-ant-factory:1.0 ' \
+ 'required by org.apache.commons-lang:commons-lang')
# rhbz#1017701 comment 2
@mavenreq(["aether/buildroot/usr/share/maven-metadata/require.xml"])
diff --git a/test/run_tests.py b/test/run_tests.py
index 17594cb..bcb7ca1 100755
--- a/test/run_tests.py
+++ b/test/run_tests.py
@@ -40,7 +40,7 @@ if __name__ == "__main__":
exclude = ["--exclude"]
# skip these tests
- exclude.append("javadoc_req_test.py")
+ #exclude.append("maven_req_test.py")
args = ['foo'] # nose ignores the first argument
# generate xunit report, if nose version is at least 1.x.x
9 years, 6 months
[tycho] Non-bootstrap build
by Mikolaj Izdebski
commit 5627d07073e80491e5a84c37b75a495aee014a4e
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Thu Dec 4 23:19:43 2014 +0100
Non-bootstrap build
This reverts commit 68883834009387c69ad16f8cf437bfe734241205.
tycho.spec | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/tycho.spec b/tycho.spec
index 058456c..25040e6 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -6,7 +6,7 @@
# This basically uses javac + xmvn to build only the Tycho components
# required to perform a full Tycho build
# Most common usage : A library (in Fedora) used by Tycho's runtime broke API
-%global tycho_bootstrap 1
+%global tycho_bootstrap 0
# Set 'eclipse_bootstrap' if Eclipse from buildroot cannot help build Tycho
# This basically provides a location for usage of pre-bundled Eclipse
# Possible uses : Need to build Tycho before Eclipse in fresh buildroot
@@ -23,7 +23,7 @@
Name: tycho
Version: 0.22.0
-Release: 2.1%{?dist}
+Release: 3%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
Group: Development/Libraries
@@ -62,7 +62,6 @@ Patch6: %{name}-running-env-only.patch
BuildArch: noarch
-BuildRequires: tycho
BuildRequires: java-devel
BuildRequires: maven-local >= 4.2.0
BuildRequires: maven-clean-plugin
@@ -410,6 +409,9 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{_datadir}/xmvn/li
%{_javadocdir}/tycho
%changelog
+* Thu Dec 4 2014 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 0.22.0-3
+- Non-bootstrap build
+
* Thu Dec 4 2014 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 0.22.0-2.1
- fedoraproject-p2: Add support for installation into SCLs
- Bootstrap build
9 years, 6 months
[tycho] Bootstrap build
by Mikolaj Izdebski
commit 68883834009387c69ad16f8cf437bfe734241205
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Thu Dec 4 22:46:11 2014 +0100
Bootstrap build
tycho.spec | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/tycho.spec b/tycho.spec
index 25040e6..058456c 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -6,7 +6,7 @@
# This basically uses javac + xmvn to build only the Tycho components
# required to perform a full Tycho build
# Most common usage : A library (in Fedora) used by Tycho's runtime broke API
-%global tycho_bootstrap 0
+%global tycho_bootstrap 1
# Set 'eclipse_bootstrap' if Eclipse from buildroot cannot help build Tycho
# This basically provides a location for usage of pre-bundled Eclipse
# Possible uses : Need to build Tycho before Eclipse in fresh buildroot
@@ -23,7 +23,7 @@
Name: tycho
Version: 0.22.0
-Release: 3%{?dist}
+Release: 2.1%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
Group: Development/Libraries
@@ -62,6 +62,7 @@ Patch6: %{name}-running-env-only.patch
BuildArch: noarch
+BuildRequires: tycho
BuildRequires: java-devel
BuildRequires: maven-local >= 4.2.0
BuildRequires: maven-clean-plugin
@@ -409,9 +410,6 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{_datadir}/xmvn/li
%{_javadocdir}/tycho
%changelog
-* Thu Dec 4 2014 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 0.22.0-3
-- Non-bootstrap build
-
* Thu Dec 4 2014 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 0.22.0-2.1
- fedoraproject-p2: Add support for installation into SCLs
- Bootstrap build
9 years, 6 months
[javapackages] [xmvn-resolve] Properly execute the command
by Michal Srb
commit 7359232c43d4cdedb482904c65ce0f2626aa02ae
Author: Michal Srb <msrb(a)redhat.com>
Date: Thu Dec 4 18:34:04 2014 +0100
[xmvn-resolve] Properly execute the command
python/javapackages/xmvn/xmvn_resolve.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/python/javapackages/xmvn/xmvn_resolve.py b/python/javapackages/xmvn/xmvn_resolve.py
index 13a7537..d251253 100644
--- a/python/javapackages/xmvn/xmvn_resolve.py
+++ b/python/javapackages/xmvn/xmvn_resolve.py
@@ -48,9 +48,10 @@ class XMvnResolve(object):
@staticmethod
def process_raw_request(raw_request_list, scl=None):
+ command = "{tool} {args}".format(tool=XMvnResolve.tool,
+ args="--raw-request")
request = XMvnResolve._join_raw_requests(raw_request_list)
- rc, stdout, stderr = execute_command(XMvnResolve.tool,
- args=["--raw-request"],
+ rc, stdout, stderr = execute_command(command,
shell=True,
input=request,
enable_scl=scl)
9 years, 6 months
[javapackages] Remove trailing comma in JSON config
by Michal Srb
commit 394709e8f66fdb5b4568d409532366dfe96dc8e1
Author: Michal Srb <msrb(a)redhat.com>
Date: Thu Dec 4 18:10:16 2014 +0100
Remove trailing comma in JSON config
etc/javapackages-config.json | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/etc/javapackages-config.json b/etc/javapackages-config.json
index a1a770d..3b2a460 100644
--- a/etc/javapackages-config.json
+++ b/etc/javapackages-config.json
@@ -18,5 +18,5 @@
"always_generate": [
"jpackage-utils"
]
- },
+ }
}
9 years, 6 months