You are not logged in.
Pages: 1
What can I add to the PKGBUILD to assume ownership of a file which is installed by the package after the install process?
Specifically, the openpyn (https://aur.archlinux.org/packages/openpyn-nordvpn/) package will install /etc/systemd/system/openpyn.service, but not as part of the normal installation process.
It does so when the end user runs openpyn --init. However, I think the package should still own the file and the package should remove the file on uninstall.
Last edited by ryan_greenblatt (2020-12-11 14:57:06)
Offline
There's no way to adopt a file, afaik. If it's packaged, it should also be in /usr/lib/systemd/, not /etc/systemd/, so the whole situation is no good.
Offline
Specifically, the openpyn (https://aur.archlinux.org/packages/openpyn-nordvpn/) package will install /etc/systemd/system/openpyn.service, but not as part of the normal installation process.
It does so when the end user runs openpyn --init. However, I think the package should still own the file and the package should remove the file on uninstall.
Create the file in package() and if the user needs to edit it, it should be edited as a drop-in file (e.g. systemctl edit).
Consider submitting a pull request to upstream to do this properly.
Consider also fixing stupidities like WorkingDirectory= being the directory in which the python module is installed to site-packages.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
eschwartz, have you looked at upstream's code? Perhaps they could patch it to write only to a drop-in file, but it seems that a vast majority (if not all) of that python code is just an elaborate script for generating and editing a service file.
It seems the premise is the edits the user would need to make (to a drop-in) are complex enough that this tool exists to generate the content. So user's of this tool would not be using `systemctl edit` to modify the drop-in anyways. Unless of course they did that and just copy-pastaed the content this tool generates.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Well, the nice thing about systemctl edit is it tells you how the drop-in works. The tool would be better suited to generating override.conf itself.
Based on https://github.com/jotyGill/openpyn-nor … emd.py#L35 I presume the only actually complex bit is the ExecStart... which is invoking the openpyn program itself. This could likely even be handled via an EnvironmentFile with OPTIONS=... and requiring no modification to the service file (which merely invokes `ExecStart=/usr/bin/openpyn $OPTIONS`)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Pages: 1