From 7f3c42205182a05cd65b17120829a72a4ccc7887 Mon Sep 17 00:00:00 2001 From: Christopher Meng Date: Mon, 21 Sep 2015 08:55:14 +0800 Subject: [PATCH] Fix upgrade path of statgrab-tools --- libstatgrab.spec | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/libstatgrab.spec b/libstatgrab.spec index b8310ee..458198a 100644 --- a/libstatgrab.spec +++ b/libstatgrab.spec @@ -4,7 +4,7 @@ Name: libstatgrab Epoch: 1 Version: 0.91 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A library that provides cross platform access to statistics of the system License: LGPLv2+ URL: http://www.i-scream.org/libstatgrab @@ -82,14 +82,14 @@ libstatgrab. This extends the use of libstatgrab to people writing scripts or anything else that can't easily make C function calls. Included with statgrab is a script to generate an MRTG configuration file to use statgrab. -# TODO: F23+2 must drop -compat? -%package compat +# TODO: F23+2 must drop -tools-compat? +%package tools-compat Summary: Transition package for statgrab-tools Obsoletes: statgrab-tools < 1:0.91-0 Requires: statgrab%{?_isa} = %{epoch}:%{version}-%{release} Requires: saidar%{?_isa} = %{epoch}:%{version}-%{release} -%description compat +%description tools-compat This package only exists to help transition statgrab-tools users to the new package split. It will be removed after 2 distribution release cycles, please do not reference it or depend on it in any way. @@ -127,6 +127,27 @@ rm -frv %{buildroot}%{_docdir} # Drop libtool archive. find %{buildroot} -name '*.la' -delete -print +mkdir -p %{buildroot}%{_docdir}/%{name}-tools-compat/ +cat <<'EOF' >> %{buildroot}%{_docdir}/%{name}-tools-compat/README.Fedora +This package only exists to help transition statgrab-tools users to the new +package split. the structure of the transition is: + +└── statgrab-tools --> └── %{name}-tools-compat + ├── saidar + └── statgrab + +In the past prior to Fedora 24, libstatgrab had only 1 package for 2 programs +with different usage, while putting them inside one package seems reasonable, +however in order to reduce the size of the package, we decided to halve the +original package, now users can choose which to install, saidar or statgrab. + +Note this compat package will be removed after 2 distribution release cycles, +please do not reference it or depend on it in any way. + +Yours, +libstatgrab maintainers +EOF + %check make check @@ -164,6 +185,9 @@ make check %{_bindir}/vm_stats %endif +%files tools-compat +%{_docdir}/%{name}-tools-compat/README.Fedora + %files -n saidar %license COPYING %{_bindir}/saidar @@ -181,6 +205,9 @@ make check %{_mandir}/*/*statgrab* %changelog +* Sat Sep 19 2015 Christopher Meng - 1:0.91-2 +- Fix upgrade path of statgrab-tools + * Sun Jul 26 2015 Christopher Meng - 1:0.91-1 - Update to 0.91