mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 11:06:15 +00:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f2d0972aab | |||
| 64c2b82443 | |||
| 3963a1f319 | |||
| 68cd34db8f | |||
| b9952701c5 | |||
| 3671774e8a | |||
| fa7c45049f | |||
| 768bdc7550 | |||
| 6372c11a12 | |||
| 5629731f54 | |||
| a0f8fd9a50 | |||
| cad2e6081d | |||
| 2daf8a48b2 | |||
| 26582bd9f2 | |||
| c6a2d6fabd | |||
| 2d8fc9a155 | |||
| 1eadce9aad | |||
| 6613644b9c | |||
| 93115e4073 | |||
| 12537cbfb0 |
+22
-12
@@ -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/$(SRPMVERS).src.rpm
|
||||
SRPMFILE = results/srpm/$(SRPMVERS).src.rpm
|
||||
|
||||
LATEST_RPMS = $(shell [ ! -s results/build.log ] || for r in `egrep 'Wrote.*/RPMS/.*.rpm' results/build.log | sed 's/.*\///'` ; do echo "results/$$r"; done)
|
||||
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)
|
||||
RPMS ?= $(LATEST_RPMS)
|
||||
|
||||
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
|
||||
@@ -91,18 +91,24 @@ 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)
|
||||
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
|
||||
@perl $(TOPLVL)/projects/common/count.pl results/build.log &> testresults
|
||||
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) 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)
|
||||
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
|
||||
@perl $(TOPLVL)/projects/common/count.pl results/build.log &> testresults
|
||||
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) checkblacklist
|
||||
|
||||
fmvpatches: results/build.log
|
||||
fmvpatches: results/logs/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.
|
||||
@@ -117,7 +123,7 @@ shell:
|
||||
.PHONY: $(SRPMFILE)
|
||||
$(SRPMFILE): $(SPECFILE) $(__allsources) localreponotice
|
||||
@$(MAKE) spdxcheck
|
||||
$(MOCK) --buildsrpm --source=./ --spec=$(SPECFILE) --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME)
|
||||
$(MOCK) --buildsrpm --source=./ --spec=$(SPECFILE) --result=results/srpm/ --no-cleanup-after --uniqueext=$(PKG_NAME)
|
||||
|
||||
# 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
|
||||
@@ -155,7 +161,7 @@ pullrebase:
|
||||
#help to autospec.
|
||||
#help For more information, see the project at https://github.com/clearlinux/autospec
|
||||
autospec: pullrebase localreponotice
|
||||
rm -f results/*src.rpm
|
||||
rm -f results/srpm/*src.rpm
|
||||
@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; \
|
||||
@@ -287,6 +293,10 @@ koji: prekoji-checks kojidef
|
||||
echo "Error: Must be on the master branch to submit to koji" >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if ! git diff --quiet HEAD ${SPECFILE}; then \
|
||||
echo "Error: All changes to ${SPECFILE} must be committed first" >&2; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
if git rev-parse --verify --quiet origin/master > /dev/null; then \
|
||||
git pull --rebase; \
|
||||
fi
|
||||
@@ -317,7 +327,7 @@ rekoji-nowait:
|
||||
$(MAKE) KOJI_NOWAIT="--nowait --background" rekoji
|
||||
|
||||
logcheck:
|
||||
@perl $(TOPLVL)/projects/common/logcheck.pl results/build.log
|
||||
@perl $(TOPLVL)/projects/common/logcheck.pl results/logs/build.log
|
||||
|
||||
$(TOPLVL)/repo:
|
||||
@echo "Creating local RPM repository $(TOPLVL)/repo"
|
||||
@@ -327,8 +337,8 @@ $(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/build.log $(TOPLVL)/repo
|
||||
@if [ -z "`grep '^Wrote: .*$(shell basename $(SRPMFILE))$$' results/build.log`" ]; then \
|
||||
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 \
|
||||
|
||||
@@ -8,6 +8,8 @@ config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s
|
||||
config_opts['plugin_conf']['ccache_enable'] = False
|
||||
config_opts['releasever'] = 'clear'
|
||||
config_opts['package_manager'] = 'dnf'
|
||||
config_opts['chrootgroup'] = 'mockbuild'
|
||||
config_opts['use_bootstrap_container'] = False
|
||||
|
||||
|
||||
config_opts['dnf.conf'] = """
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ sub find_file {
|
||||
return $file;
|
||||
}
|
||||
|
||||
open(BUILD_LOG, '<', "results/build.log") or die $!;
|
||||
open(BUILD_LOG, '<', "results/logs/build.log") or die $!;
|
||||
while (<BUILD_LOG>) {
|
||||
if($_ =~ /(\S+):([0-9]*):([0-9]*): note: (basic block|loop) (vectorized)/) {
|
||||
$fmv->{s_name} = (split('/',$1))[-1];
|
||||
|
||||
Reference in New Issue
Block a user