Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIBEXECDIR should be set and used #208

Merged
merged 1 commit into from
Apr 29, 2021
Merged

LIBEXECDIR should be set and used #208

merged 1 commit into from
Apr 29, 2021

Conversation

gunnarhj
Copy link

@gunnarhj gunnarhj commented Apr 22, 2021

The architecture dependent executables ibus-openbangla and
openbangla-gui are currently installed in the /usr/share hierarchy,
which is not in accordance with the Filesystem Hierarchy Standard
for UNIX-like operating systems. This commit moves those files to
the more proper /usr/libexec directory and renames ibus-openbangla
to ibus-engine-openbangla.

The commit is a continuation of cea66e8.

Resulting file paths:

/usr/libexec/ibus-engine-openbangla
/usr/libexec/openbangla-keyboard/openbangla-gui

@mominul
Copy link
Member

mominul commented Apr 22, 2021

Thanks! But this issue was already raised in #183 and I resolved this in #206. Can you check that out, please? If that doesn't suffice, I'd be happy to merge this PR.

@gunnarhj
Copy link
Author

Ah, I didn't notice that you have multiple branches. Now I see it in develop_initial.

I still think /usr/libexec is more appropriate in this case than /usr/bin. The latter is in PATH and intended for user commands, and Debian's checks will complain about missing man pages. ;-) (But that is a less important thing.)

Whatever you decide, I think you should change src/engine/ibus/main.cpp too.

@gunnarhj
Copy link
Author

You may want to check out this Debian bug. openbangla-keyboard would divert (at least in Debian) with /usr/bin compared to other IBus input methods.

@mominul
Copy link
Member

mominul commented Apr 22, 2021

You may want to check out this Debian bug.

That's tricky. The Arch Package Guidelines however insists to avoid /usr/libexec/ directory but the FHS 3.0 standard advocates for it. 😞 Maybe the guidelines need to be updated?

@gunnarhj
Copy link
Author

gunnarhj commented Apr 22, 2021

Please note that Arch says:

Avoid using /usr/libexec/ for anything. Use /usr/lib/$pkgname/ instead.

Neither Arch nor FHS 3.0 mentions /usr/bin, so at least they seem to agree that that is not correct.

Most IBus plugins default to /usr/libexec. Debian/Ubuntu previously changed it (typically via a --libexec-dir configure flag) to /usr/lib/ibus since IBus couldn't cope with /usr/libexec (in some respect I don't remember). That was changed in Debian's version 1.5.22-2 of ibus — hence that bug report.

Maybe make LIBEXECDIR configurable. And let it default to either /usr/libexec (my choice) or /usr/lib/ibus.

@ahmubashshir
Copy link
Contributor

ahmubashshir commented Apr 22, 2021

I prefer /usr/lib/openbangla-keyboard.

@mominul
Copy link
Member

mominul commented Apr 22, 2021

Neither Arch nor FHS 3.0 mentions /usr/bin, so at least they seem to agree that that is not correct.

I am fine with not placing the binaries in the /usr/bin. I just had the confusion about choosing between /usr/libexec or /usr/lib/ibus directory.

Maybe make LIBEXECDIR configurable. And let it default to either /usr/libexec (my choice) or /usr/lib/ibus.

Yeah, it seems the best possible solution for now. 👍

But openbangla-gui is a user-facing application that has also a desktop entry, where should we place this binary?

I prefer /usr/lib/openbangla-keyboard.

As we're trying to follow the convention of other ibus engines, I don't think placing the engine binary in that directory would be good. But placing openbangla-gui there is plausible and need decision.

@ahmubashshir
Copy link
Contributor

ahmubashshir commented Apr 22, 2021 via email

@gunnarhj
Copy link
Author

@mominul wrote:

As we're trying to follow the convention of other ibus engines

Re how others do, there is a pattern — also with respect to the file names:

$ ls -1 /usr/libexec/ibus-* | grep -E 'engine|setup'
/usr/libexec/ibus-engine-anthy
/usr/libexec/ibus-engine-hangul
/usr/libexec/ibus-engine-libpinyin
/usr/libexec/ibus-engine-libthai
/usr/libexec/ibus-engine-m17n
/usr/libexec/ibus-engine-simple
/usr/libexec/ibus-engine-table
/usr/libexec/ibus-engine-unikey
/usr/libexec/ibus-setup-anthy
/usr/libexec/ibus-setup-hangul
/usr/libexec/ibus-setup-libpinyin
/usr/libexec/ibus-setup-libthai
/usr/libexec/ibus-setup-m17n
/usr/libexec/ibus-setup-table
/usr/libexec/ibus-setup-unikey

@mominul
Copy link
Member

mominul commented Apr 24, 2021

@gunnarhj openbangla-gui is a user-facing application that has also a desktop entry, where should we place this binary?

@ahmubashshir
Copy link
Contributor

openbangla-gui should be in /usr/bin/

@gunnarhj
Copy link
Author

gunnarhj commented Apr 24, 2021

@mominul wrote:

openbangla-gui is a user-facing application that has also a desktop entry, where should we place this binary?

If I understand it correctly, the presence of a .desktop file does not in itself change anything. I'm aware of one other IM (mozc) which has a .desktop file with a visible icon in the menus, and the path to its equivalent is:

/usr/lib/mozc/mozc_tool

But mozc is a bit special, since it provides input methods for multiple IM frameworks, i.e. not only ibus.

So I still think that /usr/libexec would be a proper location.

@ahmubashshir wrote:

openbangla-gui should be in /usr/bin/

Provided that the intention is to make it easy for users to start the thing via a terminal command, that's a proper location. Otherwise /usr/libexec is better.

Copy link
Member

@mominul mominul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the inputs @gunnarhj!
Could you please rebase this PR onto the develop branch and consider adding the requested changes?

Thanks!

src/frontend/CMakeLists.txt Outdated Show resolved Hide resolved
data/openbangla-keyboard.desktop.in Outdated Show resolved Hide resolved
src/engine/ibus/CMakeLists.txt Outdated Show resolved Hide resolved
src/engine/ibus/main.cpp Outdated Show resolved Hide resolved
data/openbangla.xml.in Outdated Show resolved Hide resolved
@mominul
Copy link
Member

mominul commented Apr 27, 2021

cc @natrys

@gunnarhj gunnarhj changed the base branch from master to develop April 27, 2021 12:57
The architecture dependent executables ibus-openbangla and
openbangla-gui are currently installed in the /usr/share hierarchy,
which is not in accordance with the Filesystem Hierarchy Standard
for UNIX-like operating systems. This commit moves those files to
the more proper /usr/libexec directory and renames ibus-openbangla
to ibus-engine-openbangla.

The commit is a continuation of cea66e8.

Resulting file paths:

/usr/libexec/ibus-engine-openbangla
/usr/libexec/openbangla-keyboard/openbangla-gui
@gunnarhj
Copy link
Author

Ok @mominul, I think I have changed it in accordance with your comments, at least almost...

I put openbangla-gui in /usr/libexec/openbangla-keyboard instead of /usr/lib/openbangla-keyboard to be consistent and avoid the addition of yet another variable.

I'm not a git wizard, so instead of rebasing I simply force pushed the modified branch.

Copy link
Member

@mominul mominul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mominul mominul merged commit eca4ba7 into OpenBangla:develop Apr 29, 2021
@mominul mominul added this to In progress in 3.0.0 via automation Apr 29, 2021
@mominul mominul moved this from In progress to Done in 3.0.0 Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3.0.0
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants