mirror of
https://github.com/clearlinux/common.git
synced 2026-10-03 23:38:20 +00:00
Enable local repo support for autospec
Local repo support was recently added for 'make build', so do the same for 'make autospec' and 'make autospecnew'. Note that to make mock invocations work at both package-level and toplevel, I am resolving MOCK_CONFIG_VAL with the realpath function. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
+5
-7
@@ -19,12 +19,9 @@ RPMS ?= $(LATEST_RPMS)
|
||||
|
||||
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
|
||||
|
||||
ifeq ($(wildcard $(TOPLVL)/repo/clear.cfg),)
|
||||
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONF)
|
||||
else
|
||||
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(TOPLVL)/repo/clear.cfg
|
||||
USE_LOCAL_REPO = 1
|
||||
endif
|
||||
# MOCK_CONFIG_VAL is set in Makefile.shared
|
||||
MOCK ?= $(WITH_SUDO) /usr/bin/mock -r $(MOCK_CONFIG_VAL)
|
||||
|
||||
|
||||
ifneq ($(wildcard upstream),)
|
||||
__allsources := $(notdir $(strip $(shell cat upstream)))
|
||||
@@ -164,7 +161,8 @@ autospec: pullrebase
|
||||
python3 $(TOPLVL)/projects/autospec/autospec/autospec.py -t . --integrity \
|
||||
${NON_INTERACTIVE} --config "$(AUTOSPEC_CONF)" ${SKIP_GIT} \
|
||||
$(firstword $(NEWURL) $(URL)) --name $(PKG_NAME) ${CLEANUP} \
|
||||
$${SETVERSION:+ -v $${SETVERSION}} -a $(ARCHIVES)
|
||||
$${SETVERSION:+ -v $${SETVERSION}} -a $(ARCHIVES) \
|
||||
-m $(MOCK_CONFIG_VAL)
|
||||
@$(MAKE) spdxcheck
|
||||
@$(MAKE) checkblacklist
|
||||
@if [ -e update_changelog.sh ] && [ -z "$$SKIP_GIT" ] ; then \
|
||||
|
||||
@@ -119,6 +119,16 @@ localrepostatus:
|
||||
fi; \
|
||||
)
|
||||
|
||||
# Detection of whether to use the local RPM repo occurs on-the-fly. Normally,
|
||||
# variable definitions appear in Makefile.config, but these variables are not
|
||||
# intended to be user-modifiable.
|
||||
ifeq ($(wildcard $(TOPLVL)/repo/clear.cfg),)
|
||||
MOCK_CONFIG_VAL = $(realpath $(MOCK_CONF))
|
||||
else
|
||||
MOCK_CONFIG_VAL = $(realpath $(TOPLVL)/repo/clear.cfg)
|
||||
USE_LOCAL_REPO = 1
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: help
|
||||
##### Code
|
||||
|
||||
+1
-1
@@ -204,7 +204,7 @@ autospecnew:
|
||||
$(call subjectprefix,$(NAME)); \
|
||||
); \
|
||||
printf 'PKG_NAME := %s\nURL = %s\nARCHIVES = %s\n\ninclude ../common/Makefile.common\n' $(NAME) '$(value URL)' '$(value ARCHIVES)' > $(TOPLVL)/packages/$(NAME)/Makefile; \
|
||||
python3 $(TOPLVL)/projects/autospec/autospec/autospec.py --integrity -t packages/$(NAME) --config $(AUTOSPEC_CONF) $(URL) --name $(NAME); \
|
||||
python3 $(TOPLVL)/projects/autospec/autospec/autospec.py --integrity -t packages/$(NAME) --config $(AUTOSPEC_CONF) $(URL) --name $(NAME) -m $(MOCK_CONFIG_VAL); \
|
||||
$(TOPLVL)/projects/common/checkblacklist.sh $(TOPLVL)/projects/common/blacklist $(TOPLVL)/packages/${NAME}/results/*.rpm; \
|
||||
else \
|
||||
echo "$(NAME) already exists at $(TOPLVL)/packages/$(NAME)"; \
|
||||
|
||||
Reference in New Issue
Block a user