Code Monkey home page Code Monkey logo

crashplan-qpkg's People

Contributors

dynek avatar ocanzillon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crashplan-qpkg's Issues

Errors in README

There are few errors in README.md:

  • src/qpkg.conf is described, but the file in repository is named src/qpkg.cfg
  • src/share and src/x86 folders are described but there are missing in the repository

QNAP 4.3 Beta x64

Hello,

Would anyone have an idea when Crashplan QPKG will be made compatible with QNAP 4.3 ?

Thank you in advance for your help.

And thank you very much for your work !!!

Best reagards.

Crashplan 4.3 Support

I have Crashplan 4.3 on OS X which uses the new .ui_info file format (outlined here)

As per the comments on this blog post I downloaded the configuration files from the QNAP Crashplan app but it does not contain the .ui_info files, rather the old ui.properties.

Will a new version be released to support this?

crashplan 4.7.0 upgrade breaks

Crashplan stopped running on my qnap, apparently due to a failed upgrade to 4.7.0. engine_error.log says Error: could not find or load main class com.backup42.service.CPservice. The upgrade log is below; mv: unable to rename *.jar': No such file or directory` looks suspicious.

According to https://crashplan.setepontos.com/crashplan-4-7-0-installation/ there's an issue with cpio now being required.

I'm not sure I grok how all of this works well enough to try to fix it, but I'll see what I can do.

#!/bin/sh

# This script is sourced by the upgrade process at the very beginning
# Let's hope Code42 keeps it like that as it allows me to do a clean
# update/upgrade of the QPKG

QPKG_NAME="CrashPlan"
QPKG_CFG_FILE="/etc/config/qpkg.conf"
QPKG_DIR="$(/sbin/getcfg "${QPKG_NAME}" Install_Path -f ${QPKG_CFG_FILE})"
INIT_SCRIPT="${QPKG_DIR}/crashplan.sh"
RESTORE_DIR="${QPKG_DIR}/_restore"

echo "$(date) : Upgrade process in progress..." >> ${logFile} 2>&1

# Is device ARM ?
is_arm=false
[[ "$(uname -m)" == armv[5-7]* ]] && is_arm=true
echo "$(date) : Is ARM device: ${is_arm}" >> ${logFile} 2>&1

# Create restore directory to store architecture specific file(s)
if [[ "${is_arm}" = true ]]; then
  # remove if already exists
  [[ -d "${RESTORE_DIR}" ]] && /bin/rm -rf "${RESTORE_DIR}"
  if ! /bin/mkdir -p "${RESTORE_DIR}"; then
    echo "$(date) : Couldn't create ${RESTORE_DIR} to store file(s) to be kept" >> ${logFile} 2>&1
    exit 1
  else
    echo "$(date) : Created ${RESTORE_DIR} to store file(s) to be kept" >> ${logFile} 2>&1
  fi
fi

# Store file(s) to be kept in there
if [[ "${is_arm}" = true ]]; then
  echo "$(date) : Storing file(s) to be kept in ${RESTORE_DIR}" >> ${logFile} 2>&1
  if ! /bin/cp "${QPKG_DIR}"/lib/jna*jar "${RESTORE_DIR}"; then
    echo "$(date) : Couldn't backup files to be kept" >> ${logFile} 2>&1
    exit 1
  else
    echo "$(date) : Successfully backuped files to be kept" >> ${logFile} 2>&1
  fi
fi

# stop the CrashPlan instance
echo "$(date) : Stopping ${QPKG_NAME}" >> ${logFile} 2>&1
$INIT_SCRIPT stop
echo "$(date) : Stopped" >> ${logFile} 2>&1

