2010-03-19 11:57:31 +01:00
|
|
|
#
|
2011-02-18 11:58:10 +01:00
|
|
|
# spec file for package cifs-utils
|
2010-03-19 11:57:31 +01:00
|
|
|
#
|
2017-02-02 16:32:30 +01:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2010-03-19 11:57:31 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-04-19 15:49:28 +02:00
|
|
|
|
2010-03-19 11:57:31 +01:00
|
|
|
Name: cifs-utils
|
2016-02-22 19:12:23 +01:00
|
|
|
Version: 6.5
|
2011-12-05 06:39:09 +01:00
|
|
|
Release: 0
|
2015-01-30 17:55:41 +01:00
|
|
|
Summary: Utilities for doing and managing mounts of the Linux CIFS filesystem
|
2011-12-21 17:26:53 +01:00
|
|
|
License: GPL-3.0+
|
2010-03-19 11:57:31 +01:00
|
|
|
Group: System/Filesystems
|
|
|
|
Url: http://www.samba.org/linux-cifs/cifs-utils/
|
2017-02-02 16:32:30 +01:00
|
|
|
Source: https://ftp.samba.org/pub/linux-cifs/%{name}/%{name}-%{version}.tar.bz2
|
|
|
|
Source5: https://ftp.samba.org/pub/linux-cifs/%{name}/%{name}-%{version}.tar.bz2.asc
|
2015-02-20 14:26:25 +01:00
|
|
|
# http://ftp.samba.org/pub/linux-cifs/cifs-utils/cifs-utils-pubkey_70F3B981.asc
|
2014-10-28 20:06:11 +01:00
|
|
|
Source6: cifs-utils.keyring
|
2014-10-28 12:13:02 +01:00
|
|
|
Source100: README.cifstab.migration
|
2013-02-26 14:18:52 +01:00
|
|
|
%if "%{_vendor}" == "suse"
|
|
|
|
%define NET_CFGDIR network
|
|
|
|
%else
|
|
|
|
%define NET_CFGDIR network-scripts
|
|
|
|
%endif
|
2010-03-19 11:57:31 +01:00
|
|
|
Source1: cifs.init
|
2017-03-15 17:25:04 +01:00
|
|
|
|
2017-05-17 15:41:22 +02:00
|
|
|
# fate#322075
|
|
|
|
Patch0: 0001-manpage-correct-typos-and-spelling-mistakes.patch
|
|
|
|
Patch1: 0002-mount.cifs-document-SMBv3.1.1-and-new-seal-option.patch
|
|
|
|
|
2017-03-15 17:25:04 +01:00
|
|
|
%if 0%{?suse_version} >= 1221
|
|
|
|
%define systemd 1
|
2010-03-19 11:57:31 +01:00
|
|
|
%else
|
2017-03-15 17:25:04 +01:00
|
|
|
%define systemd 0
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} < 1221
|
|
|
|
PreReq: insserv %{?fillup_prereq}
|
2010-03-19 11:57:31 +01:00
|
|
|
%endif
|
|
|
|
%define initdir %{_sysconfdir}/init.d
|
2010-03-26 01:07:13 +01:00
|
|
|
Provides: cifs-mount = %{version}
|
|
|
|
Obsoletes: cifs-mount < %{version}
|
2012-02-02 13:12:14 +01:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140
|
|
|
|
BuildRequires: autoconf
|
|
|
|
%endif
|
2011-12-05 06:39:09 +01:00
|
|
|
BuildRequires: automake
|
2012-02-02 13:12:14 +01:00
|
|
|
%if 0%{?suse_version} > 1020
|
|
|
|
BuildRequires: keyutils-devel
|
|
|
|
%endif
|
2011-12-05 06:39:09 +01:00
|
|
|
BuildRequires: krb5-devel
|
2012-02-02 13:12:14 +01:00
|
|
|
%if 0%{?suse_version} > 1120
|
|
|
|
BuildRequires: libcap-ng-devel
|
|
|
|
%else
|
2011-12-05 06:39:09 +01:00
|
|
|
BuildRequires: libcap-devel
|
2012-02-02 13:12:14 +01:00
|
|
|
%endif
|
2014-06-18 22:06:24 +02:00
|
|
|
#!BuildIgnore: samba4-libs
|
2011-12-05 06:39:09 +01:00
|
|
|
BuildRequires: libtalloc-devel
|
2010-03-19 11:57:31 +01:00
|
|
|
%if 0%{?suse_version} > 1110
|
|
|
|
BuildRequires: fdupes
|
|
|
|
%endif
|
2010-05-25 13:17:54 +02:00
|
|
|
%if 0%{?mandriva_version}
|
|
|
|
BuildRequires: libkeyutils-devel
|
|
|
|
%endif
|
2012-06-01 20:32:56 +02:00
|
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020
|
2012-02-02 13:12:14 +01:00
|
|
|
BuildRequires: libwbclient-devel
|
|
|
|
%endif
|
2014-03-21 16:49:09 +01:00
|
|
|
BuildRequires: pam-devel
|
2012-04-19 18:07:51 +02:00
|
|
|
%if 0%{?suse_version} > 1020
|
|
|
|
BuildRequires: pkg-config
|
|
|
|
%else
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
%endif
|
2010-03-19 11:57:31 +01:00
|
|
|
Requires: keyutils
|
2014-05-08 12:00:19 +02:00
|
|
|
%if ! %{defined _rundir}
|
|
|
|
%define _rundir %{_localstatedir}/run
|
|
|
|
%endif
|
|
|
|
|
2010-03-19 11:57:31 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
The cifs-utils package consist of utilities for doing and managing mounts of
|
|
|
|
the Linux CIFS filesystem.
|
|
|
|
|
2013-01-16 16:27:10 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Files needed for building plugins for cifs-utils
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
The SMB/CIFS protocol is a standard file sharing protocol widely deployed
|
|
|
|
on Microsoft Windows machines. This package contains the header file
|
|
|
|
necessary for building ID mapping plugins for cifs-utils.
|
|
|
|
|
2014-03-21 16:49:09 +01:00
|
|
|
%package -n pam_cifscreds
|
|
|
|
Summary: PAM module to manage NTLM credentials in kernel keyring
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n pam_cifscreds
|
|
|
|
The pam_cifscreds PAM module is a tool for automatically adding
|
|
|
|
credentials (username and password) for the purpose of establishing
|
|
|
|
sessions in multiuser mounts.
|
|
|
|
|
|
|
|
When a cifs filesystem is mounted with the "multiuser" option, and does
|
|
|
|
not use krb5 authentication, it needs to be able to get the credentials
|
|
|
|
for each user from somewhere. The pam_cifscreds module can be used to
|
|
|
|
provide these credentials to the kernel automatically at login.
|
|
|
|
|
2010-03-19 11:57:31 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2014-10-28 12:13:02 +01:00
|
|
|
cp -a ${RPM_SOURCE_DIR}/README.cifstab.migration .
|
2017-05-17 15:41:22 +02:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
2010-03-19 11:57:31 +01:00
|
|
|
|
|
|
|
%build
|
2012-02-06 12:12:48 +01:00
|
|
|
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fpie"
|
|
|
|
export LDFLAGS="-pie"
|
2014-03-21 16:49:09 +01:00
|
|
|
autoreconf -i
|
|
|
|
%{configure} \
|
|
|
|
--with-pamdir=/%{_lib}/security
|
2010-03-19 11:57:31 +01:00
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2017-03-15 17:25:04 +01:00
|
|
|
%if ! %{systemd}
|
2010-03-19 11:57:31 +01:00
|
|
|
mkdir -p \
|
|
|
|
${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d
|
2017-03-15 17:25:04 +01:00
|
|
|
%endif
|
|
|
|
|
2010-03-19 11:57:31 +01:00
|
|
|
%{__make} install \
|
|
|
|
DESTDIR=${RPM_BUILD_ROOT}
|
2013-01-16 17:56:32 +01:00
|
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020
|
2013-01-16 17:32:50 +01:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
|
2013-01-16 16:27:10 +01:00
|
|
|
ln -s %{_libdir}/%{name}/idmapwb.so %{buildroot}%{_sysconfdir}/%{name}/idmap-plugin
|
2013-01-16 17:32:50 +01:00
|
|
|
%endif
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/request-key.d
|
2013-01-16 16:27:10 +01:00
|
|
|
install -m 644 -p contrib/request-key.d/cifs.idmap.conf %{buildroot}%{_sysconfdir}/request-key.d
|
|
|
|
install -m 644 -p contrib/request-key.d/cifs.spnego.conf %{buildroot}%{_sysconfdir}/request-key.d
|
2013-02-26 14:18:52 +01:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1221
|
|
|
|
mkdir -p \
|
|
|
|
${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d \
|
|
|
|
${RPM_BUILD_ROOT}/%{_sysconfdir}/samba \
|
|
|
|
${RPM_BUILD_ROOT}/%{_sbindir} \
|
2014-05-08 12:00:19 +02:00
|
|
|
${RPM_BUILD_ROOT}/%{_rundir}
|
2017-03-15 17:25:04 +01:00
|
|
|
|
|
|
|
%if ! %{systemd}
|
2013-02-26 14:18:52 +01:00
|
|
|
install -m 0755 -p ${RPM_SOURCE_DIR}/cifs.init ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d/cifs
|
2014-12-03 14:49:39 +01:00
|
|
|
ln -s service ${RPM_BUILD_ROOT}/%{_sbindir}/rccifs
|
2017-03-15 17:25:04 +01:00
|
|
|
%endif
|
|
|
|
|
2013-02-26 14:18:52 +01:00
|
|
|
touch ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/${script} \
|
2014-05-08 12:00:19 +02:00
|
|
|
${RPM_BUILD_ROOT}%{_rundir}/cifs
|
2013-02-26 14:18:52 +01:00
|
|
|
%endif
|
2010-03-19 11:57:31 +01:00
|
|
|
# Hardlink duplicate files
|
|
|
|
%if 0%{?suse_version} > 1110
|
|
|
|
%fdupes ${RPM_BUILD_ROOT}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
2013-10-08 17:11:32 +02:00
|
|
|
%defattr(-,root,root)
|
2010-03-19 11:57:31 +01:00
|
|
|
/sbin/mount.cifs
|
2013-01-16 17:56:32 +01:00
|
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020
|
2012-02-02 13:12:14 +01:00
|
|
|
%{_bindir}/getcifsacl
|
|
|
|
%{_bindir}/setcifsacl
|
|
|
|
%{_sbindir}/cifs.idmap
|
2015-05-06 19:31:33 +02:00
|
|
|
%{_mandir}/man1/getcifsacl.1.*
|
|
|
|
%{_mandir}/man1/setcifsacl.1.*
|
|
|
|
%{_mandir}/man8/cifs.idmap.8.*
|
2012-04-20 00:35:53 +02:00
|
|
|
%endif
|
2013-01-16 17:56:32 +01:00
|
|
|
%if 0%{?centos_version} > 499 || 0%{?fedora_version} > 14 || 0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 499 || 0%{?suse_version} > 1020
|
2013-01-16 17:32:50 +01:00
|
|
|
%{_bindir}/cifscreds
|
|
|
|
%{_sbindir}/cifs.upcall
|
2015-05-06 19:31:33 +02:00
|
|
|
%{_mandir}/man1/cifscreds.1.*
|
|
|
|
%{_mandir}/man8/cifs.upcall.8.*
|
2013-01-16 17:32:50 +01:00
|
|
|
%endif
|
2015-05-06 19:31:33 +02:00
|
|
|
%{_mandir}/man8/mount.cifs.8.*
|
2013-01-16 16:27:10 +01:00
|
|
|
%dir %{_sysconfdir}/request-key.d
|
|
|
|
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.idmap.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.spnego.conf
|
2013-01-16 17:56:32 +01:00
|
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020
|
2013-01-16 17:32:50 +01:00
|
|
|
%dir %{_libdir}/cifs-utils
|
|
|
|
%dir %{_sysconfdir}/cifs-utils
|
|
|
|
%config(noreplace) %{_sysconfdir}/cifs-utils/idmap-plugin
|
|
|
|
%{_libdir}/%{name}/idmapwb.so
|
2015-05-06 19:31:33 +02:00
|
|
|
%{_mandir}/man8/idmapwb.8.*
|
2013-01-16 17:32:50 +01:00
|
|
|
%endif
|
2013-02-26 14:18:52 +01:00
|
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1221
|
2017-03-15 17:25:04 +01:00
|
|
|
%if ! %{systemd}
|
2013-02-26 14:18:52 +01:00
|
|
|
%attr(0754,root,root) %config %{_sysconfdir}/init.d/cifs
|
|
|
|
%{_sbindir}/rccifs
|
2017-03-15 17:25:04 +01:00
|
|
|
%endif
|
2013-02-26 14:18:52 +01:00
|
|
|
%dir %{_sysconfdir}/samba
|
2014-05-08 12:00:19 +02:00
|
|
|
%ghost %{_rundir}/cifs
|
2013-02-26 14:18:52 +01:00
|
|
|
%endif
|
2014-10-28 12:13:02 +01:00
|
|
|
%doc README.cifstab.migration
|
2013-01-16 16:27:10 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_includedir}/cifsidmap.h
|
2010-04-05 18:23:14 +02:00
|
|
|
|
2014-03-21 16:49:09 +01:00
|
|
|
%files -n pam_cifscreds
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/%{_lib}/security/pam_cifscreds.so
|
|
|
|
%{_mandir}/man8/pam_cifscreds.8.*
|
|
|
|
|
2010-03-19 11:57:31 +01:00
|
|
|
%changelog
|