mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-25 18:40:18 -04:00
Pass annobin override to RPM toolset builds
Important changes: - Add Makefile RPMBUILD and RPMBUILD_FLAGS overrides for the rpm target. - Detect /opt/rh GCC toolsets before RPM packaging. - Pass --undefine _annotated_build to avoid Rocky 8 annobin plugin failures.
This commit is contained in:
parent
dfe053a0ae
commit
56285fc6e5
2 changed files with 14 additions and 3 deletions
4
Makefile
4
Makefile
|
|
@ -29,6 +29,8 @@ MKDIR ?= mkdir
|
||||||
MKTEMP ?= mktemp
|
MKTEMP ?= mktemp
|
||||||
MV ?= mv
|
MV ?= mv
|
||||||
RM ?= rm
|
RM ?= rm
|
||||||
|
RPMBUILD ?= rpmbuild
|
||||||
|
RPMBUILD_FLAGS ?=
|
||||||
SED ?= sed
|
SED ?= sed
|
||||||
STRIP ?= strip
|
STRIP ?= strip
|
||||||
TAR ?= tar
|
TAR ?= tar
|
||||||
|
|
@ -343,7 +345,7 @@ rpm: tarball
|
||||||
$(SED) 's/__VERSION__/$(VERSION)/g' mergerfs.spec > \
|
$(SED) 's/__VERSION__/$(VERSION)/g' mergerfs.spec > \
|
||||||
rpmbuild/SOURCES/mergerfs.spec
|
rpmbuild/SOURCES/mergerfs.spec
|
||||||
cp -ar mergerfs-$(VERSION).tar.gz rpmbuild/SOURCES
|
cp -ar mergerfs-$(VERSION).tar.gz rpmbuild/SOURCES
|
||||||
rpmbuild -ba rpmbuild/SOURCES/mergerfs.spec \
|
$(RPMBUILD) $(RPMBUILD_FLAGS) -ba rpmbuild/SOURCES/mergerfs.spec \
|
||||||
--define "_topdir $(CURDIR)/rpmbuild"
|
--define "_topdir $(CURDIR)/rpmbuild"
|
||||||
|
|
||||||
.PHONY: install-build-pkgs
|
.PHONY: install-build-pkgs
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,15 @@ if [ -e /tmp/build-env ]; then
|
||||||
. /tmp/build-env
|
. /tmp/build-env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rpmbuild_flags()
|
||||||
|
{
|
||||||
|
case "$(command -v "${CXX:-g++}")" in
|
||||||
|
/opt/rh/*)
|
||||||
|
printf '%s' '--undefine _annotated_build'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
if [ $# -ne 2 ]; then
|
if [ $# -ne 2 ]; then
|
||||||
echo "usage: $0 <branch> <git_repo>"
|
echo "usage: $0 <branch> <git_repo>"
|
||||||
echo "argv: $@"
|
echo "argv: $@"
|
||||||
|
|
@ -32,9 +41,9 @@ mkdir "/build"
|
||||||
if [ -e /usr/bin/apt-get ]; then
|
if [ -e /usr/bin/apt-get ]; then
|
||||||
make deb
|
make deb
|
||||||
elif [ -e /usr/bin/dnf ]; then
|
elif [ -e /usr/bin/dnf ]; then
|
||||||
make rpm
|
make RPMBUILD_FLAGS="$(rpmbuild_flags)" rpm
|
||||||
elif [ -e /usr/bin/yum ]; then
|
elif [ -e /usr/bin/yum ]; then
|
||||||
make rpm
|
make RPMBUILD_FLAGS="$(rpmbuild_flags)" rpm
|
||||||
elif [ -e /sbin/apk ]; then
|
elif [ -e /sbin/apk ]; then
|
||||||
echo "NOT YET SUPPORTED"
|
echo "NOT YET SUPPORTED"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue