RESOLVED FIXED 162256
Use 'use lib $FindBin::Bin' to append Perl module include path
https://bugs.webkit.org/show_bug.cgi?id=162256
Summary Use 'use lib $FindBin::Bin' to append Perl module include path
Fujii Hironori
Reported 2016-09-19 23:10:34 PDT
We need to use '-I' switch to explicitly append Perl module include path to invoke some Perl scripts such like following: > COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${NAMES_GENERATOR} --input ${_infile} --outputDir ${DERIVED_SOURCES_WEBCORE_DIR} This can be solved by using 'use lib'. > use lib $FindBin::Bin Documentation: http://perldoc.perl.org/lib.html Some scripts already do this. For example, build-webkit do that. https://trac.webkit.org/browser/trunk/Tools/Scripts/build-webkit?rev=204444#L41 I'd like to change following script files: Source/WebCore/bindings/scripts/generate-bindings.pl Source/WebCore/bindings/scripts/preprocess-idls.pl Source/WebCore/css/makegrammar.pl Source/WebCore/css/makeprop.pl Source/WebCore/css/makevalues.pl Source/WebCore/dom/make_dom_exceptions.pl Source/WebCore/dom/make_event_factory.pl Source/WebCore/dom/make_names.pl Source/WebCore/page/make_settings.pl
Attachments
Patch (16.63 KB, patch)
2016-09-20 00:33 PDT, Fujii Hironori
no flags
Patch (27.38 KB, patch)
2016-09-22 21:16 PDT, Fujii Hironori
no flags
Carlos Garcia Campos
Comment 1 2016-09-19 23:20:15 PDT
We need this because in some systems, like Debian, perl is configured to no longer include '.' in @INC by default for security reasons, see https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-1238
Fujii Hironori
Comment 2 2016-09-20 00:04:37 PDT
(In reply to comment #1) > We need this because in some systems, like Debian, perl is configured to no > longer include '.' in @INC by default for security reasons, see > https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-1238 I'm just to change how to append include paths in this bug. There aren't differences in security perspective. One should not execute WebKit's build scripts in an untrusted directory.
Fujii Hironori
Comment 3 2016-09-20 00:33:06 PDT
Fujii Hironori
Comment 4 2016-09-22 21:16:02 PDT
Fujii Hironori
Comment 5 2016-09-28 19:48:42 PDT
This is a simple patch. Is there any problem in this patch to review, Reviewers?
WebKit Commit Bot
Comment 6 2016-10-07 00:59:00 PDT
Comment on attachment 289659 [details] Patch Clearing flags on attachment: 289659 Committed r206904: <http://trac.webkit.org/changeset/206904>
WebKit Commit Bot
Comment 7 2016-10-07 00:59:06 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.