vmware-archive / safekeeping

Safekeeping is proof of concept backup application specifically designed to be used as reference during the development of a backup solution.
BSD 2-Clause "Simplified" License
25 stars 20 forks source link

Installation requires admin privileges #2

Closed dmc5179 closed 3 years ago

dmc5179 commented 4 years ago

Running: ant install results in /opt/vmware/safekeeping/jre/bin which doesn't have anything in it. The wrapper script to run safekeeping has:

export VMBK_HOME=/opt/vmware/safekeeping
export JAVA_HOME=$VMBK_HOME/jre
export VMBK_JAR=$VMBK_HOME/jar
export VMBK_LIB=$VMBK_HOME/lib/lib64

Which results in:

 /bin/safekeeping 
/bin/safekeeping: line 51: /opt/vmware/safekeeping/jre/bin/java: No such file or directory

Perhaps JAVA_HOME should not be pointing to the safekeeping directory structure and instead use the system value?

mdaneri commented 4 years ago

Hi, if you deploy safekeeping ant configure ant install OpenJDK(JRE) should be copied inside the $VMBK_HOME/jre directory. if you want you can change the JAVA_HOME to point to the right directory. I have a question what OS are you using and what Java version? because I never saw this issue

dmc5179 commented 4 years ago

I'm using RHEL 8.2. The reason you're not seeing this issue is probably because you're running:

ant configure
ant install

as root. I cleared out everything and tried the steps again as root. The jre stuff is all copied into the right place.

It might be a good idea to update the installer so as not to require root.

mdaneri commented 4 years ago

on version 2 I moved from Ant to Gradle to support containers. This problem should go away. Anyway thanks for the feedback I'm going to fix the documentation

zhouhb0321 commented 4 years ago

ubuntu@cli-vm:/opt/vmware/safekeeping$ ./safekeeping ./safekeeping: 3: Syntax error: "(" unexpected

mdaneri commented 4 years ago

Line 3 of https://github.com/vmware/safekeeping/blob/master/support/safekeeping is function usage()

How can you have an error here? first 10 lines:

#!/bin/sh

function usage()
{
    $JAVA_HOME/bin/java -jar $VMBK_JAR/vmbkcmd.jar help
    echo
    echo "Debug Mode:"
    echo "$0  -d=<port> | --debug=<port>  <command> <options....>"
    echo ""
}
mdaneri commented 4 years ago

I worried that Ubuntu doesn't like Windows EOL (CR LF). please try to convert the file from Windows EOL to Unix EOL (LF)

mdaneri commented 4 years ago

I changed the file on GitHub. Please let me know if solve your issue