Bug 234001 - editors/focuswriter: Update to 1.7.1
Summary: editors/focuswriter: Update to 1.7.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Steve Wills
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-12-14 03:42 UTC by lightside
Modified: 2018-12-26 22:45 UTC (History)
0 users

See Also:


Attachments
Proposed patch (since 487272 revision) (875 bytes, patch)
2018-12-14 03:42 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch (since 487272 revision) (2.31 KB, patch)
2018-12-14 08:59 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch (since 487272 revision) (1.63 KB, patch)
2018-12-15 05:06 UTC, lightside
no flags Details | Diff
Proposed patch (since 487272 revision) (1.92 KB, patch)
2018-12-17 07:17 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch (since 487272 revision) (1.11 KB, patch)
2018-12-17 14:29 UTC, lightside
lightside: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lightside 2018-12-14 03:42:49 UTC
Created attachment 200099 [details]
Proposed patch (since 487272 revision)

Patch to update editors/focuswriter port from 1.6.16 to 1.7.0 version.

Look following links for changes:
https://github.com/gottcode/focuswriter/compare/v1.6.16...v1.7.0
https://github.com/gottcode/focuswriter/blob/v1.7.0/ChangeLog#L1-L9

To note:
In this version was removed some workaround for QtLocalPeer::isClient() method and replaced it with different algorithm:
https://github.com/gottcode/focuswriter/commit/6504e14079852940fccbbcddfb1720213cc27b5b
https://github.com/gottcode/focuswriter/commit/4b8f11f5523042b83e79513767575b98bbb4da09

If focuswriter application doesn't start for some reason, possible to try to remove /tmp/qtsingleapp-*-lockfile (or /tmp/qtsingleapp-*) file:
https://github.com/gottcode/focuswriter/blob/3e3fb3a205e8f4fc7b4264b49cc05dc35f6e9074/src/qtsingleapplication/qtlocalpeer.cpp#L77-L97
Comment 2 lightside 2018-12-14 05:15:49 UTC
Please do not update. I reported about this issue to focuswriter's developer.
I was able to reproduce this issue after running focuswriter v1.6.16 application once for some *.odt file. After close there was found stale /tmp/qtsingleapp-*-lockfile (*, because it may be different on other PC). The focuswriter v1.7.17 wasn't able to run for some reason for this empty /tmp/qtsingleapp-*-lockfile, but was ok after it's removal.
Comment 3 lightside 2018-12-14 06:26:56 UTC
(In reply to comment #2)
> The focuswriter v1.7.17
The focuswriter v1.7.0, of course.

Probably, some method in QLockFile expects some number for first line at /tmp/qtsingleapp-*-lockfile file. If first line is empty or contains other character(s), then focuswriter v1.7.0 also doesn't run. Maybe need to check format of /tmp/qtsingleapp-*-lockfile before use (or other methods).
Comment 4 lightside 2018-12-14 06:46:38 UTC
(In reply to comment #3)
> If first line is empty or contains other character(s), then
> focuswriter v1.7.0 also doesn't run.

The focuswriter v1.7.0 also doesn't run if /tmp/qtsingleapp-*-lockfile contains following data, in my case:
-8<--
16
focuswriter
-->8-

But ok, if > 16:
-8<--
17
focuswriter
-->8-

or without "focuswriter" on second line:
-8<--
16
-->8-

So, this is not just number in first line.
Comment 5 lightside 2018-12-14 08:59:18 UTC
Created attachment 200106 [details]
Proposed patch (since 487272 revision)

Attached new patch with some workaround for empty /tmp/qtsingleapp-*-lockfile file case.

But possible to wait for official patch from focuswriter's developer, if needed.

I saw some discussion on:
https://github.com/gottcode/focuswriter/pull/197
Comment 6 lightside 2018-12-15 05:06:32 UTC
Created attachment 200127 [details]
Proposed patch (since 487272 revision)

I decided to propose more simple solution for this 1.6.16 -> 1.7.0 case (on Qt 5.11.2, because there is newer Qt 5.12 available, which may have other behavior). Possible to use another name for /tmp/qtsingleapp-*-lockfile file, e.g. /tmp/focuswriter-*-lockfile.

Attached new patch. Please test and commit. Thanks in advance.
Comment 7 lightside 2018-12-15 14:32:23 UTC
Comment on attachment 200127 [details]
Proposed patch (since 487272 revision)

The focuswriter's developer replied with some working solution.
Please wait.
Comment 8 lightside 2018-12-17 07:17:04 UTC
Created attachment 200180 [details]
Proposed patch (since 487272 revision)

Added patch from upstream:
https://github.com/gottcode/focuswriter/commit/0c3f463f844af43b9a780955872763c8e33bd001

The previous information about /tmp/qtsingleapp-*-lockfile is outdated and no need to note.
Possible to commit.
Comment 9 lightside 2018-12-17 14:29:08 UTC
Created attachment 200197 [details]
Proposed patch (since 487272 revision)

Updated to 1.7.1 version.

Look following links for changes:
https://github.com/gottcode/focuswriter/compare/v1.6.16...v1.7.1
https://github.com/gottcode/focuswriter/blob/v1.7.1/ChangeLog#L1-L13
Comment 10 commit-hook freebsd_committer 2018-12-26 22:45:26 UTC
A commit references this bug:

Author: swills
Date: Wed Dec 26 22:44:30 UTC 2018
New revision: 488480
URL: https://svnweb.freebsd.org/changeset/ports/488480

Log:
  editors/focuswriter: Update to 1.7.1

  PR:		234001
  Submitted by:	lightside <lightside@gmx.com> (maintainer)

Changes:
  head/editors/focuswriter/Makefile
  head/editors/focuswriter/distinfo
Comment 11 Steve Wills freebsd_committer 2018-12-26 22:45:35 UTC
Committed, thanks!