Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903912 - net-misc/asterisk overwrites FORTIFY_SOURCE
Summary: net-misc/asterisk overwrites FORTIFY_SOURCE
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jaco Kroon
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-04-06 13:40 UTC by Agostino Sarubbo
Modified: 2023-05-11 01:29 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-04-06 13:40:21 UTC
CFLAGS="-D_FORTIFY_SOURCE=3" emerge =asterisk-18.13.0

produces something like:

gcc -o chan_unistim.o -c chan_unistim.c -MD -MT chan_unistim.o -MF .chan_unistim.o.d -MP -pthread -I/var/tmp/portage/net-misc/asterisk-18.13.0/work/asterisk-18.13.0/include -D_FORTIFY_SOURCE=3  -I/usr/include/libxml2 -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations     -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC -DAST_MODULE=\"chan_unistim\" -DAST_MODULE_SELF_SYM=__internal_chan_unistim_self   -Wno-format-truncation 


-D_FORTIFY_SOURCE=2 is the latest used and overwrites my setting.
Comment 1 Agostino Sarubbo gentoo-dev 2023-04-06 14:06:50 UTC
sed "s:-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2::" -i configure.ac || die

fixes the issue for me unless you want to dig more into why they are there.
Comment 2 Jaco Kroon 2023-05-10 20:48:36 UTC
This is fixed locally by adding AST_FORTIFY_SOURCE= to _make_opts.

This is the simpler approach and the way I already sort much of the braindeadness.  Just looking to also figure out https://bugs.gentoo.org/903913
Comment 3 Larry the Git Cow gentoo-dev 2023-05-11 01:29:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0141572cd12dcf374a9c2a3d982f0afb895a43fa

commit 0141572cd12dcf374a9c2a3d982f0afb895a43fa
Author:     Jaco Kroon <jaco@uls.co.za>
AuthorDate: 2023-05-10 21:36:13 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-11 01:28:39 +0000

    net-misc/asterisk: add 20.2.1
    
    Closes: https://bugs.gentoo.org/903912
    Closes: https://bugs.gentoo.org/903913
    Closes: https://bugs.gentoo.org/903775
    Signed-off-by: Jaco Kroon <jaco@uls.co.za>
    Signed-off-by: Sam James <sam@gentoo.org>

 net-misc/asterisk/Manifest               |   1 +
 net-misc/asterisk/asterisk-20.2.1.ebuild | 373 +++++++++++++++++++++++++++++++
 2 files changed, 374 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cc5bb67b6b0a2b5b8351a233508ad83aafc62a2

commit 2cc5bb67b6b0a2b5b8351a233508ad83aafc62a2
Author:     Jaco Kroon <jaco@uls.co.za>
AuthorDate: 2023-05-10 21:32:07 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-11 01:28:39 +0000

    net-misc/asterisk: add 18.17.1
    
    Bug: https://bugs.gentoo.org/903912
    Bug: https://bugs.gentoo.org/903913
    Bug: https://bugs.gentoo.org/903775
    Signed-off-by: Jaco Kroon <jaco@uls.co.za>
    Signed-off-by: Sam James <sam@gentoo.org>

 net-misc/asterisk/Manifest                         |   1 +
 net-misc/asterisk/asterisk-18.17.1.ebuild          | 377 +++++++++++++++++++++
 ...ix-test-code-to-match-gethostbyname_r-pro.patch |  71 ++++
 .../asterisk/files/asterisk_wrapper-18.17.1-20.2.1 | 227 +++++++++++++
 net-misc/asterisk/files/initd-18.17.1-20.2.1       | 311 +++++++++++++++++
 5 files changed, 987 insertions(+)