Re: [SailfishDevel] SyncML Plugin Server question

2019-08-07 Thread Graham Cobb
On 07/08/2019 09:45, Chris Adams wrote:
> Thanks for doing that work!

+1

deloptes is one of the few major PIM Sync developers who hasn't given up
and is still doing very useful work! I speak as a former contributor to
Opensync, GPE sync, Syncevolution (and several other attempts) who has
largely given up on the problem.

> This was the fundamental reason why the original calendar sync PR wasn't able 
> to be merged: the semantics of such "round trip, multiple device" 
> synchronisation cycles weren't well defined, and instead the sync acted more 
> as an "import" than a true "sync" (potentially resulting in data duplication).

That is a hard problem. Particularly if both devices are also syncing
with other devices (or a main server -- typically a Google or Exchange
server). And it becomes almost impossible when we realise that the
devices all have limitations so different devices may unintentionally
lose (or, worse, modify) different attributes.

> In many cases, what you want is actually a simple "import" from another 
> device - but sharing the .vcf or .ics via Bluetooth sharing and then manually 
> importing that via Settings->Apps->People->Import vCard is probably the 
> better option.

I have (reluctantly) come to the conclusion that the best solution is to
maintain a central server and for each device to do "almost-one-way"
syncs -- syncs where updates are imported from the server but where
changes made locally since the last sync can be reviewed and manually
approved to be sent back to the server.

Unfortunately, even that is not actually supported by any of the current
tools. I end up doing one-way syncevolution syncs and then do manual
conflict resolution.

Unfortunately, the world doesn't seem to see this as a big problem - and
the current trend to only having two ecosystems (Google's and Apple's)
is not going to change that view. And sailfish is not going to be able
to fix it by itself.

But thanks, again, to deloptes for doing the work to keep us going!
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Re: [SailfishDevel] [Not TLS] How to use self-signed certificates transparently in a https POST/GET request with a QT Quick application?

2015-08-17 Thread Graham Cobb
On 17/08/15 20:56, juice wrote:
 The authenticity of the server is not so important that it definitely
 requires
 a true certificate, it is just enough that the communication between the
 client
 and the server is encrypted. 

You didn't ask this, so feel free to ignore this comment...  But be
aware that accepting all certificates without checking does compromise
encryption.  Of course, any certificate can be used to create good
quality encryption, but the problem with not checking the authenticity
is that it exposes you to man-in-the-middle attacks.  If someone can
somehow insert themselves into the communication path, and offer you
their own certificate, you would get perfect encryption to and from your
enemy and your communication would still be exposed!

 The user anyway configures the used server
 by DNS
 name or IP address and usually the server is controlled by the user anyway.

I am not a security expert, and I recommend you contact someone who is.
 However, I would strongly suggest that, at the very least, you i) check
the server name (so someone is forced to at least go to the effort of
providing a certificate with the correct name), and ii) notify the
client, and ask for confirmation, every time the certificate changes.
If the server is controlled by the user they would know whether they
have replaced the certificate!

 Now how can I do this, so that in the client I need not preload any
 certificates,
 so that for example when the user changes the server address, the next
 request
 just goes thru encrypted, without caring whether the server certificate
 is valid?

Personally, I would prefer that you provide a mechanism for me to
provide you with the signing CA credentials so you can check my
self-signed key really was signed by me (with a default of using the
normal OS-shipped trusted CAs).  But I don't know what your threat model is.

Graham
___
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org


Re: [SailfishDevel] Adding tinc to mer-tools

2014-04-06 Thread Graham Cobb
On 03/04/14 10:18, David Greaves wrote:
 On 02/04/14 20:45, Graham Cobb wrote:
 I am thinking of submitting the package in its current form to Chum.
 Anything I ought to know before doing that?
 
 Why not submit it and then we'll do a public review?

I submitted it (clicked submit in the OBS web interface).  Now, a few
days later, it looks as though it has appeared in Chum testing!  Thanks
for that but I am a little bit confused about the process: is there
somewhere I should have been looking to keep track of the status and/or
looking for comments?  Some mailing list or web site?

Or, if there had been any review comments would I have been notified by
email or something?

Graham
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Adding tinc to mer-tools

2014-04-02 Thread Graham Cobb
I have now got a tinc package which handles systemd (systemctl can be
used to start and stop tincd using a service called
tinc@netname.service, where netname is the network name to be used by
tinc).

I have not done anything about connman.  I have looked into it and it
looks hard: connman doesn't have support for tinc.  The best way to make
it work looks to me like pretending tinc is a supported vpn such as
openconnect and providing a program that pretends to be openconnect but
actually controls tinc.

Connman doesn't seem to be a problem for my (limited) usage so far.  I
tend to use tinc only for limited periods of time, in static locations
(such as hotel rooms) so there are no network changes going on for
connman to decide it needs to take action.  Of course, I may find out
that I am wrong and I do need to do something about connman but, until
that time, I am not going to try to solve that problem.

I am thinking of submitting the package in its current form to Chum.
Anything I ought to know before doing that?

Also, while doing this I have discovered that there are a number of
other standard utilities I really want on my phone (like unison).  Is
Chum a suitable place to submit those?

Graham
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Adding tinc to mer-tools

2014-03-30 Thread Graham Cobb
On 30/03/14 08:05, Thomas B. Rücker wrote:
 On 03/29/2014 11:44 PM, Graham Cobb wrote:
 I have taken the tinc rpm source from CentOS (tinc-1.0.23-1.el5.src.rpm)
 and rebuilt it on my jolla phone (using rpmbuild --rebuild).  It seems
 to work fine.
 
 That's nice. I guess it's CLI only and you'll have to figure out to
 fight connman over resetting routes? 

Yes, and yes.  I will look into connman next.

 I should try it against my TINC server.

I will make the RPM available shortly (a bit more testing, and I will
re-look at the packaging as per your advice).

After that, I will look into Chum.  I suspect I will have to go ahead
and install the SDK if I am going to start using OBS.  I was trying to
see how much I could do with just HTML5 apps (and rpm packaging tools).

Thanks for the pointers and the advice, Thomas.

Graham

___
SailfishOS.org Devel mailing list


[SailfishDevel] Adding tinc to mer-tools

2014-03-29 Thread Graham Cobb
I have taken the tinc rpm source from CentOS (tinc-1.0.23-1.el5.src.rpm)
and rebuilt it on my jolla phone (using rpmbuild --rebuild).  It seems
to work fine.

Can I contribute it to Mer so it eventually appears in the mer-tools
repository?  Can anyone point me to how I would start that?  Is it OK to
use a package from another distribution or would I have to go back to
the upstream tar and re-package it myself?

Alternatively, if Mer don't want it, I guess I have to look into
openrepos.  But would that mean I would have to create an app to use it?

Graham
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] [Update] Changelog for SailfishOS update 4 (1.0.4.20)

2014-03-18 Thread Graham Cobb
On 18/03/14 15:23, Mohammed Hassan wrote:
 the SD card will be mounted under /media/sdcard in a directory named
 after the UUID of the partition. This was done in order to guarantee
 that tracker can identify the partition uniquely.

That is a really, really bad decision.  Was there any discussion on
together about this idea for working round the tracker bug that it
doesn't record media ids along with file names?  If so I missed it.

So, a tracker bug means that every user now has to deal with stupid
directory names and things called UUIDs which they have never heard of?

Even I could come up with a better idea with 30 seconds thought: mount
the sdcard (if it has more than one partition, choose any one at random
-- 99.999% of cards don't have more than one partition) into (say)
/home/nemo/sdcard.  Tell tracker not to index /home/nemo/sdcard/.  Also
mount every partition into /media/sdcard/UUID and let tracker index
those.  Unmount them all on shutdown.

 Also note that if you have more than one partition then all will be
 mounted under /media/sdcard/ so there isn't even a guaranteed single
 partition to begin with ;-)

Anyone with sdcards with more than one partition can probably handle dev
mode and control the mounting themselves.  In any case, the stupid UUID
directories should only appear if there is more than one partition.

Anyway, this list isn't the right place to work out the solution. Please
contribute to the discussion at
https://together.jolla.com/question/33774/info-10420-ext-sdcard-directory-change/

Graham
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] [Update] Changelog for SailfishOS update 4 (1.0.4.20)

2014-03-18 Thread Graham Cobb
Mohammed,

Thanks for your comments.  Please re-make them in the discussion on
together, which is where this idea should have been discussed with the
user and application developer community before the change was made.

https://together.jolla.com/question/33774/info-10420-ext-sdcard-directory-change/

Graham
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Cannot ssh to device in USB developer mode

2014-01-23 Thread Graham Cobb
On 23/01/14 14:01, dcali...@free.fr wrote:
 - I ssh at this address with nemo as login, it's responding since it proposes 
 to
 add the hw key to the known host list, and then it's asking for the password,
 but when I type it, I get permission denied. The password is alright since I 
 can
 ssh to the device when using WLAN connection.

It sounds like you are connecting to the ssh on your own machine.  To
test that you could try logging in to an account which exists on your
own machine (or check the hw key, or set up a banner message).

Setting up the interfaces correctly is error-prone.  Double and triple
check the instructions.

___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] QML Timer stops running

2014-01-14 Thread Graham Cobb
On 14/01/14 01:14, Thomas Tanghus wrote:
 On Tuesday 14 January 2014 01:53 Ove Kåven wrote:
 No matter what OS or platform you're on, counting the number of times
 your timer callback is called is *never* a good idea, even on desktop
 PCs. Timer callbacks can be skipped for any number of reasons (heavy
 system load, laptop suspend, etc).

...
 Good point. That will also at least work around the issue when in pre-deep-
 sleep.

I agree with Ove (that is how every timer function I have ever worked on
works, from interrupt handlers in embedded system kernels through to the
GPE Calendar app) -- repeating timers are a convenience, but are never
treated as accurate.

But I would also suggest that for any apps that do timing, when the app
is not being displayed (and so the screen doesn't need to be updated),
the code should switch to using a single-shot timer set to the time when
the next event happens, instead of using repeating timers.  If the
kitchen timer is set for 25 minutes and the screen is blank you don't
want your app waking up every second.  Of course, it is a little bit
tedious to write the code to cancel the long timer and restart short
timers when the screen is turned back on but the user will thank you for it.

Unfortunately, I have no idea how you actually set up a single shot
timer that will fire correctly in deep sleep from the Qt environment
(the last time I implemented that logic was on Maemo).

Graham
___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] Jolla Phone crashes with no mobile network available

2014-01-10 Thread Graham Cobb
On 10/01/14 11:01, Benoît HERVIER wrote:
 I ve see similar things, while entering leaving metro in Paris 
 (unreliable network coverage).

I have also seen some similar issues but I have not yet put a SIM card
into my Jolla at all!  I am using WiFi, of course.

 Lagging, many 'can't connect' notification, not responding, 
 removing battery.

I have seen these on occasion, except that I have not had to remove
the battery.  Most of the time, if I wake it up (short press on power
button) it sorts itself out after a while -- it may go blank and need
waking up again several times during this.  One time I just got
continuous can't connect messages so I turned the wifi off (flight
mode) and back on and it worked.  Another time I needed to reboot.

Note that I have sometimes seen can't connect messages while I am
actually using the network connection!

 I've currently activated persistent mode in journal (else journal 
 are cleaned  at reboot), to be able to see what happen, but i'm
 not anymore in Paris until next week. And this didn't happen since 
 yesterday.

Where is that setting?

Graham
___
SailfishOS.org Devel mailing list

[SailfishDevel] Input file tag in Sailfish browser?

2014-01-07 Thread Graham Cobb
Is the input file tag supposed to work in the Sailfish browser?

If I use...

input type=file id=files name=files[] multiple /

I get an input box shown, with a button labelled Browse... but nothing
happens if I touch on it.
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] No consistency across screens

2013-12-30 Thread Graham Cobb
On 30/12/13 17:20, Mikael Hermansson wrote:
 On Monday 30 December 2013 15.35.39 Graham Cobb wrote:
 I need that information all the time -- a **lot** more
 often than I actually interact with the phone.
 In every app you can just shortly swipe left less than half of screen

It doesn't work when on the home screen.  So, you have to look at the
screen, work out which page it is on and then take some special action
dependent on that page.

 http://www.youtube.com/watch?v=p9YGtW274GI and you will see the clock,
 3g level and wifi level and then just release and you back in current
 application. So I dont see any reason this must be visible all the time
 when its so easy check it that way.

My phone sits on my desk, near my normal line of sight, and I glance at
it frequently. I don't move my hands off the keyboard to touch it -- I
am not even consciously doing the task of checking my phone.

I also often glance at it while on a non-handsfree call which has become
a longer call than I expected -- while talking and listening I can
quickly move the phone into view, check it isn't about to run down on me
and return it to my ear without the other person noticing.

There are three key pieces of information which must be available at a
glance: is there signal?, how is the battery?, have there been any
missed calls?

Note: I spend a lot of time on conference calls of an hour or so,
usually using a desk phone -- I often do not remember whether I missed
any calls on my mobile while I was on a conference call.  Nor do I
always remember to check when the call finishes (often rushing to get a
glass of water or go to the toilet before the next call starts).  So,
having all three things visible whenever my eyes stray from my screen to
my phone is very important.

 Seriously, just because everyone copycats each other in that area it
 doesn't mean it can be done different.

Indeed. But just because a UI feature looks nice doesn't mean it is
necessarily practical.

I am not a UX person, but I strongly suspect the Jolla team need to do
more user testing, with more varied types of users, in this area.
___
SailfishOS.org Devel mailing list


[SailfishDevel] Developer mode: SSH config and devel-su

2013-12-28 Thread Graham Cobb
I would like to make a few changes to the login/auth setup for developer
mode on my phone, to make it more similar to the other embedded devices
I hack on.

Does anyone see any problem with doing the following:

1) Put an authorized key in /home/nemo/.ssh and set
PasswordAuthentication no in sshd_config.  Remote SSH access would
then require using the right key.

2) Set PermitRootLogin no in sshd_config.  This disables direct SSH
access to the root account (allowing me to safely do the following step).

3) Set a password on the root account and enable the account.

4) Use su - to gain root access instead of devel-su.

5) Disable devel-su altogether.

The last two steps assume that devel-su does nothing that su does not,
except ask for the nemo account password instead of the root password
and that no important software (e.g. part of booting) uses devel-su.

I must admit I do not like the fact that the developer mode password is
displayed in the settings.  I realise that anyone with physical access
to the phone can get root access but I would prefer it to be a tiny bit
harder than just looking at the password in the settings.

If no one knows of any problems, I will give it a try in the next few
days and report back.

Graham
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Developer mode: SSH config and devel-su

2013-12-28 Thread Graham Cobb
On 28/12/13 12:01, David Greaves wrote:
 On 28/12/13 11:20, Graham Cobb wrote:
 I would like to make a few changes to the login/auth setup for developer
 mode on my phone, to make it more similar to the other embedded devices
 I hack on.
...
 I'm not sure how future updates will handle manually changed config files but 
 I
 think we should be OK.

Thanks for your response, David.  It would be nice if my changes were
preserved, of course, but at least these two particular changes will not
lock me out if they do get reverted.

 Note that the SDK does something similar and ssh'es in as nemo. It uses a
 password for the first-time key setup and thereafter just uses keys - so make
 sure you setup SDK access first for a simpler life.

Ah, thanks for that warning.

 2) Set PermitRootLogin no in sshd_config.  This disables direct SSH
 access to the root account (allowing me to safely do the following step).
 
 I just add a key to root's authorized_keys. 

That certainly works, but it is just not the way I have any of my other
systems set up.  I always disable root access and do everything via an
unpriv'd login and su.  So I don't plan to do that.

 5) Disable devel-su altogether.

...
 devel-su is only installed in developer mode. However it's presence is a 
 really
 good indicator of developer mode and I'd be cautious of deleting it.

My plan had been to remove the setuid bit.  But now plan to leave it
untouched.

 I must admit I do not like the fact that the developer mode password is
 displayed in the settings.  I realise that anyone with physical access
 to the phone can get root access but I would prefer it to be a tiny bit
 harder than just looking at the password in the settings.
 
 It is not displayed if you set it to a value of your choosing :)

Hmm.  I had tried that before sending the post!!  But I obviously did
something wrong as it is now working as you describe (and as I had
expected, to be honest).

 It may be easier to simply alias su to devel-su in your bashrc.

Yes.  I will probably do something like that instead of steps 3-5 from
my original mail.

Thanks again.
___
SailfishOS.org Devel mailing list


Re: [SailfishDevel] Harbour news

2013-12-17 Thread Graham Cobb
On 17/12/13 19:01, Damien Caliste wrote:
 think you need an API (library or QML import) for your Harbour app that
 is not yet approved, let us know on sailfish-devel.
 I posted before about the Glib stack with Cairo,   that propose a stable API, 
 that may help to port applications to Sailfish. Namely, glib-2.0, gobject-2.0 
 and cairo-1.0, plus some other low-level libraries, like libsoup, libcurl or 
 libjpeg-turbo. I know they are low level and Qt provides abstractions for 
 them, but when porting, it's easier to keep these low level libraries, which 
 have a stable API anyway. QML is used for UI on Sailfish in that case with 
 these low level backends (already available in Mer).
 
 What do you think ?

I support this, at least for Glib/Gobject.  Glib is a useful library
and, for any app which uses it at all, it will be likely to be
completely embedded throughout the code.  While the GUI of such an app
will need to be reworked for Sailfish, the 80% of the code which
actually does something might be able to be left relatively untouched.

Graham
___
SailfishOS.org Devel mailing list