summaryrefslogtreecommitdiffhomepage
path: root/pkg/rpm/Makefile
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2021-02-04 18:40:45 +0300
committerAndrei Belov <defan@nginx.com>2021-02-04 18:40:45 +0300
commit0997fa324ca523ab282f595ac9f44b3e4daff86a (patch)
tree37424fff265780f34f9a9adb7ddd7501a67843f1 /pkg/rpm/Makefile
parent2bc99c614d5547e773bda73364efada47f0a37bf (diff)
parent774a6034d9daf32ac6c98da7e4c0ca9e820536b4 (diff)
downloadunit-0997fa324ca523ab282f595ac9f44b3e4daff86a.tar.gz
unit-0997fa324ca523ab282f595ac9f44b3e4daff86a.tar.bz2
Merged with the default branch.
Diffstat (limited to 'pkg/rpm/Makefile')
-rw-r--r--pkg/rpm/Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkg/rpm/Makefile b/pkg/rpm/Makefile
index 1944d58d..f0bd0cf9 100644
--- a/pkg/rpm/Makefile
+++ b/pkg/rpm/Makefile
@@ -2,9 +2,10 @@
include ../../version
+DEFAULT_VERSION := $(NXT_VERSION)
DEFAULT_RELEASE := 1
-VERSION ?= $(NXT_VERSION)
+VERSION ?= $(DEFAULT_VERSION)
RELEASE ?= $(DEFAULT_RELEASE)
ifeq ($(shell test `rpm --eval '0%{?rhel} -eq 6 -a 0%{?amzn} -eq 0'`; echo $$?), 0)
@@ -127,7 +128,9 @@ include Makefile.php
ifeq ($(shell test `rpm --eval '0%{?fedora} -lt 32'`; echo $$?),0)
include Makefile.python27
endif
-ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 32'`; echo $$?),0)
+ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 33'`; echo $$?),0)
+include Makefile.python39
+else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 32'`; echo $$?),0)
include Makefile.python38
else ifeq ($(shell test `rpm --eval '0%{?fedora} -ge 29'`; echo $$?),0)
include Makefile.python37
@@ -149,6 +152,8 @@ CONFIGURE_ARGS=\
--pid=/var/run/unit/unit.pid \
--log=/var/log/unit/unit.log \
--tmp=/var/tmp \
+ --user=unit \
+ --group=unit \
--tests \
--openssl
@@ -274,7 +279,7 @@ test: unit modules
test -h rpmbuild/BUILD/unit-$(VERSION)/build-nodebug/$${soname} || \
ln -fs `pwd`/$${so} rpmbuild/BUILD/unit-$(VERSION)/build-nodebug/$${soname} ; \
done ; \
- ( cd rpmbuild/BUILD/unit-$(VERSION) && rm -f build && ln -s build-nodebug build && env python3 -m pytest ) ; \
+ ( cd rpmbuild/BUILD/unit-$(VERSION) && rm -f build && ln -s build-nodebug build && env python3 -m pytest --user=nobody $(PYTEST_ARGS) ) ; \
}
test-debug: unit modules
@@ -285,7 +290,7 @@ test-debug: unit modules
test -h rpmbuild/BUILD/unit-$(VERSION)/build-debug/$${soname} || \
ln -fs `pwd`/$${so} rpmbuild/BUILD/unit-$(VERSION)/build-debug/$${soname} ; \
done ; \
- ( cd rpmbuild/BUILD/unit-$(VERSION) && rm -f build && ln -s build-debug build && env python3 -m pytest ) ; \
+ ( cd rpmbuild/BUILD/unit-$(VERSION) && rm -f build && ln -s build-debug build && env python3 -m pytest --user=nobody $(PYTEST_ARGS) ) ; \
}
clean: