From f8d6541d04873a98fe6a13e04cf07ea153b47a7d Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Thu, 20 May 2021 23:16:24 +0200 Subject: [PATCH] freebsd: Replace use of \s with [[:space:]] In latest 13.0 release of freebsd sed is not accepting \s anymore, hence it needs to be replaced. Note that only parts of the repo which are touched by freebsd during the tests are updated. Details https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893 Signed-off-by: Michal Berger Change-Id: I217208511af8f98e7033f8f24a343b5ca9c48825 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7986 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- configure | 4 ++-- dpdkbuild/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 308eda2bc..7d063f4ef 100755 --- a/configure +++ b/configure @@ -852,7 +852,7 @@ if (($(grep -cE "^\s*CONFIG_[[:alnum:]_]+=" "$rootdir/CONFIG") != ${#CONFIG[@]}) echo "BUG: Some configuration options are not present in CONFIG file. Please update this file." echo "Missing options in CONFIG (+) file and in current config (-): " diff -u --label "CONFIG file" --label "CONFIG[@]" \ - <(sed -r -e '/^\s*$/d; /^\s*#.*/d; s/(CONFIG_[[:alnum:]_]+)=.*/\1/g' CONFIG | sort) \ + <(sed -r -e '/^[[:space:]]*$/d; /^[[:space:]]*#.*/d; s/(CONFIG_[[:alnum:]_]+)=.*/\1/g' CONFIG | sort) \ <(printf "CONFIG_%s\n" "${!CONFIG[@]}" | sort) exit 1 fi @@ -860,7 +860,7 @@ fi echo -n "Creating mk/config.mk..." cp -f $rootdir/CONFIG $rootdir/mk/config.mk for key in "${!CONFIG[@]}"; do - sed -i.bak -r "s#^\s*CONFIG_${key}=.*#CONFIG_${key}\?=${CONFIG[$key]}#g" $rootdir/mk/config.mk + sed -i.bak -r "s#[[:space:]]*CONFIG_${key}=.*#CONFIG_${key}\?=${CONFIG[$key]}#g" $rootdir/mk/config.mk done # On FreeBSD sed -i 'SUFFIX' - SUFFIX is mandatory. So no way but to delete the backed file. rm -f $rootdir/mk/config.mk.bak diff --git a/dpdkbuild/Makefile b/dpdkbuild/Makefile index b540d2fa0..d4af3a0a4 100644 --- a/dpdkbuild/Makefile +++ b/dpdkbuild/Makefile @@ -137,7 +137,7 @@ ifeq ($(MAKE_PID),) MAKE_PID := $(shell echo $$PPID) endif -MAKE_NUMJOBS := $(shell ps T | sed -nE 's/\s*$(MAKE_PID)\s.* (-j|--jobs=)( *[0-9]+).*/\1\2/p') +MAKE_NUMJOBS := $(shell ps T | sed -nE 's/[[:space:]]*$(MAKE_PID)[[:space:]].* (-j|--jobs=)( *[0-9]+).*/\1\2/p') all: $(SPDK_ROOT_DIR)/dpdk/build-tmp $(Q)# DPDK doesn't handle nested make calls, so unset MAKEFLAGS