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
|
|
|
#
|
2020-04-09 13:17:52 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
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.
|
|
|
|
|
2019-08-15 23:02:09 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-03-19 11:57:31 +01:00
|
|
|
#
|
|
|
|
|
2012-04-19 15:49:28 +02:00
|
|
|
|
2010-03-19 11:57:31 +01:00
|
|
|
Name: cifs-utils
|
2019-04-10 16:31:46 +02:00
|
|
|
Version: 6.9
|
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
|
2018-03-20 17:57:38 +01:00
|
|
|
License: GPL-3.0-or-later
|
2010-03-19 11:57:31 +01:00
|
|
|
Group: System/Filesystems
|
2020-04-09 13:17:52 +02:00
|
|
|
URL: http://www.samba.org/linux-cifs/cifs-utils/
|
2018-09-11 15:50:49 +02:00
|
|
|
# origin git://git.samba.org/cifs-utils.git
|
|
|
|
# for-next https://github.com/piastry/cifs-utils.git
|
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
|
2010-03-19 11:57:31 +01:00
|
|
|
Source1: cifs.init
|
2017-03-15 17:25:04 +01:00
|
|
|
|
2019-08-15 23:02:09 +02:00
|
|
|
Patch0: 0001-smbinfo-Improve-help-usage-and-add-h-option.patch
|
|
|
|
Patch1: 0002-smbinfo-Add-bash-completion-support-for-smbinfo.patch
|
|
|
|
Patch2: 0003-getcifsacl-Add-support-to-accept-more-paths.patch
|
|
|
|
Patch3: 0004-getcifsacl-Fix-usage-message-to-include-multiple-fil.patch
|
|
|
|
Patch4: 0005-smbinfo-add-GETCOMPRESSION-support.patch
|
|
|
|
Patch5: 0006-getcifsacl-Add-support-for-R-recursive-option.patch
|
|
|
|
Patch6: 0007-smbinfo-add-bash-completion-support-for-getcompressi.patch
|
|
|
|
Patch7: 0008-mount.cifs.c-fix-memory-leaks-in-main-func.patch
|
|
|
|
Patch8: 0009-Zero-fill-the-allocated-memory-for-new-struct-cifs_n.patch
|
|
|
|
Patch9: 0010-Zero-fill-the-allocated-memory-for-a-new-ACE.patch
|
2019-09-09 15:49:51 +02:00
|
|
|
Patch10: 0011-fix-doublefree.patch
|
2019-10-09 18:13:33 +02:00
|
|
|
Patch11: 0012-mount.cifs-Fix-invalid-free.patch
|
2020-09-04 16:14:02 +02:00
|
|
|
Patch12: 0013-CVE-2020-14342-mount.cifs-fix-shell-command-injectio.patch
|
2019-08-15 23:02:09 +02:00
|
|
|
|
2018-09-11 15:50:49 +02:00
|
|
|
# cifs-utils 6.8 switched to python for man page generation
|
|
|
|
# we need to require either py2 or py3 package
|
|
|
|
# some products do not have a py2/py3 versions
|
2020-09-04 18:09:06 +02:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2018-09-11 15:50:49 +02:00
|
|
|
BuildRequires: python3-docutils
|
|
|
|
%else
|
|
|
|
BuildRequires: python-docutils
|
|
|
|
%endif
|
2017-05-17 15:41:22 +02:00
|
|
|
|
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
|
|
|
|
|
2018-09-11 15:50:49 +02:00
|
|
|
%if 0%{?suse_version} < 1221
|
2017-03-15 17:25:04 +01:00
|
|
|
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}
|
2018-09-11 15:50:49 +02:00
|
|
|
%if 0%{?suse_version} > 1140
|
2012-02-02 13:12:14 +01:00
|
|
|
BuildRequires: autoconf
|
|
|
|
%endif
|
2011-12-05 06:39:09 +01:00
|
|
|
BuildRequires: automake
|
2012-02-02 13:12:14 +01:00
|
|
|
BuildRequires: keyutils-devel
|
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
|
2018-09-10 14:16:22 +02:00
|
|
|
#!BuildIgnore: samba-client
|
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
|
2012-02-02 13:12:14 +01:00
|
|
|
BuildRequires: libwbclient-devel
|
2014-03-21 16:49:09 +01:00
|
|
|
BuildRequires: pam-devel
|
2018-03-20 17:57:38 +01:00
|
|
|
BuildRequires: pkg-config
|
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
|
|
|
%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
|
2019-04-10 16:31:46 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2013-01-16 16:27:10 +01:00
|
|
|
|
|
|
|
%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 .
|
2019-08-15 23:02:09 +02:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7 -p1
|
|
|
|
%patch8 -p1
|
|
|
|
%patch9 -p1
|
2019-09-09 15:49:51 +02:00
|
|
|
%patch10 -p1
|
2019-10-09 18:13:33 +02:00
|
|
|
%patch11 -p1
|
2020-09-04 16:14:02 +02:00
|
|
|
%patch12 -p1
|
2010-03-19 11:57:31 +01:00
|
|
|
|
|
|
|
%build
|
2018-03-20 17:47:44 +01:00
|
|
|
export CFLAGS="%{optflags} -D_GNU_SOURCE -fpie"
|
2012-02-06 12:12:48 +01:00
|
|
|
export LDFLAGS="-pie"
|
2014-03-21 16:49:09 +01:00
|
|
|
autoreconf -i
|
2020-11-20 12:29:53 +01:00
|
|
|
%if 0%{?usrmerged}
|
|
|
|
export ROOTSBINDIR="%{_sbindir}"
|
|
|
|
%endif
|
2018-03-20 17:47:44 +01:00
|
|
|
%configure \
|
2014-03-21 16:49:09 +01:00
|
|
|
--with-pamdir=/%{_lib}/security
|
2018-03-20 17:47:44 +01:00
|
|
|
make %{?_smp_mflags}
|
2010-03-19 11:57:31 +01:00
|
|
|
|
|
|
|
%install
|
2017-03-15 17:25:04 +01:00
|
|
|
%if ! %{systemd}
|
2018-09-11 15:50:49 +02:00
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/init.d
|
2017-03-15 17:25:04 +01:00
|
|
|
%endif
|
|
|
|
|
2018-03-20 17:47:44 +01:00
|
|
|
%make_install
|
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
|
|
|
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
|
2018-09-11 15:50:49 +02:00
|
|
|
%if 0%{?suse_version} > 1221
|
2013-02-26 14:18:52 +01:00
|
|
|
mkdir -p \
|
2018-09-11 15:50:49 +02:00
|
|
|
%{buildroot}/%{_sysconfdir}/sysconfig/network/if-{down,up}.d \
|
2018-03-20 17:47:44 +01:00
|
|
|
%{buildroot}/%{_sysconfdir}/samba \
|
|
|
|
%{buildroot}/%{_sbindir} \
|
|
|
|
%{buildroot}/%{_rundir}
|
2017-03-15 17:25:04 +01:00
|
|
|
|
|
|
|
%if ! %{systemd}
|
2018-03-20 17:47:44 +01:00
|
|
|
install -m 0755 -p ${RPM_SOURCE_DIR}/cifs.init %{buildroot}/%{_sysconfdir}/init.d/cifs
|
|
|
|
ln -s service %{buildroot}/%{_sbindir}/rccifs
|
2017-03-15 17:25:04 +01:00
|
|
|
%endif
|
|
|
|
|
2018-09-11 15:50:49 +02:00
|
|
|
touch %{buildroot}/%{_sysconfdir}/sysconfig/network/if-{down,up}.d/${script} \
|
2018-03-20 17:47:44 +01:00
|
|
|
%{buildroot}%{_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
|
2018-03-20 17:47:44 +01:00
|
|
|
%fdupes %{buildroot}
|
2010-03-19 11:57:31 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
2020-11-20 12:29:53 +01:00
|
|
|
%if 0%{?usrmerged}
|
|
|
|
%{_sbindir}/mount.cifs
|
|
|
|
%else
|
2010-03-19 11:57:31 +01:00
|
|
|
/sbin/mount.cifs
|
2020-11-20 12:29:53 +01:00
|
|
|
%endif
|
2012-02-02 13:12:14 +01:00
|
|
|
%{_bindir}/getcifsacl
|
|
|
|
%{_bindir}/setcifsacl
|
|
|
|
%{_sbindir}/cifs.idmap
|
2018-03-20 17:47:44 +01:00
|
|
|
%{_mandir}/man1/getcifsacl.1%{ext_man}
|
|
|
|
%{_mandir}/man1/setcifsacl.1%{ext_man}
|
|
|
|
%{_mandir}/man8/cifs.idmap.8%{ext_man}
|
2013-01-16 17:32:50 +01:00
|
|
|
%{_bindir}/cifscreds
|
|
|
|
%{_sbindir}/cifs.upcall
|
2019-04-10 16:31:46 +02:00
|
|
|
%{_bindir}/smbinfo
|
2018-03-20 17:47:44 +01:00
|
|
|
%{_mandir}/man1/cifscreds.1%{ext_man}
|
2019-04-10 16:31:46 +02:00
|
|
|
%{_mandir}/man1/smbinfo.1%{ext_man}
|
2018-03-20 17:47:44 +01:00
|
|
|
%{_mandir}/man8/cifs.upcall.8%{ext_man}
|
|
|
|
%{_mandir}/man8/mount.cifs.8%{ext_man}
|
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:32:50 +01:00
|
|
|
%dir %{_libdir}/cifs-utils
|
|
|
|
%dir %{_sysconfdir}/cifs-utils
|
|
|
|
%config(noreplace) %{_sysconfdir}/cifs-utils/idmap-plugin
|
|
|
|
%{_libdir}/%{name}/idmapwb.so
|
2018-03-20 17:47:44 +01:00
|
|
|
%{_mandir}/man8/idmapwb.8%{ext_man}
|
2018-09-11 15:50:49 +02:00
|
|
|
%if 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
|
|
|
|
%{_includedir}/cifsidmap.h
|
2010-04-05 18:23:14 +02:00
|
|
|
|
2014-03-21 16:49:09 +01:00
|
|
|
%files -n pam_cifscreds
|
|
|
|
/%{_lib}/security/pam_cifscreds.so
|
2018-03-20 17:47:44 +01:00
|
|
|
%{_mandir}/man8/pam_cifscreds.8%{ext_man}
|
2014-03-21 16:49:09 +01:00
|
|
|
|
2010-03-19 11:57:31 +01:00
|
|
|
%changelog
|