Skip to content

Commit 3c34b73

Browse files
committed
Release 4.3.1
Bug fixes: - Removed references to QML Array prototype methods added in Qt 5.9 (unavailable in Ubuntu Zesty and earlier)
2 parents 5b03fd4 + 7d83c17 commit 3c34b73

File tree

11 files changed

+110
-27
lines changed

11 files changed

+110
-27
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* Version 4.3.1
2+
** Bugfix: Removed references to QML Array prototype methods added in Qt 5.9 (unavailable in Ubuntu Zesty and earlier)
3+
14
* Version 4.3.0
25
** Now requires ykman version >= 0.5.0
36
** Feature: Remembered passwords are now shared with ykman.

debian/changelog

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
yubioath-desktop (4.3.0) xenial; urgency=low
1+
yubioath-desktop (4.3.1-1) xenial; urgency=low
22

33
* Build for ppa
44

5-
-- Emil Lundberg <emil@yubico.com> Fri, 15 Dec 2017 16:00:51 +0100
5+
-- Emil Lundberg <emil@yubico.com> Sun, 17 Dec 2017 00:42:45 +0100

debian/control

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@ Build-Depends: debhelper (>= 9),
1919
qml-module-io-thp-pyotherside,
2020
qml-module-qt-labs-settings,
2121
libqt5svg5-dev,
22-
yubikey-manager (>= 0.5.0~pre1)
22+
yubikey-manager (>= 0.5.0~),
23+
yubikey-manager (< 0.6.0)
2324
Homepage: https://developers.yubico.com/yubioath-desktop/
2425

2526
Package: yubioath-desktop
2627
Architecture: any
2728
Depends: ${misc:Depends},
2829
${shlibs:Depends},
29-
python3-yubikey-manager,
30+
python3-yubikey-manager (>= 0.5.0~),
31+
python3-yubikey-manager (< 0.6.0),
3032
qml-module-io-thp-pyotherside,
3133
qml-module-qtquick-controls,
3234
qml-module-qtquick-dialogs,

debian/source/options

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tar-ignore = ".git"
2+
tar-ignore = ".vagrant"

doc/development.adoc

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,13 @@ Modify the provision.sh script to set up a USB filter to capture the device with
6060
First of all, set up the environment as described in the
6161
link:../vagrant/windows/README.md[Vagrant VM README].
6262

63-
To build the project:
63+
To build the project, run in command prompt (skip the `git checkout` step to build the latest commit):
6464

65-
$ git clone --recurse-submodules https://github.com/Yubico/yubioath-desktop.git
66-
$ cd yubioath-desktop
67-
$ vagrant\windows\build.bat
65+
> git clone --recurse-submodules https://github.com/Yubico/yubioath-desktop.git
66+
> cd yubioath-desktop
67+
> git checkout yubioath-desktop-<VERSION>
68+
> git show --show-signature
69+
> vagrant\windows\build.bat
6870

6971
The `build.bat` script will output the build version number near the beginning.
7072
Use that as the `<VERSION>` in the next series of commands. If you missed it,
@@ -75,3 +77,24 @@ To build the installer, plug in the code signing YubiKey and run:
7577

7678
$ cd yubioath-desktop
7779
$ vagrant\windows\release.bat <VERSION>
80+
81+
82+
== Publishing to Ubuntu PPA
83+
84+
1. Update version number and signoff in `debian/changelog`.
85+
2. Build and upload package.
86+
87+
For (2) you can use the Vagrant VM in `vagrant/ppa`. You'll need to set up the
88+
VM to capture the YubiKey containing your signing key. If you use VirtualBox,
89+
you can do this by uncommenting the USB filter included in the `Vagrantfile`.
90+
Then:
91+
92+
alice@work $ cd yubioath-desktop/vagrant/ppa
93+
alice@work $ vagrant up
94+
alice@work $ vagrant ssh
95+
ubuntu@ubuntu-xenial $ gpg --recv-keys ABCDEF78
96+
ubuntu@ubuntu-xenial $ gpg2 --recv-keys ABCDEF78
97+
ubuntu@ubuntu-xenial $ gpg2 --card-status
98+
ubuntu@ubuntu-xenial $ cd yubioath-desktop
99+
ubuntu@ubuntu-xenial $ python3 compute-version.py yubioath-desktop- > VERSION
100+
ubuntu@ubuntu-xenial $ ~/scripts/make-ppa -k ABCDEF78 -p gpg2

