Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rexify for module installation doesn't work #1201

Open
elisdg opened this issue Jul 25, 2018 · 3 comments
Open

rexify for module installation doesn't work #1201

elisdg opened this issue Jul 25, 2018 · 3 comments

Comments

@elisdg
Copy link
Contributor

elisdg commented Jul 25, 2018

(debian 9.5 / perl 5.24 / rex 1.6.0)
Running the command rexify --use="Rex::Ext::Backup" would result in:

malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/local/bin/rexify line 384.

Online I just found this workaround (manually copying the repo): https://groups.google.com/forum/#!topic/rex-users/794tvV45OxY

I did a little bit of poking in the rexify script, but (with my low level perl knowledge) didn't succeed. I don't see anything wrong with the JSON at http://modules.rexify.org/api/1.6/get/dep/Rex::Ext::Backup

#~line 368
  print "Getting dependencies for $name...\n";             
                                                           
 my $myOrigServerString= sprintf ($DEPEND_SERVER,$name); 
 #my $myServerString= to_json($myOrigServerString);      
 my $myServerString= $myOrigServerString;                
 print $myServerString ."\n";                              
 #my $myServerString= encode_json($$myLegacyServerString); 
                                                           
my $myJson = get( $myServerString);                        
print $myJson ."\n";                                       
=pod                                                       
my @testJson;                                              
$testJson[0] = qq\{"ok":"0"}\;                             
my $myRevJson = \@testJson;                                
use HTML::Entities;                                        
  my $deps = decode_entities( $myRevJson );                
=cut                                                       
my $deps = decode_json( $myJson );                         

@KDr2
Copy link

KDr2 commented Aug 14, 2018

What I found is:

@KDr2
Copy link

KDr2 commented Aug 25, 2018

I install the recipes in this way:

$cd $PROJECT_HOME
$mkdir lib -p
$git clone https://github.com/RexOps/rex-recipes.git  # ensure it's on branch 1.4
$ln -sf $PWD/rex-recipes/Rex/ lib/
$ls
lib  Rexfile  rex-recipes

@ferki
Copy link
Member

ferki commented May 25, 2020

FTR: The service providing the central module catalog went unmaintained, and the hosting server is already decommissioned. Moreover the centralized module repository idea didn't work out well (see deprecation notice), so there's probably no chance restoring the service in the exact same way.

The following ideas were popping up in the community around this issue so far:

  1. deprecate rexify functions related to online module search/install
  2. use MetaCPAN to search/install external modules
  3. fall back to git-based search/install

Currently the main idea is to follow point 2, with the remark that the modules from rex-recipes repo were not published on CPAN by their authors. So perhaps point 3 can help with that during a transitional period (install from git is already implemented).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants