Bug 1359473 - Review Request: legendsbrowser - Java-based legends viewer for Dwarf Fortress
Summary: Review Request: legendsbrowser - Java-based legends viewer for Dwarf Fortress
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: gil cattaneo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-24 01:44 UTC by Ben Rosser
Modified: 2016-08-10 10:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-10 07:23:23 UTC
Type: ---
Embargoed:
puntogil: fedora-review+


Attachments (Terms of Use)
spec file (2.64 KB, text/plain)
2016-07-28 20:14 UTC, gil cattaneo
no flags Details
log file (70 bytes, text/plain)
2016-07-28 20:15 UTC, gil cattaneo
no flags Details

Description Ben Rosser 2016-07-24 01:44:32 UTC
Spec URL: https://www.acm.jhu.edu/~bjr/fedora/dwarffortress/fedora/legendsbrowser.spec
SRPM URL: https://www.acm.jhu.edu/~bjr/fedora/dwarffortress/fedora/legendsbrowser-1.0.12-1.fc23.src.rpm

Description:
Legends Browser is an multi-platform, open source, java-based legends viewer
for Dwarf Fortress. It works in the browser of your choice and recreates Legends
Mode, with objects accessible as links. Several statistics and overviews are
added.

Fedora Account System Username: tc01

rpmlint output:

$ rpmlint ../RPMS/noarch/legendsbrowser-1.0.12-1.fc23.noarch.rpm 
legendsbrowser.noarch: W: spelling-error %description -l en_US multi -> mulch, mufti
legendsbrowser.noarch: W: no-manual-page-for-binary legendsbrowser

$ rpmlint ../RPMS/noarch/legendsbrowser-javadoc-1.0.12-1.fc23.noarch.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

$ rpmlint ../SRPMS/legendsbrowser-1.0.12-1.fc23.src.rpm 
legendsbrowser.src: W: spelling-error %description -l en_US multi -> mulch, mufti

Comment 1 gil cattaneo 2016-07-25 13:18:52 UTC
Please, remove useless
Requires:       dom4j
Requires:       junit
Requires:       guava
Requires:       reflections
Requires:       velocity
Requires:       apache-commons-logging, apache-commons-lang, apache-commons-collections, apache-commons-cli

require are generate during the build

%dir %{_javadir}/%{name}
prevent duplicate file

Add for each single JS library or fonts : Provides: bundled(foo) =fooversion
where foo is jquery, bootstrap, leaflet, d3js, font-awesome, glyphicons-halflings-regular

Comment 2 gil cattaneo 2016-07-25 13:22:12 UTC
Seem also which most of the java/source code are without license headers.

Please, ask to upstream to confirm the licensing of code and/or content/s,
and add license headers

https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/LicensingGuidelines#License_Clarification

Comment 3 Ben Rosser 2016-07-28 20:10:36 UTC
Thanks for taking a look! Updated source and spec, also some comments below:

Spec URL: https://tc01.fedorapeople.org/dwarffortress/legendsbrowser.spec
SRPM URL: https://tc01.fedorapeople.org/dwarffortress/legendsbrowser-1.0.12-2.fc24.src.rpm

> require are generate during the build

My bad; for some reason, I assumed this was not the case. (This is my first Java package).

> %dir %{_javadir}/%{name}
> prevent duplicate file

