#395 Mono guidelines include hard-coded library paths
Closed: Fixed None Opened 10 years ago by willb.

The current [https://fedoraproject.org/wiki/Packaging:Mono Mono packaging guidelines] recommend using a hard-coded "/usr/lib" in %files. Extant Mono packages seem to [https://fedoraproject.org/wiki/Packaging_talk:Mono have a variety of solutions to macroize Mono packages]; could we standardize on one to recommend in the guidelines?


I think the most sensible thing to do is to change the guidelines to suggest using %{monodir}, defined as /usr/lib/mono (and possibly also %{monogacdir} for /usr/lib/mono/gac). Existing packages can define it conditionally, and I can file a BZ against redhat-rpm-config (which includes the existing Mono macro) so that it will include a definition in the future.

Here is the BZ for Rawhide (I also created clones against f19 and f20): https://bugzilla.redhat.com/show_bug.cgi?id=1070936

info Mono path macros approved with the following changes: prepend with an underscore and use %{_prefix} (+1:5, 0:0, -1:0)

I'll wait on the macros entering redhat-rpm-config to write this up (as it may not make it into all versions of Fedora).

I assume this has happened now, moving the status so as not to be confusing.

Actually, it only happened on rawhide, which became F21. The F19 bug was closed by the EOL bot and the F20 bug is still open. Tempted to just add this myself.

I honestly don't recall why the underscore was added but man do I dislike those underscores. Oh, well. I think I will stall for a bit longer before writing this up to see if anyone would yell at me for dealing with https://bugzilla.redhat.com/show_bug.cgi?id=1070937 Two lines in one tiny file that don't bother anything else? I'm sure that's grounds for execution.

I went ahead and submitted https://admin.fedoraproject.org/updates/redhat-rpm-config-9.1.0-55.fc20 to add those two macros to F20. Hopefully this won't cause any trouble. If nobody yells in a few days, I'll go ahead and push out this guideline change.

Karma on that update might be nice, I guess. It's pretty tough to screw up adding two lines to one file but you might at least want to check.

This is still sitting in testing; critpath updates require two weeks unless karma is given. I went ahead and wrote this up as best I could. I realized that I really don't understand mono very wel and wasn't entirely sure about all of the details, but there was no actual draft I could apply so I did what made sense. Please read over it and make sure I didn't screw up too badly. If I did, let me know and I'll fix things up.

Announcement text:

The mono guidelines were modified to mention the %{_monodir} and %{_monogacdir} macros: https://fedoraproject.org/wiki/Packaging:Mono

Metadata Update from @tibbs:
- Issue assigned to tibbs

7 years ago

Login to comment on this ticket.

Metadata