|
|
|
@@ -12,9 +12,9 @@ SHELL = /bin/bash
|
|
|
|
|
SPECFILE = $(addsuffix .spec, $(PKG_NAME))
|
|
|
|
|
|
|
|
|
|
SRPMVERS = $(shell [ ! -f $(SPECFILE) ] || rpmspec -D '_vendor clr' --srpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}\n' $(SPECFILE))
|
|
|
|
|
SRPMFILE = results/srpm/$(SRPMVERS).src.rpm
|
|
|
|
|
SRPMFILE = results/$(SRPMVERS).src.rpm
|
|
|
|
|
|
|
|
|
|
LATEST_RPMS = $(shell [ ! -s results/logs/build.log ] || for r in `egrep 'Wrote.*/RPMS/.*.rpm' results/logs/build.log | sed 's/.*\///;s/.*debuginfo/debuginfo\/&/'` ; do echo "results/$$r"; done)
|
|
|
|
|
LATEST_RPMS = $(wildcard rpms/*.rpm)
|
|
|
|
|
RPMS ?= $(LATEST_RPMS)
|
|
|
|
|
|
|
|
|
|
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
|
|
|
|
@@ -91,24 +91,20 @@ prebuild-checks:
|
|
|
|
|
#help Use MOCK_OPTS environment varible to pass down arbitrary mock options.
|
|
|
|
|
build: prebuild-checks configemail $(SPECFILE) upstream $(SRPMFILE)
|
|
|
|
|
$(MOCK) $(SRPMFILE) --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME)
|
|
|
|
|
mkdir -p results/logs results/debuginfo
|
|
|
|
|
mv results/*.log results/logs
|
|
|
|
|
-mv results/*-debuginfo*.rpm results/debuginfo/
|
|
|
|
|
@perl $(TOPLVL)/projects/common/logcheck.pl results/logs/build.log
|
|
|
|
|
@perl $(TOPLVL)/projects/common/count.pl results/logs/build.log &> testresults
|
|
|
|
|
$(MAKE) link-new-rpms PKG_REPO_DIR="."
|
|
|
|
|
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
|
|
|
|
|
@perl $(TOPLVL)/projects/common/count.pl results/build.log &> testresults
|
|
|
|
|
@$(MAKE) checkblacklist
|
|
|
|
|
|
|
|
|
|
#help build-nocheck: Same as 'make build', but do not run the package's test suite.
|
|
|
|
|
build-nocheck: configemail $(SPECFILE) upstream $(SRPMFILE)
|
|
|
|
|
$(MOCK) $(SRPMFILE) --nocheck --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME)
|
|
|
|
|
mkdir -p results/logs results/debuginfo
|
|
|
|
|
mv results/*.log results/logs
|
|
|
|
|
-mv results/*-debuginfo*.rpm results/debuginfo/
|
|
|
|
|
@perl $(TOPLVL)/projects/common/logcheck.pl results/logs/build.log
|
|
|
|
|
@perl $(TOPLVL)/projects/common/count.pl results/logs/build.log &> testresults
|
|
|
|
|
$(MAKE) link-new-rpms PKG_REPO_DIR="."
|
|
|
|
|
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
|
|
|
|
|
@perl $(TOPLVL)/projects/common/count.pl results/build.log &> testresults
|
|
|
|
|
@$(MAKE) checkblacklist
|
|
|
|
|
|
|
|
|
|
fmvpatches: results/logs/build.log
|
|
|
|
|
fmvpatches: results/build.log
|
|
|
|
|
@perl $(TOPLVL)/projects/common/fmvpatches.pl $(PKG_NAME)
|
|
|
|
|
|
|
|
|
|
#help rootshell: Puts you in a root shell at the top of your build root.
|
|
|
|
@@ -121,9 +117,11 @@ shell:
|
|
|
|
|
|
|
|
|
|
# Always rebuild the source rpm
|
|
|
|
|
.PHONY: $(SRPMFILE)
|
|
|
|
|
$(SRPMFILE): $(SPECFILE) $(__allsources) localreponotice
|
|
|
|
|
$(SRPMFILE): $(SPECFILE) $(__allsources) localreponotice clean-old-content
|
|
|
|
|
@$(MAKE) spdxcheck
|
|
|
|
|
$(MOCK) --buildsrpm --source=./ --spec=$(SPECFILE) --result=results/srpm/ --no-cleanup-after --uniqueext=$(PKG_NAME)
|
|
|
|
|
$(MOCK) --buildsrpm --source=./ --spec=$(SPECFILE) --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME)
|
|
|
|
|
mv results/root.log results/srpm-root.log
|
|
|
|
|
mv results/build.log results/srpm-build.log
|
|
|
|
|
|
|
|
|
|
# Do a git fetch and a git rebase to apply local commits on top of latest
|
|
|
|
|
# commits from the remote. A git fetch/rebase is used rather than a git pull so
|
|
|
|
@@ -160,8 +158,7 @@ pullrebase:
|
|
|
|
|
#help Use MOCK_OPTS environment varible to pass down arbitrary mock options
|
|
|
|
|
#help to autospec.
|
|
|
|
|
#help For more information, see the project at https://github.com/clearlinux/autospec
|
|
|
|
|
autospec: pullrebase localreponotice
|
|
|
|
|
rm -f results/srpm/*src.rpm
|
|
|
|
|
autospec: pullrebase localreponotice clean-old-content
|
|
|
|
|
@if [ -e $(SPECFILE) ] && ! grep -q "# Generated by: autospec.py" $(SPECFILE) ; then \
|
|
|
|
|
echo "Specfile already exists and was not created by autospec.py! Aborting."; \
|
|
|
|
|
exit 1; \
|
|
|
|
@@ -178,6 +175,7 @@ autospec: pullrebase localreponotice
|
|
|
|
|
$${SETVERSION:+ --version $${SETVERSION}} \
|
|
|
|
|
${NON_INTERACTIVE} ${SKIP_GIT} ${CLEANUP} \
|
|
|
|
|
$(firstword $(NEWURL) $(URL));
|
|
|
|
|
$(MAKE) link-new-rpms PKG_REPO_DIR="."
|
|
|
|
|
@$(MAKE) spdxcheck
|
|
|
|
|
@$(MAKE) checkblacklist
|
|
|
|
|
@if [ -e update_changelog.sh ] && [ -z "$$SKIP_GIT" ] ; then \
|
|
|
|
@@ -327,7 +325,7 @@ rekoji-nowait:
|
|
|
|
|
$(MAKE) KOJI_NOWAIT="--nowait --background" rekoji
|
|
|
|
|
|
|
|
|
|
logcheck:
|
|
|
|
|
@perl $(TOPLVL)/projects/common/logcheck.pl results/logs/build.log
|
|
|
|
|
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
|
|
|
|
|
|
|
|
|
|
$(TOPLVL)/repo:
|
|
|
|
|
@echo "Creating local RPM repository $(TOPLVL)/repo"
|
|
|
|
@@ -337,19 +335,24 @@ $(TOPLVL)/repo:
|
|
|
|
|
#help repoadd: Adds locally-built RPMs for this package to the local RPM
|
|
|
|
|
#help repository. If this repository does not yet exist, it is created and
|
|
|
|
|
#help enabled.
|
|
|
|
|
repoadd: results/logs/build.log $(TOPLVL)/repo
|
|
|
|
|
@if [ -z "`grep '^Wrote: .*$(shell basename $(SRPMFILE))$$' results/logs/build.log`" ]; then \
|
|
|
|
|
echo "You have not yet succesfully built this release yet"; exit 1; \
|
|
|
|
|
fi
|
|
|
|
|
@if [ -f .repo-index ]; then \
|
|
|
|
|
repoadd: $(TOPLVL)/repo
|
|
|
|
|
@if [ -z "${LATEST_RPMS}" ]; then \
|
|
|
|
|
echo "No rpms found in rpms/ directory."; \
|
|
|
|
|
exit 1; \
|
|
|
|
|
fi; \
|
|
|
|
|
if [ -f .repo-index ]; then \
|
|
|
|
|
echo "Cleaning old rpms:"; \
|
|
|
|
|
for r in `cat .repo-index`; do \
|
|
|
|
|
echo "-$$r"; \
|
|
|
|
|
rm -f $(TOPLVL)/repo/$$r; \
|
|
|
|
|
done; \
|
|
|
|
|
rm .repo-index; \
|
|
|
|
|
fi
|
|
|
|
|
for r in $(LATEST_RPMS); do echo "+$$r"; echo $$(basename $$r) >> .repo-index; cp $$r $(TOPLVL)/repo; done
|
|
|
|
|
fi; \
|
|
|
|
|
for r in ${LATEST_RPMS}; do \
|
|
|
|
|
echo "+$$r"; \
|
|
|
|
|
echo $$(basename $$r) >> .repo-index; \
|
|
|
|
|
ln -f $$r $(TOPLVL)/repo/; \
|
|
|
|
|
done
|
|
|
|
|
$(MAKE) localrepocreate
|
|
|
|
|
$(call localrepoenable,${PM_CONF},${MOCK_CONF})
|
|
|
|
|
|
|
|
|
|