-
-
Notifications
You must be signed in to change notification settings - Fork 572
Consider to bundle appstreamcli in the appimagetool AppImage #1011
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
Comments
As the message says,
|
It is not so simple:) what about to bundle working appstreamcli within your tool? |
Isn’t all AppImage idea about providing working bundle? Not just telling me that your version of OS cli whatever tool is not what we like. Tough. |
Well, then you have a really old version, and even if your file is valid with the bundled appstream-cli version, it might break on newer systems. AppStream is broken by design... |
Yes it is old because I try to follow AppImage guidance and build my app on the oldest still supported distro. And I prefer this way. I want to make my AppIamge app working on as many Linux versions as possible.
I am not criticising here. Just looking for solution.
… On 25 Nov 2019, at 21:41, TheAssassin ***@***.***> wrote:
Not just telling me that your version of OS cli whatever tool is not what we like. Tough.
Well, then you have a really old version, and even if your file is valid with the bundled appstream-cli version, it might break on newer systems.
AppStream is broken by design...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Well, you're not the only one to have problems with this stuff... xournalpp/xournalpp#1618 |
Agree with @kapitainsky - the tools to validate AppStream are not easy to use because a) there are two different tools which don't always agree, and b) it's hard to get a version that validates AppStream against a recent spec to run on systems that are less than recent. Something needs to happen indeed. I am considering to build In the meantime, here is a build that should be able to do the trick: |
Ta.
Obviously it is something you should find the way forward. What’s the point of having something which sounds like is not going to work.
In my small case not so important. I just drop all these meta info and will carry on:)
… On 25 Nov 2019, at 21:49, TheAssassin ***@***.***> wrote:
Well, you're not the only one to have problems with this stuff... xournalpp/xournalpp#1618
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Please check out the |
Thank you for trying but on CentOS it does not work:
|
Using the latest version of this tool doesn't make any sense. Neither does bundling. It seems it's possible to bundle an extremely old version, files it validates might be used with newer AppStream tools as well. The other way round is apparently broken. See the Xournal++ issue I linked. That file validates just fine with the latest available version, but broke on the not so old Ubuntu bionic. Edit: this is just an observation I made recently for some very specific projects. It doesn't mean that it applies globally. But, thinking about it, it makes some sense, right? One should assume that newer versions of the tool remain backwards compatible, i.e., once a file can be validated with a specific version, it'll be able to validate it with any newer version. |
AppImage tools should have 'reference' platform they are build to work on. Oldest supported LTS. Now it is either CentOS 7 or Ubuntu 16. I prefer former as appimage generated on CentOS work on Ubuntu not vice versa + CentOS still have many years of support left (till 2024). Now if developers use this platform to compile and package their apps they would expect that it works there. I am not computer expert and frankly even not entirely sure what these metadata is used for but building my first AppImage I wanted to utilize all available functionality (metadata, signing etc.) so step by step trying to follow online AppImage documentation. |
Actually, CentOS 6 will continue to receive "maintenance updates" until Nov 2020 (however, we don#t know how well they track security issues and fix them...). As said, we've had cases when AppStream data which worked on CentOS 6 broke in higher releases, and vice versa. That's the big problem. Sometimes it seems the AppStream people retrospectively fixed bugs in their format, which caused their validator to fail. That means we cannot just say "whatever works on CentOS 6 will work everywhere", that's why everyone has issues with this AppStream stuff. It is always bad if a format changes retrospectively, but isn't properly versioned, so that newer validators just reject a format that worked in the good old days. Warnings would be okay, but the AppStream validators don't have an option "ignore warnings" or anything. Check out #603 for more information. Edit: I haven't checked in a while, the information in this post might be a little outdated. Please correct me if I'm wrong! |
from practical perspective reading #603 it looks for me that it is hopeless atm. Chances that Linux world agrees on some standard are close to zero. Simply I package my apps without metadata. |
Practically speaking this seems like the best idea, yeah. It's not really about agreeing on one standard. They have! But the standard doesn't seem to be maintained properly, or the tools aren't properly implemented. I don't know for sure... |
@TheAssassin I don't understand why you say "Using the latest version of this tool doesn't make any sense. Neither does bundling". Let's assume we can find a good way to bundle their latest version. Why would that not be sufficient? Maybe older base systems can't use the latest AppStream format, but so what - we are not handing AppStream metainfo to the base system, we are just using it internally in AppImage tools. If I am not mistaken, bundling the most recent appstreamcli would allow the Xournal++ AppStream metainfo file to pass verification.
Ah right, I forgot to explain how to use it:
If we decide to bundle it inside the AppImage, of course this would all happen automatically. |
on CentOS 7
but when I run only |
Argh. Can you experiment a bit with the options of this tool and see which ones crash and which don't? I don't know what causes this bug... |
sort of all works... but
so looks like when parsing XML it crashes |
Are you 100% sure your XML validates correctly, e.g., in https://jsonformatter.org/xml-formatter? |
I pretty much used Subsurface appdata.xml as my template |
on Ubuntu 16.04 built in appstreamcli does not like my id tag (i don't worry about it now)
but when I remove id it passes:
|
Indeed I can reproduce the segfaults. Maybe it doesn't like to be compiled with musl. We should ask @ximion what to do. |
Odd. Is there any way to build AppStream with glibc? It isn't really tested with musl, but I also don't see a reason why it wouldn't work - as long as glib can build with musl, at least.
Maybe update AppStream first, just in case there's an old bug in whatever version you are using? |
Yes, and the integration tools can use the latest and greatest to parse AppStream. Not the outdated stuff that comes with distributions.
Me too, but if I remember correctly then Which is why the AppImage I made is an AppImage that bundles everything (down to, and including, ld-linux). |
Integration tools might come with your distribution and these likely don't support the ever latest AppStream, so your comment doesn't make any sense. Please go for the least common denominator and don't ignore the rest of the world just because you personally don't experience that issue.
Please make sure your AppImage runs on CentOS 6. Then the app can be included in appimagetool. |
It is an ongoing issue that AppStream (the spec) seems to be a moving target, so what distributions ship never can handle the latest AppStream. My learning: Never let anything that came with the distribution handle AppStream. |
what about other platforms? arm? is it something you guys care about? |
That is not the point, and you probably know that... Show me one example of a feature added in AppStream that is really essential and must be supported. |
That'd be @ximion to answer ;-) |
Absolutely. But since |
What? Being written in plain C actually makes it easy to support pretty much all architectures, as a C compiler is always present. The AppStream specification is 100% backwards compatible, but of course if you use newer features than the version your software center supports, you won't see them. There is one exception to the compatibility rule: Formatting in description paragraphs ( As for what new features you may want, besides the formatting options for paragraphs mentioned above, newer versions also support videos as screenshots, release artifacts (to point to the source code of a release, for example, or link an AppImage file), newer content_rating tags, etc. If you're aware of any issue that distro tools have with metainfo files that pass validation, let me know (unless it involves |
Thanks @ximion for the explanation. So I think that using an AppImage of the latest and greatest
Yes, but if we want Intel and ARM, 32-bit and 64-bit, then the setup in Travis CI becomes a bit more cumbersome, doesn't it? |
Yeah, but it would be the same with Go. In theory, meson should be able to reliably crossbuild things, but I actually never tested that. Best would be a proper builder network with dedicated arm64/amd64 machines.
I have no idea about the AppImage creation process, but that feels like the sensible thing to do and the easiest way to go - afterall, isn't the point of AppImage to create portable executables? ;-) |
@ximion your overall point is, if I understand it correctly: we should build and ship the latest available appstreamcli for validation. Older implementations of libappstream should ignore newer features. The point of validation is to make sure nothing completely weird is happening (missing XML tags, broken XML, etc.), and that every feature used is valid. If newer features are used, they should be accepted, not rejected, and it's not an issue for older implementations. Is that correct so far? If yes, I'd probably just go integrate appstreamcli into our building process (i.e., figure out how to build it on CentOS 6) and include it in appimagetool. That'll make a lot of things easier. |
That would be ideal, as it means your upstream projects can use whatever AppStream feature they like and you don't limit them to a particular version of the spec.
Yes
Yes. Of course, older validators don't know about the new features yet, so they fail validation in case they encounter one. If you're not validating though, those things simply get ignored.
Yes.
Yes, your description is correct. CentOS 6 probably has a really old GLib, that will give you problems unless you build it as part of building AppStream and then bundle it with the appstreamcli tool. |
We already build a newer GLib version, 2.44. Do you know if that's recent enough? Does your meson build system contain a check we could lookup to see if we have to upgrade? Edit: found it, https://github.com/ximion/appstream/blob/master/meson.build#L63. As long as 2.56 builds on CentOS 6, we should be able to upgrade in our containers. Then we can build and ship appstreamcli easily. |
Git master currently requires 2.62 even. I am thinking about how to lower that requirement, but if it's too much work, 2.62 would be the new baseline for a while. |
2.62 is from 2019. How on earth are still-supported distribution like CentOS 6 or Ubuntu Xenial supposed to use the latest |
Absolute nonsense. GLib has always been bundled. And we have needed a newer version than whatever CentOS 6 implements due to a bug fix or something ever since I introduced AppImageBuild years ago. It doesn't really matter which version we use/bundle. The point is, I need to be able to build it in CentOS 6. That's what matters. I don't care at all what version we ship exactly. I hope @ximion can keep using whatever version is in use now for a while at least. I can't imagine that there's so many GLib innovations you'd have to upgrade every couple of weeks. |
You are right @TheAssassin |
It's unlikely to get bumped higher than 2.62, in fact, it is quite likely that I reduce the dependency down to 2.56 before releasing the current version (all releases only need 2.56 so far). |
This downgrade would be highly appreciated. The only thing I struggle with on CentOS 6 right now is that it can't find libmount, and I highly doubt either appstream or we need that, so once this autotools stuff finally accepts |
Seems the kernel in CentOS 6 is too old, doubt we can get GLib 2.56 to build there. Unless we identify the section that requires that flag. |
It does:
Well, it's a bit large for that... 23 MB. |
You know, building your own stuff on an older distro isn't that hard. I've managed to hack around the issue mentioned above by adding |
@TheAssassin The absolute minimum version of GLib to build AppStream is now 2.58, and highly likely will remain at that level for quite a while. This is the version that current Debian stable (buster) satisfies, which is a reasonable requirement (and also happens to be a target that I have to support anyway). |
Unsure if I should open a new issue or not, but
|
|
@ximion do you know a way to link GLib (or better: everything) statically? |
Besides #1011 (comment) no. I see no reason why this wouldn't link GLib statically though, provided static libs are available at build time. |
Thanks to the help of @Tachi107 we can now build a static version of appstreamcli, which means that we can use a new appstreamcli version and it will still run on older systems. This makes bundling Here you see the static Linux binary running happily on FreeBSD thanks to the Linuxulator:
Man do I love static linking. Well worth the 4,2 MB of disk space (uncompressed). |
Neat! :-) But you will not need to build lmdb, AppStream hasn't needed that for a while ;-) |
It works but only when I remove metadata xml file. Otherwise it fails as below:
Found appimagetool: /tmp/.mount_linuxdCqqmwp/usr/bin/appimagetool
Running command: /tmp/.mount_linuxdCqqmwp/usr/bin/appimagetool "AppDir" "-g"
the same metadata xml file works perfectly on Ubuntu 16.04.
Both urls it complains about are valid.
The issue is in reference to linuxdeploy/linuxdeploy-plugin-appimage#8
The text was updated successfully, but these errors were encountered: