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

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