Hi, Qt folks,
I'm building a Qt-enabled Mac packaging of GNU Octave called Octave.app. http://octave-app.org/
We use the Qt Help Collection functionality, where we build .qhc files and register them with Qt's GUI help viewer.
I wanted to lock down the installation of our program so that users wouldn't accidentally modify parts of the core application. (Octave is an interpreted language, and parts of it are shipped as *.m source code files that a user might accidentally edit and overwrite.) So I locked down the installation by doing a "chmod -R a-r <install_location>" on my program.
Once I did that, on program startup, I started getting this error message:
> Could not copy help collection to temporary file. Search capabilities may be affected. Cannot unregister index tables in file /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellaremail@example.com/4.4.1/share/octave/4.4.1/doc/octave-interpreter.qhc.
Opening up write access to all the dirs and *.qhc files in my program installation made the error go away:
But this seems like Not the Right Thing: there are scenarios where a program installation location will or should be read-only. Like in my case, where I'm creating a macOS Application Bundle which I want to sign; that requires all the files in my app bundle to be unchanging, and they should probably be locked down with respect to write permissions. Or maybe in a corporate environment, someone wants to install their application on a read-only network share that various users mount and run the app from.
Does Qt Help really need write access to the .qhc files? And it looks like it's creating a temporary file in the same directory as the .qhc file or whatever; shouldn't it be creating its temporary files in $TMPDIR or some other user- or system-specific temporary directory, instead of in the application installation location?
Bug report against my application here: https://github.com/octave-app/octave-app/issues/188
|For Gerrit Dashboard: QTBUG-82126|
|312218,15||QtHelp: Reverse the default state for readonly property for help engine||dev||qt/qttools||Status: MERGED||+2||0|