I-Nex icon indicating copy to clipboard operation
I-Nex copied to clipboard

Regression: "[45] File or directory does not exist. FReport_Gen.Form_Open.19" on CentOS

Open alphastar868 opened this issue 7 years ago • 4 comments

This is broken again on CentOS (same error as #15 ) in commit 5b74494, as there is no pastebin (specifically, no /usr/share/pastebin.d/ to build the array in FReport_Gen.class line 19).

We should test for /usr/share/pastebin.d/ to avoid this application error and crash (all windows close) when Generate report button is selected. Also a consideration for #57

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39217443-regression-45-file-or-directory-does-not-exist-freport_gen-form_open-19-on-centos?utm_campaign=plugin&utm_content=tracker%2F488098&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F488098&utm_medium=issues&utm_source=github).

alphastar868 avatar Nov 14 '16 14:11 alphastar868

Where is the pastebin.d directory in CentOS?

eloaders avatar Nov 14 '16 16:11 eloaders

Doesn't exist.

Fedora makes pastebinit 1.3.1 available, but there are no packages for EPEL (RedHat/CentOS).

I've tested the rebuilt Fedora SRPM on EPEL, but the path to pastebin.d is set to /usr/share/pastebinit

Using the following as a workaround, with the rebuilt Fedora pastebinit .src.rpm installed, it works on Fedora/RedHat/CentOS after the command: sudo ln -s /usr/share/pastebinit /usr/share/pastebin.d

If needed I can create a custom SPEC file for pastebinit 1.5 in dists/redhat defaulting to /usr/share/pastebin.d

alphastar868 avatar Nov 14 '16 19:11 alphastar868

I'll add later an exception to the code I-Nex for pastebinit

eloaders avatar Nov 14 '16 20:11 eloaders

Thanks for looking into this.

Even though bug was reported fixed in 1.2.2, there are several lines (in the Fedora pastebinit.spec file in the 1.3.1 .src.rpm) that relocate files from /usr/share/pastebin.d to /usr/share/pastebinit/, citing this bug report.

In the meantime, there is also a Fedora COPR repository for pastebinit 1.5 that uses essentially the same SPEC file (and therefore has the same issue), but can be enabled/installed (Fedora only) with:

dnf copr enable leamas/pastebiniit

and then

yum install pastebinit

Finally, to fix the issue with Generate report not working, also run:

sudo ln -s /usr/share/pastebinit /usr/share/pastebin.d

For RedHat/CentOS (and even Fedora), it is probably best to compile pastebinit from sources using the SPEC file in dists/redhat:

Note: This requires RPM build environment

wget -O ~/rpmbuild/SOURCES/pastebinit-1.5.tar.gz https://launchpad.net/pastebinit/trunk/1.5/+download/pastebinit-1.5.tar.gz
wget -O ~/rpmbuild/SPECS/pastebinit.spec https://github.com/i-nex/I-Nex/raw/master/dists/redhat/pastebinit.spec
rpmbuild -ba ~/rpmbuild/SPECS/pastebinit.spec
yum localinstall ~/rpmbuild/RPMS/noarch/pastebinit-1.5*.rpm

alphastar868 avatar Nov 15 '16 05:11 alphastar868