612b8dda46
+ -Werror has been removed by default from CFLAGS + PIE and RELRO are enabled by default at build time + better integration with systemd by allowing the use of /bin/systemd-ask-password if available + better checks and warnings from cifscreds when used in environments that do not have a session keyring - No longer initialize oldfsgid inside acquire_mountpoint() of mount.cifs.c as -Werror got removed. OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/cifs-utils?expand=0&rev=70
151 lines
4.0 KiB
RPMSpec
151 lines
4.0 KiB
RPMSpec
#
|
|
# spec file for package cifs-utils
|
|
#
|
|
# Copyright (c) 2012 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: 5.6
|
|
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: %{name}-%{version}.tar.bz2
|
|
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: libtalloc
|
|
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
|
|
%if 0%{?suse_version} > 1020
|
|
BuildRequires: pkg-config
|
|
%else
|
|
BuildRequires: pkgconfig
|
|
%endif
|
|
Requires: keyutils
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
The cifs-utils package consist of utilities for doing and managing mounts of
|
|
the Linux CIFS filesystem.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fpie"
|
|
export LDFLAGS="-pie"
|
|
%{configure}
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
%install
|
|
mkdir -p \
|
|
${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d
|
|
%{__make} install \
|
|
DESTDIR=${RPM_BUILD_ROOT}
|
|
%if 0%{?suse_version}
|
|
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
|
|
# Hardlink duplicate files
|
|
%if 0%{?suse_version} > 1110
|
|
%fdupes ${RPM_BUILD_ROOT}
|
|
%endif
|
|
|
|
%preun
|
|
%if 0%{?suse_version}
|
|
%{stop_on_removal cifs}
|
|
%else
|
|
if [ $1 = 0 ] ; then
|
|
test -x /sbin/chkconfig && /sbin/chkconfig --del cifs
|
|
fi
|
|
%endif
|
|
|
|
exit 0
|
|
|
|
%post
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
|
exit 0
|
|
|
|
%postun
|
|
%if 0%{?suse_version}
|
|
%{restart_on_update cifs}
|
|
%{insserv_cleanup}
|
|
%else
|
|
if [ "$1" -ge "1" ]; then
|
|
%{initdir}/cifs restart >/dev/null
|
|
fi
|
|
%endif
|
|
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
|
exit 0
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
/sbin/mount.cifs
|
|
%{_bindir}/cifscreds
|
|
%if 0%{?mandriva_version} > 201100 || 0%{?mandriva_version} == 0
|
|
%{_bindir}/getcifsacl
|
|
%{_bindir}/setcifsacl
|
|
%{_sbindir}/cifs.idmap
|
|
%endif
|
|
%{_sbindir}/cifs.upcall
|
|
%doc %{_mandir}/man1/cifscreds.1.*
|
|
%if 0%{?mandriva_version} > 201100 || 0%{?mandriva_version} == 0
|
|
%doc %{_mandir}/man1/getcifsacl.1.*
|
|
%doc %{_mandir}/man1/setcifsacl.1.*
|
|
%doc %{_mandir}/man8/cifs.idmap.8.*
|
|
%endif
|
|
%doc %{_mandir}/man8/cifs.upcall.8.*
|
|
%doc %{_mandir}/man8/mount.cifs.8.*
|
|
%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
|
|
|
|
%changelog
|