Replies: 11 comments
-
-- edit -- Clarification: The tufup repository tools (server side) fully support Linux, out-of-the-box. The client side does not, but can be customized to do so, as explained below. -- original -- @kubapilch A Linux install script is not supplied out-of-the-box, because, personally, I believe native packaging solutions are more appropriate on Linux. Think of e.g. apt (deb), flatpak, or snapcraft. A very interesting overview of options can be found in python packaging docs, here. Nevertheless, it should be relatively easy to write your own You can then pass this custom function into def install_update_linux(src_dir, dst_dir, purge_dst_dir=False, exclude_from_purge=None, **kwargs):
# Linux-specific installation steps
...
...
client.download_and_apply_update(install=install_update_linux)
... |
Beta Was this translation helpful? Give feedback.
-
@dennisvang That is exactly what I am doing right now. Should I create a pull request containing the code after I make sure it works as intended, or you do not want to include Linux installation? |
Beta Was this translation helpful? Give feedback.
-
@kubapilch I'm certainly interested in seeing your solution, so if you could post a snippet here, that would be great. A pull request is also possible, but that would mean a bit more work for you, and I cannot guarantee a PR would be merged, because I'm still a bit hesitant in adding client-side support for linux, for the reasons mentioned above. In any case, your code would serve as a useful example for others. Just out of curiosity: Is there a specific reason you're choosing the |
Beta Was this translation helpful? Give feedback.
-
@dennisvang I will create a pull request after I fully integrate it into my production workflow and have more spare time. We decided to go with I have one question that I do not want to start a new issue for, I cannot find any information on it online. Let's say that we keep the same expiration dates as the example |
Beta Was this translation helpful? Give feedback.
-
Thanks @kubapilch.
As long as you serve all the intermediate root metadata files, it should still be possible for the client to update properly. Here are some relevant parts of the client workflow, from the TUF specification (section 5.2):
and from section 5.3:
So, every time you update the root metadata, make sure you also keep the old version of that file as well, and serve all versions of the root metadata. For example, |
Beta Was this translation helpful? Give feedback.
-
Can you share your code for installing on linux? |
Beta Was this translation helpful? Give feedback.
-
@OverDriveGain Unfortunately I do not have any tested code available for installing on Linux. However, I suspect the You can then use your custom install function as explained above. Perhaps @kubapilch would still be willing to share their solution? |
Beta Was this translation helpful? Give feedback.
-
We are using a slightly modified version of def _install_update_mac(). In our case it is not meant to be used by a general user but our own machines so sharing our implementation will not be that helpful. @dennisvang I do not know if you want to keep this issue open or not but as far as I am concerned it can be closed, we resolved all the issues. |
Beta Was this translation helpful? Give feedback.
-
Thanks for all your responses. I will try then to modify the function _install_update_mac and use it for my usecase. If it was a generic implementation I can try to share the code somewhere in a fork, or here if you guys are interested |
Beta Was this translation helpful? Give feedback.
-
I'm deploying an app for multiple platforms (Windows and Linux). I'm currently evaluating update methods and for consistency I would like to use the same method for both platforms. Hence, Linux support for the client would be great. |
Beta Was this translation helpful? Give feedback.
-
@Slarag Thanks for taking an interest in tufup. :-) As noted above, you can create a copy of Then you can pass the customized function into The tufup The settings for the tufup-example app show one possible way to set up these paths for Windows and macOS. For guidance on Linux, you could have a look at the FHS (Filesystem Hierarchy Standard). Related: dennisvang/tufup-example#6 (comment) |
Beta Was this translation helpful? Give feedback.
-
When using tufup on Linux, everything works until the installation step of a patch. Is there any reason why it has not been implemented? If there are no limitations, I would try to implement it myself
Beta Was this translation helpful? Give feedback.
All reactions