From b02bcd4aaa9b337c67ec1acf94c616fc717c923e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Deschner?= Date: Thu, 28 May 2015 10:06:55 +0200 Subject: [PATCH] Update to Samba 4.2.2 Guenther --- .gitignore | 1 + samba-4.2.2-fix_debug_macro.patch | 109 -------- ...l-fix-detection-of-systemd-libraries.patch | 236 ------------------ samba.spec | 12 +- sources | 2 +- 5 files changed, 8 insertions(+), 352 deletions(-) delete mode 100644 samba-4.2.2-fix_debug_macro.patch delete mode 100644 samba-4.2.2-lib-util-fix-detection-of-systemd-libraries.patch diff --git a/.gitignore b/.gitignore index d771f61..f0c7b79 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ samba-3.6.0pre1.tar.gz /samba-4.2.0rc5.tar.xz /samba-4.2.0.tar.xz /samba-4.2.1.tar.xz +/samba-4.2.2.tar.xz diff --git a/samba-4.2.2-fix_debug_macro.patch b/samba-4.2.2-fix_debug_macro.patch deleted file mode 100644 index 114f557..0000000 --- a/samba-4.2.2-fix_debug_macro.patch +++ /dev/null @@ -1,109 +0,0 @@ -From fcda47ce2eff2395dbb403b7306865f610c8a83c Mon Sep 17 00:00:00 2001 -From: Lukas Slebodnik -Date: Thu, 5 Mar 2015 11:26:46 +0100 -Subject: [PATCH] lib/util: Include DEBUG macro in internal header files before - samba_util.h - -It's best practice to include external header files before internal -header files. In this case internal DEBUG macro cannot be defined and -therefore samba version of debug macro will be included -in header file "util/fault.h". - -In file included from example.c:27:0: -src/util/util.h:127:0: error: "DEBUG" redefined [-Werror] - #define DEBUG(level, format, ...) do { \ - ^ -In file included from /usr/include/samba-4.0/util/fault.h:29:0, - from /usr/include/samba-4.0/samba_util.h:62, - from /usr/include/samba-4.0/ndr.h:30, - from example.c:24: -/usr/include/samba-4.0/util/debug.h:182:0: note: this is the location of the previous definition - #define DEBUG( level, body ) \ - ^ - CC src/providers/ad/libsss_ad_common_la-ad_domain_info.lo -cc1: all warnings being treated as errors - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=11033 - -Signed-off-by: Lukas Slebodnik -Reviewed-by: Andreas Schneider -Reviewed-by: Martin Schwenke - -Autobuild-User(master): Jeremy Allison -Autobuild-Date(master): Wed Mar 11 18:47:22 CET 2015 on sn-devel-104 - -(cherry picked from commit 9643a4b1ef2ada764f454ecc82aa6936217967fc) ---- - lib/util/fault.h | 4 +--- - lib/util/memcache.c | 2 +- - source3/include/includes.h | 4 +++- - source4/include/includes.h | 2 ++ - 4 files changed, 7 insertions(+), 5 deletions(-) - -diff --git a/lib/util/fault.h b/lib/util/fault.h -index aa10a71..0ac6cb9 100644 ---- a/lib/util/fault.h -+++ b/lib/util/fault.h -@@ -25,9 +25,7 @@ - - #include "attr.h" - --#ifndef DEBUG --#include "debug.h" --#endif /* DEBUG */ -+/* Please include header file debug.h if you want to use macro SMB_ASSERT */ - - /** - * assert macros -diff --git a/lib/util/memcache.c b/lib/util/memcache.c -index 50e59fc..2f2e77c 100644 ---- a/lib/util/memcache.c -+++ b/lib/util/memcache.c -@@ -19,8 +19,8 @@ - - #include "replace.h" - #include --#include "../lib/util/samba_util.h" - #include "../lib/util/debug.h" -+#include "../lib/util/samba_util.h" - #include "../lib/util/dlinklist.h" - #include "../lib/util/rbtree.h" - #include "memcache.h" -diff --git a/source3/include/includes.h b/source3/include/includes.h -index 0715608..b61742a 100644 ---- a/source3/include/includes.h -+++ b/source3/include/includes.h -@@ -356,6 +356,9 @@ enum timestamp_set_resolution { - typedef char fstring[FSTRING_LEN]; - #endif - -+/* debug.h need to be included before samba_util.h for the macro SMB_ASSERT */ -+#include "../lib/util/debug.h" -+ - /* Lists, trees, caching, database... */ - #include "../lib/util/samba_util.h" - #include "../lib/util/util_net.h" -@@ -371,7 +374,6 @@ typedef char fstring[FSTRING_LEN]; - - #include "../lib/util/data_blob.h" - #include "../lib/util/time.h" --#include "../lib/util/debug.h" - #include "../lib/util/debug_s3.h" - - #include "../libcli/util/ntstatus.h" -diff --git a/source4/include/includes.h b/source4/include/includes.h -index 46b158e..5aabb8e 100644 ---- a/source4/include/includes.h -+++ b/source4/include/includes.h -@@ -57,6 +57,8 @@ - #endif - #include "../lib/util/xfile.h" - #include "../lib/util/attr.h" -+ -+/* debug.h need to be included before samba_util.h for the macro SMB_ASSERT */ - #include "../lib/util/debug.h" - #include "../lib/util/samba_util.h" - --- -2.2.0.rc0.207.ga3a616c - diff --git a/samba-4.2.2-lib-util-fix-detection-of-systemd-libraries.patch b/samba-4.2.2-lib-util-fix-detection-of-systemd-libraries.patch deleted file mode 100644 index deb25bf..0000000 --- a/samba-4.2.2-lib-util-fix-detection-of-systemd-libraries.patch +++ /dev/null @@ -1,236 +0,0 @@ -From 9cad09f8df8e080189fe274a6032c8fa70f0c2aa Mon Sep 17 00:00:00 2001 -From: Christof Schmitt -Date: Fri, 20 Mar 2015 12:13:14 -0700 -Subject: [PATCH 1/2] build: Move systemd checks to lib/util - -Only lib/util uses the systemd library, so it makes sense to have the -checks there. This also removes the need for the ctdb build script to -specify an empty tag for the systemd library. - -Signed-off-by: Christof Schmitt -Reviewed-by: Amitay Isaacs - -(cherry picked from commit 0509790ec3696e09f6d5e6db969e46e8fd975efb) ---- - ctdb/wscript | 2 -- - lib/util/wscript | 8 ++++++++ - lib/util/wscript_configure | 14 ++++++++++++++ - wscript | 22 ---------------------- - 4 files changed, 22 insertions(+), 24 deletions(-) - -diff --git a/ctdb/wscript b/ctdb/wscript -index 3e2a992..6f5f469 100755 ---- a/ctdb/wscript -+++ b/ctdb/wscript -@@ -212,8 +212,6 @@ def configure(conf): - conf.ADD_EXTRA_INCLUDES('#ctdb') - conf.ADD_EXTRA_INCLUDES('#lib #lib/replace') - -- conf.SET_TARGET_TYPE('systemd-daemon', 'EMPTY') -- - del(conf.env.defines['PYTHONDIR']) - del(conf.env.defines['PYTHONARCHDIR']) - -diff --git a/lib/util/wscript b/lib/util/wscript -index d296e75..2371689 100644 ---- a/lib/util/wscript -+++ b/lib/util/wscript -@@ -1,3 +1,11 @@ - def set_options(opt): - ''' This is a bit strange, but disable is the flag, not enable. ''' - opt.add_option('--disable-fault-handling', action='store_true', dest='disable_fault_handling', help=('disable the fault handlers'), default=False) -+ -+ opt.add_option('--with-systemd', -+ help=("Enable systemd integration"), -+ action='store_true', dest='enable_systemd') -+ -+ opt.add_option('--without-systemd', -+ help=("Disable systemd integration"), -+ action='store_false', dest='enable_systemd') -diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure -index 1270ab3..1cfba3e 100644 ---- a/lib/util/wscript_configure -+++ b/lib/util/wscript_configure -@@ -99,3 +99,17 @@ conf.CHECK_CODE('struct statvfs buf; buf.f_flags = 0', - headers='sys/statvfs.h', - local_include=False, - execute=False) -+ -+if Options.options.enable_systemd != False: -+ conf.CHECK_CFG(package='libsystemd-daemon', args='--cflags --libs', -+ msg='Checking for libsystemd-daemon', uselib_store="SYSTEMD-DAEMON") -+ conf.CHECK_HEADERS('systemd/sd-daemon.h', lib='systemd-daemon') -+ conf.CHECK_LIB('systemd-daemon', shlib=True) -+ -+if (conf.CONFIG_SET('HAVE_SYSTEMD_SD_DAEMON_H') and -+ conf.CONFIG_SET('HAVE_LIBSYSTEMD_DAEMON')): -+ conf.DEFINE('HAVE_SYSTEMD', '1') -+ conf.env['ENABLE_SYSTEMD'] = True -+else: -+ conf.SET_TARGET_TYPE('systemd-daemon', 'EMPTY') -+ conf.undefine('HAVE_SYSTEMD') -diff --git a/wscript b/wscript -index ad2e2a8..f4241f1 100644 ---- a/wscript -+++ b/wscript -@@ -70,14 +70,6 @@ def set_options(opt): - help=("Disable RELRO builds"), - action="store_false", dest='enable_relro') - -- opt.add_option('--with-systemd', -- help=("Enable systemd integration"), -- action='store_true', dest='enable_systemd') -- -- opt.add_option('--without-systemd', -- help=("Disable systemd integration"), -- action='store_false', dest='enable_systemd') -- - gr = opt.option_group('developer options') - - opt.tool_options('python') # options for disabling pyc or pyo compilation -@@ -214,20 +206,6 @@ def configure(conf): - msg="Checking compiler for full RELRO support"): - conf.env['ENABLE_RELRO'] = True - -- if Options.options.enable_systemd != False: -- conf.check_cfg(package='libsystemd-daemon', args='--cflags --libs', -- msg='Checking for libsystemd-daemon', uselib_store="SYSTEMD-DAEMON") -- conf.CHECK_HEADERS('systemd/sd-daemon.h', lib='systemd-daemon') -- conf.CHECK_LIB('systemd-daemon', shlib=True) -- -- if (conf.CONFIG_SET('HAVE_SYSTEMD_SD_DAEMON_H') and -- conf.CONFIG_SET('HAVE_LIBSYSTEMD_DAEMON')): -- conf.DEFINE('HAVE_SYSTEMD', '1') -- conf.env['ENABLE_SYSTEMD'] = True -- else: -- conf.SET_TARGET_TYPE('systemd-daemon', 'EMPTY') -- conf.undefine('HAVE_SYSTEMD') -- - conf.SAMBA_CONFIG_H('include/config.h') - - def etags(ctx): --- -2.3.5 - - -From 42e03b23cf8850cfb6df383a6b69627ffe1ce369 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Tue, 7 Apr 2015 16:30:30 +0200 -Subject: [PATCH 2/2] waf: Fix systemd detection - -https://bugzilla.samba.org/show_bug.cgi?id=11200 - -Signed-off-by: Andreas Schneider -Reviewed-by: Alexander Bokovoy - -(cherry picked from commit 5ee27b4ead57c15db7168d80f6fdf821663c44fc) ---- - lib/util/become_daemon.c | 12 ++++++------ - lib/util/wscript_build | 2 +- - lib/util/wscript_configure | 27 +++++++++++++++------------ - 3 files changed, 22 insertions(+), 19 deletions(-) - -diff --git a/lib/util/become_daemon.c b/lib/util/become_daemon.c -index 78bebfc..4622971 100644 ---- a/lib/util/become_daemon.c -+++ b/lib/util/become_daemon.c -@@ -24,7 +24,7 @@ - #include "includes.h" - #include "system/filesys.h" - #include "system/locale.h" --#if HAVE_SYSTEMD -+#if HAVE_LIBSYSTEMD_DAEMON - #include - #endif - #include "lib/util/close_low_fd.h" -@@ -69,9 +69,9 @@ _PUBLIC_ void become_daemon(bool do_fork, bool no_process_group, bool log_stdout - if (do_fork) { - newpid = fork(); - if (newpid) { --#if HAVE_SYSTEMD -+#if HAVE_LIBSYSTEMD_DAEMON - sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=%lu", (unsigned long) newpid); --#endif /* HAVE_SYSTEMD */ -+#endif /* HAVE_LIBSYSTEMD_DAEMON */ - _exit(0); - } - } -@@ -98,7 +98,7 @@ _PUBLIC_ void become_daemon(bool do_fork, bool no_process_group, bool log_stdout - - _PUBLIC_ void exit_daemon(const char *msg, int error) - { --#ifdef HAVE_SYSTEMD -+#ifdef HAVE_LIBSYSTEMD_DAEMON - if (msg == NULL) { - msg = strerror(error); - } -@@ -117,7 +117,7 @@ _PUBLIC_ void daemon_ready(const char *name) - if (name == NULL) { - name = "Samba"; - } --#ifdef HAVE_SYSTEMD -+#ifdef HAVE_LIBSYSTEMD_DAEMON - sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", name); - #endif - DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve " -@@ -129,7 +129,7 @@ _PUBLIC_ void daemon_status(const char *name, const char *msg) - if (name == NULL) { - name = "Samba"; - } --#ifdef HAVE_SYSTEMD -+#ifdef HAVE_LIBSYSTEMD_DAEMON - sd_notifyf(0, "\nSTATUS=%s: %s", name, msg); - #endif - DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg)); -diff --git a/lib/util/wscript_build b/lib/util/wscript_build -index 5db7e35..cb9e8e5 100755 ---- a/lib/util/wscript_build -+++ b/lib/util/wscript_build -@@ -54,7 +54,7 @@ if not bld.env.SAMBA_UTIL_CORE_ONLY: - tevent_debug.c util_process.c memcache.c''', - deps='samba-util-core DYNCONFIG close-low-fd tini tiniparser', - -- public_deps='talloc tevent execinfo pthread LIBCRYPTO charset util_setid systemd-daemon', -+ public_deps='talloc tevent execinfo pthread LIBCRYPTO charset util_setid systemd systemd-daemon', - public_headers='debug.h attr.h byteorder.h data_blob.h memory.h safe_string.h time.h talloc_stack.h xfile.h dlinklist.h samba_util.h string_wrappers.h idtree.h idtree_random.h blocking.h signal.h substitute.h fault.h', - header_path= [ ('dlinklist.h samba_util.h', '.'), ('*', 'util') ], - local_include=False, -diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure -index 1cfba3e..8d8dc87 100644 ---- a/lib/util/wscript_configure -+++ b/lib/util/wscript_configure -@@ -100,16 +100,19 @@ conf.CHECK_CODE('struct statvfs buf; buf.f_flags = 0', - local_include=False, - execute=False) - -+# -+# systemd removed the libsystemd-daemon and libsystemd-journal libraries. In newer -+# versions it is only libsystemd. As waf pkg-config handling does not provide -+# targets which could be used as a dependency based on the package name we need -+# to look for them on our own. This enabled one of the library targets based on -+# which version we detect. -+# -+conf.SET_TARGET_TYPE('systemd-daemon', 'EMPTY') -+conf.SET_TARGET_TYPE('systemd-journal', 'EMPTY') -+conf.SET_TARGET_TYPE('systemd', 'EMPTY') -+ - if Options.options.enable_systemd != False: -- conf.CHECK_CFG(package='libsystemd-daemon', args='--cflags --libs', -- msg='Checking for libsystemd-daemon', uselib_store="SYSTEMD-DAEMON") -- conf.CHECK_HEADERS('systemd/sd-daemon.h', lib='systemd-daemon') -- conf.CHECK_LIB('systemd-daemon', shlib=True) -- --if (conf.CONFIG_SET('HAVE_SYSTEMD_SD_DAEMON_H') and -- conf.CONFIG_SET('HAVE_LIBSYSTEMD_DAEMON')): -- conf.DEFINE('HAVE_SYSTEMD', '1') -- conf.env['ENABLE_SYSTEMD'] = True --else: -- conf.SET_TARGET_TYPE('systemd-daemon', 'EMPTY') -- conf.undefine('HAVE_SYSTEMD') -+ conf.check_cfg(package='libsystemd-daemon', args='--cflags --libs', -+ msg='Checking for libsystemd-daemon') -+ if not conf.CHECK_LIB('systemd-daemon', shlib=True): -+ conf.CHECK_LIB('systemd', shlib=True) --- -2.3.5 - diff --git a/samba.spec b/samba.spec index 50a4d0a..8d67a8c 100644 --- a/samba.spec +++ b/samba.spec @@ -6,9 +6,9 @@ # ctdb is enabled by default, you can disable it with: --without clustering %bcond_without clustering -%define main_release 8 +%define main_release 0 -%define samba_version 4.2.1 +%define samba_version 4.2.2 %define talloc_version 2.1.2 %define ntdb_version 1.0 %define tdb_version 1.3.4 @@ -92,8 +92,6 @@ URL: http://www.samba.org/ Source0: samba-%{version}%{pre_release}.tar.xz -Patch0: samba-4.2.2-fix_debug_macro.patch -Patch1: samba-4.2.2-lib-util-fix-detection-of-systemd-libraries.patch Patch2: samba-4.2-fix-rpc-helper.patch Patch3: samba-4.2-auth-credentials-if-credentials-have-principal-set-t.patch Patch4: samba-4.2-fix-gnutls-deprecation.patch @@ -645,8 +643,6 @@ and use CTDB instead. %prep %setup -q -n samba-%{version}%{pre_release} -%patch0 -p1 -b .samba-4.2.2-fix_debug_macro.patch -%patch1 -p1 -b .samba-4.2.2-lib-util-fix-detection-of-systemd-libraries.patch %patch2 -p1 -b .samba-4.2-fix-rpc-helper.patch %patch3 -p1 -b .samba-4.2-auth-credentials-if-credentials-have-principal-set-t.patch %patch4 -p1 -b .samba-4.2-fix-gnutls-deprecation.patch @@ -1930,6 +1926,7 @@ rm -rf %{buildroot} %{_datadir}/ctdb-tests/eventscripts/etc-ctdb/events.d %{_datadir}/ctdb-tests/eventscripts/etc-ctdb/functions %{_datadir}/ctdb-tests/eventscripts/etc-ctdb/nfs-rpc-checks.d +%{_datadir}/ctdb-tests/eventscripts/etc-ctdb/statd-callout %{_datadir}/ctdb-tests/scripts/common.sh %{_datadir}/ctdb-tests/scripts/integration.bash %{_datadir}/ctdb-tests/scripts/test_wrap @@ -1938,6 +1935,9 @@ rm -rf %{buildroot} %endif # with_clustering_support %changelog +* Thu May 28 2015 Guenther Deschner - 4.2.2-0 +- Update to Samba 4.2.2 + * Mon May 11 2015 Alexander Bokovoy - 4.2.1-8 - Fixes: #1219832: Samba 4.2 broke FreeIPA trusts to AD - Remove usage of deprecated API from gnutls diff --git a/sources b/sources index 19f15d3..8227e38 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e4842144c62bb682a5186ffe99548a7c samba-4.2.1.tar.xz +b7462c84c566322d8772011d4dfbb9e1 samba-4.2.2.tar.xz