Red Hat Bugzilla – Bug 1480425
support metainfo.xml files centrally in macros.octave
Last modified: 2017-08-14 21:43:25 EDT
Created attachment 1311953 [details]
Orion et al,
Here's my attempt at modifying "macros.octave" to support "octave-pkgname.metainfo.xml" files.
1. Currently I have to do something like "%define octpkg_has_metainfo_xml yes" at the top of *each* octave-pkg.spec file.
2. I thought it would be better to detect the octave-pkg.metainfo.xml and then define the %octpkg_has_metainfo_xml macro. I don't see how to do that.
3. I added an %octave_pkg_files macro to deal with common files like metainfo.xml, DESCRIPTION, doc-cache, COPYING, etc. Is this a good idea?
Created attachment 1311955 [details]
Here's an example of the sort of changes this makes to a package that already deals with its metainfo.xml file.
Created attachment 1311957 [details]
Another example: octave-struct which has a metainfo.xml file but it is currently not installed.
Created attachment 1311958 [details]
Having slept on it, I'll suggest a smaller simpler change. Ignore the above. Instead:
1. macros-octave will look for a metainfo.xml file and validate it and install it if found.
2. The .spec file will need to list the metainfo.xml file in %files.
I'll attach a patch for this.
Created attachment 1312354 [details]
Created attachment 1312355 [details]
Thanks! Looks good. I've tweaked it a little to run validate in %install. Building now.
Looks like we're now hitting bugs in the latest rpm. I've posted to devel about it.
1. Maybe we should make the octave-devel package "Require" libappstream-glib.
Then (I think) each octave-pkg would not need to specify it as a "BuildRequire"?
2. I'm happy to help with changes to any octave-packages if you'd like.
(In reply to Colin Macdonald from comment #9)
> 1. Maybe we should make the octave-devel package "Require"
> Then (I think) each octave-pkg would not need to specify it as a
Sounds good. Done.
> 2. I'm happy to help with changes to any octave-packages if you'd like.
Have at it, I think we're finally ready (I got octave-statistics to build). If we like this we can back-port to earlier releases. Thanks.
>> 2. I'm happy to help with changes to any octave-packages if you'd like.
> Have at it
I've done my octave-doctest and octave-symbolic but I don't have access to the others.