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

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