perl registry installation fails
On Ubuntu, trying to install the perl registry form the binary metacat release fails following the instructions provided in the Admin guide. This may be only a documentation issue, but in particular, we need to clarify how to install Metacat.pm. The Metacat.pm module is provided in the war file, but it is hidden away in the WEB-INF/lib/Metacat.pm. It is unclear how to install it form the documentation. In section 7.2.1, the documentation says to install it using the standard perl Make utilities, but the source code is not provided in the binary release, so this is not possible.
#1 Updated by Matt Jones over 5 years ago
When installing via src, make does several things:
$ sudo make install
Appending installation info to /usr/local/lib/perl/5.18.2/perllocal.pod
My guess is that we should be shipping the whole src/perl/Metacat subdirectory, and then running:
#2 Updated by ben leinfelder over 5 years ago
This is a documentation issue. There is no need to make the metacat perl library or do anything to install it. All that needs to be done is install the dependencies (as correctly outlined in the docs) and ensure the cgi files are accessible and executable.
#3 Updated by Matt Jones over 5 years ago
That's great. How does that work? Clearly Metacat.pm does need to be accessible to perl on the @INC path, which is normally done by installing it in one of the perl modules library locations. On a test instance, with all of the dependencies installed, we are seeing a perl error in the apache logs saying that Metacat.pm is not on @INC. How does perl know where it is in the war file? I can't find any configuration in /etc/apache2 or /var/lib/tomcat7 modifying the INC path. But when I run the register-dataset.cgi from the commandline on dev I get:
Can't locate auto/Metacat/autosplit.ix in @INC (@INC contains: ../WEB-INF/lib /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at /usr/share/perl/5.18/AutoLoader.pm line 181. at ../WEB-INF/lib/Metacat.pm line 31. Using a hash as a reference is deprecated at ./register-dataset.cgi line 170. Using a hash as a reference is deprecated at ./register-dataset.cgi line 171. Content-type: text/html
This indicates that ../WEB-INF/lib is indeed on the @INC path, and that the script executes despite not finding the authsplit.ix file. Would love to know where this is configured so I can debug the other machine.
#5 Updated by ben leinfelder over 5 years ago
- Status changed from New to In Progress
I can see in register-dataset.cgi that we pull in Metacat.pm with these directives:
use lib '../WEB-INF/lib';
Note that Metacat.pm is deployed in WEB-INF/lib along with all the jars. I've never seen the 'autosplit.ix' warning prevent the registry from functioning.
#9 Updated by Jing Tao over 5 years ago
When i was trouble shooting the issue on SAEON Metacat, i found the same thing - the cgid module was not installed. Gavin looked at couple ubuntu machines and found some installed the module by default; some didn't. So probably we need to add a note to ask users to double check the module.