#801 guidelines: discourage using globs for shared libraries
Closed 6 months ago by ignatenkobrain. Opened 7 months ago by decathorpe.

@@ -1,6 +1,7 @@

  :abi-comparison-tool: https://fedoraproject.org/wiki/How_to_check_for_ABI_changes_in_a_package[ABI comparison tool]

  :packaging-committee: https://pagure.io/packaging-committee[Fedora Packaging Committee]

  :scl-guidelines: https://fedoraproject.org/wiki/User:Toshio/SCL_Guidelines_(draft)[Software Collections]

+ :updates-policy: https://fedoraproject.org/wiki/Updates_Policy[Updates Policy]

  

  = Fedora Packaging Guidelines

  

@@ -598,6 +599,22 @@

  

  Whenever possible (and feasible), Fedora packages containing libraries SHOULD build them as shared libraries. See xref:Scriptlets.adoc#shared-libraries[Scriptlets#Shared Libraries] for information about whether scriptlets are required.

  

+ === Listing shared library files

+ 

+ Shared libraries installed directly into `+%{_libdir}+` *SHOULD NOT* be listed

+ in the `%files` section of the spec by using a glob in a way

+ that conceals important parts of the file name (e.g. `libfoo.so*`),

+ since changes to the `SONAME` also result in a changed file name in most cases.

+ 

+ Otherwise, when the library bumps its `SONAME` as part of an update,

+ this change might remain unnoticed and cause problems like broken dependencies

+ (see the relevant {updates-policy} section for further information).

+ 

+ However, if the use of globs is deemed useful by the packager - for example,

+ if the `Y` and `Z` parts of a library named `libfoo.so.X.Y.Z` change frequently,

+ using something like `libfoo.so.X*` is recommended instead,

+ since dependent packages usually don't have to be rebuilt for changes of this kind.

+ 

  === Downstream .so name versioning

  

  In cases where upstream ships unversioned .so *library* (so this is not needed for plugins, drivers, etc.), the packager *MUST* try to convince upstream to start versioning it.

Add a small paragraph to the Shared Libraries section, discouraging the usage of globs where they might cause unintended problems.

This is the first time I've used asciidoc, so feel free to fix any markup issues. Rendered locally it looked fine, though.

I would probably use SONAME (in upper case)

also unless people do weird things, it will be reflected in file name (because we run brp-ldconfig which ensures that the files which match soname are created).

Apart from few comments inline, lgtm ;)

@jwakely r?

1 new commit added

  • guidelines: incorporate comments on PR#801
7 months ago

+1 from me, with that one grammar correction.

1 new commit added

  • guidelines: fix a typo
6 months ago

1 new commit added

  • Makefile: revert accidentally committed local change
6 months ago

Thanks for looking at it, I fixed the typo.

I've squashed commits and pushed as 2051d0c.

Thanks a lot!

Pull-Request has been closed by ignatenkobrain

6 months ago
Metadata