-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add packaging support for FlatPack #23
Comments
hey @fruffy @jafingerhut can you describe more about this feature |
I believe it is referring to FlatPak, described more here: https://flatpak.org |
@jafingerhut I think it can be done. It required installing the flatpack and writing some code using github actions. Do you want me to proceed with it |
It sounds interesting to me. Note that the best way I'd have of reiewing the changes (not having used FlatPak before myself) would be testing out the resulting files, installing them, and running some sample p4c commands after installing them. So instructions for using the resulting FlatPak installation files would be needed, too. |
To explain a litte: A big problem we have with our infrastructure nowadays is that it is not very unified and it is complicated to set up the open-source software. @jafingerhut maintains complicated VM scripts which are useful for a developer, but overwhelming for a beginner. Ideally, we should be able to provide a simple P4 environment using existing package managers. The concrete goal here is that we are able to run the code in https://github.com/p4lang/tutorials with a simple flatpack installation. We should be able to provide all the necessary Python packages, the compiler, and dependencies in an independent environment. This project is also helpful to understand what deficiencies our current setup might have and what we need to fix to make it more user-friendly. |
hey @jafingerhut I am working on this feature.
|
So I am not very knowledgeable of FlatPak's typical use here. @fruffy Is your thinking that the rough "flow" here is one of the following, and if so, which one? (a) First build one or more of the open source P4 development tools, e.g. p4c, behavioral-model, supporting Python packages, etc. When that is complete, create a FlatPak "thing" that contains some binary executables and other files required to run them, e.g. installed Python packages and perhaps some shared library (b) The FlatPak "thing", when you donwload and install it, will contain scripts/programs that download and install the source code of p4c, behavioral-model, etc., and build them on the user's system. In other words, this is like downloading an install script, and it could take a lot of additional downloading and computation work on the user's system before they have a working P4 development system. I was guessing that a FlatPak "thing" is more like (a) than (b). Maybe there are other points on the spectrum that I'm not describing. |
The use is more on the (A) side. What throws a wrench into this is Python and the chaotic environment it has. FlatPack does seem to have support for Python environments but I have not checked deeply how it could work with the tutorials. This is also why this task is labelled "medium", because it does require a bit of work. |
It could also be good enough to just get the C++ binaries working and manage our Python dependencies separately. That would be two steps but also much easier than before. |
Similar to NixOS FlatPack is a convenient method to install debian packages.
There are actions available to automate this process. We should add flatpack support for the compiler and P4C:
https://github.com/flatpak/flatpak-github-actions
The text was updated successfully, but these errors were encountered: