Bug 271200 - sysutils/synergy Failed to open /usr/share/X11/xkb/rules/evdev.xml because wrong directory hardcoding.
Summary: sysutils/synergy Failed to open /usr/share/X11/xkb/rules/evdev.xml because wr...
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: Koichiro Iwao
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-02 13:42 UTC by Koine Yuusuke
Modified: 2023-10-01 13:19 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments
patch-src_lib_synergy_unix_AppUtilUnix.cpp (1.04 KB, text/plain)
2023-05-02 13:42 UTC, Koine Yuusuke
no flags Details
0001-sysutils-synergy-replace-hardcoded-path-for-evdev.xm.patch (1.24 KB, patch)
2023-09-25 07:35 UTC, Koichiro Iwao
no flags Details | Diff
synergy_Makefile_replace_X11_dir.patch (863 bytes, patch)
2023-10-01 11:09 UTC, Koine Yuusuke
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Koine Yuusuke 2023-05-02 13:42:27 UTC
Created attachment 241926 [details]
patch-src_lib_synergy_unix_AppUtilUnix.cpp

Hello.

I found an issue where the xkb evdev.xml rules file's directory hardcoded in the sysutils/synergy 1.14.5.14.3 source code is for Linux, so the following error 
messages is keeping logged in the /var/log/messages.

Apr 16 11:06:39 localhost Synergy[1.14.5]: - [2023-04-16T11:06:39] WARNING: Failed to open /usr/share/X11/xkb/rules/evdev.xml
Apr 16 11:06:39 localhost Synergy[1.14.5]: - [2023-04-16T11:06:39] WARNING: Language "jp" is unknown
Apr 16 11:06:39 localhost Synergy[1.14.5]: - [2023-04-16T11:06:39] WARNING: Failed to convert layout lang code! Code: "jp"

To fix this issue, I create a patch file for the sysutils/synergy port.

Please merge into the current port tree if possible.

(How to apply)
  1. # mkdir -p /usr/ports/sysutils/synergy/files
  2. Store the attached patch file (patch-src_lib_synergys_unix_AppUtilUnix.cpp) in the /usr/ports/sysutils/synergy/files directory.
  3. make & install port.

Best regards.
Comment 1 Koichiro Iwao freebsd_committer freebsd_triage 2023-09-25 07:35:46 UTC
Created attachment 245209 [details]
0001-sysutils-synergy-replace-hardcoded-path-for-evdev.xm.patch

Koine-san, could you test this patch?
Comment 2 Koine Yuusuke 2023-10-01 11:09:52 UTC
Created attachment 245349 [details]
synergy_Makefile_replace_X11_dir.patch

Iwao-San.

Thank you very much for your suggestions for fixing the Makefile file.

I tried the patch, but the directories were not replaced correctly due to the following two problems.

* Problem 1:
The directory embedded in the original source code is the "/usr/share/X11/xkb" directory, which should be replaced by the "/usr/local/share/X11/xkb" directory.
However, the patch was intended to replace from the "/usr/local/share/X11/xkb".

*Problem 2:
A compilation error occurred because " was embedded at the end of the replaced string.
A compile error occurred because a double quote character (") was embedded at the end of the replaced string in the patch.

I created a Makefile patch that corrects the above, so please merge it if you like.

Best regards.
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-10-01 13:08:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=755d5c1bfec3e50b4b6b4fce895dc992c568f5a9

commit 755d5c1bfec3e50b4b6b4fce895dc992c568f5a9
Author:     Koichiro Iwao <meta@FreeBSD.org>
AuthorDate: 2023-09-25 07:31:09 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2023-10-01 13:06:28 +0000

    sysutils/synergy: replace hardcoded path for evdev.xml

    PR:             271200
    Reported by:    Koine Yuusuke <koinec@yahoo.co.jp>
    Tested by:      Koine Yuusuke <koinec@yahoo.co.jp>
    Reviewed by:    meta
    Approved by:    maintainer timeout (> 4 months)

 sysutils/synergy/Makefile | 5 +++++
 1 file changed, 5 insertions(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-10-01 13:11:30 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5526e99ac541e68b269f5ed7db608a2147eaf99b

commit 5526e99ac541e68b269f5ed7db608a2147eaf99b
Author:     Koichiro Iwao <meta@FreeBSD.org>
AuthorDate: 2023-10-01 13:09:18 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2023-10-01 13:10:43 +0000

    sysutils/synergy: Remove unnecessary double quotation

    PR:             271200

 sysutils/synergy/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-10-01 13:13:31 UTC
A commit in branch 2023Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=54e58e1299b062139a1ad244bc56253ce16e9819

commit 54e58e1299b062139a1ad244bc56253ce16e9819
Author:     Koichiro Iwao <meta@FreeBSD.org>
AuthorDate: 2023-09-25 07:31:09 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2023-10-01 13:11:56 +0000

    sysutils/synergy: replace hardcoded path for evdev.xml

    PR:             271200
    Reported by:    Koine Yuusuke <koinec@yahoo.co.jp>
    Tested by:      Koine Yuusuke <koinec@yahoo.co.jp>
    Reviewed by:    meta
    Approved by:    maintainer timeout (> 4 months)

    (cherry picked from commit 755d5c1bfec3e50b4b6b4fce895dc992c568f5a9)

 sysutils/synergy/Makefile | 5 +++++
 1 file changed, 5 insertions(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-10-01 13:13:33 UTC
A commit in branch 2023Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d08c521923cc10e4358f1b7955b2d91ec699eb68

commit d08c521923cc10e4358f1b7955b2d91ec699eb68
Author:     Koichiro Iwao <meta@FreeBSD.org>
AuthorDate: 2023-10-01 13:09:18 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2023-10-01 13:12:35 +0000

    sysutils/synergy: Remove unnecessary double quotation

    PR:             271200
    (cherry picked from commit 5526e99ac541e68b269f5ed7db608a2147eaf99b)

 sysutils/synergy/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 Koichiro Iwao freebsd_committer freebsd_triage 2023-10-01 13:19:51 UTC
Committed, thanks!