Skip to content

Commit 6b0880c

Browse files
committed
Keep the owner:group of the one downloading the tarball
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
1 parent 5502c03 commit 6b0880c

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.github/jobs/configure-checks/all.bats

+3
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ compile_assertions_finished () {
186186
groupdel ${www_group} || true
187187
done
188188
repo-install httpd
189+
for www_group in nginx apache; do
190+
cat /etc/{g,}shadow /etc/group|grep ${www_group} || true
191+
done
189192
run ./configure --with-domjudge-user=$u
190193
assert_line "checking webserver-group... apache (detected)"
191194
assert_line " * webserver group.....: apache"

.github/jobs/configure-checks/setup_configure_image.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,22 @@ case $distro_id in
1010
dnf install pkg-config make bats autoconf automake util-linux -y ;;
1111
*)
1212
apt-get update; apt-get full-upgrade -y
13-
apt-get install pkg-config make bats autoconf -y ;;
13+
apt-get install pkg-config make bats autoconf -y
14+
apt-get install composer php php-cli php-curl php-fpm php-gd \
15+
php-intl php-json php-mbstring php-mysql php-xml php-zip -y
16+
;;
1417
esac
1518

1619
# Build the configure file
1720
make configure
1821

22+
case $distro_id in
23+
"ID=fedora")
24+
true ;;
25+
*)
26+
composer install --no-scripts ;;
27+
esac
28+
1929
# Install extra assert statements for bots
2030
cp submit/assert.bash .github/jobs/configure-checks/
2131

webapp/Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ SUBDIRS = config
1212
copy-bundle-assets:
1313
# We can not use bin/console here, as when using a fakeroot,
1414
# the include paths are broken. We just copy in the data we need
15-
-rm -rf public/bundles/nelmioapidoc
15+
-rm -rf public/bundles/nelmioapidoc/*
1616
mkdir -p public/bundles/nelmioapidoc
17-
cp -R ../lib/vendor/nelmio/api-doc-bundle/Resources/public/* public/bundles/nelmioapidoc/
17+
cp -a ../lib/vendor/nelmio/api-doc-bundle/Resources/public/* public/bundles/nelmioapidoc/
1818

1919
clean-l:
2020
-rm -rf public/bundles/nelmioapidoc
2121

22-
install-domserver:
22+
domserver-l:
2323
# This must be done first to install with the rest.
2424
$(MAKE) copy-bundle-assets
25+
26+
install-domserver:
2527
$(INSTALL_DIR) $(DESTDIR)$(domserver_webappdir);
2628
for d in bin config migrations public resources src templates tests ; do \
2729
$(call install_tree,$(DESTDIR)$(domserver_webappdir),$$d) ; \

0 commit comments

Comments
 (0)