qml/ArrowKeysSelecter.qml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,30 @@ Item {
1616
Keys.onUpPressed: goUp()
1717

1818
function findSelectedIndex() {
19-
return credentials.findIndex(function(entry) {
19+
return util.findIndex(credentials, function(entry) {
2020
return entry.credential.key === selectedKey
2121
}) || null
2222
}
2323

2424
onGoDown: {
25-
if (nothingSelected) {
26-
selectedKey = firstCred.credential.key
27-
} else if (!lastCredSelected) {
28-
flickable.flick(0, -300)
29-
selectedKey = credentials[findSelectedIndex() + 1].credential.key
25+
if (nCreds > 0) {
26+
if (nothingSelected) {
27+
selectedKey = firstCred.credential.key
28+
} else if (!lastCredSelected) {
29+
flickable.flick(0, -300)
30+
selectedKey = credentials[findSelectedIndex() + 1].credential.key
31+
}
3032
}
31-
3233
}
3334

3435
onGoUp: {
35-
if (nothingSelected) {
36-
selectedKey = lastCred.credential.key
37-
} else if (!firstCredSeleced) {
38-
flickable.flick(0, 300)
39-
selectedKey = credentials[findSelectedIndex() - 1].credential.key
36+
if (nCreds > 0) {
37+
if (nothingSelected) {
38+
selectedKey = lastCred.credential.key
39+
} else if (!firstCredSeleced) {
40+
flickable.flick(0, 300)
41+
selectedKey = credentials[findSelectedIndex() - 1].credential.key
42+
}
4043
}
4144
}
4245

qml/Util.qml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import QtQuick 2.5
2+
3+
Item {
4+
visible: false
5+
6+
/*
7+
* Quick and dirty shim for Array.find added in Qt 5.9
8+
*
9+
* @param items: array
10+
* @param predicate: function(any) => Boolean
11+
* @return The first `item` in `arr` that matches the `predicate`, or
12+
* `undefined` if none matches
13+
*/
14+
function find(items, predicate) {
15+
if (items) {
16+
for (var i = 0; i < items.length; ++i) {
17+
if (predicate(items[i])) {
18+
return items[i]
19+
}
20+
}
21+
}
22+
return undefined
23+
}
24+
25+
/*
26+
* Quick and dirty shim for Array.findIndex added in Qt 5.9
27+
*
28+
* @param items: array
29+
* @param predicate: function(any) => Boolean
30+
* @return The index of the first `item` in `arr` that matches the
31+
* `predicate`, or `undefined` if none matches
32+
*/
33+
function findIndex(items, predicate) {
34+
if (items) {
35+
for (var i = 0; i < items.length; ++i) {
36+
if (predicate(items[i])) {
37+
return i
38+
}
39+
}
40+
}
41+
return undefined
42+
}
43+
44+
}

qml/main.qml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,10 @@ ApplicationWindow {
371371
id: noQr
372372
}
373373

374+
Util {
375+
id: util
376+
}
377+
374378
function selectCredential(entry) {
375379
selectedKey = entry.credential.key
376380
}
@@ -380,7 +384,7 @@ ApplicationWindow {
380384
}
381385

382386
function getSelected() {
383-
return credentials.find(function(entry) {
387+
return util.find(credentials, function(entry) {
384388
return isSelected(entry.credential)
385389
}) || null
386390
}

vagrant/ppa/Vagrantfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Vagrant.configure("2") do |config|
2626
# PRODUCT="Yubikey 4 OTP+U2F+CCID"
2727

2828
config.vm.provider "virtualbox" do |vb|
29-
vb.name = "yubioath-desktop:ppa"
30-
# vb.customize ['modifyvm', :id, '--usb', 'on']
29+
vb.name = "yubioath-desktop:ppa"
30+
vb.customize ['modifyvm', :id, '--usb', 'on']
3131
# vb.customize ['usbfilter', 'add', '0',
3232
# '--target', :id,
3333
# '--name', FILTER_NAME,

vagrant/ppa/provision.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ sudo apt-get install -qq \
3232
python-enum34 \
3333
libykpers-1-1 \
3434
libu2f-host0 \
35-
pcscd \
3635
debhelper \
3736
devscripts \
38-
dh-make
37+
dh-make \
38+
gnupg2 \
39+
gnupg-agent \
40+
scdaemon
3941

40-
git clone https://github.com/dainnilsson/scripts
42+
sudo -u ubuntu git clone https://github.com/dainnilsson/scripts

0 commit comments

Comments
 (0)