Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 409259

Summary: sys-process/vixie-cron: sed -i Makefile expands $CFLAGS, $LDFLAGS into sed call, which can confuse sed
Product: Gentoo Linux Reporter: Kevin Pyle <gentoo.8eaf7cd8e5128d8191fe>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED OBSOLETE    
Severity: minor CC: cron-bugs+disabled, treecleaner
Priority: Normal Keywords: PATCH, PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Deadline: 2019-10-11   
Attachments: Patch to vixie-cron-4.1-r12.ebuild to move sed as described below

Description Kevin Pyle 2012-03-22 03:28:29 UTC
Created attachment 306255 [details, diff]
Patch to vixie-cron-4.1-r12.ebuild to move sed as described below

In sys-process/vixie-cron-4.1-r12, the latest ebuild available as of this writing, src_compile() uses sed -i to resolve some QA issues in the upstream Makefile.  However, the ebuild expands $CFLAGS and $LDFLAGS on the spot and includes them in the sed command line, rather than directing sed to place "$(CFLAGS)" and "$(LDFLAGS)" in the Makefile, where make will expand them when the rules are evaluated.  This is suboptimal, since certain unusual values of CFLAGS can confuse sed, but would work correctly if passed in the environment to be expanded by make.  In my case, an attempt to pass through a value with an embedded colon tripped up the sed substitution.

The attached patch moves the sed from src_compile to src_unpack (to be with the other source patching directives), deletes the assignments of CFLAGS and LDFLAGS (allowing make to inherit the proper values from the environment), renames INCLUDE to CPPFLAGS so that it will be automatically used, and adjusts the linking rules to include $CFLAGS and $CPPFLAGS.  I believe that, for typical environments, this patch is a no-op, so no revbump is needed.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-10-11 15:08:00 UTC
Package removed.