c17c87db13
OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/cifs-utils?expand=0&rev=109
219 lines
7.4 KiB
RPMSpec
219 lines
7.4 KiB
RPMSpec
#
|
|
# spec file for package cifs-utils
|
|
#
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
Name: cifs-utils
|
|
Version: 6.4
|
|
Release: 0
|
|
Summary: Utilities for doing and managing mounts of the Linux CIFS filesyste
|
|
License: GPL-3.0+
|
|
Group: System/Filesystems
|
|
Url: http://www.samba.org/linux-cifs/cifs-utils/
|
|
Source: ftp://ftp.samba.org/pub/linux-cifs/%{name}/%{name}-%{version}.tar.bz2
|
|
Source5: ftp://ftp.samba.org/pub/linux-cifs/%{name}/%{name}-%{version}.tar.bz2.asc
|
|
Source6: ftp://ftp.samba.org/pub/linux-cifs/cifs-utils/cifs-utils-pubkey_70F3B981.asc
|
|
%if "%{_vendor}" == "suse"
|
|
%define NET_CFGDIR network
|
|
%else
|
|
%define NET_CFGDIR network-scripts
|
|
%endif
|
|
Source1: cifs.init
|
|
Source2: mkinitrd_scripts_boot-cifs.sh
|
|
Source3: mkinitrd_scripts_setup-cifs.sh
|
|
%if 0%{?suse_version}
|
|
PreReq: insserv %{?fillup_prereq} mkinitrd
|
|
%else
|
|
PreReq: /sbin/chkconfig
|
|
%endif
|
|
%define initdir %{_sysconfdir}/init.d
|
|
Provides: cifs-mount = %{version}
|
|
Obsoletes: cifs-mount < %{version}
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140
|
|
BuildRequires: autoconf
|
|
%endif
|
|
BuildRequires: automake
|
|
%if 0%{?suse_version} > 1020
|
|
BuildRequires: keyutils-devel
|
|
%endif
|
|
BuildRequires: krb5-devel
|
|
%if 0%{?suse_version} > 1120
|
|
BuildRequires: libcap-ng-devel
|
|
%else
|
|
BuildRequires: libcap-devel
|
|
%endif
|
|
#!BuildIgnore: libldb
|
|
#!BuildIgnore: libtalloc
|
|
#!BuildIgnore: libtevent
|
|
#!BuildIgnore: samba4-libs
|
|
BuildRequires: libtalloc-devel
|
|
%if 0%{?suse_version} > 1110
|
|
BuildRequires: fdupes
|
|
%endif
|
|
%if 0%{?mandriva_version}
|
|
BuildRequires: libkeyutils-devel
|
|
%endif
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020
|
|
BuildRequires: libwbclient-devel
|
|
%endif
|
|
BuildRequires: pam-devel
|
|
%if 0%{?suse_version} > 1020
|
|
BuildRequires: pkg-config
|
|
%else
|
|
BuildRequires: pkgconfig
|
|
%endif
|
|
Requires: keyutils
|
|
%if 0%{?suse_version} > 1220
|
|
BuildRequires: gpg-offline
|
|
%endif
|
|
%if ! %{defined _rundir}
|
|
%define _rundir %{_localstatedir}/run
|
|
%endif
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
The cifs-utils package consist of utilities for doing and managing mounts of
|
|
the Linux CIFS filesystem.
|
|
|
|
%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.
|
|
|
|
%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.
|
|
|
|
%prep
|
|
%{?gpg_verify: %gpg_verify --keyring %{SOURCE6} %{SOURCE5}}
|
|
%setup -q
|
|
|
|
%build
|
|
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fpie"
|
|
export LDFLAGS="-pie"
|
|
autoreconf -i
|
|
%{configure} \
|
|
--with-pamdir=/%{_lib}/security
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
%install
|
|
mkdir -p \
|
|
${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d
|
|
%{__make} install \
|
|
DESTDIR=${RPM_BUILD_ROOT}
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020
|
|
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
|
|
ln -s %{_libdir}/%{name}/idmapwb.so %{buildroot}%{_sysconfdir}/%{name}/idmap-plugin
|
|
%endif
|
|
mkdir -p %{buildroot}%{_sysconfdir}/request-key.d
|
|
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
|
|
%if 0%{?suse_version} > 1100
|
|
mkdir -p ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
|
|
%{__install} -m 0755 ${RPM_SOURCE_DIR}/mkinitrd_scripts_boot-cifs.sh ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/boot-cifs.sh
|
|
%{__install} -m 0755 ${RPM_SOURCE_DIR}/mkinitrd_scripts_setup-cifs.sh ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/setup-cifs.sh
|
|
%endif
|
|
%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} \
|
|
${RPM_BUILD_ROOT}/%{_rundir}
|
|
install -m 0755 -p ${RPM_SOURCE_DIR}/cifs.init ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d/cifs
|
|
ln -s %{_sysconfdir}/init.d/${cifs_init_script} ${RPM_BUILD_ROOT}/%{_sbindir}/rccifs
|
|
touch ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/${script} \
|
|
${RPM_BUILD_ROOT}%{_rundir}/cifs
|
|
%endif
|
|
# Hardlink duplicate files
|
|
%if 0%{?suse_version} > 1110
|
|
%fdupes ${RPM_BUILD_ROOT}
|
|
%endif
|
|
|
|
%post
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
|
exit 0
|
|
|
|
%postun
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
|
exit 0
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
/sbin/mount.cifs
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020
|
|
%{_bindir}/getcifsacl
|
|
%{_bindir}/setcifsacl
|
|
%{_sbindir}/cifs.idmap
|
|
%doc %{_mandir}/man1/getcifsacl.1.*
|
|
%doc %{_mandir}/man1/setcifsacl.1.*
|
|
%doc %{_mandir}/man8/cifs.idmap.8.*
|
|
%endif
|
|
%if 0%{?centos_version} > 499 || 0%{?fedora_version} > 14 || 0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 499 || 0%{?suse_version} > 1020
|
|
%{_bindir}/cifscreds
|
|
%{_sbindir}/cifs.upcall
|
|
%doc %{_mandir}/man1/cifscreds.1.*
|
|
%doc %{_mandir}/man8/cifs.upcall.8.*
|
|
%endif
|
|
%doc %{_mandir}/man8/mount.cifs.8.*
|
|
%dir %{_sysconfdir}/request-key.d
|
|
%if 0%{?suse_version} > 1100
|
|
%dir /lib/mkinitrd
|
|
%dir /lib/mkinitrd/scripts
|
|
/lib/mkinitrd/scripts/setup-cifs.sh
|
|
/lib/mkinitrd/scripts/boot-cifs.sh
|
|
%endif
|
|
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.idmap.conf
|
|
%config(noreplace) %{_sysconfdir}/request-key.d/cifs.spnego.conf
|
|
%if 0%{?centos_version} > 599 || 0%{?fedora_version} > 14 || 0%{?mandriva_version} > 201100 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1020
|
|
%dir %{_libdir}/cifs-utils
|
|
%dir %{_sysconfdir}/cifs-utils
|
|
%config(noreplace) %{_sysconfdir}/cifs-utils/idmap-plugin
|
|
%{_libdir}/%{name}/idmapwb.so
|
|
%doc %{_mandir}/man8/idmapwb.8.*
|
|
%endif
|
|
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1221
|
|
%attr(0754,root,root) %config %{_sysconfdir}/init.d/cifs
|
|
%{_sbindir}/rccifs
|
|
%dir %{_sysconfdir}/samba
|
|
%ghost %{_rundir}/cifs
|
|
%endif
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/cifsidmap.h
|
|
|
|
%files -n pam_cifscreds
|
|
%defattr(-,root,root)
|
|
/%{_lib}/security/pam_cifscreds.so
|
|
%{_mandir}/man8/pam_cifscreds.8.*
|
|
|
|
%changelog
|