diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 28 | ||||
-rw-r--r-- | fix-lock.patch | 39 | ||||
-rw-r--r-- | fix-symlink-path-and-disable-auto-updates.patch | 102 | ||||
-rw-r--r-- | prey-node-client.patch | 153 | ||||
-rwxr-xr-x | prey-tracker (renamed from prey_project) | 0 |
6 files changed, 165 insertions, 174 deletions
@@ -1,7 +1,7 @@ pkgbase = prey-node-client pkgdesc = Remote tracking and monitoring application for laptops, smartphones, and other electronic devices pkgver = 1.10.10 - pkgrel = 1 + pkgrel = 2 url = https://preyproject.com/ install = prey-node-client.install arch = x86_64 @@ -14,15 +14,18 @@ pkgbase = prey-node-client depends = openssh depends = wireless_tools depends = lsb-release - depends = python2 + depends = python depends = networkmanager depends = npm - optdepends = gtk3 - replaces = prey-tracker - source = prey-node-client.patch - source = prey_project - sha256sums = bfe1cd56443eb3e4dd49974e955ffe8ad33b5a7ec749e53cc2682bde82dceb80 + depends = gtk3 + depends = python-gobject + provides = prey-tracker + source = prey-tracker + source = fix-symlink-path-and-disable-auto-updates.patch + source = fix-lock.patch sha256sums = 41f29d334e7671b07cfdc848b2752ccc51710471285e8ebe61c07faa0d36160d + sha256sums = 0ec04bab461633885aa30ec673322e80c582b2478aab376f938a42fa75500707 + sha256sums = d4df726fb87b652b352ca44ddb78afe0e16e40dc130753d86c2cbfa92ac2781d source_x86_64 = https://downloads.preyproject.com/prey-client-releases/node-client/1.10.10/prey-linux-1.10.10-x64.zip sha256sums_x86_64 = c677d8279255ee505e454f38c922deab49168b2797a58f1990673a37d84923b3 source_i686 = https://downloads.preyproject.com/prey-client-releases/node-client/1.10.10/prey-linux-1.10.10-x86.zip @@ -3,22 +3,20 @@ pkgname=prey-node-client pkgver=1.10.10 -pkgrel=1 +pkgrel=2 pkgdesc="Remote tracking and monitoring application for laptops, smartphones, and other electronic devices" url="https://preyproject.com/" arch=('x86_64' 'i686') license=('GPL3') -depends=('nodejs' 'mpg123' 'xawtv' 'scrot' 'openssh' 'wireless_tools' 'lsb-release' 'python2' 'networkmanager' 'npm') -optdepends=('gtk3') -replaces=('prey-tracker') -# Should be used as soon as the bash client is renamed -#provides=('prey-tracker') +depends=('nodejs' 'mpg123' 'xawtv' 'scrot' 'openssh' 'wireless_tools' 'lsb-release' 'python' 'networkmanager' 'npm' 'gtk3' 'python-gobject') +provides=('prey-tracker') install='prey-node-client.install' -source=('prey-node-client.patch' 'prey_project') +source=('prey-tracker' 'fix-symlink-path-and-disable-auto-updates.patch' 'fix-lock.patch') source_x86_64=("https://downloads.preyproject.com/prey-client-releases/node-client/$pkgver/prey-linux-$pkgver-x64.zip") source_i686=("https://downloads.preyproject.com/prey-client-releases/node-client/$pkgver/prey-linux-$pkgver-x86.zip") -sha256sums=('bfe1cd56443eb3e4dd49974e955ffe8ad33b5a7ec749e53cc2682bde82dceb80' - '41f29d334e7671b07cfdc848b2752ccc51710471285e8ebe61c07faa0d36160d') +sha256sums=('41f29d334e7671b07cfdc848b2752ccc51710471285e8ebe61c07faa0d36160d' + '0ec04bab461633885aa30ec673322e80c582b2478aab376f938a42fa75500707' + 'd4df726fb87b652b352ca44ddb78afe0e16e40dc130753d86c2cbfa92ac2781d') sha256sums_x86_64=('c677d8279255ee505e454f38c922deab49168b2797a58f1990673a37d84923b3') sha256sums_i686=('c09094dbea08c179d737573958280ba500cdb2422d85397fcd13918b42f54583') @@ -32,17 +30,19 @@ package() { # the system node if the bundled one is not found. # rm bin/node - # Fix symlink path, Python shebangs and default-disable automatic updates - patch -p0 < ${srcdir}/prey-node-client.patch + # Fix symlink path, and default-disable automatic updates + patch -p0 < ${srcdir}/fix-symlink-path-and-disable-auto-updates.patch + # Fix broken lock + patch -p0 < ${srcdir}/fix-lock.patch mkdir -p "$pkgdir/opt/prey-node-client/" cp -r ./* "$pkgdir/opt/prey-node-client/" install -Dm644 license.txt "$pkgdir/usr/share/licenses/$pkgname/license.txt" mkdir -p "$pkgdir/usr/bin/" - # Binary prey named as prey_project - # ln -s /opt/prey-node-client/bin/prey "$pkgdir/usr/bin/prey_project" - cp "$srcdir/prey_project" "$pkgdir/usr/bin/prey_project" + # Binary prey named as prey-tracker + # ln -s /opt/prey-node-client/bin/prey "$pkgdir/usr/bin/prey-tracker" + cp "$srcdir/prey-tracker" "$pkgdir/usr/bin/prey-tracker" } # vim:set ts=2 sw=2 et: diff --git a/fix-lock.patch b/fix-lock.patch new file mode 100644 index 000000000000..bdc3ddbb5321 --- /dev/null +++ b/fix-lock.patch @@ -0,0 +1,39 @@ +diff --git lib/agent/actions/lock/linux/prey-lock3 lib/agent/actions/lock/linux/prey-lock3 +index 9377d219..08c0a88e 100755 +--- lib/agent/actions/lock/linux/prey-lock3 ++++ lib/agent/actions/lock/linux/prey-lock3 +@@ -138,12 +138,12 @@ class Lock: + self.window.set_resizable(False) + self.window.fullscreen() + +- #_monitor = self.window.get_display().get_primary_monitor() +- #main_screen_width = _monitor.get_geometry().width +- #main_screen_height = _monitor.get_geometry().height +- _monitor = Gdk.Screen.get_default() +- main_screen_width = _monitor.get_width() +- main_screen_height = _monitor.get_height() ++ _monitor = self.window.get_display().get_primary_monitor() ++ main_screen_width = _monitor.get_geometry().width ++ main_screen_height = _monitor.get_geometry().height ++ #_monitor = Gdk.Screen.get_default() ++ #main_screen_width = _monitor.get_width() ++ #main_screen_height = _monitor.get_height() + main_screen_middle = main_screen_width / 2 + + # print "Main screen size: %s x %s" % (main_screen_width, main_screen_height) +@@ -265,7 +265,16 @@ class Lock: + self.window.show_all() + # self.window.set_focus(self.entry) + seat = self.window.get_display().get_default_seat() +- ++ seat.grab( ++ fixed.get_parent_window(), ++ Gdk.SeatCapabilities.KEYBOARD, ++ True, ++ None, ++ None, ++ None, ++ None, ++ None, ++ ) + self.label.hide() diff --git a/fix-symlink-path-and-disable-auto-updates.patch b/fix-symlink-path-and-disable-auto-updates.patch new file mode 100644 index 000000000000..75e999864ae5 --- /dev/null +++ b/fix-symlink-path-and-disable-auto-updates.patch @@ -0,0 +1,102 @@ + +diff --git bin/prey bin/prey +index 5b5203ca..915abd76 100755 +--- bin/prey ++++ bin/prey +@@ -4,11 +4,11 @@ PATH="$PATH:/usr/local/bin" + dir="$(dirname $0)" + [ -x "$dir/node" ] && node="$dir/node" || node="$(command -v node || command -v nodejs)" + +-# if current file is a symlink (e.g. installed via npm) we'll append ++# if current file is a symlink (e.g. installed via pacman) we'll append + # the relative path to where the package is actually installed. + if [ -n "$(readlink $0 2> /dev/null)" ]; then + rel="$(dirname $(readlink $0))" +- dir="$dir/$rel" ++ dir="$rel" + fi + + script="lib/agent/cli.js" +diff --git lib/agent/default.options lib/agent/default.options +index 8fc81774..c252c554 100644 +--- lib/agent/default.options ++++ lib/agent/default.options +@@ -9,7 +9,7 @@ plugin_list = control-panel + auto_connect = false + + # Allows Prey to auto-update itself when new versions are released. +-auto_update = true ++auto_update = false + + # Fetch edge releases before they reach the stable branch. No effect without auto_update. + download_edge = false +diff --git lib/conf/gui/linux/prey-config.py lib/conf/gui/linux/prey-config.py +index 51b4fc18..859b0191 100755 +--- lib/conf/gui/linux/prey-config.py ++++ lib/conf/gui/linux/prey-config.py +@@ -44,7 +44,7 @@ OUT = STDOUT # None + + SCRIPT_PATH = os.sys.path[0] + PACKAGE_PATH = SCRIPT_PATH + '/../../../..' +-PREY_BIN = PACKAGE_PATH + '/bin/prey' ++PREY_BIN = PACKAGE_PATH + '/bin/prey-tracker' + PREY_CONFIG = PREY_BIN + ' config' + + PACKAGE_JSON = open(PACKAGE_PATH + '/package.json', 'r') +diff --git lib/conf/gui/linux/prey-config3.py lib/conf/gui/linux/prey-config3.py +index eec738f6..9815c90a 100755 +--- lib/conf/gui/linux/prey-config3.py ++++ lib/conf/gui/linux/prey-config3.py +@@ -44,7 +44,7 @@ OUT = STDOUT # None + + SCRIPT_PATH = os.sys.path[0] + PACKAGE_PATH = SCRIPT_PATH + "/../../../.." +-PREY_BIN = PACKAGE_PATH + "/bin/prey" ++PREY_BIN = PACKAGE_PATH + "/bin/prey-tracker" + PREY_CONFIG = PREY_BIN + " config" + + PACKAGE_JSON = open(PACKAGE_PATH + "/package.json", "r") +diff --git package.json package.json +index 3ec19613..b1226b3e 100644 +--- package.json ++++ package.json +@@ -84,7 +84,7 @@ + }, + "main": "./lib/common", + "bin": { +- "prey": "./bin/prey" ++ "prey": "./bin/prey-tracker" + }, + "directories": { + "bin": "./bin", +@@ -93,12 +93,12 @@ + "test": "./test" + }, + "scripts": { +- "start": "./bin/prey", +- "test": "./bin/prey test lib/agent/plugins test --recursive --reporter dot", ++ "start": "./bin/prey-tracker", ++ "test": "./bin/prey-tracker test lib/agent/plugins test --recursive --reporter dot", + "coverage": "istanbul cover _mocha -- lib/agent/plugins test --recursive", +- "postinstall": "./bin/prey config hooks post_install", +- "postupdate": "./bin/prey config hooks post_install", +- "preuninstall": "./bin/prey config hooks pre_uninstall" ++ "postinstall": "./bin/prey-tracker config hooks post_install", ++ "postupdate": "./bin/prey-tracker config hooks post_install", ++ "preuninstall": "./bin/prey-tracker config hooks pre_uninstall" + }, + "bugs": { + "url": "http://github.com/prey/prey-node-client/issues" +diff --git prey.conf.default prey.conf.default +index a3e10203..6b94772c 100644 +--- prey.conf.default ++++ prey.conf.default +@@ -9,7 +9,7 @@ plugin_list = control-panel + auto_connect = false + + # Allows Prey to auto-update itself when new versions are released. +-auto_update = true ++auto_update = false + + # Fetch edge releases before they reach the stable branch. No effect without auto_update. + download_edge = false diff --git a/prey-node-client.patch b/prey-node-client.patch deleted file mode 100644 index 5a8c36434ec3..000000000000 --- a/prey-node-client.patch +++ /dev/null @@ -1,153 +0,0 @@ -diff --git bin/prey bin/prey -index 5b5203c..915abd7 100755 ---- bin/prey -+++ bin/prey -@@ -4,11 +4,11 @@ PATH="$PATH:/usr/local/bin" - dir="$(dirname $0)" - [ -x "$dir/node" ] && node="$dir/node" || node="$(command -v node || command -v nodejs)" - --# if current file is a symlink (e.g. installed via npm) we'll append -+# if current file is a symlink (e.g. installed via pacman) we'll append - # the relative path to where the package is actually installed. - if [ -n "$(readlink $0 2> /dev/null)" ]; then - rel="$(dirname $(readlink $0))" -- dir="$dir/$rel" -+ dir="$rel" - fi - - script="lib/agent/cli.js" -diff --git lib/agent/actions/alert/linux/flash.py lib/agent/actions/alert/linux/flash.py -index 38a26b2..e7ac631 100755 ---- lib/agent/actions/alert/linux/flash.py -+++ lib/agent/actions/alert/linux/flash.py -@@ -1,10 +1,4 @@ --#!/bin/sh --''':' --':'; python=$(command -v python) --':'; [ -z "$python" ] || [ -n "${python##*usr*}" ] && python="/usr/bin/python" --':'; exec "$python" "$0" "$@" --''' -- -+#!/usr/bin/env python2 - # coding: utf8 - - ############################################# -diff --git lib/conf/gui/linux/prey-config.py lib/conf/gui/linux/prey-config.py -index f9f9eb4..66549ef 100755 ---- lib/conf/gui/linux/prey-config.py -+++ lib/conf/gui/linux/prey-config.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - ################################################ - # Prey Configurator for Linux - # By Tomas Pollak -diff --git prey.conf.default prey.conf.default -index 2b2b141..d39a885 100644 ---- prey.conf.default -+++ prey.conf.default -@@ -9,7 +9,7 @@ plugin_list = control-panel - auto_connect = false - - # Allows Prey to auto-update itself when new versions are released. --auto_update = true -+auto_update = false - - # Fetch edge releases before they reach the stable branch. No effect without auto_update. - download_edge = false -diff --git lib/conf/gui/linux/prey-config.py lib/conf/gui/linux/prey-config.py -index 66549ef..a7f4730 100755 ---- lib/conf/gui/linux/prey-config.py -+++ lib/conf/gui/linux/prey-config.py -@@ -44,7 +44,7 @@ OUT = STDOUT # None - - SCRIPT_PATH = os.sys.path[0] - PACKAGE_PATH = SCRIPT_PATH + '/../../../..' --PREY_BIN = PACKAGE_PATH + '/bin/prey' -+PREY_BIN = PACKAGE_PATH + '/bin/prey_project' - PREY_CONFIG = PREY_BIN + ' config' - - PACKAGE_JSON = open(PACKAGE_PATH + '/package.json', 'r') - -diff --git lib/conf/shared/messages.js lib/conf/shared/messages.js -index 55bc13c..a30ab1a 100644 ---- lib/conf/shared/messages.js -+++ lib/conf/shared/messages.js -@@ -1,5 +1,5 @@ - module.exports = { -- no_config: "Config file not found! Please run bin/prey config activate.", -+ no_config: "Config file not found! Please run bin/prey_project config activate.", - no_perms: "Oops. Seems you don't have write permissions. Try running with sudo.", - ssl_keygen_error: "Unable to generate SSL keys:", - ssl_keygen_success: "SSL keys in place!", -@@ -8,7 +8,7 @@ module.exports = { - first_run: 'Running Prey for the first time...', - first_run_error: "Shoot, something went wrong. Try running Prey again to see what's going on.", - first_run_ok: "Done! You can now close this window.\n", -- try_console: "Or if you wish to play around with Prey, try the console mode: \n\n\t $ prey -d console\n", -+ try_console: "Or if you wish to play around with Prey, try the console mode: \n\n\t $ prey_project -d console\n", - maybe_next_time: "Ok maybe next time. Farewell!", - error_creating_log_file: "Couldn't create log file in ", - error_storing_values: "Could not store config values: ", -diff --git lib/conf/shared/keys.js lib/conf/shared/keys.js -index 95a77b9..fdec9d1 100644 ---- lib/conf/shared/keys.js -+++ lib/conf/shared/keys.js -@@ -56,7 +56,7 @@ exports.verify_current = function(cb) { - if (!keys.api) - return cb(new Error('API Key not found!')) - else if (!keys.device) -- return cb(new Error('Device Key not found! Run `bin/prey` to get your device linked.')) -+ return cb(new Error('Device Key not found! Run `bin/prey_project` to get your device linked.')) - - panel.verify_keys(keys, cb); - } -diff --git lib/agent/plugins/console/index.js lib/agent/plugins/console/index.js -index 9448533..7f5afb0 100644 ---- lib/agent/plugins/console/index.js -+++ lib/agent/plugins/console/index.js -@@ -119,7 +119,7 @@ var load_hooks = function() { - }; - - exports.enabled = function(cb) { -- cb(new Error('This plugin is not used this way. To use it, run `bin/prey console`.')); -+ cb(new Error('This plugin is not used this way. To use it, run `bin/prey_project console`.')); - } - - var unload = function(err) { - - } - - - -diff --git package.json package.json -index 8383b5d..697816b 100644 ---- package.json -+++ package.json -@@ -81,7 +81,7 @@ - }, - "main": "./lib/common", - "bin": { -- "prey": "./bin/prey" -+ "prey": "./bin/prey_project" - }, - "directories": { - "bin": "./bin", -@@ -90,12 +90,12 @@ - "test": "./test" - }, - "scripts": { -- "start": "./bin/prey", -- "test": "./bin/prey test lib/agent/plugins test --recursive --reporter dot", -+ "start": "./bin/prey_project", -+ "test": "./bin/prey_project test lib/agent/plugins test --recursive --reporter dot", - "coverage": "istanbul cover _mocha -- lib/agent/plugins test --recursive", -- "postinstall": "./bin/prey config hooks post_install", -- "postupdate": "./bin/prey config hooks post_install", -- "preuninstall": "./bin/prey config hooks pre_uninstall" -+ "postinstall": "./bin/prey_project config hooks post_install", -+ "postupdate": "./bin/prey_project config hooks post_install", -+ "preuninstall": "./bin/prey_project config hooks pre_uninstall" - }, - "bugs": { - "url": "http://github.com/prey/prey-node-client/issues" diff --git a/prey_project b/prey-tracker index ed53b16c70a8..ed53b16c70a8 100755 --- a/prey_project +++ b/prey-tracker |