[javapackages] Rework requires generator to work with new depmaps
by Stanislav Ochotnicky
commit ad7eba5bf3d450f3d6308b12095b1a461308ffe3
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Thu Dec 6 16:05:44 2012 +0100
Rework requires generator to work with new depmaps
Instead of parsing poms in Python we now let Maven do the hard work and prepare
the metadata for us. xmvn will add autoRequires metadata into fragment files so
that we can use them here. We will now also add automatic requires on
jpackage-utils and correct version of java depending on target version during
compilation
depgenerators/fileattrs/maven.attr | 5 +-
depgenerators/maven.req | 79 +++++++++++++++++++++--------------
2 files changed, 49 insertions(+), 35 deletions(-)
---
diff --git a/depgenerators/fileattrs/maven.attr b/depgenerators/fileattrs/maven.attr
index 526fd45..4e5b535 100644
--- a/depgenerators/fileattrs/maven.attr
+++ b/depgenerators/fileattrs/maven.attr
@@ -1,4 +1,3 @@
%__maven_provides %{_rpmconfigdir}/maven.prov
-#%__maven_requires %{_rpmconfigdir}/maven.req
-%__maven_path ^%{_datadir}/maven-fragments/.*
-
+%__maven_requires %{_rpmconfigdir}/maven.req
+%__maven_path ^%{_mavendepmapfragdir}/.*
diff --git a/depgenerators/maven.req b/depgenerators/maven.req
index 7eae83a..cd177f3 100755
--- a/depgenerators/maven.req
+++ b/depgenerators/maven.req
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# Copyright (c) 2011, Red Hat, Inc
+# Copyright (c) 2012, Red Hat, Inc
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,41 +29,56 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Authors:
-# Jaromir Capik <jcapik(a)redhat.com>
+# Stanislav Ochotnicky <sochotnicky(a)redhat.com>
#
-# List of scopes considered runtime
-runtime_scopes = [None, "runtime"]
import sys
-import xml.dom.minidom
+from xml.etree.ElementTree import fromstring
+from StringIO import StringIO
-# Returns a list of direct subtags matching the tagname
-def getTag(tag,tagname):
- result = []
- for node in tag.childNodes:
- if node.nodeType == node.ELEMENT_NODE and node.tagName == tagname:
- result.append(node)
- return result
+class TagBuilder:
+ def __init__ (self, filelist=None):
+ if filelist == None:
+ filelist = sys.stdin
+ paths = map (lambda x: x.rstrip (), filelist.readlines ())
+ # this is always required because jpackage-utils owns the directory
+ print("jpackage-utils")
+ for path in paths:
+ self.print_mvn_requires(path)
-# Returns a text contained in the last subtag matching the tagname
-def getText(tag,tagname):
- result = None
- for node in getTag(tag,tagname):
- for text in node.childNodes:
- if text.nodeType == node.TEXT_NODE:
- result = text.data
- return result
+ def print_mvn_requires(self, path):
+ buf = StringIO()
+ buf.write('<fragments>\n')
+ with open(path) as f:
+ buf.write(f.read())
+ buf.write('</fragments>')
+ fragments = buf.getvalue()
+ doc = fromstring(fragments)
+ for mpart in doc.findall('.//autoRequires'):
+ groupId = mpart.find('groupId').text
+ artifactId = mpart.find('artifactId').text
+ print("mvn(%s:%s)" %(groupId, artifactId))
-# Main loop (project / dependencies / dependency / ...)
-for pomfile in sys.stdin:
- dom = xml.dom.minidom.parse(pomfile.rstrip())
- for project_tag in getTag(dom, "project"):
- for dependencies_tag in getTag(project_tag, "dependencies"):
- for dependency_tag in getTag(dependencies_tag, "dependency"):
- scope = getText(dependency_tag,"scope")
- if scope in runtime_scopes:
- groupId = getText(dependency_tag,"groupId")
- artifactId = getText(dependency_tag,"artifactId")
- if groupId != None and artifactId != None:
- print "mvn(%s:%s)" %(groupId, artifactId)
+ jreq = doc.find('.//requiresJava')
+ if jreq is not None:
+ jreq = jreq.text
+ jsplit = jreq.split('.')
+ if len(jsplit) != 2:
+ # if we don't have major.minor format, just ignore version
+ print("java")
+ return
+ try:
+ major = int(jsplit[0])
+ minor = int(jsplit[1])
+ if major > 1 or minor > 5:
+ print("java >= 1:%s.%s" % (major, minor))
+ else:
+ print("java >= %s.%s" % (major, minor))
+ except ValueError:
+ # what? not a numbered major/minor java release?
+ print "java"
+
+
+if __name__ == "__main__":
+ builder = TagBuilder ()
11 years, 6 months
[javapackages] Skip provides generation for compatibility packages
by Stanislav Ochotnicky
commit c928e321067dffc70038cfa73dce261bd9b0b5fa
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Thu Dec 6 16:04:26 2012 +0100
Skip provides generation for compatibility packages
depgenerators/maven.prov | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/depgenerators/maven.prov b/depgenerators/maven.prov
index 0d84f6d..76ca0c5 100755
--- a/depgenerators/maven.prov
+++ b/depgenerators/maven.prov
@@ -36,8 +36,6 @@ from xml.etree.ElementTree import fromstring
from StringIO import StringIO
class TagBuilder:
- mavenns = "{http://maven.apache.org/POM/4.0.0}"
-
def __init__ (self, filelist=None):
if filelist == None:
filelist = sys.stdin
@@ -53,7 +51,10 @@ class TagBuilder:
buf.write('</fragments>')
fragments = buf.getvalue()
doc = fromstring(fragments)
- for mpart in doc.iter('maven'):
+ if doc.find('.//skipProvides') is not None:
+ # this is compat package, don't generate mvn provides
+ return
+ for mpart in doc.findall('.//maven'):
groupId = mpart.find('groupId').text
artifactId = mpart.find('artifactId').text
version = mpart.find('version').text
11 years, 6 months
[javapackages] Improve function names a bit
by Stanislav Ochotnicky
commit b15e92c92198af918ef51a98e3b41ac2ae65ccea
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Thu Dec 6 15:31:55 2012 +0100
Improve function names a bit
depgenerators/maven.prov | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/depgenerators/maven.prov b/depgenerators/maven.prov
index 9f0e266..0d84f6d 100755
--- a/depgenerators/maven.prov
+++ b/depgenerators/maven.prov
@@ -43,9 +43,9 @@ class TagBuilder:
filelist = sys.stdin
paths = map (lambda x: x.rstrip (), filelist.readlines ())
for path in paths:
- self.get_mvn_provide (path)
+ self.print_mvn_provides(path)
- def get_mvn_provide (self, path):
+ def print_mvn_provides(self, path):
buf = StringIO()
buf.write('<fragments>\n')
with open(path) as f:
11 years, 6 months
Broken dependencies: maven-one-plugin
by Fedora Koji Build System
maven-one-plugin has broken dependencies in the rawhide tree:
On x86_64:
maven-one-plugin-1.2-9.fc18.noarch requires maven-shared-model-converter
On i386:
maven-one-plugin-1.2-9.fc18.noarch requires maven-shared-model-converter
Please resolve this as soon as possible.
11 years, 6 months
[maven-enforcer] Add mising R: forge-parent
by Mikolaj Izdebski
commit 3a1ed261b0bf5b8d57d6f7ea759b7d28575662b9
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Thu Dec 6 14:03:20 2012 +0100
Add mising R: forge-parent
maven-enforcer.spec | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/maven-enforcer.spec b/maven-enforcer.spec
index 65b1d1b..30eff39 100644
--- a/maven-enforcer.spec
+++ b/maven-enforcer.spec
@@ -1,6 +1,6 @@
Name: maven-enforcer
Version: 1.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Maven Enforcer
Group: Development/Libraries
@@ -69,6 +69,7 @@ Summary: Enforcer Rules
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}-rules
+Requires: forge-parent
Obsoletes: maven2-plugin-enforcer <= 0:2.0.8
Provides: maven2-plugin-enforcer = 1:%{version}-%{release}
@@ -146,6 +147,9 @@ cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
%changelog
+* Thu Dec 6 2012 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 1.2-2
+- Add mising R: forge-parent
+
* Mon Dec 3 2012 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 1.2-1
- Update to upstream version 1.2
11 years, 6 months
[Bug 880409] New: "ls" won't work after fusermount and pm-hibernate
by Red Hat Bugzilla
Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=880409
Bug ID: 880409
Summary: "ls" won't work after fusermount and pm-hibernate
Product: Fedora
Version: rawhide
Component: hibernate
Severity: high
Priority: unspecified
Reporter: masterid2(a)gmail.com
Description of problem:
"ls" won't work after fusermount and pm-hibernate
This can happen in all Fedora releases.
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.sshfs mount a remote directory
2.pm-hibernate
3.awake ur system after a while (maybe 1 hour)
Actual results:
List directory commands like "ls" won't work.
File browsers won't work either.
No respond from those programs.
Expected results:
They work properly.
Additional info:
Linux 3.6.7-4.fc17.x86_64 #1 x86_64 x86_64 x86_64 GNU/Linux
--
You are receiving this mail because:
You are on the CC list for the bug.
11 years, 6 months
[tomcat/f16] Updated to 7.0.33
by Ivan Afonichev
commit ce6bf1e7184ece6b101eb4177a611b62ebb6dbae
Author: Ivan Afonichev <ivan.afonichev(a)gmail.com>
Date: Sun Dec 2 02:20:24 2012 +0400
Updated to 7.0.33
- Resolves: rhbz 873620 need chkconfig for update-alternatives
- Resolves: rhbz 873707 fix several security issues
- Resolves: rhbz 883806 refix logdir ownership
- Resolves: rhbz 820119 Remove bundled apache-commons-dbcp
sources | 2 +-
tomcat.spec | 24 ++++++++++++++++++++----
2 files changed, 21 insertions(+), 5 deletions(-)
---
diff --git a/sources b/sources
index 69a44df..b76a2e2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a7fa41d09ccc1dc324c35fdebebd2afe apache-tomcat-7.0.27-src.tar.gz
+1693d330f195366a6cd852bf3ce3eb95 apache-tomcat-7.0.33-src.tar.gz
diff --git a/tomcat.spec b/tomcat.spec
index f2cd182..26f1c4c 100644
--- a/tomcat.spec
+++ b/tomcat.spec
@@ -31,7 +31,7 @@
%global jspspec 2.2
%global major_version 7
%global minor_version 0
-%global micro_version 27
+%global micro_version 33
%global packdname apache-tomcat-%{version}-src
%global servletspec 3.0
%global elspec 2.2
@@ -54,7 +54,7 @@
Name: tomcat
Epoch: 0
Version: %{major_version}.%{minor_version}.%{micro_version}
-Release: 2%{?dist}
+Release: 1%{?dist}
Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API
Group: System Environment/Daemons
@@ -182,6 +182,8 @@ Summary: Apache Tomcat JSP API implementation classes
Provides: jsp = %{jspspec}
Provides: jsp22
Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
+Requires(post): chkconfig
+Requires(postun): chkconfig
%description jsp-%{jspspec}-api
Apache Tomcat JSP API implementation classes.
@@ -208,6 +210,8 @@ Summary: Apache Tomcat Servlet API implementation classes
Provides: servlet = %{servletspec}
Provides: servlet6
Provides: servlet3
+Requires(post): chkconfig
+Requires(postun): chkconfig
%description servlet-%{servletspec}-api
Apache Tomcat Servlet API implementation classes.
@@ -217,6 +221,8 @@ Group: Development/Libraries
Summary: Expression Language v1.0 API
Provides: el_1_0_api = %{epoch}:%{version}-%{release}
Provides: el_api = %{elspec}
+Requires(post): chkconfig
+Requires(postun): chkconfig
%description el-%{elspec}-api
Expression Language 1.0.
@@ -273,7 +279,9 @@ export OPT_JAR_LIST="xalan-j2-serializer"
# remove some jars that we'll replace with symlinks later
%{__rm} output/build/bin/commons-daemon.jar \
- output/build/lib/ecj.jar
+ output/build/lib/ecj.jar \
+ output/build/lib/apache-commons-dbcp.jar
+
# remove the cruft we created
%{__rm} output/build/bin/tomcat-native.tar.gz
pushd output/dist/src/webapps/docs/appdev/sample/src
@@ -550,8 +558,9 @@ fi
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%attr(0755,root,tomcat) %dir %{basedir}
%attr(0755,root,tomcat) %dir %{confdir}
-%defattr(0664,root,tomcat,0770)
+%defattr(0664,tomcat,root,0770)
%attr(0770,tomcat,root) %dir %{logdir}
+%defattr(0664,root,tomcat,0770)
%attr(0660,tomcat,tomcat) %{logdir}/catalina.out
%attr(0770,root,tomcat) %dir %{cachedir}
%attr(0770,root,tomcat) %dir %{tempdir}
@@ -643,6 +652,13 @@ fi
%attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service
%changelog
+* Thu Dec 6 2012 Ivan Afonichev <ivan.afonichev(a)gmail.com> 0:7.0.33-1
+- Updated to 7.0.33
+- Resolves: rhbz 873620 need chkconfig for update-alternatives
+- Resolves: rhbz 873707 fix several security issues
+- Resolves: rhbz 883806 refix logdir ownership
+- Resolves: rhbz 820119 Remove bundled apache-commons-dbcp
+
* Tue Apr 10 2012 Ivan Afonichev <ivan.afonichev(a)gmail.com> 0:7.0.27-2
- Fixed tomcat-native download
11 years, 6 months
[Bug 883803] New: javapackages-tools (depgenerators): Please add support for XML depmaps
by Red Hat Bugzilla
Product: Fedora
https://bugzilla.redhat.com/show_bug.cgi?id=883803
Bug ID: 883803
Summary: javapackages-tools (depgenerators): Please add support
for XML depmaps
Product: Fedora
Version: 18
Component: javapackages-tools
Severity: unspecified
Priority: unspecified
Reporter: mizdebsk(a)redhat.com
Description of problem:
javapackages-tools maven provides generator assumes that Maven fragment files
are installed in "unwrapped" format (see below). If fragments are installed as
"wrapped" then maven.prov doesn't generate provides for that package at all.
There are 2 formats of JPP depmaps: XML (aka "wrapped" depmap) and XML fragment
("unwrapped"). The "wrapped" format of depmaps should be the prefered one
because it's valid XML and can be processed by tools that support XML (DOM,
XPP, XSLT, syntax highlighting in text editors, ...).
Version-Release number of selected component (if applicable):
0.8.2-1
Additional info:
The wrapped format was the initial format in JPackage. Maven supports both
wrapped and unwrapped fragments. maven.req is likely affected by this bug too.
--
You are receiving this mail because:
You are on the CC list for the bug.
11 years, 6 months
Broken dependencies: maven-one-plugin
by Fedora Koji Build System
maven-one-plugin has broken dependencies in the rawhide tree:
On x86_64:
maven-one-plugin-1.2-9.fc18.noarch requires maven-shared-model-converter
On i386:
maven-one-plugin-1.2-9.fc18.noarch requires maven-shared-model-converter
Please resolve this as soon as possible.
11 years, 6 months
[javapackages-tools] Update to upstream version 0.8.3
by Stanislav Ochotnicky
commit d1209c2e03046d9fecbadf52f77892076c901ac7
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Wed Dec 5 14:21:05 2012 +0100
Update to upstream version 0.8.3
- Fix maven provides generator for new XML valid fragments
.gitignore | 1 +
javapackages-tools.spec | 6 +++++-
sources | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 1865688..41db9c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@
/javapackages-0.8.0.tar.xz
/javapackages-0.8.1.tar.xz
/javapackages-0.8.2.tar.xz
+/javapackages-0.8.3.tar.xz
diff --git a/javapackages-tools.spec b/javapackages-tools.spec
index 7bd9273..a41b187 100644
--- a/javapackages-tools.spec
+++ b/javapackages-tools.spec
@@ -1,5 +1,5 @@
Name: javapackages-tools
-Version: 0.8.2
+Version: 0.8.3
Release: 1%{?dist}
Summary: Macros and scripts for Java packaging support
@@ -101,6 +101,10 @@ install -p -m 755 scripts/mvn-build $RPM_BUILD_ROOT%{_bindir}
%changelog
+* Wed Dec 5 2012 Stanislav Ochotnicky <sochotnicky(a)redhat.com> - 0.8.3-1
+- Update to upstream version 0.8.3
+- Fix maven provides generator for new XML valid fragments
+
* Fri Nov 30 2012 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 0.8.2-1
- Update to upstream version 0.8.2
diff --git a/sources b/sources
index b69f39c..ac68a36 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d5d45ee1f9458f21709633dac6dcfd3e javapackages-0.8.2.tar.xz
+600c08a53a7126e3bf20d79cf1e9d715 javapackages-0.8.3.tar.xz
11 years, 6 months