From 33583cfe3ce1e1e65512e20d38979e582263bebd Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Sun, 21 Jan 2024 16:22:45 +0100 Subject: [PATCH] Keep the owner:group of the one downloading the tarball In the scenario: ./configure --prefix= make domserver sudo make-installdomserver We would copy the Nelmiodoc files as root, so the user can't run a make {dist}clean without errors as we can't remove the folder as its owned by root. We now also install nelmiodoc together with composer in the base image for CI: - together with the needed dependencies - make sure we get an autoload.php --- .github/jobs/configure-checks/all.bats | 3 +++ .../jobs/configure-checks/setup_configure_image.sh | 12 +++++++++++- webapp/Makefile | 8 +++++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/jobs/configure-checks/all.bats b/.github/jobs/configure-checks/all.bats index b754c33b960..233779b46b8 100644 --- a/.github/jobs/configure-checks/all.bats +++ b/.github/jobs/configure-checks/all.bats @@ -186,6 +186,9 @@ compile_assertions_finished () { groupdel ${www_group} || true done repo-install httpd + for www_group in nginx apache; do + cat /etc/{g,}shadow /etc/group|grep ${www_group} || true + done run ./configure --with-domjudge-user=$u assert_line "checking webserver-group... apache (detected)" assert_line " * webserver group.....: apache" diff --git a/.github/jobs/configure-checks/setup_configure_image.sh b/.github/jobs/configure-checks/setup_configure_image.sh index 6be3f188efc..e1c84f8b746 100755 --- a/.github/jobs/configure-checks/setup_configure_image.sh +++ b/.github/jobs/configure-checks/setup_configure_image.sh @@ -10,12 +10,22 @@ case $distro_id in dnf install pkg-config make bats autoconf automake util-linux -y ;; *) apt-get update; apt-get full-upgrade -y - apt-get install pkg-config make bats autoconf -y ;; + apt-get install pkg-config make bats autoconf -y + apt-get install composer php php-cli php-curl php-fpm php-gd \ + php-intl php-json php-mbstring php-mysql php-xml php-zip -y + ;; esac # Build the configure file make configure +case $distro_id in + "ID=fedora") + true ;; + *) + composer install --no-scripts ;; +esac + # Install extra assert statements for bots cp submit/assert.bash .github/jobs/configure-checks/ diff --git a/webapp/Makefile b/webapp/Makefile index 7c337993a9d..addcfbf5e70 100644 --- a/webapp/Makefile +++ b/webapp/Makefile @@ -12,16 +12,18 @@ SUBDIRS = config copy-bundle-assets: # We can not use bin/console here, as when using a fakeroot, # the include paths are broken. We just copy in the data we need - -rm -rf public/bundles/nelmioapidoc + -rm -rf public/bundles/nelmioapidoc/* mkdir -p public/bundles/nelmioapidoc - cp -R ../lib/vendor/nelmio/api-doc-bundle/Resources/public/* public/bundles/nelmioapidoc/ + cp -Ra ../lib/vendor/nelmio/api-doc-bundle/Resources/public/* public/bundles/nelmioapidoc/ clean-l: -rm -rf public/bundles/nelmioapidoc -install-domserver: +domserver-l: # This must be done first to install with the rest. $(MAKE) copy-bundle-assets + +install-domserver: $(INSTALL_DIR) $(DESTDIR)$(domserver_webappdir); for d in bin config migrations public resources src templates tests ; do \ $(call install_tree,$(DESTDIR)$(domserver_webappdir),$$d) ; \