mirror of
https://github.com/clearlinux/autospec.git
synced 2026-08-20 22:17:57 +00:00
Add options.conf ability to not strip binaries
The hhvm binary in particular has extra elf sections added to it to store php code, and these are removed by the generic build macros that create the debug information. Other packages which need this are bazil, docker, go, linux-*. Signed-off-by: Icarus Sparry <icarus.w.sparry@intel.com>
This commit is contained in:
committed by
Matthew Johnson
parent
9ab54653ac
commit
ceca012d0c
@@ -87,6 +87,7 @@ config_options = {
|
||||
"pgo": "set profile for pgo",
|
||||
"use_clang": "add clang flags",
|
||||
"32bit" : "build 32 bit libraries",
|
||||
"nostrip" : "disable stripping binaries",
|
||||
"verify_required": "require package verification for build"}
|
||||
|
||||
def create_conf():
|
||||
|
||||
@@ -101,6 +101,7 @@ class Specfile(object):
|
||||
|
||||
self.write_main_subpackage_requires()
|
||||
self.write_buildreq()
|
||||
self.write_strip_command()
|
||||
self.write_patch_header()
|
||||
|
||||
# main package extra content
|
||||
@@ -200,6 +201,12 @@ class Specfile(object):
|
||||
for req in sorted(self.buildreqs):
|
||||
self._write("BuildRequires : {}\n".format(req))
|
||||
|
||||
def write_strip_command(self):
|
||||
""" Write commands to prevent stripping binary if requested """
|
||||
if config.config_opts['nostrip']:
|
||||
self._write("# Suppress stripping binaries\n")
|
||||
self._write("%define __strip /bin/true\n%define debug_package %{nil}\n")
|
||||
|
||||
def write_patch_header(self):
|
||||
"""
|
||||
Write patch list header
|
||||
|
||||
Reference in New Issue
Block a user