samba/samba.spec

1589 lines
53 KiB
RPMSpec
Raw Normal View History

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"
2019-01-26 18:04:48 +03:00
#
# To view current parameters, including directories: sbmd -b
#######
# TODO: ctdb (--with-cluster-support)
2014-12-22 20:09:02 +03:00
%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
2014-12-22 20:09:02 +03:00
%define credentialsmajor 0
%define smbconfmajor 0
2019-01-24 20:16:15 +03:00
%define smbldapmajor 2
2014-12-22 20:09:02 +03:00
%define tevent_utilmajor 0
%define nsswinsmajor 2
%define winbindmajor 2
%define sambaerrorsmajor 1
# Default options
# gcc5 seems to build a bit faster than clang6
2019-03-28 18:16:33 +03:00
%bcond_with clang
%bcond_with verbose
%bcond_with strace
2015-02-20 13:18:36 +00:00
%bcond_with doc
2014-12-22 20:09:02 +03:00
%bcond_without ads
%bcond_without test
# 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}
2014-12-22 20:09:02 +03:00
%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
2014-12-22 20:09:02 +03:00
%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}
2014-12-22 20:09:02 +03:00
%define libcredentials %mklibname samba-credentials %{credentialsmajor}
%define libsmbconf %mklibname smbconf %{smbconfmajor}
%define libsmbldap %mklibname smbldap %{smbldapmajor}
%define libtevent_util %mklibname tevent-util %{tevent_utilmajor}
%define libnsswins %mklibname nsswins %{nsswinsmajor}
%define libwinbind %mklibname winbind %{winbindmajor}
%define libsambaerrors %mklibname samba-errors %{sambaerrorsmajor}
#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
2014-12-22 20:09:02 +03:00
%global testbin smbtorture,masktest,locktest,gentest,ndrdump
2014-12-22 20:09:02 +03:00
%define _serverbuild_flags -fstack-protector-all
%global smb_usershare_dir %{_localstatedir}/lib/samba/usershare
2014-12-22 20:09:02 +03:00
Summary: Samba SMB server
Name: samba
Version: 4.10.10
Release: 2
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
Source1: samba.log
Source10: samba-print-pdf.sh
#Sources that used to be in packaging patch:
2014-12-22 20:09:02 +03:00
Source28: samba.pamd
Source29: system-auth-winbind.pamd
2015-03-23 11:57:31 +00:00
Source41: openldap-samba.conf
%if %{with avahi_service}
Source42: avahi_samba.xml
%endif
2014-12-22 20:09:02 +03:00
Source100: %{name}.rpmlintrc
2019-01-24 20:16:15 +03:00
# 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.
2016-07-24 17:11:21 +10:00
Patch2: samba-4.3.11-winbind-service.patch
2019-01-24 20:16:15 +03:00
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
2019-03-28 01:26:11 +03:00
Patch13: ROSA-Force-libsystemd.patch
2014-12-22 20:09:02 +03:00
# https://bugzilla.rosalinux.ru/show_bug.cgi?id=10068
# Rediffed from https://gitlab.com/samba-team/samba/merge_requests/289
Patch14: 0001-samba-tool-dbcheck-Avoid-creating-child-DNs-via-ldb..patch
Patch15: 0002-samba-tool-dbcheck-Avoid-creating-an-RDN-via-ldb.Dn-.patch
%if %{with clang}
BuildRequires: clang lld
%else
BuildRequires: gcc
%endif
# Required for ldb docs
2014-12-22 20:09:02 +03:00
BuildRequires: docbook-style-xsl
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
# 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
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
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)
BuildRequires: pkgconfig(talloc)
2014-12-22 20:09:02 +03:00
BuildRequires: pkgconfig(tdb)
BuildRequires: pkgconfig(tevent)
2019-01-24 20:16:15 +03:00
BuildRequires: pkgconfig(jansson)
BuildRequires: pkgconfig(libarchive)
2019-03-28 01:26:11 +03:00
BuildRequires: pkgconfig(python3)
BuildRequires: %{_lib}cmocka-devel
2019-01-24 20:16:15 +03:00
BuildRequires: gpgme-devel
%if %{mdvver} >= 201900
# libnsl.so was removed from glibc-devel
BuildRequires: pkgconfig(libnsl)
%endif
%if %{with strace}
BuildRequires: strace
%endif
2014-12-22 20:09:02 +03:00
Requires: pam >= 0.64
2015-03-12 11:32:02 +00:00
Requires: %{name}-common = %{EVRD}
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
# 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
2014-12-22 20:09:02 +03:00
Samba provides SMB server which can be used to provide network services
to SMB (sometimes called "Lan Manager") clients, including various versions
of MS Windows, OS/2, and other Linux machines. Samba also provides some SMB
clients, which complement the built-in SMB filesystem in Linux. Samba uses
NetBIOS over TCP/IP (NetBT) protocols and does NOT need NetBEUI (Microsoft
Raw NetBIOS frame) protocol.
Samba features working NT or AD Domain Control capability.
2014-12-22 20:09:02 +03:00
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.
2019-01-29 23:19:06 +03:00
# 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.
2019-01-30 01:13:50 +03:00
%package -n %{libs_config}
Summary: ldconfig configuration for Samba libraries
Group: System/Libraries
2019-01-30 01:13:50 +03:00
%description -n %{libs_config}
ldconfig configuration for Samba libraries
2019-01-30 01:13:50 +03:00
%files -n %{libs_config}
%dir %{_libdir}/samba
%{_sysconfdir}/ld.so.conf.d/samba_%{_arch}.conf
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package server
2014-12-22 20:09:02 +03:00
Summary: Samba (SMB) server programs
Group: Networking/Other
Requires: %{name}-common = %{EVRD}
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
# 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
2015-02-24 13:17:10 +05:00
#Samba-server and it's libraries were shipped in single package before 4.1.16
Obsoletes: %{name}-server < 1:4.1.17
2014-12-22 20:09:02 +03:00
%if %{without gtk}
Obsoletes: %{name}-domainjoin-gui < %{EVRD}
%endif
%rename samba
%rename samba-server-ldap
%description server
2014-12-22 20:09:02 +03:00
Samba-server provides SMB server which can be used to provide network services
to SMB (sometimes called "Lan Manager") clients, including various versions
of MS Windows, OS/2, and other Linux machines. Samba also provides some SMB
clients, which complement the built-in SMB filesystem in Linux. Samba uses
NetBIOS over TCP/IP (NetBT) protocols and does NOT need NetBEUI (Microsoft
Raw NetBIOS frame) protocol.
Samba features working NT Domain Control capability.
Please refer to the WHATSNEW.txt document for fixup information. This binary
release includes encrypted password support.
Please read the smb.conf file and ENCRYPTION.txt in the docs directory for
implementation details.
%files server
%{_bindir}/oLschema2ldif
%{_sbindir}/samba
%{_sbindir}/samba_dnsupdate
%{_sbindir}/samba_spnupdate
%{_sbindir}/samba_upgradedns
2019-01-24 20:16:15 +03:00
%{_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*
2019-01-24 20:16:15 +03:00
%{_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
2015-04-22 08:58:57 +00:00
if [ $1 -gt 1 ] ; then
echo "Flushing Samba cache."
/usr/bin/net cache flush > /dev/null 2>&1 || :
fi
%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}
2014-12-22 20:09:02 +03:00
%{_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
2019-01-24 20:16:15 +03:00
%{_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
2014-12-22 20:09:02 +03:00
%if %{with ads}
%{_libdir}/samba/libads-samba4.so
2014-12-22 20:09:02 +03:00
%endif
%{_libdir}/samba/libasn1-samba4.so.8
%{_libdir}/samba/libasn1-samba4.so.8.0.0
%{_libdir}/samba/libasn1util-samba4.so
%{_libdir}/samba/libauth-samba4.so
%{_libdir}/samba/libauth-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
2019-03-28 01:26:11 +03:00
%{_libdir}/samba/libclidns-samba4.so
%{_libdir}/samba/libcluster-samba4.so
%{_libdir}/samba/libcmdline-credentials-samba4.so
2019-01-24 20:16:15 +03:00
%{_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
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libdcerpc-samba4.so
%{_libdir}/samba/libdfs-server-ad-samba4.so
%{_libdir}/samba/libdlz-bind9-for-torture-samba4.so
%{_libdir}/samba/libdnsserver-common-samba4.so
%{_libdir}/samba/libdsdb-garbage-collect-tombstones-samba4.so
2019-01-24 20:16:15 +03:00
%{_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
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libgssapi-samba4.so.2
%{_libdir}/samba/libgssapi-samba4.so.2.0.0
%{_libdir}/samba/libhcrypto-samba4.so.5
%{_libdir}/samba/libhcrypto-samba4.so.5.0.1
%{_libdir}/samba/libhdb-samba4.so.11
%{_libdir}/samba/libhdb-samba4.so.11.0.2
%{_libdir}/samba/libheimbase-samba4.so.1
%{_libdir}/samba/libheimbase-samba4.so.1.0.0
%{_libdir}/samba/libheimntlm-samba4.so.1
%{_libdir}/samba/libheimntlm-samba4.so.1.0.1
%{_libdir}/samba/libhttp-samba4.so
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libhx509-samba4.so.5
%{_libdir}/samba/libhx509-samba4.so.5.0.0
%{_libdir}/samba/libidmap-samba4.so
%{_libdir}/samba/libinterfaces-samba4.so
%{_libdir}/samba/libiov-buf-samba4.so
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libkdc-samba4.so.2
%{_libdir}/samba/libkdc-samba4.so.2.0.0
%{_libdir}/samba/libkrb5-samba4.so.26
%{_libdir}/samba/libkrb5-samba4.so.26.0.0
%{_libdir}/samba/libkrb5samba-samba4.so
#%{_libdir}/samba/libldb-cmdline.so - does not build. removed? not configured? to be investigated.
%{_libdir}/samba/libldbsamba-samba4.so
%{_libdir}/samba/liblibcli-lsa3-samba4.so
%{_libdir}/samba/liblibcli-netlogon3-samba4.so
%{_libdir}/samba/liblibsmb-samba4.so
%{_libdir}/samba/libmessages-dgm-samba4.so
%{_libdir}/samba/libmessages-util-samba4.so
%{_libdir}/samba/libmsghdr-samba4.so
%{_libdir}/samba/libmsrpc3-samba4.so
%{_libdir}/samba/libndr-samba-samba4.so
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libndr-samba4.so
%{_libdir}/samba/libnet-keytab-samba4.so
%{_libdir}/samba/libnetif-samba4.so
%{_libdir}/samba/libnpa-tstream-samba4.so
%{_libdir}/samba/libnss-info-samba4.so
%{_libdir}/samba/libpac-samba4.so
%{_libdir}/samba/libpopt-samba3-samba4.so
2019-01-24 20:16:15 +03:00
%{_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
2014-12-22 20:09:02 +03:00
%{_libdir}/samba/libroken-samba4.so.19
%{_libdir}/samba/libroken-samba4.so.19.0.1
%{_libdir}/samba/libsamba-cluster-support-samba4.so
%{_libdir}/samba/libsamba-debug-samba4.so
%{_libdir}/samba/libsamba-modules-samba4.so
%{_libdir}/samba/libsamba-net-samba4.so
%{_libdir}/samba/libsamba-python-samba4.so
%{_libdir}/samba/libsamba-security-samba4.so
%{_libdir}/samba/libsamba-sockets-samba4.so
%{_libdir}/samba/libsamba3-util-samba4.so
%{_libdir}/samba/libsamdb-common-samba4.so
%{_libdir}/samba/libsecrets3-samba4.so
%{_libdir}/samba/libserver-id-db-samba4.so
%{_libdir}/samba/libserver-role-samba4.so
%{_libdir}/samba/libservice-samba4.so
%{_libdir}/samba/libshares-samba4.so
%{_libdir}/samba/libsmb-transport-samba4.so
%{_libdir}/samba/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
2019-01-24 20:16:15 +03:00
%{_libdir}/samba/libnon-posix-acls-samba4.so
%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
%{_libdir}/samba/libxattr-tdb-samba4.so
%{_libdir}/samba/bind9
2014-12-22 20:09:02 +03:00
%dir %{_libdir}/samba/vfs
%{_libdir}/%{name}/nss_info
2015-03-12 11:32:02 +00:00
%{_libdir}/%{name}/idmap
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package client
2014-12-22 20:09:02 +03:00
Summary: Samba (SMB) client programs
Group: Networking/Other
Requires: %{name}-common = %{EVRD}
Requires: %{libsambalibs} = %{EVRD}
Requires: %{libname} = %{EVRD}
2014-12-22 20:09:02 +03:00
Requires: mount-cifs
# For samba-tool
Requires: ldb-utils
Requires: python-ldb
Requires: python-talloc
Requires: python-tdb
2019-01-26 16:41:17 +03:00
# smbclient is common in other distros
Provides: smbclient = %{EVRD}
2014-12-22 20:09:02 +03:00
%rename samba3-client
%description client
Samba-client provides some SMB clients, which complement the built-in
SMB filesystem in Linux. These allow the accessing of SMB shares, and
printing to SMB printers.
2014-12-22 20:09:02 +03:00
%files client
%{_bindir}/cifsdd
2014-12-22 20:09:02 +03:00
%{_bindir}/dbwrap_tool
%{_bindir}/findsmb
%{_bindir}/mvxattr
2014-12-22 20:09:02 +03:00
%{_bindir}/net
%{_bindir}/nmblookup
2014-12-22 20:09:02 +03:00
%{_bindir}/pdbedit
%{_bindir}/profiles
%{_bindir}/rpcclient
%{_sbindir}/samba_kcc
2019-01-24 20:16:15 +03:00
%{_sbindir}/eventlogadm
%{_bindir}/samba-tool
2014-12-22 20:09:02 +03:00
%{_bindir}/sharesec
%{_bindir}/smbcacls
%{_bindir}/smbclient
2014-12-22 20:09:02 +03:00
%{_bindir}/smbcontrol
%{_bindir}/smbcquotas
%{_bindir}/smbget
%{_bindir}/smbpasswd
%{_bindir}/smbspool
%{_bindir}/smbstatus
%{_bindir}/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
%{_libdir}/cups/backend/smb
# see smbspool_krb5_wrapper(8) why such attributes
%attr(0700,root,root) %{_libexecdir}/samba/smbspool_krb5_wrapper
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package common
2014-12-22 20:09:02 +03:00
Summary: Files used by both Samba servers and clients
Group: System/Servers
# rpcclient etc. use samba python modules
Requires: %{name}-python = %{EVRD}
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
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.
2014-12-22 20:09:02 +03:00
%files common
%{_prefix}/lib/tmpfiles.d/samba.conf
%dir /var/cache/%{name}
%dir /var/log/%{name}
%ghost /var/run/%{name}
2014-12-22 20:09:02 +03:00
%dir /var/lib/%{name}/private
%(for i in %{_bindir}/{%{commonbin}};do echo $i;done)
%(for i in %{_mandir}/man?/{%{commonbin}}\.[0-9]*;do echo $i|grep -v testparm;done)
%dir %{_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
2014-12-22 20:09:02 +03:00
%dir %{_localstatedir}/lib/%{name}
%attr(-,root,root) %{_localstatedir}/lib/%{name}/codepages
%{_mandir}/man1/findsmb.1*
%{_mandir}/man1/log2pcap.1*
%{_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*
2019-01-24 20:16:15 +03:00
%{_mandir}/man7/traffic_learner.7*
%{_mandir}/man7/traffic_replay.7*
%{_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*
%{_mandir}/man8/smbspool_krb5_wrapper.8*
%{_mandir}/man8/winbind_krb5_locator.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_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*
2014-12-22 20:09:02 +03:00
%{_mandir}/man8/vfs_full_audit.8*
2019-03-28 01:26:11 +03:00
%{_mandir}/man8/vfs_glusterfs_fuse.8*
2014-12-22 20:09:02 +03:00
%{_mandir}/man8/vfs_media_harmony.8*
%{_mandir}/man8/vfs_netatalk.8*
%{_mandir}/man8/vfs_offline.8*
2014-12-22 20:09:02 +03:00
%{_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*
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_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*
2019-01-24 20:16:15 +03:00
%{_mandir}/man8/vfs_virusfilter.8*
2014-12-22 20:09:02 +03:00
%post common
systemd-tmpfiles --create %{_prefix}/lib/tmpfiles.d/samba.conf
# And this too, in case we don't have smbd to create it for us
[ -f /var/cache/%{name}/unexpected.tdb ] || {
touch /var/cache/%{name}/unexpected.tdb
}
%postun common
if [ -f %{_sysconfdir}/%{name}/README.mdk.conf ];then rm -f %{_sysconfdir}/%{name}/README.mdk.conf;fi
#----------------------------------------------------------------------------
%if %{with doc}
%package doc
2014-12-22 20:09:02 +03:00
Summary: Documentation for Samba servers and clients
Group: Documentation
%description doc
Samba-doc provides documentation files for both the server and client
packages of Samba.
2014-12-22 20:09:02 +03:00
%files doc
2015-02-20 13:18:36 +00:00
%doc README COPYING
2014-12-22 20:09:02 +03:00
%doc WHATSNEW.txt Roadmap
%doc clean-docs/samba-doc/docs/*
%doc clean-docs/samba-doc/examples
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package -n %{libwinbind}
Summary: Samba-winbind daemon libraries
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
2014-12-22 20:09:02 +03:00
Summary: Samba-winbind daemon, utilities and documentation
Group: System/Servers
Requires: %{libsambalibs} = %{EVRD}
Requires: %{libwinbind} = %{EVRD}
Suggests: %{winbind_krb5_locator}
2014-12-22 20:09:02 +03:00
%description winbind
2012-03-13 17:37:06 +03:00
Provides the winbind daemon and testing tools to allow authentication
and group/user enumeration from a Windows or Samba domain controller.
2014-12-22 20:09:02 +03:00
%files winbind
# %config(noreplace) %{_sysconfdir}/security/pam_winbind.conf
%{_sbindir}/winbindd
%{_bindir}/wbinfo
%attr(-,root,root) %config(noreplace) %{_sysconfdir}/pam.d/system-auth-winbind*
%{_unitdir}/winbind.service
2019-01-24 20:16:15 +03:00
%{_sysconfdir}/NetworkManager/dispatcher.d/30-winbind
%{_mandir}/man8/winbindd.8*
%{_mandir}/man8/idmap_*.8*
2014-12-22 20:09:02 +03:00
%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
2014-12-22 20:09:02 +03:00
%systemd_post winbind.service
#----------------------------------------------------------------------------
%package -n %{libnsswins}
2014-12-22 20:09:02 +03:00
Summary: Name Service Switch service for WINS
2015-02-24 13:17:10 +05:00
Group: System/Libraries
Conflicts: nss_wins < 1:4.1.17
Obsoletes: nss_wins < 1:4.1.17
Provides: nss_wins = %{EVRD}
2014-12-22 20:09:02 +03:00
Requires(pre): glibc
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
# A clumzy approach to get rid of LOOPS - provide deps for individual libs _by hand_
Requires: %{libsambalibs} = %{EVRD}
%description -n %{libnsswins}
2012-03-13 17:37:06 +03:00
Provides the libnss_wins shared library which resolves NetBIOS names to
IP addresses.
%files -n %{libnsswins}
2014-12-22 20:09:02 +03:00
%attr(755,root,root) /%{_lib}/libnss_wins.so*
%post -n %{libnsswins}
2014-12-22 20:09:02 +03:00
if [ $1 = 1 ]; then
cp -af %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/nsswitch.conf.rpmsave
grep '^hosts' %{_sysconfdir}/nsswitch.conf |grep -v 'wins' >/dev/null
if [ $? = 0 ];then
echo "Adding a wins entry to the hosts section of %{_sysconfdir}/nsswitch.conf"
awk '/^hosts/ {print $0 " wins"};!/^hosts/ {print}' %{_sysconfdir}/nsswitch.conf.rpmsave >%{_sysconfdir}/nsswitch.conf;
else
echo "wins entry found in %{_sysconfdir}/nsswitch.conf"
fi
fi
#----------------------------------------------------------------------------
%package python
Summary: Samba Python modules
Group: Development/Python
BuildRequires: pkgconfig(python)
# A clumzy approach to get rid of LOOPS - provide deps for individual libs _by hand_
Requires: %{libpolicy} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description python
Samba Python modules.
%files python
%{py_platsitedir}/samba/*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%if %{with test}
%package test
2014-12-22 20:09:02 +03:00
Summary: Debugging and benchmarking tools for samba
Group: System/Servers
Requires: %{name}-common = %{EVRD}
Requires: %{libsambalibs} = %{EVRD}
%description test
2014-12-22 20:09:02 +03:00
This package provides tools for benchmarking samba, and debugging the correct
operation of tools against smb servers.
%files test
%(for i in %{_bindir}/{%{testbin}};do echo $i;done)
%(for i in %{_mandir}/man1/{%{testbin}}.1%{_extension};do echo $i|grep -v nsstest;done)
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package -n %{libname}
2014-12-22 20:09:02 +03:00
Summary: SMB Client Library
Group: System/Libraries
2014-12-22 20:09:02 +03:00
Provides: libsmbclient = %{EVRD}
# Manually resolve dependencies due to using __noautoreq (see above)
Requires: %{libsambalibs} = %{EVRD}
%description -n %{libname}
2014-12-22 20:09:02 +03:00
This package contains the SMB client library, part of the samba suite of
networking software, allowing other software to access SMB shares.
2014-12-22 20:09:02 +03:00
%files -n %{libname}
%{_libdir}/libsmbclient.so.%{libsmbmajor}*
#----------------------------------------------------------------------------
%package -n %{devname}
Summary: SMB Client Library Development files
Group: Development/C
2014-12-22 20:09:02 +03:00
Requires: %{libname} = %{EVRD}
Requires: samba-devel = %{EVRD}
2015-03-17 08:52:28 +00:00
2014-12-22 20:09:02 +03:00
Conflicts: %{_lib}smbclient0-devel < 1:4.1.9-10
Obsoletes: %{_lib}smbclient0-devel < 1:4.1.9-10
%description -n %{devname}
This package contains the development files for the SMB client library, part
of the samba suite of networking software, allowing the development of other
software to access SMB shares.
%files -n %{devname}
%{_includedir}/samba-4.0/libsmbclient.h
%{_libdir}/libsmbclient.so
%{_mandir}/man7/libsmbclient.7*
%{_libdir}/pkgconfig/smbclient.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package devel
Summary: Samba 4 development package
Group: Development/C
Requires: %{devname} = %{EVRD}
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
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}/libsamba-errors.so
%{_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
%{_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
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%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}
2014-12-22 20:09:02 +03:00
%description -n %{libnetapi}
Samba library for accessing functions in 'net' binary.
%files -n %{libnetapi}
%{_libdir}/libnetapi.so.%{netapimajor}*
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{netapidevel}
Summary: Samba library for accessing functions in 'net' binary
Group: Development/C
Requires: %{libnetapi} = %{EVRD}
Requires: samba-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
Provides: netapi-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{netapidevel}
Samba library for accessing functions in 'net' binary.
2014-12-22 20:09:02 +03:00
%files -n %{netapidevel}
%{_libdir}/libnetapi*.so
%{_includedir}/samba-4.0/netapi.h
%{_libdir}/pkgconfig/netapi.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libdcerpc}
Summary: Library implementing DCE/RPC for Samba4
Group: System/Libraries
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libdcerpc}
Library implementing DCE/RPC for Samba4.
2014-12-22 20:09:02 +03:00
%files -n %{libdcerpc}
%{_libdir}/libdcerpc.so.%{dcerpcmajor}*
%{_libdir}/libdcerpc-samr.so.%{dcerpcmajor}*
%{_libdir}/libdcerpc-binding.so.%{dcerpcmajor}*
%{_libdir}/libdcerpc-server.so.%{dcerpcmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{dcerpcdevel}
Summary: Library implementing Samba's memory allocator
Group: Development/C
Requires: %{libdcerpc} = %{EVRD}
Requires: samba-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
Provides: dcerpc-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{dcerpcdevel}
Library implementing Samba's memory allocator.
2014-12-22 20:09:02 +03:00
%files -n %{dcerpcdevel}
%{_libdir}/pkgconfig/dcerpc*.pc
%{_includedir}/samba-4.0/dcerpc*.h
%{_libdir}/libdcerpc.so
%{_libdir}/libdcerpc-samr.so
%{_libdir}/libdcerpc-binding.so
%{_libdir}/libdcerpc-server.so
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libndr}
Summary: Network Data Representation library from Samba4
Group: System/Libraries
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libndr}
Network Data Representation library from Samba4.
2014-12-22 20:09:02 +03:00
%files -n %{libndr}
%{_libdir}/libndr.so.%{ndrmajor}*
%{_libdir}/libndr-krb5pac.so.%{ndrmajor}*
%{_libdir}/libndr-nbt.so.%{ndrmajor}*
%{_libdir}/libndr-standard.so.%{ndrmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{ndrdevel}
Summary: Development files for Network Data Representation library from Samba4
Group: Development/C
Requires: %{libndr} = %{EVRD}
Requires: samba-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
Provides: ndr-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{ndrdevel}
Development files for Network Data Representation library from Samba4.
2014-12-22 20:09:02 +03:00
%files -n %{ndrdevel}
%{_libdir}/pkgconfig/ndr*.pc
%{_libdir}/libndr*.so
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsambahostconfig}
Summary: Samba4's host configuration library
Group: System/Libraries
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libsambahostconfig}
Samba4's host configuration library.
2014-12-22 20:09:02 +03:00
%files -n %{libsambahostconfig}
%{_libdir}/libsamba-hostconfig.so.%{hostconfigmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{sambahostconfigdevel}
Summary: Samba4's host configuration library
Group: Development/C
Requires: %{libsambahostconfig} = %{EVRD}
Requires: samba-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
Provides: samba-hostconfig-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{sambahostconfigdevel}
Samba4's host configuration library.
2014-12-22 20:09:02 +03:00
%files -n %{sambahostconfigdevel}
%{_libdir}/libsamba-hostconfig.so
%{_libdir}/pkgconfig/samba-hostconfig.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libwbclient}
Summary: Library providing access to winbindd
Group: System/Libraries
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libwbclient}
Library providing access to winbindd.
2014-12-22 20:09:02 +03:00
%files -n %{libwbclient}
%{_libdir}/libwbclient.so.%{wbclientmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{wbclientdevel}
Summary: Library providing access to winbindd
Group: Development/C
Requires: %{libwbclient} = %{EVRD}
Requires: samba-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
Provides: wbclient-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{wbclientdevel}
Library providing access to winbindd.
2014-12-22 20:09:02 +03:00
%files -n %{wbclientdevel}
%{_libdir}/libwbclient.so
%{_includedir}/samba-4.0/wbclient.h
%{_libdir}/pkgconfig/wbclient.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsambautil}
Summary: Samba4 utility library
Group: System/Libraries
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libsambautil}
Samba4 utility library.
2014-12-22 20:09:02 +03:00
%files -n %{libsambautil}
%{_libdir}/libsamba-util.so.%{sambautilmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{sambautildevel}
Summary: Development files for Samba4 utility library
Group: Development/C
Requires: %{libsambautil} = %{EVRD}
Requires: samba-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
Provides: samba-util-devel = %{EVRD}
Obsoletes: samba-devel < 1:4.10.4
2014-12-22 20:09:02 +03:00
%description -n %{sambautildevel}
Development files for Samba4 utility library.
2014-12-22 20:09:02 +03:00
%files -n %{sambautildevel}
%{_libdir}/libsamba-util.so
%{_libdir}/pkgconfig/samba-util.pc
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
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libpolicy}
Samba4 policy library.
2014-12-22 20:09:02 +03:00
%files -n %{libpolicy}
%{_libdir}/libsamba-policy.so.%{policymajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libpolicydevel}
Summary: Development files for Samba4 policy library
Group: Development/C
Requires: %{libpolicy} = %{EVRD}
Requires: samba-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
Provides: policy-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libpolicydevel}
Development files for Samba4 policy library.
2014-12-22 20:09:02 +03:00
%files -n %{libpolicydevel}
%{_libdir}/libsamba-policy.so
%{_libdir}/pkgconfig/samba-policy.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsamdb}
Summary: Samba4 samdb library
Group: System/Libraries
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libsamdb}
Samba4 samdb library.
2014-12-22 20:09:02 +03:00
%files -n %{libsamdb}
%{_libdir}/libsamdb.so.%{samdbmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsamdbdevel}
Summary: Development files for Samba4 samdb library
Group: Development/C
Requires: %{libsamdb} = %{EVRD}
Requires: samba-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
Provides: samdb-devel = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libsamdbdevel}
Development files for Samba4 samdb library.
2014-12-22 20:09:02 +03:00
%files -n %{libsamdbdevel}
%{_libdir}/libsamdb.so
%{_libdir}/pkgconfig/samdb.pc
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package -n %{libsambapassdb}
2014-12-22 20:09:02 +03:00
Summary: Library for working with the Samba user database
Group: System/Libraries
Requires: %{libsambalibs} = %{EVRD}
2015-11-26 15:56:54 +10:00
Obsoletes: %{_lib}pdb0 < 1:4.3.1
%description -n %{libsambapassdb}
2014-12-22 20:09:02 +03:00
Library for working with the Samba user database.
%files -n %{libsambapassdb}
%{_libdir}/libsamba-passdb.so.%{passdbmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libcredentials}
Summary: Library for working with Samba credentials
Group: System/Libraries
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libcredentials}
Library for working with Samba credentials.
2014-12-22 20:09:02 +03:00
%files -n %{libcredentials}
%{_libdir}/libsamba-credentials.so.%{credentialsmajor}*
%{_libdir}/libsamba-credentials.so
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsmbconf}
Summary: Library for working with Samba config files
Group: System/Libraries
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libsmbconf}
Library for working with Samba config files.
2014-12-22 20:09:02 +03:00
%files -n %{libsmbconf}
%{_libdir}/libsmbconf.so.%{smbconfmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libsmbldap}
Summary: Samba LDAP library
Group: System/Libraries
# due to libsmbldap.so.* depending from private libs in %%{_libdir}/samba/
Obsoletes: %{_lib}smbldap0 < 1:4.
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libsmbldap}
Samba LDAP library.
2014-12-22 20:09:02 +03:00
%files -n %{libsmbldap}
%{_libdir}/libsmbldap.so.%{smbldapmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%package -n %{libtevent_util}
Summary: Utility library for working with the Tevent library
Group: System/Libraries
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description -n %{libtevent_util}
Utility library for working with the Tevent library.
2014-12-22 20:09:02 +03:00
%files -n %{libtevent_util}
%{_libdir}/libtevent-util.so.%{tevent_utilmajor}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%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}*
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%if %{with gtk}
%package domainjoin-gui
Summary: Domainjoin GUI
Group: System/Configuration/Other
BuildRequires: pkgconfig(gtk+-2.0)
Requires: %{libsambalibs} = %{EVRD}
2014-12-22 20:09:02 +03:00
%description domainjoin-gui
The samba-domainjoin-gui package includes a domainjoin gtk application.
2014-12-22 20:09:02 +03:00
%files domainjoin-gui
%{_sbindir}/netdomjoin-gui
%dir %{_datadir}/pixmaps/samba
%{_datadir}/pixmaps/samba/samba.ico
%{_datadir}/pixmaps/samba/logo.png
%{_datadir}/pixmaps/samba/logo-small.png
%endif
2014-12-22 20:09:02 +03:00
#----------------------------------------------------------------------------
%package -n openldap-schemas-%{name}
Summary: OpenLDAP schema files from %{name}-%{EVRD} source tree
Group: Databases
BuildArch: noarch
2015-03-23 11:57:31 +00:00
Requires(pre): openldap-config
%files -n openldap-schemas-%{name}
2015-03-23 11:57:31 +00:00
%config(noreplace) %{_sysconfdir}/openldap/schema/*
%attr(750,ldap,ldap) %config(noreplace) %{_sysconfdir}/openldap/slapd.d/%{name}.conf
#----------------------------------------------------------------------------
# From Fedora
2019-01-30 01:13:50 +03:00
%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
2019-01-30 01:13:50 +03:00
%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
2019-01-30 01:13:50 +03:00
%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*
2019-01-30 01:13:50 +03:00
%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
2019-01-30 01:13:50 +03:00
%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
2019-01-30 01:13:50 +03:00
%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
#----------------------------------------------------------------------------
2014-12-22 20:09:02 +03:00
%prep
%setup -q
2019-01-24 20:16:15 +03:00
%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
2014-12-22 20:09:02 +03:00
%build
2019-03-28 18:16:33 +03:00
%if %{with verbose}
%define verbosity -vvv
%else
%define verbosity %{nil}
%endif
%if %{with strace}
%define strace strace
%else
%define strace %{nil}
%endif
2019-01-24 20:16:15 +03:00
install -d -m 0755 %{buildroot}/%{_libdir}/samba
%if %{with clang}
%clang_gcc_wrapper
%endif
2019-01-26 18:04:48 +03:00
export CFLAGS="-O2 -g"
2019-03-28 01:26:11 +03:00
# 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
2019-01-26 18:04:48 +03:00
chmod +x ./buildtools/bin/waf
%{strace} ./buildtools/bin/waf %{verbosity} configure \
2019-01-26 18:04:48 +03:00
--enable-fhs \
2019-01-24 20:16:15 +03:00
--with-modulesdir=%{_libdir}/samba \
2019-01-26 18:04:48 +03:00
--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 \
2014-12-22 20:09:02 +03:00
--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
2014-12-22 20:09:02 +03:00
--disable-rpath \
--disable-rpath-install \
--disable-rpath-private-install \
--enable-pthreadpool \
--with-iconv \
--with-acl-support \
--with-dnsupdate \
--with-automount \
--without-cluster-support \
2019-03-28 01:26:11 +03:00
--without-lttng \
--disable-glusterfs \
2014-12-22 20:09:02 +03:00
--with-sendfile-support \
--with-dnsupdate \
--with-systemd \
--with-systemddir=%{_unitdir} \
--systemd-install-services \
2014-12-22 20:09:02 +03:00
-v -v -p \
%{?_smp_mflags}
2014-12-22 20:09:02 +03:00
2019-01-24 20:16:15 +03:00
# --with-privatelibdir=%{_libdir}/%{name} \
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
2019-03-29 08:46:29 +03:00
buildtools/bin/waf build %{verbosity} %{?_smp_mflags}
2014-12-22 20:09:02 +03:00
%if %{with gtk}
cd source3/lib/netapi/examples/netdomjoin-gui
%__cc %{optflags} `pkg-config --cflags gtk+-2.0` -I../../../../../bin/default/include/public -o netdomjoin-gui netdomjoin-gui.c -L../../../../../bin/default/source3/ -lnetapi `pkg-config --libs gtk+-2.0`
%endif
2014-12-22 20:09:02 +03:00
%install
mkdir -p %{buildroot}
2014-12-22 20:09:02 +03:00
# Put stuff where it should go.
mkdir -p %{buildroot}/%{_libdir}/%{name}/
2014-12-22 20:09:02 +03:00
mkdir -p %{buildroot}/%{_datadir}/man/man8/
2014-12-22 20:09:02 +03:00
# Any entries here mean samba makefile is *really* broken:
mkdir -p %{buildroot}%{_sysconfdir}/%{name}
mkdir -p %{buildroot}%{_datadir}
mkdir -p %{buildroot}%{_libdir}/%{name}/vfs
%makeinstall_std
# PAM modules don't go to /usr...
if [ -e %{buildroot}%{_libdir}/security ]; then
mkdir -p %{buildroot}/%{_lib}
mv %{buildroot}%{_libdir}/security %{buildroot}/%{_lib}
fi
2014-12-22 20:09:02 +03:00
#Even though we tell waf above where to put perl it gets it wrong
#mkdir -p %{buildroot}/%{perl_vendorlib}
#mv %{buildroot}%_datadir/perl5/* %{buildroot}/%{perl_vendorlib}
2014-12-22 20:09:02 +03:00
#need to stay
mkdir -p %{buildroot}/{sbin,bin}
mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,pam.d,xinetd.d}
mkdir -p %{buildroot}%{_initrddir}
mkdir -p %{buildroot}/var/cache/%{name}
mkdir -p %{buildroot}/var/log/%{name}
mkdir -p %{buildroot}/var/run/%{name}
mkdir -p %{buildroot}/var/spool/%{name}
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/private
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/{netlogon,profiles,printers}
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
mkdir -p %{buildroot}%{_localstatedir}/lib/%{name}/codepages/src
mkdir -p %{buildroot}/%{_lib}/security
mkdir -p %{buildroot}%{_libdir}/pkgconfig
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir}/%{name}/vfs
mkdir -p %{buildroot}%{_datadir}/%{name}/scripts
# Fix some paths so provision works:
perl -pi -e 's,default_ldb_modules_dir = None,default_ldb_modules_dir = \"%{_libdir}/%{name}/ldb\",g' %{buildroot}/%{py_platsitedir}/samba/__init__.py
#perl -pi -e 's,share/samba/setup,share/%{name}/setup,g' %{buildroot}/%{python_sitearch}/samba/provision.py
# 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
2014-12-22 20:09:02 +03:00
%if %{with gtk}
install -m 755 source3/lib/netapi/examples/netdomjoin-gui/netdomjoin-gui %{buildroot}/%{_sbindir}/netdomjoin-gui
mkdir -p %{buildroot}%{_datadir}/pixmaps/%{name}
install -m 644 source3/lib/netapi/examples/netdomjoin-gui/samba.ico %{buildroot}/%{_datadir}/pixmaps/%{name}/samba.ico
install -m 644 source3/lib/netapi/examples/netdomjoin-gui/logo.png %{buildroot}/%{_datadir}/pixmaps/%{name}/logo.png
install -m 644 source3/lib/netapi/examples/netdomjoin-gui/logo-small.png %{buildroot}/%{_datadir}/pixmaps/%{name}/logo-small.png
%endif
2014-12-22 20:09:02 +03:00
#libnss_* still not handled by make:
# Install the nsswitch library extension file
#for i in wins winbind; do
# install -m755 source4/nsswitch/libnss_${i}.so %{buildroot}/%{_lib}/libnss_${i}.so
#done
# Make link for wins and winbind resolvers
#( cd %{buildroot}/%{_lib}; ln -s libnss_wins.so libnss_wins.so.2; ln -s libnss_winbind.so libnss_winbind.so.2)
#install -d %{buildroot}/%{_libdir}/krb5/plugins
#install -m755 source4/bin/winbind_krb5_locator.so %{buildroot}/%{_libdir}/krb5/plugins
2014-12-22 20:09:02 +03:00
%if %{with test}
for i in {%{testbin}};do
2017-10-05 22:48:04 +10:00
mv %{buildroot}/%{_bindir}/$i %{buildroot}/%{_bindir}/${i} || :
2014-12-22 20:09:02 +03:00
done
%endif
2014-12-22 20:09:02 +03:00
# Install other stuff
2014-12-22 20:09:02 +03:00
install -m644 %{SOURCE28} %{buildroot}/%{_sysconfdir}/pam.d/%{name}
install -m644 %{SOURCE29} %{buildroot}/%{_sysconfdir}/pam.d/system-auth-winbind
#
install -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}-server
2014-12-22 20:09:02 +03:00
# install pam_winbind.conf sample file
mkdir -p %{buildroot}%{_sysconfdir}/security
# 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
2014-12-22 20:09:02 +03:00
2019-10-29 17:56:23 +03:00
mkdir -p %{buildroot}/%{_libdir}/cups/backend
ln -s %{_bindir}/smbspool %{buildroot}/%{_libdir}/cups/backend/smb
2017-10-05 22:48:04 +10:00
echo 127.0.0.1 localhost > %{buildroot}/%{_sysconfdir}/%{name}/lmhosts
2014-12-22 20:09:02 +03:00
install -c -m 755 %{SOURCE10} %{buildroot}%{_datadir}/%{name}/scripts/print-pdf
2014-12-22 20:09:02 +03:00
# Move some stuff where it belongs...
mv %{buildroot}%{_libdir}/libnss* %{buildroot}/%{_lib}/
2014-12-22 20:09:02 +03:00
rm -f %{buildroot}/%{_mandir}/man1/testprns*
2014-12-22 20:09:02 +03:00
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
cat >%{buildroot}%{_sysconfdir}/ld.so.conf.d/samba_%{_arch}.conf <<EOF
2014-12-22 20:09:02 +03:00
%{_libdir}/samba
EOF
2014-12-22 20:09:02 +03:00
mkdir -p %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig
install -m644 packaging/systemd/samba.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/samba
2014-12-22 20:09:02 +03:00
2019-01-24 20:16:15 +03:00
# NetworkManager online/offline script
install -d -m 0755 %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/
install -m 0755 packaging/NetworkManager/30-winbind-systemd %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/30-winbind
# winbind krb5 plugins
install -d -m 0755 %{buildroot}%{_libdir}/krb5/plugins/libkrb5
touch %{buildroot}%{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so
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
2019-01-24 20:16:15 +03:00
sed -i "s|/usr/bin/kill|$(which kill)|g" %{buildroot}%{_unitdir}/*.service
2014-12-22 20:09:02 +03:00
# create /run/samba too.
2019-01-24 20:16:15 +03:00
echo "d /run/samba 755 root root" >> %{buildroot}%{_prefix}/lib/tmpfiles.d/samba.conf
# Prepare schema files to be included into OpenLDAP configuration
2015-03-23 11:57:31 +00:00
mkdir -p %{buildroot}%{_sysconfdir}/openldap/{schema,slapd.d}
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
%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