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
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.
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.
Adding Jared, what should we do about this?
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.
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.
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.