samba/samba.spec
Lars Müller 5fb45b2d0e - Update to 4.1.0rc3.
+ Fix working on site with Read Only Domain Controller; (bso#5917).
  + Add man page for vfs_syncops; (bso#7364).
  + Add man page for vfs_linux_xfs_sgid; (bso#7490).
  + When replicating DNS for bind9_dlz we need to create the server-DNS
    account remotely; (bso#9091).
  + Winbind unable to retrieve user information from AD; (bso#9615).
  + winbind_lookup_names() fails because of NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
    (bso#9899).
  + Build Samba 4.0.x on AIX with IBM XL C/C++; (bso#9911).
  + Add SMB2 and SMB3 support for smbclient; (bso#9974).
  + Add man pages for ntdb tools; (bso#10000).
  + Add man page for samba-regedit tool; (bso#10001).
  + ::1 added to nameserver on join; (bso#10030).
  + Fix memory leak in source3/lib/util.c:1493; (bso#10063).
  + Fix segmentation fault in 'net ads join'; (bso#10073).
  + Fix variable list in vfs_crossrename man page; (bso#10076).
  + s3-winbind: Fix a segfault passing NULL to a fstring argument; (bso#10082).
  + smbd: Fix async echo handler forking; (bso#10086).
  + MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba;
    (bso#10097).
  + Honour output buffer length set by the client for SMB2 GetInfo requests;
    (bso#10106).
  + Fix Winbind crashes on DC with trusted AD domains; (bso#10107).
  + Handle Dropbox (write-only-directory) case correctly in pathname lookup;
    (bso#10114).
  + Masks incorrectly applied to UNIX extension permission changes;
    (bso#10121).

- Correct interpackage dependencies; (bso#10129).

OBS-URL: https://build.opensuse.org/package/show/network:samba:STABLE/samba?expand=0&rev=338
2013-09-13 10:44:19 +00:00

1603 lines
52 KiB
RPMSpec

#
# spec file for package samba
#
# Copyright (c) 2013 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: samba
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140
BuildRequires: autoconf
%endif
BuildRequires: gcc
BuildRequires: make
BuildRequires: patch
BuildRequires: cups-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: e2fsprogs-devel
BuildRequires: fam-devel
BuildRequires: libacl-devel
BuildRequires: libattr-devel
%if 0%{?centos_version} > 599 ||0%{?fedora_version} > 11 || 0%{?mandriva_version} > 2009 || 0%{?rhel_version} > 599 || 0%{?suse_version} > 1100
BuildRequires: libuuid-devel
%endif
BuildRequires: pam-devel
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Parse::Yapp)
BuildRequires: popt-devel
BuildRequires: readline-devel
%if 0%{?suse_version}
BuildRequires: cracklib-devel
BuildRequires: openldap2-devel
BuildRequires: libopenssl-devel
%endif
%if 0%{?suse_version} > 1030
BuildRequires: gdbm-devel
BuildRequires: pwdutils
%endif
%if 0%{?suse_version} > 930
BuildRequires: krb5-devel
BuildRequires: libiniparser-devel
BuildRequires: libnscd-devel
BuildRequires: python-devel
%endif
%if 0%{?suse_version} > 930 && 0%{?suse_version} < 1031
BuildRequires: dmapi-devel
BuildRequires: libxml2-devel
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
BuildRequires: xfsprogs-devel
%endif
%if 0%{?fedora_version}
BuildRequires: cracklib-devel
%endif
%if 0%{?centos_version} || 0%{?fedora_version} || 0%{?rhel_version} || 0%{?mandriva_version}
BuildRequires: krb5-devel
BuildRequires: openldap-devel
BuildRequires: python-devel
%endif
%if 0%{?suse_version} > 1000
BuildRequires: keyutils-devel
%endif
%if 0%{?fedora_version} || 0%{?rhel_version} > 500
BuildRequires: keyutils-libs-devel
%endif
%if 0%{?suse_version} > 1000 || 0%{?fedora_version} || 0%{?rhel_version} || 0%{?mandriva_version}
BuildRequires: ctdb-devel > 1.0.105
%endif
%if 0%{?suse_version} > 1110
BuildRequires: fdupes
%endif
%if 0%{?suse_version} > 1020
%define pkgconfig_req pkg-config
%else
%define pkgconfig_req pkgconfig
%endif
BuildRequires: %{pkgconfig_req}
BuildRequires: libldb-devel
BuildRequires: pyldb-devel
#!BuildIgnore: libtalloc
BuildRequires: libtalloc-devel
BuildRequires: pytalloc-devel
#!BuildIgnore: libtdb
BuildRequires: libtdb-devel
BuildRequires: python-tdb
BuildRequires: libtevent-devel
BuildRequires: python-tevent
# to generate the man pages
BuildRequires: docbook-xsl-stylesheets
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1141
BuildRequires: libxslt
%endif
%if 0%{?suse_version} > 1140 && 0%{?suse_version} < 1211
BuildRequires: libxslt1
%endif
%if 0%{?suse_version} > 1210
BuildRequires: libxslt-tools
%endif
%define samba_ver 4.1.0
%define samba_ver_suffix rc3
%if "%{samba_ver_suffix}" == ""
%define samba_source_location http://ftp.samba.org/pub/samba/stable/samba-%{version}.tar.gz
%else
%define samba_source_location http://ftp.samba.org/pub/samba/rc/samba-%{version}%{samba_ver_suffix}.tar.gz
%endif
%define samba_ver_full %{samba_ver}%{samba_ver_suffix}
%if 0%{?suse_version} && 0%{?suse_version} < 1111
%define guards_symbols pre_1111
%endif
%if 0%{?suse_version} && 0%{?suse_version} < 1031
%define libsmbclient_name libsmbclient
%define libsmbsharemodes_name libsmbsharemodes
%else
%define libsmbclient_name libsmbclient0
%define libsmbsharemodes_name libsmbsharemodes0
%endif
%define libnetapi_name libnetapi0
%define libwbclient_name libwbclient0
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1140
%define build_make_smp_mflags %{?_smp_mflags}
%else
%define build_make_smp_mflags %{?jobs:-j%jobs}
%endif
%define SOURCE_TIMESTAMP 3078
%define BRANCH %{version}
%global with_mitkrb5 1
%global with_dc 0
%global with_get_printing_ticket 0
Version: 4.1.0
Release: 0
License: GPL-3.0+
Url: http://www.samba.org/
Group: Productivity/Networking/Samba
Provides: samba-gplv3 = %{version}
Obsoletes: samba-gplv3 < %{version}
%ifarch ppc64
Obsoletes: samba-64bit
%endif
Requires: samba-client >= %{version}
%if 0%{?suse_version} > 1030
Recommends: cron
Recommends: logrotate
%endif
Summary: A SMB/CIFS File, Print, and Authentication Server
Source: %{samba_source_location}
Source1: vendor-files.tar.bz2
Source2: patches.tar.bz2
Source4: baselibs.conf
Source100: samba-client-rpmlintrc
PreReq: /usr/bin/getent
PreReq: /usr/sbin/groupadd
PreReq: coreutils
PreReq: grep
# Choose some features / extra packages here
############################################
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1120
%define cifs_init_script cifs
%else
%define cifs_init_script smbfs
%endif
%if 0%{?suse_version} && 0%{?suse_version} < 1111
# pre-11.2 doesn't know the python_* macros
%define python_sitelib %py_sitedir
%define python_sitearch %py_sitedir
%else (%if 0%{?centos_version} && 0%{?centos_version} < 600) || (0%{rhel_version} && 0%{rhel_version} < 600)
# CentOS and RHEL pre-6 don't know them either
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())")
%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")
%endif
# Define some global directories
################################
%define DOCDIR %{_defaultdocdir}/samba
%define DOCBOOKDIR %{_defaultdocdir}/samba/docbook
%define LOGDIR %{_localstatedir}/log/samba
%define LOCKDIR %{_localstatedir}/lib/samba
%define CONFIGDIR %{_sysconfdir}/samba
%define INITDIR %{_sysconfdir}/init.d
%define PIDDIR %{_localstatedir}/run/samba
%if "%{_vendor}" == "suse"
%define NET_CFGDIR network
%else
%define NET_CFGDIR network-scripts
%endif
%define auth_modules auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4
%define idmap_modules idmap_ad,idmap_adex,idmap_hash,idmap_ldap,idmap_rfc2307,idmap_rid,idmap_tdb2
%define pdb_modules pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4
%define vfs_modules vfs_cacheprime,vfs_readahead
%if 0%{?ul_version} >= 1
%define VENDOR UL
%else
%if "%{_vendor}" == "suse" || "%{_vendor}" == "redhat"
%define VENDOR SUSE
%else
%define VENDOR %_vendor
%endif
%endif
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1120
%define cups_lib_dir %{_prefix}/lib/cups
%else
%define cups_lib_dir %{_libdir}/cups
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Samba is a suite of programs that allows SMB/CIFS clients to use the
Unix file space, printers, and authentication subsystem.
The package named samba contains all programs that are needed to act as
a server. The binaries expect the configuration file to be found in
/etc/samba/smb.conf
For a more detailed description of Samba, check the samba-doc package
or the Samba.org Web page at http://www.Samba.org/
Please check http://en.openSUSE.org/Samba for general information on
Samba as part of SUSE Linux Enterprise or openSUSE products, links to
binary packages of the most current Samba version, and a bug reporting
how to.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package client
License: GPL-3.0+
Summary: Samba Client Utilities
Group: Productivity/Networking/Samba
Provides: samba-gplv3-client = %{version}
Provides: smbfs
Obsoletes: samba-gplv3-client < %{version}
Provides: samba-client-gplv2 = %{version}
Obsoletes: samba-client-gplv2 < %{version}
%ifarch ppc64
Obsoletes: samba-client-64bit
%endif
%if 0%{?suse_version} > 0
PreReq: %{?fillup_prereq}
PreReq: %{?insserv_prereq}
%endif
PreReq: /sbin/chkconfig
PreReq: /sbin/ldconfig
PreReq: coreutils
Requires: cifs-utils
%description client
Samba is a suite of programs that allows SMB/CIFS clients to use the
Unix file space, printers, and authentication subsystem.
The package named samba-client contains all programs that are needed to
act as a Samba client. The binaries expect the configuration file to
be found in /etc/samba/smb.conf
For a more detailed description of Samba, check the samba-doc package
or the Samba.org Web page at http://www.Samba.org/
Please check http://en.openSUSE.org/Samba for general information on
Samba as part of SUSE Linux Enterprise or openSUSE products, links to
binary packages of the most current Samba version, and a bug reporting
how to.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1020
%package devel
License: GPL-3.0+
Summary: Libraries and Header Files to Develop Programs with Samba Support
Group: Development/Libraries/C and C++
Provides: samba-gplv3-devel = %{version}
Obsoletes: samba-gplv3-devel < %{version}
%ifarch ppc64
Obsoletes: samba-devel-64bit
%endif
%description devel
This package contains the static libraries and header files needed to
develop programs which make use of Samba.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%endif
%if 0%{?suse_version} && 0%{?suse_version} < 1001 || 0%{?suse_version} > 1110
%package doc
License: GPL-3.0+
Summary: Samba Documentation
Group: Documentation/Other
PreReq: coreutils
PreReq: findutils
Provides: samba-gplv3-doc = %{version}
Obsoletes: samba-gplv3-doc < %{version}
Provides: samba-doc-gplv2 = %{version}
Obsoletes: samba-doc-gplv2 < %{version}
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%description doc
This package contains all the Samba documentation as it is not part of
the man pages.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%endif
%if %with_get_printing_ticket
%package krb-printing
License: GPL-3.0+
Summary: Wrapper binary for kerberized printing
Group: Productivity/Networking/Samba
PreReq: coreutils
Provides: samba-gplv3-krb-printing = %{version}
Obsoletes: samba-gplv3-krb-printing < %{version}
%if 0%{?suse_version} > 1000
PreReq: permissions
%endif
Requires: samba-client >= %{version}
%description krb-printing
A wrapper binary to run smbspool with the original calling UID.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%endif
%package libs
License: GPL-3.0+
Summary: Samba libraries
Group: Development/Libraries/C and C++
Requires: krb5
PreReq: /sbin/ldconfig
%description libs
The samba-libs package contains the libraries needed by programs that
link against the SMB, RPC and other protocols provided by the Samba suite.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package pidl
License: GPL-3.0+
Summary: Perl IDL compiler
Group: Development/Tools
%if 0%{?suse_version} > 0
Requires: perl-base
%endif
Requires: perl(Parse::Yapp)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description pidl
The samba-pidl package contains the Perl IDL compiler used by Samba
and Wireshark to parse IDL and similar protocols
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package python
License: GPL-3.0+
Summary: Samba Python libraries
Group: Applications/System
Requires: %{name} = %{version}
Requires: python-tevent
Requires: python-tdb
Requires: pyldb
Requires: pytalloc
%description python
The samba-python package contains the Python libraries needed by programs
that use SMB, RPC and other Samba provided protocols in Python programs.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package test
License: GPL-3.0+
Summary: Testing tools for Samba servers and clients
Group: Applications/System
Requires: samba = %{version}
Requires: samba-winbind = %{version}
PreReq: /sbin/ldconfig
%description test
samba-test provides testing tools for both the server and client
packages of Samba.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package test-devel
License: GPL-3.0+
Summary: Testing devel files for Samba servers and clients
Group: Development/Libraries/C and C++
%description test-devel
samba-test-devel provides testing devel files for both the server and client
packages of Samba.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package winbind
License: GPL-3.0+
Summary: Winbind Daemon and Tool
Group: Productivity/Networking/Samba
Provides: samba-gplv3-winbind = %{version}
Obsoletes: samba-gplv3-winbind < %{version}
Provides: samba-client:/usr/sbin/winbindd
%ifarch ppc64
Obsoletes: samba-winbind-64bit
%endif
Requires: samba-client >= %{version}
%if 0%{?suse_version}
Requires: pam-config
%endif
%if 0%{?suse_version} > 1030
Recommends: cron
Recommends: logrotate
Recommends: samba-krb-printing
Recommends: /usr/sbin/nscd
%endif
%if 0%{?suse_version} > 0
PreReq: %{?insserv_prereq}
%endif
PreReq: /sbin/ldconfig
PreReq: /usr/sbin/groupadd
PreReq: coreutils
%description winbind
This is the winbind-daemon and the wbinfo-tool.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package -n %{libsmbclient_name}
License: GPL-3.0+
%if 0%{?suse_version} > 1030
Provides: libsmbclient = %{version}
Obsoletes: libsmbclient
%endif
%ifarch ppc64
Obsoletes: libsmbclient-64bit
%endif
Summary: Samba Client Library
Group: System/Libraries
PreReq: /sbin/ldconfig
%description -n %{libsmbclient_name}
This package includes the libsmbclient library.
libsmbclient is provided by the libsmbclient0 package.
This entry is required to allow a samba.spec file providing
libsmbclient for SUSE version < 11.0 while versions > 10.0 will have
libsmbclient0.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package -n libsmbclient-devel
License: GPL-3.0+
Summary: Libraries and Header Files to Develop Programs with smbclient Support
Group: Development/Libraries/C and C++
BuildRequires: %{pkgconfig_req}
Requires: krb5-devel
Requires: %{libsmbclient_name} = %{version}
%description -n libsmbclient-devel
This package contains the static libraries and header files needed to
develop programs which make use of the smbclient programming interface.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package -n %{libnetapi_name}
License: GPL-3.0+
Summary: Samba netapi Library
Group: System/Libraries
PreReq: /sbin/ldconfig
%description -n %{libnetapi_name}
This package includes the netapi library.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package -n libnetapi-devel
License: GPL-3.0+
Summary: Libraries and Header Files to Develop Programs with netapi Support
Group: Development/Libraries/C and C++
BuildRequires: %{pkgconfig_req}
Requires: %{libnetapi_name} = %{version}
%description -n libnetapi-devel
This package contains the static libraries and header files needed to
develop programs which make use of the netapi programming interface.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package -n %{libsmbsharemodes_name}
License: GPL-3.0+
%if 0%{?suse_version} > 1030
Provides: libsmbsharemodes = %{version}
Obsoletes: libsmbsharemodes
%endif
Summary: Samba smbsharemodes Library
Group: System/Libraries
PreReq: /sbin/ldconfig
%description -n %{libsmbsharemodes_name}
This package includes the smbsharemodes library.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package -n libsmbsharemodes-devel
License: GPL-3.0+
Summary: Libraries and Header Files to Develop Programs with smbsharemodes Support
Group: Development/Libraries/C and C++
BuildRequires: %{pkgconfig_req}
Requires: %{libsmbsharemodes_name} = %{version}
%description -n libsmbsharemodes-devel
This package contains the static libraries and header files needed to
develop programs which make use of the smbsharemodes programming interface.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package -n %{libwbclient_name}
License: LGPL-3.0+
Summary: Samba libwbclient Library
Group: System/Libraries
PreReq: /sbin/ldconfig
%description -n %{libwbclient_name}
This package includes the wbclient library.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%package -n libwbclient-devel
License: LGPL-3.0+
Summary: Libraries and Header Files to Develop Programs with wbclient Support
Group: Development/Libraries/C and C++
BuildRequires: %{pkgconfig_req}
Requires: %{libwbclient_name} = %{version}
%description -n libwbclient-devel
This package contains the static libraries and header files needed to
develop programs which make use of the wbclient programming interface.
Source Timestamp: %{SOURCE_TIMESTAMP}
Branch: %{BRANCH}
%prep
%setup -n samba-%{samba_ver_full} -q
# patches
%setup -T -D -a 2 -n samba-%{samba_ver_full} -q
for patch in $( patches/tools/guards %{guards_symbols} <patches/series); do
if ! patch -s -E -p0 --no-backup-if-mismatch -i patches/$patch; then
echo "*** Patch $patch failed ***"
exit 1
fi
done
# vendor-files (config, scripts, tools)
%setup -T -D -a 1 -n samba-%{samba_ver_full} -q
for file in docs/htmldocs/index.html vendor-files/docu/README.vendor; do
sed -e "s/VENDOR/%{VENDOR}/g" "${file}" >"${file}.new" && \
mv "${file}.new" "${file}"
done
%if %with_get_printing_ticket
install -m 0644 vendor-files/tools/get_printing_ticket.c source3/client/get_printing_ticket.c
%endif
install -m 0644 -p vendor-files/docu/rfc3454.txt source4/heimdal/lib/wind/
# Create and add vendor suffix
test -f vendor-files/tools/package-data && \
. vendor-files/tools/package-data
if test "%{_project}" != "openSUSE:Factory"; then
vendor_tag_release=$( grep -m 1 ^Release: ${RPM_SOURCE_DIR}/samba.spec | \
while read tag release; do \
echo -n "${release:+${release}-}"; \
done)
else
vendor_tag_release=""
fi
vendor_tag=$( echo -n "${vendor_tag_release}"; \
echo -n "${SAMBA_PACKAGE_SVN_VERSION:+${SAMBA_PACKAGE_SVN_VERSION}-}" )
# Create product suffix
test 0%{?centos_version} -gt 0 && product_version=%{?centos_version}
test 0%{?fedora_version} -gt 0 && product_version=%{?fedora_version}
test 0%{?mandriva_version} -gt 0 && product_version=%{?mandriva_version}
test 0%{?rhel_version} -gt 0 && product_version=%{?rhel_version}
test 0%{?suse_version} -gt 0 && product_version=%{?suse_version}
major_version=$((${product_version}/100))
minor_version=$((${product_version}/10))
minor_version="${minor_version#$major_version}"
product_version="${major_version}.${minor_version}"
product_suffix=""
if test "%{VENDOR}" != "UL"; then
if test 0%{?sles_version} -gt 0; then
product_suffix="-SLE_%{sles_version}"
elif test 0%{?suse_version} -gt 0; then
product_suffix="-oS${product_version}"
else
product_suffix="-OBS"
fi
fi
# Add the build architecture
test "%{_build_arch}" != "" && \
product_suffix="${product_suffix}-%{_build_arch}"
# Set SAMBA_VERSION_VENDOR_SUFFIX in the VERSION file
mv VERSION VERSION.orig
sed -e "s/^SAMBA_VERSION_VENDOR_SUFFIX=$/SAMBA_VERSION_VENDOR_SUFFIX=${vendor_tag}%{VENDOR}${product_suffix}/" VERSION.orig >VERSION
%build
%if 0%{?suse_version} && 0%{?suse_version} < 911
OPTIMIZATION="-O"
%else
# use the default optimization
unset OPTIMIZATION
%endif
%if 0%{?suse_version} > 1110
export SUSE_ASNEEDED=0
%endif
export CFLAGS="%{optflags} -D_GNU_SOURCE ${OPTIMIZATION} -D_LARGEFILE64_SOURCE -DIDMAP_RID_SUPPORT_TRUSTED_DOMAINS"
%if 0%{?suse_version} && 0%{?suse_version} < 1141
%{?suse_update_config:%{suse_update_config -f}}
%endif
CONFIGURE_OPTIONS="\
--prefix=%{_prefix} \
--localstatedir=%{_localstatedir} \
--sysconfdir=%{CONFIGDIR} \
--with-configdir=%{CONFIGDIR} \
--libdir=%{_libdir} \
--with-lockdir=%{LOCKDIR} \
--with-logfilebase=%{LOGDIR} \
--mandir=%{_mandir} \
--with-modulesdir=%{_libdir}/samba \
--enable-cups \
--enable-debug \
--enable-fhs \
--with-acl-support \
--with-automount \
--with-ads \
--with-dnsupdate \
--with-pam \
--with-pammodulesdir=%{_lib}/security \
--with-pam_smbpass \
--with-piddir=%{PIDDIR} \
--with-privatedir=%{CONFIGDIR} \
--with-quotas \
--with-syslog \
--with-utmp \
--with-winbind \
--with-shared-modules=%{auth_modules},%{vfs_modules},%{pdb_modules},%{idmap_modules} \
%if %with_mitkrb5
--with-system-mitkrb5 \
%endif
%if ! %with_dc
--without-ad-dc \
%endif
--bundled-libraries=!heimdal,!popt,!zlib,\
!ldb,!pyldb,\
!talloc,!pytalloc,!pytalloc-util,\
!tdb,!pytdb,\
!tevent,!pytevent \
"
./configure ${CONFIGURE_OPTIONS}
make %{build_make_smp_mflags} \
all
pushd pidl
%{__perl} Makefile.PL INSTALLDIRS=vendor
popd
%install
install -d -m 0755 -p \
%{buildroot}/%{_sysconfdir}/{pam.d,xinetd.d,logrotate.d} \
%{buildroot}/%{_sysconfdir}/openldap/schema \
%{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/{if-{down,up}.d,scripts} \
%if 0%{?suse_version} && 0%{?suse_version} > 1020
%{buildroot}/%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services \
%endif
%{buildroot}/%{_sysconfdir}/permissions.d \
%{buildroot}/%{_sysconfdir}/security \
%{buildroot}/%{_sysconfdir}/slp.reg.d \
%{buildroot}/%{CONFIGDIR} \
%{buildroot}/%{INITDIR} \
%{buildroot}/%{_lib}/security \
%{buildroot}/sbin \
%{buildroot}/%{_includedir} \
%{buildroot}/%{_libdir}/pkgconfig \
%{buildroot}/%{_libdir}/python/lib-dynload \
%{buildroot}/%{_libdir}/samba/{config,vfs,rpc,auth,charset,idmap} \
%{buildroot}/%{_datadir}/omc/svcinfo.d \
%{buildroot}/%{_datadir}/samba/{LDAP,templates} \
%{buildroot}/%{_localstatedir}/adm \
%{buildroot}/%{LOCKDIR}/{netlogon,drivers/{WIN40,W32X86,W32MIPS,W32ALPHA,W32PPC,IA64,x64},printing,profiles,winbindd_privileged} \
%{buildroot}/%{LOGDIR} \
%{buildroot}/%{PIDDIR} \
%{buildroot}/%{_var}/adm/fillup-templates \
%{buildroot}/%{_var}/run \
%{buildroot}/%{DOCDIR} \
%{buildroot}/%{DOCBOOKDIR} \
%{buildroot}/%{_datadir}/susehelp/meta/Administration/System
make install \
DESTDIR=%{buildroot} \
CONFIGDIR=%{CONFIGDIR}
# remove ildap.so and ldbsamba_extensions.so from %{_libdir}/samba/ldb
%if ! %with_dc
rm -r %{buildroot}/%{_libdir}/samba/ldb
%endif
# Remove PIDL files from datadir
rm -r %{buildroot}/%{_datadir}/perl5
# And install it into the perl vendor dirs
pushd pidl
make install PERL_INSTALL_ROOT=%{buildroot}
popd
# Clean out files left behind by the PIDL install.
find %{buildroot}/%{perl_vendorlib} -type f -name .packlist -exec rm -f {} \;
rm %{buildroot}/%{perl_vendorlib}/wscript_build
rm -r %{buildroot}/%{perl_vendorlib}/Parse/Yapp
# utility scripts
scripts="creategroup mksmbpasswd.sh"
install -d -m 0755 examples/scripts
for i in $scripts; do
install -m 0755 "source3/script/${i}" examples/scripts/${i}
done
# configuration files
pushd vendor-files
echo "# smb.conf is the main Samba configuration file. You find a full commented" >config/smb.conf
echo "# version at %{DOCDIR}/examples/smb.conf.%{VENDOR} if the" >>config/smb.conf
echo "# samba-doc package is installed." >>config/smb.conf
grep -v "\(^#\|^;\|^$\)" config/smb.conf.vendor >>config/smb.conf
install -p -m 0644 config/smb.conf.vendor ../examples/smb.conf.%{VENDOR}
for file in smb.conf lmhosts smbusers smbpasswd smbusers; do
install -m 0644 "config/${file}" %{buildroot}/%{CONFIGDIR}/${file}
done
%if 0%{?suse_version} && 0%{?suse_version} < 1221
install -m 0644 -p config/cifstab %{buildroot}/%{CONFIGDIR}/%{cifs_init_script}tab
%endif
section_names=$( sed -ne 's/^\[\(.*\)\]$/\1/p' config/smb.conf)
for section in $section_names; do
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1211
LD_LIBRARY_PATH=../source3/bin/ \
%endif
../source3/bin/testparm -s --section-name "${section}" config/smb.conf >"%{buildroot}/%{_datadir}/samba/templates/default-${section}" || :
done
for file in config/templates/*; do
cp -a "${file}" "%{buildroot}/%{_datadir}/samba/templates/"
done
# start scripts
scriptSuffix=""
%if 0%{?suse_version}
if test 0%{?suse_version} -lt 901; then
scriptSuffix="-900"
elif test 0%{?suse_version} -lt 1011; then
scriptSuffix="-1010"
elif test 0%{?suse_version} -lt 1111; then
scriptSuffix="-1110"
elif test 0%{?suse_version} -lt 1131; then
scriptSuffix="-1130"
fi
%endif
startScripts="smb nmb winbind"
%if 0%{?suse_version} && 0%{?suse_version} < 1221
startScripts="${startScripts} %{cifs_init_script}"
%endif
for script in ${startScripts}; do
install -m 0755 "init/${script}${scriptSuffix}" \
"%{buildroot}/%{INITDIR}/${script}"
ln -s "%{INITDIR}/${script}" "%{buildroot}/%{_sbindir}/rc${script}"
done
for script in ${startScripts}; do
SERVICE_NAME=$( echo "${script}" | tr [:lower:] [:upper:])
sed \
-e "s#__SERVICE_NAME#${SERVICE_NAME}#g" \
-e "s#__SERVICE_SCRIPT_NAME#${script}#g" \
init/template.xml \
>"%{buildroot}/%{_datadir}/omc/svcinfo.d/${script}.xml"
done
install -m 0755 tools/nmbstatus %{buildroot}/%{_bindir}/nmbstatus
pod2man tools/nmbstatus >%{buildroot}/%{_mandir}/man1/nmbstatus.1
install -m 0755 tools/update-apparmor-samba-profile \
%{buildroot}/%{_datadir}/samba/
# PDF generator
install -p -m 0755 tools/smbprngenpdf %{buildroot}/%{_bindir}/smbprngenpdf
install -m 0644 config/samba.reg %{buildroot}/%{_sysconfdir}/slp.reg.d/samba.reg
install -m 0644 config/samba.pamd-common %{buildroot}/%{_sysconfdir}/pam.d/samba
install -m 0644 config/dhcp.conf %{buildroot}/%{_var}/adm/fillup-templates/samba-client-dhcp.conf
install -m 0644 config/sysconfig.dhcp-samba-client %{buildroot}/%{_var}/adm/fillup-templates/sysconfig.dhcp-samba-client
for script in dhcpcd-hook-samba dhcpcd-hook-samba-functions samba-winbindd; do
install -m 0755 "tools/${script}" "%{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/${script}"
done
%if 0%{?suse_version} && 0%{?suse_version} < 1221
touch %{buildroot}/var/run/%{cifs_init_script}
%if 0%{?suse_version} < 1121
sed -e 's/cifs/smbfs/g' tools/cifs >%{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script}
touch --reference=tools/cifs %{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script}
%else
install -m 0755 -p tools/cifs %{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script}
%endif
%endif
# Create ghosts for the symlinks
for script in 21-dhcpcd-hook-samba 55-samba-winbindd; do
touch %{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/${script}
done
%if 0%{?suse_version} && 0%{?suse_version} < 1221
touch %{buildroot}/%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-{down,up}.d/21-%{cifs_init_script}
%endif
# Install SuSEfirewall2 config files
%if 0%{?suse_version} && 0%{?suse_version} > 1020
install -m 0644 config/sysconfig.firewall.netbios-server \
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/netbios-server
install -m 0644 config/sysconfig.firewall.samba-server \
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/samba-server
%endif
%if 0%{?suse_version} && 0%{?suse_version} > 1100
install -m 0644 config/sysconfig.firewall.samba-client \
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/samba-client
%endif
# Add logrotate settings for nmbd and smbd only on systems newer than 8.1.
%if 0%{?suse_version} && 0%{?suse_version} < 811
LOGROTATE_FILES="samba-winbind"
rm -f "${RPM_BUILD_DIR}/samba-%{samba_ver_full}/filelist-samba"
touch "${RPM_BUILD_DIR}/samba-%{samba_ver_full}/filelist-samba"
%else
LOGROTATE_FILES="samba samba-winbind"
%endif
for file in ${LOGROTATE_FILES}; do
install -m 0644 logrotate/${file} %{buildroot}/%{_sysconfdir}/logrotate.d/${file}
rm -f "${RPM_BUILD_DIR}/samba-%{samba_ver_full}/filelist-${file}"
touch "${RPM_BUILD_DIR}/samba-%{samba_ver_full}/filelist-${file}"
echo "%config(noreplace) %{_sysconfdir}/logrotate.d/${file}" >>${RPM_BUILD_DIR}/samba-%{samba_ver_full}/filelist-${file}
done
install -m 0644 docu/README.vendor %{buildroot}/%{DOCDIR}/README.%{VENDOR}
# SuSEhelp files
install -m 0644 docu/Samba.desktop %{buildroot}/%{_datadir}/susehelp/meta/Administration/System/Samba.desktop
install -d -m 0755 -p ../docs/htmldocs
install -m 0644 docu/manpages.html ../docs/htmldocs/manpages.html
popd
# winbind stuff
install -m 0644 examples/pam_winbind/pam_winbind.conf %{buildroot}/%{_sysconfdir}/security/pam_winbind.conf
# install nsswitch-headers (for squid, etc. #FIXME)
install -d -m 0755 \
%{buildroot}/%{_includedir}/samba/nsswitch \
%{buildroot}/%{_includedir}/samba/winbindd
for file in winbind_client.h winbind_nss_config.h winbind_nss_linux.h; do
install -m 0644 "nsswitch/${file}" %{buildroot}/%{_includedir}/samba/nsswitch/${file}
done
for file in winbindd.h winbindd_proto.h; do
install -m 0644 "source3/winbindd/${file}" %{buildroot}/%{_includedir}/samba/winbindd/${file}
done
# cups SMB support
mkdir -p %{buildroot}/%{cups_lib_dir}/backend/
touch %{buildroot}/%{cups_lib_dir}/backend/smb
# pam_smbpass is missing
cp -a source3/pam_smbpass/samples examples/pam_smbpass
install -m 0644 source3/pam_smbpass/CHANGELOG examples/pam_smbpass/CHANGELOG
install -m 0644 source3/pam_smbpass/INSTALL examples/pam_smbpass/INSTALL
install -m 0644 source3/pam_smbpass/README examples/pam_smbpass/README
install -m 0644 source3/pam_smbpass/TODO examples/pam_smbpass/TODO
mv COPYING README Roadmap WHATSNEW.txt %{buildroot}/%{DOCDIR}/
# this is empty
rm -rf docs/yodldocs
rm -rf docs/manpages
cp -a docs/* %{buildroot}/%{DOCDIR}
rm -rf "%{buildroot}/%{DOCBOOKDIR}"
rm -f examples/VFS/*~
cp -a examples/ %{buildroot}/%{DOCDIR}
# finally build filelist-samba-doc
for file in $( find %{buildroot}%{DOCDIR} -maxdepth 1); do
# exclude %{DOCDIR}, README, and docbook
case "${file#%{buildroot}}" in
%{DOCDIR}|%{DOCDIR}/README.%{VENDOR}|%{DOCDIR}/docbook) continue ;;
esac
echo "%doc ${file#%{buildroot}}" >>"${RPM_BUILD_DIR}/samba-%{samba_ver_full}/filelist-samba-doc"
done
for file in $( find %{buildroot}%{_libdir}/samba/vfs/ -mindepth 1 ); do
echo "${file#%{buildroot}}" >>${RPM_BUILD_DIR}/samba-%{samba_ver_full}/filelist-samba
done
# copy the schema
install -m 0644 examples/LDAP/samba.schema %{buildroot}/%{_sysconfdir}/openldap/schema/samba3.schema
install -m 0644 examples/LDAP/samba-nds.schema %{buildroot}/%{_datadir}/samba/LDAP/samba-nds.schema
# Clean up installed doc if we have a noarch doc package
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1000 && 0%{?suse_version} < 1120
while read file; do
rm -r "%{buildroot}/${file#%* }"
done <"${RPM_BUILD_DIR}/samba-%{samba_ver_full}/filelist-samba-doc"
for file in %{_datadir}/susehelp; do
rm -r "%{buildroot}/${file}"
done
pushd "%{buildroot}/%{DOCDIR}"
for file in $( find . -mindepth 1 -maxdepth 1);do
test "${file}" = "./README.%{VENDOR}" && continue
rm -r "${file}"
done
popd
%endif
# Hardlink duplicate files
%if 0%{?suse_version} > 1110
%fdupes %{buildroot}
%endif
%pre
getent group ntadmin >/dev/null || groupadd -g 71 -o -r ntadmin || :
%preun
%{?stop_on_removal:%{stop_on_removal smb nmb}}
%postun
%{?restart_on_update:%{restart_on_update nmb smb}}
%{?insserv_cleanup:%{insserv_cleanup}}
%pre client
%if 0%{?suse_version} && 0%{?suse_version} < 1221
# non SUSE + 11.3 an newer, update, no cifstab, but smbfstab
if [ ! 0%{?suse_version} -lt 1121 -a \
${1:-0} -gt 1 -a \
! -e /etc/samba/cifstab -a \
-f /etc/samba/smbfstab ]; then
cp -a /etc/samba/smbfstab /var/adm/backup/etc_samba_smbfstab-move
chkconfig -c smbfs && >/var/adm/backup/etc_samba_smbfs-enabled || :
fi
%endif
%preun client
%{?stop_on_removal:%{stop_on_removal %cifs_init_script}}
%post client
/sbin/ldconfig
if [ ${1:-0} -eq 1 ]; then
# Only insserv cifs if we're not in update mode.
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1131
%{?insserv_force_if_yast:%{insserv_force_if_yast %{cifs_init_script}}}
%endif
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/dhcpcd-hook-samba %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-down.d/21-dhcpcd-hook-samba
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/dhcpcd-hook-samba %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-up.d/21-dhcpcd-hook-samba
%if 0%{?suse_version} && 0%{?suse_version} < 1221
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script} %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-down.d/21-%{cifs_init_script}
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script} %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-up.d/21-%{cifs_init_script}
%endif
else
for if_case in if-down.d if-up.d; do
test -h %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/dhcpcd-hook-samba || \
continue
rm -f %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/dhcpcd-hook-samba
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/dhcpcd-hook-samba %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/21-dhcpcd-hook-samba
%if 0%{?suse_version} && 0%{?suse_version} < 1221
test -h %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/%{cifs_init_script} || \
continue
rm -f %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/%{cifs_init_script}
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script} %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/21-%{cifs_init_script}
%endif
done
fi
%if 0%{?suse_version} && 0%{?suse_version} < 1221
if [ ${1:-0} -gt 1 -a -f /var/adm/backup/etc_samba_smbfstab-move ]; then
test -f /etc/samba/cifstab && \
mv /etc/samba/cifstab /etc/samba/cifstab.rpmnew
mv /var/adm/backup/etc_samba_smbfstab-move /etc/samba/cifstab
if [ -f /var/adm/backup/etc_samba_smbfs-enabled ]; then
chkconfig -a cifs >/dev/null
rm /var/adm/backup/etc_samba_smbfs-enabled
fi
fi
%endif
%if %with_get_printing_ticket
if ! test -e %{_bindir}/get_printing_ticket; then
ln -fs %{_bindir}/smbspool %{cups_lib_dir}/backend/smb
fi
%endif
%{?fillup_only:%{fillup_only -nsd dhcp samba-client network}}
%postun client
/sbin/ldconfig
%{?insserv_cleanup:%{insserv_cleanup}}
%post -n %{libnetapi_name} -p /sbin/ldconfig
%postun -n %{libnetapi_name} -p /sbin/ldconfig
%post -n %{libwbclient_name} -p /sbin/ldconfig
%postun -n %{libwbclient_name} -p /sbin/ldconfig
%if %with_get_printing_ticket
%post krb-printing
if test ${1:-0} -eq 1 -a -d %{cups_lib_dir}/backend; then
ln -fs %{_bindir}/get_printing_ticket %{cups_lib_dir}/backend/smb
fi
%if 0%{?suse_version} > 0
%if 0%{?suse_version} < 1131
%{run_permissions}
%else
%{set_permissions} %{_bindir}/get_printing_ticket
%endif
%endif
%postun krb-printing
if test ${1:-0} -eq 0 -a -e %{_bindir}/smbspool -a -d %{cups_lib_dir}/backend; then
ln -fs %{_bindir}/smbspool %{cups_lib_dir}/backend/smb
fi
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1000
%verifyscript krb-printing
%verify_permissions -e %{_bindir}/get_printing_ticket
%endif
%endif
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%post pidl -p /sbin/ldconfig
%postun pidl -p /sbin/ldconfig
%post test -p /sbin/ldconfig
%postun test -p /sbin/ldconfig
%pre winbind
# we need this group for squid (ntlmauth)
# read access to /var/lib/samba/winbindd_privileged
getent group winbind >/dev/null || groupadd -r winbind || :
%post winbind
/sbin/ldconfig
if test ${1:-0} -eq 1; then
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/samba-winbindd %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-down.d/55-samba-winbindd
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/samba-winbindd %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-up.d/55-samba-winbindd
else
for if_case in if-down.d if-up.d; do
test -h %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/samba-winbindd || \
continue
rm -f %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/samba-winbindd
ln -fs %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/samba-winbindd %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/${if_case}/55-samba-winbindd
done
fi
%preun winbind
%{?stop_on_removal:%{stop_on_removal winbind}}
%postun winbind
/sbin/ldconfig
%if 0%{?suse_version}
if [ $1 -eq 0 ]; then
%{_sbindir}/pam-config --delete --winbind
if [ -x %{_sbindir}/nscd ]; then
%{_sbindir}/nscd -i passwd
%{_sbindir}/nscd -i group
fi
fi
%endif
%{?restart_on_update:%{restart_on_update winbind}}
%{?insserv_cleanup:%{insserv_cleanup}}
%post -n %{libsmbclient_name} -p /sbin/ldconfig
%postun -n %{libsmbclient_name} -p /sbin/ldconfig
%post -n %{libsmbsharemodes_name} -p /sbin/ldconfig
%postun -n %{libsmbsharemodes_name} -p /sbin/ldconfig
%clean
[ x"%{buildroot}" = x"/" ] && ( echo "your buildroot is /" && exit 0) || rm -rf "%{buildroot}"
if [ -e ${RPM_SOURCE_DIR}/baselibs.conf -a 0%{?suse_version} -gt 0 -a 0%{?suse_version} -lt 1110 ]; then
sed -i -e 's, supplements .*,,' ${RPM_SOURCE_DIR}/baselibs.conf
fi
%files -f filelist-samba
%defattr(-,root,root)
%attr(0754,root,root) %config %{INITDIR}/nmb
%attr(0754,root,root) %config %{INITDIR}/smb
%if 0%{?suse_version} && 0%{?suse_version} < 1111
%attr(0600,root,root) %config(noreplace) %{CONFIGDIR}/smbpasswd
%else
%ghost %{CONFIGDIR}/smbpasswd
%endif
%config(noreplace) %{CONFIGDIR}/smbusers
%config %{_sysconfdir}/pam.d/samba
%{_sysconfdir}/slp.reg.d
%if 0%{?suse_version} && 0%{?suse_version} > 1020
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/netbios-server
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/samba-server
%endif
/%{_lib}/security/pam_smbpass.so
%dir %{_libdir}/samba
%dir %{_libdir}/samba/vfs
%{_libdir}/samba/auth
%{_libdir}/samba/config
%{_libdir}/samba/rpc
%attr(0775,root,ntadmin) %{LOCKDIR}/drivers
%{LOCKDIR}/netlogon
%attr(0770,root,users) %dir %{LOCKDIR}/profiles
%{_bindir}/smbstatus
%{_sbindir}/nmbd
%{_sbindir}/rcnmb
%{_sbindir}/rcsmb
%{_sbindir}/smbd
%{_bindir}/smbta-util
%if 0%{?suse_version} && 0%{?suse_version} < 1100
%dir %{_datadir}/omc
%dir %{_datadir}/omc/svcinfo.d
%endif
%attr(0644,root,root) %{_datadir}/omc/svcinfo.d/nmb.xml
%attr(0644,root,root) %{_datadir}/omc/svcinfo.d/smb.xml
%dir %{_datadir}/samba
%{_datadir}/samba/update-apparmor-samba-profile
%doc %{_mandir}/man1/smbstatus.1.*
%doc %{_mandir}/man5/smbpasswd.5.*
%doc %{_mandir}/man8/nmbd.8.*
%doc %{_mandir}/man8/smbd.8.*
%doc %{_mandir}/man8/smbta-util.8.*
%doc %{_mandir}/man8/vfs_acl_tdb.8.*
%doc %{_mandir}/man8/vfs_acl_xattr.8.*
%doc %{_mandir}/man8/vfs_aio_fork.8.*
%doc %{_mandir}/man8/vfs_aio_linux.8.*
%doc %{_mandir}/man8/vfs_aio_pthread.8.*
%doc %{_mandir}/man8/vfs_audit.8.*
%doc %{_mandir}/man8/vfs_btrfs.8.*
%doc %{_mandir}/man8/vfs_cacheprime.8.*
%doc %{_mandir}/man8/vfs_cap.8.*
%doc %{_mandir}/man8/vfs_catia.8.*
%doc %{_mandir}/man8/vfs_commit.8.*
%doc %{_mandir}/man8/vfs_crossrename.8.*
%doc %{_mandir}/man8/vfs_default_quota.8.*
%doc %{_mandir}/man8/vfs_dirsort.8.*
%doc %{_mandir}/man8/vfs_extd_audit.8.*
%doc %{_mandir}/man8/vfs_fake_perms.8.*
%doc %{_mandir}/man8/vfs_fileid.8.*
%doc %{_mandir}/man8/vfs_full_audit.8.*
%doc %{_mandir}/man8/vfs_gpfs.8.*
%doc %{_mandir}/man8/vfs_linux_xfs_sgid.8.*
%doc %{_mandir}/man8/vfs_media_harmony.8.*
%doc %{_mandir}/man8/vfs_netatalk.8.*
%doc %{_mandir}/man8/vfs_notify_fam.8.*
%doc %{_mandir}/man8/vfs_prealloc.8.*
%doc %{_mandir}/man8/vfs_preopen.8.*
%doc %{_mandir}/man8/vfs_readahead.8.*
%doc %{_mandir}/man8/vfs_readonly.8.*
%doc %{_mandir}/man8/vfs_recycle.8.*
%doc %{_mandir}/man8/vfs_scannedonly.8.*
%doc %{_mandir}/man8/vfs_shadow_copy.8.*
%doc %{_mandir}/man8/vfs_shadow_copy2.8.*
%doc %{_mandir}/man8/vfs_smb_traffic_analyzer.8.*
%doc %{_mandir}/man8/vfs_streams_depot.8.*
%doc %{_mandir}/man8/vfs_streams_xattr.8.*
%doc %{_mandir}/man8/vfs_syncops.8.*
%doc %{_mandir}/man8/vfs_time_audit.8.*
%doc %{_mandir}/man8/vfs_tsmsm.8.*
%doc %{_mandir}/man8/vfs_xattr_tdb.8.*
%if 0%{?suse_version} && 0%{?suse_version} < 1021
%{_includedir}/samba
%endif
%exclude %{_mandir}/man8/samba-tool.8.*
%exclude %{_mandir}/man8/samba.8.*
%files client
%defattr(-,root,root)
%if 0%{?suse_version} && 0%{?suse_version} < 1221
%attr(0754,root,root) %config %{INITDIR}/%{cifs_init_script}
%attr(0600,root,root) %config(noreplace) %{CONFIGDIR}/%{cifs_init_script}tab
%ghost %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-down.d/21-%{cifs_init_script}
%ghost %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-up.d/21-%{cifs_init_script}
%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/%{cifs_init_script}
%{_sbindir}/rc%{cifs_init_script}
%if 0%{?suse_version} && 0%{?suse_version} < 1100
%dir %{_datadir}/omc
%dir %{_datadir}/omc/svcinfo.d
%endif
%attr(0644,root,root) %{_datadir}/omc/svcinfo.d/%{cifs_init_script}.xml
%ghost %{_localstatedir}/run/%{cifs_init_script}
%endif
%dir %{CONFIGDIR}
%config(noreplace) %{CONFIGDIR}/lmhosts
%config(noreplace) %{CONFIGDIR}/smb.conf
%dir %{_sysconfdir}/openldap
%dir %{_sysconfdir}/openldap/schema
%attr(0444,root,root) %config %{_sysconfdir}/openldap/schema/samba3.schema
%ghost %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-down.d/21-dhcpcd-hook-samba
%ghost %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-up.d/21-dhcpcd-hook-samba
%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/dhcpcd-hook-samba
%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/dhcpcd-hook-samba-functions
%if 0%{?suse_version} && 0%{?suse_version} > 1100
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/samba-client
%endif
%{_bindir}/cifsdd
%{_bindir}/dbwrap_tool
%{_bindir}/eventlogadm
%{_bindir}/net
%{_bindir}/nmblookup
%{_bindir}/nmblookup4
%{_bindir}/oLschema2ldif
%{_bindir}/regdiff
%{_bindir}/samba-regedit
%{_bindir}/regpatch
%{_bindir}/regshell
%{_bindir}/regtree
%{_bindir}/nmbstatus
%{_bindir}/ntdbbackup
%{_bindir}/ntdbdump
%{_bindir}/ntdbrestore
%{_bindir}/ntdbtool
%{_bindir}/pdbedit
%{_bindir}/profiles
%{_bindir}/rpcclient
%{_bindir}/sharesec
%{_bindir}/smbcacls
%{_bindir}/smbclient
%{_bindir}/smbclient4
%{_bindir}/smbcontrol
%{_bindir}/smbcquotas
%{_bindir}/smbget
%{_bindir}/smbpasswd
%{_bindir}/smbprngenpdf
%{_bindir}/smbspool
%{_bindir}/smbtar
%{_bindir}/smbtree
%{_bindir}/testparm
%dir %{cups_lib_dir}
%dir %{cups_lib_dir}/backend
%ghost %{cups_lib_dir}/backend/smb
%{_libdir}/libnss_wins.so.*
%dir %{_libdir}/samba
%{_libdir}/samba/charset
%doc %{_mandir}/man1/dbwrap_tool.1.*
%doc %{_mandir}/man1/findsmb.1.*
%doc %{_mandir}/man1/log2pcap.1.*
%doc %{_mandir}/man1/nmblookup.1.*
%doc %{_mandir}/man1/nmblookup4.1.*
%doc %{_mandir}/man1/nmbstatus.1.*
%doc %{_mandir}/man1/oLschema2ldif.1.*
%doc %{_mandir}/man1/profiles.1.*
%doc %{_mandir}/man1/regdiff.1.*
%doc %{_mandir}/man1/regpatch.1.*
%doc %{_mandir}/man1/regshell.1.*
%doc %{_mandir}/man1/regtree.1.*
%doc %{_mandir}/man1/rpcclient.1.*
%doc %{_mandir}/man1/sharesec.1.*
%doc %{_mandir}/man1/smbcacls.1.*
%doc %{_mandir}/man1/smbcontrol.1.*
%doc %{_mandir}/man1/smbclient.1.*
%doc %{_mandir}/man1/smbcquotas.1.*
%doc %{_mandir}/man1/smbget.1.*
%doc %{_mandir}/man1/smbtar.1.*
%doc %{_mandir}/man1/smbtree.1.*
%doc %{_mandir}/man1/testparm.1.*
%doc %{_mandir}/man3/ntdb.3.*
%doc %{_mandir}/man5/lmhosts.5.*
%doc %{_mandir}/man5/smb.conf.5.*
%doc %{_mandir}/man5/smbgetrc.5.*
%doc %{_mandir}/man7/samba.7.*
%doc %{_mandir}/man8/eventlogadm.8.*
%doc %{_mandir}/man8/net.8.*
%doc %{_mandir}/man8/ntdbbackup.8.*
%doc %{_mandir}/man8/ntdbdump.8.*
%doc %{_mandir}/man8/ntdbrestore.8.*
%doc %{_mandir}/man8/ntdbtool.8.*
%doc %{_mandir}/man8/pdbedit.8.*
%doc %{_mandir}/man8/samba-regedit.8.*
%doc %{_mandir}/man8/smbpasswd.8.*
%doc %{_mandir}/man8/smbspool.8.*
%{_datadir}/samba/codepages
%dir %{_datadir}/samba
%dir %{_datadir}/samba/LDAP
%config %{_datadir}/samba/LDAP/samba-nds.schema
%{_datadir}/samba/templates
%dir %{DOCDIR}
%doc %{DOCDIR}/README.%{VENDOR}
%{_localstatedir}/adm/fillup-templates/samba-client-dhcp.conf
%{_localstatedir}/adm/fillup-templates/sysconfig.dhcp-samba-client
%dir %{LOCKDIR}
%attr(0750,root,root) %dir %{LOGDIR}
%ghost %dir %{PIDDIR}
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1020
%files devel
%defattr(-,root,root)
%{_includedir}/samba
%{_includedir}/samba-4.0
%exclude %{_includedir}/samba-4.0/libsmbclient.h
%exclude %{_includedir}/samba-4.0/netapi.h
%exclude %{_includedir}/samba-4.0/smb_share_modes.h
%exclude %{_includedir}/samba-4.0/torture.h
%exclude %{_includedir}/samba-4.0/wbclient.h
%{_libdir}/libdcerpc-atsvc.so
%{_libdir}/libdcerpc-binding.so
%{_libdir}/libdcerpc-samr.so
%{_libdir}/libdcerpc.so
%{_libdir}/libgensec.so
%{_libdir}/libndr-krb5pac.so
%{_libdir}/libndr-nbt.so
%{_libdir}/libndr-standard.so
%{_libdir}/libndr.so
%{_libdir}/libnss_winbind.so
%{_libdir}/libnss_wins.so
%{_libdir}/libpdb.so
%{_libdir}/libregistry.so
%{_libdir}/libsamba-credentials.so
%{_libdir}/libsamba-hostconfig.so
%{_libdir}/libsamba-policy.so
%{_libdir}/libsamba-util.so
%{_libdir}/libsamdb.so
%{_libdir}/libsmbclient-raw.so
%{_libdir}/libsmbconf.so
%{_libdir}/libsmbldap.so
%{_libdir}/libtevent-util.so
%{_libdir}/pkgconfig/dcerpc.pc
%{_libdir}/pkgconfig/dcerpc_atsvc.pc
%{_libdir}/pkgconfig/dcerpc_samr.pc
%{_libdir}/pkgconfig/gensec.pc
%{_libdir}/pkgconfig/ndr.pc
%{_libdir}/pkgconfig/ndr_krb5pac.pc
%{_libdir}/pkgconfig/ndr_nbt.pc
%{_libdir}/pkgconfig/ndr_standard.pc
%{_libdir}/pkgconfig/registry.pc
%{_libdir}/pkgconfig/samba-credentials.pc
%{_libdir}/pkgconfig/samba-hostconfig.pc
%{_libdir}/pkgconfig/samba-policy.pc
%{_libdir}/pkgconfig/samba-util.pc
%{_libdir}/pkgconfig/samdb.pc
%{_libdir}/pkgconfig/smbclient-raw.pc
%endif
%files libs
%defattr(-,root,root,-)
%{_libdir}/libdcerpc-atsvc.so.*
%{_libdir}/libdcerpc-binding.so.*
%{_libdir}/libdcerpc-samr.so.*
%{_libdir}/libdcerpc.so.*
%{_libdir}/libgensec.so.*
%{_libdir}/libndr-krb5pac.so.*
%{_libdir}/libndr-nbt.so.*
%{_libdir}/libndr-standard.so.*
%{_libdir}/libndr.so.*
%{_libdir}/libpdb.so.*
%{_libdir}/libregistry.so.*
%{_libdir}/libsamba-credentials.so.*
%{_libdir}/libsamba-hostconfig.so.*
%{_libdir}/libsamba-policy.so.*
%{_libdir}/libsamba-util.so.*
%{_libdir}/libsamdb.so.*
%{_libdir}/libsmbclient-raw.so.*
%{_libdir}/libsmbconf.so.*
%{_libdir}/libsmbldap.so.*
%{_libdir}/libtevent-util.so.*
%dir %{_libdir}/samba
%{_libdir}/samba/libntdb.so.*
%{_libdir}/samba/libCHARSET3.so
%{_libdir}/samba/libLIBWBCLIENT_OLD.so
%{_libdir}/samba/libMESSAGING.so
%{_libdir}/samba/libaddns.so
%{_libdir}/samba/libads.so
%{_libdir}/samba/libasn1util.so
%{_libdir}/samba/libauth.so
%{_libdir}/samba/libauth4.so
%{_libdir}/samba/libauth_sam_reply.so
%{_libdir}/samba/libauth_unix_token.so
%{_libdir}/samba/libauthkrb5.so
%{_libdir}/samba/libccan.so
%{_libdir}/samba/libcli-ldap-common.so
%{_libdir}/samba/libcli-ldap.so
%{_libdir}/samba/libcli-nbt.so
%{_libdir}/samba/libcli_cldap.so
%{_libdir}/samba/libcli_smb_common.so
%{_libdir}/samba/libcli_spoolss.so
%{_libdir}/samba/libcliauth.so
%{_libdir}/samba/libcluster.so
%{_libdir}/samba/libcmdline-credentials.so
%{_libdir}/samba/libdbwrap.so
%{_libdir}/samba/libdcerpc-samba.so
%{_libdir}/samba/libdcerpc-samba4.so
%{_libdir}/samba/libdfs_server_ad.so
%{_libdir}/samba/libdsdb-module.so
%{_libdir}/samba/liberrors.so
%{_libdir}/samba/libevents.so
%{_libdir}/samba/libflag_mapping.so
%{_libdir}/samba/libgpo.so
%{_libdir}/samba/libgse.so
%{_libdir}/samba/libidmap.so
%{_libdir}/samba/libinterfaces.so
%{_libdir}/samba/libkrb5samba.so
%{_libdir}/samba/libldb-cmdline.so
%{_libdir}/samba/libldbsamba.so
%{_libdir}/samba/liblibcli_lsa3.so
%{_libdir}/samba/liblibcli_netlogon3.so
%{_libdir}/samba/liblibsmb.so
%{_libdir}/samba/libmsrpc3.so
%{_libdir}/samba/libndr-samba.so
%{_libdir}/samba/libndr-samba4.so
%{_libdir}/samba/libnet_keytab.so
%{_libdir}/samba/libnetif.so
%{_libdir}/samba/libnon_posix_acls.so
%{_libdir}/samba/libnpa_tstream.so
%{_libdir}/samba/libnss_info.so
%{_libdir}/samba/libutil_ntdb.so
%{_libdir}/samba/libpopt_samba3.so
%{_libdir}/samba/libprinting_migrate.so
%{_libdir}/samba/libreplace.so
%{_libdir}/samba/libsamba-modules.so
%{_libdir}/samba/libsamba-net.so
%{_libdir}/samba/libsamba-security.so
%{_libdir}/samba/libsamba-sockets.so
%{_libdir}/samba/libsamba3-util.so
%{_libdir}/samba/libsamba_python.so
%{_libdir}/samba/libsamdb-common.so
%{_libdir}/samba/libsecrets3.so
%{_libdir}/samba/libserver-role.so
%{_libdir}/samba/libshares.so
%{_libdir}/samba/libsmb_transport.so
%{_libdir}/samba/libsmbd_base.so
%{_libdir}/samba/libsmbd_conn.so
%{_libdir}/samba/libsmbd_shim.so
%{_libdir}/samba/libsmbldaphelper.so
%{_libdir}/samba/libsmbpasswdparser.so
%{_libdir}/samba/libsmbregistry.so
%{_libdir}/samba/libsubunit.so
%{_libdir}/samba/libtdb-wrap.so
%{_libdir}/samba/libtdb_compat.so
%{_libdir}/samba/libtrusts_util.so
%{_libdir}/samba/libutil_cmdline.so
%{_libdir}/samba/libutil_reg.so
%{_libdir}/samba/libutil_setid.so
%{_libdir}/samba/libutil_tdb.so
%{_libdir}/samba/libwinbind-client.so
%{_libdir}/samba/libxattr_tdb.so
%dir %{_libdir}/samba/pdb
%{_libdir}/samba/pdb/ldapsam.so
%{_libdir}/samba/pdb/smbpasswd.so
%{_libdir}/samba/pdb/tdbsam.so
%{_libdir}/samba/pdb/wbc_sam.so
%files pidl
%defattr(-,root,root,-)
%dir %{perl_vendorlib}/Parse
%{perl_vendorlib}/Parse/Pidl*
%{_mandir}/man1/pidl*
%{_mandir}/man3/Parse::Pidl*
%attr(755,root,root) %{_bindir}/pidl
%files python
%defattr(-,root,root,-)
%{python_sitearch}/*
%files test
%defattr(-,root,root,-)
%{_bindir}/gentest
%{_bindir}/locktest
%{_bindir}/masktest
%{_bindir}/ndrdump
%{_bindir}/smbtorture
%{_libdir}/libtorture.so.*
%doc %{_mandir}/man1/gentest.1.*
%doc %{_mandir}/man1/locktest.1.*
%doc %{_mandir}/man1/masktest.1.*
%doc %{_mandir}/man1/ndrdump.1.*
%doc %{_mandir}/man1/smbtorture.1.*
%doc %{_mandir}/man1/vfstest.1.*
%files test-devel
%defattr(-,root,root,-)
%{_includedir}/samba-4.0/torture.h
%{_libdir}/libtorture.so
%{_libdir}/pkgconfig/torture.pc
%files winbind -f filelist-samba-winbind
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/security/pam_winbind.conf
%attr(0754,root,root) %config %{INITDIR}/winbind
%ghost %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-down.d/55-samba-winbindd
%ghost %{_sysconfdir}/sysconfig/%{NET_CFGDIR}/if-up.d/55-samba-winbindd
%{_sysconfdir}/sysconfig/%{NET_CFGDIR}/scripts/samba-winbindd
%{_bindir}/ntlm_auth
%{_bindir}/wbinfo
%{_sbindir}/rcwinbind
%{_sbindir}/winbindd
/%{_lib}/security/pam_winbind.so
%{_libdir}/libnss_winbind.so.*
%{_libdir}/samba/idmap
%{_libdir}/samba/nss_info
%{_libdir}/winbind_krb5_locator.so
%doc %{_mandir}/man1/ntlm_auth.1.*
%doc %{_mandir}/man1/wbinfo.1.*
%doc %{_mandir}/man7/winbind_krb5_locator.7.*
%doc %{_mandir}/man5/pam_winbind.conf.5.*
%doc %{_mandir}/man8/idmap_ad.8.*
%doc %{_mandir}/man8/idmap_autorid.8.*
%doc %{_mandir}/man8/idmap_hash.8.*
%doc %{_mandir}/man8/idmap_ldap.8.*
%doc %{_mandir}/man8/idmap_nss.8.*
%doc %{_mandir}/man8/idmap_rfc2307.8.*
%doc %{_mandir}/man8/idmap_rid.8.*
%doc %{_mandir}/man8/idmap_tdb.8.*
%doc %{_mandir}/man8/idmap_tdb2.8.*
%doc %{_mandir}/man8/pam_winbind.8.*
%doc %{_mandir}/man8/winbindd.8.*
%if 0%{?suse_version} && 0%{?suse_version} < 1100
%dir %{_datadir}/omc
%dir %{_datadir}/omc/svcinfo.d
%endif
%attr(0644,root,root) %{_datadir}/omc/svcinfo.d/winbind.xml
%attr(0750,root,winbind) %dir %{LOCKDIR}/winbindd_privileged
%if 0%{?suse_version} && 0%{?suse_version} < 1001 || 0%{?suse_version} > 1110
%files doc -f filelist-samba-doc
%defattr(-,root,root)
%dir %{DOCDIR}
%doc %{_datadir}/susehelp
%endif
%if %with_get_printing_ticket
%files krb-printing
%defattr(-,root,root)
%if 0%{?suse_version} == 0 || 0%{?suse_version} > 1000
%verify(not mode) %attr(4750,root,lp) %{_bindir}/get_printing_ticket
%else
%attr(0750,root,lp) %{_bindir}/get_printing_ticket
%endif
%dir %{cups_lib_dir}
%dir %{cups_lib_dir}/backend
%ghost %{cups_lib_dir}/backend/smb
%endif
%files -n %{libnetapi_name}
%defattr(-,root,root)
%{_libdir}/libnetapi.so.*
%files -n libnetapi-devel
%defattr(-,root,root)
%{_includedir}/samba-4.0/netapi.h
%{_libdir}/libnetapi.so
%{_libdir}/pkgconfig/netapi.pc
%files -n %{libsmbclient_name}
%defattr(-,root,root)
%{_libdir}/libsmbclient.so.*
%files -n libsmbclient-devel
%defattr(-,root,root)
%{_includedir}/samba-4.0/libsmbclient.h
%{_libdir}/libsmbclient.so
%{_libdir}/pkgconfig/smbclient.pc
%{_mandir}/man7/libsmbclient.7.*
%files -n %{libsmbsharemodes_name}
%defattr(-,root,root)
%{_libdir}/libsmbsharemodes.so.*
%files -n libsmbsharemodes-devel
%defattr(-,root,root)
%{_includedir}/samba-4.0/smb_share_modes.h
%{_libdir}/libsmbsharemodes.so
%{_libdir}/pkgconfig/smbsharemodes.pc
%files -n %{libwbclient_name}
%defattr(-,root,root)
%{_libdir}/libwbclient.so.*
%files -n libwbclient-devel
%defattr(-,root,root)
%{_includedir}/samba-4.0/wbclient.h
%{_libdir}/libwbclient.so
%{_libdir}/pkgconfig/wbclient.pc
%changelog