]> git.pld-linux.org Git - packages/samba.git/commitdiff
- added no_libbsd patch and system_libbsd bcond
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 4 Apr 2018 17:29:24 +0000 (19:29 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Wed, 4 Apr 2018 17:29:24 +0000 (19:29 +0200)
samba-no_libbsd.patch [new file with mode: 0644]
samba.spec

diff --git a/samba-no_libbsd.patch b/samba-no_libbsd.patch
new file mode 100644 (file)
index 0000000..9603cce
--- /dev/null
@@ -0,0 +1,35 @@
+--- 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 @@
+     strlcpy_in_bsd = False
+-    # libbsd on some platforms provides strlcpy and strlcat
+-    if not conf.CHECK_FUNCS('strlcpy strlcat'):
+-        if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+-                               checklibc=True):
+-            strlcpy_in_bsd = True
+-    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('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)
index 7517e958411d2eccdefb6aa04249989bd11c752c..ffd33fe8ea0b1de0034895122606bf99755728ab 100644 (file)
@@ -8,7 +8,8 @@
 %bcond_without dmapi           # DMAPI support
 %bcond_without systemd         # systemd integration
 %bcond_with    system_heimdal  # Use system Heimdal libraries [since samba 4.4.x build fails with heimdal 1.5.x/7.x]
-%bcond_without system_libs     # system libraries (talloc,tdb,tevent,ldb)
+%bcond_with    system_libbsd   # system libbsd for MD5 and strl* functions
+%bcond_without system_libs     # system libraries from SAMBA project (talloc,tdb,tevent,ldb)
 %bcond_without ctdb_pcp        # Performance Co-Pilot support for CTDB
 # turn on when https://bugzilla.samba.org/show_bug.cgi?id=11764 is fixed
 %bcond_with    replace
@@ -57,6 +58,7 @@ Patch4:               unicodePwd-nthash-values-over-LDAP.patch
 Patch5:                %{name}-heimdal.patch
 Patch6:                server-role.patch
 Patch7:                %{name}-bug-9816.patch
+Patch8:                %{name}-no_libbsd.patch
 URL:           https://www.samba.org/
 BuildRequires: acl-devel
 %{?with_avahi:BuildRequires:   avahi-devel}
@@ -78,6 +80,7 @@ BuildRequires:        iconv
 BuildRequires: keyutils-devel
 BuildRequires: libaio-devel
 BuildRequires: libarchive-devel >= 3.1.2
+%{?with_system_libbsd:BuildRequires:   libbsd-devel}
 BuildRequires: libcap-devel
 BuildRequires: libcom_err-devel
 BuildRequires: libmagic-devel
@@ -121,7 +124,6 @@ BuildRequires:      tdb-devel >= %{tdb_ver}
 BuildRequires: tevent-devel >= %{tevent_ver}
 %endif
 BuildRequires: uid_wrapper >= 1.1.0
-BuildConflicts:        libbsd-devel
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-common = %{epoch}:%{version}-%{release}
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
@@ -533,6 +535,7 @@ wyeksportowania do PMCD.
 %{?with_system_heimdal:%patch5 -p1}
 %patch6 -p1
 %patch7 -p1
+%{!?with_system_libbsd:%patch8 -p1}
 
 %{__sed} -i -e 's|#!/usr/bin/env python|#!/usr/bin/python|' source4/scripting/bin/samba*
 %{__sed} -i -e 's|#!/usr/bin/env perl|#!/usr/bin/perl|' pidl/pidl
This page took 0.149209 seconds and 4 git commands to generate.