Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2017 17:19:50 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 222355] "make check-plist" can overflow sed's line buffer
Message-ID:  <bug-222355-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222355

            Bug ID: 222355
           Summary: "make check-plist" can overflow sed's line buffer
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr@FreeBSD.org
          Reporter: asomers@FreeBSD.org
                CC: freebsd-ports-bugs@FreeBSD.org

"make check-plist" generates a long sed command.  For some ports, this comm=
and
is so long that it overflows sed's line buffer, sized to _POSIX2_LINE_MAX
(currently 2048 characters).  An example port that demonstrates this proble=
m is
www/rubygem-passenger.  Running "make check-plist" will print this error:

sed: 1: "s!^/usr/local/!!g;  s!l ...": unterminated regular expression

The full sed command is:

sed $'s!^/usr/local/!!g;=20
s!lib/ruby/gems/2\\.3/specifications/passenger-5\\.1\\.8\\.gemspec!%%GEM_SP=
EC%%!g;
 s!lib/ruby/gems/2\\.3/cache/passenger-5\\.1\\.8\\.gem!%%GEM_CACHE%%!g;=20
s!lib/ruby/vendor_ruby/2\\.3/amd64-freebsd11!%%RUBY_VENDORARCHLIBDIR%%!g;=20
s!lib/ruby/site_ruby/2\\.3/amd64-freebsd11!%%RUBY_SITEARCHLIBDIR%%!g;=20
s!lib/ruby/gems/2\\.3/gems/passenger-5\\.1\\.8!%%GEM_LIB_DIR%%!g;=20
s!lib/ruby/gems/2\\.3/doc/passenger-5\\.1\\.8!%%GEM_DOC_DIR%%!g;=20
s!lib/ruby/gems/2\\.3/specifications!%%SPEC_DIR%%!g;=20
s!share/examples/ruby23/passenger!%%RUBY_MODEXAMPLESDIR%%!g;=20
s!lib/ruby/gems/2\\.3/extensions!%%EXT_DIR%%!g;=20
s!lib/ruby/2\\.3/amd64-freebsd11!%%RUBY_ARCHLIBDIR%%!g;=20
s!share/doc/ruby23/passenger!%%RUBY_MODDOCDIR%%!g;=20
s!share/examples/passenger!%%EXAMPLESDIR%%!g;=20
s!lib/ruby/vendor_ruby/2\\.3!%%RUBY_VENDORLIBDIR%%!g;=20
s!lib/ruby/gems/2\\.3/cache!%%CACHE_DIR%%!g;=20
s!lib/ruby/site_ruby/2\\.3!%%RUBY_SITELIBDIR%%!g;=20
s!lib/ruby/gems/2\\.3/gems!%%GEMS_DIR%%!g;=20
s!share/examples/ruby23!%%RUBY_EXAMPLESDIR%%!g;=20
s!lib/ruby/gems/2\\.3/doc!%%DOC_DIR%%!g;=20
s!share/ri/2\\.3/system!%%RUBY_RIDIR%%!g;  s!share/doc/passenger!%%DOCSDIR%=
%!g;
 s!share/ri/2\\.3/site!%%RUBY_SITERIDIR%%!g;=20
s!lib/ruby/gems/2\\.3!%%GEMS_BASE_DIR%%!g;=20
s!share/doc/ruby23!%%RUBY_DOCDIR%%!g;  s!libexec/apache24!%%APACHEMODDIR%%!=
g;=20
s!include/apache24!%%APACHEINCLUDEDIR%%!g;  s!share/passenger!%%DATADIR%%!g=
;=20
s!passenger-5\\.1\\.8!%%PORT%%!g;  s!passenger-5\\.1\\.8!%%GEM_NAME%%!g;=20
s!amd64-freebsd11!%%RUBY_ARCH%%!g;  s!www/passenger!%%WWWDIR%%!g;=20
s!etc/passenger!%%ETCDIR%%!g;  s!passenger\\.so!%%AP_MODULE%%!g;=20
s!lib/ruby/2\\.3!%%RUBY_LIBDIR%%!g;  s!etc/apache24!%%APACHEETCDIR%%!g;=20
s!passenger!%%AP_NAME%%!g;  s!ruby23!%%RUBY_NAME%%!g;=20
s!5\\.1\\.8!%%PORTVERSION%%!g;  s!2\\.3\\.4!%%RUBY_VERSION%%!g;=20
s!2\\.3!%%RUBY_VER%%!g;  s!24!%%APACHE_VERSION%%!g;  s!23!%%RUBY_SUFFIX%%!g=
;=20
s!23!%%RUBY_SHLIBVER%%!g;  s!23!%%RUBY_DEFAULT_SUFFIX%%!g;=20
s!-A!%%AP_MOD_EN%%!g; s,^,@dir ,; \t    /%%DOCSDIR%%/s!^!%%PORTDOCS%%!g;
/%%EXAMPLESDIR%%/s!^!%%PORTEXAMPLES%%!g; /^%%PORTDOCS%%/d; \t    /^@dir
share\\/licenses/d;'

I think the best solution would be to split up that command into multiple
smaller commands, but I don't know that part of ports well enough to do it
myself.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222355-13>