diff --git a/cifs-utils.spec b/cifs-utils.spec index 0c33cff..3cea5cf 100644 --- a/cifs-utils.spec +++ b/cifs-utils.spec @@ -1,20 +1,23 @@ #% define pre_release rc1 %define pre_release %nil -Name: cifs-utils -Version: 6.1 -Release: 1%{pre_release}%{?dist} -Summary: Utilities for mounting and managing CIFS mounts +Name: cifs-utils +Version: 6.1 +Release: 2%{pre_release}%{?dist} +Summary: Utilities for mounting and managing CIFS mounts -Group: System Environment/Daemons -License: GPLv3 -URL: http://linux-cifs.samba.org/cifs-utils/ -BuildRoot: %{_tmppath}/%{name}-%{version}%{pre_release}-%{release}-root-%(%{__id_u} -n) +Group: System Environment/Daemons +License: GPLv3 +URL: http://linux-cifs.samba.org/cifs-utils/ +BuildRoot: %{_tmppath}/%{name}-%{version}%{pre_release}-%{release}-root-%(%{__id_u} -n) -BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake libwbclient-devel -Requires: keyutils +BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake libwbclient-devel -Source0: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}%{pre_release}.tar.bz2 +Requires: keyutils +Requires(post): /usr/sbin/alternatives +Requires(preun): /usr/sbin/alternatives + +Source0: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/%{name}-%{version}%{pre_release}.tar.bz2 %description The SMB/CIFS protocol is a standard file sharing protocol widely deployed @@ -44,7 +47,6 @@ make %{?_smp_mflags} rm -rf %{buildroot} make install DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_sysconfdir}/%{name} -ln -s %{_libdir}/%{name}/idmapwb.so %{buildroot}%{_sysconfdir}/%{name}/idmap-plugin mkdir -p %{buildroot}%{_sysconfdir}/request-key.d install -m 644 contrib/request-key.d/cifs.idmap.conf %{buildroot}%{_sysconfdir}/request-key.d install -m 644 contrib/request-key.d/cifs.spnego.conf %{buildroot}%{_sysconfdir}/request-key.d @@ -69,14 +71,25 @@ rm -rf %{buildroot} %{_mandir}/man8/cifs.idmap.8.gz %{_mandir}/man8/mount.cifs.8.gz %{_mandir}/man8/idmapwb.8.gz -%config(noreplace) %{_sysconfdir}/cifs-utils/idmap-plugin +%ghost %{_sysconfdir}/cifs-utils/idmap-plugin %config(noreplace) %{_sysconfdir}/request-key.d/cifs.idmap.conf %config(noreplace) %{_sysconfdir}/request-key.d/cifs.spnego.conf +%post +/usr/sbin/alternatives --install /etc/cifs-utils/idmap-plugin cifs-idmap-plugin %{_libdir}/%{name}/idmapwb.so 10 + +%preun +if [ $1 = 0 ]; then + /usr/sbin/alternatives --remove cifs-idmap-plugin %{_libdir}/%{name}/idmapwb.so +fi + %files devel %{_includedir}/cifsidmap.h %changelog +* Mon Jul 15 2013 Jeff Layton 6.1-2 +- Convert idmapping plugin symlink to use alternatives system + * Tue Jul 02 2013 Jeff Layton 6.1-1 - update to 6.1 release