Bug 1221474 - Review Request: rrd4j - A high performance data logging and graphing system for time series data
Summary: Review Request: rrd4j - A high performance data logging and graphing system f...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1302003
Blocks: FE-JAVASIG
TreeView+ depends on / blocked
 
Reported: 2015-05-14 06:45 UTC by gil cattaneo
Modified: 2017-11-29 08:34 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description gil cattaneo 2015-05-14 06:45:29 UTC
Spec URL: https://gil.fedorapeople.org/rrd4j.spec
SRPM URL: https://gil.fedorapeople.org/rrd4j-2.2-1.fc20.src.rpm
Description:
RRD4J is a high performance data logging and graphing system
for time series data, implementing RRDTool's functionality
in Java. It follows much of the same logic and uses the
same data sources, archive types and definitions as RRDTool does.

RRD4J supports all standard operations on Round Robin Database
(RRD) files: CREATE, UPDATE, FETCH, LAST, DUMP, EXPORT and GRAPH.
RRD4J's API is made for those who are familiar with
RRDTool's concepts and logic, but prefer to work with pure Java
(no native functions or libraries, no Runtime.exec(), RRDTool
does not have to be present). 
Fedora Account System Username: gil

Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=9732926

Neo4j http://www.neo4j.org/ dependency

Comment 3 Upstream Release Monitoring 2015-12-04 10:50:12 UTC
gil's scratch build of rrd4j-2.2.1-1.fc23.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=12051015

Comment 4 Robert-André Mauchin 2017-11-28 23:30:58 UTC
Hello,

If you're still willing to package this:
 
 - Update the SPEC to version 3.2

→ New BR for this:

BuildRequires: mvn(com.sleepycat:je)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(org.mongodb:mongo-java-driver)
BuildRequires: mvn(org.mongodb:mongodb-driver)
BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
BuildRequires: mvn(org.easymock:easymock)
BuildRequires: mvn(org.jacoco:jacoco-maven-plugin)

→ Remove:

%pom_change_dep :mongo-java-driver ::2

→ Updated patch for the fonts:

diff -up rrd4j-3.2/src/main/java/org/rrd4j/graph/RrdGraphConstants.java.use-system-fonts rrd4j-3.2/src/main/java/org/rrd4j/graph/RrdGraphConstants.java
--- rrd4j-3.2/src/main/java/org/rrd4j/graph/RrdGraphConstants.java.use-system-fonts	2017-11-11 13:33:45.000000000 +0100
+++ rrd4j-3.2/src/main/java/org/rrd4j/graph/RrdGraphConstants.java	2017-11-29 00:02:05.325110896 +0100
@@ -1,6 +1,8 @@
 package org.rrd4j.graph;
 
 import java.awt.*;
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Calendar;
@@ -272,13 +274,22 @@ public interface RrdGraphConstants {
          * @return a new {@link java.awt.Font} instance
          */
         public static Font getFont(int type, int size) {
+
+            InputStream fontstream = null;
+
             String fontPath;
+
             if (type == Font.BOLD)
-                fontPath = "/DejaVuSansMono-Bold.ttf";
+                fontPath = "/usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf";
             else
-                fontPath = "/DejaVuSansMono.ttf";
+                fontPath = "/usr/share/fonts/dejavu/DejaVuSansMono.ttf";
 
-            InputStream fontstream = RrdGraphConstants.class.getResourceAsStream(fontPath);
+            try {
+                fontstream = new BufferedInputStream(new FileInputStream(fontPath));
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                System.err.println("Font not loaded.");
+            }
             try {
                 return Font.createFont(Font.TRUETYPE_FONT, fontstream).deriveFont(type == Font.BOLD ? Font.BOLD : Font.PLAIN, size);
             } catch (FontFormatException e) {


→ Changelog:

* Tue Nov 28 2017 Gil Cattaneo <puntogil@libero.it> 3.2-1
- update to 3.2


 - Use a more meaningful name for your archive, with:

Source0:       https://github.com/rrd4j/rrd4j/archive/%{version}/%{name}-%{version}.tar.gz

 - Not needed:

Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils

Comment 5 Fabrice Bacchella 2017-11-29 08:34:47 UTC
I think that a 
+                ex.printStackTrace();
+                System.err.println("Font not loaded.");
 in a library is never a good idea.

I would rather wrap the Exception in a RuntimeException.


Note You need to log in before you can comment on or make changes to this bug.