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

ibus-cangjie does not respect --libexecdir #58

Open
czchen opened this issue Jun 2, 2014 · 5 comments
Open

ibus-cangjie does not respect --libexecdir #58

czchen opened this issue Jun 2, 2014 · 5 comments
Assignees

Comments

@czchen
Copy link

czchen commented Jun 2, 2014

From https://bugs.debian.org/746978

In debian, we want to put ibus-engine-cangjie to /usr/lib/ibus like other ibus packages. However, ibus-cangjie does not use the value set by --libexecdir to determine the path of ibus-engine-cangjie, thus we cannot change ibus-engine-cangjie easily. Please help to support --libexecdir, thanks.

@bochecha
Copy link
Member

bochecha commented Jun 2, 2014

First of all, if you set libexecdir to /usr/lib/ibus, then ibus-engine-cangjie will be installed in /usr/lib/ibus/ibus-cangjie/ibus-engine-cangjie, because it goes in pkglibexecdir, which is $(libexecdir)/$(package_name). Reading the reports, I have a feeling that's not what you want.

Second, I'm explictly setting libexecdir to /usr/lib in the Makefile.am, because that's where it makes the most sense to install this stuff.

I'm really not interested in having each downstreams installing the stuff in a different location, as eventually I'm the one who has to support users with the issues this creates. So I'd need a very compelling reason to support what you're asking for.

Before we proceed further, why exactly do you want to install this file in this location? What purpose does it serve? How is it better for users?

@czchen
Copy link
Author

czchen commented Jun 10, 2014

The purposed path for ibus-engine-cangjie is /usr/lib/ibus. The reasons for it is in https://wiki.debian.org/Teams/IMEPackagingTeam/ibus.

@bochecha
Copy link
Member

So this completely fell under my radar, sorry I didn't give any news for so long.

Reading the page you linked to...

Why /usr/lib/ibus for the plug-in executable

Unlike Fedora/RedHat, Debian does not use /usr/libexec directory for the plug-in executable.

As a Fedora contributor, let me first say that I am very happy Debian isn't following us in using /usr/libexec. 😄

That folder is just plain stupid, and it is on purpose that IBus Cangjie doesn't install in /usr/libexec in Fedora (I maintain the ibus-cangjie packages in Fedora 😉).

We should use directory under /usr/lib for both shared library and plug-in executable.

This I partially agree with:

  • The library is better IMHO in the normal Python sys.path, like any other Python library, which is what we currently do. (although there isn't much interest for anything outside of IBus Cangjie itself to import it, so I don't care much either way)
  • The plug-in executable indeed is better in a "directory under /usr/lib", and this is what we currently do: /usr/lib/ibus-cangjie/

Most packages install their data under $(libexecdir)/package-name/ ...".

This is what we do here. 😃

These plug-ins are executable daemons and setup-tools with "arch: foreign" so the installation path should not have arch-dependent part such as /lib/x86_64-linux-gnu

This is an excellent point, and we certainly need to make sure we respect this.

As far as I know, we do respect this, but I'm unfamiliar with the way this works in Debian (it is completely different in Fedora). Can you confirm we're not doing anything wrong on this point?

bug script in the ibus package used by the reportbug assumes you installed *-setup and *-engin in /usr/lib/ibus. This makes things easy to track.

That's honestly a bad idea.

The setup script is a user-facing executable, it really should be in /usr/bin

As for the *-engine plug-in executable, its path can be obtained from the XML component file. This is how IBus itself gets it, and it's how reportbug should get it too...


So first of all, it seems that we agree on a few things. 😃

We both agree that /usr/libexec is wrong, and that instead we should install the plug-in executable in a subdirectory of /usr/lib. We just disagree on which directory that should be.

The main argument in favour of /usr/lib/ibus is that reportbug expects it there. To me, this sounds like an assumption that reportbug really shouldn't be doing.

My main argument in favour of /usr/lib/ibus-cangjie is that this is the GNU convention (which I consider pretty good in this case), and ibus-cangjie isn't any special in this regard, so there is no reason for it not to install under $(libexecdir)/$(package_name).

Here are a few more questions for you:

  1. Can you confirm we're not causing any trouble with the Multiarch scheme used by Debian? I would consider this a complete blocker and would be willing to fix it ASAP.
  2. Does it really matter where the library (the Python module) is installed? If it is a big deal, I'd be open to moving it to install in the same directory as the plug-in executable (currently `/usr/lib/ibus-cangjie)
  3. Can reportbug be fixed so it stops assuming that all IBus plug-in executables are in /usr/lib/ibus? (can you provide a link to that script, actually?)
  4. Apart from point 3 above, are there other reasons for putting everything in /usr/lib/ibus?

Let's find something that works for both of us. 😃

@bochecha bochecha self-assigned this Dec 30, 2014
@bochecha
Copy link
Member

Answering one of my questions:

  1. Does it really matter where the library (the Python module) is installed?

Other IBus engines don't seem to install it in /usr/lib/ibus at all, for example ibus-table installs it in /usr/share/ibus-table.

So at least that part of the policy page is wrong (or I misunderstood it 😄), and there is no need for me to move the Python library.

@changwoo
Copy link

Here is an update: Debian ibus package now uses /usr/libexec.

In 2014, the Debian policy used FHS 2.1 which had no /usr/libexec. But the current Debian policy uses FHS 3.0 which explicitly specifies /usr/libexec as the path for internal executable files.

See https://bugs.debian.org/955227 for another ibus-cangjie package bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants