Convert symlink to idmapping plugin to use /etc/alternatives
Signed-off-by: Jeff Layton <jlayton@redhat.com>
This commit is contained in:
parent
d3b2ad6203
commit
db57368fbd
@ -1,20 +1,23 @@
|
|||||||
#% define pre_release rc1
|
#% define pre_release rc1
|
||||||
%define pre_release %nil
|
%define pre_release %nil
|
||||||
|
|
||||||
Name: cifs-utils
|
Name: cifs-utils
|
||||||
Version: 6.1
|
Version: 6.1
|
||||||
Release: 1%{pre_release}%{?dist}
|
Release: 2%{pre_release}%{?dist}
|
||||||
Summary: Utilities for mounting and managing CIFS mounts
|
Summary: Utilities for mounting and managing CIFS mounts
|
||||||
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
URL: http://linux-cifs.samba.org/cifs-utils/
|
URL: http://linux-cifs.samba.org/cifs-utils/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}%{pre_release}-%{release}-root-%(%{__id_u} -n)
|
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
|
BuildRequires: libcap-ng-devel libtalloc-devel krb5-devel keyutils-libs-devel autoconf automake libwbclient-devel
|
||||||
Requires: keyutils
|
|
||||||
|
|
||||||
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
|
%description
|
||||||
The SMB/CIFS protocol is a standard file sharing protocol widely deployed
|
The SMB/CIFS protocol is a standard file sharing protocol widely deployed
|
||||||
@ -44,7 +47,6 @@ make %{?_smp_mflags}
|
|||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=%{buildroot}
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
|
||||||
ln -s %{_libdir}/%{name}/idmapwb.so %{buildroot}%{_sysconfdir}/%{name}/idmap-plugin
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/request-key.d
|
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.idmap.conf %{buildroot}%{_sysconfdir}/request-key.d
|
||||||
install -m 644 contrib/request-key.d/cifs.spnego.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/cifs.idmap.8.gz
|
||||||
%{_mandir}/man8/mount.cifs.8.gz
|
%{_mandir}/man8/mount.cifs.8.gz
|
||||||
%{_mandir}/man8/idmapwb.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.idmap.conf
|
||||||
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.spnego.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
|
%files devel
|
||||||
%{_includedir}/cifsidmap.h
|
%{_includedir}/cifsidmap.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 15 2013 Jeff Layton <jlayton@redhat.com> 6.1-2
|
||||||
|
- Convert idmapping plugin symlink to use alternatives system
|
||||||
|
|
||||||
* Tue Jul 02 2013 Jeff Layton <jlayton@redhat.com> 6.1-1
|
* Tue Jul 02 2013 Jeff Layton <jlayton@redhat.com> 6.1-1
|
||||||
- update to 6.1 release
|
- update to 6.1 release
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user