Is this no longer necessary? I was following this possibly obsolete document on Java packaging (https://fedorahosted.org/released/javapackages/doc/#maven) and it had a %dir file include of that form. Anyway, I commented it out in the updated spec.

> Add for each single JS library or fonts : Provides: bundled(foo) =fooversion

Whoops. Added this information, and updated license accordingly ("and BSD and CC-BY").

> Seem also which most of the java/source code are without license headers.

> Please, ask to upstream to confirm the licensing of code and/or content/s,
and add license headers

I actually sort of have already have done so, although I did not ask for licensing headers-- prior to me filing https://github.com/robertjanetzko/LegendsBrowser/issues/9, upstream was not even distributing a LICENSE file or making any other reference to the license of the software that I could find (!). I can follow up though and verify that *all* the code that isn't third-party JS/CSS/fonts is indeed MIT if this is not sufficient.

Comment 4 gil cattaneo 2016-07-28 20:14:55 UTC
Created attachment 1185258 [details]
spec file

Comment 5 gil cattaneo 2016-07-28 20:15:33 UTC
Created attachment 1185259 [details]
log file

Comment 6 gil cattaneo 2016-07-28 20:20:31 UTC
(In reply to Ben Rosser from comment #3)
> Thanks for taking a look! Updated source and spec, also some comments below:
> 
> Spec URL: https://tc01.fedorapeople.org/dwarffortress/legendsbrowser.spec
> SRPM URL:
> https://tc01.fedorapeople.org/dwarffortress/legendsbrowser-1.0.12-2.fc24.src.
> rpm
> 
> > require are generate during the build
> 
> My bad; for some reason, I assumed this was not the case. (This is my first
> Java package).

see spec file attached added
Requires:      mvn(commons-collections:commons-collections)
Requires:      mvn(commons-lang:commons-lang)
because them are missing in classpath

> > %dir %{_javadir}/%{name}
> > prevent duplicate file
> Is this no longer necessary? I was following this possibly obsolete document
> on Java packaging
> (https://fedorahosted.org/released/javapackages/doc/#maven) and it had a
> %dir file include of that form. Anyway, I commented it out in the updated
> spec.

yes is not necessary

> > Add for each single JS library or fonts : Provides: bundled(foo) =fooversion
> 
> Whoops. Added this information, and updated license accordingly ("and BSD
> and CC-BY").

OFL: fontawesome-fonts-web (our spec file use this license)

> > Seem also which most of the java/source code are without license headers.
> 
> > Please, ask to upstream to confirm the licensing of code and/or content/s,
> and add license headers
> 
> I actually sort of have already have done so, although I did not ask for
> licensing headers-- prior to me filing
> https://github.com/robertjanetzko/LegendsBrowser/issues/9, upstream was not
> even distributing a LICENSE file or making any other reference to the
> license of the software that I could find (!). I can follow up though and
> verify that *all* the code that isn't third-party JS/CSS/fonts is indeed MIT
> if this is not sufficient.

Comment 7 gil cattaneo 2016-07-28 20:26:15 UTC
us really necessary javassist?
i tried the launcher script but seem fail for unavailable  legendsbrowser.properties file
another "problem" a log file is generated. should be in / var / tmp or temp directory ...

Comment 8 Ben Rosser 2016-07-28 20:47:23 UTC
> see spec file attached added
> Requires:      mvn(commons-collections:commons-collections)
> Requires:      mvn(commons-lang:commons-lang)
> because them are missing in classpath

Oh, I see. Thanks for posting your updated spec! I'll add these Requires: to mine.

> OFL: fontawesome-fonts-web (our spec file use this license)

Oh. I skimmed right over the "Font licenses" part of the fontawesome license page for some reason; yes, it should indeed be OFL and not CC-BY. Thanks!

> us really necessary javassist?

javassist does seem to be necessary on the %jpackage_script line in order for it to launch and not crash. But if I'm reading the traceback generated when it's *not* there correctly, this is because of reflections:

https://paste.fedoraproject.org/397089/38725146/

https://github.com/robertjanetzko/LegendsBrowser/blob/master/src/main/java/legends/RequestThread.java#L53 

> i tried the launcher script but seem fail for unavailable  > legendsbrowser.properties file
> another "problem" a log file is generated. should be in / var / tmp or temp > directory ...

It creates legendsbrowser.properties in your current directory when first ran if it's not there (and also the logfile in the same directory), so the file being missing shouldn't be a problem. .properties seems to just store the location legendsbrowser was last ran in and *should* really be in, say, ~/.config/legendsbrowser/.

It would be simple enough to patch the launcher script to run in another directory, I guess, but then the log and properties file will still be created together. Alternatively I guess the source (e.g. https://github.com/robertjanetzko/LegendsBrowser/blob/6ca346eed60cf1dd4e7d620503a16f537963edbc/src/main/java/legends/Application.java#L26) could be patched to look for and create them in a different place... what do you suggest?

Once I fix this I'll repost the spec and srpm (with the above issues dealt with too).

Comment 9 gil cattaneo 2016-07-28 21:01:47 UTC
(In reply to Ben Rosser from comment #8)
> javassist does seem to be necessary on the %jpackage_script line in order
> for it to launch and not crash. But if I'm reading the traceback generated
> when it's *not* there correctly, this is because of reflections:
> 
> https://paste.fedoraproject.org/397089/38725146/
> 
> https://github.com/robertjanetzko/LegendsBrowser/blob/master/src/main/java/
> legends/RequestThread.java#L53 

yes is required. Please add as "Requires" if necessary

> > i tried the launcher script but seem fail for unavailable  > legendsbrowser.properties file
> > another "problem" a log file is generated. should be in / var / tmp or temp > directory ...
> 
> It creates legendsbrowser.properties in your current directory when first
> ran if it's not there (and also the logfile in the same directory), so the
> file being missing shouldn't be a problem. .properties seems to just store
> the location legendsbrowser was last ran in and *should* really be in, say,
> ~/.config/legendsbrowser/.
> 
> It would be simple enough to patch the launcher script to run in another
> directory, I guess, but then the log and properties file will still be
> created together. Alternatively I guess the source (e.g.
> https://github.com/robertjanetzko/LegendsBrowser/blob/
> 6ca346eed60cf1dd4e7d620503a16f537963edbc/src/main/java/legends/Application.
> java#L26) could be patched to look for and create them in a different
> place... what do you suggest?

yes for avoid log and props files scattered / dispersed throughout the system :)

> Once I fix this I'll repost the spec and srpm (with the above issues dealt
> with too).

seem you have missing "Provides:      bundled(leaflet-opacity-controlsjs)" (the name ... )
https://github.com/lizardtechblog/Leaflet.OpacityControls

Comment 10 gil cattaneo 2016-07-28 21:03:43 UTC
Sorry fot the noise. Please, use:
Source0:       https://github.com/robertjanetzko/LegendsBrowser/archive/%{version}/%{name}-%{version}.tar.gz

Comment 11 gil cattaneo 2016-07-28 21:07:35 UTC
... and must be used license macro also in javadoc sub package
if you want skip the generation of javadoc file pass this argument to
%mvn_build -j

Comment 12 gil cattaneo 2016-07-28 21:11:22 UTC
BuildRequires: ...,  javapackages-tools is useless

Comment 13 Ben Rosser 2016-07-29 20:01:35 UTC
All of the above should now be fixed! I wrote a patch to stick the log and properties file in ~/.local/share/legendsbrowser/ and then modified the jpackage script using sed to try and create that directory if it does not already exist. 

Spec URL: https://tc01.fedorapeople.org/dwarffortress/legendsbrowser.spec
SRPM URL: https://tc01.fedorapeople.org/dwarffortress/legendsbrowser-1.0.12-3.fc24.src.rpm

There was another leaflet plugin (leaflet-minimap) that I added an additional bundled provides on, too. (Unfortunately there doesn't seem to be versioning information for either, so rpmlint is unhappy).

- Fix versioning information; fontawesome fonts are under OFL.
- Merge Java packaging fixes from gil (pom_xpath_remove and shorter jpackage_script).
- Add missing Requires dependencies that are not automatically picked up.
- Remove unnecessary buildrequires dependency on javapackages-tools.
- Add patch to move log and properties files into ~/.local/share/legendsbrowser/.
- Rewrote Source0 URL to include name-version instead of just version.
- Add (unversioned) bundled provides on leaflet plugins.
- Added license file to javadoc subpackage as well.

Comment 14 gil cattaneo 2016-07-29 22:04:10 UTC
Ok, thanks!
should be mvn(org.javassist:javassist) because mvn(javassist:javassist)
is an alias for backward compatibility

Comment 15 gil cattaneo 2016-07-29 22:10:03 UTC
have time for this https://bugzilla.redhat.com/show_bug.cgi?id=1359244 ?

Comment 16 gil cattaneo 2016-07-29 22:28:11 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed



===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "MIT/X11 (BSD like)", "Unknown or generated". 226 files have
     unknown license. Detailed output of licensecheck in
     /home/gil/1359473-legendsbrowser/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Java:
[x]: Bundled jar/class files should be removed before build
[x]: Packages have proper BuildRequires/Requires on jpackage-utils
     Note: Maven packages do not need to (Build)Require jpackage-utils. It
     is pulled in by maven-local
[x]: Javadoc documentation files are generated and included in -javadoc
     subpackage
[x]: Javadoc subpackages should not have Requires: jpackage-utils
[x]: Javadocs are placed in %{_javadocdir}/%{name} (no -%{version} symlink)

Maven:
[x]: If package contains pom.xml files install it (including metadata) even
     when building with ant
[x]: POM files have correct Maven mapping
[x]: Maven packages should use new style packaging
[x]: Old add_to_maven_depmap macro is not being used
[x]: Packages DO NOT have Requires(post) and Requires(postun) on jpackage-
     utils for %update_maven_depmap macro
[x]: Package DOES NOT use %update_maven_depmap in %post/%postun
[x]: Packages use .mfiles file list instead of %{_datadir}/maven2/poms

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     legendsbrowser-javadoc
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[x]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

Java:
[x]: Package uses upstream build method (ant/maven/etc.)
[x]: Packages are noarch unless they use JNI

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: legendsbrowser-1.0.12-3.fc26.noarch.rpm
          legendsbrowser-javadoc-1.0.12-3.fc26.noarch.rpm
          legendsbrowser-1.0.12-3.fc26.src.rpm
legendsbrowser.noarch: W: spelling-error %description -l en_US multi -> mulch, mufti
legendsbrowser.noarch: W: no-manual-page-for-binary legendsbrowser
legendsbrowser.src: W: spelling-error %description -l en_US multi -> mulch, mufti
legendsbrowser.src:35: W: unversioned-explicit-provides bundled(js-leaflet-opacity-controls)
legendsbrowser.src:36: W: unversioned-explicit-provides bundled(js-leaflet-minimap-controls)
3 packages and 0 specfiles checked; 0 errors, 5 warnings.




Rpmlint (installed packages)
----------------------------
legendsbrowser.noarch: W: spelling-error %description -l en_US multi -> mulch, mufti
legendsbrowser.noarch: W: no-manual-page-for-binary legendsbrowser
2 packages and 0 specfiles checked; 0 errors, 2 warnings.



Requires
--------
legendsbrowser (rpmlib, GLIBC filtered):
    /bin/bash
    java-headless
    javapackages-tools
    mvn(com.google.guava:guava)
    mvn(commons-cli:commons-cli)
    mvn(commons-collections:commons-collections)
    mvn(commons-lang:commons-lang)
    mvn(commons-logging:commons-logging)
    mvn(dom4j:dom4j)
    mvn(javassist:javassist)
    mvn(org.apache.velocity:velocity)
    mvn(org.reflections:reflections)

legendsbrowser-javadoc (rpmlib, GLIBC filtered):
    javapackages-tools



Provides
--------
legendsbrowser:
    bundled(font-awesome)
    bundled(glyphicons-halflings-regular)
    bundled(js-bootstrap)
    bundled(js-d3)
    bundled(js-jquery)
    bundled(js-jquery-ui)
    bundled(js-leaflet)
    bundled(js-leaflet-minimap-controls)
    bundled(js-leaflet-opacity-controls)
    legendsbrowser
    mvn(legends:legendsbrowser)
    mvn(legends:legendsbrowser:pom:)

legendsbrowser-javadoc:
    legendsbrowser-javadoc



Source checksums
----------------
https://github.com/robertjanetzko/LegendsBrowser/archive/1.0.12/legendsbrowser-1.0.12.tar.gz :
  CHECKSUM(SHA256) this package     : 01923b48d5681ccecba62498f8b2a6fc6e49eb29a435647927555e2d41245779
  CHECKSUM(SHA256) upstream package : 01923b48d5681ccecba62498f8b2a6fc6e49eb29a435647927555e2d41245779


Generated by fedora-review 0.6.1 (f03e4e7) last change: 2016-05-02
Command line :/usr/bin/fedora-review -b 1359473 --plugins Java -m fedora-rawhide-i386
Buildroot used: fedora-rawhide-i386
Active plugins: Generic, Shell-api, Java
Disabled plugins: C/C++, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6

Approved

Comment 17 Ben Rosser 2016-07-30 15:55:21 UTC
Thanks for the review!

> have time for this https://bugzilla.redhat.com/show_bug.cgi?id=1359244 ?

Taken; I'll take a look at it later today.

Comment 18 Gwyn Ciesla 2016-08-01 13:49:47 UTC
Package request has been approved: https://admin.fedoraproject.org/pkgdb/package/rpms/legendsbrowser

Comment 19 Fedora Update System 2016-08-01 21:48:43 UTC
legendsbrowser-1.0.12-3.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d8e2d68ad5

Comment 20 Fedora Update System 2016-08-01 21:49:12 UTC
legendsbrowser-1.0.12-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-150f435641

Comment 21 Fedora Update System 2016-08-02 21:52:38 UTC
legendsbrowser-1.0.12-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d8e2d68ad5

Comment 22 Fedora Update System 2016-08-02 21:53:50 UTC
legendsbrowser-1.0.12-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-150f435641

Comment 23 Fedora Update System 2016-08-10 07:23:20 UTC
legendsbrowser-1.0.12-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2016-08-10 10:59:24 UTC
legendsbrowser-1.0.12-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


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