File brp-50-generate-fips-hmac of Package brp-check-suse.19260

#!/bin/bash

if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
       exit 0
fi

if [ -n "$BRP_FIPSHMAC_FILES" ] ; then
	FIPSHMAC=$(type -p fipshmac)
	if [ -z "$FIPSHMAC" ] ; then
		FIPSHMAC=/usr/bin/fipshmac
	fi
	if [ -x "$FIPSHMAC" ] ; then
		RES=0
		for item in $BRP_FIPSHMAC_FILES ; do
			$FIPSHMAC $item || RES=1
		done
		if [ "$RES" != "0" ] ; then
			echo "brp-50-generate-fips-hmac (using $FIPSHMAC) failed"
			exit 1
		fi
	else
		echo "fipshmac ($FIPSHMAC) is not executable"
		exit 1
	fi
fi

openSUSE Build Service is sponsored by