--- a/lib/replace/wscript~ 2014-09-08 11:26:14.000000000 +0200
+++ b/lib/replace/wscript 2014-10-28 22:05:54.003836383 +0100
-@@ -251,8 +251,7 @@ def configure(conf):
- checklibc=True)
+@@ -311,8 +311,7 @@ def configure(conf):
+ strlcpy_in_bsd = True
if not conf.CHECK_FUNCS('getpeereid'):
conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+ if not conf.CHECK_FUNCS('setproctitle_init'):
+ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
- conf.CHECK_CODE('''
- struct ucred cred;
--- samba-4.7.6/lib/replace/wscript.orig 2018-04-01 20:31:57.522637016 +0200
+++ samba-4.7.6/lib/replace/wscript 2018-04-01 23:00:11.129202131 +0200
-@@ -281,17 +281,6 @@
+@@ -304,20 +304,6 @@ def configure(conf):
strlcpy_in_bsd = False
- if not conf.CHECK_FUNCS('getpeereid'):
- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
-
- if not conf.CHECK_FUNCS('closefrom'):
- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
-
+-
conf.CHECK_CODE('''
struct ucred cred;
---- samba-4.7.6/lib/crypto/wscript_configure.orig 2017-09-17 21:15:34.000000000 +0200
-+++ samba-4.7.6/lib/crypto/wscript_configure 2018-04-01 23:00:39.302535142 +0200
-@@ -2,12 +2,6 @@
- import Options
- import Utils
-
--if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h',
-- checklibc=True):
-- conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h',
-- checklibc=True)
-- conf.CHECK_FUNCS_IN('MD5Init', 'md', headers='sys/md5.h',
-- checklibc=True)
- conf.CHECK_FUNCS_IN('CC_MD5_Init', '', headers='CommonCrypto/CommonDigest.h',
- checklibc=True)
-
+ socklen_t cred_len;
+
%bcond_with replace
%if %{with system_libs}
-%define ldb_ver 1.2.3
+%define ldb_ver 1.3.3
%define talloc_ver 2:2.1.9
%define tdb_ver 2:1.3.14
%define tevent_ver 0.9.34
Summary: Samba Active Directory and SMB server
Summary(pl.UTF-8): Serwer Samba Active Directory i SMB
Name: samba
-Version: 4.7.6
-Release: 1
+Version: 4.8.2
+Release: 0.1
Epoch: 1
License: GPL v3
Group: Networking/Daemons
Source0: https://www.samba.org/ftp/samba/samba-%{version}.tar.gz
-# Source0-md5: 0253021a45c479cec1e135b004a0177a
+# Source0-md5: 417c065455f8948d1de2be4edd074390
Source1: smb.init
Source2: samba.pamd
Source4: samba.sysconfig
Patch0: system-heimdal.patch
Patch1: %{name}-c++-nofail.patch
Patch2: %{name}-lprng-no-dot-printers.patch
-Patch3: systemd-pid-dir.patch
+
Patch4: unicodePwd-nthash-values-over-LDAP.patch
Patch5: %{name}-heimdal.patch
Patch6: server-role.patch
BuildRequires: zlib-devel >= 1.2.3
%if %{with system_libs}
BuildRequires: ldb-devel >= %{ldb_ver}
-BuildRequires: ldb-devel < 1.3
+BuildRequires: ldb-devel < 1.4
BuildRequires: python-ldb-devel >= %{ldb_ver}
BuildRequires: python-talloc-devel >= %{talloc_ver}
BuildRequires: python-tevent >= %{tevent_ver}
%{?with_system_heimdal:%patch0 -p1}
%patch1 -p1
%patch2 -p1
-%patch3 -p1
+
%patch4 -p1
%{?with_system_heimdal:%patch5 -p1}
%patch6 -p1
--with-regedit \
--with-sendfile-support \
--with-syslog \
- %{!?with_systemd:--without-systemd} \
+%if %{with systemd}
+ --with-systemd \
+ --systemd-install-services \
+ --with-systemddir=%{systemdunitdir} \
+%else
+ --without-systemd \
+%endif
--with-utmp \
--with-winbind \
--%{?with_avahi:en}%{!?with_avahi:dis}able-avahi \
cp -p packaging/systemd/samba.conf.tmp $RPM_BUILD_ROOT%{systemdtmpfilesdir}/samba.conf
echo "d /var/run/ctdb 755 root root" > $RPM_BUILD_ROOT%{systemdtmpfilesdir}/ctdb.conf
-cp -p packaging/systemd/nmb.service $RPM_BUILD_ROOT%{systemdunitdir}
-cp -p packaging/systemd/samba.service $RPM_BUILD_ROOT%{systemdunitdir}
-cp -p packaging/systemd/smb.service $RPM_BUILD_ROOT%{systemdunitdir}
-cp -p packaging/systemd/winbind.service $RPM_BUILD_ROOT%{systemdunitdir}
cp -p ctdb/config/ctdb.service $RPM_BUILD_ROOT%{systemdunitdir}
install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/smb
%attr(755,root,root) %{_libdir}/samba/vfs/acl_tdb.so
%attr(755,root,root) %{_libdir}/samba/vfs/acl_xattr.so
%attr(755,root,root) %{_libdir}/samba/vfs/aio_fork.so
-%attr(755,root,root) %{_libdir}/samba/vfs/aio_linux.so
%attr(755,root,root) %{_libdir}/samba/vfs/aio_pthread.so
%attr(755,root,root) %{_libdir}/samba/vfs/audit.so
%attr(755,root,root) %{_libdir}/samba/vfs/btrfs.so
%{_mandir}/man8/vfs_acl_tdb.8*
%{_mandir}/man8/vfs_acl_xattr.8*
%{_mandir}/man8/vfs_aio_fork.8*
-%{_mandir}/man8/vfs_aio_linux.8*
%{_mandir}/man8/vfs_aio_pthread.8*
%{_mandir}/man8/vfs_audit.8*
%{_mandir}/man8/vfs_btrfs.8*
%attr(755,root,root) %{_libdir}/samba/libflag-mapping-samba4.so
%attr(755,root,root) %{_libdir}/samba/libgenrand-samba4.so
%attr(755,root,root) %{_libdir}/samba/libgensec-samba4.so
-%attr(755,root,root) %{_libdir}/samba/libgpo-samba4.so
+%attr(755,root,root) %{_libdir}/samba/libgpext-samba4.so
%attr(755,root,root) %{_libdir}/samba/libgse-samba4.so
%attr(755,root,root) %{_libdir}/samba/libHDB-SAMBA4-samba4.so
%attr(755,root,root) %{_libdir}/samba/libhttp-samba4.so
---- samba-4.7.4/packaging/systemd/smb.service.orig 2017-12-26 18:26:31.457609415 +0100
-+++ samba-4.7.4/packaging/systemd/smb.service 2017-12-26 18:27:11.460942304 +0100
+--- samba-4.7.4/packaging/systemd/smb.service.in.orig 2017-12-26 18:26:31.457609415 +0100
++++ samba-4.7.4/packaging/systemd/smb.service.in 2017-12-26 18:27:11.460942304 +0100
@@ -8,6 +8,7 @@
- PIDFile=/run/samba/smbd.pid
+ PIDFile=@PIDDIR@/smbd.pid
LimitNOFILE=16384
- EnvironmentFile=-/etc/sysconfig/samba
+ EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba
+ExecStartPre=/bin/sh -c '[ "`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1`" != "active directory domain controller" ]'
- ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS
+ ExecStart=@SBINDIR@/smbd --foreground --no-process-group $SMBDOPTIONS
ExecReload=/usr/bin/kill -HUP $MAINPID
LimitCORE=infinity
---- samba-4.7.4/packaging/systemd/nmb.service.orig 2017-12-26 18:26:31.457609415 +0100
-+++ samba-4.7.4/packaging/systemd/nmb.service 2017-12-26 18:27:32.350942051 +0100
+--- samba-4.7.4/packaging/systemd/nmb.service.in.orig 2017-12-26 18:26:31.457609415 +0100
++++ samba-4.7.4/packaging/systemd/nmb.service.in 2017-12-26 18:27:32.350942051 +0100
@@ -7,6 +7,8 @@
NotifyAccess=all
- PIDFile=/run/samba/nmbd.pid
- EnvironmentFile=-/etc/sysconfig/samba
+ PIDFile=@PIDDIR@/nmbd.pid
+ EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba
+ExecStartPre=/bin/sh -c '[ "`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1`" != "active directory domain controller" ]'
+ExecStartPre=/bin/sh -c '[ "`testparm -s --parameter-name="disable netbios" 2>/dev/null`" != "Yes" ]'
- ExecStart=/usr/sbin/nmbd --foreground --no-process-group $NMBDOPTIONS
+ ExecStart=@SBINDIR@/nmbd --foreground --no-process-group $NMBDOPTIONS
ExecReload=/usr/bin/kill -HUP $MAINPID
LimitCORE=infinity
---- samba-4.7.4/packaging/systemd/samba.service.orig 2017-12-26 18:26:31.457609415 +0100
-+++ samba-4.7.4/packaging/systemd/samba.service 2017-12-26 18:27:52.774275149 +0100
+--- samba-4.7.4/packaging/systemd/samba.service.in.orig 2017-12-26 18:26:31.457609415 +0100
++++ samba-4.7.4/packaging/systemd/samba.service.in 2017-12-26 18:27:52.774275149 +0100
@@ -8,6 +8,7 @@
- PIDFile=/run/samba/samba.pid
+ PIDFile=@PIDDIR@/samba.pid
LimitNOFILE=16384
- EnvironmentFile=-/etc/sysconfig/samba
+ EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba
+ExecStartPre=/bin/sh -c '[ "`samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -1`" = "active directory domain controller" ]'
- ExecStart=/usr/sbin/samba --foreground --no-process-group $SAMBAOPTIONS
+ ExecStart=@SBINDIR@/samba --foreground --no-process-group $SAMBAOPTIONS
ExecReload=/usr/bin/kill -HUP $MAINPID
+++ /dev/null
---- samba-4.1.8/packaging/systemd/nmb.service.orig 2014-06-04 19:33:33.162763572 +0200
-+++ samba-4.1.8/packaging/systemd/nmb.service 2014-06-04 19:38:01.579424644 +0200
-@@ -5,7 +5,7 @@
- [Service]
- Type=notify
- NotifyAccess=all
--PIDFile=/run/nmbd.pid
-+PIDFile=/run/samba/nmbd.pid
- EnvironmentFile=-/etc/sysconfig/samba
- ExecStart=/usr/sbin/nmbd $NMBDOPTIONS
- ExecReload=/usr/bin/kill -HUP $MAINPID
---- samba-4.1.8/packaging/systemd/samba.service.orig 2014-06-04 19:33:33.162763572 +0200
-+++ samba-4.1.8/packaging/systemd/samba.service 2014-06-04 19:38:16.252757669 +0200
-@@ -5,7 +5,7 @@
- [Service]
- Type=notify
- NotifyAccess=all
--PIDFile=/run/samba.pid
-+PIDFile=/run/samba/samba.pid
- LimitNOFILE=16384
- EnvironmentFile=-/etc/sysconfig/samba
- ExecStart=/usr/sbin/samba $SAMBAOPTIONS
---- samba-4.1.8/packaging/systemd/smb.service.orig 2014-06-04 19:33:33.162763572 +0200
-+++ samba-4.1.8/packaging/systemd/smb.service 2014-06-04 19:38:34.236090628 +0200
-@@ -5,7 +5,7 @@
- [Service]
- Type=notify
- NotifyAccess=all
--PIDFile=/run/smbd.pid
-+PIDFile=/run/samba/smbd.pid
- LimitNOFILE=16384
- EnvironmentFile=-/etc/sysconfig/samba
- ExecStart=/usr/sbin/smbd $SMBDOPTIONS
---- samba-4.1.8/packaging/systemd/winbind.service.orig 2014-06-04 19:33:33.166096905 +0200
-+++ samba-4.1.8/packaging/systemd/winbind.service 2014-06-04 19:38:47.509423687 +0200
-@@ -5,7 +5,7 @@
- [Service]
- Type=notify
- NotifyAccess=all
--PIDFile=/run/winbindd.pid
-+PIDFile=/run/samba/winbindd.pid
- EnvironmentFile=-/etc/sysconfig/samba
- ExecStart=/usr/sbin/winbindd "$WINBINDOPTIONS"
- ExecReload=/usr/bin/kill -HUP $MAINPID