#752 metainfodir change in F28 and breaks builds with appdata directories on F27 or lower
Closed: accepted 7 years ago Opened 7 years ago by sergiomb.

the context [1]
[1]
https://pagure.io/packaging-committee/issue/704#comment-465315

rpm.macros IMHO should have %metainfodir for use in scriplets of rpm spec

instead in https://fedoraproject.org/wiki/Packaging:AppData have :

 appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata.xml

we should have

appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml

Like we already have for qt5:

in f27 %_kf5_metainfodir is %_kf5_datadir/appdata (/usr/share/appdata)
in f28 %_kf5_metainfodir is %_kf5_datadir/metainfo (/usr/share/metainfo)


If you're asking for that macro to be added, this isn't really the right place.

If you're asking for the guidelines to be changed to mention use of an existing macro, then... where is this macro defined? Because I don't see it on F27 or rawhide.

Metadata Update from @tibbs:
- Issue tagged with: meeting

7 years ago

We discussed this at this weeks meeting (https://meetbot-raw.fedoraproject.org/fedora-meeting-1/2018-03-01/fpc.2018-03-01-17.00.txt):

  • x752 metainfodir change breaks builds with appdata on F27 (geppetto,
    17:11:46)
  • ACTION: Add metainfodir macro and change guidelines (+1:5, 0:0,
    -1:0) (geppetto, 17:26:33)

Metadata Update from @james:
- Issue untagged with: meeting
- Issue tagged with: writeup

7 years ago

So what we'll do is add %_metainfodir to redhat-rpm-config and technically we can add it to epel-rpm-macros as well, assuming I know what the proper locations for EPEL would be.

Once the updated redhat-rpm-config is generally available in Fedora, then I'll change the guidelines to reference the new macros and announce the change. But that's going to take at least a week unless the updates get karma.

As an aside, in EL7, loads of packages put things into /usr/share/appdata, but nothing actually owns the directory except for:

  • hamster-time-tracker
  • simple-scan
  • bluefish-shared-data

In Fedora, the filesystem package provides that directory (as well as the metainfo directory). But we can't do much about that in EPEL.

Anyway epel 7 should have %_metainfodir as /usr/share/appdata like F <= 27 , else we will have to do scriptlets for package also in epel 7 with appdata .

in epel 6 we don't have appdat at all , so no need of %_metainfodir

Best regards,

This got stalled out because I had to wait for a different set of macro updates to go through and then I just didn't get back to it until now.

Currently the %_metainfodir macro has been implemented in all Fedora branches of redhat-rpm-config and in epel-rpm-macros for EPEL7. Updates have been created and buildroot overrides are active, so you can use that macro now for koji builds, local mock builds if you enable the "local" repositories, or local builds if you grab the proper packages from koji (or updates-testing after the next push) and install them.

It's a bit early in the update process for this to be written into the guidelines, so I'll wait a bit. It will probably take 16 days or so for the updates to be pushed to stable.

Announcement text:

The AppData guidelines were updated to mention the %_metainfodir macro, which was added to cut down on the need for %if blocks in cross-distro specfiles.

Note that redhat-rpm-config/epel-rpm-macros packages supporting this are in updates-testing, but buildroot overrides are active so you can use the macro in Koji builds now.

Metadata Update from @tibbs:
- Issue untagged with: writeup
- Issue tagged with: announce

7 years ago

Metadata Update from @tibbs:
- Issue untagged with: announce
- Issue assigned to tibbs
- Issue close_status updated to: accepted
- Issue status updated to: Closed (was: Open)

7 years ago

Log in to comment on this ticket.

Metadata