I am trying to make a system-wide Lazarus installation
(with a package) consistent with (Gentoo) Linux best practices:
(a) system-wide usable files should only be added/removed/changed by the package manager
(b) that was it, huh?
The way I currently manage this is:
(1) I install the Lazarus package with
lazbuild -B --lazarusdir="." --pcp="/etc/lazarus" --build-ide= --add-package Python-for-Lazarus/python4lazarus/python4lazarus_package.lpk
(2) I launch Lazarus with
and I get
The package "python4lazarus_package" is installed, but no valid package file (.lpk) was found.
A broken dummy package was created.
This, however, only happens if I run startlazarus as my user. Run as root, it detects the package just fine.
Changing the PCP permissions:
chmod -R 777 /etc/lazarus
Makes it also work as user.
This is however not a suitable solution, since any user could modify the files. A Lazarus installation which my package manager knows has python4lazarus support, could have the python4lazarus removed by a user, and would break anything that depends on the feature.
How would you suggest I address this? I had thought that
could be copied to
whenever Lazarus is first launched. I could do this via a wrapper easily enough, but that would't really suffice. I would need to do the same at least for lazbuild as well and perhaps also other stuff, and it might break in the future contingent on what other executables you might add. I was thinking maybe you have a more sustainable suggestion?
I have read
this page, and it sounds like it should “just work”, except it appears that if it doesn't have permission to read /etc/lazarus startlazarus creates a
no-package-containing directory under ~/.lazarus, instead of copying /etc/lazarus/ (which it can) and taking it from there. Is there any way to instruct it to do so?