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:
- together with the needed dependencies
- make sure we get an autoload.php
  • Loading branch information
vmcj committed Jan 21, 2024
1 parent d90f594 commit d4432cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/jobs/configure-checks/all.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 5 additions & 3 deletions webapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) ; \
Expand Down

0 comments on commit d4432cd

Please sign in to comment.