[javapackages] [doc] Dependency handling
by Michael Šimáček
commit 220298d53572a618e98dfb9e9ae4220bbbf164c3
Author: Michael Simacek <msimacek(a)redhat.com>
Date: Thu Apr 9 18:30:24 2015 +0200
[doc] Dependency handling
doc/dependency_handling.txt | 78 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 77 insertions(+), 1 deletions(-)
---
diff --git a/doc/dependency_handling.txt b/doc/dependency_handling.txt
index e67d6b0..dfe8090 100644
--- a/doc/dependency_handling.txt
+++ b/doc/dependency_handling.txt
@@ -1,5 +1,81 @@
WORK IN PROGRESS
-mizdebsk, 25 Oct 2013
+msimacek, 2015-04-09
Describe RPM Provides and Requires, their interactions especially with relation
to JAR file identification, explain mvn(gId:aId...) strings.
+
+RPM has multiple types of metadata to describe dependency relationships
+between packages. The two basic types are Requires and Provides.
+Requires denote that a package needs something to be present at
+runtime to work correctly and the package manager is supposed to ensure
+that requires are met. A single Requires item can specify a package or
+a virtual provide.
+RPM Provides are a way to express that a package provides certain
+capability that other packages might need. In case of Maven packages,
+the Provides are used to denote that a package contains certain Maven
+artifact. They add more flexibility to
+the dependency management as single package can have any number of
+provides, and they can be moved across different packages without
+breaking other packages' requires.
+Provides are usually generated by automatic tools based on the
+information from the built binaries or package source.
+
+.Dependency handling for Maven packages
+The Java packaging tooling on Fedora provides automatic Requires and
+Provides generation for packages built using XMvn. The Provides are based
+on Maven artifact coordinates of artifacts that were installed by the
+currenlty being built. They are generated for each subpackage
+separately. They follow a general format
+`mvn(groupId:artifactId:extension:classifier:version)`, where the
+extension is omitted if it's `jar` and classifier is omitted if empty.
+Version is present only for compat artifacts, but the trailing colon has
+to be present unless it's a Jar artifact with no classifier.
+
+[source,shell]
+--------------
+# Example provide for Jar artifact
+mvn(org.eclipse.jetty:jetty-server)
+# Example provide for POM artifact
+mvn(org.eclipse.jetty:jetty-parent:pom:)
+# Example provide for Jar artifact with classifier
+mvn(org.sonatype.sisu:sisu-guice::no_aop:)
+--------------
+
+The generated Requires are based on dependencies specified in Maven POMs
+in the project. Only dependencies with `scope` set to either `compile`,
+`runtime` or not set at all are used for Requires generation.
+Requires don't rely on package names and instead always
+use virtual provides that were described above, in exactly the same
+format, in order to be satisfieable by the already existing provides.
+For packages consisting of multiple subpackages, Requires are generated
+separately for each subpackage. Additionally, Requires that point to an
+artifact in a different subpackage of the same source package are
+generated with exact versions to prevent version mismatches between
+artifacts belonging to the same project.
+
+The requires generator also always generates Requires on `java-headless`
+and `javapackages-tools`.
+
+.Querying Requires and Provides of built packages
+The generated Requires and Provides of built packages can be queried
+using `rpm`:
+[source,shell]
+--------------
+rpm -qp --provides path/to/example-1.0.noarch.rpm
+rpm -qp --requires path/to/example-1.0.noarch.rpm
+-------------
+
+[TIP]
+=====
+See also <<querying_repositories, Querying Fedora repositories>>
+=====
+
+.Generating BuildRequires
+While Requires and Provides are automated for Maven projects,
+BuildRequires still remain a manual task. However, it can be at least
+a bit simplified. XMvn ships a script `xmvn-builddep` that takes
+a `build.log` output from mock and prints maven-style BuildRequires on
+artifacts that were actually used during the build. It doesn't help you
+to figure out what the BuildRequires are before you actually build it,
+but it may help you to have a minimal set of BuildRequires that are less
+likely to break, as they don't rely on transitive dependencies.
9 years
[Bug 1119283] New: ant: Split libraries into subpackage
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1119283
Bug ID: 1119283
Summary: ant: Split libraries into subpackage
Product: Fedora
Version: 21
Component: ant
Assignee: jcapik(a)redhat.com
Reporter: mizdebsk(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: akurtako(a)redhat.com,
java-sig-commits(a)lists.fedoraproject.org,
jcapik(a)redhat.com, jpazdziora(a)redhat.com,
krzysztof.daniel(a)gmail.com, mizdebsk(a)redhat.com,
mmatejov(a)redhat.com, msrb(a)redhat.com
Description of problem:
Ant application requires JDK, but ant libraries can be (and often are) used
with just headless JRE.
Library part of ant should be split into subpackage to reduce unneeded
dependencies for applications that use ant as a library only.
Version-Release number of selected component (if applicable):
1.9.4-3
--
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=tWLW1SiWQu&a=cc_unsubscribe
9 years
[Bug 753201] New: when javac is java-1.5.0-gcj ant seems to not be able to access environmental variables
by Red Hat Bugzilla
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
Summary: when javac is java-1.5.0-gcj ant seems to not be able to access environmental variables
https://bugzilla.redhat.com/show_bug.cgi?id=753201
Summary: when javac is java-1.5.0-gcj ant seems to not be able
to access environmental variables
Product: Fedora
Version: 15
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: unspecified
Priority: unspecified
Component: ant
AssignedTo: pcheung(a)redhat.com
ReportedBy: caolanm(a)redhat.com
QAContact: extras-qa(a)fedoraproject.org
CC: pcheung(a)redhat.com, akurtako(a)redhat.com,
mmatejov(a)redhat.com,
java-sig-commits(a)lists.fedoraproject.org
Classification: Fedora
Story Points: ---
Type: ---
Created attachment 533096
--> https://bugzilla.redhat.com/attachment.cgi?id=533096
sample build.xml
Description of problem:
ant doesn't seem to be able to resolve environment variables (or something
clears the env) if the java in use is gcj rather than openjdk
Version-Release number of selected component (if applicable):
ant-1.8.2-3.fc15
How reproducible:
100%
Steps to Reproduce:
1. alternatives --set javac /usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin/javac
2. ant -f build.xml gives the contents of $USERNAME as expected
3. alternatives --set javac /usr/lib/jvm/java-1.5.0-gcj/bin/javac
4. ant -f build.xml gives "${env.USERNAME}"
Actual results:
username
Expected results:
${env.USERNAME} string
Additional info:
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
9 years
[Bug 1210187] New: plexus-graph should be retired
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1210187
Bug ID: 1210187
Summary: plexus-graph should be retired
Product: Fedora
Version: rawhide
Component: plexus-graph
Assignee: lkundrak(a)v3.sk
Reporter: mizdebsk(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: java-sig-commits(a)lists.fedoraproject.org,
lkundrak(a)v3.sk
I believe that plexus-graph package should be retired in Fedora rawhide.
Reason: project has been retired upstream. I've checked and nothing requires or
bulid-requires this package.
Package owner: Can you retire the package in f23? Or if you prefer I can retire
it - in this case just orphan the package and let me know and I will retire it
myself.
--
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=IHoitqVTpm&a=cc_unsubscribe
9 years
[Bug 1202309] New: javapackages-tools: Missing versioned java-headless requires
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1202309
Bug ID: 1202309
Summary: javapackages-tools: Missing versioned java-headless
requires
Product: Fedora
Version: rawhide
Component: javapackages-tools
Assignee: msrb(a)redhat.com
Reporter: mizdebsk(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: java-sig-commits(a)lists.fedoraproject.org,
mat.booth(a)redhat.com, mizdebsk(a)redhat.com,
msimacek(a)redhat.com, msrb(a)redhat.com
Description of problem:
Generated java-headless requires ignore "requireJava" property from artifact
metadata generated by XMvn.
Version-Release number of selected component (if applicable):
4.4.0-2
Steps to Reproduce:
1. install latest xmvn from jenkins
2. build maven-downloader from master
Actual results:
versionless requires on java-headless generated
Expected results:
versioned requires on java-headless generated
--
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=8eqeUDzsuw&a=cc_unsubscribe
9 years
[javapackages] Bump release in docs...
by Michal Srb
commit a710c3e726a58aa64a24056f8b05b7f7fa009570
Author: Michal Srb <msrb(a)redhat.com>
Date: Thu Apr 9 10:50:37 2015 +0200
Bump release in docs...
this should be automated, keep forgetting about it
doc/index.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/doc/index.txt b/doc/index.txt
index bbee7fa..7a5a96a 100644
--- a/doc/index.txt
+++ b/doc/index.txt
@@ -1,7 +1,7 @@
Java Packaging HOWTO
====================
-v4.3.2, 2015-01-12
+v4.5.0, 2015-04-09
include::preamble.txt[]
9 years
[javapackages] Post release version bump: 4.6.0-SNAPSHOT
by Michal Srb
commit 66cc192df3d348124f3e16c28c1921e3718784c0
Author: Michal Srb <msrb(a)redhat.com>
Date: Thu Apr 9 10:24:55 2015 +0200
Post release version bump: 4.6.0-SNAPSHOT
VERSION | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/VERSION b/VERSION
index a84947d..1c9c0da 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.5.0
+4.6.0-SNAPSHOT
9 years