Bug 1465327 - command line tool json-diff is not packaged in nodejs-json-diff
Summary: command line tool json-diff is not packaged in nodejs-json-diff
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: nodejs-json-diff
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Piotr Popieluch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-27 08:40 UTC by Martin Bukatovic
Modified: 2017-12-15 20:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:31:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Martin Bukatovic 2017-06-27 08:40:34 UTC
Description of problem
======================

Command line tool json-diff based on the json-diff library is not provided by
nodejs-json-diff rpm package.

Version-Release number of selected component
============================================

nodejs-json-diff-0.3.1-2.fc24.noarch

Steps to Reproduce
==================

1. dnf install nodejs-json-diff
2. try to run json-diff tool (and/or check tools provided in the package)

Actual results
==============

$ json-diff
-bash: json-diff: command not found

There is no command line tool provided in the package:

$ rpm -ql nodejs-json-diff | grep '/bin'
$

Expected results
================

There is json-diff tool in nodejs-json-diff package:

$ rpm -ql nodejs-json-diff | grep '/bin'
/usr/bin/json-diff

Additional info
===============

Latest build for fedora 26 doesn't provide the cli tool neither:

$ rpm -qlp nodejs-json-diff-0.3.1-3.fc26.noarch.rpm | grep '/bin'
$

The command line interface is provided by upstream here:

https://github.com/andreyvit/json-diff/blob/master/bin/json-diff.js

There is no direct clash at this point:

$ dnf provides '/usr/bin/json-diff'
Failed to synchronize cache for repo 'psss-edd', disabling.
Last metadata expiration check: 1:57:02 ago on Tue Jun 27 08:39:48 2017.
Error: No Matches foud

but there is a similar named python tool:

$ dnf provides '/usr/bin/json_diff'
Failed to synchronize cache for repo 'psss-edd', disabling.
Last metadata expiration check: 1:58:12 ago on Tue Jun 27 08:39:48 2017.
json_diff-1.3.4-4.fc25.noarch : Generates diff between two JSON files
Repo        : @System

json_diff-1.3.4-4.fc25.noarch : Generates diff between two JSON files
Repo        : fedora

Comment 1 Martin Bukatovic 2017-06-27 08:46:53 UTC
I tried to create json-diff file myself based on upstream code:

$ cat ~/bin/json-diff 
#!/usr/bin/env node
require('/usr/lib/node_modules/json-diff/lib/cli.js')(process.argv.slice(2));

But this first idea I had doesn't work:

$ json-diff --help
/usr/lib/node_modules/dreamopt/lib/dreamopt.js:491
            throw new Error("Array must follow a command spec: " + (JSON.stringify(spec)));
            ^

Error: Array must follow a command spec: "  first.json              Old file #var(file1) #required"
    at Syntax.add (/usr/lib/node_modules/dreamopt/lib/dreamopt.js:491:19)
    at parse (/usr/lib/node_modules/dreamopt/lib/dreamopt.js:866:12)
    at module.exports (/usr/lib/node_modules/json-diff/lib/cli.js:56:34)
    at Object.<anonymous> (/home/martin/bin/json-diff:2:54)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)

And I'm not a javascript expert, so I'm not exactly sure who's to blame here.

Comment 2 Piotr Popieluch 2017-06-28 11:04:53 UTC
It works after I recompile the source with iced-coffee-script. iced-coffee-script is not in Fedora yet so it will need to be packaged first.

Also note that the error handling in json-diff is far from perfect, it throws an exception when I don't supply any arguments.

Comment 3 Piotr Popieluch 2017-07-10 20:00:25 UTC
Adding Jared, what should we do about this?

Comment 4 Fedora End Of Life 2017-11-16 18:58:42 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2017-12-12 10:31:44 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Jared Smith 2017-12-15 20:42:27 UTC
Sorry for the delay -- I've gone ahead and fixed this in RAWHIDE as part of a version upgrade on json-diff.  If you'd like me to push it to F26 or F27, please let me know.


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