Blame SOURCES/brp-kmod-set-exec-bit

936cd0
#! /bin/bash -efux
936cd0
936cd0
## A hack for making brp-strip taking into account kmod files
936cd0
936cd0
# If using normal root, avoid changing anything.
936cd0
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] || exit 0
936cd0
936cd0
# Checking for required programs
936cd0
which find chmod >/dev/null || exit 0
936cd0
936cd0
find "$RPM_BUILD_ROOT" \
936cd0
	-name '*.ko' \
936cd0
	-printf '%#m %P\n' \
936cd0
	-exec chmod u+x '{}' \; > "$RPM_BUILD_ROOT/kmod-permissions.list"