From e4ca69dc8e1fe65973d14ca6c80694093baa89c7 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Mon, 16 Feb 2015 15:38:52 +0000 Subject: [PATCH] Revise dependencies to get out of the shadow of dtrace-modules-headers. Before the big dependency revamp in 0.4.3 (in the kernel 3.8.13-22 era), the headers shared between kernel and userland resided in a versioned package named something like dtrace-modules-3.8.13-21-headers, which provided a dtrace-modules-headers symbol as well for users to pull in. Unfortunately some very old packages both had unversioned provides of the same symbol, and had versioned provides with a numeric scheme indicating compatibility, starting at '1'. We could use epochs to force 0.4.5-5 to be greater than 1, but nothing will get us out of the shadow of the unversioned symbol: these are always considered both greater and less than all other symbols, leading to wildly counterintuitive behaviour when yum does dependency resolution on them. So get out from under their shadow: rename the dtrace-modules-headers package to dtrace-modules-shared-headers, obsolete the old package so that already-installed copies are upgraded appropriately, and provide dtrace-modules-headers 1:1 -- epoched, so that it's higher in version than any we have ever provided. Older userspace should pick up that epoch and upgrade accordingly, newer userspace will use the new name. Unfortunately nothing can stop older packages from attempting to pick up ancient kernels -- the unversioned provide is out there, and nothing can remove it. But installs of new dtrace-utils, at least, will work, as will updates: all that may break is explicitly putting the older packages (but not the newer) into your own yum repo and installing from that: an unimportant use case. As usual with package configuration changes, we have to bump the module version number and introduce the new name only in the new version: the older stanzas will still be used when building old security errata modules, and we don't want to introduce the new name there. Even there, so little has changed that we can share nearly all the RPM headers between 0.4.3 and 0.4.4: only the Obsoletes/Provides needs to be special-cased. Orabug: 20508087 Signed-off-by: Nick Alcock Acked-by: Kris Van Hees --- dtrace/NEWS | 10 ++++++++++ dtrace/dtrace-module.spec | 30 +++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/dtrace/NEWS b/dtrace/NEWS index f8c4c4577759..ea4996e79f1c 100644 --- a/dtrace/NEWS +++ b/dtrace/NEWS @@ -1,6 +1,16 @@ DTrace Kernel Modules News ========================== +Release 0.4.4 (Mar 12th, 2015) +----------------------------- +Kernel release: 3.8.13-69.el6uek + +Bugfixes: + + - Renamed the dtrace-modules-headers package to dtrace-modules-shared-headers + to work around problems in Yum where a symbol has had both versioned and + unversioned provides over time. + Release 0.4.3 (May 1st, 2014) ----------------------------- Kernel release: 3.8.13-33.el6uek diff --git a/dtrace/dtrace-module.spec b/dtrace/dtrace-module.spec index 33e54779940e..c59e3b46077e 100644 --- a/dtrace/dtrace-module.spec +++ b/dtrace/dtrace-module.spec @@ -26,10 +26,15 @@ %define dt_0_4_1 1025 %define dt_0_4_2 1026 %define dt_0_4_3 1027 +%define dt_0_4_4 1028 %{lua: local kver = rpm.expand("%{kver}") - if rpm.vercmp(kver, "3.8.13-33") >= 0 then + if rpm.vercmp(kver, "3.8.13-69") >= 0 then + rpm.define("srcver 0.4.4") + rpm.define("bldrel 1") + rpm.define("dt_vcode "..rpm.expand("%{dt_0_4_4}")) + elseif rpm.vercmp(kver, "3.8.13-33") >= 0 then rpm.define("srcver 0.4.3") rpm.define("bldrel 4") rpm.define("dt_vcode "..rpm.expand("%{dt_0_4_3}")) @@ -62,6 +67,12 @@ # %if %{dt_vcode} >= %{dt_0_4_2} +%if %{dt_vcode} >= %{dt_0_4_4} +%define header_pkg dtrace-modules-shared-headers +%else +%define header_pkg dtrace-modules-headers +%endif + Name: dtrace-modules-%{kver} Summary: dtrace module Version: %{srcver} @@ -87,15 +98,19 @@ Maintainers: Nick Alcock Kris Van Hees -%package -n dtrace-modules-headers +%package -n %{header_pkg} Summary: Header files for communication with the DTrace kernel module. -%description -n dtrace-modules-headers +%if %{dt_vcode} >= %{dt_0_4_4} +Obsoletes: dtrace-modules-headers +Provides: dtrace-modules-headers 1:1 +%endif +%description -n %{header_pkg} This package contains header files describing the protocol used by userspace to communicate with the DTrace kernel module. %package -n dtrace-modules-provider-headers Summary: Header files for implementation of DTrace providers. -Requires: dtrace-modules-headers +Requires: %{header_pkg} %{lua: local obsoleted = {"16.1.1", "16.2.1", "16.2.2", "16.2.3", "16.3.1", "16.3.2", "16.3.3", "16"} @@ -187,7 +202,7 @@ rm -rf %{buildroot} %if %{dt_vcode} >= %{dt_0_4_2} -%files -n dtrace-modules-headers +%files -n %{header_pkg} %defattr(-,root,root,-) /usr/include/linux/dtrace %exclude /usr/include/linux/dtrace/provider*.h @@ -214,6 +229,11 @@ rm -rf %{buildroot} %endif %changelog +%if %{dt_vcode} >= %{dt_0_4_4} +* Thu Mar 9 2015 Nick Alcock - 0.4.4-1 +- Rename dtrace-modules-headers to dtrace-modules-shared-headers. + [Orabug: 20508087] +%endif %if %{dt_vcode} >= %{dt_0_4_3} * Fri Apr 24 2014 Kris Van Hees - 0.4.3-4 - Updated NEWS file: test stress/buffering/tst.resize1.d is XFAIL for now. -- 2.50.1