Bug 1480425 - support metainfo.xml files centrally in macros.octave
Summary: support metainfo.xml files centrally in macros.octave
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: octave
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-11 05:06 UTC by Colin Macdonald
Modified: 2017-08-15 01:43 UTC (History)
7 users (show)

Fixed In Version: octave-4.2.1-4.fc27.1
Clone Of:
Environment:
Last Closed: 2017-08-12 15:15:49 UTC
Type: Bug
Embargoed:


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

Description Colin Macdonald 2017-08-11 05:06:13 UTC
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 05:08:58 UTC
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 05:12:08 UTC
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 05:13:48 UTC
Created attachment 1311958 [details]
example-octave-struct-new-macros.patch

Comment 4 Colin Macdonald 2017-08-12 05:12:33 UTC
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 05:13:22 UTC
Created attachment 1312354 [details]
macros-octave-process-metainfo-xml.patch

Comment 6 Colin Macdonald 2017-08-12 05:14:43 UTC
Created attachment 1312355 [details]
example2-octave-struct-new-macros.patch

Comment 7 Orion Poplawski 2017-08-12 15:15:49 UTC
Thanks!  Looks good.  I've tweaked it a little to run validate in %install.  Building now.

Comment 8 Orion Poplawski 2017-08-12 15:30:04 UTC
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 05:06:56 UTC
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 22:55:30 UTC
(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-15 01:43:25 UTC
>> 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.