Skip to content

Commit 348cd09

Browse files
Define _scl_prefix in rpmbuild to silence invalid regex warnings
Ticket: ENT-14293 Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
1 parent 91ad15e commit 348cd09

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

build-scripts/package

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,16 @@ rpm | lpp)
219219
log_debug "Building RPM package with rpmbuild"
220220
# rhel-10 rpmbuild is more picky about /var/cfengine/lib RPATH we need
221221
export QA_RPATHS=2 # this is a set of bit flags, we just want 0x0002 here
222+
# Define _scl_prefix and _root_sysconfdir so the gcc-toolset SCL macros
223+
# resolve. Left undefined, the literal %{...} they contain is parsed as an
224+
# ERE interval and rpmbuild prints "Ignoring invalid regex". Both are
225+
# harmless on platforms that do not use SCLs.
222226
eval rpmbuild -bb \
223227
--define "'_topdir $BASEDIR/$PKG'" \
224228
--define "'buildprefix $BUILDPREFIX'" \
225229
--define "'_basedir $BASEDIR'" \
230+
--define "'_scl_prefix /opt/rh'" \
231+
--define "'_root_sysconfdir /etc'" \
226232
"$RPMBUILD_OPTIONS" "$SPEC"
227233

228234
if [ "$PACKAGING" = lpp ]; then

0 commit comments

Comments
 (0)