Sul mio laptop con Ubuntu Linux 24.04 (LTS) sto cercando di fare con CookiePlone una prima installazione di Plone 6 con Classic UI. Il comando finale, eseguito nella directory backend:
make backend-build
che dovrebbe generare il backend dà l'esito indicato nel titolo. È un problema dovuto al Makefile presente nella directory o a qualche mio errore nella configurazione di Zope? Riproduco il Makefile e quelli in backend/instnce/etc, grazie per l'aiuto.
backend/Makefile
Defensive settings for make:
Your Makefiles are wrong · Jacob Davis-Hansson
SHELL:=bash
.ONESHELL:
.SHELLFLAGS:=-xeu -o pipefail -O inherit_errexit -c
.SILENT:
.DELETE_ON_ERROR:
MAKEFLAGS+=--warn-undefined-variables
MAKEFLAGS+=--no-builtin-rules
We like colors
From: Colored Makefile for Golang projects (Example)
RED=tput setaf 1
GREEN=tput setaf 2
RESET=tput sgr0
YELLOW=tput setaf 3
IMAGE_NAME_PREFIX=registry.gitlab.com/bridgeconvivium/bridgeconvivium
IMAGE_TAG=latest
Python checks
UV?=uv
installed?
ifeq (, $(shell which $(UV) ))
$(error "UV=$(UV) not found in $(PATH)")
endif
PLONE_SITE_ID=Plone
BACKEND_FOLDER=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
PLONE_VERSION=$(shell cat $(BACKEND_FOLDER)/version.txt)
EXAMPLE_CONTENT_FOLDER=${BACKEND_FOLDER}/src/bridgeconvivium/setuphandlers/examplecontent
VENV_FOLDER=$(BACKEND_FOLDER)/.venv
export VIRTUAL_ENV=$(VENV_FOLDER)
BIN_FOLDER=$(VENV_FOLDER)/bin
Environment variables to be exported
export PYTHONWARNINGS := ignore
export DOCKER_BUILDKIT := 1
all: build
Add the following 'help' target to your Makefile
And add help text after each target name starting with '##'
.PHONY: help
help: ## This help message
@grep -E '[1]+:.?## .$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
requirements-mxdev.txt: pyproject.toml mx.ini ## Generate constraints file
@echo "$(GREEN)==> Generate constraints file$(RESET)"
@echo '-c https://dist.plone.org/release/$(PLONE_VERSION)/constraints.txt' > requirements.txt
@uvx mxdev -c mx.ini
$(VENV_FOLDER): requirements-mxdev.txt ## Install dependencies
@echo "$(GREEN)==> Install environment$(RESET)"
@uv venv $(VENV_FOLDER)
@uv pip install -r requirements-mxdev.txt
.PHONY: sync
sync: $(VENV_FOLDER) ## Sync project dependencies
@echo "$(GREEN)==> Sync project dependencies$(RESET)"
@uv pip install -r requirements-mxdev.txt
Add the following 'help' target to your Makefile
And add help text after each target name starting with '##'
.PHONY: help
help: ## This help message
@grep -E '[2]+:.?## .$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
requirements-mxdev.txt: pyproject.toml mx.ini ## Generate constraints file
@echo "$(GREEN)==> Generate constraints file$(RESET)"
@echo '-c https://dist.plone.org/release/$(PLONE_VERSION)/constraints.txt' > requirements.txt
@uvx mxdev -c mx.ini
$(VENV_FOLDER): requirements-mxdev.txt ## Install dependencies
@echo "$(GREEN)==> Install environment$(RESET)"
@uv venv $(VENV_FOLDER)
@uv pip install -r requirements-mxdev.txt
.PHONY: sync
sync: $(VENV_FOLDER) ## Sync project dependencies
@echo "$(GREEN)==> Sync project dependencies$(RESET)"
@uv pip install -r requirements-mxdev.txt
.PHONY: sync
sync: $(VENV_FOLDER) ## Sync project dependencies
@echo "$(GREEN)==> Sync project dependencies$(RESET)"
@uv pip install -r requirements-mxdev.txt
instance/etc/zope.ini instance/etc/zope.conf: instance.yaml ## Create instance configuration
@echo "$(GREEN)==> Create instance configuration$(RESET)"
@uvx cookiecutter -f --no-input -c 2.1.1 --config-file instance.yaml gh:plone/cookiecutter-zope-instance
.PHONY: config
config: instance/etc/zope.ini
.PHONY: install
install: $(VENV_FOLDER) config ## Install Plone and dependencies
.PHONY: clean
clean: ## Clean installation and instance
@echo "$(RED)==> Cleaning environment and build$(RESET)"
@rm -rf $(VENV_FOLDER) pyvenv.cfg .installed.cfg instance/etc .venv .pytest_cache .ruff_cache constraints* requirements*
.PHONY: remove-data
remove-data: ## Remove all content
@echo "$(RED)==> Removing all content$(RESET)"
rm -rf $(VENV_FOLDER) instance/var
.PHONY: start
start: $(VENV_FOLDER) instance/etc/zope.ini ## Start a Plone instance on localhost:8080
@$(BIN_FOLDER)/runwsgi instance/etc/zope.ini
.PHONY: console
console: $(VENV_FOLDER) instance/etc/zope.ini ## Start a console into a Plone instance
@$(BIN_FOLDER)/zconsole debug instance/etc/zope.conf
.PHONY: create-site
create-site: $(VENV_FOLDER) instance/etc/zope.ini ## Create a new site from scratch
@$(BIN_FOLDER)/zconsole run instance/etc/zope.conf ./scripts/create_site.py
Example Content
.PHONY: update-example-content
update-example-content: $(VENV_FOLDER) ## Export example content inside package
@echo "$(GREEN)==> Export example content into $(EXAMPLE_CONTENT_FOLDER) $(RESET)"
if [ -d $(EXAMPLE_CONTENT_FOLDER)/content ]; then rm -r $(EXAMPLE_CONTENT_FOLDER)/* ;fi
@$(BIN_FOLDER)/plone-exporter instance/etc/zope.conf $(PLONE_SITE_ID) $(EXAMPLE_CONTENT_FOLDER)
QA
.PHONY: lint
lint: ## Check and fix code base according to Plone standards
@echo "$(GREEN)==> Lint codebase$(RESET)"
@uvx ruff@latest check --fix --config $(BACKEND_FOLDER)/pyproject.toml
@uvx pyroma@latest -d .
@uvx check-python-versions@latest .
@uvx zpretty@latest --check src
.PHONY: format
format: ## Check and fix code base according to Plone standards
@# Example Content
.PHONY: update-example-content
update-example-content: $(VENV_FOLDER) ## Export example content inside package
@echo "$(GREEN)==> Export example content into $(EXAMPLE_CONTENT_FOLDER) $(RESET)"
if [ -d $(EXAMPLE_CONTENT_FOLDER)/content ]; then rm -r $(EXAMPLE_CONTENT_FOLDER)/* ;fi
@$(BIN_FOLDER)/plone-exporter instance/etc/zope.conf $(PLONE_SITE_ID) $(EXAMPLE_CONTENT_FOLDER)
QA
.PHONY: lint
lint: ## Check and fix code base according to Plone standards
@echo "$(GREEN)==> Lint codebase$(RESET)"
@uvx ruff@latest check --fix --config $(BACKEND_FOLDER)/pyproject.toml
@uvx pyroma@latest -d .
@uvx check-python-versions@latest .
@uvx zpretty@latest --check src
.PHONY: format
format: ## Check and fix code base according to Plone standards
@echo "$(GREEN)==> Format codebase$(RESET)"
@uvx ruff@latest check --select I --fix --config $(BACKEND_FOLDER)/pyproject.toml
@uvx ruff@latest format --config $(BACKEND_FOLDER)/pyproject.toml
@uvx zpretty@latest -i src
i18n
.PHONY: i18n
i18n: $(VENV_FOLDER) ## Update locales
@echo "$(GREEN)==> Updating locales$(RESET)"
@$(BIN_FOLDER)/python -m bridgeconvivium.locales
Tests
.PHONY: test
test: $(VENV_FOLDER) ## run tests
@$(BIN_FOLDER)/pytest
.PHONY: test-coverage
test-coverage: $(VENV_FOLDER) ## run tests with coverage
@$(BIN_FOLDER)/pytest --cov=bridgeconvivium --cov-report term-missing
Build Docker images
.PHONY: build-image
build-image: ## Build Docker Images
@docker build . -t $(IMAGE_NAME_PREFIX)-backend:$(IMAGE_TAG) -f Dockerfile --build-arg PLONE_VERSION=$(PLONE_VERSION)
Acceptance tests
.PHONY: acceptance-backend-start
acceptance-backend-start: ## Start backend acceptance server
ZSERVER_HOST=0.0.0.0 ZSERVER_PORT=55001 LISTEN_PORT=55001 APPLY_PROFILES="bridgeconvivium:default" CONFIGURE_PACKAGES="bridgeconvivium" $(BIN_FOLDER)/robot-server plone.app.robotframework.testing.PLONE_ROBOT_TESTING
.PHONY: acceptance-image-build
acceptance-image-build: ## Build Docker Images
@docker build . -t $(IMAGE_NAME_PREFIX)-backend-acceptance:$(IMAGE_TAG) -f Dockerfile.acceptance --build-arg PLONE_VERSION=$(PLONE_VERSION)
Add bobtemplates features (check bobtemplates.plone's documentation to get the list of available features)
add: $(VENV_FOLDER)
@uvx plonecli add -b .mrbob.ini $(filter-out $@,$(MAKECMDGOALS))
site.zcml
<meta:redefinePermission from="zope2.Public" to="zope.Public" />
<five:loadProducts file="meta.zcml"/>
zope.conf
This file was generated by "cookiecutter-zope-instance"
%define INSTANCEHOME /home/scollo/gilgamesh/cms/plone/2025/local_plone/convivium/bridgeconvivium/backend/instance
instancehome $INSTANCEHOME
%define CLIENTHOME /home/scollo/gilgamesh/cms/plone/2025/local_plone/convivium/bridgeconvivium/backend/instance/var
clienthome $CLIENTHOME
debug-mode off
debug-exceptions off
security-policy-implementation C
verbose-security off
default-zpublisher-encoding utf-8
form-memory-limit 1MB
form-disk-limit 1GB
form-memfile-limit 4KB
</dos_protection>
Database
<zodb_db main>
mount-point /
cache-size 30000
path /home/scollo/gilgamesh/cms/plone/2025/local_plone/convivium/bridgeconvivium/backend/instance/var/filestorage/Data.fs
blob-dir /home/scollo/gilgamesh/cms/plone/2025/local_plone/convivium/bridgeconvivium/backend/instance/var/blobs
pack-keep-old true
</zodb_db>
This file was generated by cookiecutter-zope-instance 2.2.1.
for details follow GitHub - plone/cookiecutter-zope-instance: It bakes configuration for Zope 5
zope.ini
This file was generated by "cookiecutter-zope-instance"
[app:zope]
use = egg:Zope#main
zope_conf = %(here)s/zope.conf
[server:main]
use = egg:waitress#main
listen = localhost:8080
threads = 4
clear_untrusted_proxy_headers = false
max_request_body_size = 1073741824
[filter:translogger]
use = egg:Paste#translogger
setup_console_handler = False
[pipeline:main]
pipeline =
translogger
egg:Zope#httpexceptions
zope
[loggers]
keys = root, plone, waitress.queue, waitress, wsgi
[handlers]
keys = console, accesslog, eventlog
[formatters]
keys = generic, message
[logger_root
level = INFO
handlers = console, eventlog
[logger_plone]
level = INFO
handlers = eventlog
qualname = plone
[logger_waitress.queue]
level = INFO
handlers = eventlog
qualname = waitress.queue
[logger_waitress]
level = INFO
handlers = eventlog
qualname = waitress
[logger_wsgi]
level = INFO
handlers = accesslog
qualname = wsgi
propagate = 0
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[handler_accesslog]
class = FileHandler
args = (r'/home/scollo/gilgamesh/cms/plone/2025/local_plone/convivium/bridgeconvivium/backend/instance/var/log/instance-access.log', 'a')
kwargs = {}
level = INFO
formatter = message
[handler_eventlog]
class = FileHandler
args = (r'/home/scollo/gilgamesh/cms/plone/2025/local_plone/convivium/bridgeconvivium/backend/instance/var/log/instance.log', 'a')
kwargs = {}
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-7.7s [%(name)s:%(lineno)s][%(threadName)s] %(message)s
[handler_accesslog]
class = FileHandler
args = (r'/home/scollo/gilgamesh/cms/plone/2025/local_plone/convivium/bridgeconvivium/backend/instance/var/log/instance-access.log', 'a')
kwargs = {}
level = INFO
formatter = message
[handler_eventlog]
class = FileHandler
args = (r'/home/scollo/gilgamesh/cms/plone/2025/local_plone/convivium/bridgeconvivium/backend/instance/var/log/instance.log', 'a')
kwargs = {}
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s %(levelname)-7.7s [%(name)s:%(lineno)s][%(threadName)s] %(message)s
[formatter_message]
format = %(message)s
