diff --git a/.github/jobs/data/codespellignorefiles.txt b/.github/jobs/data/codespellignorefiles.txt index 4130997934..9a1d147477 100644 --- a/.github/jobs/data/codespellignorefiles.txt +++ b/.github/jobs/data/codespellignorefiles.txt @@ -10,7 +10,7 @@ ./config.guess ./gitlab/codespell.yml ./.github/jobs/uploadcodecov.sh -./lib/vendor +./webapp/vendor ./webapp/public/bundles ./webapp/public/js/ace ./webapp/templates/bundles diff --git a/.github/jobs/syntax-check b/.github/jobs/syntax-check index 609846369f..b6aa5bb810 100755 --- a/.github/jobs/syntax-check +++ b/.github/jobs/syntax-check @@ -23,7 +23,7 @@ if [ ! -x /usr/bin/shellcheck ]; then fi find . \( \ - -path ./lib/vendor -prune \ + -path ./webapp/vendor -prune \ -o -path ./webapp/var -prune \ -o -path ./output -prune \ -o -path ./.git -prune \ @@ -41,7 +41,7 @@ while read -r i ; do fi if grep -q "^#\\!.*/bin/sh" "$i" && \ [ "${i##*.}" != "zip" ] && \ - echo "$i" | grep -qvE '(^\./(misc-tools/dj_judgehost_cleanup.in|misc-tools/dj_make_chroot.in|config|autom4te|install-sh|sql/files/defaultdata/hs/run|sql/files/defaultdata/kt/run|lib/vendor/|output|judge/judgedaemon))'; then + echo "$i" | grep -qvE '(^\./(misc-tools/dj_judgehost_cleanup.in|misc-tools/dj_make_chroot.in|config|autom4te|install-sh|sql/files/defaultdata/hs/run|sql/files/defaultdata/kt/run|webapp/vendor/|output|judge/judgedaemon))'; then # shellcheck disable=SC2001 echo "$i" | sed -e 's|^./|check for bashisms: |' checkbashisms "$i" diff --git a/Makefile b/Makefile index f08ee4030d..6cf2af7141 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ export TOPDIR = $(shell pwd) REC_TARGETS=build domserver install-domserver judgehost install-judgehost \ docs install-docs inplace-install inplace-uninstall maintainer-conf \ - composer-dependencies composer-dependencies-dev + maintainer-install composer-dependencies composer-dependencies-dev # Global Makefile definitions include $(TOPDIR)/Makefile.global @@ -198,7 +198,7 @@ inplace-conf-common: dist # Install the system in place: don't really copy stuff, but create # symlinks where necessary to let it work from the source tree. # This stuff is a hack! -maintainer-install: inplace-install composer-dump-autoload-dev +maintainer-install: inplace-install inplace-install: build domserver-create-dirs judgehost-create-dirs inplace-install-l: # Replace libjudgedir with symlink to prevent lots of symlinks: @@ -289,7 +289,7 @@ coverity-conf: coverity-build: paths.mk $(MAKE) build build-scripts # Secondly, delete all upstream PHP libraries to not analyze those: - -rm -rf lib/vendor/* + -rm -rf webapp/vendor/* @VERSION=` grep '^VERSION =' paths.mk | sed 's/^VERSION = *//'` ; \ PUBLISHED=`grep '^PUBLISHED =' paths.mk | sed 's/^PUBLISHED = *//'` ; \ if [ "$$PUBLISHED" = release ]; then DESC="release" ; \ @@ -316,5 +316,4 @@ clean-autoconf: $(addprefix inplace-,conf conf-common install uninstall) \ $(addprefix maintainer-,conf install) clean-autoconf config distdocs \ composer-dependencies composer-dependencies-dev \ - composer-dump-autoload-dev \ coverity-conf coverity-build diff --git a/lib/.gitignore b/lib/.gitignore index 7963ca6c0d..c585ac7609 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -1,4 +1,3 @@ /judge /submit -/vendor /dj_utils.py diff --git a/lib/Makefile b/lib/Makefile index 397308c400..238684c01f 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -2,8 +2,6 @@ ifndef TOPDIR TOPDIR=.. endif -REC_TARGETS = domserver - include $(TOPDIR)/Makefile.global OBJECTS = $(addsuffix $(OBJEXT),lib.error lib.misc) @@ -22,5 +20,3 @@ install-domserver: install-judgehost: $(INSTALL_DATA) -t $(DESTDIR)$(judgehost_libdir) *.php *.sh $(INSTALL_PROG) -t $(DESTDIR)$(judgehost_libdir) alert - -domserver: SUBDIRS=vendor diff --git a/webapp/.gitignore b/webapp/.gitignore index 70a4c6b3b2..a3afa9e59b 100644 --- a/webapp/.gitignore +++ b/webapp/.gitignore @@ -8,6 +8,7 @@ /var/log/* !var/log/.gitkeep /vendor/ +!vendor/Makefile ###> phpunit/phpunit ### /phpunit.xml diff --git a/webapp/Makefile b/webapp/Makefile index e5a2393266..0c4cbefe36 100644 --- a/webapp/Makefile +++ b/webapp/Makefile @@ -7,7 +7,7 @@ REC_TARGETS = domserver include $(TOPDIR)/Makefile.global # Subdirectories to recurse into for REC_TARGETS -SUBDIRS = config +SUBDIRS = config vendor maintainer-conf: .env.local @@ -18,12 +18,6 @@ maintainer-conf: .env.local @echo "# the DOMjudge Symfony application in developer mode. Adjust as needed." >> $@ @echo "APP_ENV=dev" >> $@ -# Dump autoload dependencies (including plugins) -# This is needed since symfony/runtime is a Composer plugin that runs while dumping -# the autoload file -composer-dump-autoload: - composer $(subst 1,-q,$(QUIET)) dump-autoload -o -a - composer-dump-autoload-dev: composer $(subst 1,-q,$(QUIET)) dump-autoload @@ -37,7 +31,7 @@ copy-bundle-assets: clean-l: -rm -rf public/bundles/nelmioapidoc -install-domserver: composer-dump-autoload +install-domserver: # This must be done first to install with the rest. $(MAKE) copy-bundle-assets $(INSTALL_DIR) $(DESTDIR)$(domserver_webappdir); @@ -58,7 +52,7 @@ install-domserver: composer-dump-autoload done $(INSTALL_DATA) -t $(DESTDIR)$(domserver_webappdir) phpunit.xml.dist .env -inplace-install: composer-autoclean composer-dump-autoload +inplace-install: composer-autoclean maintainer-install: composer-dump-autoload-dev # Install PHP dependencies @@ -74,7 +68,7 @@ composer-dependencies-dev: composer $(subst 1,-q,$(QUIET)) install --prefer-dist --no-scripts --no-plugins composer-autoclean: - # Make sure we're running from a clean state: +# Make sure we're running from a clean state: composer auto-scripts maintainer-clean-l: diff --git a/lib/vendor/Makefile b/webapp/vendor/Makefile similarity index 70% rename from lib/vendor/Makefile rename to webapp/vendor/Makefile index b6ee26a361..210d2e6c57 100644 --- a/lib/vendor/Makefile +++ b/webapp/vendor/Makefile @@ -7,6 +7,6 @@ clean-l: rm -f autoload_runtime.php autoload_runtime.php: - composer $(subst 1,-q,$(QUIET)) dump-autoload -o -a -d $(TOPDIR) + composer $(subst 1,-q,$(QUIET)) dump-autoload -o -a -d .. domserver: autoload_runtime.php