# 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" # # To view current parameters, including directories: sbmd -b ####### # TODO: ctdb (--with-cluster-support) %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 %define passdbmajor 0 %define credentialsmajor 0 %define smbconfmajor 0 %define smbldapmajor 2 %define tevent_utilmajor 0 %define nsswinsmajor 2 %define winbindmajor 2 %define sambaerrorsmajor 1 # Default options # gcc5 seems to build a bit faster than clang6 %bcond_with clang %bcond_with verbose %bcond_with strace %bcond_with doc %bcond_with cifs %bcond_without ads %bcond_without test # CUPS supports functionality for 'printcap name = cups' (9.0 and later): %bcond_without cupspc %bcond_with mysql %bcond_with pgsql # Bundled avahi config (off by default, # because GVFS/KIO find Samba shares automatically and make duplicates otherwise) # We also use --enable-avahi in build options %bcond_with avahi_service %bcond_without noautoreq # 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} %bcond_with gtk # zerro is a dummy value bellow # # this package does not contain libraries %define libs_config %mklibname samba-libs-config 0 # In these packages libraries are private and unversioned %define libsambalibs %mklibname samba-libs 0 %define winbind_krb5_locator %mklibname winbind-krb5-locator 0 # transitional name (obsoleted by samba-libs) %define libsambaserver %mklibname samba-server 0 %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 %define libsambapassdb %mklibname samba-passdb %{passdbmajor} %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 libsambaerrors %mklibname samba-errors %{sambaerrorsmajor} #Define sets of binaries that we can use in globs and loops: %global commonbin ntlm_auth,testparm,regdiff,regpatch,regshell,regtree %global cifs_bin mount.cifs,umount.cifs %global testbin smbtorture,masktest,locktest,gentest,ndrdump %define build_expsam xml%{?_with_pgsql:,pgsql}%{?_with_mysql:,mysql} %define _serverbuild_flags -fstack-protector-all %global smb_usershare_dir %{_localstatedir}/lib/samba/usershare Summary: Samba SMB server Name: samba Version: 4.10.6 Release: 1 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 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 Source28: samba.pamd Source29: system-auth-winbind.pamd Source41: openldap-samba.conf %if %{with avahi_service} Source42: avahi_samba.xml %endif Source100: %{name}.rpmlintrc # OpenBSD-* patches are based on patches in OpenBSD net/samba; # in some cases conditions like 'if platform=OpenBSD' are removed; # in some cases patches are just rediffed. Patch2: samba-4.3.11-winbind-service.patch Patch4: OpenBSD-Reverse-order-of-paths-added.patch Patch7: OpenBSD-Lock-order-violation.patch Patch8: ROSA-bind-GID.patch Patch10: ROSA-vendor-version.patch Patch11: ROSA-smb-default-config.patch Patch12: ROSA-Clearer-debug-about-ulimits.patch Patch13: ROSA-Force-libsystemd.patch %if %{with clang} BuildRequires: clang lld %else BuildRequires: gcc %endif # Required for ldb docs BuildRequires: docbook-style-xsl BuildRequires: gnupg BuildRequires: perl-Parse-Yapp BuildRequires: python-tdb BuildRequires: python-tevent BuildRequires: xsltproc BuildRequires: acl-devel BuildRequires: cups-devel BuildRequires: keyutils-devel BuildRequires: libaio-devel # Samba 3.2 and later should be built with capabilities support: # http://lists.samba.org/archive/samba/2009-March/146821.html 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 BuildRequires: pkgconfig(ldb) >= 1.1.29 %if %{with pgsql} BuildRequires: pkgconfig(libpq) %endif BuildRequires: pkgconfig(libsystemd) BuildRequires: pkgconfig(libtirpc) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(ncurses) BuildRequires: pkgconfig(popt) BuildRequires: pkgconfig(pyldb-util) BuildRequires: pkgconfig(pytalloc-util) BuildRequires: pkgconfig(talloc) BuildRequires: pkgconfig(tdb) BuildRequires: pkgconfig(tevent) BuildRequires: pkgconfig(jansson) BuildRequires: pkgconfig(libarchive) BuildRequires: pkgconfig(python3) BuildRequires: %{_lib}cmocka-devel BuildRequires: gpgme-devel %if %{mdvver} >= 201900 # libnsl.so was removed from glibc-devel BuildRequires: pkgconfig(libnsl) %endif %if %{with strace} BuildRequires: strace %endif Requires: pam >= 0.64 Requires: %{name}-common = %{EVRD} Requires: %{libsambalibs} = %{EVRD} # 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. %if %{with noautoreq} %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.*' %endif %description 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 or AD 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 #---------------------------------------------------------------------------- # All packages containing %%{_libdir}/samba/*.so* must manually depend from %%{libs_config} # To find them: # rpm -qf /usr/lib64/samba/*.so* /usr/lib64/samba/*/*.so* --qf '%{NAME}\n' | sort -u # This package is not a library, but 64 and 32 bit libraries will require # architecture-specific config, so I'm prefixing the name of this package with lib64/lib via %%mklibname # Why make a separate package for one config? Because it allows to freely split other # libraries between packages, not all libraries in /usr/lib64/samba/ are in lib64samba-server0. # Libraries from /usr/lib64/ and /lib64/ built from samba source package also # depend from libraries in /usr/lib64/samba/. # Yes, packaging plain text as 'lib64samba-libs-config0' violates packaging policy... # What to do? urpmi can't handle bi/multiarch packages with the same name, as far as I understand. # Leaving ld.so.conf.d/*.conf in e.g. lib64sambaserver0, as it was in samba < 4.9, # is not a good idea in general. # We can try enabling RPATH in build options, then all resulting libraries will have hardcoded # RPATH = %%{_libdir}/samba. We will also need to move libwbclient.so* to %%{_libdir}/samba/ # to fix its issues with RPATH (see Fedora's spec). Not a good idea. %package -n %{libs_config} Summary: ldconfig configuration for Samba libraries Group: System/Libraries %description -n %{libs_config} ldconfig configuration for Samba libraries %files -n %{libs_config} %dir %{_libdir}/samba %{_sysconfdir}/ld.so.conf.d/samba_%{_arch}.conf #---------------------------------------------------------------------------- %package server Summary: Samba (SMB) server programs Group: Networking/Other Requires: %{name}-common = %{EVRD} Requires: %{libsambalibs} = %{EVRD} # provision requires samba4-python Requires: %{name}-python = %{EVRD} # 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 #Samba-server and it's libraries were shipped in single package before 4.1.16 Obsoletes: %{name}-server < 1:4.1.17 %if %{without gtk} Obsoletes: %{name}-domainjoin-gui < %{EVRD} %endif %rename samba %rename samba-server-ldap %description server 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}/samba-gpupdate %{_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/samba.8* %{_mandir}/man8/samba-gpupdate.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#Enable_usershares groupadd -frg 430 sambashare mkdir -p %{smb_usershare_dir} chown root:sambashare %{smb_usershare_dir} chmod 1770 %{smb_usershare_dir} 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 if [ $1 -gt 1 ] ; then echo "Flushing Samba cache." /usr/bin/net cache flush > /dev/null 2>&1 || : fi %preun server %systemd_preun nmb.service %systemd_preun smb.service #---------------------------------------------------------------------------- %package -n %{libsambalibs} Summary: Samba libraries Group: System/Libraries Requires: %{libs_config} # Manually resolving dependencies due to using __noautoreq (see above) Requires: %{libname} = %{EVRD} Requires: %{libnetapi} = %{EVRD} Requires: %{libdcerpc} = %{EVRD} Requires: %{libsambahostconfig} = %{EVRD} Requires: %{libndr} = %{EVRD} Requires: %{libwbclient} = %{EVRD} Requires: %{libsambautil} = %{EVRD} Requires: %{libpolicy} = %{EVRD} Requires: %{libsamdb} = %{EVRD} Requires: %{libsambapassdb} = %{EVRD} Requires: %{libcredentials} = %{EVRD} Requires: %{libsmbconf} = %{EVRD} Requires: %{libsmbldap} = %{EVRD} Requires: %{libtevent_util} = %{EVRD} Requires: %{libnsswins} = %{EVRD} Requires: %{libwinbind} = %{EVRD} Requires: %{libsambaerrors} = %{EVRD} # samba-common is the package with smb.conf and manuals # /etc/samba/smb.conf is read by e.g. libsmbclient.so.0 Requires: %{name}-common = %{EVRD} # 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 Obsoletes: %{_lib}gensec0 < 1:4.6 Obsoletes: %{_lib}registry0 < 1:4.6 Obsoletes: %{libsambaserver} < 1:4.9.4-5 %description -n %{libsambalibs} Provides libraries for Samba %files -n %{libsambalibs} %{_libdir}/%{name}/vfs/*.so %{_libdir}/samba/ldb %{_libdir}/samba/service %{_libdir}/samba/process_model %{_libdir}/samba/gensec %{_libdir}/samba/auth %{_libdir}/samba/libCHARSET3-samba4.so %{_libdir}/samba/libMESSAGING-SEND-samba4.so %{_libdir}/samba/libHDB-SAMBA4-samba4.so %{_libdir}/samba/libLIBWBCLIENT-OLD-samba4.so %{_libdir}/samba/libMESSAGING-samba4.so %{_libdir}/samba/libaddns-samba4.so %if %{with ads} %{_libdir}/samba/libads-samba4.so %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-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/libclidns-samba4.so %{_libdir}/samba/libcluster-samba4.so %{_libdir}/samba/libcmdline-credentials-samba4.so %{_libdir}/samba/libcmdline-contexts-samba4.so %{_libdir}/samba/libgpext-samba4.so %{_libdir}/samba/libcommon-auth-samba4.so %{_libdir}/samba/libcom_err-samba4.so.0 %{_libdir}/samba/libcom_err-samba4.so.0.25 %{_libdir}/samba/libdb-glue-samba4.so %{_libdir}/samba/libdbwrap-samba4.so %{_libdir}/samba/libdcerpc-samba-samba4.so %{_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-garbage-collect-tombstones-samba4.so %{_libdir}/samba/libscavenge-dns-records-samba4.so %{_libdir}/samba/libdsdb-module-samba4.so %{_libdir}/samba/libevents-samba4.so %{_libdir}/samba/libflag-mapping-samba4.so %{_libdir}/samba/libgenrand-samba4.so %{_libdir}/samba/libgensec-samba4.so %{_libdir}/samba/libgse-samba4.so %{_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 %{_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 %{_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 %{_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/libpac-samba4.so %{_libdir}/samba/libpopt-samba3-samba4.so %{_libdir}/samba/libpopt-samba3-cmdline-samba4.so %{_libdir}/samba/libposix-eadb-samba4.so %{_libdir}/samba/libprinting-migrate-samba4.so %{_libdir}/samba/libprocess-model-samba4.so %{_libdir}/samba/libregistry-samba4.so %{_libdir}/samba/libreplace-samba4.so %{_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/libsmbclient-raw-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/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/libtorture-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 %{_libdir}/samba/libnon-posix-acls-samba4.so %ifarch x86_64 %{_libdir}/samba/libaesni-intel-samba4.so %endif %{_libdir}/samba/libwind-samba4.so.0 %{_libdir}/samba/libwind-samba4.so.0.0.0 %{_libdir}/samba/libxattr-tdb-samba4.so %{_libdir}/samba/bind9 %dir %{_libdir}/samba/vfs %{_libdir}/%{name}/nss_info %{_libdir}/%{name}/idmap #---------------------------------------------------------------------------- %package client Summary: Samba (SMB) client programs Group: Networking/Other Requires: %{name}-common = %{EVRD} Requires: %{libsambalibs} = %{EVRD} Requires: %{libname} = %{EVRD} Requires: mount-cifs # For samba-tool Requires: ldb-utils Requires: python-ldb Requires: python-talloc Requires: python-tdb # smbclient is common in other distros Provides: smbclient = %{EVRD} %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. %files client %{_bindir}/cifsdd %{_bindir}/dbwrap_tool %{_bindir}/findsmb %{_bindir}/mvxattr %{_bindir}/net %{_bindir}/nmblookup %{_bindir}/pdbedit %{_bindir}/profiles %{_bindir}/rpcclient %{_sbindir}/samba_kcc %{_sbindir}/eventlogadm %{_bindir}/samba-tool %{_bindir}/sharesec %{_bindir}/smbcacls %{_bindir}/smbclient %{_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 %endif # see smbspool_krb5_wrapper(8) why such attributes %attr(0700,root,root) %{_libexecdir}/samba/smbspool_krb5_wrapper #---------------------------------------------------------------------------- %package common Summary: Files used by both Samba servers and clients Group: System/Servers # rpcclient etc. use samba python modules Requires: %{name}-python = %{EVRD} Requires: %{libsambalibs} = %{EVRD} Requires(post): systemd %rename samba-common-ldap Conflicts: samba3-common %description common Samba-common provides files necessary for both the server and client packages of Samba. %files common %{_prefix}/lib/tmpfiles.d/samba.conf %dir /var/cache/%{name} %dir /var/log/%{name} %ghost /var/run/%{name} %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 %{_datadir}/%{name} %dir %{_sysconfdir}/%{name} %attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/smb.conf %attr(-,root,root) %config(noreplace) %{_sysconfdir}/%{name}/lmhosts %if %{with avahi_service} %config %{_sysconfdir}/avahi/services/smb.service %endif %dir %{_localstatedir}/lib/%{name} %attr(-,root,root) %{_localstatedir}/lib/%{name}/codepages %{_mandir}/man1/findsmb.1* %{_mandir}/man1/log2pcap.1* %{_mandir}/man1/mvxattr.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/traffic_learner.7* %{_mandir}/man7/traffic_replay.7* %{_mandir}/man8/cifsdd.8* %{_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/smbspool_krb5_wrapper.8* %{_mandir}/man8/winbind_krb5_locator.8* %{_mandir}/man8/vfs_acl_tdb.8* %{_mandir}/man8/vfs_acl_xattr.8* %{_mandir}/man8/vfs_aio_fork.8* %{_mandir}/man8/vfs_aio_pthread.8* %{_mandir}/man8/vfs_audit.8* %{_mandir}/man8/vfs_cap.8* %{_mandir}/man8/vfs_catia.8* %{_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* %{_mandir}/man8/vfs_full_audit.8* %{_mandir}/man8/vfs_glusterfs_fuse.8* %{_mandir}/man8/vfs_media_harmony.8* %{_mandir}/man8/vfs_netatalk.8* %{_mandir}/man8/vfs_offline.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* %{_mandir}/man8/vfs_shell_snap.8* %{_mandir}/man8/vfs_snapper.8* %{_mandir}/man8/vfs_streams_depot.8* %{_mandir}/man8/vfs_streams_xattr.8* %{_mandir}/man8/vfs_time_audit.8* %{_mandir}/man8/vfs_xattr_tdb.8* %{_mandir}/man8/vfs_unityed_media.8* %{_mandir}/man8/vfs_worm.8* %{_mandir}/man8/vfs_btrfs.8* %{_mandir}/man8/vfs_linux_xfs_sgid.8* %{_mandir}/man8/vfs_syncops.8* %{_mandir}/man8/vfs_virusfilter.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 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. %files doc %doc README COPYING %doc WHATSNEW.txt Roadmap %doc clean-docs/samba-doc/docs/* %doc clean-docs/samba-doc/examples %endif #---------------------------------------------------------------------------- %package -n %{libwinbind} Summary: Samba-winbind daemon libraries Requires: %{libs_config} Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} 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* #---------------------------------------------------------------------------- %package winbind Summary: Samba-winbind daemon, utilities and documentation Group: System/Servers Requires: %{libsambalibs} = %{EVRD} Requires: %{libwinbind} = %{EVRD} Suggests: %{winbind_krb5_locator} %description winbind Provides the winbind daemon and testing tools to allow authentication and group/user enumeration from a Windows or Samba domain controller. %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 %{_sysconfdir}/NetworkManager/dispatcher.d/30-winbind %{_mandir}/man8/winbindd.8* %{_mandir}/man8/idmap_*.8* %post winbind # 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 %systemd_post winbind.service #---------------------------------------------------------------------------- %package -n %{libnsswins} Summary: Name Service Switch service for WINS Group: System/Libraries Conflicts: nss_wins < 1:4.1.17 Obsoletes: nss_wins < 1:4.1.17 Provides: nss_wins = %{EVRD} Requires(pre): glibc Requires: %{libsambalibs} = %{EVRD} # A clumzy approach to get rid of LOOPS - provide deps for individual libs _by hand_ Requires: %{libsambalibs} = %{EVRD} %description -n %{libnsswins} Provides the libnss_wins shared library which resolves NetBIOS names to IP addresses. %files -n %{libnsswins} %attr(755,root,root) /%{_lib}/libnss_wins.so* %post -n %{libnsswins} 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 #---------------------------------------------------------------------------- %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} %description python Samba Python modules. %files python %{py_platsitedir}/samba/* #---------------------------------------------------------------------------- %if %{with test} %package test Summary: Debugging and benchmarking tools for samba Group: System/Servers Requires: %{name}-common = %{EVRD} Requires: %{libsambalibs} = %{EVRD} %description test 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 #---------------------------------------------------------------------------- %package -n %{libname} Summary: SMB Client Library Group: System/Libraries Provides: libsmbclient = %{EVRD} # Manually resolve dependencies due to using __noautoreq (see above) Requires: %{libsambalibs} = %{EVRD} %description -n %{libname} This package contains the SMB client library, part of the samba suite of networking software, allowing other software to access SMB shares. %files -n %{libname} %{_libdir}/libsmbclient.so.%{libsmbmajor}* #---------------------------------------------------------------------------- %package -n %{devname} Summary: SMB Client Library Development files Group: Development/C Requires: %{libname} = %{EVRD} Requires: samba-devel = %{EVRD} 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 #---------------------------------------------------------------------------- %package devel Summary: Samba 4 development package Group: Development/C Requires: %{devname} = %{EVRD} Requires: %{libsambalibs} = %{EVRD} Obsoletes: %{_lib}smbsharemodes-devel < 1:4.3.1 Obsoletes: %{_lib}gensec-devel < 1:4.6 Obsoletes: %{_lib}registry-devel < 1:4.6 %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}/libsamba-errors.so %{_libdir}/libsamba-passdb.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/smb2_lease_struct.h %{_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 Requires: %{libsambalibs} = %{EVRD} %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 Requires: %{libsambalibs} = %{EVRD} %description -n %{libnetapi} Samba library for accessing functions in 'net' binary. %files -n %{libnetapi} %{_libdir}/libnetapi.so.%{netapimajor}* #---------------------------------------------------------------------------- %package -n %{netapidevel} Summary: Samba library for accessing functions in 'net' binary Group: Development/C Requires: %{libnetapi} = %{EVRD} Requires: samba-devel = %{EVRD} Provides: netapi-devel = %{EVRD} %description -n %{netapidevel} Samba library for accessing functions in 'net' binary. %files -n %{netapidevel} %{_libdir}/libnetapi*.so %{_includedir}/samba-4.0/netapi.h %{_libdir}/pkgconfig/netapi.pc #---------------------------------------------------------------------------- %package -n %{libdcerpc} Summary: Library implementing DCE/RPC for Samba4 Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libdcerpc} Library implementing DCE/RPC for Samba4. %files -n %{libdcerpc} %{_libdir}/libdcerpc.so.%{dcerpcmajor}* %{_libdir}/libdcerpc-samr.so.%{dcerpcmajor}* %{_libdir}/libdcerpc-binding.so.%{dcerpcmajor}* %{_libdir}/libdcerpc-server.so.%{dcerpcmajor}* #---------------------------------------------------------------------------- %package -n %{dcerpcdevel} Summary: Library implementing Samba's memory allocator Group: Development/C Requires: %{libdcerpc} = %{EVRD} Requires: samba-devel = %{EVRD} Provides: dcerpc-devel = %{EVRD} %description -n %{dcerpcdevel} Library implementing Samba's memory allocator. %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 #---------------------------------------------------------------------------- %package -n %{libndr} Summary: Network Data Representation library from Samba4 Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libndr} Network Data Representation library from Samba4. %files -n %{libndr} %{_libdir}/libndr.so.%{ndrmajor}* %{_libdir}/libndr-krb5pac.so.%{ndrmajor}* %{_libdir}/libndr-nbt.so.%{ndrmajor}* %{_libdir}/libndr-standard.so.%{ndrmajor}* #---------------------------------------------------------------------------- %package -n %{ndrdevel} Summary: Development files for Network Data Representation library from Samba4 Group: Development/C Requires: %{libndr} = %{EVRD} Requires: samba-devel = %{EVRD} Provides: ndr-devel = %{EVRD} %description -n %{ndrdevel} Development files for Network Data Representation library from Samba4. %files -n %{ndrdevel} %{_libdir}/pkgconfig/ndr*.pc %{_libdir}/libndr*.so #---------------------------------------------------------------------------- %package -n %{libsambahostconfig} Summary: Samba4's host configuration library Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libsambahostconfig} Samba4's host configuration library. %files -n %{libsambahostconfig} %{_libdir}/libsamba-hostconfig.so.%{hostconfigmajor}* #---------------------------------------------------------------------------- %package -n %{sambahostconfigdevel} Summary: Samba4's host configuration library Group: Development/C Requires: %{libsambahostconfig} = %{EVRD} Requires: samba-devel = %{EVRD} Provides: samba-hostconfig-devel = %{EVRD} %description -n %{sambahostconfigdevel} Samba4's host configuration library. %files -n %{sambahostconfigdevel} %{_libdir}/libsamba-hostconfig.so %{_libdir}/pkgconfig/samba-hostconfig.pc #---------------------------------------------------------------------------- %package -n %{libwbclient} Summary: Library providing access to winbindd Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libwbclient} Library providing access to winbindd. %files -n %{libwbclient} %{_libdir}/libwbclient.so.%{wbclientmajor}* #---------------------------------------------------------------------------- %package -n %{wbclientdevel} Summary: Library providing access to winbindd Group: Development/C Requires: %{libwbclient} = %{EVRD} Requires: samba-devel = %{EVRD} Provides: wbclient-devel = %{EVRD} %description -n %{wbclientdevel} Library providing access to winbindd. %files -n %{wbclientdevel} %{_libdir}/libwbclient.so %{_includedir}/samba-4.0/wbclient.h %{_libdir}/pkgconfig/wbclient.pc #---------------------------------------------------------------------------- %package -n %{libsambautil} Summary: Samba4 utility library Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libsambautil} Samba4 utility library. %files -n %{libsambautil} %{_libdir}/libsamba-util.so.%{sambautilmajor}* #---------------------------------------------------------------------------- %package -n %{sambautildevel} Summary: Development files for Samba4 utility library Group: Development/C Requires: %{libsambautil} = %{EVRD} Requires: samba-devel = %{EVRD} Provides: samba-util-devel = %{EVRD} Obsoletes: samba-devel < 1:4.10.4 %description -n %{sambautildevel} Development files for Samba4 utility library. %files -n %{sambautildevel} %{_libdir}/libsamba-util.so %{_libdir}/pkgconfig/samba-util.pc #---------------------------------------------------------------------------- %package -n %{libpolicy} Summary: Samba4 policy library Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libpolicy} Samba4 policy library. %files -n %{libpolicy} %{_libdir}/libsamba-policy.so.%{policymajor}* #---------------------------------------------------------------------------- %package -n %{libpolicydevel} Summary: Development files for Samba4 policy library Group: Development/C Requires: %{libpolicy} = %{EVRD} Requires: samba-devel = %{EVRD} Provides: policy-devel = %{EVRD} %description -n %{libpolicydevel} Development files for Samba4 policy library. %files -n %{libpolicydevel} %{_libdir}/libsamba-policy.so %{_libdir}/pkgconfig/samba-policy.pc #---------------------------------------------------------------------------- %package -n %{libsamdb} Summary: Samba4 samdb library Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libsamdb} Samba4 samdb library. %files -n %{libsamdb} %{_libdir}/libsamdb.so.%{samdbmajor}* #---------------------------------------------------------------------------- %package -n %{libsamdbdevel} Summary: Development files for Samba4 samdb library Group: Development/C Requires: %{libsamdb} = %{EVRD} Requires: samba-devel = %{EVRD} Provides: samdb-devel = %{EVRD} %description -n %{libsamdbdevel} Development files for Samba4 samdb library. %files -n %{libsamdbdevel} %{_libdir}/libsamdb.so %{_libdir}/pkgconfig/samdb.pc #---------------------------------------------------------------------------- %package -n %{libsambapassdb} Summary: Library for working with the Samba user database Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} Obsoletes: %{_lib}pdb0 < 1:4.3.1 %description -n %{libsambapassdb} Library for working with the Samba user database. %files -n %{libsambapassdb} %{_libdir}/libsamba-passdb.so.%{passdbmajor}* #---------------------------------------------------------------------------- %package -n %{libcredentials} Summary: Library for working with Samba credentials Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libcredentials} Library for working with Samba credentials. %files -n %{libcredentials} %{_libdir}/libsamba-credentials.so.%{credentialsmajor}* %{_libdir}/libsamba-credentials.so #---------------------------------------------------------------------------- %package -n %{libsmbconf} Summary: Library for working with Samba config files Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libsmbconf} Library for working with Samba config files. %files -n %{libsmbconf} %{_libdir}/libsmbconf.so.%{smbconfmajor}* #---------------------------------------------------------------------------- %package -n %{libsmbldap} Summary: Samba LDAP library Group: System/Libraries # due to libsmbldap.so.* depending from private libs in %%{_libdir}/samba/ Obsoletes: %{_lib}smbldap0 < 1:4. Requires: %{libsambalibs} = %{EVRD} %description -n %{libsmbldap} Samba LDAP library. %files -n %{libsmbldap} %{_libdir}/libsmbldap.so.%{smbldapmajor}* #---------------------------------------------------------------------------- %package -n %{libtevent_util} Summary: Utility library for working with the Tevent library Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libtevent_util} Utility library for working with the Tevent library. %files -n %{libtevent_util} %{_libdir}/libtevent-util.so.%{tevent_utilmajor}* #---------------------------------------------------------------------------- %if %{with mysql} %package passdb-mysql Summary: Samba password database plugin for MySQL Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %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 #---------------------------------------------------------------------------- %if %{with pgsql} %package passdb-pgsql Summary: Samba password database plugin for PostgreSQL Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description passdb-pgsql The passdb-pgsql package for samba provides a password database backend allowing samba to store account details in a PostgreSQL database. %files passdb-pgsql %{_libdir}/samba/pdb/*pgsql.so %endif #---------------------------------------------------------------------------- %if %{with cifs} %package -n mount-cifs Summary: CIFS filesystem mount helper Group: Networking/Other Requires: keyutils %description -n mount-cifs This package provides the mount.cifs helper to mount cifs filesystems using the cifs filesystem driver. %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 #---------------------------------------------------------------------------- %package -n %{libsambaerrors} Summary: Samba errors library Group: System/Libraries Requires: %{libsambalibs} = %{EVRD} %description -n %{libsambaerrors} Samba errors library. %files -n %{libsambaerrors} %{_libdir}/libsamba-errors.so.%{sambaerrorsmajor}* #---------------------------------------------------------------------------- %if %{with gtk} %package domainjoin-gui Summary: Domainjoin GUI Group: System/Configuration/Other BuildRequires: pkgconfig(gtk+-2.0) Requires: %{libsambalibs} = %{EVRD} %description domainjoin-gui The samba-domainjoin-gui package includes a domainjoin gtk application. %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 #---------------------------------------------------------------------------- %package -n openldap-schemas-%{name} Summary: OpenLDAP schema files from %{name}-%{EVRD} source tree Group: Databases BuildArch: noarch Requires(pre): openldap-config %files -n openldap-schemas-%{name} %config(noreplace) %{_sysconfdir}/openldap/schema/* %attr(750,ldap,ldap) %config(noreplace) %{_sysconfdir}/openldap/slapd.d/%{name}.conf #---------------------------------------------------------------------------- # From Fedora %package -n %{winbind_krb5_locator} Summary: Samba winbind krb5 locator Requires: %{libsambalibs} Requires: %{libwbclient} = %{EVRD} Requires: samba-winbind = %{EVRD} Obsoletes: %{_lib}winbind2 < 1:4.9.4-5 # Handle winbind_krb5_locator.so as alternatives to allow # IPA AD trusts case where it should not be used by libkrb5 # The plugin will be diverted to /dev/null by the FreeIPA # freeipa-server-trust-ad subpackage due to higher priority # and restored to the proper one on uninstall Requires(post): update-alternatives Requires(postun): update-alternatives Requires(preun): update-alternatives %description -n %{winbind_krb5_locator} The winbind krb5 locator is a plugin for the system kerberos library to allow the local kerberos library to use the same KDC as samba and winbind use %files -n %{winbind_krb5_locator} %ghost %{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so %{_libdir}/samba/krb5/winbind_krb5_locator.so # Fedora ships mans in the same package with libraries # We can't do that to allow coexisting of 32 and 64 bit libraries in one system # So we ship it in samba-common #%%{_mandir}/man8/winbind_krb5_locator.8* %postun -n %{winbind_krb5_locator} if [ "$1" -ge "1" ]; then if [ "`readlink %{_sysconfdir}/alternatives/winbind_krb5_locator.so`" == "%{_libdir}/samba/krb5/winbind_krb5_locator.so" ]; then %{_sbindir}/update-alternatives --set winbind_krb5_locator.so %{_libdir}/samba/krb5/winbind_krb5_locator.so fi fi %post -n %{winbind_krb5_locator} %{_sbindir}/update-alternatives --install %{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so \ winbind_krb5_locator.so %{_libdir}/samba/krb5/winbind_krb5_locator.so 10 %preun -n %{winbind_krb5_locator} if [ $1 -eq 0 ]; then %{_sbindir}/update-alternatives --remove winbind_krb5_locator.so %{_libdir}/samba/krb5/winbind_krb5_locator.so fi #---------------------------------------------------------------------------- %prep # 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 %if %{?_with_options:1}%{!?_with_options:0} clear exit 1 %endif %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 #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 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 %setup -q %apply_patches grep -q '@ROSA_VENDOR_PATCH@' VERSION # validate # SAMBA_VERSION_VENDOR_PATCH is a floating constant sed -e 's/@ROSA_VENDOR_PATCH@/%{release}/g' -i VERSION %build %if %{with verbose} %define verbosity -vvv %else %define verbosity %{nil} %endif %if %{with strace} %define strace strace %else %define strace %{nil} %endif install -d -m 0755 %{buildroot}/%{_libdir}/samba %if %{with clang} %clang_gcc_wrapper %endif export CFLAGS="-O2 -g" # Starting from samba 4.10.0 python3 is default, # this temporarily makes python2 still default; # I don't want to build copies of python2 packages for python3 # for just one Samba major version, samba 4.11 will remove python2 completely, # so let's stay with python2 for now and then switch to python3 # (also, python3 is not the newest in ROSA). export PYTHON=python2 chmod +x ./buildtools/bin/waf %{strace} ./buildtools/bin/waf %{verbosity} configure \ --enable-fhs \ --with-modulesdir=%{_libdir}/samba \ --localstatedir=%{_localstatedir} \ --libexecdir=%{_libexecdir} \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} \ --with-piddir=/run/samba \ --with-lockdir=/run/samba \ --with-sockets-dir=/run/samba \ --with-statedir=%{_var}/lib/samba \ --with-cachedir=%{_var}/cache/samba \ --bundled-libraries=heimdal,!zlib,!popt,!talloc,!tevent,!tdb,!ldb \ --enable-gnutls \ --enable-cups \ --enable-avahi \ --with-pam \ %if %{with winbind} --with-winbind \ %endif %if %{with ads} --with-ads \ %else --without-ads \ %endif --with-ldap \ %ifarch x86_64 --accel-aes=intelaesni \ %endif --disable-rpath \ --disable-rpath-install \ --disable-rpath-private-install \ --enable-pthreadpool \ --with-iconv \ --with-acl-support \ --with-dnsupdate \ --with-automount \ --without-cluster-support \ --without-lttng \ --disable-glusterfs \ --with-sendfile-support \ --with-dnsupdate \ --with-systemd \ --with-systemddir=%{_unitdir} \ --systemd-install-services \ -v -v -p \ %{?_smp_mflags} # --with-privatelibdir=%{_libdir}/%{name} \ # --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 %{verbosity} %{?_smp_mflags} %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 %install mkdir -p %{buildroot} # Put stuff where it should go. mkdir -p %{buildroot}/%{_libdir}/%{name}/ mkdir -p %{buildroot}/%{_datadir}/man/man8/ # 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 #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} #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 # https://bugzilla.samba.org/show_bug.cgi?id=13866 # conflicts between python-tdb and samba-python rm -fv %{buildroot}/%{py_platsitedir}/*.so rm -fv %{buildroot}/%{py_platsitedir}/*.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 #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 %if %{with test} for i in {%{testbin}};do mv %{buildroot}/%{_bindir}/$i %{buildroot}/%{_bindir}/${i} || : done %endif # Install other stuff 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 # install pam_winbind.conf sample file mkdir -p %{buildroot}%{_sysconfdir}/security # Install patched default config install -m0644 examples/smb.conf.default %{buildroot}/%{_sysconfdir}/%{name}/smb.conf sed -i -e 's,@ROSA_PLATFORM@,%{rosa_release},g' %{buildroot}/%{_sysconfdir}/%{name}/smb.conf sed -i -e 's,@smb_usershare_dir@,%{smb_usershare_dir},g' %{buildroot}/%{_sysconfdir}/%{name}/smb.conf %if %{with cupspc} mkdir -p %{buildroot}/%{_libdir}/cups/backend ln -s %{_bindir}/smbspool %{buildroot}/%{_libdir}/cups/backend/smb %endif echo 127.0.0.1 localhost > %{buildroot}/%{_sysconfdir}/%{name}/lmhosts install -c -m 755 %{SOURCE10} %{buildroot}%{_datadir}/%{name}/scripts/print-pdf # Move some stuff where it belongs... mv %{buildroot}%{_libdir}/libnss* %{buildroot}/%{_lib}/ rm -f %{buildroot}/%{_mandir}/man1/testprns* mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d cat >%{buildroot}%{_sysconfdir}/ld.so.conf.d/samba_%{_arch}.conf <> %{buildroot}%{_prefix}/lib/tmpfiles.d/samba.conf # Prepare schema files to be included into OpenLDAP configuration 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 install -m 0640 %{SOURCE41} %{buildroot}%{_sysconfdir}/openldap/slapd.d/%{name}.conf %if %{with avahi_service} mkdir -p %{buildroot}%{_sysconfdir}/avahi/services/ install -m 0644 %{SOURCE42} %{buildroot}%{_sysconfdir}/avahi/services/smb.service sed -i -e 's,@SAMBA_VERSION@,%{version},g' -e 's,@ROSA_VERSION@,%{rosa_release},g' \ %{buildroot}%{_sysconfdir}/avahi/services/smb.service %endif