mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
projects-dir.mk: Remove CVS support
Now that CVS is finally retired for building multiple projects from VCS, remove support. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
e589caf73f
commit
67fb954f3e
1 changed files with 11 additions and 68 deletions
|
|
@ -37,7 +37,7 @@ JW_BUILD_REMOTE_BINDIR = /opt/jw-build/bin
|
|||
SHELL = /bin/bash -o pipefail +H
|
||||
PROJECTS_TXT ?= projects.txt
|
||||
JW_BUILD_VERBOSE ?= false
|
||||
BASE_PKGS = git cvs make sudo time time xdg-utils python3
|
||||
BASE_PKGS = git make sudo time time xdg-utils python3
|
||||
PREREQ_RELEASE ?= pull
|
||||
|
||||
# ------------ evaluate Makefile and environment variables
|
||||
|
|
@ -70,13 +70,8 @@ OFFLINE_PROJECTS ?= $(EXCLUDE_FROM_BUILD)
|
|||
TEXT_FILES_CACHE ?= text-files.txt
|
||||
|
||||
ifndef JANWARE_USER
|
||||
ifneq ($(wildcard CVS/Root),)
|
||||
JANWARE_USER = $(shell sed '/^:ext/ !d; s/:ext:\([^@]\+\)@.*/\1/' CVS/Root)
|
||||
$(warning Assuming JANWARE_USER=$(JANWARE_USER) from CVS/Root)
|
||||
else
|
||||
JANWARE_USER = $(shell id -un)
|
||||
$(warning Assuming JANWARE_USER=$(JANWARE_USER) from id -un)
|
||||
endif
|
||||
JANWARE_USER := $(shell id -un)
|
||||
$(warning Assuming JANWARE_USER=$(JANWARE_USER) from id -un)
|
||||
$(warning Explicitly set environment variable JANWARE_USER to turn off this warning!)
|
||||
endif
|
||||
|
||||
|
|
@ -90,16 +85,14 @@ ifeq ($(OFFLINE),true)
|
|||
UNAVAILABLE_TARGETS ?= pull.done update.done clone.done
|
||||
else
|
||||
UNAVAILABLE_TARGETS ?=
|
||||
export CVSROOT = :ext:$(JANWARE_USER)@cvs.janware.com:/srv/cvs
|
||||
endif
|
||||
|
||||
ifneq ($(JW_BUILD_SSH),)
|
||||
export CVS_RSH := $(JW_BUILD_SSH)
|
||||
ifneq ($(origin JW_BUILD_SSH),undefined)
|
||||
export GIT_SSH := $(JW_BUILD_SSH)
|
||||
else
|
||||
export CVS_RSH := $(SSH_WRAPPER_SH)
|
||||
export GIT_SSH := $(SSH_WRAPPER_SH)
|
||||
endif
|
||||
|
||||
export GIT_SSH := $(CVS_RSH)
|
||||
ifeq ($(filter pkg-%,$(MAKECMDGOALS)),)
|
||||
export JW_BUILD_SSH_EXTRA_OPTS += -o StrictHostKeyChecking=no -o ControlMaster=auto -o ControlPath=/tmp/%r@jw-build:%h:%p -o ControlPersist=3m -l $(JANWARE_USER)
|
||||
endif
|
||||
|
|
@ -140,14 +133,12 @@ CREATE_PROJECT_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR
|
|||
LIST_VCS_FILES_SH = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/scm.sh $(JW_BUILD_BINDIR)/scm.sh) scm-sh-not-found) ls-files
|
||||
JW_PKG = /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/jw-pkg $(JW_BUILD_BINDIR)/jw-pkg) jw-pkg-not-found)
|
||||
GIT_SRV_ADMIN_SH = JW_BUILD_SSH_EXTRA_OPTS="$(JW_BUILD_SSH_EXTRA_OPTS)" $(GIT_SSH) $(JANWARE_USER)@git.janware.com $(JW_BUILD_REMOTE_BINDIR)/git-srv-admin.sh
|
||||
CVS_ADMIN_SH = JW_BUILD_SSH_EXTRA_OPTS="$(JW_BUILD_SSH_EXTRA_OPTS)" $(GIT_SSH) $(JANWARE_USER)@cvs.janware.com $(JW_BUILD_REMOTE_BINDIR)/cvs-admin.sh
|
||||
|
||||
# ------------ projects to be built
|
||||
|
||||
TARGET_PROJECTS = $(filter-out $(EXCLUDE_FROM_BUILD),$(PROJECTS))
|
||||
BUILD_PROJECTS = $(shell $(PROJECTS_PY_BUILD) --build-order all $(TARGET_PROJECTS))
|
||||
GIT_PROJECTS = $(patsubst %/,%,$(dir $(wildcard $(addsuffix /.git,$(BUILD_PROJECTS)))))
|
||||
CVS_PROJECTS = $(patsubst %/,%,$(dir $(wildcard $(addsuffix /CVS,$(BUILD_PROJECTS)))))
|
||||
|
||||
# ------------ targets
|
||||
|
||||
|
|
@ -177,9 +168,6 @@ help doc-project doc-module:
|
|||
$(BROWSER) $(firstword $(shell sed '/https:/ !d; s%.*https%https%; s/ .*//' $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
status: $(SSH_WRAPPER_SH)
|
||||
for p in $(CVS_PROJECTS); do test -f $$d/CVS || echo $$p; done
|
||||
cvs status $(addsuffix VERSION,$(CVS_PROJECTS))
|
||||
$(PGIT_SH) -uno status
|
||||
|
||||
build-order-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
|
||||
$(PROJECTS_PY_BUILD) --build-order $* $(TARGET_PROJECTS) | sed 's/ */\n/g'
|
||||
|
|
@ -305,7 +293,7 @@ done.clean:
|
|||
list-maintainers: $(SSH_WRAPPER_SH)
|
||||
$(GIT_SRV_ADMIN_SH) $@
|
||||
|
||||
update pull: purge cvs-update git-clone
|
||||
update pull: purge git-clone
|
||||
touch pull.done
|
||||
|
||||
sync: pull push
|
||||
|
|
@ -315,19 +303,12 @@ sync-all: pull-all push-all
|
|||
sync-%:
|
||||
ssh $* make -C $(shell pwd) sync
|
||||
|
||||
pull-all: purge cvs-update git-clone git-pull-all
|
||||
pull-all: purge git-clone git-pull-all
|
||||
touch clone.done
|
||||
touch pull.done
|
||||
|
||||
diff-all diff: $(SSH_WRAPPER_SH)
|
||||
cvs diff -u; $(PGIT_SH) diff
|
||||
|
||||
cvs-diff: $(SSH_WRAPPER_SH)
|
||||
cvs diff -u
|
||||
|
||||
cvs-update: $(SSH_WRAPPER_SH)
|
||||
rm -f $@.done
|
||||
make $@.done
|
||||
$(PGIT_SH) diff
|
||||
|
||||
git-push push: $(SSH_WRAPPER_SH)
|
||||
$(PGIT_SH) push
|
||||
|
|
@ -379,27 +360,12 @@ git-echo-links-%: | $(TEXT_FILES_CACHE)
|
|||
git-update-project-descriptions: $(SSH_WRAPPER_SH)
|
||||
$(GIT_SRV_ADMIN_SH) -j update-descriptions all
|
||||
|
||||
git-pull-%: $(SSH_WRAPPER_SH) cvs-update.done
|
||||
git-pull-%: $(SSH_WRAPPER_SH)
|
||||
PGIT_CLONE_FROM_USER=$* $(PGIT_SH) clone
|
||||
|
||||
git-commit:
|
||||
$(PGIT_SH) commit
|
||||
|
||||
git-conv-%: $(SSH_WRAPPER_SH)
|
||||
[ -e $*/.git ] || { \
|
||||
mv $* old/ ;\
|
||||
if PROJECTS="$*" make clone; then \
|
||||
sed -i "/^D\/$*\// d" CVS/Entries ;\
|
||||
else \
|
||||
mv old/$* . ;\
|
||||
fi \
|
||||
}
|
||||
|
||||
git-check-conv: $(SSH_WRAPPER_SH)
|
||||
for p in `$(GIT_SRV_ADMIN_SH) -u jan -j list-personal-projects`; do \
|
||||
make git-conv-$$p ;\
|
||||
done
|
||||
|
||||
# --- rules
|
||||
|
||||
$(SSH_WRAPPER_SH): $(PROJECTS_MAKEFILE_NAME)
|
||||
|
|
@ -411,30 +377,7 @@ clean.ssh-wrapper:
|
|||
rm -f $(SSH_WRAPPER_SH)
|
||||
distclean: clean.ssh-wrapper
|
||||
|
||||
define check_cvs_user
|
||||
@if ! grep -q ":ext:$(JANWARE_USER)@" CVS/Root; then \
|
||||
echo "Wrong username in CVS/Root, change that to: $(CVSROOT)" ;\
|
||||
exit 1; \
|
||||
fi
|
||||
endef
|
||||
|
||||
cvsdir.done: $(SSH_WRAPPER_SH)
|
||||
if [ ! -d CVS ]; then \
|
||||
mkdir CVS && \
|
||||
echo $(CVSROOT) > CVS/Root && \
|
||||
echo proj > CVS/Repository && \
|
||||
touch CVS/Entries ;\
|
||||
fi
|
||||
touch $@
|
||||
|
||||
cvs-update.done: cvsdir.done $(SSH_WRAPPER_SH)
|
||||
$(check_cvs_user)
|
||||
cvs update -dP Makefile $(shell $(CVS_ADMIN_SH) list-projects)
|
||||
touch $@
|
||||
|
||||
update.done: purge
|
||||
|
||||
pull.done: $(filter-out $(UNAVAILABLE_TARGETS),cvs-update.done clone.done)
|
||||
pull.done: $(filter-out $(UNAVAILABLE_TARGETS), clone.done)
|
||||
touch $@
|
||||
|
||||
clone.done: $(filter-out $(UNAVAILABLE_TARGETS),$(SSH_WRAPPER_SH))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue