The branch, v4-1-test has been updated via 2947da5 Revert "buildtools: Rename perl vendorarch configure option." via 13c1147 Revert "buildtools: Add perl vendorlib configure option." via a3a75d7 Revert "wafsamba: If perl can't provide defaults, define them." via 3b4dc66 Revert "wafsamba: Fail with error message if perl doesn't provide valid dirs." via 699bcec pidl/wscript: remove --with-perl-* options via 999867a Revert "autobuild: Set perl vendorlib direcotry." via 8f967e2 Revert "script/autobuild: make use of --with-perl-{arch,lib}-install-dir" via 23aba84 pidl: remove superfluous "use lib ...". via 6feada1 pidl: fix the perl module search path (use lib ...) when installing pidl. via 50f3e56 wafsamba: add perl_fixup parameter to INSTALL_FILES via 016f1ef s3:build: don't detect perl in source3/wscript again. via 711a810 pidl/wscript: don't check for perl again. via 94e9dae build: do full SAMBA_CHECK_PERL() check in configure via dff2c03 wafsamba: add samba_perl.py with SAMBA_CHECK_PERL() higher level check. via 78cb744 dynconfig: implement PERL_ARCH_INSTALL_DIR via 89cc025 dynconfig: implement PERL_LIB_INSTALL_DIR. via f839d6c lib/ldb/wscript: pass dep_vars=['LDB_VERSION'] to SAMBA_GENERATOR() via 226ccc7 docs-xml/wscript_build: pass dep_vars=bld.dynconfig_varnames() to SAMBA_GENERATOR() via 48e500d dynconfig/wscript: add dynconfig_varnames() via d9d873c wafsamba: let SAMBA_BLDOPTIONS() use dep_vars=['defines'] instead of always=True via e19b17a wafsamba: fix dependencies on environment variables for python_fixup via 81c781d wafsamba: allow an optional dep_vars list to be passed to SAMBA_GENERATOR() via f0cf2c0 wafsamba: fix dependency for SAMBA_GENERATOR() when passing vars!=None via ae97d88 wafsamba: fix dependency calculation for SAMBA_GENERATOR() via cfbf91e wafsamba: improve wording in a comment via 6392749 wafsamba: remove unused variable from copy_and_fix_python_path via cda88f3 docs: Always declare rule to build parameters.all.xml and do it first via fd0fe9a docs: define and include entities for the docs via 422d803 docs: remove the file prefix from included path names via f66abcc docs: update XInclude year to conform with current standard via 3aa6401 pdb_tdb: Fix a TALLOC/SAFE_FREE mixup via 60501b0 s3-keytab: fix keytab array NULL termination. via 1d9c15f spoolss: remove unused fill_job_info3() via bcd16d6 spoolss: fix jobid in level 3 EnumJobs response via 20f803b spoolss: fix jobid in level 2 GetJob and EnumJobs responses via e1fb94b spoolss: fix jobid in level 1 GetJob and EnumJobs responses via 7bf4cb0 spoolss: fix GetJob jobid lookups via 9f438fd printing: add jobid_to_sysjob helper function from 00f6184 s3:smbd: fix file corruption using "write cache size != 0"
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-1-test - Log ----------------------------------------------------------------- commit 2947da55a04a5ac452fdb3d531339f358a240459 Author: Michael Adam <ob...@samba.org> Date: Thu Sep 4 12:45:48 2014 +0200 Revert "buildtools: Rename perl vendorarch configure option." This reverts commit 04685ff4eed9535769d6a5feee7353f1796a4389. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> Autobuild-User(master): Stefan Metzmacher <me...@samba.org> Autobuild-Date(master): Tue Sep 9 03:07:20 CEST 2014 on sn-devel-104 (cherry picked from commit 1f878b9986523ce9e35dd74ae3c201f4e55f66f3) Autobuild-User(v4-1-test): Karolin Seeger <ksee...@samba.org> Autobuild-Date(v4-1-test): Mon Nov 17 23:31:10 CET 2014 on sn-devel-104 commit 13c1147b6e9b11642302829dccbdb93148548e70 Author: Michael Adam <ob...@samba.org> Date: Thu Sep 4 12:45:40 2014 +0200 Revert "buildtools: Add perl vendorlib configure option." This reverts commit 48f0183dbeddd7bdf333a40fe0d3e1c7e7fe00f2. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> (cherry picked from commit 0b91f7d806b9d18881edb8df981a9eeb057580e5) commit a3a75d7d55479f111336a3ef73beabea4317dc19 Author: Michael Adam <ob...@samba.org> Date: Thu Sep 4 12:45:32 2014 +0200 Revert "wafsamba: If perl can't provide defaults, define them." This reverts commit 0ba276ebad57d75a769e22414f94acbe8c177d97. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> (cherry picked from commit 42990ca3c8fa5752280840ea202a537915680b7d) commit 3b4dc6619aab0cac8b80090c150d352ab031246c Author: Michael Adam <ob...@samba.org> Date: Thu Sep 4 12:45:21 2014 +0200 Revert "wafsamba: Fail with error message if perl doesn't provide valid dirs." This reverts commit 2637890ef42a238093f0f3cbdda0d621d5f9b2e2. We are reverting buildtools/wafadmin/Tools/perl.py back to upstream state. Everything special is now in buildtools/wafsamba/samba_perl.py. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> (cherry picked from commit c5dd2f18dd09b08758fc68a4aac10cf01d775c85) commit 699bcecfa3476fcca7b976c43714332ddafbc510 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 26 21:33:05 2014 +0200 pidl/wscript: remove --with-perl-* options These are not needed anymore as we have useful defaults now. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit ee2148754e2e2604ac918343fa8769a25523eb49) commit 999867ac83265d92989d9f5b1782e7acdfaebb98 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Nov 12 11:44:56 2014 +0100 Revert "autobuild: Set perl vendorlib direcotry." This reverts commit fe7d930338f29aab47b55ead0a5323e1d9b31495. commit 8f967e2b56cf9045d8b14e790df95fe80881bb95 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Nov 12 11:44:39 2014 +0100 Revert "script/autobuild: make use of --with-perl-{arch,lib}-install-dir" This reverts commit 7a6173ddce2142d3c0465908f2ced29aee7f32e8. commit 23aba84192cbf2df5b9a02eee331a744063cc196 Author: Michael Adam <ob...@samba.org> Date: Mon Aug 25 23:58:48 2014 +0200 pidl: remove superfluous "use lib ...". BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <ob...@samba.org> (cherry picked from commit fac24e11655c554cd3113dfb6fc918a0fd3c880c) commit 6feada1d984d0f5c8e9b12842a074cab85d6ee4a Author: Michael Adam <ob...@samba.org> Date: Mon Aug 25 23:57:23 2014 +0200 pidl: fix the perl module search path (use lib ...) when installing pidl. This way, pidl can also run with modules installed under the $prefix. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <ob...@samba.org> (cherry picked from commit b537c5a340bae2accbf35a4ec5eab7074b90f0b1) commit 50f3e565427ac2d31c9641aa02ff94103a2f07a3 Author: Michael Adam <ob...@samba.org> Date: Thu Jul 17 16:54:54 2014 +0200 wafsamba: add perl_fixup parameter to INSTALL_FILES This fixes the search path for modules when installing a perl "binary" by replacing a line 'use lib "$RealBin/lib";' which works for the build directory with the appropriate "use lib" line. This is a step in allowing to install perl modules under the prefix directory again. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Pair-Programmed-With: Stefan Metzmacher <me...@samba.org> Signed-off-by: Michael Adam <ob...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> (cherry picked from commit f73a0c2af9748d57721211472cd6c50b990ee693) commit 016f1ef8dab09a9f3fde1f76cc556504f2f579f9 Author: Michael Adam <ob...@samba.org> Date: Wed Aug 27 22:19:38 2014 +0200 s3:build: don't detect perl in source3/wscript again. This is done in the top level now. Signed-off-by: Michael Adam <ob...@samba.org> (cherry picked from commit e7fc38a7df90e26a96ec5573042dccc1746e4f2c) commit 711a8108e668b272ba4001555a7149331f106614 Author: Michael Adam <ob...@samba.org> Date: Thu Sep 4 01:38:14 2014 +0200 pidl/wscript: don't check for perl again. This is done at the toplevel now. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Pair-Programmed-With: Stefan Metzmacher <me...@samba.org> Signed-off-by: Michael Adam <ob...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> (cherry picked from commit 191fc0e541e7c9d0a1095dc287402df9947ce779) commit 94e9dae277372e22286a96beb042a94f28bb0781 Author: Michael Adam <ob...@samba.org> Date: Tue Aug 26 01:31:17 2014 +0200 build: do full SAMBA_CHECK_PERL() check in configure ...instead of only checking for the perl binary This autodetects PERL_LIB_INSTALL_DIR and removes the need of the --with-perl-lib-install-dir when using a --prefix!=/usr. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <ob...@samba.org> (cherry picked from commit 7bf9e937ae59e10a9b40be3a60ffaad49669fb83) commit dff2c03b038b8bf1514b1cf80474a4272e64eefd Author: Michael Adam <ob...@samba.org> Date: Tue Aug 26 01:29:57 2014 +0200 wafsamba: add samba_perl.py with SAMBA_CHECK_PERL() higher level check. This checks for the perl binary, sets PERL and PERL_SPECIFIED as well es the PERL_ARCH_INSTALL_DIR and PERL_LIB_INSTALL_DIR. We want to avoid installing the perl modules outside the prefix. I.e. generally,the perl modules should be installed under "$prefix/share/perl5". This improves the fixes for bug #10472. The new strategy for automatically setting the paths is this: - if the prefix equals perl's vendorprefix, then - PERL_LIB_INSTALL_DIR is set to perl's vendorlib dir - PERL_ARCH_INSTALL_DIR is set to perl's vendorarch dir - otherwise: - PERL_LIB_INSTALL_DIR is set to ${DATADIR}/perl5 (usually ${PREFIX}/share/perl5) - PERL_ARCH_INSTALL_DIR is set to ${LIBDIR}/perl5 (usually ${PREFIX}/lib/perl5) BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Pair-Programmed-With: Stefan Metzmacher <me...@samba.org> Signed-off-by: Michael Adam <ob...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> (cherry picked from commit 75c3e240e0703be8c86596e689e466b4dee5e85e) commit 78cb744682c13c6f7674db097cde4d897878b171 Author: Michael Adam <ob...@samba.org> Date: Tue Aug 26 00:41:54 2014 +0200 dynconfig: implement PERL_ARCH_INSTALL_DIR BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> (cherry picked from commit 6ad678166c85f0eb90b76ccf842d1aa8dcb6b41a) commit 89cc025df619d7dbe3ef5c019da8659b5d63455c Author: Michael Adam <ob...@samba.org> Date: Mon Aug 25 23:59:46 2014 +0200 dynconfig: implement PERL_LIB_INSTALL_DIR. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Pair-Programmed-With: Stefan Metzmacher <me...@samba.org> Signed-off-by: Michael Adam <ob...@samba.org> Signed-off-by: Stefan Metzmacher <me...@samba.org> (cherry picked from commit e5d54c5841c003d55960458da29635b3656884df) commit f839d6cdf8809c6ba62d45805c4109ab41f4ea76 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Aug 27 10:29:50 2014 +0200 lib/ldb/wscript: pass dep_vars=['LDB_VERSION'] to SAMBA_GENERATOR() bld.add_manual_dependency() only works for files not for environment variables. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit bb9a939e78d54a4b09f38d1f7cec1544239fef34) commit 226ccc7fbceb296b53646a1e25d6e4c2a5235054 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Aug 27 10:15:56 2014 +0200 docs-xml/wscript_build: pass dep_vars=bld.dynconfig_varnames() to SAMBA_GENERATOR() This avoids the use of always=True. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit de0443ac7690923fa1731560fa51a551711f37fe) commit 48e500dee56d182e69c5707f33ee1d485a9d8a76 Author: Stefan Metzmacher <me...@samba.org> Date: Wed Aug 27 10:13:09 2014 +0200 dynconfig/wscript: add dynconfig_varnames() Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit 32ddd5b6559ad22b2ca84262c396dc889d661bab) commit d9d873cd94225ece888d2d4187a6dbda44efa09f Author: Stefan Metzmacher <me...@samba.org> Date: Wed Aug 27 10:08:21 2014 +0200 wafsamba: let SAMBA_BLDOPTIONS() use dep_vars=['defines'] instead of always=True Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit a41a9ad0749755d612df81bb77384b4f479e1af2) commit e19b17a5dca7a577b056b41daf9f9061b76271e6 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 26 23:14:23 2014 +0200 wafsamba: fix dependencies on environment variables for python_fixup We now checksum the sourcecode of copy_and_fix_python_path() and the env variables used by this function. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit 7316653a82fea3dfe1ac8aa89003ce15836a11b9) commit 81c781d74a334dddf9efb437940d2fcabb2a5f4e Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 26 23:11:39 2014 +0200 wafsamba: allow an optional dep_vars list to be passed to SAMBA_GENERATOR() This can be used to checksum variables used in the rule function. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit 04bb8ff7e6a3908b952d4d95edc2c7411611ac33) commit f0cf2c0501eeb540eca8e3ae0123fd9caed31f0f Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 26 23:11:39 2014 +0200 wafsamba: fix dependency for SAMBA_GENERATOR() when passing vars!=None vars can only be a dictionary as that's the only thing bld.EXPAND_VARIABLES() accepts. We need to checksum the whole vars dictionary into the dependencies. We set task.env.SAMBA_GENERATOR_VARS = vars and add SAMBA_GENERATOR_VARS to the dep_vars. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit da8c76354549a64181cffc36e1c0bb0c6c4f87d3) commit ae97d88bda2a40376f8703b3dbd69551de80ead1 Author: Stefan Metzmacher <me...@samba.org> Date: Tue Aug 26 23:11:39 2014 +0200 wafsamba: fix dependency calculation for SAMBA_GENERATOR() We need to checksum the rule as string command of the sourcecode of the python function. This is stored in the 'ruledeps' envariable on the waf Task. See exec_rule() in wafadmin/TaskGen.py. dep_vars = getattr(self, 'dep_vars', ['ruledeps']) if dep_vars: tsk.dep_vars = dep_vars if isinstance(self.rule, str): tsk.env.ruledeps = self.rule else: # only works if the function is in a global module such as a waf tool tsk.env.ruledeps = Utils.h_fun(self.rule) If there's no 'dep_vars' it defaults to ['ruledeps']. As we pass our own 'dep_vars' we need to explicitly add 'ruledeps'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit ee8fbbd41741e958e0ab6d7b9ab465d664abac60) commit cfbf91eb75987e6754f1fd410fcd192b73878653 Author: Michael Adam <ob...@samba.org> Date: Mon Aug 25 23:39:50 2014 +0200 wafsamba: improve wording in a comment Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> (cherry picked from commit 210d7de34f953c308e5fa3db9506796ef2b21688) commit 639274995bfb63d0628f1e4284ab4480e8085a76 Author: Michael Adam <ob...@samba.org> Date: Mon Aug 25 23:38:29 2014 +0200 wafsamba: remove unused variable from copy_and_fix_python_path Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Stefan Metzmacher <me...@samba.org> (cherry picked from commit ca06fac2c87d4abe884d2b6e3c1022266b06e287) commit cda88f3c3fb44f5bcecc7763918b3624f29e656b Author: Andrew Bartlett <abart...@samba.org> Date: Wed Jan 15 18:11:41 2014 +1300 docs: Always declare rule to build parameters.all.xml and do it first This ensures this file and the rule to generate it can always be found. Andrew Bartlett Change-Id: I76d9f4470e2678fc2df4e3a13642737128938f3a Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit 2c86758b04515998c690f293fada2cc43116d764) commit fd0fe9a4bf1410d6e80e79fe0571fc554736fb9c Author: Garming Sam <garm...@catalyst.net.nz> Date: Thu Jan 9 12:01:18 2014 +1300 docs: define and include entities for the docs This allows for dynamic default settings to be generated. Change-Id: If8b93d233fb941bc7e3073ccf4b5ec0b0a231bd9 Pair-programmed-with: Andrew Bartlett <abart...@samba.org> Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit 57ba012c10fb21f261a3ab9136be05a694278df9) commit 422d8036e52cc96b1956c0c584765a16025f504d Author: Garming Sam <garm...@catalyst.net.nz> Date: Tue Jan 7 17:09:39 2014 +1300 docs: remove the file prefix from included path names This allows the inbuilt python xml modules to perform the include. Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit 1d68b5b0bb3158cabcd371ab5c24392bcb0a32bd) commit f66abcccf8651a46f15ff15655b07c5b4fd725ed Author: Garming Sam <garm...@catalyst.net.nz> Date: Tue Jan 7 16:08:50 2014 +1300 docs: update XInclude year to conform with current standard This allows the inbuilt python XML parser to handle these includes. Signed-off-by: Garming Sam <garm...@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abart...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> (cherry picked from commit 02379369ef7968f297b8678c9743679b4775662e) commit 3aa6401c47b6f5c52e1a826ed5e7f2069e384897 Author: Volker Lendecke <v...@samba.org> Date: Tue Nov 11 10:35:50 2014 +0000 pdb_tdb: Fix a TALLOC/SAFE_FREE mixup Signed-off-by: Volker Lendecke <v...@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=10932 invalid free in pdb_tdb commit 60501b07bea5b6ce77521d4b602c42d0cb27900c Author: Matt Rogers <mrog...@redhat.com> Date: Wed Nov 12 17:21:05 2014 +0100 s3-keytab: fix keytab array NULL termination. Signed-off-by: Matt Rogers <mrog...@redhat.com> Reviewed-by: Guenther Deschner <g...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> (cherry picked from commit 0de6799996955fbf8e19ace8c4b7b61f5a262cb5) BUG: https://bugzilla.samba.org/show_bug.cgi?id=10933 net ads join -k can segfault with existing keytab entries commit 1d9c15fd790e665ccd5caa990664e114d547eaa4 Author: David Disseldorp <dd...@samba.org> Date: Thu Oct 30 01:37:51 2014 +0100 spoolss: remove unused fill_job_info3() This logic has been moved into the previous EnumJobs(level=3) caller. The info3 structure only contains two fields that are used, so it doesn't make sense to have a separate helper for it. Signed-off-by: David Disseldorp <dd...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> (cherry picked from commit d772b98283f289917a6a8370808d4d0912899384) commit bcd16d68ac1ccdd1158ff1e3c1d73fd6cfdfef6d Author: David Disseldorp <dd...@samba.org> Date: Thu Oct 30 01:37:50 2014 +0100 spoolss: fix jobid in level 3 EnumJobs response Until now, these responses have incorrectly carried the printing backend job identifier (sysjob), rather than the one allocated and returned by Samba on job submission. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905 Reported-by: Franz Pförtsch <franz.pfoert...@brose.com> Signed-off-by: David Disseldorp <dd...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> (cherry picked from commit 5e7ab3d2f4f7950099561eb22d6a9a1536297442) commit 20f803ba0202f94dc357ac703174fd1bcc4b5a4f Author: David Disseldorp <dd...@samba.org> Date: Thu Oct 30 01:37:49 2014 +0100 spoolss: fix jobid in level 2 GetJob and EnumJobs responses Until now, these responses have incorrectly carried the printing backend job identifier (sysjob), rather than the one allocated and returned by Samba on job submission. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905 Reported-by: Franz Pförtsch <franz.pfoert...@brose.com> Signed-off-by: David Disseldorp <dd...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> (cherry picked from commit 45abaf81c67b62bab571df208931241afa660802) commit e1fb94b764934478eeb6674fa869c81bf72042da Author: David Disseldorp <dd...@samba.org> Date: Thu Oct 30 01:37:48 2014 +0100 spoolss: fix jobid in level 1 GetJob and EnumJobs responses Until now, these responses have incorrectly carried the printing backend job identifier (sysjob), rather than the one allocated and returned by Samba on job submission. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905 Reported-by: Franz Pförtsch <franz.pfoert...@brose.com> Signed-off-by: David Disseldorp <dd...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> (cherry picked from commit 4d7f5d2af6ef6960dccaccf89c6e88947e2591bf) commit 7bf4cb07163d62ebc2e4155b74e108a812e362ff Author: David Disseldorp <dd...@samba.org> Date: Thu Oct 30 01:37:47 2014 +0100 spoolss: fix GetJob jobid lookups Clients issue GetJob requests using the jobid assigned by the spoolss server. The corresponding printing backend (sysjob) identifier needs to be resolved to locate the correct print queue entry. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10905 Reported-by: Franz Pförtsch <franz.pfoert...@brose.com> Signed-off-by: David Disseldorp <dd...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> (cherry picked from commit 3a28ae56977235d3c9e3abcd1f24b220e536c50d) commit 9f438fdbe309c6abeb86b7d1f2011716b7d8a0b4 Author: David Disseldorp <dd...@samba.org> Date: Thu Oct 30 01:37:46 2014 +0100 printing: add jobid_to_sysjob helper function Samba needs to deal with two types of print job identifiers, those allocated by the printing backend (sysjob ids), and those allocated by Samba's spoolss server (jobids). This change adds a helper function to map spoolss jobids to sysjob ids, to go alongside the corresponding sysjob to jobid mapping function. Signed-off-by: David Disseldorp <dd...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> (cherry picked from commit 77b5be1742ee7aa2733a25bfa6a3af369f5c9401) ----------------------------------------------------------------------- Summary of changes: buildtools/wafadmin/Tools/perl.py | 51 +------ buildtools/wafsamba/samba_patterns.py | 4 +- buildtools/wafsamba/samba_perl.py | 62 ++++++++ buildtools/wafsamba/wafsamba.py | 77 +++++++--- docs-xml/wscript_build | 30 ++-- dynconfig/wscript | 55 ++++++-- lib/ldb/wscript | 3 +- pidl/pidl | 1 - pidl/wscript | 7 +- script/autobuild.py | 9 +- source3/include/printing.h | 1 + source3/libads/kerberos_keytab.c | 3 +- source3/passdb/pdb_tdb.c | 2 +- source3/printing/printing.c | 70 ++++++--- source3/rpc_server/spoolss/srv_spoolss_nt.c | 212 ++++++++++++++++++---------- source3/wscript | 1 - wscript | 2 +- wscript_build | 13 +- 18 files changed, 401 insertions(+), 202 deletions(-) create mode 100644 buildtools/wafsamba/samba_perl.py Changeset truncated at 500 lines: diff --git a/buildtools/wafadmin/Tools/perl.py b/buildtools/wafadmin/Tools/perl.py index 0f34e79..a6787a8 100644 --- a/buildtools/wafadmin/Tools/perl.py +++ b/buildtools/wafadmin/Tools/perl.py @@ -98,53 +98,12 @@ def check_perl_ext_devel(conf): conf.env.EXTUTILS_TYPEMAP = read_out('print "$Config{privlib}/ExtUtils/typemap"') conf.env.perlext_PATTERN = '%s.' + read_out('print $Config{dlext}')[0] - def try_any(keys): - for k in keys: - conf.start_msg("Checking for perl $Config{%s}:" % k) - try: - v = read_out('print $Config{%s}' % k)[0] - conf.end_msg("'%s'" % (v), 'GREEN') - return v - except IndexError: - conf.end_msg(False, 'YELLOW') - pass - return None - - perl_arch_install_dir = None - if getattr(Options.options, 'perl_arch_install_dir', None): - perl_arch_install_dir = Options.options.perl_arch_install_dir - if perl_arch_install_dir is None: - perl_arch_install_dir = try_any(['vendorarch', 'sitearch', 'archlib']) - if perl_arch_install_dir is None: - conf.fatal('No perl arch install directory autodetected.' + - 'Please define it with --with-perl-arch-install-dir.') - conf.start_msg("PERL_ARCH_INSTALL_DIR: ") - conf.end_msg("'%s'" % (perl_arch_install_dir), 'GREEN') - conf.env.PERL_ARCH_INSTALL_DIR = perl_arch_install_dir - - perl_lib_install_dir = None - if getattr(Options.options, 'perl_lib_install_dir', None): - perl_lib_install_dir = Options.options.perl_lib_install_dir - if perl_lib_install_dir is None: - perl_lib_install_dir = try_any(['vendorlib', 'sitelib', 'privlib']) - if perl_lib_install_dir is None: - conf.fatal('No perl lib install directory autodetected. ' + - 'Please define it with --with-perl-lib-install-dir.') - conf.start_msg("PERL_LIB_INSTALL_DIR: ") - conf.end_msg("'%s'" % (perl_lib_install_dir), 'GREEN') - conf.env.PERL_LIB_INSTALL_DIR = perl_lib_install_dir + if getattr(Options.options, 'perlarchdir', None): + conf.env.ARCHDIR_PERL = Options.options.perlarchdir + else: + conf.env.ARCHDIR_PERL = read_out('print $Config{sitearch}')[0] def set_options(opt): opt.add_option("--with-perl-binary", type="string", dest="perlbinary", help = 'Specify alternate perl binary', default=None) + opt.add_option("--with-perl-archdir", type="string", dest="perlarchdir", help = 'Specify directory where to install arch specific files', default=None) - opt.add_option("--with-perl-arch-install-dir", - type="string", - dest="perl_arch_install_dir", - help = ('Specify directory where to install arch specific files'), - default=None) - - opt.add_option("--with-perl-lib-install-dir", - type="string", - dest="perl_lib_install_dir", - help = ('Specify directory where to install vendor specific files'), - default=None) diff --git a/buildtools/wafsamba/samba_patterns.py b/buildtools/wafsamba/samba_patterns.py index 55ed540..62d988e 100644 --- a/buildtools/wafsamba/samba_patterns.py +++ b/buildtools/wafsamba/samba_patterns.py @@ -202,6 +202,6 @@ def SAMBA_BLDOPTIONS(bld, target): '''generate the bld_options.c for Samba''' t = bld.SAMBA_GENERATOR(target, rule=write_build_options, - target=target, - always=True) + dep_vars=['defines'], + target=target) Build.BuildContext.SAMBA_BLDOPTIONS = SAMBA_BLDOPTIONS diff --git a/buildtools/wafsamba/samba_perl.py b/buildtools/wafsamba/samba_perl.py new file mode 100644 index 0000000..3909aba --- /dev/null +++ b/buildtools/wafsamba/samba_perl.py @@ -0,0 +1,62 @@ +import Build +from samba_utils import * +from Configure import conf + +done = {} + +@conf +def SAMBA_CHECK_PERL(conf, mandatory=True, version=(5,0,0)): + # + # TODO: use the @runonce mechanism for this. + # The problem is that @runonce currently does + # not seem to work together with @conf... + # So @runonce (and/or) @conf needs fixing. + # + if "done" in done: + return + done["done"] = True + conf.find_program('perl', var='PERL', mandatory=mandatory) + conf.check_tool('perl') + path_perl = conf.find_program('perl') + conf.env.PERL_SPECIFIED = (conf.env.PERL != path_perl) + conf.check_perl_version(version) + + def read_perl_config_var(cmd): + return Utils.to_list(Utils.cmd_output([conf.env.PERL, '-MConfig', '-e', cmd])) + + def check_perl_config_var(var): + conf.start_msg("Checking for perl $Config{%s}:" % var) + try: + v = read_perl_config_var('print $Config{%s}' % var)[0] + conf.end_msg("'%s'" % (v), 'GREEN') + return v + except IndexError: + conf.end_msg(False, 'YELLOW') + pass + return None + + vendor_prefix = check_perl_config_var('vendorprefix') + + perl_arch_install_dir = None + if vendor_prefix == conf.env.PREFIX: + perl_arch_install_dir = check_perl_config_var('vendorarch'); + if perl_arch_install_dir is None: + perl_arch_install_dir = "${LIBDIR}/perl5"; + conf.start_msg("PERL_ARCH_INSTALL_DIR: ") + conf.end_msg("'%s'" % (perl_arch_install_dir), 'GREEN') + conf.env.PERL_ARCH_INSTALL_DIR = perl_arch_install_dir + + perl_lib_install_dir = None + if vendor_prefix == conf.env.PREFIX: + perl_lib_install_dir = check_perl_config_var('vendorlib'); + if perl_lib_install_dir is None: + perl_lib_install_dir = "${DATADIR}/perl5"; + conf.start_msg("PERL_LIB_INSTALL_DIR: ") + conf.end_msg("'%s'" % (perl_lib_install_dir), 'GREEN') + conf.env.PERL_LIB_INSTALL_DIR = perl_lib_install_dir + + perl_inc = read_perl_config_var('print "@INC"') + perl_inc.remove('.') + conf.start_msg("PERL_INC: ") + conf.end_msg("%s" % (perl_inc), 'GREEN') + conf.env.PERL_INC = perl_inc diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index aaa0939..c8220c2 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -16,6 +16,7 @@ from samba_patterns import * from samba_pidl import * from samba_autoproto import * from samba_python import * +from samba_perl import * from samba_deps import * from samba_bundled import * import samba_install @@ -578,6 +579,7 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='', public_headers_install=True, header_path=None, vars=None, + dep_vars=[], always=False): '''A generic source generator target''' @@ -587,11 +589,8 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='', if not enabled: return - dep_vars = [] - if isinstance(vars, dict): - dep_vars = vars.keys() - elif isinstance(vars, list): - dep_vars = vars + dep_vars.append('ruledeps') + dep_vars.append('SAMBA_GENERATOR_VARS') bld.SET_BUILD_GROUP(group) t = bld( @@ -603,9 +602,13 @@ def SAMBA_GENERATOR(bld, name, rule, source='', target='', before='cc', ext_out='.c', samba_type='GENERATOR', - dep_vars = [rule] + dep_vars, + dep_vars = dep_vars, name=name) + if vars is None: + vars = {} + t.env.SAMBA_GENERATOR_VARS = vars + if always: t.always = True @@ -701,8 +704,6 @@ def copy_and_fix_python_path(task): replacement="""sys.path.insert(0, "%s") sys.path.insert(1, "%s")""" % (task.env["PYTHONARCHDIR"], task.env["PYTHONDIR"]) - shebang = None - if task.env["PYTHON"][0] == "/": replacement_shebang = "#!%s\n" % task.env["PYTHON"] else: @@ -724,9 +725,38 @@ sys.path.insert(1, "%s")""" % (task.env["PYTHONARCHDIR"], task.env["PYTHONDIR"]) os.chmod(installed_location, 0755) return 0 +def copy_and_fix_perl_path(task): + pattern='use lib "$RealBin/lib";' + + replacement = "" + if not task.env["PERL_LIB_INSTALL_DIR"] in task.env["PERL_INC"]: + replacement = 'use lib "%s";' % task.env["PERL_LIB_INSTALL_DIR"] + + if task.env["PERL"][0] == "/": + replacement_shebang = "#!%s\n" % task.env["PERL"] + else: + replacement_shebang = "#!/usr/bin/env %s\n" % task.env["PERL"] + + installed_location=task.outputs[0].bldpath(task.env) + source_file = open(task.inputs[0].srcpath(task.env)) + installed_file = open(installed_location, 'w') + lineno = 0 + for line in source_file: + newline = line + if lineno == 0 and task.env["PERL_SPECIFIED"] == True and line[:2] == "#!": + newline = replacement_shebang + elif pattern in line: + newline = line.replace(pattern, replacement) + installed_file.write(newline) + lineno = lineno + 1 + installed_file.close() + os.chmod(installed_location, 0755) + return 0 + def install_file(bld, destdir, file, chmod=MODE_644, flat=False, - python_fixup=False, destname=None, base_name=None): + python_fixup=False, perl_fixup=False, + destname=None, base_name=None): '''install a file''' destdir = bld.EXPAND_VARIABLES(destdir) if not destname: @@ -735,16 +765,22 @@ def install_file(bld, destdir, file, chmod=MODE_644, flat=False, destname = os.path.basename(destname) dest = os.path.join(destdir, destname) if python_fixup: - # fixup the python path it will use to find Samba modules + # fix the path python will use to find Samba modules inst_file = file + '.inst' bld.SAMBA_GENERATOR('python_%s' % destname, rule=copy_and_fix_python_path, + dep_vars=["PYTHON","PYTHON_SPECIFIED","PYTHONDIR","PYTHONARCHDIR"], + source=file, + target=inst_file) + file = inst_file + if perl_fixup: + # fix the path perl will use to find Samba modules + inst_file = file + '.inst' + bld.SAMBA_GENERATOR('perl_%s' % destname, + rule=copy_and_fix_perl_path, + dep_vars=["PERL","PERL_SPECIFIED","PERL_LIB_INSTALL_DIR"], source=file, target=inst_file) - bld.add_manual_dependency(bld.path.find_or_declare(inst_file), bld.env["PYTHONARCHDIR"]) - bld.add_manual_dependency(bld.path.find_or_declare(inst_file), bld.env["PYTHONDIR"]) - bld.add_manual_dependency(bld.path.find_or_declare(inst_file), str(bld.env["PYTHON_SPECIFIED"])) - bld.add_manual_dependency(bld.path.find_or_declare(inst_file), bld.env["PYTHON"]) file = inst_file if base_name: file = os.path.join(base_name, file) @@ -752,12 +788,13 @@ def install_file(bld, destdir, file, chmod=MODE_644, flat=False, def INSTALL_FILES(bld, destdir, files, chmod=MODE_644, flat=False, - python_fixup=False, destname=None, base_name=None): + python_fixup=False, perl_fixup=False, + destname=None, base_name=None): '''install a set of files''' for f in TO_LIST(files): install_file(bld, destdir, f, chmod=chmod, flat=flat, - python_fixup=python_fixup, destname=destname, - base_name=base_name) + python_fixup=python_fixup, perl_fixup=perl_fixup, + destname=destname, base_name=base_name) Build.BuildContext.INSTALL_FILES = INSTALL_FILES @@ -804,7 +841,7 @@ def MANPAGES(bld, manpages, install): bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True) Build.BuildContext.MANPAGES = MANPAGES -def SAMBAMANPAGES(bld, manpages): +def SAMBAMANPAGES(bld, manpages, extra_source=None): '''build and install manual pages''' bld.env.SAMBA_EXPAND_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/expand-sambadoc.xsl' bld.env.SAMBA_MAN_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/man.xsl' @@ -812,13 +849,15 @@ def SAMBAMANPAGES(bld, manpages): for m in manpages.split(): source = m + '.xml' + if extra_source is not None: + source = [source, extra_source] bld.SAMBA_GENERATOR(m, source=source, target=m, group='final', rule='''XML_CATALOG_FILES="${SAMBA_CATALOGS}" export XML_CATALOG_FILES - ${XSLTPROC} --xinclude --stringparam noreference 0 -o ${TGT}.xml --nonet ${SAMBA_EXPAND_XSL} ${SRC} + ${XSLTPROC} --xinclude --stringparam noreference 0 -o ${TGT}.xml --nonet ${SAMBA_EXPAND_XSL} ${SRC[0].abspath(env)} ${XSLTPROC} --nonet -o ${TGT} ${SAMBA_MAN_XSL} ${TGT}.xml''' ) bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True) diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build index 9c6042f..7af0f68 100644 --- a/docs-xml/wscript_build +++ b/docs-xml/wscript_build @@ -97,22 +97,34 @@ def smbdotconf_generate_parameter_list(task): parameter_all = task.outputs[0].bldpath(task.env) articles = task.inputs - t = '<section xmlns:xi="http://www.w3.org/2003/XInclude">\n' + entities = bld.pathconfig_entities() + t = "<!DOCTYPE section [\n" + + for entity in entities: + t += "%s\n" % entity + + t += "]>\n" + t += "<section>\n" for article in articles: - t += "<xi:include href='file://" + article.abspath(task.env) + "' parse='xml'/>\n" + f = open(article.abspath(task.env), 'r') + t += f.read() + f.close() + t += "</section>\n" save_file(parameter_all, t , create_dir=True) return 0 +articles = bld.path.ant_glob("smbdotconf/**/*.xml") +parameter_all = 'smbdotconf/parameters.all.xml' +bld.SAMBA_GENERATOR(parameter_all, + source=articles, + target=parameter_all, + rule=smbdotconf_generate_parameter_list, + dep_vars=bld.dynconfig_varnames()) + def SMBDOTCONF_MANPAGE(bld, target): ''' assemble and build smb.conf.5 manual page''' - articles = bld.path.ant_glob("smbdotconf/**/*.xml") - parameter_all = 'smbdotconf/parameters.all.xml' - bld.SAMBA_GENERATOR(parameter_all, - source=articles, - target=parameter_all, - rule=smbdotconf_generate_parameter_list) - bld.SAMBAMANPAGES(target) + bld.SAMBAMANPAGES(target, parameter_all) if ('XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']): diff --git a/dynconfig/wscript b/dynconfig/wscript index aa4e66e..6410c38 100755 --- a/dynconfig/wscript +++ b/dynconfig/wscript @@ -111,6 +111,16 @@ dynconfig = { 'FHS-PATH': '${PYTHONARCHDIR}', 'OVERWRITE': True, }, + 'PERL_LIB_INSTALL_DIR' : { + 'STD-PATH': '${PERL_LIB_INSTALL_DIR}', + 'FHS-PATH': '${PERL_LIB_INSTALL_DIR}', + 'OVERWRITE': True, + }, + 'PERL_ARCH_INSTALL_DIR' : { + 'STD-PATH': '${PERL_ARCH_INSTALL_DIR}', + 'FHS-PATH': '${PERL_ARCH_INSTALL_DIR}', + 'OVERWRITE': True, + }, 'INCLUDEDIR' : { 'STD-PATH': '${INCLUDEDIR}', 'FHS-PATH': '${INCLUDEDIR}/samba-4.0', @@ -345,29 +355,58 @@ def configure(conf): conf.start_msg("Dynconfig[%s]: " % (varname)) conf.end_msg("'%s'" % (value), 'GREEN') -def dynconfig_cflags(bld, list=None): - '''work out the extra CFLAGS for dynconfig.c''' - cflags = [] - # override some paths when running from the build directory +def get_override(bld): override = { 'MODULESDIR' : 'bin/modules', 'PYTHONDIR' : 'bin/python', 'PYTHONARCHDIR' : 'bin/python', 'BINDIR' : 'bin', 'SBINDIR' : 'bin', - 'CODEPAGEDIR' : os.path.join(bld.env.srcdir, 'codepages'), - 'SCRIPTSBINDIR' : os.path.join(bld.env.srcdir, 'source4/scripting/bin'), - 'SETUPDIR' : os.path.join(bld.env.srcdir, 'source4/setup') } + 'CODEPAGEDIR' : 'codepages', + 'SCRIPTSBINDIR' : 'source4/scripting/bin', + 'SETUPDIR' : 'source4/setup' + } + return override + +def dynconfig_cflags(bld, list=None): + '''work out the extra CFLAGS for dynconfig.c''' + cflags = [] for varname in dynconfig.keys(): if list and not varname in list: continue value = bld.env[varname] if not Options.is_install: + override = get_override(bld) if varname in override: - value = os.path.join(os.getcwd(), override[varname]) + value = os.path.join(bld.env.srcdir, override[varname]) cflags.append('-D%s="%s"' % (varname, value)) return cflags Build.BuildContext.dynconfig_cflags = dynconfig_cflags +def dynconfig_varnames(bld, list=None): + '''work out the dynconfig variables''' + varnames = [] + for varname in dynconfig.keys(): + if list and not varname in list: + continue + varnames.append(varname) + return varnames +Build.BuildContext.dynconfig_varnames = dynconfig_varnames + +def pathconfig_entities(bld, list=None): + '''work out the extra entities for the docs''' + entities = [] + for varname in dynconfig.keys(): + if list and not varname in list: + continue + value = bld.env[varname] + if not Options.is_install: + override = get_override(bld) + if varname in override: + value = os.path.join(bld.env.srcdir, override[varname]) + entities.append("<!ENTITY pathconfig.%s '%s'>" % (varname, value)) + return entities +Build.BuildContext.pathconfig_entities = pathconfig_entities + def build(bld): cflags = bld.dynconfig_cflags() version_header = 'version.h' diff --git a/lib/ldb/wscript b/lib/ldb/wscript index a375675..fb32ecd 100755 --- a/lib/ldb/wscript +++ b/lib/ldb/wscript @@ -148,12 +148,11 @@ def build(bld): # generate a include/ldb_version.h t = bld.SAMBA_GENERATOR('ldb_version.h', rule='echo "#define LDB_VERSION \\"${LDB_VERSION}\\"" > ${TGT}', + dep_vars=['LDB_VERSION'], target='include/ldb_version.h', public_headers='include/ldb_version.h', public_headers_install=not private_library) t.env.LDB_VERSION = VERSION - bld.add_manual_dependency(bld.path.find_or_declare('include/ldb_version.h'), VERSION) - bld.SAMBA_PYTHON('pyldb', 'pyldb.c', diff --git a/pidl/pidl b/pidl/pidl index c65092e..b7dcc2a 100755 --- a/pidl/pidl +++ b/pidl/pidl @@ -404,7 +404,6 @@ pidl README by Andrew Tridgell. use strict; use FindBin qw($RealBin $Script); use lib "$RealBin/lib"; -use lib "$RealBin/../share/perl5"; use Getopt::Long; use File::Basename; use Parse::Pidl qw ( $VERSION ); diff --git a/pidl/wscript b/pidl/wscript index 4965870..27cb230 100644 --- a/pidl/wscript +++ b/pidl/wscript @@ -26,12 +26,9 @@ def check_system_perl_module(conf, module, version=None): return True def set_options(opt): - opt.tool_options('perl') + return def configure(conf): - conf.check_tool('perl') - conf.check_perl_ext_devel() - # Check if perl(Parse::Yapp::Driver) is available. check_system_perl_module(conf, "Parse::Yapp::Driver", 1.05) @@ -46,7 +43,7 @@ def configure(conf): conf.find_program('pod2man', var='POD2MAN') -- Samba Shared Repository