From 9eb3ba514a0288de13cbe3a84f795f80ea9ca6cc Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Sun, 17 Mar 2024 16:20:25 -0400 Subject: [PATCH] revert --- Makefile.common | 50 +++++++++---------------------------------------- 1 file changed, 9 insertions(+), 41 deletions(-) diff --git a/Makefile.common b/Makefile.common index 4eb5642..a2c7fae 100644 --- a/Makefile.common +++ b/Makefile.common @@ -31,10 +31,6 @@ VERG = $(shell [ `sed -r 's/\[branch "(.*)"\]/\1/;t;d' .git/config` == 'master' PREF = $(shell [ `grep url -r .git/config | cut -d/ -f4` == "smecontrib" ] && echo 'contrib' || echo 'sme') BRANCH := $(PREF)$(VERG) $(info $$BRANCH is $(BRANCH); $$VERG is $(VERG); $$PREF is $(PREF) ) -# gitea=>koji specific : smeserver=>os smecontrib=>smecontrib -KOJI_BUILD := $(if $(filter sme,$(PREF)),os,contribs) -GIT_ORG := $(if $(filter sme,$(PREF)),smeserver,smecontrib) - BRANCHINFO = $(shell grep ^$(BRANCH): $(COMMON_DIR)/branches | cut -d: --output-delimiter=" " -f2-) TARGET := $(word 1, $(BRANCHINFO)) DIST = $(word 2, $(BRANCHINFO)) @@ -151,9 +147,7 @@ TAG_VERSION := $(shell echo $(VERSION) | sed s/\\\./_/g) TAG_RELEASE := $(shell echo $(RELEASE) | sed s/\\\./_/g) # tag to export, defaulting to current tag in the spec file -#TAG?=$(TAG_NAME)-$(TAG_VERSION)-$(TAG_RELEASE) -# simpler tagging using GIT -TAG?=$(TAG_VERSION)-$(TAG_RELEASE) +TAG?=$(TAG_NAME)-$(TAG_VERSION)-$(TAG_RELEASE) # where to cvs export temporarily TMPCVS := $(WORKDIR)/cvs-$(TAG) @@ -322,9 +316,7 @@ install-short: sources $(TARGETS) CVS_ROOT := $(shell if [ -f CVS/Root ] ; then cat CVS/Root ; fi) CVS_REPOSITORY := $(shell if [ -f CVS/Repository ] ; then cat CVS/Repository ; fi) -GIT_REPOSITORY := $(shell basename `git rev-parse --show-toplevel`) CVS_URL := cvs://shell.koozali.org/cvs/smecontribs?$(CVS_REPOSITORY)\#$(TAG) -GIT_URL := https://src.koozali.org/$(GIT_ORG)/$(GIT_REPOSITORY)\#$(TAG) ## create a clean exported copy in $(TMPCVS) export:: sources @@ -383,20 +375,13 @@ verrel: # If you build a new version into the tree, first do "make tag", # then "make srpm", then build the package. -tagcvs:: $(SPECFILE) $(COMMON_DIR)/branches - cvs tag $(TAG_OPTS) -c $(TAG) - @echo "Tagged with: $(TAG)" - @echo - tag:: $(SPECFILE) $(COMMON_DIR)/branches - git tag $(TAG_OPTS) -a $(TAG) -m $(TAG) - git push --tag + cvs tag $(TAG_OPTS) -c $(TAG) @echo "Tagged with: $(TAG)" @echo force-tag: $(SPECFILE) $(COMMON_DIR)/branches @$(MAKE) tag TAG_OPTS="-F $(TAG_OPTS)" - define find-user if [ -f CVS/Root ] ; then if [ `cat CVS/Root |grep -c [^:]@` -ne 0 ]; then cat CVS/Root |cut -d @ -f 1 | sed 's/:.*://' ; else echo $(USER); fi ; else echo $(USER);fi endef @@ -415,32 +400,24 @@ oldbuild: $(COMMON_DIR)/branches cvs commit -m "request build of $(CVS_REPOSITORY) $(TAG) for $(TARGET)" tobuild ;\ popd >/dev/null) -build-checkcvs: $(SPECFILE) +build-check: $(SPECFILE) @if [ -z "$(TARGET)" -o ! -d CVS ]; then echo "Must be in a branch subdirectory"; exit 1; fi @cvs -f status -v $(SPECFILE) 2>/dev/null | grep -q $(TAG); ret=$$? ;\ if [ $$ret -ne 0 ]; then echo "$(SPECFILE) not tagged with tag $(TAG)"; exit 1; fi -build-check: $(SPECFILE) - @git tag 2>/dev/null | grep -q $(TAG); ret=$$? ;\ - if [ $$ret -ne 0 ]; then echo "$(SPECFILE) not tagged with tag $(TAG)"; exit 1; fi - -plague: build-checkcvs $(COMMON_DIR)/branches +plague: build-check $(COMMON_DIR)/branches @if [ ! -x "$(PLAGUE_CLIENT)" ]; then echo "Must have plague-client installed - see http://fedoraproject.org/wiki/Extras/BuildSystemClientSetup"; exit 1; fi $(PLAGUE_CLIENT) build $(NAME) $(TAG) $(TARGET) koji: build-check $(COMMON_DIR)/branches - @if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi - $(info $(BUILD_CLIENT) $(SECONDARY_CONFIG) build $(BUILD_FLAGS) dist-$(TARGET)-$(KOJI_BUILD) '$(GIT_URL)') - -kojicvs: build-check $(COMMON_DIR)/branches @if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi $(BUILD_CLIENT) $(SECONDARY_CONFIG) build $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)' -#ifneq (, $(filter devel, $(BRANCH))) +ifneq (, $(filter devel, $(BRANCH))) build: koji -#else -#build: plague -#endif +else +build: plague +endif scratch-build: build-check @if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi @@ -484,9 +461,6 @@ endif cvsurl: @echo '$(CVS_URL)' -giturl: - @echo '$(GIT_URL)' - chain-build: build-check @if [ -z "$(CHAIN)" ]; then \ echo "Missing CHAIN variable, please specify the order of packages to" ; \ @@ -578,16 +552,10 @@ rediff: clog: $(SPECFILE) @sed -n '/^%changelog/,/^$$/{/^%/d;/^$$/d;s/%%/%/g;p}' $(SPECFILE) | tee $@ -commitcvs: - clog - @cvs commit -F $? - @rm -f clog commit: clog - @git commit -m $? + @cvs commit -F $? @rm -f clog -push: - @git push help: @echo "Usage: make "