diff --git a/dist/package.bzl b/dist/package.bzl index cd4c63af54..f1025af77a 100644 --- a/dist/package.bzl +++ b/dist/package.bzl @@ -121,6 +121,17 @@ def scion_pkg_rpm(name, package, executables = {}, systemds = [], configs = [], if post: kwargs.pop("postinst") + # defines are work-arounds for pkg_rpm issues: + # _smp_build_ncpus: used to be default. + # buildsubdir: starting with rpmbuild 4.20, builddir is forcefully replaced with: + # / (which is created if it doesn't exist). + # pkg_rpm assumes that one can place ready-to-package files directly into + # , we need / to evealuate as + # . Hence the "buildsubdir=..". It's a hack. Check if later + # versions of pkg_rpm fix that. + # debug_package: Starting with rpmbuild 4.20, debug-info packages are built by default. We + # currently don't want that and our binaries do not have the required symbols. + pkg_rpm( name = name, summary = kwargs["description"], @@ -132,9 +143,10 @@ def scion_pkg_rpm(name, package, executables = {}, systemds = [], configs = [], package_name = package, release = "%autorelease", version_file = ":%s_version" % name, - defines = {"_smp_build_ncpus": "1"}, + defines = {"_smp_build_ncpus": "1", "buildsubdir": "..", "debug_package": "%{nil}"}, requires = deps, post_scriptlet_file = post, + source_date_epoch = 0, **kwargs )