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 samdbmajor 0
%define policymajor 0
2015-10-22 01:51:45 +10:00
%define passdbmajor 0
2014-12-22 20:09:02 +03:00
%define credentialsmajor 0
%define smbconfmajor 0
%define smbldapmajor 0
%define tevent_utilmajor 0
2015-02-09 18:40:45 +05:00
%define nsswinsmajor 2
%define winbindmajor 2
%define sambaservermajor 0
2017-03-31 03:01:17 +10:00
%define sambaerrorsmajor 1
2012-03-13 16:03:19 +03:00
# 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
2012-03-13 16:03:19 +03:00
# CUPS supports functionality for 'printcap name = cups' (9.0 and later):
2014-12-22 20:09:02 +03:00
%bcond_without cupspc
2012-03-13 16:03:19 +03:00
# %_{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
2012-03-13 16:03:19 +03:00
# 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 libpolicy %mklibname samba-policy %{policymajor}
%define libpolicydevel %mklibname samba-policy -d
%define libsamdb %mklibname samdb %{samdbmajor}
%define libsamdbdevel %mklibname samdb -d
2015-10-22 01:51:45 +10:00
%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}
2015-02-09 18:40:45 +05:00
%define libnsswins %mklibname nsswins %{nsswinsmajor}
%define libwinbind %mklibname winbind %{winbindmajor}
%define libsambaserver %mklibname samba-server %{sambaservermajor}
2017-03-31 03:01:17 +10:00
%define libsambaerrors %mklibname samba-errors %{sambaerrorsmajor}
2012-03-13 16:03:19 +03:00
#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
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%global testbin smbtorture,masktest,locktest,gentest,ndrdump
2012-03-13 16:03:19 +03:00
%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
2018-03-14 19:56:28 +10:00
Version : 4.6.14
2017-03-30 16:56:41 +03:00
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
2012-03-13 16:03:19 +03:00
#Sources that used to be in packaging patch:
Source20 : smbusers
Source21 : smbprint
#Source22: smbadduser
Source23 : findsmb
2016-06-20 18:49:20 +03:00
#Source26: wrepld.init
2014-12-22 20:09:02 +03:00
Source28 : samba.pamd
2012-03-13 16:03:19 +03:00
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
2016-05-19 11:25:33 +03:00
Patch0 : samba-4.3.9-tirpc.patch
2016-07-24 17:11:21 +10:00
Patch2 : samba-4.3.11-winbind-service.patch
2018-12-08 20:50:23 +03:00
Patch3 : FreeBSD-third__party_aesni-intel_wscript.patch
2014-12-22 20:09:02 +03:00
# Required for ldb docs
BuildRequires : docbook-style-xsl
# For -fuse-ld
BuildRequires : gcc
BuildRequires : gnupg
2015-10-22 02:31:24 +10:00
BuildRequires : perl-Parse-Yapp
2014-12-22 20:09:02 +03:00
BuildRequires : python-tdb
BuildRequires : python-tevent
BuildRequires : xsltproc
BuildRequires : acl-devel
BuildRequires : cups-devel
BuildRequires : keyutils-devel
2017-03-31 01:16:47 +10:00
BuildRequires : libaio-devel
2012-03-13 16:03:19 +03:00
# 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 : pkgconfig(ctdb) >= 2.0
BuildRequires : pkgconfig(gnutls)
%if %{with ads}
BuildRequires : pkgconfig(krb5)
%endif
2017-03-31 01:18:08 +10:00
BuildRequires : pkgconfig(ldb) >= 1.1.29
2014-12-22 20:09:02 +03:00
%if %{with pgsql}
BuildRequires : pkgconfig(libpq)
%endif
2017-02-10 16:36:29 +10:00
BuildRequires : pkgconfig(libsystemd)
2014-12-22 20:09:02 +03:00
BuildRequires : pkgconfig(libtirpc)
BuildRequires : pkgconfig(libxml-2.0)
BuildRequires : pkgconfig(ncurses)
BuildRequires : pkgconfig(popt)
BuildRequires : pkgconfig(pyldb-util)
BuildRequires : pkgconfig(pytalloc-util)
2017-02-10 16:36:29 +10:00
BuildRequires : pkgconfig(talloc)
2014-12-22 20:09:02 +03:00
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
2015-03-12 05:17:53 +00: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.
2017-03-31 03:01:17 +10:00
%define __noautoreq '(lib(non-posix-acls|dcerpc-(atsvc|binding|samr|server)|dcerpc|ndr-(krb5pac|nbt|standard)|ndr|netapi|nss_winbind|pdb|samba-(credentials|hostconfig|policy|util)|samdb|smb(client|conf|ldap)|tevent-util|samba-errors|wbclient)|pam_winbind|winbind_krb5_locator)\.so|devel.*'
2012-03-13 16:03:19 +03:00
%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 " L a n M a n a g e r " ) 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}
2012-03-13 16:03:19 +03:00
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
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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
2015-03-12 05:17:53 +00:00
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
2012-03-13 16:03:19 +03:00
%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 " L a n M a n a g e r " ) 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
2015-10-22 01:51:45 +10:00
%{_bindir} /oLschema2ldif
%{_sbindir} /samba
%{_sbindir} /samba_dnsupdate
%{_sbindir} /samba_spnupdate
%{_sbindir} /samba_upgradedns
2015-02-09 18:40:45 +05:00
%{_sbindir} /smbd
%{_sbindir} /nmbd
%attr (-,root,root) %config (noreplace) %{_sysconfdir} /logrotate.d/%{name} -server
%attr (-,root,root) %config (noreplace) %{_sysconfdir} /pam.d/%{name}
2015-10-22 01:51:45 +10:00
%{_mandir} /man?/oLschema2ldif.*
2015-02-09 18:40:45 +05:00
%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 " F l u s h i n g S a m b a c a c h e . "
/usr/bin/net cache flush > /dev/null 2>&1 || :
fi
2017-03-31 03:01:17 +10:00
%preun server
%systemd_preun nmb.service
%systemd_preun smb.service
2015-02-09 18:40:45 +05:00
#----------------------------------------------------------------------------
%package -n %{libsambaserver}
Summary : Samba-server libraries
Group : System/Libraries
2015-03-12 05:17:53 +00:00
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
2017-03-31 03:01:17 +10:00
Obsoletes : %{_lib}gensec0 < 1:4.6
Obsoletes : %{_lib}registry0 < 1:4.6
2015-02-09 18:40:45 +05:00
%description -n %{libsambaserver}
Provides libraries for samba-server
%files -n %{libsambaserver}
2014-12-22 20:09:02 +03:00
%{_libdir} /%{name} /vfs/*.so
%dir %{_libdir} /samba
%{_libdir} /samba/ldb
%{_libdir} /samba/service
%{_libdir} /samba/process_model
%{_libdir} /samba/gensec
%{_libdir} /samba/auth
2015-10-22 01:51:45 +10:00
%{_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
2015-02-25 12:24:25 +00:00
%{_sysconfdir} /ld.so.conf.d
2014-12-22 20:09:02 +03:00
%if %{with ads}
2015-10-22 01:51:45 +10:00
%{_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
2015-10-22 01:51:45 +10:00
%{_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
2017-03-31 03:01:17 +10:00
%{_libdir} /samba/libcom_err-samba4.so.0
%{_libdir} /samba/libcom_err-samba4.so.0.25
2015-10-22 01:51:45 +10:00
%{_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
2015-10-22 01:51:45 +10:00
%{_libdir} /samba/libdfs-server-ad-samba4.so
%{_libdir} /samba/libdlz-bind9-for-torture-samba4.so
%{_libdir} /samba/libdnsserver-common-samba4.so
2017-03-31 03:01:17 +10:00
%{_libdir} /samba/libdsdb-garbage-collect-tombstones-samba4.so
2015-10-22 01:51:45 +10:00
%{_libdir} /samba/libdsdb-module-samba4.so
%{_libdir} /samba/libevents-samba4.so
%{_libdir} /samba/libflag-mapping-samba4.so
%{_libdir} /samba/libgenrand-samba4.so
2017-03-31 03:01:17 +10:00
%{_libdir} /samba/libgensec-samba4.so
2015-10-22 01:51:45 +10:00
%{_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
2015-10-22 01:51:45 +10:00
%{_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
2015-10-22 01:51:45 +10:00
%{_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
2015-10-22 01:51:45 +10:00
%{_libdir} /samba/libkrb5samba-samba4.so
2015-02-09 18:40:45 +05:00
#%{_libdir}/samba/libldb-cmdline.so - does not build. removed? not configured? to be investigated.
2015-10-22 01:51:45 +10:00
%{_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
2015-10-22 01:51:45 +10:00
%{_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/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
2017-03-31 03:01:17 +10:00
%{_libdir} /samba/libregistry-samba4.so
2015-10-22 01:51:45 +10:00
%{_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
2015-10-22 01:51:45 +10:00
%{_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
2017-03-31 03:01:17 +10:00
%{_libdir} /samba/libsmbclient-raw-samba4.so
2015-10-22 01:51:45 +10:00
%{_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/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
2017-03-31 03:01:17 +10:00
%{_libdir} /samba/libtorture-samba4.so
2015-10-22 01:51:45 +10:00
%{_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
2018-12-08 20:50:23 +03:00
%ifarch x86_64
%{_libdir} /samba/libaesni-intel-samba4.so
%endif
2014-12-22 20:09:02 +03:00
%{_libdir} /samba/libwind-samba4.so.0
%{_libdir} /samba/libwind-samba4.so.0.0.0
2015-10-22 01:51:45 +10:00
%{_libdir} /samba/libxattr-tdb-samba4.so
2015-03-12 05:17:53 +00:00
%{_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
2015-02-09 18:40:45 +05:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
2012-03-13 16:03:19 +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
2012-03-13 16:03:19 +03:00
%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
2015-10-22 01:51:45 +10:00
%{_bindir} /cifsdd
2014-12-22 20:09:02 +03:00
%{_bindir} /dbwrap_tool
%{_bindir} /eventlogadm
2017-03-31 03:01:17 +10:00
%{_bindir} /findsmb
%{_bindir} /mvxattr
2014-12-22 20:09:02 +03:00
%{_bindir} /net
2015-10-22 01:51:45 +10:00
%{_bindir} /nmblookup
2014-12-22 20:09:02 +03:00
%{_bindir} /pdbedit
%{_bindir} /profiles
%{_bindir} /rpcclient
%{_sbindir} /samba_kcc
2015-10-22 01:51:45 +10:00
%{_bindir} /samba-tool
2014-12-22 20:09:02 +03:00
%{_bindir} /sharesec
%{_bindir} /smbcacls
2015-10-22 01:51:45 +10:00
%{_bindir} /smbclient
2014-12-22 20:09:02 +03:00
%{_bindir} /smbcontrol
%{_bindir} /smbcquotas
%{_bindir} /smbget
%{_bindir} /smbpasswd
%{_bindir} /smbspool
%{_bindir} /smbstatus
%{_bindir} /smbtree
%{_bindir} /samba-regedit
%{_bindir} /smbtar
%{_mandir} /man1/dbwrap_tool.1*
%{_mandir} /man8/samba-tool.8*
%{_mandir} /man8/samba-regedit.8*
# Link of smbspool to CUPS
%if %{with cupspc}
%{_libdir} /cups/backend/smb
2012-03-13 16:03:19 +03:00
%endif
2017-03-31 03:01:17 +10:00
%{_prefix} /libexec/samba/smbspool_krb5_wrapper
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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}
2017-03-31 03:01:17 +10:00
Requires : %{libsambaerrors} = %{EVRD}
2015-10-22 01:51:45 +10:00
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
2012-03-13 16:03:19 +03:00
2015-03-12 05:17:53 +00:00
# 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}
2015-03-12 05:17:53 +00:00
Requires : %{libsmbconf} = %{EVRD}
Requires : %{libtevent_util} = %{EVRD}
Requires : %{libsambahostconfig} = %{EVRD}
Requires : %{libwinbind} = %{EVRD}
Requires : %{libndr} = %{EVRD}
Requires : %{libwbclient} = %{EVRD}
Requires : %{libcredentials} = %{EVRD}
2015-10-22 01:51:45 +10:00
Requires : %{libsambapassdb} = %{EVRD}
2015-03-12 05:17:53 +00:00
Requires : %{libsmbldap} = %{EVRD}
Requires : %{libsambautil} = %{EVRD}
2015-03-12 11:32:02 +00:00
Requires : %{libdcerpc} = %{EVRD}
2015-03-12 05:17:53 +00:00
2012-03-13 16:03:19 +03:00
%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}
2015-02-09 18:40:45 +05:00
%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}
2015-10-22 01:51:45 +10:00
%{_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*
2017-03-31 03:01:17 +10:00
%{_mandir} /man1/mvxattr.1*
2014-12-22 20:09:02 +03:00
%{_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*
2017-03-31 03:01:17 +10:00
%{_mandir} /man8/cifsdd.8*
2014-12-22 20:09:02 +03:00
%{_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*
2016-03-09 22:52:15 +10:00
%{_mandir} /man8/smbspool_krb5_wrapper.8*
2014-12-22 20:09:02 +03:00
%{_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*
2015-10-22 01:51:45 +10:00
%{_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*
2015-10-22 01:51:45 +10:00
%{_mandir} /man8/vfs_fruit.8*
2014-12-22 20:09:02 +03:00
%{_mandir} /man8/vfs_full_audit.8*
2015-10-22 01:51:45 +10:00
%{_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*
2017-03-31 03:01:17 +10:00
%{_mandir} /man8/vfs_offline.8*
2014-12-22 20:09:02 +03:00
%{_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_shadow_copy.8*
%{_mandir} /man8/vfs_shadow_copy2.8*
2015-10-22 01:51:45 +10:00
%{_mandir} /man8/vfs_shell_snap.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*
2015-10-22 01:51:45 +10:00
%{_mandir} /man8/vfs_unityed_media.8*
%{_mandir} /man8/vfs_worm.8*
2018-12-16 05:51:18 +03:00
%{_mandir} /man8/vfs_btrfs.8*
%{_mandir} /man8/vfs_linux_xfs_sgid.8*
%{_mandir} /man8/vfs_syncops.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}
2012-03-13 16:03:19 +03:00
%package doc
2014-12-22 20:09:02 +03:00
Summary : Documentation for Samba servers and clients
Group : Documentation
2012-03-13 16:03:19 +03:00
%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
2012-03-13 16:03:19 +03:00
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2015-02-09 18:40:45 +05:00
%package -n %{libwinbind}
Summary : Samba-winbind daemon libraries
Group : System/Libraries
2015-03-12 05:17:53 +00:00
Conflicts : %{libsambaserver} < 1:4.1.17
2015-02-09 18:40:45 +05:00
%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
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
%package winbind
2014-12-22 20:09:02 +03:00
Summary : Samba-winbind daemon, utilities and documentation
Group : System/Servers
Requires : %{name} -common = %{EVRD}
2015-02-09 18:40:45 +05:00
Requires : %{libwinbind} = %{EVRD}
2014-12-22 20:09:02 +03:00
2012-03-13 16:03:19 +03:00
%description winbind
2012-03-13 17:37:06 +03:00
Provides the winbind daemon and testing tools to allow authentication
2012-03-13 16:03:19 +03:00
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
2018-12-16 06:33:19 +03:00
# winbind service must not be auto-enabled e.g. because it will break Samba as a Domain Controller
# https://wiki.samba.org/index.php/Configuring_Winbindd_on_a_Samba_AD_DC#The_winbindd_Service
2014-12-22 20:09:02 +03:00
%systemd_post winbind.service
%preun winbind
if [ $1 = 0 ]; then
echo " R e m o v i n g w i n b i n d e n t r i e s f r o m %{_sysconfdir} / n s s w i t c h . c o n f "
perl -pi -e 's/ winbind//' %{_sysconfdir} /nsswitch.conf
2017-03-31 03:01:17 +10:00
chkconfig winbind reset
2014-12-22 20:09:02 +03:00
fi
#----------------------------------------------------------------------------
2015-02-09 18:40:45 +05:00
%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}
2015-03-12 05:17:53 +00:00
Conflicts : nss_wins < 1:4.1.17
Obsoletes : nss_wins < 1:4.1.17
2015-03-05 18:39:59 +05:00
Provides : nss_wins = %{EVRD}
2014-12-22 20:09:02 +03:00
Requires(pre) : glibc
2015-03-12 05:17:53 +00:00
# A clumzy approach to get rid of LOOPS - provide deps for individual libs _by hand_
Requires : %{libsmbconf} = %{EVRD}
Requires : %{libsambautil} = %{EVRD}
2015-02-09 18:40:45 +05:00
%description -n %{libnsswins}
2012-03-13 17:37:06 +03:00
Provides the libnss_wins shared library which resolves NetBIOS names to
2012-03-13 16:03:19 +03:00
IP addresses.
2015-02-09 18:40:45 +05:00
%files -n %{libnsswins}
2014-12-22 20:09:02 +03:00
%attr (755,root,root) /%{_lib}/libnss_wins.so*
2015-02-09 18:40:45 +05:00
%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 " A d d i n g a w i n s e n t r y t o t h e h o s t s s e c t i o n o f %{_sysconfdir} / n s s w i t c h . c o n f "
awk '/^hosts/ {print $0 " wins"};!/^hosts/ {print}' %{_sysconfdir} /nsswitch.conf.rpmsave >%{_sysconfdir} /nsswitch.conf;
else
echo " w i n s e n t r y f o u n d i n %{_sysconfdir} / n s s w i t c h . c o n f "
fi
fi
2015-02-09 18:40:45 +05:00
%preun -n %{libnsswins}
2014-12-22 20:09:02 +03:00
if [ $1 = 0 ]; then
echo " R e m o v i n g w i n s e n t r y f r o m %{_sysconfdir} / n s s w i t c h . c o n f "
perl -pi -e 's/ wins//' %{_sysconfdir} /nsswitch.conf
fi
#----------------------------------------------------------------------------
%package python
Summary : Samba Python modules
Group : Development/Python
BuildRequires : pkgconfig(python)
2015-03-12 05:17:53 +00:00
# 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
2016-04-17 17:49:43 +03:00
%{py_platsitedir} /*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%if %{with test}
2012-03-13 16:03:19 +03:00
%package test
2014-12-22 20:09:02 +03:00
Summary : Debugging and benchmarking tools for samba
Group : System/Servers
Requires : %{name} -common = %{EVRD}
2012-03-13 16:03:19 +03:00
%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)
2012-03-13 16:03:19 +03:00
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
%package -n %{libname}
2014-12-22 20:09:02 +03:00
Summary : SMB Client Library
2012-03-13 16:03:19 +03:00
Group : System/Libraries
2014-12-22 20:09:02 +03:00
Provides : libsmbclient = %{EVRD}
2012-03-13 16:03:19 +03:00
%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.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libname}
%{_libdir} /libsmbclient.so.%{libsmbmajor} *
#----------------------------------------------------------------------------
%package -n %{devname}
Summary : SMB Client Library Development files
2012-03-13 16:03:19 +03:00
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 : %{libtevent_util} = %{EVRD}
Requires : %{libwbclient} = %{EVRD}
Requires : %{libsambahostconfig} = %{EVRD}
Requires : %{libndr} = %{EVRD}
Requires : %{libsmbconf} = %{EVRD}
Requires : %{libsambautil} = %{EVRD}
2017-03-31 03:01:17 +10:00
Requires : %{libsambaerrors} = %{EVRD}
2015-03-17 08:52:28 +00:00
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
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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}
2015-10-22 01:51:45 +10:00
Obsoletes : %{_lib}smbsharemodes-devel < 1:4.3.1
2017-03-31 03:01:17 +10:00
Obsoletes : %{_lib}gensec-devel < 1:4.6
Obsoletes : %{_lib}registry-devel < 1:4.6
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/domain_credentials.h
%dir %{_includedir} /samba-4.0/gen_ndr
%{_includedir} /samba-4.0/gen_ndr/*.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/tdr.h
%{_includedir} /samba-4.0/tsocket.h
%{_includedir} /samba-4.0/tsocket_internal.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/samba-util.pc
2017-03-31 03:01:17 +10:00
%{_libdir} /libsamba-errors.so
2015-10-22 01:51:45 +10:00
%{_libdir} /libsamba-passdb.so
2014-12-22 20:09:02 +03:00
%{_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
2015-10-22 01:51:45 +10:00
%{_includedir} /samba-4.0/smb2_lease_struct.h
2014-12-22 20:09:02 +03:00
%{_includedir} /samba-4.0/smb_ldap.h
%{_includedir} /samba-4.0/smbconf.h
%{_includedir} /samba-4.0/smbldap.h
%{_libdir} /pkgconfig/samba-credentials.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} *
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
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}
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{netapidevel}
Samba library for accessing functions in 'net' binary.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{netapidevel}
%{_libdir} /libnetapi*.so
%{_includedir} /samba-4.0/netapi.h
%{_libdir} /pkgconfig/netapi.pc
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%package -n %{libdcerpc}
Summary : Library implementing DCE/RPC for Samba4
Group : System/Libraries
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libdcerpc}
Library implementing DCE/RPC for Samba4.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libdcerpc}
%{_libdir} /libdcerpc.so.%{dcerpcmajor} *
%{_libdir} /libdcerpc-samr.so.%{dcerpcmajor} *
%{_libdir} /libdcerpc-binding.so.%{dcerpcmajor} *
%{_libdir} /libdcerpc-server.so.%{dcerpcmajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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}
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{dcerpcdevel}
Library implementing Samba's memory allocator.
2012-03-13 16:03:19 +03:00
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-binding.so
%{_libdir} /libdcerpc-server.so
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%package -n %{libndr}
Summary : Network Data Representation library from Samba4
2012-03-13 16:03:19 +03:00
Group : System/Libraries
2014-12-22 20:09:02 +03:00
%description -n %{libndr}
Network Data Representation library from Samba4.
2012-03-13 16:03:19 +03:00
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} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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}
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{ndrdevel}
Development files for Network Data Representation library from Samba4.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{ndrdevel}
%{_libdir} /pkgconfig/ndr*.pc
%{_libdir} /libndr*.so
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%package -n %{libsambahostconfig}
Summary : Samba4's host configuration library
Group : System/Libraries
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libsambahostconfig}
Samba4's host configuration library.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libsambahostconfig}
%{_libdir} /libsamba-hostconfig.so.%{hostconfigmajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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}
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{sambahostconfigdevel}
Samba4's host configuration library.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{sambahostconfigdevel}
%{_libdir} /libsamba-hostconfig.so
%{_libdir} /pkgconfig/samba-hostconfig.pc
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%package -n %{libwbclient}
Summary : Library providing access to winbindd
Group : System/Libraries
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libwbclient}
Library providing access to winbindd.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libwbclient}
%{_libdir} /libwbclient.so.%{wbclientmajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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}
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{wbclientdevel}
Library providing access to winbindd.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{wbclientdevel}
%{_libdir} /libwbclient.so
%{_includedir} /samba-4.0/wbclient.h
%{_libdir} /pkgconfig/wbclient.pc
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%package -n %{libsambautil}
Summary : Samba4 utility library
Group : System/Libraries
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libsambautil}
Samba4 utility library.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libsambautil}
%{_libdir} /libsamba-util.so.%{sambautilmajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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}
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{sambautildevel}
Development files for Samba4 utility library.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{sambautildevel}
%{_libdir} /libsamba-util.so
2012-03-13 16:03:19 +03:00
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 %{libpolicy}
Summary : Samba4 policy library
Group : System/Libraries
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libpolicy}
Samba4 policy library.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libpolicy}
%{_libdir} /libsamba-policy.so.%{policymajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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}
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libpolicydevel}
Development files for Samba4 policy library.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libpolicydevel}
%{_libdir} /libsamba-policy.so
%{_libdir} /pkgconfig/samba-policy.pc
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%package -n %{libsamdb}
Summary : Samba4 samdb library
Group : System/Libraries
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libsamdb}
Samba4 samdb library.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libsamdb}
%{_libdir} /libsamdb.so.%{samdbmajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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}
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libsamdbdevel}
Development files for Samba4 samdb library.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libsamdbdevel}
%{_libdir} /libsamdb.so
%{_libdir} /pkgconfig/samdb.pc
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2015-10-22 01:51:45 +10:00
%package -n %{libsambapassdb}
2014-12-22 20:09:02 +03:00
Summary : Library for working with the Samba user database
Group : System/Libraries
2015-11-26 15:56:54 +10:00
Obsoletes : %{_lib}pdb0 < 1:4.3.1
2012-03-13 16:03:19 +03:00
2015-10-22 01:51:45 +10:00
%description -n %{libsambapassdb}
2014-12-22 20:09:02 +03:00
Library for working with the Samba user database.
2012-03-13 16:03:19 +03:00
2015-10-22 01:51:45 +10:00
%files -n %{libsambapassdb}
%{_libdir} /libsamba-passdb.so.%{passdbmajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%package -n %{libcredentials}
Summary : Library for working with Samba credentials
Group : System/Libraries
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libcredentials}
Library for working with Samba credentials.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libcredentials}
%{_libdir} /libsamba-credentials.so.%{credentialsmajor} *
2015-03-12 05:17:53 +00:00
%{_libdir} /libsamba-credentials.so
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%package -n %{libsmbconf}
Summary : Library for working with Samba config files
Group : System/Libraries
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libsmbconf}
Library for working with Samba config files.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libsmbconf}
%{_libdir} /libsmbconf.so.%{smbconfmajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%package -n %{libsmbldap}
Summary : Samba LDAP library
Group : System/Libraries
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libsmbldap}
Samba LDAP library.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libsmbldap}
%{_libdir} /libsmbldap.so.%{smbldapmajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description -n %{libtevent_util}
Utility library for working with the Tevent library.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files -n %{libtevent_util}
%{_libdir} /libtevent-util.so.%{tevent_utilmajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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
2012-03-13 16:03:19 +03:00
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.
2012-03-13 16:03:19 +03:00
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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
2015-03-12 05:17:53 +00:00
Requires : %{libsambaserver} = %{EVRD}
2012-03-13 16:03:19 +03:00
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.
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%files passdb-pgsql
%{_libdir} /%{name} /pdb/*pgsql.so
2012-03-13 16:03:19 +03:00
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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
2012-03-13 16:03:19 +03:00
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.
2012-03-13 16:03:19 +03:00
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*
2012-03-13 16:03:19 +03:00
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2017-03-31 03:01:17 +10:00
%package -n %{libsambaerrors}
Summary : Samba errors library
Group : System/Libraries
2012-03-13 16:03:19 +03:00
2017-03-31 03:01:17 +10:00
%description -n %{libsambaerrors}
Samba errors library.
2012-03-13 16:03:19 +03:00
2017-03-31 03:01:17 +10:00
%files -n %{libsambaerrors}
%{_libdir} /libsamba-errors.so.%{sambaerrorsmajor} *
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +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}
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%description domainjoin-gui
The samba-domainjoin-gui package includes a domainjoin gtk application.
2012-03-13 16:03:19 +03:00
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
2012-03-13 16:03:19 +03:00
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2012-03-13 16:03:19 +03:00
2015-10-22 01:51:45 +10:00
%package -n openldap-schemas-%{name}
2015-02-27 12:26:30 +00:00
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
2015-02-27 12:26:30 +00:00
2015-10-22 01:51:45 +10:00
%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
2015-02-27 12:26:30 +00:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%prep
2015-02-27 12:26:30 +00:00
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 T h i s r p m h a s b u i l d o p t i o n s a v a i l a b l e , u s e - - w i t h o p t i o n s t o s e e t h e m \n " >&2
sleep 1
2012-03-13 16:03:19 +03:00
%endif
2014-12-22 20:09:02 +03:00
%if %{?_with_options:1}%{!?_with_options:0}
clear
exit 1
2012-03-13 16:03:19 +03:00
%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}
2012-03-13 16:03:19 +03:00
%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 " $ G N U P G H O M E " ]
then echo " E r r o r , G N U P G H O M E $ G N U P G H O M E e x i s t s , r e m o v e i t a n d t r y a g a i n " ; 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
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
rm -f $VERIFYSOURCE
if [ " $ V E R I F I E D " -eq 0 ]
then
echo " V e r i f i c a t i o n o f %{SOURCE0} a g a i n s t %{SOURCE99} w i t h k e y %{SOURCE98} s u c c e e d e d "
else
echo " S o u r c e v e r i f i c a t i o n f a i l e d ! " >&2
#exit 1
fi
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%setup -q
%patch0 -p1 -b .tirpc~
2016-07-24 17:11:21 +10:00
%patch2 -p1 -b .winbind~
2018-12-08 20:50:23 +03:00
# FreeBSD-third__party_aesni-intel_wscript.patch
%patch3 -p0
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%build
2016-05-19 11:25:33 +03:00
CFLAGS=-g buildtools/bin/waf configure --enable-fhs \
2014-12-22 20:09:02 +03:00
--with-privatelibdir=%{_libdir} /%{name} \
2015-10-22 01:51:45 +10:00
--bundled-libraries=heimdal,!zlib,!popt,!talloc,!tevent,!tdb,!ldb \
2014-12-22 20:09:02 +03:00
--enable-gnutls \
--enable-cups \
--enable-avahi \
2015-05-14 14:46:25 +00:00
--with-systemd \
2014-12-22 20:09:02 +03:00
--with-pam \
%if %{with winbind}
--with-winbind \
%endif
%if %{with ads}
--with-ads \
%else
--without-ads \
%endif
--with-ldap \
2018-12-08 20:50:23 +03:00
%ifarch x86_64
--accel-aes=intelaesni \
%endif
2014-12-22 20:09:02 +03:00
--disable-rpath \
--disable-rpath-install \
--disable-rpath-private-install \
--enable-pthreadpool \
--enable-avahi \
--with-iconv \
--with-acl-support \
--with-dnsupdate \
--with-syslog \
--with-automount \
2015-10-22 01:51:45 +10:00
--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 \
2015-10-22 01:51:45 +10:00
%{?_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
2015-10-22 01:51:45 +10:00
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`
2012-03-13 16:03:19 +03:00
%endif
2014-12-22 20:09:02 +03:00
%install
mkdir -p %{buildroot}
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
# Put stuff where it should go.
2015-03-12 05:17:53 +00:00
mkdir -p %{buildroot} /%{_libdir} /%{name} /
2014-12-22 20:09:02 +03:00
mkdir -p %{buildroot} /%{_datadir} /man/man8/
2012-03-13 16:03:19 +03:00
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
2012-03-13 16:03:19 +03:00
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}
2012-03-13 16:03:19 +03:00
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
2012-03-13 16:03:19 +03:00
%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
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
%if %{with test}
for i in {%{testbin} };do
2017-10-05 22:48:04 +10:00
mv %{buildroot} /%{_bindir} /$i %{buildroot} /%{_bindir} /${i} || :
2014-12-22 20:09:02 +03:00
done
2012-03-13 16:03:19 +03:00
%endif
2014-12-22 20:09:02 +03:00
# Install other stuff
2012-03-13 16:03:19 +03:00
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
#
2015-02-09 18:40:45 +05:00
install -m644 %{SOURCE1} %{buildroot} /%{_sysconfdir} /logrotate.d/%{name} -server
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
# install pam_winbind.conf sample file
mkdir -p %{buildroot} %{_sysconfdir} /security
2012-03-13 16:03:19 +03:00
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 " / ^ \ [ $ s e c t i o n \ ] / , / ^ \ [ . * \ ] / s | ^ \ ( $ o p t i o n [ \t ] * = [ \t ] * \ ) . * $ | \1 $ v a l u e | " " %{buildroot} / %{_sysconfdir} / %{name} / s m b . c o n f "
python %{SOURCE81} " %{buildroot} / %{_sysconfdir} / %{name} / s m b . c o n f "
2015-05-15 09:26:52 +00:00
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}
2017-10-05 22:48:04 +10:00
mkdir -p %{buildroot} /%{_libdir} /cups/backend
ln -s %{_bindir} /smbspool %{buildroot} /%{_libdir} /cups/backend/smb
2012-03-13 16:03:19 +03:00
%endif
2017-10-05 22:48:04 +10:00
echo 127.0.0.1 localhost > %{buildroot} /%{_sysconfdir} /%{name} /lmhosts
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
install -c -m 755 %{SOURCE10} %{buildroot} %{_datadir} /%{name} /scripts/print-pdf
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
# Move some stuff where it belongs...
mv %{buildroot} %{_libdir} /libnss* %{buildroot} /%{_lib}/
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
rm -f %{buildroot} /%{_mandir} /man1/testprns*
2012-03-13 16:03:19 +03:00
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
2012-03-13 16:03:19 +03:00
2014-12-22 20:09:02 +03:00
mkdir -p %{buildroot} %{_unitdir} %{buildroot} %{_sysconfdir} /sysconfig
2015-05-15 09:26:52 +00:00
install -m644 packaging/systemd/samba.sysconfig %{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
2015-05-15 08:11:57 +00:00
install -m644 packaging/systemd/*.service %{buildroot} %{_unitdir} /
2015-05-15 11:23:16 +00:00
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 / r u n / s a m b a 7 5 5 r o o t r o o t " >> %{buildroot} %{_prefix} /lib/tmpfiles.d/samba.conf
2015-02-27 12:26:30 +00:00
# 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}
2017-04-09 10:35:54 +03:00
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
install -m 0640 %{SOURCE41} %{buildroot} %{_sysconfdir} /openldap/slapd.d/%{name} .conf