-
Notifications
You must be signed in to change notification settings - Fork 29
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
Yet more debloating #197
Yet more debloating #197
Conversation
I need to make sure ovshell/compan still builds and runs after this. I feel there's quite a lot of borderline changes that need actual testing on actual hardware. I'll try to do some tests on my testing rig. |
What is compan? |
I agree with @MaxKellermann |
A competition manager - the app to help with downloading tasks and competition files.
It is not a policy. What I'd like to ensure that it is still possible to write custom software and run it on OV after it is stripped down. The ovshell/compman is a kind of test rig for that. I'm ok to adapt to these changes and make more packages to be built as part of my PPA build (including the python itself), but I want to make sure it is still possible to do. IOW, I don't want to completely shut down the possibility to write and run programs for OV. |
I know at least one missing feature that a some users request - simpler way to transfer files to/from OV. So I wanted to implement that, but I have troubles dedicating enough time for this. There's also some opposition from @MaxKellermann now, because python and friends is a pretty fat dependency that will make an image significantly bigger. |
My opinion doesn't count much here, I'll never fly with an OpenVario, hell, most likely I'll never fly a glider again, so why would I care. It's your project, you can do anything you want. But I think writing the UI in Python is the worst possible choice, and I think using a text console UI toolkit is the worst possible choice. Using the text console for that ugly ovmenu shell script was a sane choice to solve the problem very very quickly with the least effort, and while switching from Shell to Python makes development somewhat better at the next stage, it solves no user-facing problem. Terminal-based UIs look horrible and their usability is horrible. This makes no sense. About Python, yes, enabling it adds roughly 50% to the OpenVario image size. That alone would be reason enough for not using it. This is not some server or desktop machine which needs Python anyway, where using Python adds nothing to the installation requirements, and you can do some quick Python hacks. Not only is Python a huge dependency, it also requires installing another UI toolkit. As I said above, you chose a text console toolkit, which "only" weighs another 1 MB; a GUI toolkit like Qt would weigh tens of megabytes. Not acceptable for me. Also, doing stuff in Python doesn't allow sharing code between XCSoar and that frontend. Look at KoboMenu: it can reuse lots of code from XCSoar, it even uses XCSoar's GUI toolkit so the user sees a consistent graphical user interface with a consistent look & feel. Now look at competition manager - why is this not a feature of XCSoar? There is nothing OpenVario-specific about compman - if you had developed this in C++ as part of XCSoar, all XCSoar users would benefit, not just OpenVario users. That would explode your audience from a few dozen (how many OpenVarios are there in the world?) to more than a hundred thousand. Think about ROI - how much usefulness you'd get in return for your noteworthy (free) time investment. Keeping it in Python would severely restrict its reusability - being part of XCSoar would be a huge gain for both projects. Same goes for ovshell - if it were developed in C++, you could reuse some KoboMenu code, and at the same time, KoboMenu would benefit from ovshell improvements. Maybe some parts could be integrated in XCSoar, so XCSoar gets a frontend for configuring Wifi, so you can manage Wifi access without having to quit XCSoar. Let the code be vibrant and float between all (frontend) components of XCSoar. With ovshell and compman, you seem ot repeat the mistakes that were made when a lot of time was wasted with developing variod, which reimplemented XCSoar's audio vario code (without knowing it existed). Getting OpenVario to a point where variod can be replaced by XCSoar requires yet more work, and a lot of care needs to be taken to avoid regressions for existing users - wasting more time unnecessarily. Of course, that's just my opinion, and you can have yours, and only you can decide how you spend your free time. You can waste time as much as you want, or you can decide that I'm completely wrong and ovshell/compman with your architecture are the right way to go, and the best choice for OpenVario. I'll disagree but ... you can just ignore that. |
Check #199 for my idea of how a main menu written in C++ looks like. Source code: https://github.com/XCSoar/XCSoar/blob/master/src/OV/OpenVarioMenu.cpp With this program, the image gets smaller because ovmenu-ng was the only package depending on bash, and so bash will be omitted - and bash is much larger than OpenVarioMenu! (even though OpenVarioMenu contains a static copy of the XCSoar GUI toolkit):
|
@kedder I suggest merging this PR, so we can go further with the repo structure change. You have to install your menu via IPK anyway, so you can also install the required dependencies, right ? |
I totally agree with Max's suggestion: I don't like the approach of having another 'smart' UI next to XCSoar, I think we're getting too bogged down here. Many of the things that Kedder covers with his Python programs would be much better off in XCSoar, and to be honest I have to admit that that's exactly why I haven't recommended the new shell to anyone in my club - beautiful as it is. In my opinion only minimal work should be necessary in a shell - and not the daily one. |
@MaxKellermann just for the sake of discussion, not trying to convince anyone. I chose python and text UI for these reasons:
In retrospect, if I would start from scratch today, I'd pick python and text-based UI again. C++ is definitely out of the question because of 1, 2 and 3. Graphical UI brings a lot of unnecessary complexity for little benefit in case of OV (i.e. in conflict with 1 and 2 again). I didn't know anything about KoboMenu, but even if I did, I would not seriously consider it. All I can find about it is a .cpp file in XCSoar repo. The idea of having to convince XCSoar devs that the code base needs a WIFI management module doesn't entertain me at all :) The last thing I care about is the some extra hundred MB that would be taken on the SDcard. There is no shortage of space on todays sd cards and sd cards are useful to hold information, not free space. |
@linuxianer99, unfortunately I can't run the current image (#204). The current |
Yes.
No. What would be the point of that? |
What really brings a lot of unnecessary complexity is Python. A GUI menu just adds "more of the same" of what's already there (i.e. XCSoar) - no additional complexity.
Already exists. https://github.com/XCSoar/XCSoar/blob/master/src/Kobo/WifiDialog.cpp |
That's what I was just about to comment. From the code it appears that there is the option to connect to Wifi already and it potentially can use XCSoars Keyboard or HighScore Style (very useful for rotary encoders) to enter passwords and such. So you could omit using a Keyboard altogether with this menu. OV specific things could still be added. Maybe it is a "flavor"-thing. I love Kedders menu implementation but having a fully integrated XCSoar-style menu would be nice as well, especially for users that have little background in OS other than just clicking buttons. |
The point is to be able to test the proposed changes. |
The way I look at things, I consider no. 4 as the most important issue - who’s going to do it? Is @kedder going to re-implement the features currently afforded by OV shell/compman in C++? I’m not sure. Is kedder going to do further development of new features (I would love an easy way to copy files from a USB stick to the XCSoar home folder) in a C++ -based solution, if he’s not familiar with the language? I’m not so sure either. |
I think @Scumi summed up my points quite well! |
Just to make it clear: python doesn't strictly have to be part of the base image to make ovshell installable. So don't need to mark anything "deprecated". What I'm worried about is reconfiguration of lots of packages to remove various features from them. That would be much more annoying to fix, if ovshell depends on these removed features in some way. |
Agree, that shouldn't happen. And if it happens, we can fix it easily. Most of this PR is about reducing the OpenVario build time, not the resulting image size. This doesn't remove Perl and Python from the image; they weren't part of the image previously. But they were built, to satisfy dependencies of packages which were not installed. Save the planet, don't waste electricity for compiling stuff you'll never use! |
Hm, I actually can't build this branch. The build fails on "configure" stage of "itstool-native" package with error boiling down to
|
Here, |
If I had to guess, I think it's |
@MaxKellermann I'm not sure I'm doing it correctly, but this is what I've got: I'm generating a dependency graph with
Then grepping for dependencies of
Not sure how I disabled my ppa layer for this build, here are my
|
It does not - this is a quirk of BitBake's dependency graph feature which makes it is very cumbersome to use. Your output shows that it's indeed |
Dependencies go back to
I think this makes sense, because I see psplash on boot, so it must be legitimately used in the image |
D'oh! Of course! That's my mistake, sorry. You were using this PR branch, but after my last push, I added another commit to fix exactly that problem, but did not push it. Will do right away. |
Omits the useless sysvinit scripts from the image. We have systemd.
Useless, there's no real APM support on those machines.
This eliminates GnuTLS completely.
I just tested openvario-7-PQ070 on my OpenVario, and it appears to work. |
Ok, I've finally got the image built. One regression that I noticed (not sure if this is result of this MR or previous ones), but
Even though this url returns 404 right now, wget can't read other https urls from ftp.openvario.org:
|
That's caused by ac2058d - I'll try building busybox with OpenSSL. |
Unfortunataly up to now |
This fixes handshake and validation problems.
The recipe includes MACHINE_ARCH-specific files (the "machine.conf"), and therefore a separate variant must exist for every machine. This undoes part of fbaf35c which was not wrong; it was only just as wrong as what was there before.
With
|
FTP update directory feed-hardknott: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, rebuilt the image and tried again - everything seems to work! Python packages were built as part of my PPA build, no problems with that. Didn't notice any further regressions, I'll just need to make ovshell to be a systemd service now.
@August2111 I believe the ftp archive was last published on the last official image we released. AFAIK ftp.openvario.org is not updated between image releases, but people who used openvario-shell are subscribed to my PPA feed, that gets updates regularly, so they received new releases of xcsoar and ovshell/compan through it. |
@kedder The last 'official' release was the 21118 in May 2021 (see https://github.com/Openvario/meta-openvario/releases/tag/21118) but the newest update at ftp.openvario.org was at 2020-04-18! |
Hopefully all this stuff is working at the end of this story - and for that #197 was an additional big step, I think! |
@linuxianer99 and probably myself have write access to ftp.openvario.org |
Please keep in mind, that we do this all in out spare time !!!!!!!!!!!!! |
With a few tricks, this eliminates the target build of Perl and Python completely. They were built, but not actually installed, because unused secondary packages of some recipes used them. This saves a lot of build time.
Lots of libraries are also omitted from the image, shrinking it again by a few megabytes: GnuTLS (everything's OpenSSL now), libxml2, libbz2, liblzo