From 4ceca4fe4f1d5f0fac900de8712edee56d9b51a7 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 16 Oct 2016 02:21:06 +0300 Subject: [PATCH] samba4: 4.3.11 -> 4.4.6 --- pkgs/servers/samba/4.x-fix-ctdb-deps.patch | 13 ---- .../samba/4.x-no-persistent-install.patch | 68 +++++++++---------- pkgs/servers/samba/4.x.nix | 6 +- 3 files changed, 34 insertions(+), 53 deletions(-) delete mode 100644 pkgs/servers/samba/4.x-fix-ctdb-deps.patch diff --git a/pkgs/servers/samba/4.x-fix-ctdb-deps.patch b/pkgs/servers/samba/4.x-fix-ctdb-deps.patch deleted file mode 100644 index 338863484124..000000000000 --- a/pkgs/servers/samba/4.x-fix-ctdb-deps.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ctdb/wscript b/ctdb/wscript -index 3e2a992..3fe15cc 100755 ---- a/ctdb/wscript -+++ b/ctdb/wscript -@@ -568,7 +568,7 @@ def build(bld): - source='ib/ibwrapper_test.c', - includes='include include/internal', - deps='''replace talloc ctdb-client ctdb-common -- ctdb-system''' + -+ ctdb-system ctdb-common-util''' + - ib_deps, - install_path='${CTDB_TEST_LIBDIR}') - diff --git a/pkgs/servers/samba/4.x-no-persistent-install.patch b/pkgs/servers/samba/4.x-no-persistent-install.patch index c3e013f7862b..efb539bfaea5 100644 --- a/pkgs/servers/samba/4.x-no-persistent-install.patch +++ b/pkgs/servers/samba/4.x-no-persistent-install.patch @@ -1,26 +1,7 @@ -diff --git a/dynconfig/wscript b/dynconfig/wscript -index aa4e66e..d53f433 100755 ---- a/dynconfig/wscript -+++ b/dynconfig/wscript -@@ -379,9 +379,9 @@ def build(bld): - cflags=cflags) - - # install some extra empty directories -- bld.INSTALL_DIRS("", "${CONFIGDIR} ${PRIVATE_DIR} ${LOGFILEBASE}"); -- bld.INSTALL_DIRS("", "${PRIVATE_DIR} ${PRIVILEGED_SOCKET_DIR}") -- bld.INSTALL_DIRS("", "${STATEDIR} ${CACHEDIR}"); -+ #bld.INSTALL_DIRS("", "${CONFIGDIR} ${PRIVATE_DIR} ${LOGFILEBASE}"); -+ #bld.INSTALL_DIRS("", "${PRIVATE_DIR} ${PRIVILEGED_SOCKET_DIR}") -+ #bld.INSTALL_DIRS("", "${STATEDIR} ${CACHEDIR}"); - - # these might be on non persistent storage -- bld.INSTALL_DIRS("", "${LOCKDIR} ${PIDDIR} ${SOCKET_DIR}") -+ #bld.INSTALL_DIRS("", "${LOCKDIR} ${PIDDIR} ${SOCKET_DIR}") -diff --git a/ctdb/wscript b/ctdb/wscript -index 3e2a992..1b93a4d 100755 ---- a/ctdb/wscript -+++ b/ctdb/wscript -@@ -473,10 +473,10 @@ def build(bld): +diff -ru3 samba-4.4.6/ctdb/wscript samba-4.4.6-new/ctdb/wscript +--- samba-4.4.6/ctdb/wscript 2016-09-22 09:42:48.000000000 +0300 ++++ samba-4.4.6-new/ctdb/wscript 2016-10-15 23:31:13.932088237 +0300 +@@ -581,7 +581,7 @@ for t in etc_subdirs: files = SUBDIR_MODE('%s/%s' % (configdir, t), trim_path=configdir) for fmode in files: @@ -28,12 +9,8 @@ index 3e2a992..1b93a4d 100755 + bld.INSTALL_FILES('${EXEC_PREFIX}${CTDB_ETCDIR}', 'config/%s' % fmode[0], destname=fmode[0], chmod=fmode[1]) -- bld.INSTALL_FILES(bld.env.CTDB_ETCDIR, 'config/functions', -+ bld.INSTALL_FILES('${EXEC_PREFIX}${CTDB_ETCDIR}', 'config/functions', - destname='functions') - - etc_scripts = [ -@@ -489,18 +489,18 @@ def build(bld): + bld.SAMBA_GENERATOR('ctdb-functions', +@@ -601,23 +601,19 @@ ] for t in etc_scripts: @@ -41,8 +18,12 @@ index 3e2a992..1b93a4d 100755 + bld.INSTALL_FILES('${EXEC_PREFIX}${CTDB_ETCDIR}', 'config/%s' % t, destname=t, chmod=0755) -- bld.INSTALL_FILES('${SYSCONFDIR}/sudoers.d', 'config/ctdb.sudoers', -+ bld.INSTALL_FILES('${EXEC_PREFIX}${SYSCONFDIR}/sudoers.d', 'config/ctdb.sudoers', + bld.SAMBA_GENERATOR('ctdb-sudoers', + source='config/ctdb.sudoers', + target='ctdb.sudoers', + rule='sed %s ${SRC} > ${TGT}' % (sed_cmdline)) +- bld.INSTALL_FILES('${SYSCONFDIR}/sudoers.d', 'ctdb.sudoers', ++ bld.INSTALL_FILES('${EXEC_PREFIX}${SYSCONFDIR}/sudoers.d', 'ctdb.sudoers', destname='ctdb') - bld.INSTALL_FILES('${CTDB_ETCDIR}/notify.d', 'config/notify.d.README', @@ -52,9 +33,22 @@ index 3e2a992..1b93a4d 100755 - bld.install_dir(bld.env.CTDB_LOGDIR) - bld.install_dir(bld.env.CTDB_RUNDIR) - bld.install_dir(bld.env.CTDB_VARDIR) -+ #bld.install_dir(bld.env.CTDB_LOGDIR) -+ #bld.install_dir(bld.env.CTDB_RUNDIR) -+ #bld.install_dir(bld.env.CTDB_VARDIR) - - sed_expr = 's/@PACKAGE_VERSION@/%s/g' % VERSION - t = bld.SAMBA_GENERATOR('ctdb-pc', +- + # Unit tests + ctdb_unit_tests = [ + 'db_hash_test', +diff -ru3 samba-4.4.6/dynconfig/wscript samba-4.4.6-new/dynconfig/wscript +--- samba-4.4.6/dynconfig/wscript 2016-01-26 14:45:46.000000000 +0300 ++++ samba-4.4.6-new/dynconfig/wscript 2016-10-15 22:21:18.159705132 +0300 +@@ -416,11 +416,3 @@ + public_headers=os_path_relpath(os.path.join(Options.launch_dir, version_header), bld.curdir), + header_path='samba', + cflags=cflags) +- +- # install some extra empty directories +- bld.INSTALL_DIRS("", "${CONFIGDIR} ${PRIVATE_DIR} ${LOGFILEBASE}"); +- bld.INSTALL_DIRS("", "${PRIVATE_DIR} ${PRIVILEGED_SOCKET_DIR}") +- bld.INSTALL_DIRS("", "${STATEDIR} ${CACHEDIR}"); +- +- # these might be on non persistent storage +- bld.INSTALL_DIRS("", "${LOCKDIR} ${PIDDIR} ${SOCKET_DIR}") diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index a3bb2d44216b..2dfdf3709ee5 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -18,18 +18,18 @@ with lib; stdenv.mkDerivation rec { - name = "samba-4.3.11"; + name = "samba-${version}"; + version = "4.4.6"; src = fetchurl { url = "mirror://samba/pub/samba/stable/${name}.tar.gz"; - sha256 = "1v2grwivm6rasz1ganbybs0ikz1lydaniy65kxf1v8rl1qqngach"; + sha256 = "1361ijz7vpgf66w3j9z7qb37rnlrydxw01ibjnfhjqqcb7fj7i1p"; }; outputs = [ "out" "dev" "man" ]; patches = [ ./4.x-no-persistent-install.patch - ./4.x-fix-ctdb-deps.patch ]; buildInputs =