Bug 1480425 - support metainfo.xml files centrally in macros.octave
support metainfo.xml files centrally in macros.octave
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: octave (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Orion Poplawski
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-11 01:06 EDT by Colin Macdonald
Modified: 2017-08-14 21:43 EDT (History)
7 users (show)

See Also:
Fixed In Version: octave-4.2.1-4.fc27.1
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-12 11:15:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
macros-octave-process-metainfo-and-add-files.patch (3.51 KB, application/mbox)
2017-08-11 01:06 EDT, Colin Macdonald
no flags Details
example-octave-doctest-new-macros.patch (1.74 KB, patch)
2017-08-11 01:08 EDT, Colin Macdonald
no flags Details | Diff
example-octave-struct-new-macros.patch (1.12 KB, patch)
2017-08-11 01:12 EDT, Colin Macdonald
no flags Details | Diff
example-octave-struct-new-macros.patch (1.43 KB, patch)
2017-08-11 01:13 EDT, Colin Macdonald
no flags Details | Diff
macros-octave-process-metainfo-xml.patch (2.87 KB, patch)
2017-08-12 01:13 EDT, Colin Macdonald
no flags Details | Diff
example2-octave-struct-new-macros.patch (1.27 KB, patch)
2017-08-12 01:14 EDT, Colin Macdonald
no flags Details | Diff

  None (edit)
Description Colin Macdonald 2017-08-11 01:06:13 EDT
Created attachment 1311953 [details]
macros-octave-process-metainfo-and-add-files.patch

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?

Thoughts?
Comment 1 Colin Macdonald 2017-08-11 01:08 EDT
Created attachment 1311955 [details]
example-octave-doctest-new-macros.patch

Here's an example of the sort of changes this makes to a package that already deals with its metainfo.xml file.
Comment 2 Colin Macdonald 2017-08-11 01:12 EDT
Created attachment 1311957 [details]
example-octave-struct-new-macros.patch

Another example: octave-struct which has a metainfo.xml file but it is currently not installed.
Comment 3 Colin Macdonald 2017-08-11 01:13 EDT
Created attachment 1311958 [details]
example-octave-struct-new-macros.patch
Comment 4 Colin Macdonald 2017-08-12 01:12:33 EDT
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.
Comment 5 Colin Macdonald 2017-08-12 01:13 EDT
Created attachment 1312354 [details]
macros-octave-process-metainfo-xml.patch
Comment 6 Colin Macdonald 2017-08-12 01:14 EDT
Created attachment 1312355 [details]
example2-octave-struct-new-macros.patch
Comment 7 Orion Poplawski 2017-08-12 11:15:49 EDT
Thanks!  Looks good.  I've tweaked it a little to run validate in %install.  Building now.
Comment 8 Orion Poplawski 2017-08-12 11:30:04 EDT
Looks like we're now hitting bugs in the latest rpm.  I've posted to devel about it.
Comment 9 Colin Macdonald 2017-08-13 01:06:56 EDT
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.
Comment 10 Orion Poplawski 2017-08-14 18:55:30 EDT
(In reply to Colin Macdonald from comment #9)
> 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"?

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.
Comment 11 Colin Macdonald 2017-08-14 21:43:25 EDT
>> 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.

Note You need to log in before you can comment on or make changes to this bug.