Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409259 - sys-process/vixie-cron: sed -i Makefile expands $CFLAGS, $LDFLAGS into sed call, which can confuse sed
Summary: sys-process/vixie-cron: sed -i Makefile expands $CFLAGS, $LDFLAGS into sed ca...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Deadline: 2019-10-11
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH, PMASKED
Depends on:
Blocks:
 
Reported: 2012-03-22 03:28 UTC by Kevin Pyle
Modified: 2019-10-11 15:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to vixie-cron-4.1-r12.ebuild to move sed as described below (vixie-cron-4.1-r12.ebuild.patch,750 bytes, patch)
2012-03-22 03:28 UTC, Kevin Pyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.