summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Lisin2019-10-12 22:48:18 +0200
committerMatthias Lisin2019-10-12 22:48:18 +0200
commitcad0f1417ac79dcf8bd7d1124fe9ca1dabb718e5 (patch)
treec111f8a5bdb5b0fd6af8699b08d3535d3b88cdc9
parent520aa79b524f30adaecd3461897ff8dd1d3d7eb8 (diff)
downloadaur-cad0f1417ac79dcf8bd7d1124fe9ca1dabb718e5.tar.gz
Replace obsolete patches.
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD34
-rw-r--r--disable-update-check.patch20
-rw-r--r--remove-electron-sudo.patch11
-rw-r--r--remove-update-check.patch22
-rwxr-xr-xubports-installer5
-rw-r--r--ubports-installer.desktop2
7 files changed, 47 insertions, 59 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1447ec1f51f..42432bd9872 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = ubports-installer-git
pkgdesc = A simple tool to install Ubuntu Touch on UBports devices
- pkgver = 0.2.5_beta.r0.gc52cea5
+ pkgver = 0.3.2_beta.r6.g15ed833
pkgrel = 1
url = https://github.com/ubports/ubports-installer
arch = any
@@ -16,13 +16,11 @@ pkgbase = ubports-installer-git
source = ubports-installer-git::git+https://github.com/ubports/ubports-installer.git
source = ubports-installer
source = ubports-installer.desktop
- source = remove-electron-sudo.patch
- source = remove-update-check.patch
+ source = disable-update-check.patch
sha512sums = SKIP
- sha512sums = 4dcaa46e0b1563269fdc29c87cb456218734baf683683a662f3bd03ac38a6527c4f9a6d8b746a732eac7bb6b8be0cbd7fdbb7ddf515d0aa5d32f67b5540564a0
- sha512sums = 5370dae98ea52ef6d1a6d35cc15774687457836cc7a74538d32279617db329f215989863f15ed46d3aba7e384d703161a1cf6ae92101d88c8efa1445464bea59
- sha512sums = 419c08304996aee1cb05dc59d1b88900bff77711ad58d7d627912c90337ea9d4af98c25e516dd5ecc2c418fdacc2ec043714efc19553d1427e090e6f001c2ec7
- sha512sums = d3afd645a6f0c6addd824d1b708501b5f6606bcba848c175ce19d14f43b07baebf5c63045e56f5a62cba543eda32afc5df79c3e35ae5e8dc68f0e89658b3833b
+ sha512sums = e746e844f013c85f9ef6db7163b08e34745c48de2f94f096c582e6aa89b6cde54a91eca23e2eea0e0d6cb20f2582a0e33456c2503be45d6632bb0e02eb5b4cf1
+ sha512sums = efb0da575db03326f56a8bb589f3f5f543a4ae23b471658555bb030bcc1c1625ba2aafd15f26fac41425b3b0bde4cf176740d92aafd5853d5ce1da2b946686e8
+ sha512sums = 027f2085245135b3aff6e5340b00be55199161d7409788cd800028518c8e03a365c7b5cac762b817e3f71f8d719fdd6bb546807fcda5e64ef6ef11adca4a5c02
pkgname = ubports-installer-git
diff --git a/PKGBUILD b/PKGBUILD
index 876b21d5402..efdba812f18 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Matthias Lisin <ml@visu.li>
pkgname=ubports-installer-git
-pkgver=0.2.5_beta.r0.gc52cea5
+pkgver=0.3.2_beta.r6.g15ed833
pkgrel=1
pkgdesc='A simple tool to install Ubuntu Touch on UBports devices'
arch=(any)
@@ -13,13 +13,11 @@ conflicts=('ubports-installer')
source=("$pkgname::git+${url}.git"
ubports-installer
ubports-installer.desktop
- remove-electron-sudo.patch
- remove-update-check.patch)
+ disable-update-check.patch)
sha512sums=('SKIP'
- '4dcaa46e0b1563269fdc29c87cb456218734baf683683a662f3bd03ac38a6527c4f9a6d8b746a732eac7bb6b8be0cbd7fdbb7ddf515d0aa5d32f67b5540564a0'
- '5370dae98ea52ef6d1a6d35cc15774687457836cc7a74538d32279617db329f215989863f15ed46d3aba7e384d703161a1cf6ae92101d88c8efa1445464bea59'
- '419c08304996aee1cb05dc59d1b88900bff77711ad58d7d627912c90337ea9d4af98c25e516dd5ecc2c418fdacc2ec043714efc19553d1427e090e6f001c2ec7'
- 'd3afd645a6f0c6addd824d1b708501b5f6606bcba848c175ce19d14f43b07baebf5c63045e56f5a62cba543eda32afc5df79c3e35ae5e8dc68f0e89658b3833b')
+ 'e746e844f013c85f9ef6db7163b08e34745c48de2f94f096c582e6aa89b6cde54a91eca23e2eea0e0d6cb20f2582a0e33456c2503be45d6632bb0e02eb5b4cf1'
+ 'efb0da575db03326f56a8bb589f3f5f543a4ae23b471658555bb030bcc1c1625ba2aafd15f26fac41425b3b0bde4cf176740d92aafd5853d5ce1da2b946686e8'
+ '027f2085245135b3aff6e5340b00be55199161d7409788cd800028518c8e03a365c7b5cac762b817e3f71f8d719fdd6bb546807fcda5e64ef6ef11adca4a5c02')
pkgver() {
cd "$pkgname"
@@ -27,28 +25,32 @@ pkgver() {
}
prepare() {
- local cache="$srcdir/npm-cache"
local dist=/usr/lib/electron4
local version="$(sed s/^v// $dist/version)"
- for i in *.patch; do
- patch -p1 -d "$pkgname" < "$i"
+ cd "$pkgname"
+ local i; for i in ${source[@]}; do
+ case ${i%::*} in
+ *.patch)
+ msg2 "Applying ${i}"
+ patch -p1 -i "$srcdir/${i}"
+ ;;
+ esac
done
- cd "$pkgname"
+ # Set electronDist and current electronVersion
+ mv -v buildconfig-generic.json buildconfig-generic.json.orig
jq '.electronDist = $dist | .electronVersion = $version' \
--arg dist "$dist" \
--arg version "$version" \
- buildconfig-generic.json > new-buildconfig.json
- mv new-buildconfig.json buildconfig-generic.json
+ buildconfig-generic.json.orig > buildconfig-generic.json
- npm uninstall --no-audit --cache "$cache" electron{-packager,-sudo,-view-renderer} spectron
- npm install --no-audit --cache "$cache" electron@"$version"
+ npm uninstall --no-audit --cache "$srcdir/npm-cache" electron{-packager,-view-renderer} spectron
}
build() {
cd "$pkgname"
- node build.js --os linux --package dir --no-platform-tools
+ node build.js --no-platform-tools --os linux --package dir
}
package() {
diff --git a/disable-update-check.patch b/disable-update-check.patch
new file mode 100644
index 00000000000..89360785525
--- /dev/null
+++ b/disable-update-check.patch
@@ -0,0 +1,20 @@
+diff -ura package.orig/src/main.js package.new/src/main.js
+--- package.orig/src/main.js 2019-10-12 21:18:46.099712720 +0200
++++ package.new/src/main.js 2019-10-12 21:25:12.285643001 +0200
+@@ -266,16 +266,6 @@
+ });
+ });
+
+- // Task we need only on the first start
+- mainWindow.webContents.once("did-finish-load", () => {
+- utils.getUpdateAvailable().then(() => {
+- utils.log.info("This is not the latest version of the UBports Installer! Please update: https://devices.ubuntu-touch.io/installer/" + (global.packageInfo.package ? global.packageInfo.package : ""));
+- mainWindow.webContents.send("user:update-available");
+- }).catch(() => {
+- utils.log.debug("This is the latest version.")
+- });
+- });
+-
+ mainWindow.loadURL(url.format({
+ pathname: path.join(__dirname, 'html/index.pug'),
+ protocol: 'file:',
diff --git a/remove-electron-sudo.patch b/remove-electron-sudo.patch
deleted file mode 100644
index 925fa080493..00000000000
--- a/remove-electron-sudo.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -ura package.orig/src/utils.js package.new/src/utils.js
---- package.orig/src/utils.js 2019-03-23 21:06:10.110844584 +0100
-+++ package.new/src/utils.js 2019-03-23 21:06:28.024347309 +0100
-@@ -16,7 +16,6 @@
- const tmp = require('tmp');
- const exec = require('child_process').exec;
- const cp = require('child_process');
--const sudo = require('electron-sudo');
- const winston = require('winston');
- const getos = require('getos');
- const commandExistsSync = require('command-exists').sync;
diff --git a/remove-update-check.patch b/remove-update-check.patch
deleted file mode 100644
index 6bd23c1cb42..00000000000
--- a/remove-update-check.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -ura package.orig/src/html/scripts/ui.pug package.new/src/html/scripts/ui.pug
---- package.orig/src/html/scripts/ui.pug 2019-03-23 21:06:10.110844584 +0100
-+++ package.new/src/html/scripts/ui.pug 2019-03-23 21:17:27.400580327 +0100
-@@ -224,18 +224,3 @@
- if (process.platform === "win32") {
- modals.show('windows-drivers');
- }
--
-- utils.getUpdateAvailable().then((updateAvailable) => {
-- if(updateAvailable) {
-- utils.log.warn("This is not the latest stable release!")
-- if (utils.isSnap()) {
-- $("#snap-update-instructions").show();
-- $("#btn-update-installer").hide();
-- } else {
-- $("#generic-update-instructions").show();
-- }
-- modals.show('new-update');
-- } else {
-- utils.log.debug("Running latest stable version.");
-- }
-- });
diff --git a/ubports-installer b/ubports-installer
index 5a24fb8691a..ba72f4b2c9f 100755
--- a/ubports-installer
+++ b/ubports-installer
@@ -1,3 +1,4 @@
#!/bin/sh
-
-exec electron4 /usr/share/ubports-installer/app.asar "$@" --no-root
+# need SNAP_NAME for adb/fastbook to be detected
+# https://github.com/ubports/ubports-installer/commit/15ed833ce5149a47ea376aa93e6cc7908afe8c92#diff-1c90ff38a08209f9ebd4d05d1e43358eR48
+SNAP_NAME=arch exec electron4 /usr/share/ubports-installer/app.asar "$@"
diff --git a/ubports-installer.desktop b/ubports-installer.desktop
index 515a608eece..805e6364f9e 100644
--- a/ubports-installer.desktop
+++ b/ubports-installer.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=ubports-installer
Comment=UBports Installer
-Exec=ubports-installer
+Exec=ubports-installer %U
Terminal=false
Type=Application
Icon=ubports-installer