mirror of
https://github.com/clearlinux/common.git
synced 2026-06-16 19:16:00 +00:00
Compare commits
100 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 26bb3f43f8 | |||
| fd509a2295 | |||
| eb4fcd4085 | |||
| 4fd9e54785 | |||
| 5bc6cc856b | |||
| 3bfdb39ee1 | |||
| b495687f7c | |||
| c719db89dd | |||
| ba9e38f3f0 | |||
| 0d4b01ec83 | |||
| 4867cefcb7 | |||
| e88fcdc4bc | |||
| a381875001 | |||
| 114936fc23 | |||
| 3739bc0e0f | |||
| f43a186a78 | |||
| da562cb750 | |||
| 16467cfbc0 | |||
| 16466cac02 | |||
| 6e8d00eb30 | |||
| c160c30218 | |||
| 9b09c217da | |||
| 00230e7d1d | |||
| ff40498428 | |||
| 6483c7dd86 | |||
| d1079234d9 | |||
| 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 | |||
| 0c69bfb9a9 | |||
| 689e48a2f7 | |||
| 82e334a93a | |||
| ab6c4a674f | |||
| 78de1a6a13 | |||
| 74e79ffea2 | |||
| bb21809c73 | |||
| e912d4e6ae | |||
| 340b6a74d4 | |||
| 2e8f9ef0ab | |||
| 4bdd1765c5 | |||
| 45f39671d6 | |||
| 1d46a683e0 | |||
| 41d2113b8a | |||
| 528cd77168 | |||
| 916ce142bb | |||
| e2a3b113f2 | |||
| 0acf617611 | |||
| 39aeb852fe |
+37
-19
@@ -14,7 +14,7 @@ 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
|
||||
|
||||
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 = $(wildcard rpms/*.rpm)
|
||||
RPMS ?= $(LATEST_RPMS)
|
||||
|
||||
WITH_SUDO = $(shell cmp /usr/bin/mock /usr/sbin/mock &> /dev/null && echo sudo )
|
||||
@@ -28,16 +28,18 @@ __missingsources := $(filter-out $(wildcard ${__allsources}), ${__allsources})
|
||||
endif
|
||||
|
||||
$(SPECFILE):
|
||||
@echo Error: $(SPECFILE) is missing. Please run \`make autospec\` to try and auto
|
||||
@echo Error: generate one for you.
|
||||
@exit 1
|
||||
@[[ -f "$@" ]] || (\
|
||||
echo Error: $@ is missing. Please run \`make autospec\` to try and auto;\
|
||||
echo Error: generate one for you.;\
|
||||
exit 1 )
|
||||
|
||||
upstream:
|
||||
@echo Error: The \"upstream\" file is missing. Try running \`make autospec\` to
|
||||
@echo Error: auto generate one for you. If you are not using autospec to
|
||||
@echo Error: generate a spec file, specify the proper "Source*" entries in the
|
||||
@echo Error: spec header, and try running \`make generateupstream\`.
|
||||
@exit 1
|
||||
@[[ -f "$@" ]] || (\
|
||||
echo Error: The \"$@\" file is missing. Try running \`make autospec\` to;\
|
||||
echo Error: auto generate one for you. If you are not using autospec to;\
|
||||
echo Error: generate a spec file, specify the proper "Source*" entries in the;\
|
||||
echo Error: spec header, and try running \`make generateupstream\`.;\
|
||||
exit 1 )
|
||||
|
||||
#help spdxcheck: Checks that the package license is a valid SPDX license,
|
||||
#help or that it is in the exceptions list.
|
||||
@@ -91,6 +93,7 @@ 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)
|
||||
$(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
|
||||
@@ -98,6 +101,7 @@ build: prebuild-checks configemail $(SPECFILE) upstream $(SRPMFILE)
|
||||
#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)
|
||||
$(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
|
||||
@@ -115,9 +119,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/ --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
|
||||
@@ -154,8 +160,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/*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; \
|
||||
@@ -172,6 +177,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 \
|
||||
@@ -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
|
||||
@@ -327,19 +337,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/build.log $(TOPLVL)/repo
|
||||
@if [ -z "`grep '^Wrote: .*$(shell basename $(SRPMFILE))$$' results/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})
|
||||
|
||||
@@ -420,3 +435,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
|
||||
|
||||
@@ -138,6 +138,30 @@ localreponotice:
|
||||
[ -f $(TOPLVL)/repo/opt-in-build ] || sleep 3; \
|
||||
fi >&2
|
||||
|
||||
.PHONY: clean-old-rpms clean-old-logs clean-old-content
|
||||
clean-old-rpms:
|
||||
rm -rf ./rpms
|
||||
rm -f ./results/*.rpm
|
||||
|
||||
clean-old-logs:
|
||||
rm -f ./results/*.log
|
||||
|
||||
clean-old-content: clean-old-rpms clean-old-logs
|
||||
|
||||
.PHONY: require-pkg-repo-dir link-new-rpms
|
||||
require-pkg-repo-dir:
|
||||
@if [ -z ${PKG_REPO_DIR} ]; then \
|
||||
echo "Please specify PKG_REPO_DIR to indicate package repo location."; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
link-new-rpms: require-pkg-repo-dir
|
||||
mkdir -p ${PKG_REPO_DIR}/rpms
|
||||
rm -f ${PKG_REPO_DIR}/rpms/*.rpm
|
||||
find ${PKG_REPO_DIR}/results -maxdepth 1 -name '*.rpm' -exec ln {} ${PKG_REPO_DIR}/rpms/ \;
|
||||
rm -f ${PKG_REPO_DIR}/rpms/*.src.rpm
|
||||
|
||||
|
||||
.PHONY: help
|
||||
##### Code
|
||||
# Make sure that HELPSPACE has exactly HELPLEN spaces in it
|
||||
|
||||
+3
-1
@@ -10,6 +10,7 @@ include $(TOPLVL)/projects/common/Makefile.shared
|
||||
SHELL = /bin/bash
|
||||
|
||||
PKGS = $(shell cat $(PACKAGES_FILE))
|
||||
PKGS_LOCAL = $(sort $(filter ${PKGS},$(subst packages/,,$(wildcard packages/*))))
|
||||
|
||||
proj_PKGS = $(addprefix proj_,$(PROJ_PKGS))
|
||||
clone_PKGS = $(addprefix clone_,$(PKGS))
|
||||
@@ -64,7 +65,7 @@ cvecheck:
|
||||
#help of merge commits, while displaying any changes since your last pull. It is
|
||||
#help silent if there are no changes.
|
||||
.PHONY: pull ${PULL_PKGS}
|
||||
PULL_PKGS:= $(addprefix PULL_projects/,$(PROJ_PKGS)) $(addprefix PULL_packages/,$(PKGS))
|
||||
PULL_PKGS:= $(addprefix PULL_projects/,$(PROJ_PKGS)) $(addprefix PULL_packages/,${PKGS_LOCAL})
|
||||
${PULL_PKGS}:
|
||||
@p=$(patsubst PULL_%,%,$@) ; \
|
||||
if [ ! -d "$$p/.git" ]; then echo "Nothing to pull for $$p - $$p/.git missing"; exit 0; fi; \
|
||||
@@ -223,6 +224,7 @@ autospecnew: localreponotice
|
||||
$${SETVERSION:+ --version $${SETVERSION}} \
|
||||
${NON_INTERACTIVE} ${SKIP_GIT} ${CLEANUP} \
|
||||
$(URL); \
|
||||
[ $$? -eq 0 ] && $(MAKE) link-new-rpms PKG_REPO_DIR="${TOPLVL}/packages/${NAME}"; \
|
||||
$(TOPLVL)/projects/common/checkblacklist.sh $(TOPLVL)/projects/common/blacklist $(TOPLVL)/packages/${NAME}/results/*.rpm; \
|
||||
else \
|
||||
echo "$(NAME) already exists at $(TOPLVL)/packages/$(NAME)"; \
|
||||
|
||||
+5
-1
@@ -18,6 +18,10 @@
|
||||
# an absolute path or a path relative to this autospec.conf.
|
||||
#packages_file =
|
||||
|
||||
# Path to yum config, used for generating whatrequires. It can be an absolute
|
||||
# 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 =
|
||||
|
||||
@@ -6,8 +6,12 @@ config_opts['dist'] = 'clear' # only useful for --resultdir variable subst
|
||||
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
|
||||
config_opts['useradd'] = '/usr/sbin/useradd -m -u %(uid)s -g %(gid)s -d %(home)s %(user)s'
|
||||
config_opts['plugin_conf']['ccache_enable'] = False
|
||||
config_opts['plugin_conf']['root_cache_opts']['compress_program'] = 'zstd -5'
|
||||
config_opts['plugin_conf']['root_cache_opts']['extension'] = '.zst'
|
||||
config_opts['releasever'] = 'clear'
|
||||
config_opts['package_manager'] = 'dnf'
|
||||
config_opts['chrootgroup'] = 'mockbuild'
|
||||
config_opts['use_bootstrap_container'] = False
|
||||
|
||||
|
||||
config_opts['dnf.conf'] = """
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
[main]
|
||||
cachedir=/var/cache/dnf
|
||||
keepcache=1
|
||||
debuglevel=1
|
||||
logfile=/var/log/dnf.log
|
||||
|
||||
+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];
|
||||
|
||||
Regular → Executable
+1
@@ -54,4 +54,5 @@ qemu-system-x86_64 \
|
||||
-drive file="$IMAGE",if=virtio,aio=threads,format=raw \
|
||||
-netdev user,id=mynet0,hostfwd=tcp::${VMN}0022-:22,hostfwd=tcp::${VMN}2375-:2375 \
|
||||
-device virtio-net-pci,netdev=mynet0 \
|
||||
-device virtio-rng-pci \
|
||||
-debugcon file:debug.log -global isa-debugcon.iobase=0x402 $@
|
||||
|
||||
Reference in New Issue
Block a user