Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Prey antitheft for Jolla

    Reply
    Page 7 of 8 | Prev |   5     6   7   8   | Next
    nieldk | # 61 | 2016-12-15, 10:32 | Report

    I have updated nodejs.
    And, Prey have updated their nodejs version.

    There are some small things to be aware of, when trying to update Prey to the latest version thru npm with the new version.
    Primarily, they now are using Sqlite for some things.

    So, in order to get new version of Prey installed, here is a smmall how-to:

    First, uninstall prey.

    Code:
    sudo npm remove prey -g --unsafe-perm
    Next, install new nodejs from http://repo.merproject.org/obs//home...la.armv7hl.rpm
    Either download, and use rpm, pkcon install-local or, add my repository.

    Update npm to latest version:

    Code:
    sudo npm install npm@latest -g
    nan, and node-gyp (needed to compile sqlite) seems to be missing, and not installed by prey, so do that

    Code:
    sudo npm install nan -g --unsafe-perm
    sudo npm install node-pre-gyp -g --unsafe-perm
    Now, install prey

    Code:
    sudo npm install prey -g --unsafe-perm

    Add systemd services, if you want to enable it by default

    Code:
    sudo nano /etc/systemd/system/prey-agent.service
    Code:
    [Unit]
    Description=The Prey daemon.
    After=network.target
    
    [Service]
    ExecStart=/usr/lib/node_modules/prey/bin/prey
    WorkingDirectory=/usr/lib/node_modules/prey
    Restart=always
    RestartSec=15
    User=prey
    Environment="TERM=dumb" "USER=prey"
    KillMode=process
    TimeoutStopSec=20
    KillSignal=QUIT
    
    [Install]
    WantedBy=multi-user.target
    Ensure, that prey have permissions to use sudo, when needed (to access sqlite db, iwlist, and su

    Code:
    sudo nano /etc/sudoers.d/50_prey_switcher
    Code:
    prey ALL = NOPASSWD: /bin/su [A-z]*, !/bin/su root*, !/bin/su -*, /usr/sbin/iwlist
    start prey (first reload systemd daemons)

    Code:
    sudo systemctl daemon-reload
    sudo systemctl start prey-agent
    Now, it should be working, and if you want to enable auto on reboot:

    Code:
    sudo systemctl enable prey-agent

    Edit | Forward | Quote | Quick Reply | Thanks
    Attached Images
     
    The Following 10 Users Say Thank You to nieldk For This Useful Post:
    Amboss, coderus, eekkelund, J4ZZ, jayki, juiceme, Mikkosssss, P@t, peterleinchen, rob_kouw

     
    rob_kouw | # 62 | 2016-12-15, 14:56 | Report

    Hi Neil,

    I've got so much trust in the stuff you make for us, I'm happy to install things unsafe.

    Things worked well up to the point of installing prey itself:

    Code:
    [root@Sailfish nemo]# sudo npm install prey -g --unsafe-perm
    /usr/bin/prey -> /usr/lib/node_modules/prey/bin/prey
    
    > sqlite3@3.1.8 install /usr/lib/node_modules/prey/node_modules/sqlite3
    > node-pre-gyp install --fallback-to-build
    
    node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v46-linux-arm.tar.gz
    node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.8 and node@4.4.0 (node-v46 ABI) (falling back to source compile with node-gyp)
    gyp ERR! build error
    gyp ERR! stack Error: not found: make
    gyp ERR! stack     at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
    gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
    gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
    gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
    gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
    gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
    gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
    gyp ERR! System Linux 3.4.108.20161101.1
    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/lib/node_modules/prey/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/lib/node_modules/prey/node_modules/sqlite3/lib/binding/node-v46-linux-arm"
    gyp ERR! cwd /usr/lib/node_modules/prey/node_modules/sqlite3
    gyp ERR! node -v v4.4.0
    gyp ERR! node-gyp -v v3.4.0
    gyp ERR! not ok
    node-pre-gyp ERR! build error
    node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/lib/node_modules/prey/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/lib/node_modules/prey/node_modules/sqlite3/lib/binding/node-v46-linux-arm' (1)
    node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
    node-pre-gyp ERR! stack     at emitTwo (events.js:87:13)
    node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
    node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:827:16)
    node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
    node-pre-gyp ERR! System Linux 3.4.108.20161101.1
    node-pre-gyp ERR! command "/usr/bin/node" "/usr/bin/node-pre-gyp" "install" "--fallback-to-build"
    node-pre-gyp ERR! cwd /usr/lib/node_modules/prey/node_modules/sqlite3
    node-pre-gyp ERR! node -v v4.4.0
    node-pre-gyp ERR! node-pre-gyp -v v0.6.32
    node-pre-gyp ERR! not ok
    Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/lib/node_modules/prey/node_modules/sqlite3/lib/binding/node-v46-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/lib/node_modules/prey/node_modules/sqlite3/lib/binding/node-v46-linux-arm' (1)
    /usr/lib
    `-- (empty)
    
    npm ERR! Linux 3.4.108.20161101.1
    npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "prey" "-g" "--unsafe-perm"
    npm ERR! node v4.4.0
    npm ERR! npm  v4.0.3
    npm ERR! code ELIFECYCLE
    
    npm ERR! sqlite3@3.1.8 install: `node-pre-gyp install --fallback-to-build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the sqlite3@3.1.8 install script 'node-pre-gyp install --fallback-to-build'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the sqlite3 package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node-pre-gyp install --fallback-to-build
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs sqlite3
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls sqlite3
    npm ERR! There is likely additional logging output above.
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/nemo/npm-debug.log

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to rob_kouw For This Useful Post:
    juiceme, nieldk

     
    nieldk | # 63 | 2016-12-15, 17:03 | Report

    Rob: its trying to build the binaries.
    you need to install
    make, gcc and g++

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to nieldk For This Useful Post:
    juiceme, rob_kouw

     
    Eminem | # 64 | 2016-12-18, 17:08 | Report

    So pkcon install make, pkcon install gcc, pkcon install g++?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    nieldk | # 65 | 2016-12-18, 18:43 | Report

    Originally Posted by Eminem View Post
    So pkcon install make, pkcon install gcc, pkcon install g++?
    pkcon install


    make
    gcc
    gcc-c++

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 3 Users Say Thank You to nieldk For This Useful Post:
    Eminem, explit, juiceme

     
    objectifnul | # 66 | 2016-12-23, 09:52 | Report

    Perhaps time has come to gather all updated instructions for installation in one, clear and accurate document.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to objectifnul For This Useful Post:
    Eminem, explit

     
    Eminem | # 67 | 2016-12-24, 11:11 | Report

    Or a installation file that does/have everything in it/gets it and installs it.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    explit | # 68 | 2016-12-25, 21:20 | Report

    I'm asking, how to do this on Jolla Tablet...

    The new Nodejs Version is only armv7hl

    Edit | Forward | Quote | Quick Reply | Thanks

     
    nieldk | # 69 | 2016-12-26, 08:15 | Report

    Originally Posted by explit View Post
    I'm asking, how to do this on Jolla Tablet...

    The new Nodejs Version is only armv7hl
    yes, there is an older version on my merproject, but that is too old i believe.
    After holidays i will try to get this to build on i486.
    Posibly i will make an rpm package of prey.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 5 Users Say Thank You to nieldk For This Useful Post:
    eekkelund, Eminem, explit, juiceme, Mikkosssss

     
    rob_kouw | # 70 | 2016-12-27, 16:52 | Report

    Originally Posted by nieldk View Post
    pkcon install


    make
    gcc
    gcc-c++
    Took me a while to try again. pkcon install make worked. This is my result for gcc:

    Code:
    [root@Sailfish nemo]# pkcon install gcc
    Installing
    Waiting in queue
    Starting
    Refreshing software list
    Querying
    Resolving dependencies
    Fatal error: gcc-4.8.3-1.2.4.armv7hl requires glibc-devel, but this requirement cannot be provided
    [root@Sailfish nemo]# pkcon install glibc-devel
    Installing
    Waiting in queue
    Starting
    Refreshing software list
    Querying
    Resolving dependencies
    Fatal error: glibc-devel-2.19+6.7-1.8.1.armv7hl requires glibc = 2.19+6.7-1.8.1, but this requirement cannot be provided
    [root@Sailfish nemo]#
    What to do now?
    Thanks, Rob

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 7 of 8 | Prev |   5     6   7   8   | Next
vBulletin® Version 3.8.8
Normal Logout