The Samba-Bugzilla – Attachment 9754 Details for
Bug 10472
pidl: waf should have an option for the dir to install perl files and do not glob
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
v4-0-test patch
look2 (text/plain), 14.29 KB, created by
Andreas Schneider
on 2014-03-07 07:19:29 UTC
(
hide
)
Description:
v4-0-test patch
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2014-03-07 07:19:29 UTC
Size:
14.29 KB
patch
obsolete
>From c01da1a267671cc695dc046a6f3f31b3f2f81b73 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Fri, 28 Feb 2014 15:47:45 +0100 >Subject: [PATCH 1/9] buildtools: Rename perl vendorarch configure option. > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >--- > 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 84c9a1c2fb5027e41da9deb7be025c91b5a12f43 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >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 <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >--- > 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 063ac60f9e02966c59bb12b9b98245747cf8843e Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Wed, 5 Mar 2014 16:27:15 +0100 >Subject: [PATCH 3/9] autobuild: Set perl vendorlib direcotry. > >Signed-off-by: Andreas Schneider <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >--- > script/autobuild.py | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/script/autobuild.py b/script/autobuild.py >index 1182d7f..cb822ff 100755 >--- a/script/autobuild.py >+++ b/script/autobuild.py >@@ -59,7 +59,7 @@ tasks = { > ("clean", "make clean", "text/plain") ], > > # 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"), >@@ -77,7 +77,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"), >@@ -102,7 +102,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,!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,!ldb,!pyldb,!tevent,!pytevent --abi-check --enable-debug -C ${PREFIX} ${PERL_VENDOR_LIB}", "text/plain"), > ("make", "make", "text/plain"), > ("install", "make install", "text/plain")], > >@@ -232,6 +232,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 97818de6aa012c454d9f64fe571ee94f8b59020e Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >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 <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >--- > 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 b1ac3554f826ca92ea73b31d21d3ff82a7705d75 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >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 <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >--- > 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 0ed8c11dd7fdae9f3dcaa2e10100947292b8648e Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >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 <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >--- > 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 a76fe1112f12d0f4599b74b826911331e8e03ec7 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >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 <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >--- > 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 204e7dbfa7d39342650a0c50c740220a799235ab Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >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 <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> >--- > 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 3e1bf61452b1cbb14f5f7df6cd1960ee84f1e259 Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >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 <asn@samba.org> >Reviewed-by: Stefan Metzmacher <metze@samba.org> > >Autobuild-User(master): Stefan Metzmacher <metze@samba.org> >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 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
asn
:
review?
(
ddiss
)
Actions:
View
Attachments on
bug 10472
:
9730
|
9731
|
9753
| 9754 |
9933
|
9934
|
10423
|
10427
|
10428