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
[Suggestion] adding shell scripting capabilities will bring PM2 to the next level #441
Comments
|
This is already present functionality. As this section of Patchmanager's README denotes:
Please carry on reading there by yourself. TL;DR: RPM scriptlets provide all you are asking for and more. |
|
There is an intermediate layer of complexity between a |
|
There will be no feature allowing to run random shell scripts as root in Patchmanager. That would be wrong on so many counts it's not even funny. |
|
Strange to ear because patch executes with root privilegs in order to apply .patch to system files. Anyway take a look here to just to have a glimpse how tar (new enought version) and gz can do: About reconfiguring SailFish OS at system level. |
|
Patchmananger's principal purpose has been, is and will stay to alter proprietary text files, specifically the QML files which Lipstick, Silica and some SailfishOS applications (e.g., the settings app) are comprised of, because no elements from these SailfishOS components can be forked and redeployed. Patchmanager may be used to alter any text file, but will not employ any specific provisions for other special text files (e.g., systemd units) than proprietary ones, because any software under a FLOSS license can be forked and redeployed as an RPM package. |
DESCRIPTION
Reading the description of this patch, we clearly realise that adding shell script capabilies will bring PM2 to the next level. In order to achieve this there are some type of specific scripts to keep in consideration:
pre-install.shpost-install.shpre-remove.shpost-remove.shWhich are the same types that are allowed into any kind of package (rpm, deb, etc.). Obviously, these scripts should be executed with
rootprivileges and possibly in a decently set enviroment. Possibly a $PATCH_PATH or $PATCH_DIR (with or without the underscore) could be set in order to refer to folder in which the patch archive is extracted. In this way, more files can be added to be parsed by the scripts or copied into the system.ADDITIONAL INFORMATION
This feature can be implemented in two different ways:
In the last case, something like that:
One or another way is indifferent and It is a matter of taste. In .sh case the files do not need to be executable to run but just being interpretable. However, the .sh approach avoid to have a parser to split the .shell single file and moreover, it clears the possible misunderstanding about the chance that every single line will be executed by a different shell instance:
instead of
It is suggested to use /bin/ash as default interpreter which is enough powerful in terms of scripting even if does not implement the full set of bashism. This because the scripts relying on /bin/ash can run on /bin/bash as well but in some system /bin/bash could be optional.
The text was updated successfully, but these errors were encountered: