samba/samba.spec

1646 lines
54 KiB
RPMSpec
Raw Normal View History

2014-12-22 20:09:02 +03:00
%define debug_package %{nil}
2014-12-22 20:09:02 +03:00
# Useful commands for testing domain controller/OpenLDAP replacement
# functionality:
#
# Set up initial domain controller:
# samba-tool domain provision --realm=LINDEV.CH --domain=LINDEV --adminpass='PASSWORD' --server-role='domain controller'
# Query:
# ldapsearch -H ldap://127.0.0.1 -x -w 'PASSWORD' -b "DC=lindev,DC=ch" -D "CN=Administrator,CN=Users,DC=lindev,DC=ch"
# With TLS:
# ldapsearch -Z -H ldaps://127.0.0.1:636 -x -w 'PASSWORD' -b "DC=lindev,DC=ch" -D "CN=Administrator,CN=Users,DC=lindev,DC=ch"
%define libsmbmajor 0
%define netapimajor 0
%define dcerpcmajor 0
%define hostconfigmajor 0
%define ndrmajor 0
%define wbclientmajor 0
%define sambautilmajor 0
%define registrymajor 0
%define gensecmajor 0
%define samdbmajor 0
%define policymajor 0
%define passdbmajor 0
2014-12-22 20:09:02 +03:00
%define credentialsmajor 0
%define smbconfmajor 0
%define smbldapmajor 0
%define tevent_utilmajor 0
%define torture_major 0
%define nsswinsmajor 2
%define winbindmajor 2
%define sambaservermajor 0
# Default options
2015-02-20 13:18:36 +00:00
%bcond_with doc
2014-12-22 20:09:02 +03:00
%bcond_with cifs
%bcond_without ads
%bcond_without test
# CUPS supports functionality for 'printcap name = cups' (9.0 and later):
2014-12-22 20:09:02 +03:00
%bcond_without cupspc
# %_{pre,postun}_service are provided by rpm-helper in 9.0 and later
2014-12-22 20:09:02 +03:00
%bcond_with mysql
%bcond_with pgsql
# Allow commandline option overrides (borrowed from Vince's qmail srpm):
# To use it, do rpm [-ba|--rebuild] --with 'xxx'
# Check if the rpm was built with the defaults, otherwise we inform the user
%define build_non_default 0
%{?_with_test: %global build_non_default 1}
%{?_without_test: %global build_non_default 1}
%global vfsdir examples.bin/VFS
2014-12-22 20:09:02 +03:00
%bcond_with gtk
%define libname %mklibname smbclient %{libsmbmajor}
%define devname %mklibname smbclient -d
%define libnetapi %mklibname netapi %{netapimajor}
%define netapidevel %mklibname netapi -d
%define libdcerpc %mklibname dcerpc %{dcerpcmajor}
%define dcerpcdevel %mklibname dcerpc -d
%define libsambahostconfig %mklibname samba-hostconfig %{hostconfigmajor}
%define sambahostconfigdevel %mklibname samba-hostconfig -d
%define libndr %mklibname ndr %{ndrmajor}
%define ndrdevel %mklibname ndr -d
%define libwbclient %mklibname wbclient %{wbclientmajor}
%define wbclientdevel %mklibname wbclient -d
%define libsambautil %mklibname samba-util %{sambautilmajor}
%define sambautildevel %mklibname samba-util -d
%define libregistry %mklibname registry %{registrymajor}
%define registrydevel %mklibname registry -d
%define libgensec %mklibname gensec %{gensecmajor}
%define gensecdevel %mklibname gensec -d
%define libpolicy %mklibname samba-policy %{policymajor}
%define libpolicydevel %mklibname samba-policy -d
%define libsamdb %mklibname samdb %{samdbmajor}
%define libsamdbdevel %mklibname samdb -d
%define libtorture %mklibname torture %{torture_major}
%define libsambapassdb %mklibname samba-passdb %{passdbmajor}
2014-12-22 20:09:02 +03:00
%define libcredentials %mklibname samba-credentials %{credentialsmajor}
%define libsmbconf %mklibname smbconf %{smbconfmajor}
%define libsmbldap %mklibname smbldap %{smbldapmajor}
%define libtevent_util %mklibname tevent-util %{tevent_utilmajor}
%define libnsswins %mklibname nsswins %{nsswinsmajor}
%define libwinbind %mklibname winbind %{winbindmajor}
%define libsambaserver %mklibname samba-server %{sambaservermajor}
#Define sets of binaries that we can use in globs and loops:
2014-12-22 20:09:02 +03:00
%global commonbin ntlm_auth,testparm,regdiff,regpatch,regshell,regtree
%global cifs_bin mount.cifs,umount.cifs
2014-12-22 20:09:02 +03:00
%global testbin smbtorture,masktest,locktest,gentest,ndrdump
%define build_expsam xml%{?_with_pgsql:,pgsql}%{?_with_mysql:,mysql}
2014-12-22 20:09:02 +03:00
%define _serverbuild_flags -fstack-protector-all
Summary: Samba SMB server
Name: samba
Version: 4.3.1
Release: 1
2014-12-22 20:09:02 +03:00
Epoch: 1
License: GPLv3+
Group: System/Servers
Url: http://www.samba.org
Source0: http://ftp.samba.org/pub/samba/stable/samba-%{version}.tar.gz
Source99: http://ftp.samba.org/pub/samba/stable/samba-%{version}.tar.asc
Source98: http://ftp.samba.org/pub/samba/samba-pubkey.asc
Source81: patch-smb-conf-to-home-sharing.py
Source1: samba.log
Source3: samba.xinetd
Source10: samba-print-pdf.sh
#Sources that used to be in packaging patch:
Source20: smbusers
Source21: smbprint
#Source22: smbadduser
Source23: findsmb
Source26: wrepld.init
2014-12-22 20:09:02 +03:00
Source28: samba.pamd
Source29: system-auth-winbind.pamd
2015-03-23 11:57:31 +00:00
Source41: openldap-samba.conf
2014-12-22 20:09:02 +03:00
Source100: %{name}.rpmlintrc
# xdr_* functions have moved from glibc into libtirpc
Patch0: samba-4.3.1-tirpc.patch
2014-12-22 20:09:02 +03:00
# Required for ldb docs
BuildRequires: docbook-style-xsl
# For -fuse-ld
BuildRequires: gcc
BuildRequires: gnupg
BuildRequires: python-tdb
BuildRequires: python-tevent
BuildRequires: xsltproc
BuildRequires: acl-devel
BuildRequires: cups-devel
BuildRequires: keyutils-devel
# Samba 3.2 and later should be built with capabilities support:
# http://lists.samba.org/archive/samba/2009-March/146821.html
2014-12-22 20:09:02 +03:00
BuildRequires: libcap-devel
BuildRequires: magic-devel
%if %{with mysql}
BuildRequires: mysql-devel
%endif
BuildRequires: openldap-devel
BuildRequires: pam-devel
BuildRequires: readline-devel
BuildRequires: libsystemd-daemon-devel
2014-12-22 20:09:02 +03:00
BuildRequires: pkgconfig(talloc)
BuildRequires: pkgconfig(ctdb) >= 2.0
BuildRequires: pkgconfig(gnutls)
%if %{with ads}
BuildRequires: pkgconfig(krb5)
%endif
BuildRequires: pkgconfig(ldb)
%if %{with pgsql}
BuildRequires: pkgconfig(libpq)
%endif
BuildRequires: pkgconfig(libtirpc)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(popt)
BuildRequires: pkgconfig(pyldb-util)
BuildRequires: pkgconfig(pytalloc-util)
BuildRequires: pkgconfig(tdb)
BuildRequires: pkgconfig(tevent)
Requires(pre): chkconfig mktemp psmisc
Requires(pre): coreutils sed grep
Requires: pam >= 0.64
2015-03-12 11:32:02 +00:00
Requires: %{name}-common = %{EVRD}
2014-12-22 20:09:02 +03:00
# samba-python package contains libs on non-standard path which should not be registered in Provides
%define __noautoprov 'samba\\/.*\\.so.*'
# Library dependencies in this project are the pain. Most seem to be private and a few are kind of shared libs.
# In fact only libsmbclient and libnsswins show signs of external usage. BUT all of them are highly dependable on
# each other no matter the location and are tied into tight web of mutual dependencies. Urpmi gets confused each time
# it has to operate on this project's library packages and complains on lots of LOOPs.
# Possible solutions are:
# - ignore urpmi complaints and expose all the ugly LOOPs to the user,
# - decompose project into 300+ packages packing each and every library individually (no guarantee it gonna work),
# - collect nearly all libs into one big library package,
# - filter autodeps and take burden of ruling out dependencies by hand.
# None of these is elegant. The last one seems to be least invasive. But it might prove to be too unreliable.
# We'll try it first. But it's likely to be discarded any moment in favor to some other approach.
# Disable autoreq on individual libs to get rid of library dependecy loops and provide deps on these libs to samba-* packages.
%define __noautoreq '(lib(non-posix-acls|dcerpc-(atsvc|binding|samr|server)|dcerpc|ndr-(krb5pac|nbt|standard)|ndr|gensec|netapi|nss_winbind|pdb|registry|samba-(credentials|hostconfig|policy|util)|samdb|smbclient-raw|smb(client|conf|ldap)|tevent-util|torture|wbclient)|pam_winbind|winbind_krb5_locator)\.so|devel.*'
%description
2014-12-22 20:09:02 +03:00
Samba provides SMB server which can be used to provide network services
to SMB (sometimes called "Lan Manager") clients, including various versions
of MS Windows, OS/2, and other Linux machines. Samba also provides some SMB
clients, which complement the built-in SMB filesystem in Linux. Samba uses
NetBIOS over TCP/IP (NetBT) protocols and does NOT need NetBEUI (Microsoft
Raw NetBIOS frame) protocol.
Samba features working NT Domain Control capability.
Please refer to the WHATSNEW.txt document for fixup information. This binary
release includes encrypted password support.
Please read the smb.conf file and ENCRYPTION.txt in the docs directory for
implementation details.
%if %{build_non_default}
WARNING: This RPM was built with command-line options. Please
see README.%{name}-mandrake-rpm in the documentation for
more information.
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package server
2014-12-22 20:09:02 +03:00
Summary: Samba (SMB) server programs
Group: Networking/Other
Requires: %{name}-common = %{EVRD}
# provision requires samba4-python
Requires: %{name}-python = %{EVRD}
Requires(pre): rpm-helper
# SWAT is no longer included in 4.1.x. For now it has been removed
# without replacement, maybe it will come back later
Obsoletes: %{name}-swat < 4.1.6
2015-02-24 13:17:10 +05:00
#Samba-server and it's libraries were shipped in single package before 4.1.16
Obsoletes: %{name}-server < 1:4.1.17
2014-12-22 20:09:02 +03:00
%if %{without gtk}
Obsoletes: %{name}-domainjoin-gui < %{EVRD}
%endif
%rename samba
%rename samba-server-ldap
%description server
2014-12-22 20:09:02 +03:00
Samba-server provides SMB server which can be used to provide network services
to SMB (sometimes called "Lan Manager") clients, including various versions
of MS Windows, OS/2, and other Linux machines. Samba also provides some SMB
clients, which complement the built-in SMB filesystem in Linux. Samba uses
NetBIOS over TCP/IP (NetBT) protocols and does NOT need NetBEUI (Microsoft
Raw NetBIOS frame) protocol.
Samba features working NT Domain Control capability.
Please refer to the WHATSNEW.txt document for fixup information. This binary
release includes encrypted password support.
Please read the smb.conf file and ENCRYPTION.txt in the docs directory for
implementation details.
%files server
%{_bindir}/oLschema2ldif
%{_sbindir}/samba
%{_sbindir}/samba_dnsupdate
%{_sbindir}/samba_spnupdate
%{_sbindir}/samba_upgradedns
%{_sbindir}/smbd
%{_sbindir}/nmbd
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}-server
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/%{name}
%{_mandir}/man?/oLschema2ldif.*
%attr(775,root,adm) %dir %{_localstatedir}/lib/%{name}/netlogon
%attr(755,root,root) %dir %{_localstatedir}/lib/%{name}/profiles
%attr(755,root,root) %dir %{_localstatedir}/lib/%{name}/printers
%attr(2775,root,adm) %dir %{_localstatedir}/lib/%{name}/printers/*
%attr(1777,root,root) %dir /var/spool/%{name}
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/scripts
%{_datadir}/samba/setup
%attr(0755,root,root) %{_datadir}/%{name}/scripts/print-pdf
%{_mandir}/man8/idmap_*.8*
%{_mandir}/man8/samba.8*
%{_unitdir}/samba.service
%{_unitdir}/smb.service
%{_unitdir}/nmb.service
%config(noreplace) %{_sysconfdir}/sysconfig/samba
%post server
# Add a unix group for samba machine accounts
groupadd -frg 421 machines
# https://wiki.archlinux.org/index.php/Samba#Creating_usershare_path
groupadd -frg 430 sambashare
mkdir -p %{_localstatedir}/lib/samba/usershare
chown root:sambashare %{_localstatedir}/lib/samba/usershare
chmod 1770 %{_localstatedir}/lib/samba/usershare
for u in $(awk -F: '$6 ~ /\/home/ && $3 >= 500 {print $1}' /etc/passwd); do usermod -a -G sambashare $u; done
%systemd_post nmb.service
%systemd_post smb.service
2015-04-22 08:58:57 +00:00
if [ $1 -gt 1 ] ; then
echo "Flushing Samba cache."
/usr/bin/net cache flush > /dev/null 2>&1 || :
fi
%postun server
%systemd_postun nmb.service
%systemd_postun smb.service
#----------------------------------------------------------------------------
%package -n %{libsambaserver}
Summary: Samba-server libraries
Group: System/Libraries
Conflicts: %{name}-server < 1:4.1.17
Obsoletes: lib64samba-bind-dlz0 < 1:4.1.17-4
Conflicts: lib64samba-bind-dlz0 < 1:4.1.17-4
%description -n %{libsambaserver}
Provides libraries for samba-server
%files -n %{libsambaserver}
2014-12-22 20:09:02 +03:00
%attr(755,root,root) /%{_lib}/security/pam_smbpass*
%{_libdir}/%{name}/vfs/*.so
%dir %{_libdir}/samba
%{_libdir}/samba/ldb
%{_libdir}/samba/service
%{_libdir}/samba/process_model
%{_libdir}/samba/gensec
%{_libdir}/samba/auth
%{_libdir}/samba/libCHARSET3-samba4.so
%{_libdir}/samba/libHDB-SAMBA4-samba4.so
%{_libdir}/samba/libLIBWBCLIENT-OLD-samba4.so
%{_libdir}/samba/libMESSAGING-samba4.so
%{_libdir}/samba/libaddns-samba4.so
%{_sysconfdir}/ld.so.conf.d
2014-12-22 20:09:02 +03:00
%if %{with ads}
%{_libdir}/samba/libads-samba4.so
2014-12-22 20:09:02 +03:00
%endif
%{_libdir}/samba/libasn1-samba4.so.8
%{_libdir}/samba/libasn1-samba4.so.8.0.0
%{_libdir}/samba/libasn1util-samba4.so
%{_libdir}/samba/libauth-samba4.so
%{_libdir}/samba/libauth-sam-reply-samba4.so
%{_libdir}/samba/libauth-unix-token-samba4.so
%{_libdir}/samba/libauth4-samba4.so
%{_libdir}/samba/libauthkrb5-samba4.so
%{_libdir}/samba/libcli-ldap-common-samba4.so
%{_libdir}/samba/libcli-ldap-samba4.so
%{_libdir}/samba/libcli-nbt-samba4.so
%{_libdir}/samba/libcli-cldap-samba4.so
%{_libdir}/samba/libcli-smb-common-samba4.so
%{_libdir}/samba/libcli-spoolss-samba4.so
%{_libdir}/samba/libcliauth-samba4.so
%{_libdir}/samba/libcluster-samba4.so
%{_libdir}/samba/libcmdline-credentials-samba4.so
%{_libdir}/samba/libdb-glue-samba4.so
%{_libdir}/samba/libdbwrap-samba4.so
%{_libdir}/samba/libdcerpc-samba-samba4.so
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libdcerpc-samba4.so
%{_libdir}/samba/libdfs-server-ad-samba4.so
%{_libdir}/samba/libdlz-bind9-for-torture-samba4.so
%{_libdir}/samba/libdnsserver-common-samba4.so
%{_libdir}/samba/libdsdb-module-samba4.so
%{_libdir}/samba/liberrors-samba4.so
%{_libdir}/samba/libevents-samba4.so
%{_libdir}/samba/libflag-mapping-samba4.so
%{_libdir}/samba/libgenrand-samba4.so
%{_libdir}/samba/libgpo-samba4.so
%{_libdir}/samba/libgse-samba4.so
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libgssapi-samba4.so.2
%{_libdir}/samba/libgssapi-samba4.so.2.0.0
%{_libdir}/samba/libhcrypto-samba4.so.5
%{_libdir}/samba/libhcrypto-samba4.so.5.0.1
%{_libdir}/samba/libhdb-samba4.so.11
%{_libdir}/samba/libhdb-samba4.so.11.0.2
%{_libdir}/samba/libheimbase-samba4.so.1
%{_libdir}/samba/libheimbase-samba4.so.1.0.0
%{_libdir}/samba/libheimntlm-samba4.so.1
%{_libdir}/samba/libheimntlm-samba4.so.1.0.1
%{_libdir}/samba/libhttp-samba4.so
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libhx509-samba4.so.5
%{_libdir}/samba/libhx509-samba4.so.5.0.0
%{_libdir}/samba/libidmap-samba4.so
%{_libdir}/samba/libinterfaces-samba4.so
%{_libdir}/samba/libiov-buf-samba4.so
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libkdc-samba4.so.2
%{_libdir}/samba/libkdc-samba4.so.2.0.0
%{_libdir}/samba/libkrb5-samba4.so.26
%{_libdir}/samba/libkrb5-samba4.so.26.0.0
%{_libdir}/samba/libkrb5samba-samba4.so
#%{_libdir}/samba/libldb-cmdline.so - does not build. removed? not configured? to be investigated.
%{_libdir}/samba/libldbsamba-samba4.so
%{_libdir}/samba/liblibcli-lsa3-samba4.so
%{_libdir}/samba/liblibcli-netlogon3-samba4.so
%{_libdir}/samba/liblibsmb-samba4.so
%{_libdir}/samba/libmessages-dgm-samba4.so
%{_libdir}/samba/libmessages-util-samba4.so
%{_libdir}/samba/libmsghdr-samba4.so
%{_libdir}/samba/libmsrpc3-samba4.so
%{_libdir}/samba/libndr-samba-samba4.so
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libndr-samba4.so
%{_libdir}/samba/libnet-keytab-samba4.so
%{_libdir}/samba/libnetif-samba4.so
%{_libdir}/samba/libnpa-tstream-samba4.so
%{_libdir}/samba/libnss-info-samba4.so
%{_libdir}/samba/libntvfs-samba4.so
%{_libdir}/samba/libpac-samba4.so
%{_libdir}/samba/libpopt-samba3-samba4.so
%{_libdir}/samba/libposix-eadb-samba4.so
%{_libdir}/samba/libprinting-migrate-samba4.so
%{_libdir}/samba/libprocess-model-samba4.so
%{_libdir}/samba/libreplace-samba4.so
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libroken-samba4.so.19
%{_libdir}/samba/libroken-samba4.so.19.0.1
%{_libdir}/samba/libsamba-cluster-support-samba4.so
%{_libdir}/samba/libsamba-debug-samba4.so
%{_libdir}/samba/libsamba-modules-samba4.so
%{_libdir}/samba/libsamba-net-samba4.so
%{_libdir}/samba/libsamba-python-samba4.so
%{_libdir}/samba/libsamba-security-samba4.so
%{_libdir}/samba/libsamba-sockets-samba4.so
%{_libdir}/samba/libsamba3-util-samba4.so
%{_libdir}/samba/libsamdb-common-samba4.so
%{_libdir}/samba/libsecrets3-samba4.so
%{_libdir}/samba/libserver-id-db-samba4.so
%{_libdir}/samba/libserver-role-samba4.so
%{_libdir}/samba/libservice-samba4.so
%{_libdir}/samba/libshares-samba4.so
%{_libdir}/samba/libsmb-transport-samba4.so
%{_libdir}/samba/libsmbd-base-samba4.so
%{_libdir}/samba/libsmbd-conn-samba4.so
%{_libdir}/samba/libsmbd-shim-samba4.so
%{_libdir}/samba/libsmbldaphelper-samba4.so
%{_libdir}/samba/libsmbpasswdparser-samba4.so
%{_libdir}/samba/libsmbregistry-samba4.so
%{_libdir}/samba/libsocket-blocking-samba4.so
%{_libdir}/samba/libsys-rw-samba4.so
%{_libdir}/samba/libtalloc-report-samba4.so
%{_libdir}/samba/libtdb-wrap-samba4.so
%{_libdir}/samba/libtime-basic-samba4.so
%{_libdir}/samba/libtrusts-util-samba4.so
%{_libdir}/samba/libutil-cmdline-samba4.so
%{_libdir}/samba/libutil-reg-samba4.so
%{_libdir}/samba/libutil-setid-samba4.so
%{_libdir}/samba/libutil-tdb-samba4.so
%{_libdir}/samba/libwinbind-client-samba4.so
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libwind-samba4.so.0
%{_libdir}/samba/libwind-samba4.so.0.0.0
%{_libdir}/samba/libxattr-tdb-samba4.so
%{_libdir}/samba/bind9
2014-12-22 20:09:02 +03:00
%dir %{_libdir}/samba/vfs
%{_libdir}/%{name}/nss_info
2015-03-12 11:32:02 +00:00
%{_libdir}/%{name}/idmap
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package client
2014-12-22 20:09:02 +03:00
Summary: Samba (SMB) client programs
Group: Networking/Other
Requires: %{name}-common = %{EVRD}
Requires: mount-cifs
# For samba-tool
Requires: ldb-utils
Requires: python-ldb
Requires: python-talloc
Requires: python-tdb
%rename samba3-client
%description client
Samba-client provides some SMB clients, which complement the built-in
SMB filesystem in Linux. These allow the accessing of SMB shares, and
printing to SMB printers.
2014-12-22 20:09:02 +03:00
%files client
%{_bindir}/cifsdd
2014-12-22 20:09:02 +03:00
%{_bindir}/dbwrap_tool
%{_bindir}/eventlogadm
%{_bindir}/net
%{_bindir}/nmblookup
2014-12-22 20:09:02 +03:00
%{_bindir}/pdbedit
%{_bindir}/profiles
%{_bindir}/rpcclient
%{_sbindir}/samba_kcc
%{_bindir}/samba-tool
2014-12-22 20:09:02 +03:00
%{_bindir}/sharesec
%{_bindir}/smbcacls
%{_bindir}/smbclient
2014-12-22 20:09:02 +03:00
%{_bindir}/smbcontrol
%{_bindir}/smbcquotas
%{_bindir}/smbget
%{_bindir}/smbpasswd
%{_bindir}/smbspool
%{_bindir}/smbstatus
%{_bindir}/smbta-util
%{_bindir}/smbtree
%{_bindir}/samba-regedit
%{_bindir}/smbtar
%{_mandir}/man1/dbwrap_tool.1*
%{_mandir}/man8/samba-tool.8*
%{_mandir}/man8/samba-regedit.8*
%{_mandir}/man8/vfs_btrfs.8*
%{_mandir}/man8/vfs_linux_xfs_sgid.8*
%{_mandir}/man8/vfs_syncops.8*
# Link of smbspool to CUPS
%if %{with cupspc}
%{_libdir}/cups/backend/smb
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package common
2014-12-22 20:09:02 +03:00
Summary: Files used by both Samba servers and clients
Group: System/Servers
# rpcclient etc. use samba python modules
Requires: %{name}-python = %{EVRD}
Requires: %{libsambapassdb} = %{EVRD}
2014-12-22 20:09:02 +03:00
Requires: %{libcredentials} = %{EVRD}
Requires: %{libsmbconf} = %{EVRD}
Requires: %{libsmbldap} = %{EVRD}
Requires: %{libtevent_util} = %{EVRD}
Requires(post): systemd
%rename samba-common-ldap
Conflicts: samba3-common
# A clumzy approach to get rid of LOOPS - provide deps for individual libs _by hand_
2015-03-12 11:32:02 +00:00
Requires: %{libsmbldap } = %{EVRD}
Requires: %{libnetapi} = %{EVRD}
Requires: %{libname} = %{EVRD}
Requires: %{libsamdb} = %{EVRD}
Requires: %{libsmbconf} = %{EVRD}
Requires: %{libgensec} = %{EVRD}
Requires: %{libtevent_util} = %{EVRD}
Requires: %{libsambahostconfig} = %{EVRD}
Requires: %{libwinbind} = %{EVRD}
Requires: %{libndr} = %{EVRD}
Requires: %{libwbclient} = %{EVRD}
Requires: %{libcredentials} = %{EVRD}
Requires: %{libregistry} = %{EVRD}
Requires: %{libsambapassdb} = %{EVRD}
Requires: %{libsmbldap} = %{EVRD}
Requires: %{libsambautil} = %{EVRD}
2015-03-12 11:32:02 +00:00
Requires: %{libdcerpc} = %{EVRD}
%description common
Samba-common provides files necessary for both the server and client
packages of Samba.
2014-12-22 20:09:02 +03:00
%files common
%{_prefix}/lib/tmpfiles.d/samba.conf
%dir /var/cache/%{name}
%dir /var/log/%{name}
%ghost /var/run/%{name}
2014-12-22 20:09:02 +03:00
%dir /var/lib/%{name}/private
%(for i in %{_bindir}/{%{commonbin}};do echo $i;done)
%(for i in %{_mandir}/man?/{%{commonbin}}\.[0-9]*;do echo $i|grep -v testparm;done)
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/libnon-posix-acls-samba4.so
2014-12-22 20:09:02 +03:00
%dir %{_datadir}/%{name}
%dir %{_sysconfdir}/%{name}
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb.conf
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/lmhosts
%dir %{_localstatedir}/lib/%{name}
%attr(-,root,root) %{_localstatedir}/lib/%{name}/codepages
%{_mandir}/man1/findsmb.1*
%{_mandir}/man1/log2pcap.1*
%{_mandir}/man1/nmblookup.1*
%{_mandir}/man1/profiles.1*
%{_mandir}/man1/rpcclient.1*
%{_mandir}/man1/sharesec.1*
%{_mandir}/man1/smbcacls.1*
%{_mandir}/man1/smbclient.1*
%{_mandir}/man1/smbcontrol.1*
%{_mandir}/man1/smbcquotas.1*
%{_mandir}/man1/smbget.1*
%{_mandir}/man1/smbstatus.1*
%{_mandir}/man1/smbtar.1*
%{_mandir}/man1/smbtree.1*
%{_mandir}/man1/testparm.1*
%{_mandir}/man1/vfstest.1*
%{_mandir}/man1/wbinfo.1*
%{_mandir}/man5/lmhosts.5*
%{_mandir}/man5/pam_winbind.conf.5*
%{_mandir}/man5/smb.conf.5*
%{_mandir}/man5/smbgetrc.5*
%{_mandir}/man5/smbpasswd.5*
%{_mandir}/man7/samba.7*
%{_mandir}/man7/winbind_krb5_locator.7*
%{_mandir}/man8/eventlogadm.8*
%{_mandir}/man8/net.8*
%{_mandir}/man8/nmbd.8*
%{_mandir}/man8/pam_winbind.8*
%{_mandir}/man8/pdbedit.8*
%{_mandir}/man8/smbd.8*
%{_mandir}/man8/smbpasswd.8*
%{_mandir}/man8/smbspool.8*
%{_mandir}/man8/smbta-util.8*
%{_mandir}/man8/vfs_acl_tdb.8*
%{_mandir}/man8/vfs_acl_xattr.8*
%{_mandir}/man8/vfs_aio_fork.8*
%{_mandir}/man8/vfs_aio_linux.8*
%{_mandir}/man8/vfs_aio_pthread.8*
%{_mandir}/man8/vfs_audit.8*
%{_mandir}/man8/vfs_cacheprime.8*
%{_mandir}/man8/vfs_cap.8*
%{_mandir}/man8/vfs_catia.8*
%{_mandir}/man8/vfs_ceph.8*
2014-12-22 20:09:02 +03:00
%{_mandir}/man8/vfs_commit.8*
%{_mandir}/man8/vfs_crossrename.8*
%{_mandir}/man8/vfs_default_quota.8*
%{_mandir}/man8/vfs_dirsort.8*
%{_mandir}/man8/vfs_extd_audit.8*
%{_mandir}/man8/vfs_fake_perms.8*
%{_mandir}/man8/vfs_fileid.8*
%{_mandir}/man8/vfs_fruit.8*
2014-12-22 20:09:02 +03:00
%{_mandir}/man8/vfs_full_audit.8*
%{_mandir}/man8/vfs_glusterfs.8*
2014-12-22 20:09:02 +03:00
%{_mandir}/man8/vfs_gpfs.8*
%{_mandir}/man8/vfs_media_harmony.8*
%{_mandir}/man8/vfs_netatalk.8*
%{_mandir}/man8/vfs_prealloc.8*
%{_mandir}/man8/vfs_preopen.8*
%{_mandir}/man8/vfs_readahead.8*
%{_mandir}/man8/vfs_readonly.8*
%{_mandir}/man8/vfs_recycle.8*
%{_mandir}/man8/vfs_scannedonly.8*
%{_mandir}/man8/vfs_shadow_copy.8*
%{_mandir}/man8/vfs_shadow_copy2.8*
%{_mandir}/man8/vfs_shell_snap.8*
2014-12-22 20:09:02 +03:00
%{_mandir}/man8/vfs_smb_traffic_analyzer.8*
%{_mandir}/man8/vfs_snapper.8*
2014-12-22 20:09:02 +03:00
%{_mandir}/man8/vfs_streams_depot.8*
%{_mandir}/man8/vfs_streams_xattr.8*
%{_mandir}/man8/vfs_time_audit.8*
%{_mandir}/man8/vfs_tsmsm.8*
%{_mandir}/man8/vfs_xattr_tdb.8*
%{_mandir}/man8/vfs_unityed_media.8*
%{_mandir}/man8/vfs_worm.8*
2014-12-22 20:09:02 +03:00
%{_mandir}/man8/winbindd.8*
%post common
systemd-tmpfiles --create %{_prefix}/lib/tmpfiles.d/samba.conf
# And this too, in case we don't have smbd to create it for us
[ -f /var/cache/%{name}/unexpected.tdb ] || {
touch /var/cache/%{name}/unexpected.tdb
}
%postun common
if [ -f %{_sysconfdir}/%{name}/README.mdk.conf ];then rm -f %{_sysconfdir}/%{name}/README.mdk.conf;fi
#----------------------------------------------------------------------------
%if %{with doc}
%package doc
2014-12-22 20:09:02 +03:00
Summary: Documentation for Samba servers and clients
Group: Documentation
%description doc
Samba-doc provides documentation files for both the server and client
packages of Samba.
2014-12-22 20:09:02 +03:00
%files doc
2015-02-20 13:18:36 +00:00
%doc README COPYING
2014-12-22 20:09:02 +03:00
%doc WHATSNEW.txt Roadmap
%doc clean-docs/samba-doc/docs/*
%doc clean-docs/samba-doc/examples
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package -n %{libwinbind}
Summary: Samba-winbind daemon libraries
Group: System/Libraries
Conflicts: %{libsambaserver} < 1:4.1.17
%description -n %{libwinbind}
Provides libraries for winbind daemon and testing tools
%files -n %{libwinbind}
%attr(755,root,root) /%{_lib}/security/pam_winbind*
%attr(755,root,root) /%{_lib}/libnss_winbind*
%{_libdir}/winbind_krb5_locator.so
#----------------------------------------------------------------------------
%package winbind
2014-12-22 20:09:02 +03:00
Summary: Samba-winbind daemon, utilities and documentation
Group: System/Servers
Requires: %{name}-common = %{EVRD}
Requires: %{libwinbind} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description winbind
2012-03-13 17:37:06 +03:00
Provides the winbind daemon and testing tools to allow authentication
and group/user enumeration from a Windows or Samba domain controller.
2014-12-22 20:09:02 +03:00
%files winbind
# %config(noreplace) %{_sysconfdir}/security/pam_winbind.conf
%{_sbindir}/winbindd
%{_bindir}/wbinfo
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/system-auth-winbind*
%{_unitdir}/winbind.service
%post winbind
if [ $1 = 1 ]; then
/sbin/chkconfig winbind on
cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave
cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp
for i in passwd group;do
grep ^$i %{_sysconfdir}/nsswitch.conf |grep -v 'winbind' >/dev/null
if [ $? = 0 ];then
echo "Adding a winbind entry to the $i section of %{_sysconfdir}/nsswitch.conf"
awk '/^'$i'/ {print $0 " winbind"};!/^'$i'/ {print}' %{_sysconfdir}/nsswitch.conf.rpmtemp >%{_sysconfdir}/nsswitch.conf;
cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmtemp
else
echo "$i entry found in %{_sysconfdir}/nsswitch.conf"
fi
done
if [ -f %{_sysconfdir}/nsswitch.conf.rpmtemp ];then rm -f %{_sysconfdir}/nsswitch.conf.rpmtemp;fi
fi
%systemd_post winbind.service
%preun winbind
if [ $1 = 0 ]; then
echo "Removing winbind entries from %{_sysconfdir}/nsswitch.conf"
perl -pi -e 's/ winbind//' %{_sysconfdir}/nsswitch.conf
/sbin/chkconfig winbind reset
fi
%systemd_postun winbind.service
#----------------------------------------------------------------------------
%package -n %{libnsswins}
2014-12-22 20:09:02 +03:00
Summary: Name Service Switch service for WINS
2015-02-24 13:17:10 +05:00
Group: System/Libraries
2014-12-22 20:09:02 +03:00
Requires: %{name}-common = %{EVRD}
Conflicts: nss_wins < 1:4.1.17
Obsoletes: nss_wins < 1:4.1.17
Provides: nss_wins = %{EVRD}
2014-12-22 20:09:02 +03:00
Requires(pre): glibc
# A clumzy approach to get rid of LOOPS - provide deps for individual libs _by hand_
Requires: %{libsmbconf} = %{EVRD}
Requires: %{libsambautil} = %{EVRD}
%description -n %{libnsswins}
2012-03-13 17:37:06 +03:00
Provides the libnss_wins shared library which resolves NetBIOS names to
IP addresses.
%files -n %{libnsswins}
2014-12-22 20:09:02 +03:00
%attr(755,root,root) /%{_lib}/libnss_wins.so*
%post -n %{libnsswins}
2014-12-22 20:09:02 +03:00
if [ $1 = 1 ]; then
cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave
grep '^hosts' %{_sysconfdir}/nsswitch.conf |grep -v 'wins' >/dev/null
if [ $? = 0 ];then
echo "Adding a wins entry to the hosts section of %{_sysconfdir}/nsswitch.conf"
awk '/^hosts/ {print $0 " wins"};!/^hosts/ {print}' %{_sysconfdir}/nsswitch.conf.rpmsave >%{_sysconfdir}/nsswitch.conf;
else
echo "wins entry found in %{_sysconfdir}/nsswitch.conf"
fi
fi
%preun -n %{libnsswins}
2014-12-22 20:09:02 +03:00
if [ $1 = 0 ]; then
echo "Removing wins entry from %{_sysconfdir}/nsswitch.conf"
perl -pi -e 's/ wins//' %{_sysconfdir}/nsswitch.conf
fi
#----------------------------------------------------------------------------
%package python
Summary: Samba Python modules
Group: Development/Python
BuildRequires: pkgconfig(python)
# A clumzy approach to get rid of LOOPS - provide deps for individual libs _by hand_
Requires: %{libpolicy} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description python
Samba Python modules.
%files python
%{py_platsitedir}/samba
#----------------------------------------------------------------------------
%if %{with test}
%package test
2014-12-22 20:09:02 +03:00
Summary: Debugging and benchmarking tools for samba
Group: System/Servers
Requires: %{name}-common = %{EVRD}
# A clumzy approach to get rid of LOOPS - provide deps for individual libs _by hand_
Requires: %{libtorture} = %{EVRD}
%description test
2014-12-22 20:09:02 +03:00
This package provides tools for benchmarking samba, and debugging the correct
operation of tools against smb servers.
%files test
%(for i in %{_bindir}/{%{testbin}};do echo $i;done)
%(for i in %{_mandir}/man1/{%{testbin}}.1%{_extension};do echo $i|grep -v nsstest;done)
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package -n %{libname}
2014-12-22 20:09:02 +03:00
Summary: SMB Client Library
Group: System/Libraries
2014-12-22 20:09:02 +03:00
Provides: libsmbclient = %{EVRD}
%description -n %{libname}
2014-12-22 20:09:02 +03:00
This package contains the SMB client library, part of the samba suite of
networking software, allowing other software to access SMB shares.
2014-12-22 20:09:02 +03:00
%files -n %{libname}
%{_libdir}/libsmbclient.so.%{libsmbmajor}*
%{_libdir}/libsmbclient-raw.so.%{libsmbmajor}*
#----------------------------------------------------------------------------
%package -n %{devname}
Summary: SMB Client Library Development files
Group: Development/C
2014-12-22 20:09:02 +03:00
Requires: %{libname} = %{EVRD}
2015-03-17 08:52:28 +00:00
Requires: %{libcredentials} = %{EVRD}
Requires: %{libdcerpc} = %{EVRD}
Requires: %{libgensec} = %{EVRD}
Requires: %{libtevent_util} = %{EVRD}
Requires: %{libwbclient} = %{EVRD}
Requires: %{libsambahostconfig} = %{EVRD}
Requires: %{libndr} = %{EVRD}
Requires: %{libsmbconf} = %{EVRD}
Requires: %{libsambautil} = %{EVRD}
Requires: %{name}-common = %{EVRD}
2014-12-22 20:09:02 +03:00
Conflicts: %{_lib}smbclient0-devel < 1:4.1.9-10
Obsoletes: %{_lib}smbclient0-devel < 1:4.1.9-10
%description -n %{devname}
This package contains the development files for the SMB client library, part
of the samba suite of networking software, allowing the development of other
software to access SMB shares.
%files -n %{devname}
%{_includedir}/samba-4.0/libsmbclient.h
%{_libdir}/libsmbclient.so
%{_mandir}/man7/libsmbclient.7*
%{_libdir}/pkgconfig/smbclient.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package devel
Summary: Samba 4 development package
Group: Development/C
Requires: %{devname} = %{EVRD}
2015-03-12 11:32:02 +00:00
Requires: %{name}-common = %{EVRD}
Obsoletes: %{_lib}smbsharemodes-devel < 1:4.3.1
2014-12-22 20:09:02 +03:00
%description devel
Samba 4 development libraries.
%files devel
%{_includedir}/samba-4.0/charset.h
%dir %{_includedir}/samba-4.0/core
%{_includedir}/samba-4.0/core/*.h
%{_includedir}/samba-4.0/credentials.h
%{_includedir}/samba-4.0/dlinklist.h
%{_includedir}/samba-4.0/domain_credentials.h
%dir %{_includedir}/samba-4.0/gen_ndr
%{_includedir}/samba-4.0/gen_ndr/*.h
%{_includedir}/samba-4.0/ldap*.h
%{_includedir}/samba-4.0/ndr.h
%{_includedir}/samba-4.0/ndr
%{_includedir}/samba-4.0/param.h
%{_includedir}/samba-4.0/samba/
%{_includedir}/samba-4.0/share.h
%{_includedir}/samba-4.0/smb2_lease.h
%{_includedir}/samba-4.0/tdr.h
%{_includedir}/samba-4.0/tsocket.h
%{_includedir}/samba-4.0/tsocket_internal.h
%{_includedir}/samba-4.0/tstream_smbXcli_np.h
2014-12-22 20:09:02 +03:00
%{_includedir}/samba-4.0/torture.h
%{_includedir}/samba-4.0/rpc_common.h
%dir %{_includedir}/samba-4.0/util/
%{_includedir}/samba-4.0/util/*.h
%{_includedir}/samba-4.0/util_ldb.h
%{_includedir}/samba-4.0/ldb_wrap.h
%{_libdir}/pkgconfig/torture.pc
%{_libdir}/pkgconfig/samba-util.pc
%{_libdir}/libtorture.so
%{_libdir}/libsamba-passdb.so
2014-12-22 20:09:02 +03:00
%{_libdir}/libsmbclient-raw.so
%{_libdir}/libsmbconf.so
%{_libdir}/libsmbldap.so
%{_libdir}/libtevent-util.so
%{_includedir}/samba-4.0/lookup_sid.h
%{_includedir}/samba-4.0/machine_sid.h
%{_includedir}/samba-4.0/passdb.h
%{_includedir}/samba-4.0/policy.h
%{_includedir}/samba-4.0/read_smb.h
%{_includedir}/samba-4.0/roles.h
%{_includedir}/samba-4.0/samba_util.h
%{_includedir}/samba-4.0/smb2.h
%{_includedir}/samba-4.0/smb2_constants.h
%{_includedir}/samba-4.0/smb2_create_blob.h
%{_includedir}/samba-4.0/smb2_lease_struct.h
2014-12-22 20:09:02 +03:00
%{_includedir}/samba-4.0/smb2_signing.h
%{_includedir}/samba-4.0/smb_cli.h
%{_includedir}/samba-4.0/smb_cliraw.h
%{_includedir}/samba-4.0/smb_common.h
%{_includedir}/samba-4.0/smb_composite.h
%{_includedir}/samba-4.0/smb_constants.h
%{_includedir}/samba-4.0/smb_ldap.h
%{_includedir}/samba-4.0/smb_raw.h
%{_includedir}/samba-4.0/smb_raw_interfaces.h
%{_includedir}/samba-4.0/smb_raw_signing.h
%{_includedir}/samba-4.0/smb_raw_trans2.h
%{_includedir}/samba-4.0/smb_request.h
%{_includedir}/samba-4.0/smb_seal.h
%{_includedir}/samba-4.0/smb_signing.h
%{_includedir}/samba-4.0/smb_unix_ext.h
%{_includedir}/samba-4.0/smb_util.h
%{_includedir}/samba-4.0/smbconf.h
%{_includedir}/samba-4.0/smbldap.h
%{_libdir}/pkgconfig/samba-credentials.pc
%{_libdir}/pkgconfig/smbclient-raw.pc
#----------------------------------------------------------------------------
%package pidl
Summary: Perl IDL compiler for Samba4
Group: Development/Perl
%description pidl
Perl Interface Description Language compiler for Samba4.
%files pidl
%{_bindir}/pidl
%{perl_vendorlib}/Parse/Pidl*
%optional %{_mandir}/man1/pidl.1.*
%optional %{_mandir}/man3/Parse::Pidl*.3pm.*
#----------------------------------------------------------------------------
%package -n %{libnetapi}
Summary: Samba library for accessing functions in 'net' binary
Group: System/Libraries
%description -n %{libnetapi}
Samba library for accessing functions in 'net' binary.
%files -n %{libnetapi}
%{_libdir}/libnetapi.so.%{netapimajor}*
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{netapidevel}
Summary: Samba library for accessing functions in 'net' binary
Group: Development/C
Requires: %{libnetapi} = %{EVRD}
Provides: netapi-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{netapidevel}
Samba library for accessing functions in 'net' binary.
2014-12-22 20:09:02 +03:00
%files -n %{netapidevel}
%{_libdir}/libnetapi*.so
%{_includedir}/samba-4.0/netapi.h
%{_libdir}/pkgconfig/netapi.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libdcerpc}
Summary: Library implementing DCE/RPC for Samba4
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libdcerpc}
Library implementing DCE/RPC for Samba4.
2014-12-22 20:09:02 +03:00
%files -n %{libdcerpc}
%{_libdir}/libdcerpc.so.%{dcerpcmajor}*
%{_libdir}/libdcerpc-samr.so.%{dcerpcmajor}*
%{_libdir}/libdcerpc-atsvc.so.%{dcerpcmajor}*
%{_libdir}/libdcerpc-binding.so.%{dcerpcmajor}*
%{_libdir}/libdcerpc-server.so.%{dcerpcmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{dcerpcdevel}
Summary: Library implementing Samba's memory allocator
Group: Development/C
Requires: %{libdcerpc} = %{EVRD}
Provides: dcerpc-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{dcerpcdevel}
Library implementing Samba's memory allocator.
2014-12-22 20:09:02 +03:00
%files -n %{dcerpcdevel}
%{_libdir}/pkgconfig/dcerpc*.pc
%{_includedir}/samba-4.0/dcerpc*.h
%{_libdir}/libdcerpc.so
%{_libdir}/libdcerpc-samr.so
%{_libdir}/libdcerpc-atsvc.so
%{_libdir}/libdcerpc-binding.so
%{_libdir}/libdcerpc-server.so
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libndr}
Summary: Network Data Representation library from Samba4
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libndr}
Network Data Representation library from Samba4.
2014-12-22 20:09:02 +03:00
%files -n %{libndr}
%{_libdir}/libndr.so.%{ndrmajor}*
%{_libdir}/libndr-krb5pac.so.%{ndrmajor}*
%{_libdir}/libndr-nbt.so.%{ndrmajor}*
%{_libdir}/libndr-standard.so.%{ndrmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{ndrdevel}
Summary: Development files for Network Data Representation library from Samba4
Group: Development/C
Requires: %{libndr} = %{EVRD}
Provides: ndr-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{ndrdevel}
Development files for Network Data Representation library from Samba4.
2014-12-22 20:09:02 +03:00
%files -n %{ndrdevel}
%{_libdir}/pkgconfig/ndr*.pc
%{_libdir}/libndr*.so
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsambahostconfig}
Summary: Samba4's host configuration library
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libsambahostconfig}
Samba4's host configuration library.
2014-12-22 20:09:02 +03:00
%files -n %{libsambahostconfig}
%{_libdir}/libsamba-hostconfig.so.%{hostconfigmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{sambahostconfigdevel}
Summary: Samba4's host configuration library
Group: Development/C
Requires: %{libsambahostconfig} = %{EVRD}
Provides: samba-hostconfig-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{sambahostconfigdevel}
Samba4's host configuration library.
2014-12-22 20:09:02 +03:00
%files -n %{sambahostconfigdevel}
%{_libdir}/libsamba-hostconfig.so
%{_libdir}/pkgconfig/samba-hostconfig.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libwbclient}
Summary: Library providing access to winbindd
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libwbclient}
Library providing access to winbindd.
2014-12-22 20:09:02 +03:00
%files -n %{libwbclient}
%{_libdir}/libwbclient.so.%{wbclientmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{wbclientdevel}
Summary: Library providing access to winbindd
Group: Development/C
Requires: %{libwbclient} = %{EVRD}
Provides: wbclient-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{wbclientdevel}
Library providing access to winbindd.
2014-12-22 20:09:02 +03:00
%files -n %{wbclientdevel}
%{_libdir}/libwbclient.so
%{_includedir}/samba-4.0/wbclient.h
%{_libdir}/pkgconfig/wbclient.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsambautil}
Summary: Samba4 utility library
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libsambautil}
Samba4 utility library.
2014-12-22 20:09:02 +03:00
%files -n %{libsambautil}
%{_libdir}/libsamba-util.so.%{sambautilmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{sambautildevel}
Summary: Development files for Samba4 utility library
Group: Development/C
Requires: %{libsambautil} = %{EVRD}
Provides: samba-util-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{sambautildevel}
Development files for Samba4 utility library.
2014-12-22 20:09:02 +03:00
%files -n %{sambautildevel}
%{_libdir}/libsamba-util.so
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 17:37:06 +03:00
2014-12-22 20:09:02 +03:00
%package -n %{libregistry}
Summary: Samba4 registry library
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libregistry}
Samba4 registry library.
2014-12-22 20:09:02 +03:00
%files -n %{libregistry}
%{_libdir}/libregistry.so.%{registrymajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{registrydevel}
Summary: Development files for Samba4 registry library
Group: Development/C
Requires: %{libregistry} = %{EVRD}
Provides: registry-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{registrydevel}
Development files for Samba4 registry library.
2014-12-22 20:09:02 +03:00
%files -n %{registrydevel}
%{_includedir}/samba-4.0/registry.h
%{_libdir}/libregistry.so
%{_libdir}/pkgconfig/registry.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libgensec}
Summary: Samba4 generic security library
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libgensec}
Samba4 generic security library.
2014-12-22 20:09:02 +03:00
%files -n %{libgensec}
%{_libdir}/libgensec.so.%{gensecmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{gensecdevel}
Summary: Development files for Samba4 generic security library
Group: Development/C
Requires: %{libgensec} = %{EVRD}
Provides: gensecdevel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{gensecdevel}
Development files for Samba4 generic security library.
2014-12-22 20:09:02 +03:00
%files -n %{gensecdevel}
%{_includedir}/samba-4.0/gensec.h
%{_libdir}/libgensec.so
%{_libdir}/pkgconfig/gensec.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libpolicy}
Summary: Samba4 policy library
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libpolicy}
Samba4 policy library.
2014-12-22 20:09:02 +03:00
%files -n %{libpolicy}
%{_libdir}/libsamba-policy.so.%{policymajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libpolicydevel}
Summary: Development files for Samba4 policy library
Group: Development/C
Requires: %{libpolicy} = %{EVRD}
Provides: policy-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libpolicydevel}
Development files for Samba4 policy library.
2014-12-22 20:09:02 +03:00
%files -n %{libpolicydevel}
%{_libdir}/libsamba-policy.so
%{_libdir}/pkgconfig/samba-policy.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsamdb}
Summary: Samba4 samdb library
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libsamdb}
Samba4 samdb library.
2014-12-22 20:09:02 +03:00
%files -n %{libsamdb}
%{_libdir}/libsamdb.so.%{samdbmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsamdbdevel}
Summary: Development files for Samba4 samdb library
Group: Development/C
Requires: %{libsamdb} = %{EVRD}
Provides: samdb-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libsamdbdevel}
Development files for Samba4 samdb library.
2014-12-22 20:09:02 +03:00
%files -n %{libsamdbdevel}
%{_libdir}/libsamdb.so
%{_libdir}/pkgconfig/samdb.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package -n %{libsambapassdb}
2014-12-22 20:09:02 +03:00
Summary: Library for working with the Samba user database
Group: System/Libraries
%description -n %{libsambapassdb}
2014-12-22 20:09:02 +03:00
Library for working with the Samba user database.
%files -n %{libsambapassdb}
%{_libdir}/libsamba-passdb.so.%{passdbmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libcredentials}
Summary: Library for working with Samba credentials
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libcredentials}
Library for working with Samba credentials.
2014-12-22 20:09:02 +03:00
%files -n %{libcredentials}
%{_libdir}/libsamba-credentials.so.%{credentialsmajor}*
%{_libdir}/libsamba-credentials.so
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsmbconf}
Summary: Library for working with Samba config files
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libsmbconf}
Library for working with Samba config files.
2014-12-22 20:09:02 +03:00
%files -n %{libsmbconf}
%{_libdir}/libsmbconf.so.%{smbconfmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsmbldap}
Summary: Samba LDAP library
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libsmbldap}
Samba LDAP library.
2014-12-22 20:09:02 +03:00
%files -n %{libsmbldap}
%{_libdir}/libsmbldap.so.%{smbldapmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libtevent_util}
Summary: Utility library for working with the Tevent library
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libtevent_util}
Utility library for working with the Tevent library.
2014-12-22 20:09:02 +03:00
%files -n %{libtevent_util}
%{_libdir}/libtevent-util.so.%{tevent_utilmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%if %{with mysql}
%package passdb-mysql
Summary: Samba password database plugin for MySQL
Group: System/Libraries
2014-12-22 20:09:02 +03:00
%description passdb-mysql
The passdb-mysql package for samba provides a password database backend
allowing samba to store account details in a MySQL database.
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%if %{with pgsql}
%package passdb-pgsql
Summary: Samba password database plugin for PostgreSQL
Group: System/Libraries
Requires: %{libsambaserver} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description passdb-pgsql
The passdb-pgsql package for samba provides a password database backend
allowing samba to store account details in a PostgreSQL database.
2014-12-22 20:09:02 +03:00
%files passdb-pgsql
%{_libdir}/%{name}/pdb/*pgsql.so
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%if %{with cifs}
%package -n mount-cifs
Summary: CIFS filesystem mount helper
Group: Networking/Other
Requires: keyutils
2014-12-22 20:09:02 +03:00
%description -n mount-cifs
This package provides the mount.cifs helper to mount cifs filesystems
using the cifs filesystem driver.
2014-12-22 20:09:02 +03:00
%files -n mount-cifs
%attr(4755,root,root) /*bin/*mount.cifs
#/*bin/cifs.upcall
#{_mandir}/man8/*mount.cifs*.8*
#{_mandir}/man8/cifs.upcall*.8*
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libtorture}
Summary: Samba testsuite torture library
Group: Networking/Other
2014-12-22 20:09:02 +03:00
%description -n %{libtorture}
Samba testsuite torture library.
2014-12-22 20:09:02 +03:00
%files -n %{libtorture}
%{_libdir}/libtorture.so.%{torture_major}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%if %{with gtk}
%package domainjoin-gui
Summary: Domainjoin GUI
Group: System/Configuration/Other
BuildRequires: pkgconfig(gtk+-2.0)
2015-03-12 11:32:02 +00:00
Requires: %{name}-common = %{EVRD}
2014-12-22 20:09:02 +03:00
%description domainjoin-gui
The samba-domainjoin-gui package includes a domainjoin gtk application.
2014-12-22 20:09:02 +03:00
%files domainjoin-gui
%{_sbindir}/netdomjoin-gui
%dir %{_datadir}/pixmaps/samba
%{_datadir}/pixmaps/samba/samba.ico
%{_datadir}/pixmaps/samba/logo.png
%{_datadir}/pixmaps/samba/logo-small.png
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package -n openldap-schemas-%{name}
Summary: OpenLDAP schema files from %{name}-%{EVRD} source tree
Group: Databases
BuildArch: noarch
2015-03-23 11:57:31 +00:00
Requires(pre): openldap-config
%files -n openldap-schemas-%{name}
2015-03-23 11:57:31 +00:00
%config(noreplace) %{_sysconfdir}/openldap/schema/*
%attr(750,ldap,ldap) %config(noreplace) %{_sysconfdir}/openldap/slapd.d/%{name}.conf
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%prep
2014-12-22 20:09:02 +03:00
# Allow users to query build options with --with options:
#%%define opt_status(%1) %(echo %{1})
%if %{?_with_options:1}%{!?_with_options:0}
%define opt_status(%{1}) %(if [ %{1} -eq 1 ];then echo enabled;else echo disabled;fi)
#exit 1
%{error: }
%{error:Build options available are:}
%{error:--with[out] system Build as the system samba package [or as samba3]}
%{error:--with[out] winbind Build with Winbind support - %opt_status %{with winbind}}
%{error:--with[out] ads Build with Active Directory support - %opt_status %{with ads}}
%{error:--with[out] mysql Build MySQL passdb backend - %opt_status %{with mysql}}
%{error:--with[out] pgsql Build PostgreSQL passdb backend - %opt_status %{with pgsql}}
%{error:--with[out] test Enable testing and benchmarking tools - %opt_status %{with test}}
%{error: }
%else
#{error: }
#{error: This rpm has build options available, use --with options to see them}
#{error: }
echo -e "\n This rpm has build options available, use --with options to see them\n" >&2
sleep 1
%endif
2014-12-22 20:09:02 +03:00
%if %{?_with_options:1}%{!?_with_options:0}
clear
exit 1
%endif
2014-12-22 20:09:02 +03:00
%if %{build_non_default}
RPM_EXTRA_OPTIONS="\
%{?_with_system: --with system}\
%{?_without_system: --without system}\
%{?with winbind: --with winbind}\
%{?without winbind: --without winbind}\
%{?_with_ldap: --with ldap}\
%{?_without_ldap: --without ldap}\
%{?_with_ads: --with ads}\
%{?_without_ads: --without ads}\
"
# echo "Building a non-default rpm with the following command-line arguments:"
# echo "$RPM_EXTRA_OPTIONS"
# echo "This rpm was built with non-default options, thus, to build ">%{SOURCE7}
# echo "an identical rpm, you need to supply the following options">>%{SOURCE7}
# echo "at build time: $RPM_EXTRA_OPTIONS">>%{SOURCE7}
# echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7}
%else
# echo "This rpm was built with default options">%{SOURCE7}
# echo -e "\n%{name}-%{version}-%{release}\n">>%{SOURCE7}
%endif
2014-12-22 20:09:02 +03:00
#Try and validate signatures on source:
# FIXME: find public key used to sign samba4 releases
export GNUPGHOME=%{_tmppath}/samba-gpghome
if [ -d "$GNUPGHOME" ]
then echo "Error, GNUPGHOME $GNUPGHOME exists, remove it and try again"; exit 1
fi
install -d -m700 $GNUPGHOME
gpg --import %{SOURCE98}
VERIFYSOURCE=`basename %{SOURCE0}`
VERIFYSOURCE=%{_tmppath}/${VERIFYSOURCE%%.gz}
gzip -dc %{SOURCE0} > $VERIFYSOURCE
pushd %{_tmppath}
cp %{SOURCE99} .
#gpg --trust-model always --verify `basename %{SOURCE99}`
#VERIFIED=$?
VERIFIED=1
rm -f `basename %{SOURCE99}`
popd
rm -Rf $GNUPGHOME
2014-12-22 20:09:02 +03:00
rm -f $VERIFYSOURCE
if [ "$VERIFIED" -eq 0 ]
then
echo "Verification of %{SOURCE0} against %{SOURCE99} with key %{SOURCE98} succeeded"
else
echo "Source verification failed!" >&2
#exit 1
fi
2014-12-22 20:09:02 +03:00
%setup -q
%patch0 -p1 -b .tirpc~
2014-12-22 20:09:02 +03:00
%build
buildtools/bin/waf configure --enable-fhs \
--with-privatelibdir=%{_libdir}/%{name} \
--bundled-libraries=heimdal,!zlib,!popt,!talloc,!tevent,!tdb,!ldb \
2014-12-22 20:09:02 +03:00
--enable-gnutls \
--enable-cups \
--enable-avahi \
--with-systemd \
2014-12-22 20:09:02 +03:00
--with-pam \
--with-pam_smbpass \
%if %{with winbind}
--with-winbind \
%endif
%if %{with ads}
--with-ads \
%else
--without-ads \
%endif
--with-ldap \
--disable-rpath \
--disable-rpath-install \
--disable-rpath-private-install \
--enable-pthreadpool \
--enable-avahi \
--with-iconv \
--with-acl-support \
--with-dnsupdate \
--with-syslog \
--with-automount \
--with-aio-support \
--without-cluster-support \
2014-12-22 20:09:02 +03:00
--with-sendfile-support \
--with-dnsupdate \
--with-piddir=/run \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--localstatedir=%{_localstatedir} \
--with-modulesdir=%{_libdir}/%{name} \
-v -v -p \
%{?_smp_mflags}
2014-12-22 20:09:02 +03:00
# --with-system-mitkrb5 <--- probably a good idea, but causes
# samba_upgradeprovision and friends not to be built
#sed -i -e "s|, '-Wl,--no-undefined'||g" bin/c4che/default.cache.py
buildtools/bin/waf build -v -v %{?_smp_mflags}
2014-12-22 20:09:02 +03:00
%if %{with gtk}
cd source3/lib/netapi/examples/netdomjoin-gui
%__cc %{optflags} `pkg-config --cflags gtk+-2.0` -I../../../../../bin/default/include/public -o netdomjoin-gui netdomjoin-gui.c -L../../../../../bin/default/source3/ -lnetapi `pkg-config --libs gtk+-2.0`
%endif
2014-12-22 20:09:02 +03:00
%install
mkdir -p %{buildroot}
2014-12-22 20:09:02 +03:00
# Put stuff where it should go.
mkdir -p %{buildroot}/%{_libdir}/%{name}/
2014-12-22 20:09:02 +03:00
mkdir -p %{buildroot}/%{_datadir}/man/man8/
2014-12-22 20:09:02 +03:00
# Any entries here mean samba makefile is *really* broken:
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
mkdir -p %{buildroot}%{_datadir}
mkdir -p %{buildroot}%{_libdir}/%{name}/vfs
%makeinstall_std
# PAM modules don't go to /usr...
if [ -e %{buildroot}%{_libdir}/security ]; then
mkdir -p %{buildroot}/%{_lib}
mv %{buildroot}%{_libdir}/security %{buildroot}/%{_lib}
fi
2014-12-22 20:09:02 +03:00
#Even though we tell waf above where to put perl it gets it wrong
#mkdir -p %{buildroot}/%{perl_vendorlib}
#mv %{buildroot}%_datadir/perl5/* %{buildroot}/%{perl_vendorlib}
2014-12-22 20:09:02 +03:00
#need to stay
mkdir -p %{buildroot}/{sbin,bin}
mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,pam.d,xinetd.d}
mkdir -p %{buildroot}%{_initrddir}
mkdir -p %{buildroot}/var/cache/%{name}
mkdir -p %{buildroot}/var/log/%{name}
mkdir -p %{buildroot}/var/run/%{name}
mkdir -p %{buildroot}/var/spool/%{name}
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/private
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/{netlogon,profiles,printers}
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/codepages/src
mkdir -p %{buildroot}/%{_lib}/security
mkdir -p %{buildroot}%{_libdir}/pkgconfig
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir}/%{name}/vfs
mkdir -p %{buildroot}%{_datadir}/%{name}/scripts
# Fix some paths so provision works:
perl -pi -e 's,default_ldb_modules_dir = None,default_ldb_modules_dir = \"%{_libdir}/%{name}/ldb\",g' %{buildroot}/%{py_platsitedir}/samba/__init__.py
#perl -pi -e 's,share/samba/setup,share/%{name}/setup,g' %{buildroot}/%{python_sitearch}/samba/provision.py
%if %{with gtk}
install -m 755 source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui %{buildroot}/%{_sbindir}/netdomjoin-gui
mkdir -p %{buildroot}%{_datadir}/pixmaps/%{name}
install -m 644 source3/lib/netapi/examples/netdomjoin-gui/samba.ico %{buildroot}/%{_datadir}/pixmaps/%{name}/samba.ico
install -m 644 source3/lib/netapi/examples/netdomjoin-gui/logo.png %{buildroot}/%{_datadir}/pixmaps/%{name}/logo.png
install -m 644 source3/lib/netapi/examples/netdomjoin-gui/logo-small.png %{buildroot}/%{_datadir}/pixmaps/%{name}/logo-small.png
%endif
2014-12-22 20:09:02 +03:00
#libnss_* still not handled by make:
# Install the nsswitch library extension file
#for i in wins winbind; do
# install -m755 source4/nsswitch/libnss_${i}.so %{buildroot}/%{_lib}/libnss_${i}.so
#done
# Make link for wins and winbind resolvers
#( cd %{buildroot}/%{_lib}; ln -s libnss_wins.so libnss_wins.so.2; ln -s libnss_winbind.so libnss_winbind.so.2)
#install -d %{buildroot}/%{_libdir}/krb5/plugins
#install -m755 source4/bin/winbind_krb5_locator.so %{buildroot}/%{_libdir}/krb5/plugins
2014-12-22 20:09:02 +03:00
%if %{with test}
for i in {%{testbin}};do
mv %{buildroot}/%{_bindir}/$i %{buildroot}/%{_bindir}/${i} || :
done
%endif
2014-12-22 20:09:02 +03:00
# Install other stuff
2014-12-22 20:09:02 +03:00
install -m644 %{SOURCE28} %{buildroot}/%{_sysconfdir}/pam.d/%{name}
install -m644 %{SOURCE29} %{buildroot}/%{_sysconfdir}/pam.d/system-auth-winbind
#
install -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}-server
2014-12-22 20:09:02 +03:00
# install pam_winbind.conf sample file
mkdir -p %{buildroot}%{_sysconfdir}/security
2014-12-22 20:09:02 +03:00
# Some inline fixes for smb.conf for non-winbind use
install -m644 packaging/LSB/smb.conf %{buildroot}/%{_sysconfdir}/%{name}/smb.conf
cat packaging/LSB/smb.conf | \
touch %{buildroot}/%{_sysconfdir}/%{name}/smb.conf
#sed -e 's/^; printer admin = @adm/ printer admin = @adm/g' >%{buildroot}/%{_sysconfdir}/%{name}/smb.conf
sed -i -e "/^\[$section\]/,/^\[.*\]/ s|^\($option[ \t]*=[ \t]*\).*$|\1$value|" "%{buildroot}/%{_sysconfdir}/%{name}/smb.conf"
python %{SOURCE81} "%{buildroot}/%{_sysconfdir}/%{name}/smb.conf"
sed -i '/usershare path=.*/a # Syslog facility is disabled by default as samba throws too many debugging\n# messages. See /var/log/samba for samba messages or remove this line if you\n# so desire.' %{buildroot}/%{_sysconfdir}/%{name}/smb.conf
sed -i '/# so desire./a syslog=0' %{buildroot}/%{_sysconfdir}/%{name}/smb.conf
2014-12-22 20:09:02 +03:00
%if %{with cupspc}
#perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' %{buildroot}/%{_sysconfdir}/%{name}/smb.conf
#perl -pi -e 's/printcap name = lpstat/printcap name = cups/g' %{buildroot}/%{_sysconfdir}/%{name}/smb-winbind.conf
# Link smbspool to CUPS (does not require installed CUPS)
2014-12-22 20:09:02 +03:00
mkdir -p %{buildroot}/%{_libdir}/cups/backend
ln -s %{_bindir}/smbspool %{buildroot}/%{_libdir}/cups/backend/smb
%endif
2014-12-22 20:09:02 +03:00
echo 127.0.0.1 localhost > %{buildroot}/%{_sysconfdir}/%{name}/lmhosts
2014-12-22 20:09:02 +03:00
install -c -m 755 %{SOURCE10} %{buildroot}%{_datadir}/%{name}/scripts/print-pdf
2014-12-22 20:09:02 +03:00
# Move some stuff where it belongs...
mv %{buildroot}%{_libdir}/libnss* %{buildroot}/%{_lib}/
2014-12-22 20:09:02 +03:00
rm -f %{buildroot}/%{_mandir}/man1/testprns*
2014-12-22 20:09:02 +03:00
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
cat >%{buildroot}%{_sysconfdir}/ld.so.conf.d/samba.conf <<EOF
%{_libdir}/samba
EOF
2014-12-22 20:09:02 +03:00
mkdir -p %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig
install -m644 packaging/systemd/samba.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/samba
sed -i 's/NMBDOPTIONS=""/NMBDOPTIONS="-F"/g' %{buildroot}%{_sysconfdir}/sysconfig/samba
sed -i 's/SMBDOPTIONS=""/SMBDOPTIONS="-F"/g' %{buildroot}%{_sysconfdir}/sysconfig/samba
2014-12-22 20:09:02 +03:00
install -d -m 0755 %{buildroot}%{_prefix}/lib/tmpfiles.d/
install -m644 packaging/systemd/samba.conf.tmp %{buildroot}%{_prefix}/lib/tmpfiles.d/samba.conf
install -m644 packaging/systemd/*.service %{buildroot}%{_unitdir}/
sed -i 's|/usr/bin/kill|/bin/kill|g' %{buildroot}%{_unitdir}/*.service
2014-12-22 20:09:02 +03:00
# create /run/samba too.
echo "d /run/samba 755 root root" >> %{buildroot}%{_prefix}/lib/tmpfiles.d/samba.conf
# Prepare schema files to be included into OpenLDAP configuration
2015-03-23 11:57:31 +00:00
mkdir -p %{buildroot}%{_sysconfdir}/openldap/{schema,slapd.d}
install -m 0644 examples/LDAP/samba.schema %{buildroot}%{_sysconfdir}/openldap/schema/
install -m 0644 examples/LDAP/samba.ldif %{buildroot}%{_sysconfdir}/openldap/schema/
install -m 0644 examples/LDAP/README %{buildroot}%{_sysconfdir}/openldap/schema/README.samba
2015-03-23 11:57:31 +00:00
install -m 0640 %{SOURCE41} %{buildroot}%{_sysconfdir}/openldap/slapd.d/%{name}.conf