From 87acccc400acd0453e7370864b307df7e353dabe Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 12 Mar 2014 09:38:20 +0100 Subject: [PATCH] Add missing patch. --- samba-4.1.7-fix_pidl_install.patch | 373 +++++++++++++++++++++++++++++ 1 file changed, 373 insertions(+) create mode 100644 samba-4.1.7-fix_pidl_install.patch diff --git a/samba-4.1.7-fix_pidl_install.patch b/samba-4.1.7-fix_pidl_install.patch new file mode 100644 index 0000000..e906fc7 --- /dev/null +++ b/samba-4.1.7-fix_pidl_install.patch @@ -0,0 +1,373 @@ +From 6271d0d87c8b956007b5b5f78efa62d1a34c55f7 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 28 Feb 2014 15:47:45 +0100 +Subject: [PATCH 1/9] buildtools: Rename perl vendorarch configure option. + +Signed-off-by: Andreas Schneider +Reviewed-by: Stefan Metzmacher +--- + buildtools/wafadmin/Tools/perl.py | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/buildtools/wafadmin/Tools/perl.py b/buildtools/wafadmin/Tools/perl.py +index a6787a8..99e0540 100644 +--- a/buildtools/wafadmin/Tools/perl.py ++++ b/buildtools/wafadmin/Tools/perl.py +@@ -98,12 +98,17 @@ 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] + +- if getattr(Options.options, 'perlarchdir', None): +- conf.env.ARCHDIR_PERL = Options.options.perlarchdir ++ if getattr(Options.options, 'perl_vendorarch_dir', None): ++ conf.env.PERL_VENDORARCH_DIR = Options.options.perl_vendorarch_dir + else: +- conf.env.ARCHDIR_PERL = read_out('print $Config{sitearch}')[0] ++ conf.env.PERL_VENDORARCH_DIR = read_out('print $Config{vendorarch}')[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-vendorarch", ++ type="string", ++ dest="perl_vendorarch_dir", ++ help = ('Specify directory where to install arch specific files'), ++ default=None) + +-- +1.9.0 + + +From f415ba757c6454e5f5d10adbd074a31f3c650ce9 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 28 Feb 2014 15:50:02 +0100 +Subject: [PATCH 2/9] buildtools: Add perl vendorlib configure option. + +After this patch has been pushed, we need to change autobuild to compile +with this option or we will not be able to install pidl. + +Signed-off-by: Andreas Schneider +Reviewed-by: Stefan Metzmacher +--- + buildtools/wafadmin/Tools/perl.py | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/buildtools/wafadmin/Tools/perl.py b/buildtools/wafadmin/Tools/perl.py +index 99e0540..8f13e28 100644 +--- a/buildtools/wafadmin/Tools/perl.py ++++ b/buildtools/wafadmin/Tools/perl.py +@@ -103,6 +103,11 @@ def check_perl_ext_devel(conf): + else: + conf.env.PERL_VENDORARCH_DIR = read_out('print $Config{vendorarch}')[0] + ++ if getattr(Options.options, 'perl_vendorlib_dir', None): ++ conf.env.PERL_VENDORLIB_DIR = Options.options.perl_vendorlib_dir ++ else: ++ conf.env.PERL_VENDORLIB_DIR = read_out('print $Config{vendorlib}')[0] ++ + def set_options(opt): + opt.add_option("--with-perl-binary", type="string", dest="perlbinary", help = 'Specify alternate perl binary', default=None) + +@@ -112,3 +117,8 @@ def set_options(opt): + help = ('Specify directory where to install arch specific files'), + default=None) + ++ opt.add_option("--with-perl-vendorlib", ++ type="string", ++ dest="perl_vendorlib_dir", ++ help = ('Specify directory where to install vendor specific files'), ++ default=None) +-- +1.9.0 + + +From f191572655655fa920f132f51dfdb8b1df85e7d0 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Wed, 5 Mar 2014 16:27:15 +0100 +Subject: [PATCH 3/9] autobuild: Set perl vendorlib direcotry. + +Signed-off-by: Andreas Schneider +Reviewed-by: Stefan Metzmacher +--- + script/autobuild.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/script/autobuild.py b/script/autobuild.py +index fe39ed9..3136643 100755 +--- a/script/autobuild.py ++++ b/script/autobuild.py +@@ -35,7 +35,7 @@ defaulttasks = [ "samba", "samba-ctdb", "samba-libs", "ldb", "tdb", "ntdb", "tal + + tasks = { + # We have 'test' before 'install' because, 'test' should work without 'install' +- "samba" : [ ("configure", "./configure.developer ${PREFIX} --with-selftest-prefix=./bin/ab", "text/plain"), ++ "samba" : [ ("configure", "./configure.developer ${PREFIX} ${PERL_VENDOR_LIB} --with-selftest-prefix=./bin/ab", "text/plain"), + ("make", "make -j", "text/plain"), + ("test", "make test FAIL_IMMEDIATELY=1", "text/plain"), + ("install", "make install", "text/plain"), +@@ -53,7 +53,7 @@ tasks = { + ("ctdb-header-install", "cp ./ctdb/include/* ${PREFIX_DIR}/include", "text/plain"), + ("ctdb-header-ls", "ls ${PREFIX_DIR}/include/ctdb.h", "text/plain"), + +- ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure.developer ${PREFIX} --with-selftest-prefix=./bin/ab --with-cluster-support --with-ctdb-dir=${PREFIX_DIR} --bundled-libraries=!tdb", "text/plain"), ++ ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure.developer ${PREFIX} ${PERL_VENDOR_LIB} --with-selftest-prefix=./bin/ab --with-cluster-support --with-ctdb-dir=${PREFIX_DIR} --bundled-libraries=!tdb", "text/plain"), + ("make", "make", "text/plain"), + ("check", "./bin/smbd -b | grep CLUSTER_SUPPORT", "text/plain"), + ("install", "make install", "text/plain"), +@@ -82,7 +82,7 @@ tasks = { + ("ldb-make", "cd lib/ldb && make", "text/plain"), + ("ldb-install", "cd lib/ldb && make install", "text/plain"), + +- ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=!talloc,!tdb,!pytdb,!ntdb,!pyntdb,!ldb,!pyldb,!tevent,!pytevent --abi-check --enable-debug -C ${PREFIX}", "text/plain"), ++ ("configure", "PYTHONPATH=${PYTHON_PREFIX}/site-packages:$PYTHONPATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${PREFIX_DIR}/lib/pkgconfig ./configure --bundled-libraries=!talloc,!tdb,!pytdb,!ntdb,!pyntdb,!ldb,!pyldb,!tevent,!pytevent --abi-check --enable-debug -C ${PREFIX} ${PERL_VENDOR_LIB}", "text/plain"), + ("make", "make", "text/plain"), + ("install", "make install", "text/plain")], + +@@ -212,6 +212,7 @@ class builder(object): + self.cmd = self.cmd.replace("${PYTHON_PREFIX}", get_python_lib(standard_lib=1, prefix=self.prefix)) + self.cmd = self.cmd.replace("${PREFIX}", "--prefix=%s" % self.prefix) + self.cmd = self.cmd.replace("${PREFIX_DIR}", "%s" % self.prefix) ++ self.cmd = self.cmd.replace("${PERL_VENDOR_LIB}", "--with-perl-vendorlib=%s/share/perl5" % self.prefix) + # if self.output_mime_type == "text/x-subunit": + # self.cmd += " | %s --immediate" % (os.path.join(os.path.dirname(__file__), "selftest/format-subunit")) + print '%s: [%s] Running %s' % (self.name, self.stage, self.cmd) +-- +1.9.0 + + +From 7df60a7a5709ba7daf9cc6baf45e1b6074ddd384 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 28 Feb 2014 15:54:09 +0100 +Subject: [PATCH 4/9] pidl-waf: Remove unused variable pidl_src. + +Signed-off-by: Andreas Schneider +Reviewed-by: Stefan Metzmacher +--- + pidl/wscript | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/pidl/wscript b/pidl/wscript +index 7a25734..05d9982 100644 +--- a/pidl/wscript ++++ b/pidl/wscript +@@ -26,9 +26,6 @@ def build(bld): + if not bld.CONFIG_SET('HAVE_PERL_MAKEMAKER'): + return + +- pidl_src = ['pidl'] +- pidl_src.extend(bld.path.ant_glob('lib/**/*.pm').split()) +- + pidl_manpages = { + 'pidl': 'man1/pidl.${PERLMAN1EXT}', + 'lib/Parse/Pidl/NDR.pm': 'man3/Parse::Pidl::NDR.${PERLMAN3EXT}', +-- +1.9.0 + + +From 16f10c8a3f7ca8c3aeebd945c2ca2153f608d4ce Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 28 Feb 2014 15:53:10 +0100 +Subject: [PATCH 5/9] pidl-waf: Install pidl modules to the perl vendorlib + directory. + +Signed-off-by: Andreas Schneider +Reviewed-by: Stefan Metzmacher +--- + pidl/lib/wscript_build | 2 +- + pidl/wscript | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build +index eb5f1e0..67223a8 100644 +--- a/pidl/lib/wscript_build ++++ b/pidl/lib/wscript_build +@@ -1,4 +1,4 @@ + #!/usr/bin/env python + + # install the pidl modules +-bld.INSTALL_WILDCARD('${DATAROOTDIR}/perl5', '**/*.pm', flat=False) ++bld.INSTALL_WILDCARD(bld.env.PERL_VENDORLIB_DIR, '**/*.pm', flat=False) +diff --git a/pidl/wscript b/pidl/wscript +index 05d9982..77abb01 100644 +--- a/pidl/wscript ++++ b/pidl/wscript +@@ -8,6 +8,8 @@ def set_options(opt): + + def configure(conf): + conf.check_tool('perl') ++ conf.check_perl_ext_devel() ++ + # we need a recent version of MakeMaker to get the right man page names + if conf.CHECK_PERL_MANPAGE(): + conf.env.PERLMAN1EXT = conf.CHECK_PERL_MANPAGE(section='1') +-- +1.9.0 + + +From 410cb8e9235d956da1be1a38fda51c16b239ee11 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 28 Feb 2014 15:55:46 +0100 +Subject: [PATCH 6/9] pidl-waf: Do not glob to install pidl modules. + +Signed-off-by: Andreas Schneider +Reviewed-by: Stefan Metzmacher +--- + pidl/lib/wscript_build | 31 ++++++++++++++++++++++++++++++- + 1 file changed, 30 insertions(+), 1 deletion(-) + +diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build +index 67223a8..2d6e634 100644 +--- a/pidl/lib/wscript_build ++++ b/pidl/lib/wscript_build +@@ -1,4 +1,33 @@ + #!/usr/bin/env python + + # install the pidl modules +-bld.INSTALL_WILDCARD(bld.env.PERL_VENDORLIB_DIR, '**/*.pm', flat=False) ++bld.INSTALL_FILES(bld.env.PERL_VENDORLIB_DIR, ++ ''' ++ Parse/Pidl.pm ++ Parse/Pidl/Samba4.pm ++ Parse/Pidl/CUtil.pm ++ Parse/Pidl/Expr.pm ++ Parse/Pidl/Wireshark/Conformance.pm ++ Parse/Pidl/Wireshark/NDR.pm ++ Parse/Pidl/ODL.pm ++ Parse/Pidl/Dump.pm ++ Parse/Pidl/Util.pm ++ Parse/Pidl/Samba4/Header.pm ++ Parse/Pidl/Samba4/COM/Header.pm ++ Parse/Pidl/Samba4/COM/Proxy.pm ++ Parse/Pidl/Samba4/COM/Stub.pm ++ Parse/Pidl/Samba4/TDR.pm ++ Parse/Pidl/Samba4/NDR/Server.pm ++ Parse/Pidl/Samba4/NDR/Client.pm ++ Parse/Pidl/Samba4/NDR/Parser.pm ++ Parse/Pidl/Samba4/Python.pm ++ Parse/Pidl/Samba4/Template.pm ++ Parse/Pidl/IDL.pm ++ Parse/Pidl/Typelist.pm ++ Parse/Pidl/Samba3/ClientNDR.pm ++ Parse/Pidl/Samba3/ServerNDR.pm ++ Parse/Pidl/Compat.pm ++ Parse/Pidl/NDR.pm ++ Parse/Yapp/Driver.pm ++ ''', ++ flat=False) +-- +1.9.0 + + +From 51162d6acb0cc189e22f824bef80849687da13a5 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 28 Feb 2014 15:59:41 +0100 +Subject: [PATCH 7/9] pidl-waf: Add a function to check for a system perl + module. + +Signed-off-by: Andreas Schneider +Reviewed-by: Stefan Metzmacher +--- + pidl/wscript | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/pidl/wscript b/pidl/wscript +index 77abb01..2364391 100644 +--- a/pidl/wscript ++++ b/pidl/wscript +@@ -3,6 +3,28 @@ + import os, sys, Logs + from samba_utils import MODE_755 + ++# This function checks if a perl module is installed on the system. ++def check_system_perl_module(conf, module, version=None): ++ bundle_name = module.replace('::', '_') ++ module_check = module ++ found = False ++ ++ # Create module string with version ++ if version: ++ module_check = module + ' ' + str(version) ++ ++ # Check if we have to bundle it. ++ if conf.LIB_MUST_BE_BUNDLED(bundle_name.lower()): ++ return False ++ ++ # Check for system perl module ++ if not conf.check_perl_module(module_check): ++ return False ++ ++ conf.define('USING_SYSTEM_%s' % bundle_name.upper(), 1) ++ ++ return True ++ + def set_options(opt): + opt.tool_options('perl') + +-- +1.9.0 + + +From 093e4f863477b7a7458b8bc24e876d63d3b1c09d Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 28 Feb 2014 15:59:45 +0100 +Subject: [PATCH 8/9] pidl-waf: Check for system perl(Parse::Yapp::Driver). + +Signed-off-by: Andreas Schneider +Reviewed-by: Stefan Metzmacher +--- + pidl/wscript | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/pidl/wscript b/pidl/wscript +index 2364391..4965870 100644 +--- a/pidl/wscript ++++ b/pidl/wscript +@@ -32,6 +32,9 @@ 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) ++ + # we need a recent version of MakeMaker to get the right man page names + if conf.CHECK_PERL_MANPAGE(): + conf.env.PERLMAN1EXT = conf.CHECK_PERL_MANPAGE(section='1') +-- +1.9.0 + + +From 446cd106908d497b5130b66aff9b1afa38c357b1 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 28 Feb 2014 16:00:54 +0100 +Subject: [PATCH 9/9] pidl-waf: Only install Yapp::Driver if it is not + available. + +Signed-off-by: Andreas Schneider +Reviewed-by: Stefan Metzmacher + +Autobuild-User(master): Stefan Metzmacher +Autobuild-Date(master): Thu Mar 6 23:30:47 CET 2014 on sn-devel-104 +--- + pidl/lib/wscript_build | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/pidl/lib/wscript_build b/pidl/lib/wscript_build +index 2d6e634..5023e07 100644 +--- a/pidl/lib/wscript_build ++++ b/pidl/lib/wscript_build +@@ -28,6 +28,10 @@ bld.INSTALL_FILES(bld.env.PERL_VENDORLIB_DIR, + Parse/Pidl/Samba3/ServerNDR.pm + Parse/Pidl/Compat.pm + Parse/Pidl/NDR.pm +- Parse/Yapp/Driver.pm + ''', + flat=False) ++ ++if not bld.CONFIG_SET('USING_SYSTEM_PARSE_YAPP_DRIVER'): ++ bld.INSTALL_FILES(bld.env.PERL_VENDORLIB_DIR, ++ 'Parse/Yapp/Driver.pm', ++ flat=False) +-- +1.9.0 +