]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Revise dependencies to get out of the shadow of dtrace-modules-headers.
authorNick Alcock <nick.alcock@oracle.com>
Mon, 16 Feb 2015 15:38:52 +0000 (15:38 +0000)
committerKris Van Hees <kris.van.hees@oracle.com>
Tue, 21 Jul 2015 06:51:24 +0000 (02:51 -0400)
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 <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
dtrace/NEWS
dtrace/dtrace-module.spec

index f8c4c4577759b1ef7026437602b48e1c414b0403..ea4996e79f1ccb6d114bc68f8ccb89ce808a75ab 100644 (file)
@@ -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
index 33e54779940e930aada38463a65573b4eafc1d21..c59e3b46077e23c3273a75a1fd1f31bc3ad59bc6 100644 (file)
 %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}"))
 #
 %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 <nick.alcock@oracle.com>
 Kris Van Hees <kris.van.hees@oracle.com>
 
-%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 <nick.alcock@oracle.com> - 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 <kris.van.hees@oracle.com> - 0.4.3-4
 - Updated NEWS file: test stress/buffering/tst.resize1.d is XFAIL for now.