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
|
|
|
#
|
2021-03-02 17:10:18 +01:00
|
|
|
# Copyright (c) 2021 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
|
|
|
|
2021-03-05 15:21:03 +01:00
|
|
|
%if %{undefined _pamdir}
|
|
|
|
%define _pamdir /%{_lib}/security
|
|
|
|
%endif
|
|
|
|
|
2010-03-19 11:57:31 +01:00
|
|
|
Name: cifs-utils
|
2021-03-05 16:46:11 +01:00
|
|
|
Version: 6.12
|
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
|
|
|
|
2021-03-05 16:46:11 +01:00
|
|
|
Patch1: fix-sbin-install-error.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 .
|
2021-03-05 16:46:11 +01:00
|
|
|
pyscripts="smb2-quota smbinfo"
|
|
|
|
for i in $pyscripts; do
|
|
|
|
if [ -e $i ]; then
|
|
|
|
sed -i 's,^#!/usr/bin/env python.*$,#!/usr/bin/python3,' $i
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2019-08-15 23:02:09 +02:00
|
|
|
%patch1 -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 \
|
2021-03-02 17:10:18 +01:00
|
|
|
--with-pamdir=%{_pamdir}
|
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
|
2021-03-05 16:46:11 +01:00
|
|
|
%{_sbindir}/mount.smb3
|
2020-11-20 12:29:53 +01:00
|
|
|
%else
|
2010-03-19 11:57:31 +01:00
|
|
|
/sbin/mount.cifs
|
2021-03-05 16:46:11 +01:00
|
|
|
/sbin/mount.smb3
|
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
|
2021-03-05 16:46:11 +01:00
|
|
|
%{_bindir}/smb2-quota
|
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}
|
2021-03-05 16:46:11 +01:00
|
|
|
%{_mandir}/man1/smb2-quota.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}
|
2021-03-05 16:46:11 +01:00
|
|
|
%{_mandir}/man8/mount.smb3.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
|
2021-03-02 17:10:18 +01:00
|
|
|
/%{_pamdir}/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
|