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
eliSodeglo opened this Issue Jul 25, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@eliSodeglo

eliSodeglo 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

This comment has been minimized.

KDr2 commented Aug 14, 2018

What I found is:

  • the https facility seems broken
  • and some API's do not work well too, see #1185
@KDr2

This comment has been minimized.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment