rpm-build/scripts/strip
Vitaly Chikunov a2e3f87824 Add a wrapper for install in %install section to skip strip
`strip' is called by `install -s` that could occur in unpatched
Makefiles, breaking debuginfo generation.

Try to catch `install` invocations via:

- %__install macro used in `make INSTALL=`.
- Prefix PATH with `/usr/libexec/rpm-build` with install and strip
  wrappers.

Suggested-by: Dmitry V. Levin <ldv@altlinux.org>
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-15 04:05:15 +03:00

9 lines
191 B
Bash
Executable File

#!/bin/sh -efu
if [ "${RPM_INSTALL_STRIP-}" = ignore ]; then
echo >&2 "WARNING: strip is called in %install by 'install -s' (ignored)"
else
set -- `rpm --eval %__strip` "$@"
exec "$@"
fi