# replace files
echo "$(date) : Removing old jar files..." >> $logFile 2>&1
/bin/rm -f "${QPKG_DIR}"/lib/*.jar >> $logFile 2>&1

echo "$(date) : Moving new jar files..." >> $logFile 2>&1
/bin/mv -f *.jar "${QPKG_DIR}/lib/" >> $logFile 2>&1

if [[ -f "libjtux.so" ]] && [[ "${is_arm}" = false ]]; then
  echo "$(date) : Moving libjtux.so to the app dir..." >> $logFile 2>&1
  /bin/mv -f libjtux*.so "${QPKG_DIR}" >> $logFile 2>&1
fi

if [[ -f "libjniwrap.so" ]]; then
  echo "$(date) : Moving libjniwrap.so to the app dir..." >> $logFile 2>&1
  /bin/mv -f libjniwrap.so "${QPKG_DIR}" >> $logFile 2>&1
fi

if [[ -f "libjniwrap64.so" ]]; then
  echo "$(date) : Moving libjniwrap64.so to the app dir..." >> $logFile 2>&1
  /bin/mv -f libjniwrap64.so "${QPKG_DIR}" >> $logFile 2>&1
fi

if [[ -f "libmd5.so" ]] && [[ "${is_arm}" = false ]]; then
  echo "$(date) : Moving libmd5*.so to the app dir..." >> $logFile 2>&1
  /bin/mv -f libmd5*.so "${QPKG_DIR}" >> $logFile 2>&1
fi

if [[ -f "jniwrap.lic" ]]; then
  echo "$(date) : Moving jniwrap.lic to the app dir..." >> $logFile 2>&1
  /bin/mv -f jniwrap.lic "${QPKG_DIR}" >> $logFile 2>&1
fi

if [[ -f "service.log.properties" ]]; then
  echo "$(date) : Moving service.log.properties to the conf dir..." >> $logFile 2>&1
  /bin/mv -f service.log.properties "${QPKG_DIR}/conf" >> $logFile 2>&1
fi

if [[ -f "lang/txt.properties" ]]; then
  echo "$(date) : Moving txt files to the lang dir..." >> $logFile 2>&1
  [[ ! -d "${QPKG_DIR}/lang" ]] && /bin/mkdir "${QPKG_DIR}/lang"
  /bin/mv -f lang/* "${QPKG_DIR}/lang" >> $logFile 2>&1
fi

if [[ -f "lang/custom/txt.properties" ]]; then
  echo "$(date) : Moving custom txt files to the lang dir..." >> $logFile 2>&1
  [[ ! -d "${QPKG_DIR}/lang/custom" ]] && /bin/mkdir "${QPKG_DIR}/lang/custom"
  /bin/mv -f lang/custom/* "${QPKG_DIR}/lang/custom" >> $logFile 2>&1
fi

if [[ -f "service.log.xml" ]]; then
  echo "$(date) : Moving service.log.xml to the conf dir..." >> $logFile 2>&1
  /bin/mv -f service.log.xml "${QPKG_DIR}/conf" >> $logFile 2>&1
fi

# Restore file(s)
if [[ "${is_arm}" = true ]]; then
  if ! /bin/cp "${RESTORE_DIR}"/jna*jar "${QPKG_DIR}"/lib/; then
    echo "$(date) : Couldn't restore files" >> ${logFile} 2>&1
    exit 1
  else
    echo "$(date) : Successfully restored files" >> ${logFile} 2>&1
  fi
  /bin/rm -rf "${RESTORE_DIR}"
fi

# start the CrashPlan instance
echo "$(date) : Starting ${QPKG_NAME}" >> ${logFile} 2>&1
$INIT_SCRIPT start
echo "$(date) : Started" >> ${logFile} 2>&1

# exit so sourcer (upgrade.sh) doesn't keep running
exit 0
Sourcing ../../install.vars...
Mon May  9 16:49:13 EDT 2016 : Upgrade process in progress...
Mon May  9 16:49:13 EDT 2016 : Is ARM device: false
Mon May  9 16:49:13 EDT 2016 : Stopping CrashPlan
Mon May  9 16:49:23 EDT 2016 : Stopped
Mon May  9 16:49:23 EDT 2016 : Removing old jar files...
Mon May  9 16:49:23 EDT 2016 : Moving new jar files...
mv: unable to rename `*.jar': No such file or directory
Mon May  9 16:49:23 EDT 2016 : Starting CrashPlan
Mon May  9 16:49:24 EDT 2016 : Started

build.sh needs different mechanism to find java location

In build.sh
PATH_TO_JAVA=command -v java
neither
PATH_TO_JAVA=which java
will reveal the Java location on "Linux NAS06127C 3.10.20-al-2.5.3_sa #2 SMP Sat Jan 21 05:52:06 CST 2017 armv7l" because JRE_ARM 8.65.0 doesn't add java executable to $PATH:

# echo -e $PATH
/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin

However a link is created at /usr/local/jre -> /share/CACHEDEV1_DATA/.qpkg/JRE_ARM/jre/
which makes java run at /usr/local/jre/bin/java.

Build.sh needs some workaround to figure out the java location without it being added to $PATH.

Why have symbolic linked folders 'arm-x09' and 'arm-x41'?

@dynek
I see that there as symlinked folders in crashplan-qpkg/src/qpkg/ named 'arm-x09' (that points to 'arm-x19') and 'arm-x41' (that points to 'arm-x31').

The generated/created/build .qpkg package files are not identical packages:

MD5 (CrashPlan_2011_1.16_arm-x09.qpkg) = e1caafa284b175272b3411e7fe169bf7
MD5 (CrashPlan_2011_1.16_arm-x19.qpkg) = a2a02930a297bbfe3bbf64356ffff7cb
MD5 (CrashPlan_2011_1.16_arm-x31.qpkg) = 8131a3c4f0afb6b9a476e6ae45d21aef
MD5 (CrashPlan_2011_1.16_arm-x41.qpkg) = df705daae278b62c8bf6b6b1513b643e

What are the differences between the generated:

  1. '..._arm-x09.qpkg' and '..._arm-x19.qpkg'
  2. '..._arm-x41.qpkg' and '..._arm-x31.qpkg'
    ?

For which purpose were these symbolic linked folders ever created?


QNAP architectures to my knowlege:

  1. x86 for platformID TS-NASX86
  • except ce53xx for TS-269H (I don't understand why this Celeron isn't x86)
  1. arm_kw for platformID TS-NASARM (your soft-floatx09 and x19 mappings, my guess for ARMv5)
  • except arm_ms for platformID TS-X31 and TS-X31U (ARMv7 with vfpv3 only)
  • except arm_al for platformID TS-X31X, TS-X31XU, TS-X35, TS-X41, TS-531P, TAS-X68 and TS-X28 (AnnapurnaLabs ARMv7 with both vfpv3 and vfpv4)

partly sourced from https://wiki.qnap.com/wiki/Filesystem_not_clean

Qpkg for TS-431P

Hi I would like to find out if there is a way to create qpkg for TS-431P? I have tried most of the one within the app-store. All come back with incompitable architecture.

find_base function duplicated

find_base function is defined in crashplan.sh abd restartLinux.sh. To avoid duplication, It should be located in a common helper file, called where needed.

extract_data.sh line 27 is useless

extract_data.sh in line removes ./data/CrashPlan-install/scripts/CrashPlanEngine file, and removes immediatly after ./data/CrashPlan-install folder.
So line 27 is useless.

URL /crashplan/ was not found

I have a newly configured QNAP TVS-671 with 4.3.3. I installed the required packages before installing Crashplan. The web server is enabled as I am using it for some testing, but the QPKG does not create the /crashplan/ directory on the /web folder. Therefore I cannot see the configuration details. How can I get the page to show up so I can get the configuration information?

Even if I create it manually remove and reinstall all I get is a 403 error. I've removed and reinstalled multiple times with the same issue and this is a brand new 4.3.3 build.

source folder should be reviewed

source folder contains stuff which will be moved or copied in folders following QPKG SDK structure, but also the script to performs all these steps (extract_data.sh). Moreover, crashpan.sh and restartLinux.sh are in the same location in source folder, but are not moved in the same folder in QPKG structure.
This should be reviewed to be easier to understand, and to simplify extract_data.sh script.

Issue since upgrade on 4th November

I noticed that since a recent upgrade CrashPlan has stopped launching on my TS-451. The upgrade log file is upgrade.1435813200480_323.1478183944597.log and it doesn't flag any errors in installation. As per attached log (engine_error.txt
) it appears the leveldb shared library is not being found.

All the libraries appear to be there in the root of the qpkg:
[/share/CACHEDEV1_DATA/.qpkg/CrashPlan] # ls ?/ bin/ crashplan.vars lib/ libjniwrap.so libleveldb.so log/ workaround/ CrashPlan.pid cache/ htdocs/ libc42archive.so libjniwrap64.so libleveldb64.so tmp/ ~custom app.asar conf/ install.vars* libc42archive64.so libjtux.so libmd5.so upgrade/ backupArchives/ crashplan.sh* lang/ libc42core.so libjtux64.so libmd564.so var/

I notice in the upgrade log something about libraries being moved to the "app dir" so wondering if that step has failed?

Cannot reconnect after update

DId a fresh install of the qpkg, initially I can connect from a desktop client to the NAS/qpkg. After starting a backup the application updates and then I am no longer able to connect. I verified key, ip and port are correct. My guess is this is a version mismatch between the qpkg and the desktop client?

Getting Started Question

Hello! I have the qpkg installed and on, but when I go to "Open" it asks me to login. Neither my Qnap admin nor Crashplan accounts work. No idea what to do. Everything is up to date.

HELP!! Adopt doesn't work....

Hi Dynek!

First, thank you for taking the time to create this package. You are so awesome to take the time to create and maintain this!

In the past I was able to adopt a backup using your package and actually have been plugging along just fine for almost a year. However, I wake up one morning last week and I can't attach to crash plan interface via client (headless of course) no matter what I try. I check with crash plan and it says that my qnap has not been backing up for days. After playing with it and trying several times to get it back up I decided to reinstall the package. Now it seems like it works but when I choose adopt my previous backup, it tries to update itself and then crashes never to be seen again.

I can't start all over, it would make me erase everything from crash plan, of which I don't have copies of somethings. 2nd, there is 4 TB up there and that would take me months to throw back. What can I do? Is there some way to prevent it from trying to update? Or trick it into thinking that it doesn't need to update?

Thank you so much for your help!

New version ?

Hallo dynek

Dont know if you noticed but CP has release version 4.2 for windows

/Butcher

x86 64 bits systems should be taken into account

extract_data.sh removes libjniwrap64.so, libjtux64.so and libmd564.so (lines 35 to 37). QPKG development kit describes a x86_64 folder, specific to x86 (64-bit) packages.
These 3 files should be moved in a x86_64 folder, instead of being removed.

Workaround fails due to missing java.patched

Hey Dynek,

thank you for providing an up-to-date crashplan package. It seems you put quite some effort in it.

I found your post in the Qnap Forum about the "[QPKG] CrashPlan v4.8.0 NOW REQUIRES Entware-ng" (https://forum.qnap.com/viewtopic.php?f=227&t=39078). Unfortunately the Dropbox links are not working anymore, hence, I could not get the qpkg for CP 4.8 x86. So I downloaded the code from GitHub and built the package myself. However, I cannot get it to work since the crashplan.sh fails when trying to attemp the workaround for versions >4.5. It is missing the patched java file. I don't know how to patch the java. Could you give me a hint on how to troubleshoot? And/or could you provide the qpkg package?

Thank you very much in advance

p.s.: I have a TS-451+ with kernel 3.12.6 and glibc 2.6.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.