* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
75 lines
2.0 KiB
Makefile
75 lines
2.0 KiB
Makefile
################################################################################
|
|
#
|
|
# python-web2py
|
|
#
|
|
################################################################################
|
|
|
|
PYTHON_WEB2PY_VERSION = 2.20.4
|
|
PYTHON_WEB2PY_SITE = $(call github,web2py,web2py,v$(PYTHON_WEB2PY_VERSION))
|
|
PYTHON_WEB2PY_LICENSE = LGPL-3.0
|
|
PYTHON_WEB2PY_LICENSE_FILES = LICENSE
|
|
PYTHON_WEB2PY_DEPENDENCIES = $(if $(BR2_PACKAGE_PYTHON3),host-python3 python3,host-python python) \
|
|
host-python-pydal host-python-yatl
|
|
|
|
PYTHON_WEB2PY_EXCLUSIONS = \
|
|
welcome.w2p \
|
|
applications/examples \
|
|
applications/welcome \
|
|
deposit \
|
|
docs \
|
|
examples \
|
|
extras \
|
|
handlers \
|
|
scripts \
|
|
ABOUT \
|
|
anyserver.py \
|
|
CHANGELOG \
|
|
Makefile \
|
|
MANIFEST.in \
|
|
README.markdown \
|
|
setup.py \
|
|
tox.ini
|
|
|
|
define PYTHON_WEB2PY_GENERATE_PASSWORD
|
|
$(HOST_DIR)/bin/python -c 'import os; \
|
|
os.chdir("$(@D)"); \
|
|
from gluon.main import save_password; \
|
|
save_password($(BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD),8000)'
|
|
endef
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON_WEB2PY_INSTALL_ADMIN),y)
|
|
PYTHON_WEB2PY_POST_BUILD_HOOKS += PYTHON_WEB2PY_GENERATE_PASSWORD
|
|
else
|
|
PYTHON_WEB2PY_EXCLUSIONS += applications/admin
|
|
endif
|
|
|
|
define PYTHON_WEB2PY_INSTALL_TARGET_CMDS
|
|
mkdir -p $(TARGET_DIR)/var/www/web2py
|
|
rsync -a $(@D)/ $(TARGET_DIR)/var/www/web2py/ \
|
|
$(addprefix --exclude=,$(PYTHON_WEB2PY_EXCLUSIONS))
|
|
endef
|
|
|
|
define PYTHON_WEB2PY_INSTALL_INIT_SYSV
|
|
$(INSTALL) -m 0755 -D package/python-web2py/S51web2py \
|
|
$(TARGET_DIR)/etc/init.d/S51web2py
|
|
endef
|
|
|
|
define PYTHON_WEB2PY_INSTALL_INIT_SYSTEMD
|
|
$(INSTALL) -D -m 0644 package/python-web2py/web2py.service \
|
|
$(TARGET_DIR)/usr/lib/systemd/system/web2py.service
|
|
endef
|
|
|
|
# www-data user and group are used for web2py. Because these user and group
|
|
# are already set by buildroot, it is not necessary to redefine them.
|
|
# See system/skeleton/etc/passwd
|
|
# username: www-data uid: 33
|
|
# groupname: www-data gid: 33
|
|
#
|
|
# So, we just need to create the directories used by web2py with the right
|
|
# ownership.
|
|
define PYTHON_WEB2PY_PERMISSIONS
|
|
/var/www/web2py r 750 33 33 - - - - -
|
|
endef
|
|
|
|
$(eval $(generic-package))
|