From 3eec5686b44a16724b152520a0ee9aeaece9a486 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sep 28 2018 18:16:10 +0000 Subject: [PATCH 1/4] guidelines: discourage using globs for shared libraries --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index 134bd3f..0be96ca 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -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 @@ Requires: %{name}%{?_isa} = %{version}-%{release} 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 are usually reflected in the file name. + +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. From fab16d3ce803579c5a2f0fc15b6e410ccf59855b Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sep 29 2018 10:02:11 +0000 Subject: [PATCH 2/4] guidelines: incorporate comments on PR#801 --- diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index 0be96ca..f56577b 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -604,9 +604,9 @@ Whenever possible (and feasible), Fedora packages containing libraries SHOULD bu 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 are usually reflected in the file name. +since changes to the `SONAME` also results in a changed file name in most cases. -Otherwise, when the library bumps its soname as part of an update, +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). From fffc564e872006885daec68b7fa2870b20bafa41 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Oct 02 2018 14:26:01 +0000 Subject: [PATCH 3/4] guidelines: fix a typo --- diff --git a/Makefile b/Makefile index cd5a160..1d48f92 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ doc: serve: $(info *** Make sure to refresh pages without cache ***) - python3 -m http.server --directory "$(mkfile_dir)/public" + python3 -m http.server # --directory "$(mkfile_dir)/public" .DEFAULT_GOAL := doc .PHONY: doc serve diff --git a/guidelines/modules/ROOT/pages/index.adoc b/guidelines/modules/ROOT/pages/index.adoc index f56577b..581c9d8 100644 --- a/guidelines/modules/ROOT/pages/index.adoc +++ b/guidelines/modules/ROOT/pages/index.adoc @@ -604,7 +604,7 @@ Whenever possible (and feasible), Fedora packages containing libraries SHOULD bu 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 results in a changed file name in most cases. +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 From 7fa84bab67c9fbf96a0f80cf5339311d3a9633e4 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Oct 02 2018 14:28:37 +0000 Subject: [PATCH 4/4] Makefile: revert accidentally committed local change --- diff --git a/Makefile b/Makefile index 1d48f92..cd5a160 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ doc: serve: $(info *** Make sure to refresh pages without cache ***) - python3 -m http.server # --directory "$(mkfile_dir)/public" + python3 -m http.server --directory "$(mkfile_dir)/public" .DEFAULT_GOAL := doc .PHONY: doc serve