From 5e7bcd20bd1d10c2a1f399e0c7003b79f9f78f6c Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Wed, 9 Apr 2025 14:27:59 +0800 Subject: [PATCH] add obsoletes and conflicts for upgrading from previous versions --- attr.spec | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/attr.spec b/attr.spec index 04d46d9..62eb4fe 100644 --- a/attr.spec +++ b/attr.spec @@ -2,7 +2,7 @@ %define lname libattr1 Name: attr Version: 2.5.2 -Release: 1 +Release: 2 Summary: Commands for Manipulating Extended Attributes License: GPL-2.0-or-later AND LGPL-2.1-or-later Group: System/Filesystems @@ -11,8 +11,9 @@ Source: https://download-mirror.savannah.gnu.org/releases/attr/attr-%{ve Patch1: 0001-bypass-wrong-output-when-enabled-selinux.patch Patch2: 0002-dont-skip-security.evm-when-copy-xattr.patch -BuildRequires: pkgconfig +BuildRequires: gettext Conflicts: xfsdump < 2.0.0 +Obsoletes: %{name}-help < 2.5.2 %description A set of tools for manipulating extended attributes on file system @@ -25,6 +26,7 @@ Summary: A dynamic library for filesystem extended attribute support Group: System/Libraries Obsoletes: libattr < %{version}-%{release} Provides: libattr = %{version}-%{release} +Conflicts: attr%{?_isa} < 2.5.2 %description -n %{lname} This package contains the libattr.so dynamic library, which contains @@ -37,6 +39,7 @@ Requires: %{lname} = %{version} Requires: glibc-devel Provides: attr-devel = %{version}-%{release} Obsoletes: attr-devel < %{version}-%{release} +Conflicts: %{name}-help < 2.5.2 %description -n libattr-devel This package contains the libraries and header files needed to develop @@ -58,7 +61,6 @@ staticallly linking to programs that make use of extended attributes. %autosetup -p1 %build -%global _lto_cflags %{_lto_cflags} -ffat-lto-objects %configure \ --enable-static \ --disable-silent-rules @@ -66,8 +68,7 @@ staticallly linking to programs that make use of extended attributes. %install %make_install -# remove libtool archives -find %{buildroot} -type f -name "*.la" -delete -print +%delete_la # handle docs on our own rm -rf %{buildroot}/%{_datadir}/doc/%{name} %find_lang %{name} @@ -75,8 +76,6 @@ rm -rf %{buildroot}/%{_datadir}/doc/%{name} %check %make_build check -%ldconfig_scriptlets -n %{lname} - %files -f %{name}.lang %license doc/COPYING* %doc doc/CHANGES @@ -102,6 +101,9 @@ rm -rf %{buildroot}/%{_datadir}/doc/%{name} %{_libdir}/libattr.a %changelog +* Fri Jan 24 2025 Funda Wang - 2.5.2-2 +- add obsoletes and conflicts for upgrading from previous versions + * Sat Dec 28 2024 Eustace - 2.5.2-1 - update to 2.5.2 -- Gitee