Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-942-g7bc566a

2009-09-25 Thread Andrew Bartlett
On Mon, 2009-09-21 at 23:49 +0200, Jelmer Vernooij wrote:
 Hi Andrew, Oliver,
 
 Sorry if this has already been fixed since..
 
 Andrew Bartlett wrote:
  diff --git a/source4/scripting/python/samba/provision.py 
  b/source4/scripting/python/samba/provision.py
  index 8a7ed6a..39c3fff 100644
  --- a/source4/scripting/python/samba/provision.py
  +++ b/source4/scripting/python/samba/provision.py
  @@ -36,6 +36,7 @@ import socket
   import param
   import registry
   import samba
  +import subprocess
   from auth import system_session
   from samba import version, Ldb, substitute_var, valid_netbios_name, 
  check_all_substituted, \
 DS_BEHAVIOR_WIN2008
 subprocess is a relatively new Python package, depending on it would
 mean that we can't support some of the older python versions that we
 support at the moment (it's = 2.4 IIRC). Do we really need one of the
 features from  subprocess or could we perhaps fall back to something
 also present in older versions of Python (os.popen2?).

I'm quite happy with this.  We handle the case where we can't call
terminate() - a newer feature, and it seems to work on enough systems.  

Andrew Bartlett

-- 
Andrew Bartletthttp://samba.org/~abartlet/
Authentication Developer, Samba Team   http://samba.org
Samba Developer, Cisco Inc.


signature.asc
Description: This is a digitally signed message part


Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-942-g7bc566a

2009-09-22 Thread Jelmer Vernooij
Hi Andrew, Oliver,

Sorry if this has already been fixed since..

Andrew Bartlett wrote:
 diff --git a/source4/scripting/python/samba/provision.py 
 b/source4/scripting/python/samba/provision.py
 index 8a7ed6a..39c3fff 100644
 --- a/source4/scripting/python/samba/provision.py
 +++ b/source4/scripting/python/samba/provision.py
 @@ -36,6 +36,7 @@ import socket
  import param
  import registry
  import samba
 +import subprocess
  from auth import system_session
  from samba import version, Ldb, substitute_var, valid_netbios_name, 
 check_all_substituted, \
DS_BEHAVIOR_WIN2008
subprocess is a relatively new Python package, depending on it would
mean that we can't support some of the older python versions that we
support at the moment (it's = 2.4 IIRC). Do we really need one of the
features from  subprocess or could we perhaps fall back to something
also present in older versions of Python (os.popen2?).

Cheers,

Jelmer



[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-942-g7bc566a

2009-08-11 Thread Andrew Bartlett
The branch, master has been updated
   via  7bc566a88277ecbc0f712b7c54116163930f187d (commit)
   via  69fa901bca9b1e032d6784df60a0e1c14d27d830 (commit)
   via  4921a5853b323e9c19f192220a94cf4a7cd077ff (commit)
   via  6dc41bf27c6157f981b9b45b026da41e9a3df184 (commit)
   via  f0decfe5c2395173fb632e9bfdea3edf43b1b434 (commit)
   via  28bcdf5266f75ef835fd3cbb353aadb782a1f27c (commit)
  from  a038f1e05b8b7acb5e99257e59178e1ece4ce156 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 7bc566a88277ecbc0f712b7c54116163930f187d
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Aug 12 11:09:50 2009 +1000

s4:provision Allow provision-backend to not run slapd for 'make test'

As the version of OpenLDAP required for Samba4 is fairly new, we don't
want to make it a requirement before this python code is run in 'make
test'.

As such, skip over the actual starting of slapd, but check the rest
runs alright (which still validates syntax and other modules).

Andrew Bartlett

commit 69fa901bca9b1e032d6784df60a0e1c14d27d830
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Aug 10 22:01:28 2009 +1000

s4:selftest Don't start the slapd for the provision, only for the run

The provision-backend script now starts slapd for us

Andrew Bartlett

commit 4921a5853b323e9c19f192220a94cf4a7cd077ff
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Aug 10 21:51:08 2009 +1000

s4:selftest Make OpenLDAP guess it's own modules from now on

In the releases of OpenLDAP we require (2.4.17) it can guess this much
itself, so no need for us to do it.

Andrew Bartlett

commit 6dc41bf27c6157f981b9b45b026da41e9a3df184
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Aug 10 21:46:20 2009 +1000

s4:provision Make the --ol-slapd paramter take the full path to slapd

commit f0decfe5c2395173fb632e9bfdea3edf43b1b434
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Aug 10 21:43:11 2009 +1000

s4:provision Assume the OpenLDAP backend can find it's own modules

commit 28bcdf5266f75ef835fd3cbb353aadb782a1f27c
Author: Oliver Liebel oli...@itc.li
Date:   Mon Aug 10 09:45:01 2009 +1000

s4:provision Rework and further automate setup of OpenLDAP backend

heres the summary of all changes/extensions:

- Andrew Bartlett's patch to generate indext
- Howard Chu's idea to use nosync on the DB included, but made optional

- slaptest-path is not needed any more (slapd -Ttest is used instead)
and is therefore removed. slapd-path is now recommended when
openldap-backend is chosen.
its also used for olc-conversion

- slapd-detection is now always done by ldapsearch (ldb module),
looking anonymous for objectClass: OpenLDAProotDSE via our ldapi_uri.

- if ldapsearch was not successfull, (no slapd listening on our socket)
slapd is
started via special generated slapdcommand_prov  (ldapi_uri only)

- slapd-provision-process startup is done via pythons subprocess.

- the slapd-provision-pid is stored under paths.ldapdir/slapd_provision_pid.

- after provision-backend is finished:
--- slapd.pid is compared with our stored slapd_provision_pid.
if the are unique, slapd.pid will be read out, and the
slapd provison-process will be shut down.
--- proper slapd-shutdown is verified again with ldb-search - ldapi_uri
- rootDSE.
--- if the pids are different or one of the pid-files is missing, slapd
will not be shut down,
instead an error message is displayed to locate slapd manually
--- extended help-messages (relevant to slapd) are always displayed,
e.g. the commandline with which slapd has to be started when everythings
finished
(slapd-commandline is stored under paths.ldapdir/slapd_command_file.txt))

- upgraded the content of the mini-howto (howto-ol-backend-s4.txt)

---

Summary of changes:
 howto-ol-backend-s4.txt   |  177 
 selftest/target/Samba4.pm |   75 +--
 source4/scripting/python/samba/provision.py   |  226 +
 source4/setup/provision-backend   |   17 +-
 source4/setup/slapd.conf  |   42 +
 source4/setup/tests/blackbox_provision-backend.sh |   10 +-
 6 files changed, 402 insertions(+), 145 deletions(-)
 create mode 100644 howto-ol-backend-s4.txt


Changeset truncated at 500 lines:

diff --git a/howto-ol-backend-s4.txt b/howto-ol-backend-s4.txt
new file mode 100644
index 000..c96ce55
--- /dev/null
+++ b/howto-ol-backend-s4.txt
@@ -0,0 +1,177 @@
+Samba4  OpenLDAP-Backend Quick-Howto
+
+
+oli...@itc.li  -  August 2009
+
+
+This Mini-Howto describes in a