Skip to content

Commit

Permalink
Keep the owner:group of the one downloading the tarball
Browse files Browse the repository at this point in the history
In the scenario:
./configure --prefix=<something_which_needs_su/sudo>
make domserver <as unpriviliged user which downloaded the tarball>
sudo make-installdomserver <as root>

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

See
#2303 (comment)
for the reasoning behind this.

Also fix the maintainer-install option, make would not run if the directory already exists so we would only get to this step if the directory is not there, so removing it would always be a NO-OP.
  • Loading branch information
vmcj authored and Michael Vasseur committed Oct 28, 2024
1 parent 9da8108 commit 465e07b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/jobs/configure-checks/setup_configure_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ case $distro_id in
apt-get update; apt-get full-upgrade -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
;;
php-intl php-json php-mbstring php-mysql php-xml php-zip -y ;;
esac

# Build the configure file
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ endif
domserver: domserver-configure paths.mk config
judgehost: judgehost-configure paths.mk config
docs: paths.mk config
nstall-domserver: composer-dump-autoload domserver domserver-create-dirs
install-domserver: domserver domserver-create-dirs
install-judgehost: judgehost judgehost-create-dirs
install-docs: docs-create-dirs
dist: configure composer-dependencies
Expand Down
10 changes: 7 additions & 3 deletions webapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/Makefile.global
# Subdirectories to recurse into for REC_TARGETS
SUBDIRS = config

domserver: composer-dump-autoload
domserver: composer-dump-autoload public/bundles/nelmioapidoc

# Install PHP dependencies
composer-dependencies:
Expand Down Expand Up @@ -46,7 +46,6 @@ composer-dump-autoload-dev:
public/bundles/nelmioapidoc:
# 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 $@
mkdir -p $@
cp -a vendor/nelmio/api-doc-bundle/public/* $@

Expand Down Expand Up @@ -79,11 +78,16 @@ maintainer-conf: .env.local

maintainer-install: composer-dump-autoload-dev

maintainer-install-l:
# This must be done first to install with the rest.
-rm -rf public/bundles/nelmioapidoc
$(MAKE) public/bundles/nelmioapidoc

maintainer-clean-l:
-for d in cache log ; do \
for t in dev prod ; do \
rm -rf var/$$d/$$t ; \
done ; \
done

.PHONY: composer-dump-autoload-dev
.PHONY: composer-dump-autoload composer-dump-autoload-dev

0 comments on commit 465e07b

Please sign in to comment.