mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 19:16:00 +00:00
Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 51a2c03a4a | |||
| 3d8c98b0d8 | |||
| 243ad03d32 | |||
| e1072736aa | |||
| 9a557531f4 | |||
| d8cb4987e5 | |||
| 6719c0f7df | |||
| 7166df721b | |||
| a70cf49f45 | |||
| 781eae34bb | |||
| ee17bc50a9 | |||
| 1fcfde404c | |||
| 36716ffe26 | |||
| eab92f6841 | |||
| 903919de2f | |||
| 69000f2f2e | |||
| 8b8f649dcb | |||
| 91ba5c1c6b | |||
| 70e5280ae4 | |||
| dbc677ddca | |||
| c2ff34b4ca | |||
| df917a0aa2 | |||
| c0e95c9bcd | |||
| 979430e742 | |||
| 61d9b5ab29 | |||
| 557bc87774 | |||
| fb869ea5a2 | |||
| 665a2546f8 | |||
| d8f18e5f6d | |||
| 255935f4fb | |||
| 34df391482 | |||
| 3d9fd9fd67 | |||
| 8894658b0a | |||
| f2d0972aab | |||
| 64c2b82443 | |||
| 3963a1f319 | |||
| 68cd34db8f | |||
| b9952701c5 | |||
| 3671774e8a | |||
| fa7c45049f | |||
| 768bdc7550 | |||
| 6372c11a12 | |||
| 5629731f54 | |||
| a0f8fd9a50 | |||
| cad2e6081d | |||
| 2daf8a48b2 | |||
| 26582bd9f2 | |||
| c6a2d6fabd | |||
| 2d8fc9a155 | |||
| 1eadce9aad | |||
| 6613644b9c | |||
| 93115e4073 | |||
| 12537cbfb0 | |||
| d397ee463a | |||
| dfe55331e6 |
+25
-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 \
|
||||
@@ -420,3 +430,6 @@ drop-abandoned: $(SPECFILE)
|
||||
|
||||
# Define site local common targets in a separate makefile
|
||||
-include $(TOPLVL)/projects/common/Makefile.common.site_local
|
||||
|
||||
# Include optional extended makefiles from individual package repos
|
||||
-include Makefile.custom
|
||||
|
||||
@@ -21,3 +21,7 @@
|
||||
# Path to dnf/yum config, used for generating whatrequires. It can be an absolute
|
||||
# path or a path relative to this autospec.conf.
|
||||
#yum_conf =
|
||||
|
||||
# Path to autospec failed patterns directory, used to match build failure lines to
|
||||
# package dependencies.
|
||||
#failed_pattern_dir =
|
||||
|
||||
@@ -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